Example:
Grammar for Additive
& Multiplicative
Arithmetic Expressions
l
The root is A.
l
The terminals are {a, b, c, +, *}.
l
The productions are:
l
A
¨
M + A
|
M
l
M
¨
V * M
|
V
l
V
¨
a
|
b
|
c
l
Intuitive rule: Operator Òfarther
from the rootÓ binds more tightly