HW13
COP-3402
Define a grammar for arithmetic expressions given in reverse Polish notation, that preserves its syntactic structure, i.e., syntax trees will capture the order of operations when walking the tree.
- Terminals: + - * / 0 1 2 3 4 5 6 7 8 9
- You can use N -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
- What are the nonterminals?
- What are the productions?
- Don't forget to name the starting nonterminal.
- Does this grammar have ambiguity?