Add parse_grammar
Move parse_grammar and friends to front module