|Threadsafe parser generators? email@example.com (Wilf Coles) (1996-12-07)|
|Re: Threadsafe parser generators? firstname.lastname@example.org (1996-12-09)|
|Re: Threadsafe parser generators? Martin.Jourdan@inria.fr (1996-12-10)|
|Re: Threadsafe parser generators? email@example.com (Chuck Rendleman) (1996-12-14)|
|Re: Threadsafe parser generators? firstname.lastname@example.org (Michael Meissner) (1996-12-15)|
|Re: Threadsafe parser generators? email@example.com (1996-12-15)|
|Re: Threadsafe parser generators? firstname.lastname@example.org (Wilf Coles) (1996-12-24)|
|From:||email@example.com (John Lilley)|
|Date:||9 Dec 1996 00:07:22 -0500|
>Does anyone know of any threadsafe parser generators (for C),
>i.e. that will generate parsers to work in a multi threaded
>environment. All of the parser generators that I am aware of rely on
>global or static data and so it is not possible to run two instances
>of a parser concurrently in two different threads. Do the C++ parser
>generators have this capability?
I use PCCTS quite a bit and have looked into this. PCCTS generates
parser and lexers that have static members. In the lexer, the static
data is in the state table and so is read-only. In the parser, most
of the static data is used to represent leading-sets and so is also
read only. There is some gratuitous static data in the parser that I
think can be easily made per-object.
PCCTS generates C or C++, but the above comments apply only to the C++
code. The "C" code is definitely not thread-safe. In general, PCCTS
does not generate thread-safe parsers out of the box, but I think it
can be hacked to do so without too much trouble. PCCTS is an LL(k)
parser-generator with predicates and backtracking.
Return to the
Search the comp.compilers archives again.