Re: multi threaded bison: yyerror

Laurence Finston <lfinsto1@gwdg.de>
5 Aug 2004 13:58:18 -0400

          From comp.compilers

Related articles
multi threaded bison: yyerror stamas@ludens.elte.hu (2004-07-28)
Re: multi threaded bison: yyerror johnmillaway@yahoo.com (John Millaway) (2004-08-05)
Re: multi threaded bison: yyerror lfinsto1@gwdg.de (Laurence Finston) (2004-08-05)
| List of all articles for this month |
From: Laurence Finston <lfinsto1@gwdg.de>
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
http://savannah.gnu.org/cgi-bin/viewcvs/3dldf/3dldf/Group/


Laurence Finston
GNU 3DLDF maintainer
http://www.gnu.org/software/3dldf


Post a followup to this message

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