A Portable Game Notation (PGN) ANTLR 4 grammar and parser.
The grammar can be found in
src/main/antlr4/nl/bigo/pp
.
Seeing the generated parser in action can be done by building
a fat JAR of the project and then running it to parse a PGN
file. A couple PGN files reside in
src/resources
.
git clone https://github.com/DennisPiskovatskov/PGN-parser
cd PGN-parser
mvn clean antlr4:antlr4
mvn install package
java -jar target/pp-0.1.1-SNAPSHOT.jar src/resources/Karpov.pgn