GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 3(x)

Compiler and language claims

Compiler Design · Other / Mixed Topics · Full GATE CSE 1991 paper

GATE 1991, Q3(x) 2 marks · MSQ
Not in GATE 2027 syllabusReport issue

Other / Mixed Topics

Question 3(x), GATE 1991: Assess A recursive descent cannot handle left recursion; B postfix is best for optimization; C without recursion/pointers dynamic allocation is unnecessary; D C can simulate call-by-name; E no Pascal feature violates strong typing.
Question 3(x), GATE 1991: Assess A recursive descent cannot handle left recursion; B postfix is best for optimization; C without recursion/pointers dynamic allocation is unnecessary; D C can simulate call-by-name; E no Pascal feature violates strong typing.
Tap to enlarge
Select all that apply
Answer & solution

Answer: A, D in the conventional parser model; C requires extra language restrictions (no official key was published)

Naive recursive descent expands a left-recursive nonterminal before consuming input and recurses indefinitely, so A is true for that standard algorithm; specialized modern techniques are outside this model. Optimization usually needs explicit dataflow such as three-address code or DAGs, not merely postfix order, so B is false. C is not guaranteed: runtime-sized arrays can require dynamic storage even without pointers or recursive calls. D is achievable with thunks, using a function plus captured environment to reevaluate an argument; writable parameters additionally need an lvalue-access mechanism. Historical Pascal variant records can bypass type discipline, refuting E. C is sometimes intended under a restricted static-allocation language model, but that restriction is not stated.

Original paper, page 4