[antlr-interest] define two tokens with the same allowed characters

OJAY78 at gmx.de OJAY78 at gmx.de
Tue Oct 2 16:24:25 PDT 2007


Hi to all,

I'm just starting to understand antlr but now I stuck on a problem.

I have an function inside my grammar that needs three parameters.
IsEqual(param1, ID, ID2);

My problem is that I do not know how can I have two tokens which could contains the same characters. I have a rule ID with all the allowed characters, this one will be used correctly but after that rule I define ID2 with the same characters and when I try to generate my grammar the compiler recognizes that the ID2 token will never be reached. 

So can anyone help me, how can I do that correctly.

Thanks for your help.
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the antlr-interest mailing list