[antlr-interest] Non Determinism Problem in Antler

Sriram Easwaran sriram.easwaran at sas.com
Mon Oct 20 11:10:37 PDT 2003


Hi,
I am having a nondeterminism waring on my Lexer.
Here is what I have in my Lexer

protected SPECIAL  : "special::" ;
protected VARIABLE  : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')* ;

SPECIAL_FLAG : SPECIAL! FLAG ;         // Match SPECIAL followed by some FLAG

BEGIN_FUNCTION : ( VARIABLE LPAREN! ); // Match the beginning of any function

On compiling the grammar
Warning: lexical nondeterminism between rules SPECIAL_FLAG and BEGIN_FUNCTION upon k==1:'s' k==2:'p

I am not sure how to get rid of this problem and would appreicate if someone can help me match both these lexer rules.

Thanks
Sriram



 

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




More information about the antlr-interest mailing list