mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-27 13:13:04 +00:00
yysyntax_error: prepare for readability of next patches.
These are purely whitespace changes that result in ugly code but that make the next couple of patches much easier to read. * data/glr.c (yyreportSyntaxError): Reindent. * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent. * data/lalr1.java (YYParser::yysyntax_error): Reindent. * data/yacc.c (yysyntax_error): Reindent.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2010-11-07 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
|
yysyntax_error: prepare for readability of next patches.
|
||||||
|
These are purely whitespace changes that result in ugly code
|
||||||
|
but that make the next couple of patches much easier to read.
|
||||||
|
* data/glr.c (yyreportSyntaxError): Reindent.
|
||||||
|
* data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
|
||||||
|
* data/lalr1.java (YYParser::yysyntax_error): Reindent.
|
||||||
|
* data/yacc.c (yysyntax_error): Reindent.
|
||||||
|
|
||||||
2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
|
2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
|
||||||
|
|
||||||
Fix memory leak.
|
Fix memory leak.
|
||||||
|
|||||||
@@ -983,8 +983,8 @@ b4_error_verbose_if([state_type yystate, int yytoken],
|
|||||||
if (yypact_ninf_ < yyn && yyn <= yylast_)
|
if (yypact_ninf_ < yyn && yyn <= yylast_)
|
||||||
{
|
{
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
YYCHECK. In other words, skip the first -YYN actions for this
|
YYCHECK. In other words, skip the first -YYN actions for
|
||||||
state because they are default actions. */
|
this state because they are default actions. */
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
|
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
|
|||||||
@@ -732,9 +732,10 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
{
|
{
|
||||||
StringBuffer res;
|
StringBuffer res;
|
||||||
|
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
/* Start YYX at -YYN if negative to avoid negative
|
||||||
YYCHECK. In other words, skip the first -YYN actions for this
|
indexes in YYCHECK. In other words, skip the first
|
||||||
state because they are default actions. */
|
-YYN actions for this state because they are default
|
||||||
|
actions. */
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
|
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
|
|||||||
@@ -931,8 +931,8 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||||
|
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
YYCHECK. In other words, skip the first -YYN actions for this
|
YYCHECK. In other words, skip the first -YYN actions for
|
||||||
state because they are default actions. */
|
this state because they are default actions. */
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
|
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
@@ -957,8 +957,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
}
|
}
|
||||||
yyarg[yycount++] = yytname[yyx];
|
yyarg[yycount++] = yytname[yyx];
|
||||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||||
if (! (yysize <= yysize1
|
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
|
||||||
{
|
{
|
||||||
/* Overflow. */
|
/* Overflow. */
|
||||||
*yymsg_alloc = 0;
|
*yymsg_alloc = 0;
|
||||||
|
|||||||
583
src/parse-gram.c
583
src/parse-gram.c
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
/* A Bison parser, made by GNU Bison 2.4.533-95aed. */
|
/* A Bison parser, made by GNU Bison 2.4.537-34db. */
|
||||||
|
|
||||||
/* Interface for Bison's Yacc-like parsers in C
|
/* Interface for Bison's Yacc-like parsers in C
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
/* "%code requires" blocks. */
|
/* "%code requires" blocks. */
|
||||||
/* Line 1658 of yacc.c */
|
/* Line 1663 of yacc.c */
|
||||||
#line 202 "src/parse-gram.y"
|
#line 202 "src/parse-gram.y"
|
||||||
|
|
||||||
# ifndef PARAM_TYPE
|
# ifndef PARAM_TYPE
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
/* Line 1658 of yacc.c */
|
/* Line 1663 of yacc.c */
|
||||||
#line 51 "src/parse-gram.h"
|
#line 51 "src/parse-gram.h"
|
||||||
|
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
typedef union YYSTYPE
|
typedef union YYSTYPE
|
||||||
{
|
{
|
||||||
/* Line 1658 of yacc.c */
|
/* Line 1663 of yacc.c */
|
||||||
#line 88 "src/parse-gram.y"
|
#line 88 "src/parse-gram.y"
|
||||||
|
|
||||||
assoc assoc;
|
assoc assoc;
|
||||||
@@ -188,13 +188,13 @@ typedef union YYSTYPE
|
|||||||
uniqstr uniqstr;
|
uniqstr uniqstr;
|
||||||
unsigned char character;
|
unsigned char character;
|
||||||
|
|
||||||
/* Line 1658 of yacc.c */
|
/* Line 1663 of yacc.c */
|
||||||
#line 226 "src/parse-gram.y"
|
#line 226 "src/parse-gram.y"
|
||||||
|
|
||||||
param_type param;
|
param_type param;
|
||||||
|
|
||||||
|
|
||||||
/* Line 1658 of yacc.c */
|
/* Line 1663 of yacc.c */
|
||||||
#line 199 "src/parse-gram.h"
|
#line 199 "src/parse-gram.h"
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
|
|||||||
Reference in New Issue
Block a user