Antlr4 grammar for Java8 and more specifically for Lambda expressions

385 views
Skip to first unread message

Michail Basios

unread,
Mar 13, 2014, 9:22:26 AM3/13/14
to antlr-di...@googlegroups.com
Hi guys,

This is my first post as I am quite new to Antlr4. I am currently using the Antlr4 generated classes for parsing Java source files and extracting some information about the classes, methods and variables being used and also for some code transformations. 
For doing this task I am using the Java7 provided grammar file. However, I was thinking that I would really like to work on the new features that Java8 is going to provide and more specifically on lambda expressions. 

So what I would like to ask is,

1) Is there any plan for providing a Java8.g4 grammar soon?
2) If not, how difficult would it be for me, that don't have that much experience with grammars, to extend the existing Java7.g4 grammar so as to support lambda expressions and other Java8 features.



Thanks in advance.

Mike.

Michail Basios

unread,
Apr 16, 2014, 9:18:33 AM4/16/14
to antlr-di...@googlegroups.com
I saw that Terence has added the Java8 grammar (for now is still Java7) to the github grammars folder:

Terence Parr

unread,
Apr 16, 2014, 1:48:33 PM4/16/14
to antlr-di...@googlegroups.com
We have  a new feature coming for ANTLR 4.3 that will automatically rewrite indirect left recursion, which allows us to take the language specification directly from the Java spec and have it work…hang tight!  hopefully in the next couple months

T
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Terence Parr

unread,
Apr 25, 2014, 11:55:44 AM4/25/14
to antlr-di...@googlegroups.com
 We have a Java8 grammar that is literally the exact spec, but it requires a major update to ANTLR that automatically transforms grammars. Sam is working on it but we don't know when it will be done. so the grammar will wait until a future ANTLR update.
T


--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dictation in use. Please excuse homophones, malapropisms, and nonsense. 
Reply all
Reply to author
Forward
0 new messages