Parsing questions

Q17

GATE CS 2014 CS-2ParsingMCQ1 mark−1/3 if wrong
Consider the grammar defined by the following production rules, with two operators ∗* and ++

S→T∗PS \rightarrow T * P
T→U∣T∗UT \rightarrow U \mid T * U
P→Q+P∣QP \rightarrow Q + P \mid Q
Q→IdQ \rightarrow Id
U→IdU \rightarrow Id

Which one of the following is TRUE?
Show answer without attempting

Answer: B

Q34

GATE CS 2014 CS-1ParsingMCQ2 marks−2/3 if wrong
A canonical set of items is given below

S→L⋅>RS \to L \cdot > R
Q→R⋅Q \to R \cdot

On input symbol << the set has
Show answer without attempting

Answer: D

0/20 correct0 marks

Related topics in Compiler Design