constructing tables + follow sets