Posted on 2000-05-17
I've made a parser with javacc for a simple SQL select statement.
SELECT x FROM t
WHERE x=x1 AND (y=y1 OR z=z1)
in order to execute this statement i have to execute the expression in the parenthesis before applying that result to the first expression
r = (y=y1 OR z=z1)
x=x1 AND r
my parser is based on a standard EBNF grammar an work well.
what i need to know is:
how to construct a tree from the expressions, and if that is the soultion at all ;-)
is there an algorithm for this ?