1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the following expression grammar. The semantic rules for expression calculation are stated next to each grammar production.
$$\eqalign{ & E \to number\,\,\,\,\,E.val = number.val \cr & \,\,\,\,\,\,\,\,\,\,\,|E\,\,' + '\,\,E\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val + {E^{\left( 3 \right)}}.val \cr & \,\,\,\,\,\,\,\,\,\,\,|\,E\,\,' \times '\,\,E\,\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val \times {E^{\left( 3 \right)}}.val \cr} $$The above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1) parser generator) for parsing and evaluating arithmetic expressions. Which one of the following is true about the action of yacc for the given grammar?
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the grammar
$$S \to \left( S \right)\,|\,a$$Let the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n1, n2 and n3 respectively.
The following relationship holds good3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the grammar
$$E \to E + n\,|\,E \times n\,|\,n$$For a sentence n + n × n, the handles in the right-sentential form of the reduction are
4
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminals, and r, s, t are terminals.
$$\eqalign{ & 1.\,P \to QR \cr & 2.\,P \to QsR \cr & 3.\,P \to \varepsilon \cr & 4.\,P \to QtRr \cr} $$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