Course Homepage

HW16

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.

Answer these questions:

  1. What are the nonterminals?
  2. What are the productions?
  3. What is the starting nonterminal?
  4. Does this grammar have ambiguity?