[antlr-interest] forcing parenthesis (no precedence)
hakan eryargi
hakan.eryargi at gmail.com
Wed Jul 15 02:20:18 PDT 2009
hello,
i want to create a grammar for simple expressions and AND, OR
statements. AND's and OR's have no precedence, so i want the user to
explicitly use parenthesis if AND's and OR's mixed. how can i define
such a grammar ?
for example these are valid:
EXP
EXP & EXP
EXP | EXP | EXP
EXP & (EXP | EXP)
(EXP | EXP) & (EXP | EXP)
these are not:
EXP & EXP | EXP
EXP | EXP & EXP | EXP
please note i'm a newbea so handle with care :)
thanks,
hakan
More information about the antlr-interest
mailing list