Rewrite parser by yacc