1
GATE CSE 1995
MCQ (Single Correct Answer)
+2
-0.6

A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar.

$$\eqalign{ & S \to xxW\,\left\{ {pr{\mathop{\rm int}} \,'1'} \right\} \cr & S \to y\,\left\{ {pr{\mathop{\rm int}} \,'2'} \right\} \cr & W \to Sz\,\left\{ {pr{\mathop{\rm int}} \,'3'} \right\} \cr} $$

What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules?

A
23131
B
11233
C
11231
D
33211
2
GATE CSE 1992
MCQ (Single Correct Answer)
+2
-0.6
Consider the SLR(1) and LALR (1) parsing tables for a context-free grammar. Which of the following statements is/are true?
A
The goto part of both tables may be different.
B
The shift entries are identical in both the tables.
C
The reduce entries in the tables may be different.
D
The error entries in the tables may be different.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP