See http://www.webber-labs.com/wp-content/uploads/2015/08/mpl-03.pdf#page=10 G4: ::= - // doesn't specify associativity or precedence | / | ( ) | a | b | c We can use G4 to parse a * a + a in two ways. This parse gives * higher precedence that +. -> + -> * + -> a * a + a / | \ + / | \ | a * a a This parse gives + higher precedence that *. -> * -> a * -> a * + -> a * a + a / | \ * | / | \ a + | | a a The G4 grammar is ambiguous. It does not specify which operator, * or +, has higher precedence. The G4 grammar is also ambiguous because it does not specify an associativity for either the two operators. So a + a + a and a * a * a will each have two parses. Grammar G5 will solve the precedence problem (but not the associativity problems). Grammar G6 will solve the precedence problem and the associativity problem for both operators.