A sample project illustrating the use of antlr predicates.
Project is built in java using Intellij and uses gradle.
This is pretty minimalistic in order to illustrate the particular feature.
see:
File | Note |
---|---|
Grammar/ProtoPas.g4 | antlr source |
Grammar/gen.bat | to generate the source files |
src/main/java/Delphi.java | supportsInlineVar is used to control inline var support |
src/main/java/ProtoWalker.java | creates very simplistic and probably buggy ast output |
src/main/java/ThrowingErrorListner.java | raise exceptions on parser error |
src/main/java/Main.java | simple main |
src/test/java/ProtoPasTests.java | some basic units tests |