Hi all,
I am new to Functional programming and trying to see things around. I came across with this BNF grammar defining expressions with operators (x,-, and +) and variables a, b, c, and d.
<expr> ::= <thing>| <thing>x<expr>
<object> ::=<element>|<element> - <object>
<thing> ::=<object> |<thing>+<object>
<element>::= a|b|c|d
How can I get the order of precedence for the operators and also display parse tree for
a x b – c + d ?
In addition would you mind explaining me about the operator precedence and rules to be followed in constructing syntax tree?
Thank you very much in advance,