[antlr-interest] greedy vs nongreedy lexer rules
Terence Parr
parrt at cs.usfca.edu
Tue Apr 20 14:45:29 PDT 2010
On Apr 18, 2010, at 4:50 PM, Cliff Hudson wrote:
> You wrote:
>
> Well, imagine that you are modifying "global" state as you match characters
> in identifier; this is something done in actions that ANTLR can analyze.
> There is no way to "roll this back".
>
> The 'global' state you are talking about is state the DFA is modifying but
> which an action in a rule could examine? Is the amount of state visible to
> actions too much to store while alternatives are being evaulated?
It's unbounded. users can put in whatever state they want with @members action.
Ter
More information about the antlr-interest
mailing list