On 2024-04-26 12:54, Steffen Nurpmeso wrote:
> Hello.
> 
> I come over via https://github.com/onetrueawk/awk/issues/228.
> For years the nawk build causes terminal mess in the unshare(1)d
> fakeroot(1) package build environment of the Linux distro i use
> (CRUX; sh(1) based).  It looks like that:

Downstream users should not have to run Yacc at all. It is best to capture
the source code produced by the parser generator and ship that with the
rest of the sources. Only run the generator when the grammar changes.
At that point you can use the same version of the generator tool to ensure
minimal diffs in the output file.

If you let downstream users run Yacc, you don't know what C code you're
getting. One user might run ancient Bison 2.5. Another might run
the latest version. A third one might use Berkeley Yacc or what have you.

It's a kind of important part of the program to leave to chance.

https://www.gnu.org/software/bison/manual/html_node/Versioning.html






> 
>   ...
>   bison -d  awkgram.y
>   awkgram.yawkgram.y: : warning:warning:3399;49m;49m  62 shift/reduce 
> conflicts62 shift/reduce conflicts [ [
>   7 reduce/reduce conflicts] 
> [8;id=5]984;dicd7=750909046d1c67f7101050b63196dfb1d1050b03090d0b0d10;0h0t0t0p0s0:1/;/hwtwtwp.sg:n/u/.wowrwg./gsnouf.towragr/es/obfitswoanr/em/abniusaoln//hmtamnlu_a
>   
> nlo/dhet/mDli_angondoes/tDiicasg.nhotsmtli#cWsc.ohntfmlli#cWtcso-nrfrl\c-Wconflicts-rrt[-3r9r;\9-Wconflicts-rrm389;;;4\m]
>   awkgram.y: note:note: erun with option '-Wcounterexamples' to generate 
> conflict 
> counterexamples[f111d207]580;0i0d00=050919;h4ttdpcs7:/7/0w0w0w.gnu.org/softw6a1r6ef/1b1i1sdo2n/ma0nu7a4l2/0h0t0
>   39;49m rerun with option '-Wcounterexamples' to generate conflict 
> counterexamplescts-rri[o3n9/;m4a9nmu]l8/;h;t\l_no]de
>   cc -g -Wall -pedantic -Wcast-qual   -O2   -c -o [.]
>   ...
> 
> From warning:warning it is purple, from note:note turquoise, then
> purple, then .. etc.  The terminal is not properly restored,
> i need to do "tput reset" to see the cursor again.  The screen is
> flushed, ie cleared initially, too.
> Note that if i do ls(1) --color=yes in the same environment,
> colors are ok.  (However, vim(1) only starts up as rvim.)
> 
> It is like that for years, i can reproduce it a hundred percent
> (also see the nawk issue).  Todd Miller said in the issue that
> bison uses some GNU specific library for these terminal sequences,
> but i have zero idea from neither.  From a fast glance into the
> very large bison codebase it seems quite logical (if it really is
> that isatty(STDERR) thing).
> I only wanted to report this issue, finally.
> 
> --steffen
> |
> |Der Kragenbaer,                The moon bear,
> |der holt sich munter           he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)

Reply via email to