Monday, 13 July 2009

Use the following command to generate the ANTLR lexer and parser:
java org.antlr.Tool -debug "C:\Visual Studio 2008\Projects\ANTLR\ANTLR\ANTLR\Grammar.g"

This will create files Grammar.cs and Grammar.cs in the same directory as the grammar (.g) file. It will create IsisPapyrus.tokens in the current directory.

I prefer to cd to the directory where the grammar file first so that all three files are created in the same directory.

No comments: