[antlr-interest] Using previously matched parser rule in decision making

Gokulakannan Somasundaram gokul007 at gmail.com
Tue Mar 9 03:13:15 PST 2010


>
>
> You can use ANTLR's scopes to do that.  There are ways to tell if
> a particular scope has been entered, how many times it has been
> entered, and to retrieve information from any of those levels.
>
> I think that can be done, even by using a flag for the required rule. But,
when we are doing a look ahead of LA(m+n)  and say this rule (rule A) comes
at LA(m) and ends before LA(m+n), there is no way to tell whether we have
passed through that rule A, which might be used to make some decisions over
there.

Or may be i am talking about something not achievable.

Thanks,
Gokul.


More information about the antlr-interest mailing list