Research Aptitude
October 8, 2023UGC NET Dec-2020 and June-2021 Paper-1
October 8, 2023Compiler-Design
|
Question 39
|
Consider the following grammar with terminal alphabet ∑{a,(,),+,*} and start symbol E. The production rules of the grammar are:
E → aA
E → (E)
A → +E
A → *E
A → ε
(a) Compute the FIRST and FOLLOW sets for E and A.
(b) Complete the LL(1) parse table for the grammar.
|
Theory Explanation is given below.
|
Correct Answer: A
