[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: push parser
From: |
Joel E. Denny |
Subject: |
Re: push parser |
Date: |
Sun, 12 Feb 2006 22:30:19 -0500 (EST) |
On Sun, 12 Feb 2006, Bob Rossi wrote:
> Anyways, I ran into an m4 question that might be answered here. I have
> this
> m4_define([b4_yystate],[b4_push_if([(pv->yystate)],yystate)])
>
> 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()[ = yypact[]b4_yystate()[];
> or countless other variations, I just can't get it.
I'm not an m4 expert, so there might be an easier approach, but you could
do this:
m4_define([b4_bracket],[[[$1]]])
and then:
]b4_yyn()[ = yypact]b4_bracket(b4_yystate())[;
It's a little ugly, but it gets the job done.
Joel
- Re: push parser, (continued)
- 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, 2006/02/12
- Re: push parser,
Joel E. Denny <=
- Re: push parser, Bob Rossi, 2006/02/14