Computer Science EngineeringHardISRO SC
Consider the grammar S -> A a | b A c | d c | b d a; A -> d. The number of terminals (including the end marker $) in FOLLOW(A) is
- A. 2
- B. 3
- C. 1
- D. 4
Correct answer: A. 2
Computed from FOLLOW propagation: FOLLOW(A) = {a, c}.
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
- Consider the grammar S -> a S b | epsilon. The number of terminals (including the end marker ) in FOLLOW(S) is
- For the grammar S -> A b | B c; A -> a A | epsilon; B -> a B | d, how many total LR(0) items (all dotted positions over all productions…
- Consider the grammar S -> A b | B c; A -> a A | epsilon; B -> a B | d. Is the grammar LL(1)? If so the predictive parse table has how many…
- Three-address code: 1: x1 = x2 + 1; 2: x2 = x3 + 2; 3: x3 = x1 + 3; 4: x1 = x2 + 4; 5: x2 = x3 + 5; 6: goto 8; 7: x1 = x2 + 7; 8: if x1 <…
- Using Sethi-Ullman labelling (a left leaf needs 1 register, a right leaf operand can be a memory operand and needs 0), the minimum number…
- In register allocation by graph colouring, the interference graph has nodes v0..v7 and edges v0-v1, v0-v3, v0-v4, v0-v5, v1-v2, v1-v3…