This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: <id> → A | B | C <expr> → <expr> + <term> | <term> <term> → <term> * <factor> | <factor> <factor> → ( <expr> ) | <id> a) Draw a parse tree to show that the following string is a legal assignment statement: A = (B * A) + (B * C) b) Modify the grammar to add a unary minus operator that has higher precedence than either + or * ....
View Full Document
- Spring '07
- #, simple assignment statements, unary minus operator