|Thread-safety, lex and yacc. firstname.lastname@example.org (Nicholas Dronen) (2001-03-31)|
|Re: Thread-safety, lex and yacc. email@example.com (2001-04-04)|
|Re: Thread-safety, lex and yacc. firstname.lastname@example.org (Troy Cauble) (2001-04-10)|
|Re: Thread-safety, lex and yacc. email@example.com (Clark) (2001-04-12)|
|Date:||12 Apr 2001 02:48:58 -0400|
|Keywords:||lex, yacc, C++, parallel|
|Posted-Date:||12 Apr 2001 02:48:58 EDT|
> I noticed that yylval is a global variable in the lex file for an
> application I'm auditing for thread-safety. In the C++ source file
> generated by lex, the variable is global as well. I suspect that this
> doesn't bode well for the thread-safety of the application.
If you use lex++ and bison++ then all these can be local variables
passed to the constructor or method of the generated classes.
Unfortunately the documentation on the changes from regular lex and
bison is nearly non-existent. (Lots, and lots of #defines or
Going through some of the test code I've written though, it appears
like they are fully re-entrant. I'm still developing my own grammar,
however. Thus far no quirks and I have no globals.
Return to the
Search the comp.compilers archives again.