From: <li...@mi...> - 2007-08-27 19:14:04
|
On Mon, Aug 27, 2007 at 11:05:14AM -0500, Mike Borella wrote: > I don't think there was any rationale for the single global callback > function except that it kept things simple at first. Now that the > program is much more sophisticated, I think that multiple callbacks > would be fine. > > The #exit directive seems useful as well. > > Thanks, > Mike > > Michael Geng wrote: > >Hi Mike, > > > >In the genparse info file in the description of the global functions I > >found: > >"Only 1 global callback function is allowed." In the example in the info > >pages > >I found "There may be more than one global callback - all will be called > >in the parser function." > > > >I do not remember if I was the one who wrote that only 1 global callback > >function is allowed - but that's how I always thought about it. Is there a > >reason for more than 1 global callback function? The user can program what > >he wants in that callback function, he can of course also call other > >functions from there if he likes. > > > >---------------------- > > > >Another topic: I'm proposing to add an #exit_value macro to the list of > >possible global definitions in the genparse file. For example > > > >#exit_value -2 > > > >in case of a failure the generated parser would then call exit(-2). > > > >Or with > > > >#exit_value MY_EXIT_CODE > > > >the program would call exit(MY_EXIT_CODE) which makes sense if MY_EXIT_CODE > >is defined in one of the include files. > > > >Michael > > > > > -- > Mike Borella > http://www.borella.net/mike Hi Mike, no, I don't want to add the possibility to have multiple global callback functions now, it's just the opposite: I want to keep genparse simple and allow only 1 global callback because I don't see a requirement for more. I'm interpreting your answer such that you don't care much about it :-) Michael |