Write a program that does the following:
1. Reads a grammar.
2. Finds all FIRST(X) sets, following algorithm on pg. 189 of text.
3. Finds all FOLLOW(A) sets following algorithm on pg. 190 of text.
You may write the program in any language that is supported by the
computers in the lab, but C++ is preferred.
INPUT:
A grammar G.
OUTPUT:
The list of all productions in G
The FIRST(X) and FOLLOW(A) sets of G