I have

ruleA: ruleB;

ruleC: ruleB;

ruleB: ruleD;

In ruleB I want to different target language actions to execute based on
whether it was ruleA or ruleC that was previously matched.  If my
understanding of syntatic/semantic predicates is correct, they only look
forwards, not backwards.

Is there a way (without refactoring the grammar) to in rule B know which
rule it was invoked from (A or C) and make decisions accordingly?

Thanks.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to