help-bison
[Top][All Lists]
Advanced

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

Re: Token types with constructor


From: Laurence Finston
Subject: Re: Token types with constructor
Date: Wed, 25 Aug 2004 20:08:38 +0200 (MEST)

On Wed, 25 Aug 2004, Martin Trautmann wrote:

> I am using bison for some time in a C++ Project and I need a Token Type
> that may have a constructor.
> 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.

There's been quite a bit of discussion on this topic lately.
I suggest you check the archives:
http://lists.gnu.org/archive/html/help-bison/

There seem to be two schools of thought on this subject:
I like to use pointers to `void', while Hans Aberg has created a patch
that makes it possible to use a C++ parser class.  The latter is not
thread-safe, however.  (I hope I've stated the case accurately).

Laurence




reply via email to

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