[antlr-interest] Syntactic predicate in lexer rule

Terence Parr parrt at cs.usfca.edu
Mon Jan 2 10:25:19 PST 2006


On Jan 1, 2006, at 7:01 PM, Martin Traverso wrote:
> FLOAT:  (DIGITS '.' DIGITS) => DIGITS '.' DIGITS;

An alt with a single pred makes no sense, I'm afraid.  Predicates  
indicate which of 2+ alts to match.

Ter


More information about the antlr-interest mailing list