Re: Error UTF-8 strings

Hans Åberg <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
> On 24 Jun 2020, at 07:27, Akim Demaille <[email protected]> wrote:
> 
>> Le 23 juin 2020 à 11:12, Hans Åberg <[email protected]> a écrit :
>> 
>> The other errors occurred because I report errors in the grammar actions as:
>>       throw syntax_error(@x, "Name " + $x.text + " already defined in this scope as "
>>         + yytnamerr_(yytname_[x0->first - 255]) + ".");
>> 
>> So perhaps you made some API for that?
> 
> yysymbol_name(x0->first).

I have to write, as x0→first is an int,
  symbol_name((symbol_kind_type)x0→first)

— When you made that complicated name, perhaps you did not consider it spilling into the user namespace.

Also, changing tokens and symbols to 'enum class' worked fine, except that the lexer return an int,  so one must put in conversions there.

> If you need something else, you'll have to
> read the doc about parse.error=custom.

I saw it, and think of using it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.