[WIP] Replace with yacc with a custom parser