re-entrant parsers, pure_parser, bison, flex

PJ Mealy <lmipjmy@eei.ericsson.se>
13 Jul 1997 11:41:03 -0400

          From comp.compilers

Related articles
re-entrant parsers, pure_parser, bison, flex lmipjmy@eei.ericsson.se (PJ Mealy) (1997-07-13)
Re: re-entrant parsers, pure_parser, bison, flex lmipjmy@eei.ericsson.se (PJ Mealy) (1997-07-16)
Re: re-entrant parsers, pure_parser, bison, flex tiggr@ics.ele.tue.nl (1997-07-16)
Re: re-entrant parsers, pure_parser, bison, flex lmipjmy@eei.ericsson.se (PJ Mealy) (1997-07-18)
Re: re-entrant parsers, pure_parser, bison, flex cfc@world.std.com (1997-07-18)
Re: re-entrant parsers, pure_parser, bison, flex 71511.3711@CompuServe.COM (Brian W. Inglis) (1997-07-21)
Re: re-entrant parsers, pure_parser, bison, flex bear@sonic.net (Ray Dillinger) (1997-07-22)
[2 later articles]
| List of all articles for this month |

From: PJ Mealy <lmipjmy@eei.ericsson.se>
Newsgroups: comp.compilers
Date: 13 Jul 1997 11:41:03 -0400
Organization: Ericsson
Keywords: lex, question

Hello,
I couldn't find a newsgroup specific to bison or flex so I'm putting
this question here in the hope that someone can point me in the right
direction.
I'm just looking for info about creating a reentrant parser.


I have looked at the info in the bison manual and things seem
straightforward enough..%pure_parser etc..but I was wondering about
the modifications I would have to make to yylex to support the
different calling convention required when using %pure_parser. Do I
have to do this manually, or is there a switch that I can give to flex
to get it to generate yylex in this form?


I could really do with seeing an example of this, would anyone have one
handy?


Thanks in advance...


PJ Mealy
Ericsson
Dublin
Ireland.
[You have to fiddle the lexer yourself. If you just want to parser to be
recursive, you need only add the extra &yyval argument to yylex. If you
want a truly recursive lexer that you can recurse into at any time,
you're out of luck with flex. -John]




--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.