Also determine the longest alternative for a given grammar