Bug with follow logs
The logs for the follow sets add a wrong {$}
set if the symbol has nothing after it and that's wrong
The grammar:
S -> A B
A -> a A | epsilon
B -> b B | b
Expected:
Follow(S) = Follow(S') = {$}
Follow(A) = First(B) ∪ Follow(A) = {b}
Follow(B) = Follow(S) ∪ Follow(B) = {$}
Actual:
Follow(S) = { $ } u Follow(S') = { $ }
Follow(A) = First(B) u { $ } u Follow(A) = { b }
Follow(B) = { $ } u Follow(S) u Follow(B) = { $ }