bug-bison
[Top][All Lists]
Advanced

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

Re: The tname translations and UTF-8


From: Hans Åberg
Subject: Re: The tname translations and UTF-8
Date: Sat, 24 Mar 2018 23:12:33 +0100

> On 24 Mar 2018, at 22:10, Paul Eggert <address@hidden> wrote:
> 
> Hans Åberg wrote:
>> Might it possible to get an option
> 
> Sounds like a reasonable option to me, if someone wants to write and document 
> it.

I wrote some C++ code translating it back to UTF-8 for error messages, but it 
is sort of roundabout, and for the future it might good to prepare for UTF-8. 
For UTF-8, it would suffice in such explicit token names that they come back 
verbatim, and thus translated into the yytname array only for characters 
(octets) that C code "..." strings can't contain:

I saw you wrote the code that does the actual translation. :-) In 
'prepare_symbols' output.c, there is a section "tname -- token names" with 
code: 
  set_quoting_style (qo, c_quoting_style);
which is perhaps the part doing the translation. Perhaps it would suffice to 
change that.





reply via email to

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