parse_grammar now in its own file