1
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+1
-0.33
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?
2
GATE CSE 2020
Numerical
+1
-0
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 _______.
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 ____
3
GATE CSE 2019
MCQ (Single Correct Answer)
+1
-0.33
Which one of the following kinds of derivation is used by LR parsers?
4
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:
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)
S → Aa
A → BD
B → b | ε
D → d | ε
Let a, b, d, and $ be indexed as follows:
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
Browse all chapters by subject
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