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
