1
GATE CSE 2022
MCQ (Single Correct Answer)
+1
-0.33

Which one of the following statements is TRUE?

A
The LALR(1) parser for a grammar G cannot have reduce-reduce conflict if the LR(1) parser for G does not have reduce-reduce conflict.
B
Symbol table is accessed only during the lexical analysis phase.
C
Data flow analysis is necessary for run-time memory management.
D
LR(1) parsing is sufficient for deterministic context-free languages.
2
GATE CSE 2022
Numerical
+1
-0.33

Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.

S' $$\to$$ S

S $$\to$$ S + R | R

R $$\to$$ R * P | P

P $$\to$$ (S) | id

If I0 is the set of two LR(0) items {[S' $$\to$$ S.], [S $$\to$$ S. + R]}, then goto(closure(I0), +) contains exactly _________ items.

Your input ____
3
GATE CSE 2020
Numerical
+1
-0.33
Consider the following grammar.

S $$ \to $$ aSB| d
B $$ \to $$ b

The number of reduction steps taken by a bottom-up parser while accepting the string aaadbbb is _______.
Your input ____
4
GATE CSE 2019
Numerical
+1
-0.33
Consider the grammar given below:

S → Aa

A → BD

B → b | ε

D → d | ε

Let a, b, d, and $ be indexed as follows: GATE CSE 2019 Compiler Design - Parsing Question 14 English
Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order. (For example, if the FOLLOW set is {a, b, d, $}, then the answer should be 3210)
Your input ____
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12