[antlr-interest] How to control token numbers manually?

Jonathan Thomas jonathan.thomas at ca.com
Sun Jul 1 18:27:27 PDT 2007


Oh, so you still ask for help here. It would be nice to say 'go read the 
book' ;-) hehe ...

but what you are asking has already been somewhat covered in a previous 
thread:
"any way to increment the token integer values"
that and other background information lurking in back of my head would 
say the answer is: not possible.
but maybe Ter will correct that ... if he actually reads your posts anymore.

David Piepgrass said the following on 2/07/2007 2:29 AM:
> In my project I need to control the numeric identifiers used for
> tokens, because there may be several separate (unrelated) lexers that
> produce the same token types (ID, INT, REAL, etc.)
>
> Preferably I would like to use variables to hold the token numbers and
> determine the numbers at run-time, but before any lexer starts. Never
> mind why...
>
> How can I accomplish this?
>



More information about the antlr-interest mailing list