[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error UTF-8 strings
From: |
Akim Demaille |
Subject: |
Re: Error UTF-8 strings |
Date: |
Wed, 24 Jun 2020 07:22:55 +0200 |
hi Hans,
> Le 23 juin 2020 à 15:42, Hans Åberg <haberg-1@telia.com> a écrit :
>
>
>> On 23 Jun 2020, at 07:47, Akim Demaille <akim@lrde.epita.fr> wrote:
>>
>> give me a reproducible example.
>
> Here is the calc++ example from Bison 3.2.1, where I have changed the
> assignment symbol to "≔", and no other changes, compiled with Bison 3.6.3
> using LC_CTYPE=UTF-8. In the yytname_, there is "≔":
> "\"\\342\\211\\224\""
>
> <calc++3.2.1.zip>
Still no reproducible difference. As I said, nothing has changed here.
You probably changed something in your environment.
LC_ALL=UTF-8
$ for b in /usr/local/stow/bison-3.*/bin/bison
do
echo "------------ $b"
LC_ALL=UTF-8 $b -o foo.c parser.yy && grep -F -A 5 'yytname_[] =' foo.c
done
------------ /usr/local/stow/bison-3.0.5/bin/bison
parser.yy:2.10-16: error: require bison 3.2.1, but have 3.0.5
%require "3.2.1"
^^^^^^^
------------ /usr/local/stow/bison-3.2.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"\\342\\211\\224\"",
"\"-\"", "\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
------------ /usr/local/stow/bison-3.3.2/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"\\342\\211\\224\"",
"\"-\"", "\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
------------ /usr/local/stow/bison-3.4.2/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"\\342\\211\\224\"",
"\"-\"", "\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
------------ /usr/local/stow/bison-3.5.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"\\342\\211\\224\"",
"\"-\"", "\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
------------ /usr/local/stow/bison-3.6.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "\"invalid token\"", "\"\\342\\211\\224\"",
"\"-\"", "\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
LC_ALL=fr_FR.UTF-8
$ for b in /usr/local/stow/bison-3.*/bin/bison
do
echo "------------ $b"
LC_ALL=fr_FR.UTF-8 $b -o foo.c parser.yy && grep -F -A 5 'yytname_[] =' foo.c
done
------------ /usr/local/stow/bison-3.0.5/bin/bison
parser.yy:2.10-16: error: require bison 3.2.1, but have 3.0.5
%require "3.2.1"
^^^^^^^
------------ /usr/local/stow/bison-3.2.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"≔\"", "\"-\"", "\"+\"",
"\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"", "\"number\"",
"$accept", "unit", "assignments", "assignment", "exp", YY_NULLPTR
};
------------ /usr/local/stow/bison-3.3.2/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"≔\"", "\"-\"", "\"+\"",
"\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"", "\"number\"",
"$accept", "unit", "assignments", "assignment", "exp", YY_NULLPTR
};
------------ /usr/local/stow/bison-3.4.2/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"≔\"", "\"-\"", "\"+\"",
"\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"", "\"number\"",
"$accept", "unit", "assignments", "assignment", "exp", YY_NULLPTR
};
------------ /usr/local/stow/bison-3.5.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"≔\"", "\"-\"", "\"+\"",
"\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"", "\"number\"",
"$accept", "unit", "assignments", "assignment", "exp", YY_NULLPTR
};
------------ /usr/local/stow/bison-3.6.4/bin/bison
const parser::yytname_[] =
{
"\"end of file\"", "error", "\"invalid token\"", "\"≔\"", "\"-\"",
"\"+\"", "\"*\"", "\"/\"", "\"(\"", "\")\"", "\"identifier\"",
"\"number\"", "$accept", "unit", "assignments", "assignment", "exp",
YY_NULLPTR
};
- Re: Error UTF-8 strings, (continued)
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/21
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/21
- Re: Error UTF-8 strings, Akim Demaille, 2020/06/22
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/22
- Re: Error UTF-8 strings, Akim Demaille, 2020/06/23
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/23
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/23
- Re: Error UTF-8 strings, Akim Demaille, 2020/06/24
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/24
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/23
- Re: Error UTF-8 strings,
Akim Demaille <=
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/24
- Re: Error UTF-8 strings, Akim Demaille, 2020/06/24
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/24
- Re: Error UTF-8 strings, Ken Moffat, 2020/06/24
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/24
- Re: Error UTF-8 strings, Hans Åberg, 2020/06/24