Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lua Development Tools » Change keywords(How to change keywords)
icon4.gif  Change keywords [message #1404032] Tue, 29 July 2014 09:17 Go to next message
Fabio Tiozzo is currently offline Fabio TiozzoFriend
Messages: 20
Registered: December 2013
Junior Member
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 14:20 Go to previous messageGo to next message
Marc Aubry is currently offline Marc AubryFriend
Messages: 86
Registered: August 2012
Member
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 14:16 Go to previous messageGo to next message
Fabio Tiozzo is currently offline Fabio TiozzoFriend
Messages: 20
Registered: December 2013
Junior Member
No Message Body
Re: Change keywords [message #1408928 is a reply to message #1408927] Sat, 16 August 2014 14:18 Go to previous messageGo to next message
Fabio Tiozzo is currently offline Fabio TiozzoFriend
Messages: 20
Registered: December 2013
Junior Member
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 15:52 Go to previous messageGo to next message
Marc Aubry is currently offline Marc AubryFriend
Messages: 86
Registered: August 2012
Member
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 14:41 Go to previous message
Fabio Tiozzo is currently offline Fabio TiozzoFriend
Messages: 20
Registered: December 2013
Junior Member
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: Thu Sep 20 09:36:50 GMT 2018

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

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

Back to the top