Professional Documents
Culture Documents
E-> TE’
E’->+TE’/Λ
T->FT’
T’->*FT’/ Λ
F->(E)/id
Q2. Proof that the following grammer is LL(1). Test whether the following grammer is LL(1)
• S->AaAb/BbBa
A-> Λ
B-> Λ
• S->1AB/ Λ
A->1AC/0C
B->0S
C->1
S’->S
S->CC
C->eC/d
Find canonical collection of LR(1) items.
Q4. Give the algorithm to construct non recursive predictive parsing table.
Q6. Write short note with one example for the following:
• Synthesized attributes
• Inherited attributes
• Quadruple notation of 3 addr code
• Triple notation of 3 addr code