help-bison
[Top][All Lists]
Advanced

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

Passing parameter to `merge' function


From: Laurence Finston
Subject: Passing parameter to `merge' function
Date: Wed, 9 Mar 2005 16:07:45 +0100 (MET)

I deleted the message asking about passing a parameter
to the `merge' function, so I can't reply directly.

There may be a better way of doing this, but a workaround might
be to use thread-specific information, assuming each call to `yyparse()'
has its own parameter object and each parameter object is associated with
a single call to `yyparse()'.  With some care, it might be possible
to use thread-specific information even if these conditions don't apply.
However, I neither know how the merge
facility works, nor how it would interact with threads.

If you're using LinuxThreads (which is included in the GNU Standard
Library for C), see the man page for `pthread_getspecific'.
I believe it should also be possible to use a different library that
implements POSIX threads, though.

If you want to see an example of using thread-specific information,
my code is available at
http://savannah.gnu.org/cgi-bin/viewcvs/3dldf/3dldf/Group/CWEB/
I define `struct Thread_Info_Type' in the file `pspglb.web'.

Otherwise, I recommend David Butenhof's book
_Programming with POSIX Threads_.

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





reply via email to

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