CS 3304: Comparative Languages
Syntax
[
Course Documents
] : [
Syntax
]
Previous
Contents
Next
Keyword Index
Indicating Precedence
If we use the parse tree to indicate precedence levels of the operators, we cannot have ambiguity:
<expr> -> <expr> - <term> | <term> <term> -> <term> / const | cons
<expr> => <expr> - <term>
=> <term> - <term>
=> const - <term>
=> const - <term> / const
=> const - const / const