[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Character error not reported

From: Akim Demaille
Subject: Re: Character error not reported
Date: Tue, 2 Jul 2019 07:08:13 +0200

Hi Hans,

> Le 18 juin 2019 à 18:09, Hans Åberg <address@hidden> 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);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]