Re: multi threaded bison: yyerror

Laurence Finston <>
5 Aug 2004 13:58:18 -0400

          From comp.compilers

Related articles
multi threaded bison: yyerror (2004-07-28)
Re: multi threaded bison: yyerror (John Millaway) (2004-08-05)
Re: multi threaded bison: yyerror (Laurence Finston) (2004-08-05)
| List of all articles for this month |

From: Laurence Finston <>
Newsgroups: comp.compilers
Date: 5 Aug 2004 13:58:18 -0400
Organization: GWDG, Goettingen
References: 04-07-088
Keywords: parse, errors
Posted-Date: 05 Aug 2004 13:58:18 EDT

On Wed, 28 Jul 2004, Tamas Sarlos wrote:

> I'd like to upgrade my flex/bison generated parser to a multi threaded
> (pthreads) parser.


> Is there a better
> way to do it?

I suggest using thread-specific data (pthread_key_create(),
pthread_setspecific() and pthread_getspecific()).

In my parser, the object passed to `yyparse()' via a `void*' contains
a pointer to the object containing the thread-specific data, so I don't actually
need to call `pthread_getspecific()' very often.

If you want to look at my code, it's available under

Laurence Finston
GNU 3DLDF maintainer

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.