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

OJAY78 at gmx.de OJAY78 at gmx.de
Wed Oct 3 01:55:01 PDT 2007


Hi,

thanks for the answer. I tried it your way so that I have only one ID token.

ID: ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'.'|'+'|'-'|'#'|'=')+

my funtion should distinguish between the different tokens, so my function looks like this ISEQUAL'('FIELDTYPE','ID','ID')' but then I get an error that ID is an non unique reference.

What I want is the the function know how to handle such calls: IsEqual(formattrib,test#enabled,=enabled)

I thougt that I can take the second ID token in my function and check if it starts with the '=' chararacter and if it is its is the second ID

any advise where is my failure?

Thanks
-- 
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