Grammar Analyzer for CS311