|Generated Lexers/Parsers and Multi-threading email@example.com (1998-06-09)|
|Re: Generated Lexers/Parsers and Multi-threading firstname.lastname@example.org (Tom Moog) (1998-06-11)|
|Re: Generated Lexers/Parsers and Multi-threading email@example.com (1998-06-11)|
|From:||firstname.lastname@example.org (Mr. Blue)|
|Date:||9 Jun 1998 12:20:11 -0400|
|Organization:||Express Access Online Communications, Greenbelt, MD USA|
|Keywords:||parse, C++, comment|
1. need to generate a lexer/parser from some grammar G
2. The lexer/parser must be rigged so that they are part of a C++ class
that is called often with input from a *string*, not stdin.
3. Class in (2) must be thread-safe.
In looking at the code generated by lex/yacc it would appear the
generated code is NOT thread safe (lots of globals, etc.). This means
an app would have to put a mutex around calls to the parser, which
could kill performance.
Does bison or any other parser generators generate thread-safe code?
[Bison has a reentrant option which would probably do the trick. -John]
Return to the
Search the comp.compilers archives again.