Hi Hans, > Le 18 juin 2019 à 18:09, Hans Åberg <haber...@telia.com> a écrit : > > As 8-bit character tokens are not useful with UTF-8, I have replaced it with: > %token token_error "token error" > > . { return my_parser::token::token_error; } > > Please let me know if there is a better way to generate a parser error.
I personally prefer to throw an exception. . throw parser::syntax_error(loc, "invalid character: "s + yytext);