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

Gavin Lambert antlr at mirality.co.nz
Mon Jul 2 01:15:53 PDT 2007


At 04:29 2/07/2007, David Piepgrass wrote:
 >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.)

I'm not sure if lexers support vocabulary importing (I know 
parsers do), but if they do then you should be able to do it that 
way -- make a tokens file and import it into the lexer.  Worth a 
try, anyway :)



More information about the antlr-interest mailing list