CS3150 Assignment 1
CS3150 Assignment 1 3.)Rewrite the BNF of Example 3.4 to give + precedence over * and force + to be right associative. <assign> → <id> = <expr> <id> → A | B | C <expr> → <expr> * <term> | <term> <term> → <factor> + <term>| <factor> <factor> → (<expr>) | <id> 5.) Write a BNF description of the Boolean expressions of Java, including the three operators &&, ||, and ! and the relational expressions. Write a BNF description of the Boolean expressions of Java, including the three operators &&, ||, and ! and the relational expressions. <Boolean_expr> → <Boolean_expression> || <Boolean_term> | <Boolean_term> <Boolean_term> → <Boolean_term> && <Boolean_factor> | <Boolean_factor> <Boolean_factor> → id | ! <Boolean_factor> | (<Boolean_expr>) | <relation_expr> <rel...
Comments
Post a Comment