[antlr-interest] Re: lexical nondeterminism between IDENT &
LABEL
Paul J. Lucas
pauljlucas at mac.com
Thu Nov 4 01:17:53 PST 2004
On Thu, 4 Nov 2004, thoth2487 wrote:
> Can you try to get me a sample of syntaxtic predicate to solve
> below ident/label lexical nondeterminism ? :
protected Ident
: /* fill in the blank */
;
IDENT
: (Ident (WS)? ':')=> Ident { $setType( LABEL ); }
;
Monty's solution makes the ':' part of the token; the above
doesn't. Hence, the above is "cleaner" from the parser
perspective.
- Paul
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