[antlr-interest] How do I get a parser and lexer to work together

Benjamin Shropshire shro8822 at vandals.uidaho.edu
Mon Feb 4 15:07:18 PST 2008


I have a lex.g and a parse.g. Both run through antlr just fine and then 
link, however the parser is generating it's own enumerations for the 
lexical tokens. I need it to use the definitions generated by antlr when 
it makes the lexer. I need the lexer in a different file because I need 
to be able to use it in more than one grammar. I don't want to resort to 
using cpp or sed to make this work.

How do I tell antlr to do this?
Where is this documented? (a.k.a. how could I have found this out my self?)

Benjamin Shropshire


More information about the antlr-interest mailing list