As an example, consider the following two
context-free grammars, given in
Backus-Naur form: ::= "+" | "-" | "*" | "/" | "x" | "y" | "z" | "1" | "2" | "3" | "(" ")" ::= | "+" | "-" ::= | "*" | "/" ::= "x" | "y" | "z" | "1" | "2" | "3" | "(" ")" Both grammars generate the same set of strings, viz. the set of all arithmetical expressions that can be built from the variables "x", "y", "z", the constants "1", "2", "3", the operators "+", "-", "*", "/", and parentheses "(" and ")". However, a
concrete syntax tree of the second grammar always reflects the usual
order of operations, while a tree from the first grammar need not. For the example string "1+2*3", the right part of the picture shows its unique parse tree with the second grammar; evaluating this tree in
postfix order will yield the proper value, 7. In contrast, the left picture part shows one of the parse trees for that string with the first grammar; evaluating it in postfix order will yield 9. Since the second grammar cannot generate a tree corresponding to the left picture part, while the first grammar can, both grammars are not strongly equivalent. ==Generative capacity==