Exit Full View

Scarea / scarea-syntax / src / main / grammar / groovy / NOTES.txt

NOTES

All I want is an ANTLR v4 grammar for the Groovy language. I found one in the groovy compiler itself ;-)
Alas, it doesn't appear to be well designed as a reusable component inside other projects.
So I've had to do some copy/paste of code to get things to compile without depending on the whole groovy compiler!

Grammar copied from :
https://git-wip-us.apache.org/repos/asf?p=groovy.git;a=tree;f=src/antlr;h=17d5db7500b3cfa23ceeedb161f9d3484e5c336a;hb=84274b14a233403f8db915d1b5892705fe41b4fd

I've modified it so that it is self contained (i.e. does not require any other Java code other than ANTLR itself).
This wasn't trivial; there is still more java code in both GroovyLexer.g4 and GroovyParser.g4 than I'd like.

I used ANTLR's IntelliJ plugin to generate these files. Each time I change the grammar, I
regenerate these files. (Shortcut key ctrl+shift+G).

They are NOT automatically generated via gradle.
Therefore the generated files are included in the git repository.