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> Create a leftmost derivation to show that the following string is a legal assignment statement: B = A * (B + (A * C)) Q. 4 [5 points]: Prove that the following grammar is ambiguous: <S> → <A> <A> → <A> + <A> | <id> <id> → a | b| c...
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