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



_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to