[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] style: formatting changes
From: |
Akim Demaille |
Subject: |
[PATCH 4/6] style: formatting changes |
Date: |
Tue, 3 Mar 2020 18:35:24 +0100 |
* data/skeletons/yacc.c, tests/torture.at: here.
---
data/skeletons/yacc.c | 10 +++++-----
tests/torture.at | 5 ++---
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c
index db2b3efd..9de6f7b0 100644
--- a/data/skeletons/yacc.c
+++ b/data/skeletons/yacc.c
@@ -178,7 +178,8 @@ int yynerrs;]])])
# ---------------------------------
# Declare all the variables that are needed to maintain the parser state
# 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. */
int yynerrs;
]])[
@@ -1414,11 +1415,10 @@ yypull_parse (yypstate *yyps]b4_user_formals[)
}
}
int yystatus;
- do {]b4_pure_if([[
- YYSTYPE yylval;
+ do {
+]b4_pure_if([[ YYSTYPE yylval;
int ]])[yychar = ]b4_lex[;
- yystatus =
- yypush_parse (yyps_local]b4_pure_if([[, yychar,
&yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [,
b4_args(b4_parse_param)])[);
+ yystatus = 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);
if (!yyps)
yypstate_delete (yyps_local);
diff --git a/tests/torture.at b/tests/torture.at
index 245cac62..3dbbed5e 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -404,7 +404,6 @@ AT_CLEANUP
m4_define([AT_DATA_STACK_TORTURE],
[AT_BISON_OPTION_PUSHDEFS([$2])
# A grammar of parens growing the stack thanks to right recursion.
-# exp:
AT_DATA_GRAMMAR([input.y],
[[%{
#include <errno.h>
@@ -419,7 +418,7 @@ AT_DATA_GRAMMAR([input.y],
%define parse.error verbose
%token WAIT_FOR_EOF
%%
-exp: WAIT_FOR_EOF exp | ;
+exp: WAIT_FOR_EOF exp | %empty;
%%
]AT_YYERROR_DEFINE[
#include <assert.h>
@@ -468,7 +467,7 @@ main (int argc, const char **argv)
status = new_status;
else
assert (new_status == status);
- }]m4_bmatch([$2], [api.push-pull both],[[
+ }]m4_bmatch([$2], [api.push-pull both], [[
yypstate_delete (ps);]])[
return status;
}
--
2.25.1
- [PATCH 0/6] Address some limitations in the bistro example, Akim Demaille, 2020/03/03
- [PATCH 1/6] bistromathic: check completion, Akim Demaille, 2020/03/03
- [PATCH 2/6] bistromathic: don't require spaces after operators for completion, Akim Demaille, 2020/03/03
- [PATCH 3/6] bistromathic: properly compute the lcp, as expected by readline, Akim Demaille, 2020/03/03
- [PATCH 4/6] style: formatting changes,
Akim Demaille <=
- [PATCH 6/6] yacc.c: push: undefine the pstate macros for the epilogue, Akim Demaille, 2020/03/03
- [PATCH 5/6] yacc.c: push: initialize the pstate variables in pstate_new, Akim Demaille, 2020/03/03