On Thu, Sep 14, 2006 at 11:16:16AM +0200, Akim Demaille wrote: > >>> "Bob" == Bob Rossi <[EMAIL PROTECTED]> writes: > > > 1. I've Added the %push-parser option > > push.c works in both push and pull mode. If you set the %push-parser > > option, it will work in push mode, otherwise pull mode. Depending on > the > > mode, you will get a different yyparse function. It was mentioned > > that the pull parser could be implemented be using the push mode. > > Should I do this? > > Can you detail why there is a need for this? As I see things, push.c > will be renamed as yacc.c once mature, and it will have new entry > point, such as yypush(). And yyparse() is just a wrapper around yylex > and yypush.
Hi Akim, OK, this is a good discussion to have. Let's figure this out now, so I don't have to change this to many times. Well, currently, push.c only implements yyparse (). If it's in normal mode it generates the standard pull parser, otherwise in push mode it generates the push parser. In push.c the pull parser is just as efficient as the yacc.c pull parser. Same for the pure parser. However, the push parser is much less efficient. (I get 30% for the benchmark). So, if we decided to change push.c to always generate a yypushparse function, and then implement yyparse on top of the yypushparse, then yyparse will be significantly slower than yacc.c's yyparse. That's why I decided not to go down this route. I thought the efficiency was probably more important. With that said, I'm not a long standing bison contributor, and don't really want to be responsible for this decision, even though I have my opinions. I'd be happy to implement the desired functionality, but i need a consensus to be made, since my time is limited. Thanks! Bob Rossi
