On Mon, 6 Jun 2005, Michel Rosien wrote:

> Is it possible to pass an additional parameter to the %merge function in 
> glr-parsers?

I don't know, and I didn't find anything in the documentation that
addresses this question.

> I can pass an additional parameter to the yyparse function with %parse-param 
> {...}
> (bison 2.0 documentation, page 63, 107)
> How can I pass that same argument to the %merge function?
> (bison 2.0 documentation, page 19)

If it's not possible, and you only call 'yyparse()' once,
then I think you might as well use a globally or statically declared
pointer to point to the object referenced by your parameter.  If you
have multiple calls to 'yyparse()', and it needs to be thread-safe,
then I suggest using thread-specific data containing a pointer
to that object (see "man pthread_key_create").  It might also turn
out to be advantageous to use a pointer to a pointer.

Laurence Finston
http://www.gnu.org/software/3dldf/LDF.html




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

Reply via email to