Compiler Design and Construction - Old Questions

Question Answer Details

4.  Find first and follow for the non-terminals in the following grammar.

    

6 marks
Asked in 2074

Answer

AI Generated Answer

AI is thinking...

Official Answer

Given grammar;

Now, the FIRST and FOLLOW for the non-terminal symbols are:

Non-terminals

FIRST()

FOLLOW()

S

{a, b, d}

{$}

A

{d}

{a, c}

B

{a}

{a, c}