Now, I think that the Bison setup isn't even
designed for handling redefinition of YYSTYPE. So I do not
immediately see
exactly what is needed, and how the current Bison commands will
support that.
-- Directive: %requires {CODE}
This is the right place to write dependency code for externally
exposed definitions required by Bison. Such exposed definitions
are those usually appearing in the parser header file. Thus,
this
is the right place to define types referenced in `%union {CODE}'
directives, and it is the right place to override Bison's default
`YYSTYPE' and `YYLTYPE' definitions.
In 2.3a, %requires was called %start-header. Let me know if it
doesn't
work for you.