[antlr-interest] Re: Perority Enforcing using Antlr Grammar
Koehne Kai
Kai.Koehne at student.hpi.uni-potsdam.de
Fri Jun 16 01:33:18 PDT 2006
Hi,
try something like
expr1: expr2 ("OR" expr2)*;
expr2: expr3 ("AND" expr3)*;
expr3: ID | "(" expr1 ")";
Regards,
Kai Koehne
________________________________
Von: antlr-interest-bounces at antlr.org im Auftrag von Muhammad Masoom Alam
Gesendet: Fr 16.06.2006 08:42
An: antlr-interest at antlr.org
Betreff: [antlr-interest] Perority Enforcing using Antlr Grammar
Hi all,
sorry if my question is a stupid one, as i am a new
bie. How to enforce perority rules using Antlr.
e.g. I have the following conditions
(Predicate1 And (Predicate2 Or Predicate3))
In the above, Grammar, paranthesis are used to group
and enforce perority, but how this will be done using
the Antlr Grammar.
Thanks in Advance.
MA
Muhammad Masoom Alam
Security Engineering Universität Innsbruck
Institut für Informatik Technikerstraße 13 A - 6020 Innsbruck
Tel.: ++43 - 512 - 507 6462
http://qe-informatik.uibk.ac.at/
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
More information about the antlr-interest
mailing list