Fix lexer errors in parser tests

Done. (It's a bit ugly as the lexer result can only be traversed once.)