Bug in calculation of follow sets resolved. All tests pass. Need more difficult cases to be sure.