mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
style: address syntax-check diagnostics
* examples/c/glr/c++-types.y: Formatting changes. * po/POTFILES.in: Add missing files. * src/reader.c: Remove useless include. * tests/calc.at: Avoid magic values for exit. Obfuscate calls to error.
This commit is contained in:
@@ -295,4 +295,3 @@ stmtMerge (YYSTYPE x0, YYSTYPE x1)
|
|||||||
{
|
{
|
||||||
return new_nterm ("<OR>(%s,%s)", x0, x1, NULL);
|
return new_nterm ("<OR>(%s,%s)", x0, x1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ src/main.c
|
|||||||
src/muscle-tab.c
|
src/muscle-tab.c
|
||||||
src/parse-gram.y
|
src/parse-gram.y
|
||||||
src/print-graph.c
|
src/print-graph.c
|
||||||
|
src/print-xml.c
|
||||||
src/print.c
|
src/print.c
|
||||||
src/reader.c
|
src/reader.c
|
||||||
src/reduce.c
|
src/reduce.c
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <c-ctype.h>
|
|
||||||
#include <quote.h>
|
#include <quote.h>
|
||||||
#include <vasnprintf.h>
|
#include <vasnprintf.h>
|
||||||
|
|
||||||
@@ -349,7 +348,7 @@ grammar_rule_check_and_complete (symbol_list *r)
|
|||||||
const symbol *start = r->next->next->content.sym;
|
const symbol *start = r->next->next->content.sym;
|
||||||
if (start->content->type_name)
|
if (start->content->type_name)
|
||||||
obstack_printf (obstack_for_actions,
|
obstack_printf (obstack_for_actions,
|
||||||
"{ ]b4_accept([%s%d])[; }",
|
"{ ]b4_accept""([%s%d])[; }",
|
||||||
start->content->class == nterm_sym ? "orig " : "",
|
start->content->class == nterm_sym ? "orig " : "",
|
||||||
start->content->number);
|
start->content->number);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -84,6 +84,10 @@ int global_count = 0;
|
|||||||
/* Total number of errors. */
|
/* Total number of errors. */
|
||||||
int global_nerrs = 0;
|
int global_nerrs = 0;
|
||||||
|
|
||||||
|
#ifndef EX_NOINPUT
|
||||||
|
# define EX_NOINPUT 66
|
||||||
|
#endif
|
||||||
|
|
||||||
static FILE *
|
static FILE *
|
||||||
open_file (const char *file)
|
open_file (const char *file)
|
||||||
{
|
{
|
||||||
@@ -91,7 +95,7 @@ open_file (const char *file)
|
|||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
perror (file);
|
perror (file);
|
||||||
exit (3);
|
exit (EX_NOINPUT);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -424,14 +428,14 @@ exp:
|
|||||||
{
|
{
|
||||||
YYLTYPE old_yylloc = yylloc;
|
YYLTYPE old_yylloc = yylloc;
|
||||||
yylloc = @3;
|
yylloc = @3;
|
||||||
yyerror (]AT_PARAM_IF([result, count, nerrs, ])["error: null divisor");
|
yyerr][or (]AT_PARAM_IF([result, count, nerrs, ])["error: null divisor");
|
||||||
yylloc = old_yylloc;
|
yylloc = old_yylloc;
|
||||||
}
|
}
|
||||||
]])[
|
]])[
|
||||||
}]],
|
}]],
|
||||||
[c++], [[
|
[c++], [[
|
||||||
{
|
{
|
||||||
]AT_GLR_IF([[yyparser.]])[error (]AT_LOCATION_IF([[@3, ]])["error: null divisor");
|
]AT_GLR_IF([[yyparser.]])[err][or (]AT_LOCATION_IF([[@3, ]])["error: null divisor");
|
||||||
}]])[
|
}]])[
|
||||||
else
|
else
|
||||||
$$ = $1 / $3;
|
$$ = $1 / $3;
|
||||||
|
|||||||
Reference in New Issue
Block a user