help-bison
[Top][All Lists]
Advanced

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

Token types with constructor


From: Martin Trautmann
Subject: Token types with constructor
Date: Wed, 25 Aug 2004 14:24:08 +0200

Hi,

I am using bison for some time in a C++ Project and I need a Token Type
that may have a constructor. When I started (4 years) bison had no
problem with that. Then came some versions that generated code like
this:
/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
};
Which doesn't allow a YYSTYPE to have a constructer. Some years later I
was sureprised that bison versions didn't have any problems with my code
any more but when I updated to the current Bison Version 1.875 problems
returned.

I know I can fix that in the template files on my installation. But I
want others to be able to easily compile my code. So I have the
following questions:
1) Is there any option to change the behaviour of bison to allow YYSTYPE
to have a constructor?
2) if not: do you plan to keep it like that in newer versions?
3) is there a stable version of bison that integrates better in C++
code?

Thanks for creating and maintaining such an important tool like bison

bye

Martin





reply via email to

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