Skip to main content



      Home
Home » Archived » Lua Development Tools » Change keywords(How to change keywords)
icon4.gif  Change keywords [message #1404032] Tue, 29 July 2014 05:17 Go to next message
Eclipse UserFriend
Hi, thanks for the other answers.
Now I need to modify the AST to recognize some other words (differente than standard lua) for my cnc interpreter that have some instructions like C (define for example).
Now I compile fine the project but which files need to modify ?
Treewalk.mlua? I have tried but nothing happen.
Someone help me?
Thanks
Fabio
Re: Change keywords [message #1404465 is a reply to message #1404032] Fri, 01 August 2014 10:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi Fabio,

To add some keyword to the language, you should modify the language grammar.
I am not an MetaLua expert, but here some links to help you:

The github metalua repository:
https://github.com/fab13n/metalua

The last known documentation of metalua (not uptodate):
https://github.com/fab13n/metalua/blob/master/doc/manual/metalua-manual.pdf?raw=true

The metalua code is integrated in LDT here (but it seems already found it):
http://git.eclipse.org/c/ldt/org.eclipse.ldt.git/tree/libraries/metalua

Good luck Smile
Marc
Re: Change keywords [message #1408927 is a reply to message #1404465] Sat, 16 August 2014 10:16 Go to previous messageGo to next message
Eclipse UserFriend
No Message Body
Re: Change keywords [message #1408928 is a reply to message #1408927] Sat, 16 August 2014 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi
I've tried to modify these files but nothing happens.
Do you have an example to insert a new keyword like 'define' C statement?
Please help me.
thanks a lot for your support
Re: Change keywords [message #1420166 is a reply to message #1408928] Tue, 09 September 2014 11:52 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for the late response.

I am sorry, but there is no easy way to add keyword to our code analysis chain.
We will try to make the grammar code more newcomer friendly (maybe a tutorial or documentation ?) for the next release.

Marc
Re: Change keywords [message #1547617 is a reply to message #1420166] Mon, 05 January 2015 09:41 Go to previous message
Eclipse UserFriend
Hi Marc
thank you for attention.
I need an IDE for a modified LUA (CNC controller) that work with with a custom lua compiler.

This compiler has some keywords derived from C language like
* define
* switch case
*ifedf

and others.
Is'nt possibile to modify the code parser or you can explain to me how to modify.

Don't have a tutorial or documentation ?

Thanks a lot

Fabio
Previous Topic:How to SOLELY change LDT editor font size?
Next Topic:Build failure
Goto Forum:
  


Current Time: Wed Mar 19 19:52:45 EDT 2025

Powered by FUDForum. Page generated in 0.04018 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top