This project contains a small ANTLR showcase and and a talk introducing ANTLR.
The Java 8 grammar from https://github.com/antlr/grammars-v4/blob/master/java8/Java8.g4 is used as an example.
MethodsExtrationExampleextract method names from Java sources using the listener and visitor patterns and XPathLoCCounterANTLR solution to the LoC Code Kata (see http://codekata.com/kata/kata13-counting-code-lines/)
ListeningCalculatorshowcases the listener patternVisitingCalculatorshowcases the visitor patternTreeWalkingCalculatorshowcases tree walkingNumberDumpershowcases XPath on the AST
You can find the accompanying talk (German) in the talk folder.
./gradlew clean installThis project uses the Maven wrapper from https://github.com/takari/maven-wrapper. Alternatively you can use your own Maven installation.
./mvnw io.takari:maven:wrapper -Dmaven=3.5.0
./mvnw clean installParts of this work are based on https://github.com/nielsutrecht/antlr-pres by Niels Dommerholt and are used under the MIT license 3rdparty-licenses/MIT-LICENSE