This preview shows pages 1–2. Sign up to view the full content.
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
This note was uploaded on 09/15/2010 for the course ICS ics103 taught by Professor Alvi during the Spring '07 term at King Fahd University of Petroleum & Minerals.
- Spring '07