Discussion:
Error on C++ grammar; problem with bison's version?
Antoine Leca
2013-02-21 18:18:23 UTC
Permalink
Hi guys,

While I am trying to get the building process back in order with
Windows, I got an error with the C++ grammar:


C>bison --version
GNU Bison version 1.28

C>bison -y -t -d --no-lines cc\cxxcom\cgram.y
cc\cxxcom\cgram.y:318: type clash (`' `strp') on default action
cc\cxxcom\cgram.y:319: type clash (`' `strp') on default action

C>type DATESTAMP
20130217


I know that version is _very_ old, yet it served us faithfully until
now, and it does not complain on the C grammar. However I know next to
nothing to yacc (read: I am too lazy to dig into 2500 lines of yacc) so
I am completely unable to decide if there is a bug in the grammar, if it
is just a limit of my version, or if we are indeed requiring some
not-too-old version of bison (in which case we should check that with
autoconf...)

Any ideas?

Antoine
Thorsten Glaser
2013-02-21 20:26:20 UTC
Permalink
Post by Antoine Leca
is just a limit of my version, or if we are indeed requiring some
not-too-old version of bison (in which case we should check that with
I sincerely hope *GNU* bison is not required.

By the way, in my experience, in software that does not
specifically require GNU bison, using Berkeley Yacc has
usually better(!) results.
Post by Antoine Leca
C>bison -y -t -d --no-lines cc\cxxcom\cgram.y
***@blau:~/Misc/Vendor/pcc $ yacc -t -d cc/cxxcom/cgram.y
cc/cxxcom/cgram.y: yacc finds 4 shift/reduce conflicts
***@blau:~/Misc/Vendor/pcc $ echo $?
0

By the way… cxxcom? What the fscking hell? *shudder*
I found pcc sympathic (also) because it didn’t do
that nōnsense.

But I guess if it’s good enough to bootstrap LLVM+Clang
without the need for any GCC, it does serve a purpose.

bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
Antoine Leca
2013-02-22 14:34:23 UTC
Permalink
Post by Thorsten Glaser
Post by Antoine Leca
is just a limit of my version, or if we are indeed requiring some
not-too-old version of bison (in which case we should check that with
I sincerely hope *GNU* bison is not required.
Sorry, it seems I expressed myself badly.

The question I asked about bison was whether there were, or not,
problems with old version version of bison, in order to forewarn users
of that software that they may have problems.
Given the reactions, I guess this should not be done; and that these
users should rather been asked, politely but firmly, to change their
software toward another parser tool.


Now, in the instructions given in the official website about pcc, with
respect to building on Windows http://pcc.ludd.ltu.se/building/ it
appears that the recommended software is still Bison. Obviously this is
incorrect, so I will need to change it as soon as possible and replace
it with Byacc. This just needs quite a bit more work and delay.


Antoine

Isaac Dunham
2013-02-21 22:34:43 UTC
Permalink
On Thu, 21 Feb 2013 19:18:23 +0100
Post by Antoine Leca
Hi guys,
While I am trying to get the building process back in order with
C>bison --version
GNU Bison version 1.28
C>bison -y -t -d --no-lines cc\cxxcom\cgram.y
cc\cxxcom\cgram.y:318: type clash (`' `strp') on default action
cc\cxxcom\cgram.y:319: type clash (`' `strp') on default action
C>type DATESTAMP
20130217
I know that version is _very_ old, yet it served us faithfully until
now, and it does not complain on the C grammar. However I know next to
nothing to yacc (read: I am too lazy to dig into 2500 lines of yacc) so
I am completely unable to decide if there is a bug in the grammar, if it
is just a limit of my version, or if we are indeed requiring some
not-too-old version of bison (in which case we should check that with
autoconf...)
I can verify that pcc builds properly with byacc instead of bison.
However, I note this message:
/mkext
byacc -d ./cgram.y
byacc: 4 shift/reduce conflicts.
mv -f y.tab.c cgram.c
mv -f y.tab.h cgram.h

Try byacc; it works better in most cases.

HTH,
Isaac Dunham <***@lavabit.com>
Loading...