Menu

Parsing Questions

MCQ
21.
Which of the following grammar rules violate the requirements of an operator grammar?
(i) P -> QR
(ii) P -> QsR
(iii) P -> ?
(iV) P -> QtRr
forum Discussion
MCQ
22.
Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 &4.
forum Discussion
MCQ
23.
Given the following expression grammar:
E -> E * F | F+E | F
F -> F-F | id
which of the following is true?
forum Discussion
MCQ
24.
Consider a program P that consists of two source modules M1(contains reference to a function defined in M2) and M2 contained in two different files.
forum Discussion
MCQ
25.
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
forum Discussion
MCQ
26.
Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states.
forum Discussion
MCQ
27.
Match the following.

P. Regular expression        1. Syntax analysis
Q. Pushdown automata         2. Code generation
R. Dataflow analysis         3. Lexical analysis
S. Register allocation       4. Code optimization
forum Discussion
MCQ
28.
Find the TRUE statement?

I.  There exist parsing algorithms for some programming languages which has O(3) complexity.
II.  A programming language which allows recursion can be implemented with static storage allocation.
III. No L-attributed definition can be evaluated in The framework of bottom-up parsing.
IV. Code improving transformations can be performed at both intermediate code level and source Language.
forum Discussion
MCQ
29.
Which of the following describes a handle (as applicable to LR-parsing) appropriately?
forum Discussion
MCQ
30.
Which one of the following is a top-down parser?
forum Discussion