Related articles |
---|
Threadsafe parser generators? c.coles@slh0633.wins.icl.co.uk (Wilf Coles) (1996-12-07) |
Re: Threadsafe parser generators? jlilley@empathy.com (1996-12-09) |
Re: Threadsafe parser generators? Martin.Jourdan@inria.fr (1996-12-10) |
Re: Threadsafe parser generators? car@mothra.lbl.gov (Chuck Rendleman) (1996-12-14) |
Re: Threadsafe parser generators? meissner@cygnus.com (Michael Meissner) (1996-12-15) |
Re: Threadsafe parser generators? paulpaul@knoware.nl (1996-12-15) |
Re: Threadsafe parser generators? c.coles@slh0633.wins.icl.co.uk (Wilf Coles) (1996-12-24) |
From: | jlilley@empathy.com (John Lilley) |
Newsgroups: | comp.compilers |
Date: | 9 Dec 1996 00:07:22 -0500 |
Organization: | Empathy Software |
References: | 96-12-059 |
Keywords: | C, parallel |
c.coles@slh0633.wins.icl.co.uk says...
>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.
john lilley
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.