parse all grammar line types