[antlr-interest] Is '!' operator working with ANTLR 3.1.2
Philippe Frankson
Philippe.Frankson at Frsglobal.com
Wed Nov 17 04:50:41 PST 2010
When I call my parser with -> EXT.MyFunc()
The value returned by $EXTERNAL_CALL.getText() is 'EXT.MyFunc' where I
would expect to have only 'MyFunc' (because I'm using the '!' operator
in the lexer here below).
fragment INT : ('0'..'9');
fragment ALPHA : ('a'..'z'|'A'..'Z'|'_');
fragment ID : ALPHA (ALPHA | INT)*;
EXTERNAL_CALL: 'EXT.'! ID;
rule: EXTERNAL_CALL '(' { stack.push(new
FuncName($EXTERNAL_CALL.getText())); } (expressList { ... } )? ')'
expressList: ...;
Any idea why the '!' operator looks like not working ? What am I doing
wrong ?
Thank you.
Philippe Frankson
More information about the antlr-interest
mailing list