On 19/06/2020 00:13, Akim Demaille wrote:
> Hi Daniele,
>
>> Le 18 juin 2020 à 19:20, Akim Demaille a écrit :
>>
>>> However I have a ton of tests that expect the lexer to emit a
>>> "LEX_ERROR" token on error and I am considering to use YYerror special
>>> token to report errors instead. Thus
Hi Daniele,
> Le 18 juin 2020 à 19:20, Akim Demaille a écrit :
>
>> However I have a ton of tests that expect the lexer to emit a
>> "LEX_ERROR" token on error and I am considering to use YYerror special
>> token to report errors instead. Thus the question if I can rename
>> YYerror from
Hi Daniele,
> Le 18 juin 2020 à 10:35, Daniele Nicolodi a écrit :
>
> On 18/06/2020 00:44, Akim Demaille wrote:
>> There is no way to rename it, and it wouldn't make sense as the error
>> token is never presented as an "expected token". The error token never
>> shows to the (end) user. It
On 18/06/2020 00:44, Akim Demaille wrote:
> There is no way to rename it, and it wouldn't make sense as the error
> token is never presented as an "expected token". The error token never
> shows to the (end) user. It appears in the debug traces, but that's
> for the developer.
What about YYEOF
Daniele,
> Le 18 juin 2020 à 07:57, Daniele Nicolodi a écrit :
>
> Hello,
>
> in Bison 3.6 is it possible to redefine the literal string associated to
> the YYerror symbol (and to the YYEOF, YYUNDEF ones, although I don't
> have immediate need for this)?
YYerror is exactly the error token,
Hello,
in Bison 3.6 is it possible to redefine the literal string associated to
the YYerror symbol (and to the YYEOF, YYUNDEF ones, although I don't
have immediate need for this)?
Doing it in the naive way:
%token YYerror "ERROR"
results in a warning:
warning: symbol YYerror given more than