mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
style: formatting changes
* data/skeletons/yacc.c, tests/torture.at: here.
This commit is contained in:
@@ -178,7 +178,8 @@ int yynerrs;]])])
|
|||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
# Declare all the variables that are needed to maintain the parser state
|
# Declare all the variables that are needed to maintain the parser state
|
||||||
# between calls to yypush_parse.
|
# between calls to yypush_parse.
|
||||||
m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
|
m4_define([b4_declare_parser_state_variables],
|
||||||
|
[b4_pure_if([[
|
||||||
/* Number of syntax errors so far. */
|
/* Number of syntax errors so far. */
|
||||||
int yynerrs;
|
int yynerrs;
|
||||||
]])[
|
]])[
|
||||||
@@ -1414,11 +1415,10 @@ yypull_parse (yypstate *yyps]b4_user_formals[)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
int yystatus;
|
int yystatus;
|
||||||
do {]b4_pure_if([[
|
do {
|
||||||
YYSTYPE yylval;
|
]b4_pure_if([[ YYSTYPE yylval;
|
||||||
int ]])[yychar = ]b4_lex[;
|
int ]])[yychar = ]b4_lex[;
|
||||||
yystatus =
|
yystatus = yypush_parse (yyps_local]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])[);
|
||||||
yypush_parse (yyps_local]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])[);
|
|
||||||
} while (yystatus == YYPUSH_MORE);
|
} while (yystatus == YYPUSH_MORE);
|
||||||
if (!yyps)
|
if (!yyps)
|
||||||
yypstate_delete (yyps_local);
|
yypstate_delete (yyps_local);
|
||||||
|
|||||||
@@ -404,7 +404,6 @@ AT_CLEANUP
|
|||||||
m4_define([AT_DATA_STACK_TORTURE],
|
m4_define([AT_DATA_STACK_TORTURE],
|
||||||
[AT_BISON_OPTION_PUSHDEFS([$2])
|
[AT_BISON_OPTION_PUSHDEFS([$2])
|
||||||
# A grammar of parens growing the stack thanks to right recursion.
|
# A grammar of parens growing the stack thanks to right recursion.
|
||||||
# exp:
|
|
||||||
AT_DATA_GRAMMAR([input.y],
|
AT_DATA_GRAMMAR([input.y],
|
||||||
[[%{
|
[[%{
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -419,7 +418,7 @@ AT_DATA_GRAMMAR([input.y],
|
|||||||
%define parse.error verbose
|
%define parse.error verbose
|
||||||
%token WAIT_FOR_EOF
|
%token WAIT_FOR_EOF
|
||||||
%%
|
%%
|
||||||
exp: WAIT_FOR_EOF exp | ;
|
exp: WAIT_FOR_EOF exp | %empty;
|
||||||
%%
|
%%
|
||||||
]AT_YYERROR_DEFINE[
|
]AT_YYERROR_DEFINE[
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -468,7 +467,7 @@ main (int argc, const char **argv)
|
|||||||
status = new_status;
|
status = new_status;
|
||||||
else
|
else
|
||||||
assert (new_status == status);
|
assert (new_status == status);
|
||||||
}]m4_bmatch([$2], [api.push-pull both],[[
|
}]m4_bmatch([$2], [api.push-pull both], [[
|
||||||
yypstate_delete (ps);]])[
|
yypstate_delete (ps);]])[
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user