Match List I with List II (stack and input configurations)
| List I | List II |
|---|---|
| A. Initial configuration of stack and input in LL parsing | I. $ | w$ |
| B. Final configuration of stack and input in LL parsing | II. $ | $ |
| C. Initial configuration of stack and input in LR parsing | III. $S | w$ |
| D. Final configuration of stack and input in LR parsing | IV. $S | $ |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. A-III, B-II, C-I, D-IV
Explanation
An LL parse starts with $S on the stack and w$ as input (III) and ends with $ and $ (II). An LR parse starts with an empty stack $ and input w$ (I) and ends with $S on the stack and $ as input (IV). (List I item D refers to the final LR configuration.)More Theory of Computation and Compilers questions
- The precedence of regular-expression operators from lowest to highest is:
- Consider the following statements: A. For every regular language, we can design a Turing machine. B. For every context-free language, we ca…
- The transition function δ in a multi-tape Turing machine (k tapes) is defined as:
- In the pumping lemma for regular languages, writing the string as xyz, what is the minimum length of y?
- The item generated by the production A → ε is:
- In the ε-NFA M = ({q0, q1, q2, q3}, {a}, δ, q0, {q3}), where δ is given in the transition table below, what is the minimum length of string…