|Lexer/Parser in Multithreaded C App email@example.com (1998-07-03)|
|Re: Lexer/Parser in Multithreaded C App firstname.lastname@example.org (Chris F Clark) (1998-07-05)|
|From:||email@example.com (Ron Isaacson)|
|Date:||3 Jul 1998 00:40:52 -0400|
|Organization:||University of Pennsylvania|
|Keywords:||lex, parse, parallel|
I'm using Flex and Bison to create a lexer/parser in a multithreaded C
(not C++) app. Bison has the %pure_parser option; does that make the
generated parser completely thread-safe?
Lex's C++ lexer class claims to be inherently thread-safe, but I'd
rather keep it in C; I couldn't find any info on this. Does anyone
know if it's possible, or do I have to use C++?
Also, out of curiosity, is there a standard way of doing lexer/parser
global variables in a multithreaded app? My lexer currently has a
global which it uses to keep track of the state, and my parser has a
few globals which are used as temporary storage as each token in a
sequence is parsed. Can anyone recommend a thread-safe way of redoing
I'm a bit new to multithreaded programming, so any advice would be
greatly appreciated. Thank you very much!
- Ron, firstname.lastname@example.org
Return to the
Search the comp.compilers archives again.