1
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?
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?
2
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: _____.
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 ____
3
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 $$.
Which one of the following is correct for the given parse tree?
4
GATE CSE 2016 Set 2
MCQ (Single Correct Answer)
+2
-0.6
A student wrote two context-free grammars G1 and G2 for generating a single $$C$$-like array declaration. The dimension of the array is at least one. For example,
$$${\mathop{\rm int}} \,\,\,\,\,\,\,a[10]\,\,[3];$$$
The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num.
Grammar G1 | Grammar G2 |
---|---|
D → intL; | D → intL; |
L → id[E | L → idE |
E → num | E → E[num] |
E → num][E | E → [num] |
Which of the grammars correctly generate the declaration mentioned above?
Questions Asked from Parsing (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 2 (2)
GATE CSE 2024 Set 1 (1)
GATE CSE 2021 Set 2 (1)
GATE CSE 2021 Set 1 (1)
GATE CSE 2020 (1)
GATE CSE 2019 (1)
GATE CSE 2018 (1)
GATE CSE 2016 Set 2 (1)
GATE CSE 2016 Set 1 (1)
GATE CSE 2015 Set 3 (1)
GATE CSE 2014 Set 1 (1)
GATE CSE 2013 (1)
GATE CSE 2010 (1)
GATE CSE 2008 (1)
GATE CSE 2007 (4)
GATE CSE 2006 (3)
GATE CSE 2005 (4)
GATE CSE 2004 (2)
GATE CSE 2003 (3)
GATE CSE 1995 (1)
GATE CSE 1992 (1)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages