Here are a few questions that I asked in the quiz in the classroom and just want to check their correctness. Grammar:
S -> ABC
A -> df | epsilon
B -> f | epsilon
C -> g | epsilon
1.). Does the following set B contain g and epsilon (T / F)? Ans: F. Follow sets don't have epsilon, right? (Only $ aka end of input)
2.) Does the first set of S contain d, f, g, and epsilon (T / F)? Ans: T. I said this falsely because I thought that First (S) = First (A), which g is not part. Who is right?
John
source
share