[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: push parser
From: |
Bob Rossi |
Subject: |
Re: push parser |
Date: |
Thu, 6 Apr 2006 11:27:24 -0400 |
User-agent: |
Mutt/1.5.9i |
On Thu, Apr 06, 2006 at 05:16:36PM +0200, Akim Demaille wrote:
> >>> "Bob" == Bob Rossi <address@hidden> writes:
>
> > I added the %push-parser option, so that a bison input grammar file can
> > ask for itself to be a push-parser.
>
> What should Bison knows about this? is it just a means to select the
> right skeleton, or it actually changes something for bison itself?
It is exactly like %pure-parser. It does not select a different
skeleton. In fact, %pure-parser uses the yacc.c skeleton.
I put m4 conditionals in yacc.c, and if %pure-parser is set, yacc.c
outputs a pure parser. This mostly means that yacc.c creates a struct
with all the variables that yyparse needs, and that yyparse does
'pv->yychar' instead of 'yychar'.
Thanks,
Bob Rossi