[antlr-interest] probably simple question

Peter Ashford kaffiene at xtra.co.nz
Mon Aug 9 15:16:14 PDT 2004


Hi,

I've gone over the docs but I don't get how to fix lexical 
nondeterminism between keywords and identifiers.  My (relevant) lexer 
rules are printed below.  I keep getting nondetemrinism between ID and 
RESULT on the characters 'r' 'e' - oh, k is set to 2.  I've mucked 
around with the test literals feature and that doesn't seem to help.

Someone please put a dumb newbie out of his misery :o)

thanks,
Peter.

-----------------------------------
protected
DIGIT  : ('0'..'9');

protected
ALPHA  : ('a'..'z' | 'A'..'Z');

RESULT   : "result";

ID
options {
  paraphrase   = "an identifier";
  testLiterals = true;
}
       : ALPHA (ALPHA | DIGIT)*;


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list