Rewrite parser by yacc

WIP