|Threadsafe parser generators? firstname.lastname@example.org (Wilf Coles) (1996-12-07)|
|Re: Threadsafe parser generators? email@example.com (1996-12-09)|
|Re: Threadsafe parser generators? Martin.Jourdan@inria.fr (1996-12-10)|
|Re: Threadsafe parser generators? firstname.lastname@example.org (Chuck Rendleman) (1996-12-14)|
|Re: Threadsafe parser generators? email@example.com (Michael Meissner) (1996-12-15)|
|Re: Threadsafe parser generators? firstname.lastname@example.org (1996-12-15)|
|Re: Threadsafe parser generators? email@example.com (Wilf Coles) (1996-12-24)|
|From:||Wilf Coles <firstname.lastname@example.org>|
|Date:||24 Dec 1996 22:10:38 -0500|
|Organization:||ICL High Performance Systems|
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.
Return to the
Search the comp.compilers archives again.