[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: push parser
Re: push parser
Sun, 12 Feb 2006 19:42:27 -0500
On Sun, Feb 12, 2006 at 12:02:10AM -0800, Paul Eggert wrote:
> Bob Rossi <address@hidden> writes:
> > So, as my first question, would it make sense to write a m4 macro that
> > either generates yystate when in normal bison mode, and pv->yystate when
> > in m4 bison mode?
> > or would it be better to use the C++ preprocessor to do this?
> Either would make sense. My preference is to use the C preprocessor,
> and I think Akim's is to use m4. If it's C++, many people don't
> want to use the preprocessor, due to fears of namespace pollution.
Well, I decided to use m4 over the C preprocessor. I initially started
with the C preprocessor but I soon realized the names I needed to
#define were also used locally in a bunch of functions. So I would have
had to modify the name of all those variables.
Now, using the m4 approach I change exactly the variables I want to
change. However, the downside is, I personally think it makes reading
the yyparse skeleton code harder.
Anyways, I ran into an m4 question that might be answered here. I have
and when I try to use b4_yystate() in this context
]b4_yyn()[ = yypact]b4_yystate()[;
it works fine. However, I need the C array brackets in the output so
however I try to write the line
]b4_yyn()[ = yypactb4_yystate();
or countless other variations, I just can't get it.
Any help would be greatly appreciated. I basically need the output to
or in push mode
Anyone know the answer to this?
- Re: push parser, (continued)
- Re: push parser, Akim Demaille, 2006/02/07
- Re: push parser, Paul Eggert, 2006/02/07
- Re: push parser, Bob Rossi, 2006/02/07
- Re: push parser, Paul Eggert, 2006/02/08
- Re: push parser, Bob Rossi, 2006/02/08
- Re: push parser, Paul Eggert, 2006/02/09
- Re: push parser, Akim Demaille, 2006/02/09
- Re: push parser, Bob Rossi, 2006/02/11
- Re: push parser, Paul Eggert, 2006/02/12
- Re: push parser,
Bob Rossi <=
- Re: push parser, Joel E. Denny, 2006/02/12
- Re: push parser, Bob Rossi, 2006/02/14