&gt; <i>Right, so there are 2 possible parse trees.</i><p>Not with the same symbols, though.<p>&gt; <i>A formal language is just the set of strings that belong to it. That&#x27;s it.</i><p>That is correct, and in that framework, we cannot reason about the meaning of &quot;foo&quot;; that if it&#x27;s a type apply this rule otherwise that rule.<p>If we do that reasoning, what we&#x27;re really doing is replacing &quot;foo&quot; with one of two other symbols, and then parsing those; then we have different <i>strings</i> (so of course the parse trees cannot be the same, no matter what).