Menu

Parsing Questions

MCQ
61.
Which one of the following is true at any valid state in shift-reduce parsing?
forum Discussion
MCQ
62.
In the context of abstract-syntax-tree and control-flow-graph. Which one of the following is true?
forum Discussion
MCQ
63.
Match the following.
   List-I                  List-II
A. Lexical analysis       1. Graph coloring
B. Parsing                2. DFA minimization
C. Register allocation    3. Post-order traversal
D. Expression evaluation  4. Production tree
 
forum Discussion
MCQ
64.
Which of the following pairs is the most powerful?
forum Discussion
MCQ
65.
Consider the following grammar G.
 S ? F ? H
  F ? p ? c
  H ? d ? c
Which one is true?S1: All strings generated by G can be parsed with help of LL (1).
S2: All strings generated by G can be parsed with help of LR (1).
forum Discussion
MCQ
66.
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production to parse a string with n tokens?
forum Discussion
MCQ
67.
Consider the following two sets of LR (1) items of an LR (1) grammar.

X -> c.X, c/d
   X -> .cX, c/d
   X -> .d, c/d
   X -> c.X, $
   X -> .cX, $
   X -> .d, $
Which one is false?

1. Cannot be merged since look ahead
forum Discussion
MCQ
68.
Which of these is also known as look-head LR parser?
forum Discussion
MCQ
69.
What is the similarity between LR, LALR and SLR?
forum Discussion
MCQ
70.
An LR-parser can detect a syntactic error as soon as __________
forum Discussion