Start with the grammar G6, repeated here G6: ::= + |
Start with the grammar G6, repeated here G6: ::= + |
::= * |
::= ( ) | a | b | c
Modify it in the following ways:
a. Add subtraction and division operators (- and /) with the customary precedence and associativity.
b. Then add a left-associative operator % between + and * in precedence.
Give the EBNF of the resulting grammar.