Professional Documents
Culture Documents
Compiler Design (CS604A) Assignment 2: JIS University, Department of Computer Science and Engineering
Compiler Design (CS604A) Assignment 2: JIS University, Department of Computer Science and Engineering
A → aBDe
B → cC
C → bB | ε
D→d|ε
where {A, B, C, D} is the set of non-terminal symbols, A is the start symbol and {a,b,c,d,e} is the
set of terminal symbols.
1. For the given grammar, find the left-most and right-most derivations of input string ”acbcbce”.
Show the corresponding parse trees for each of these derivations as part of your answer.
2. Verify whether the above grammar is LL(1) or not. As part of your answer show the FIRST
and FOLLOW sets for each non-terminal symbol.
3. Construct the corresponding non-recursive predictive parsing table for the above grammar.
4. Construct the corresponding SLR parsing table for the above grammar.