Rewrite the BNF to add the and unary operators of java and
Rewrite the BNF to add the ++ and - unary operators of java and in EBNF form. | = | A | B | C | + | | * | | () |
Solution
<assign> ---> <id> = <expr>
<id> ---> A | B | C
<expr> ---> <expr> + <term> | <term>
<term> ----> <term>* <factor> | <factor>
<factor > ------> <expr> | <id> |<id>++ | <id> -
