On 06.02.2016 09:37, Guillaume Laforge wrote:
On Sat, Feb 6, 2016 at 3:01 AM, Paco Zarate <[email protected] <mailto:[email protected]>> wrote: For reference here is a java 8 grammar for antlr 4. https://github.com/antlr/grammars-v4/tree/master/java8/Java8.g4 Initially, I was thinking we should start with a blank slate, instead of doing the same approach as we did in the past, which is indeed start from an existing Java grammar... but OTOH... it's likely better Java 8 support out of the box to do so.
A Java grammar has been made with Java in mind, not Groovy. Look at all the modifications we had to do to the grammar we started with we are currently using. There are huge changes. Plus the error reporting is not all that good if the grammar makes a check. I have no idea if that is improved with antlr4, but a custom error message can always give a much more to the point error message, than a general error message generated from the grammar could do. And not only that... for our uses the old grammar is overly complicated. Part of this is because of the checks, but there is also lacking abstraction (from a Groovy point of view only though).
bye Jochen
