Mismatched token type interface files
1 posts in topic
Flat View  Flat View

Posted By:   Joseph_Corazza
Posted On:   Friday, January 10, 2003 12:41 PM

I'm just getting started and tried to run the
sample SeriesParser presented in Getting Started.
I was having problems with "unexpected characters"
when running it. I noticed that this problem occurs
when the IntAndIDTokenType.java and the
SeriesParserTokenType.java interface files don't have
the same int definitions for the individual tokens.
How can I ensure that the definitions are always the
same. Why does antlr.Tool create .txt files for the
token definitions? How are they used?



Re: Mismatched token type interface files

Posted By:   Monty_Zukowski  
Posted On:   Monday, January 13, 2003 08:19 AM

Antlr creates those files for each .g file. If you have your lexer and parser in separate files you must be sure that if you change your lexer that you then recompile (with antlr) your parser so it picks up the changes to the tokens file. The .txt files are for antlr to use as input files for the token types.
About | Sitemap | Contact