Re: re-entrant parsers, pure_parser, bison, flex

"Brian W. Inglis" <71511.3711@CompuServe.COM>
21 Jul 1997 09:59:57 -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)
Re: re-entrant parsers, pure_parser, bison, flex vetter@cc.gatech.edu (Jeffrey Vetter) (1997-07-22)
Re: re-entrant parsers, pure_parser, bison, flex jlilley@empathy.com (John Lilley) (1997-08-24)
| List of all articles for this month |

From: "Brian W. Inglis" <71511.3711@CompuServe.COM>
Newsgroups: comp.compilers
Date: 21 Jul 1997 09:59:57 -0400
Organization: Systematic Software
References: 97-07-081
Keywords: parse, Windows

PJ Mealy writes:
> As the GUI is structured around an event processing loop
> I can't just go ahead and do the full parse in one go.
> I need to have the event loop active periodically to process
> progress bar updates and respond to a click on the CANCEL button.


Sure you can. Just invert the approach. Think INPUT.
Add whatever you need into the yylex() function.
It is already a state driven machine that maintains its own data.
You could call your event loop each time yylex() is called,
or maintain a counter and call your event loop every 100-1000
times, or check your time and call it every second.
Define a variable global to yylex() and your cancel processing,
clear it in your main routine, set it in your cancel routine,
and test it in yylex(): if set, tell parser abnormal end of
input requested by user.


--
Take care.
Thanks,
Brian Inglis
Brian_Inglis@CompuServe.COM
--


Post a followup to this message

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