...
Research Aptitude
October 8, 2023
UGC NET Dec-2020 and June-2021 Paper-1
October 8, 2023
Research Aptitude
October 8, 2023
UGC NET Dec-2020 and June-2021 Paper-1
October 8, 2023

Compiler-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.

A
Theory Explanation is given below.
Correct Answer: A

Leave a Reply

Your email address will not be published. Required fields are marked *