PYQBOOK
Filter Questions
Found 475 question(s)
Q76
NAT
GATE
CS
Hard
2 Marks
2024
CD → Syntax Directed Translation
Given SDT: N -> I#F {N.val=I.val+F.val}, I -> I1 B {I.val=(2*I1.val)+B.val}, I -> B {I.val=B.val}, F -> B F1 {F.val=0.5*(B.val+F1.val)}, F -> B {F.val=0.5*B.val}, B -> 0 {B.val=0}, B -> 1 {B.val=1}. The value computed for '10#011' is
Q77
MCQ
GATE
CS
Medium
2 Marks
2024
CD → Syntax Directed Translation
Consider the following syntax-directed definition (SDD). S -> DHTU {S.val=D.val+H.val+T.val+U.val;}, D -> 'M'D1 {D.val=5+D1.val;}, D -> epsilon {D.val=-5;}, H -> 'L'H1 {H.val=50+H1.val;}, H -> epsilon {H.val=-10;}, T -> 'C'T1 {T.val=500+T1.val;}, T -> epsilon {T.val=-5;}, U -> 'K' {U.val=5;}. Given 'MMLK' as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?
Q78
MCQ
GATE
CS
Medium
2 Marks
2024
CD → Syntax Directed Translation
Consider the following syntax-directed definition (SDD). S -> DHTU {S.val=D.val+H.val+T.val+U.val;}, D -> 'M'D1 {D.val=5+D1.val;}, D -> epsilon {D.val=-5;}, H -> 'L'H1 {H.val=50+H1.val;}, H -> epsilon {H.val=-10;}, T -> 'C'T1 {T.val=500+T1.val;}, T -> epsilon {T.val=-5;}, U -> 'K' {U.val=5;}. Given 'MMLK' as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?
Q79
MSQ
GATE
CS
Easy
1 Mark
2024
CD → Parsing
Which of the following is/are Bottom-Up Parser(s)?
Q80
NAT
GATE
CS
Hard
2 Marks
2024
CD → Parsing & Precedence