[antlr-interest] Using different tokens for the same grammar

dspiess_mk dj at gamethingy.com
Thu Jun 6 14:00:39 PDT 2002

I've inhierted a project that uses antlr, and I am trying to localize 
the application. Is there an easy way to swap out what the valid 
tokens are, but keep the grammar the same? 

For example our application builds mathematical expressions for 
evaluation. The English version has a function called average(i, 
i2, ...) where the user specifies the function average and several 
parameters. In French, this needs to be moyenne(i, 12, ...). The 
parsing is the same, just the keyword is different. 

Is there a way to specify the tokens at runtime instead of compile 
time? I really don't want to have to support different compiles for 
each localized version of our java app. 

Thanks for any help! 

Daniel Spiess


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list