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: | Wilf Coles <c.coles@slh0633.wins.icl.co.uk> |
Newsgroups: | comp.compilers |
Date: | 24 Dec 1996 22:10:38 -0500 |
Organization: | ICL High Performance Systems |
References: | 96-12-059 96-12-119 |
Keywords: | parse, parallel |
Thanks to all for your replies. It has been pointed out that if I had
read the manual :-) I would have noticed that bison supports
re-entrant parsers with the %pure_parser directive. Having now read
the manual I have worked through making the examples in the .info
re-entrant and got them to work in my environment.
My original question was a actually rather pooorly phrased because I
want not only a parser but a lexer too. Having learnt my lesson :-) I
tried reading the flex manual but the generated C lexers are non
re-entrant. I have solved this by wrapping the C++ lexer in C and
passing the C++ object representing the lexer as an opaque type. Seems
to work ok but not ideal in my environment where we cannot guarantee
the availability of C++. It'll do for now though.
One thing to note is that there is a bug in bison.simple which makes
an assumption about the function prototype for yyparse which conflicts
with the function definition when a %pure_parser is used. It can be
got round by just knocking out the offending lines from
bison.simple. I will let the maintainers know.
Again, thanks to everyone for their help.
Regards,
Wilf Coles
c.coles@slh0633.wins.icl.co.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.