User Tools

Site Tools


05_developer_tutorials:compile_xlparser_xlcompiler

Compile the XL parser & Compiler

The XL parser and compiler are automatically generated from an ANTLR grammar. After any modification on them, they need to be recompiled. The generated classes should not be manually modified. The current ANTLR version used is 2.7.7.

Files location

The grammar for the compiler and the parser are in XL-Compiler/src/main/ressources/de/grogra/xl/ and then compiler/Compiler.tree.g and parser/XL.g. The XLTokenType.txt and CompilerTokenTypes.txt are also required.

Compile the grammar

Put the grammar files and the antlr2.7.7 jar in the same directory. Run the commands:

java -cp antlr2.7.7.jar antlr.Tool Compiler.tree.g
java -cp antlr2.7.7.jar antlr.Tool XL.g

The compiler grammar need to be compiled first as it creates (update) the CompilerToken file that is required for the parser.

05_developer_tutorials/compile_xlparser_xlcompiler.txt · Last modified: by gaetan