rewrite parser.