Theory of Computation and Compilers - Syntax Analysis

41. Which one of the following kinds of derivation is used by LR parsers?

  • Option : A
  • Explanation :
    LR parser is a bottom up parser and so it uses right most derivation in reverse order.
    ∴ option (b) is the correct .
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


42. Consider the SLR(l) 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.

  • Option : B
  • Explanation :
    (i) Goto part & shift entry must be same.
    (ii) Reduce entry & error entry may be different due to conflicts.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *