parser: simplify grammar and ast nodes