Hi,
I have to write a lexical rule such as

a: b c b
b: D | E

and I want 'b' tokens in rule 'a' to be the same. That's, when the first 'b2
in 'a' is D, then the last 'b' should be D. The same is true for E.

To provide this, do I have to write two alternatives for 'a' (that is, a: D
c D | E c E) or is there an easier way to make ANTLR to provide this
condition? I have to use explicit version (righthandside) of rule 'a' in
many rules, so it would be good if I have a chance to write 'a' in one
alternative.

-- 
-safiye

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to