help-bison
[Top][All Lists]
Advanced

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

Re: Bison 1.30f broke my C++ parser


From: Hans Aberg
Subject: Re: Bison 1.30f broke my C++ parser
Date: Sun, 27 Jan 2002 11:45:20 +0100

At 22:55 -0500 2002/01/26, Anthony DeRobertis wrote:
>Bison 1.30f introduced a union with YYTYPE in it. The means that you can't
>use any half-interesting class[0] as YYTYPE anymore... why the change?

I think this is the dynamic stack stuff (union yyalloc) that Akim wrote,
but which he blames on me :-). (I suggested better C++ namespace
compatibility, which does not have with the "union yyalloc" stuff to do.)

Please also note that even if the current "union yyalloc" stack was tweaked
to not use union's, during re-allocation, it would not invoke the copy
contstructors of YYALLOC, as re-allocation is done using by raw memory
copying (memcpy).

I solved this by making my own C++ skeleton file, using (for default) a
standard C++ container as stack. -- But it relies on some mild Bison tweaks
(writing out the $n variables via macro names instead of directly), which
means that every new Bison version must be patched up.

  Hans Aberg





reply via email to

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