Parsing questions

Q15

GATE CS 2015 CS-3ParsingMCQ1 mark−1/3 if wrong
Among simple LR (SLR), canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful, in that order?
Show answer without attempting

Answer: C

Q65

GATE CS 2015 CS-3ParsingMCQ2 marks−2/3 if wrong
Consider the following grammar GG

S→F∣HF→p∣cH→d∣c \begin{array}{rcl} S & \to & F \mid H \\ F & \to & p \mid c \\ H & \to & d \mid c \end{array}

where S,FS, F, and HH are non-terminal symbols, p,dp, d, and cc are terminal symbols. Which of the following statement(s) is/are correct?

S1. LL(1) can parse all strings that are generated using grammar GG
S2. LR(1) can parse all strings that are generated using grammar GG
Show answer without attempting

Answer: D

Q18

GATE CS 2015 CS-1ParsingMCQ1 mark−1/3 if wrong
Which one of the following is TRUE at any valid state in shift-reduce parsing?
Show answer without attempting

Answer: C

0/30 correct0 marks

Related topics in Compiler Design