1
GATE CSE 2019
Numerical
+2
-0
Consider the augmented grammar given below :

S' → S
S → 〈L〉 | id
L → L,S | S

Let I0 = CLOSURE ({[S' → ●S]}). The number of items in the set GOTO (I0 , 〈 ) is: _____.
Your input ____
2
GATE CSE 2019
Numerical
+1
-0
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 16 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 ____
3
GATE CSE 2019
MCQ (Single Correct Answer)
+1
-0.33
Which one of the following kinds of derivation is used by LR parsers?
A
Rightmost
B
Leftmost in reverse
C
Rightmost in reverse
D
Leftmost
4
GATE CSE 2019
MCQ (Single Correct Answer)
+2
-0.67

Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let $X_1, X_2, X_3, X_4, X_5$, and $X_6$ be the placeholders for the nonterminals $\mathrm{D}, \mathrm{T}, \mathrm{L}$ or $\mathrm{L}_1$ in the following table :

Production rule Semantic action
D → T L X1.type = X2.type
T → int T.type = int
T → float T.type = float
L → L1, id X3.type = X4.type
addType(id.entry, X5.type)
L → id addType(id.entry, X6.type)

Which one of the following are the appropriate choices for $X_1, X_2, X_3$ and $X_4$ ?

A
$X_1=L, X_2=T, X_3=L_1, X_4=L$
B
$X_1=T, X_2=L, X_3=L_1, X_4=T$
C
$X_1=L, X_2=L, X_3=L_1, X_4=T$
D
$X_1=T, X_2=L, X_3=T, X_4=L_1$
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