Content deleted Content added
m →Example |
|||
Line 37:
T' --> T
T --> T * F | F
F --> ( E' ) | num
E' --> E
'''num''' is a terminal, and the [[lexer]] parse any integer as '''num'''.
Line 44 ⟶ 45:
and the Parsing table:
{|border="1" cellpadding="2"
| ||E|| T || T' || F || + ||*||(||)||num
|-
| E || ||<math>\dot
|-
| T || || || || || ||<math>\dot =</math>|| || ||
|-
| T'|| || || || || || || || ||
|-
| F || || || || || ||<math>\dot ></math>|| || ||
|-
| + || ||<math>\dot
|-
| * || || || ||<math>\dot =</math>|| || ||<math>\dot <</math>|| ||<math>\dot <</math>
|-
| ( ||<math>\dot <</math>||<math>\dot
|-
| ) || || || || || ||<math>\dot ></math>|| || ||
|-
| num|| || || || || ||<math>\dot ></math>|| || ||
|}
|