Computer Science EngineeringHard
An LL(1) grammar has 4 non-terminals and 5 terminals. The predictive parsing table (with the end marker $ as an extra column) has how many entries?
- A. 20
- B. 24
- C. 30
- D. 9
Correct answer: B. 24
The table has 4 rows and 5 + 1 = 6 columns, so 24 entries.
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
- Live variable analysis is a data-flow problem of which type?
- Available expressions analysis is a data-flow problem of which type?
- Moving a computation whose value does not change inside a loop to before the loop is called
- A language accepted by some Turing machine (which may loop on strings outside the language) is called
- Which problem was the first to be proved NP-complete (Cook-Levin theorem)?
- The minimal complete DFA over {a, b} for the language ab has how many states?