bug-bison
[Top][All Lists]
Advanced

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

Re: Bison 3.7.90 (beta): test 4


From: Dagobert Michelsen
Subject: Re: Bison 3.7.90 (beta): test 4
Date: Thu, 19 Aug 2021 10:21:56 +0200

Hi Akim,

Am 19.08.2021 um 10:13 schrieb Akim Demaille <akim@lrde.epita.fr>:
> Le 19 août 2021 à 10:07, Dagobert Michelsen <dam@opencsw.org> a écrit :
>> Am 19.08.2021 um 10:01 schrieb Akim Demaille <akim@lrde.epita.fr>:
>>> This is good: the input and the output are correct.  So it's the test 
>>> suite's post processing which is wrong.  I guess Perl does not behave the 
>>> expected way.  Could you please give me the results (and out.1 and out.2) 
>>> of:
>>> 
>>> perl --version
>>> perl -p -e 's{([\0\200\210\360\377])}{sprintf "\\x%02x", ord($1)}ge' <log 
>>> >out.1
>>> perl -p -e 's{([\000\200\210\360\377])}{sprintf "\\x%02x", ord($1)}ge' <log 
>>> >out.2
>>> 
>>> where log is the previous log file (from LC_ALL=C tests/bison  
>>> tests/testsuite.dir/004/input.y 2>log).
>> 
>> Sure, I also added the respective output from the system shipped perl:
> 
> Thanks.  Neither work as I expect.  It seems that \0 does not work in char 
> classes.  Could you please try this also?
> 
> perl -p -e 's{(\0|[\200\210\360\377])}{sprintf "\\x%02x", ord($1)}ge' <log 
> >out.3
> 
> Currently your output looks like this:
> 
> tests/testsuite.dir/004/input.y:1.11: error: invalid null character
>    1 | %header "\xf0\x80\x88"
>      |           ^
> 
> the expected output should also show \x00:
> 
>    1 | %header "\xf0\x00\x80\x88"
>      |           ^

So you are assuming that a NULL byte actually in log, which is not the case:

dam@unstable10s 
[unstable10s]:/home/dam/mgar/pkg/bison/trunk/work/solaris10-sparc/build-isa-sparcv8plus/bison-3.7.90
 > od -x log | less
0000000 7465 7374 732f 7465 7374 7375 6974 652e
0000020 6469 722f 3030 342f 696e 7075 742e 793a
0000040 312e 3131 3a20 6572 726f 723a 2069 6e76
0000060 616c 6964 206e 756c 6c20 6368 6172 6163
0000100 7465 720a 2020 2020 3120 7c20 2568 6561
0000000 7465 7374 732f 7465 7374 7375 6974 652e
0000020 6469 722f 3030 342f 696e 7075 742e 793a
0000040 312e 3131 3a20 6572 726f 723a 2069 6e76
0000060 616c 6964 206e 756c 6c20 6368 6172 6163
0000100 7465 720a 2020 2020 3120 7c20 2568 6561
0000120 6465 7220 22f0 8088 220a 2020 2020 2020
                    ^^ ^^^^
0000140 7c20 2020 2020 2020 2020 2020 5e0a 7465
0000160 7374 732f 7465 7374 7375 6974 652e 6469
...


-- 
"You don't become great by trying to be great, you become great by wanting to 
do something,
and then doing it so hard that you become great in the process." - xkcd #896




reply via email to

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