* data/push.c (yypstate_init): Rename to...

(yypstate_new): ... this and use b4_c_function_def.
(yypstate_delete): New.
(yypush_parse): Change parameters yynval and yynlloc to be const.
* tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
yypstate_delete functions.
This commit is contained in:
Joel E. Denny
2006-12-14 02:58:11 +00:00
parent f02e2948bd
commit 9bf32be3a0
3 changed files with 35 additions and 14 deletions

View File

@@ -338,13 +338,13 @@ main (int argc, const char **argv)
[ yydebug = 1;])])[
]AT_PUSH_IF([
{
struct yypstate *pstate = yypstate_init ();
struct yypstate *pstate = yypstate_new ();
YYSTYPE my_lval;
]AT_LOCATION_IF([YYLTYPE my_lloc;])[
do {
status = yypush_parse (pstate, yylex (&my_lval]AT_LOCATION_IF([[, &my_lloc]])[), &my_lval]AT_LOCATION_IF([[, &my_lloc]])[);
} while (status == YYPUSH_MORE);
free (pstate);
yypstate_delete (pstate);
}],[
status = yyparse (]AT_PARAM_IF([[&result, &count]])[);])[
fclose (input);