1
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67

Consider the following statements.

S1 : Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).

S2 : For any context-free grammar, there is a parser that takes at most O(n3) time to parse a string of length n.

Which one of the following option is correct?

A
S1 is true and S2 is false
B
S1 is false and S2 is true
C
S1 is true and S2 is true
D
S1 is false and S2 is false
2
GATE CSE 2020
MCQ (Single Correct Answer)
+2
-0.67
Consider the productions A $$ \to $$ PQ and A $$ \to $$ XY. Each of the five non-terminals A, P, Q, X, and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute. Consider the following rules.

Rule 1 : P.i = A.i + 2, Q.i = P.i + A.i, and A.s = P.s + Q.s
Rule 2 : X.i = A.i + Y.s and Y.i = X.s + A.i

Which one of the following is TRUE?
A
Only Rule 2 is L-attributed.
B
Neither Rule 1 nor Rule 2 is L-attributed.
C
Both Rule 1 and Rule 2 are L-attributed.
D
Only Rule 1 is L-attributed.
3
GATE CSE 2019
Numerical
+2
-0.67
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 ____
4
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Consider the following parse tree for the expression $$a \ne b\$ c\$ d \ne e \ne f,$$ involving two binary operators $$\$ $$ and $$ \ne $$. GATE CSE 2018 Compiler Design - Parsing Question 15 English

Which one of the following is correct for the given parse tree?

A
$$\$ $$ has higher precedence and is left associative; $$ \ne $$ is right associative
B
$$ \ne $$ has higher precedence and is left associative; $$\$ $$ is right associativ
C
$$\$ $$ has higher precedence and is left associative; $$ \ne $$ is left associative
D
$$ \ne $$ has higher precedence and is right associative; $$\$ $$ is left associative
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12