Computer Science EngineeringHard
Left recursion must be eliminated from a grammar before it can be used with
- A. top-down (predictive) parsing
- B. bottom-up LR parsing
- C. lexical analysis
- D. register allocation
Correct answer: A. top-down (predictive) parsing
A left-recursive production makes a recursive-descent parser loop forever.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- Which parser accepts the largest class of grammars among the following?
- For a given grammar, an LALR(1) parser has the same number of states as which other parser?
- How many nodes does the DAG for the expression a + a(b-c) + (b-c)d contain (common subexpressions shared)?
- Type checking of expressions is performed during which phase of a compiler?
- A string of length 5 is derived in a grammar in Chomsky normal form. How many derivation steps are required?
- Deterministic context-free languages are closed under