[antlr-interest] Yet an another TokenStream ( for C++ Target )
gokul007 at gmail.com
Sat Feb 18 12:18:30 PST 2012
>> b) Every time a rule's action is executed in execution mode( when
>>> backtracking == 0 ), it will delete all the tokens except the first and
>>> last token.
>> I don't quite follow you here. Actions can appear anywhere in rules and
>> since you'll be in a rule at all times, the only way to know which tokens
>> are safe to delete is to track all the tokens used by rule actions and only
>> delete them after the action executes.
> We are talking only about named rules here.
> The tokens will get deleted only after all the action part is executed( at
the exit of the rule action ).
More information about the antlr-interest