Theory of Computation and Compilers MCQ - Syntax Analysis
SLR and CLR are easy to implement. CLR is more
power full to any of the parsec.
The given grammar is ambiguous so neither LL(1)
nor LR(1).
First Leftmost Derivation
S → F
F → c
Second Leftmost Derivation
S → H
H → c
S → XXW{Print + 1}
S → Y {Print + 2}
W → SZ {Print + 3}
Translation of XXXXYZZ
S → XXW 1
→ XXSZ 3
→ XXXXWZ 1
→ XXXXSZZ 3
→ XXXXYZZ 2
Syntax directed translation scheme described by
23131

