Skip to content

A Portable Game Notation (PGN) ANTLR 4 grammar and parser.

License

Notifications You must be signed in to change notification settings

jschenk1/PGN-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PGN-parser

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.

Get started

0. clone this repository

git clone https://github.com/bkiers/PGN-parser
cd PGN-parser

1. generate the lexer and parser classes

mvn clean antlr4:antlr4

2. build the fat JAR

mvn install package

3. parse a PGN file

java -jar target/pp-0.1.0.jar src/resources/Karpov.pgn

About

A Portable Game Notation (PGN) ANTLR 4 grammar and parser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ANTLR 63.1%
  • Java 36.9%