help-bison
[Top][All Lists]
Advanced

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

Re: %union, C++, symbol types


From: Evan Lavelle
Subject: Re: %union, C++, symbol types
Date: Tue, 19 Jul 2005 14:00:16 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Thanks for the input on this. I can't really use the pointer solutions, so my current fix is to define YYSTYPE as a struct, rather than a union, and to pass around classes in the struct. This seems to work well, though it's inefficient.

The reason that reference counting is required here is that the lexer produces a token class, rather than AST nodes, and a single token might eventually appear multiple times (or not at all) in the AST.

Thanks -

Evan





reply via email to

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