mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Minor code cleanup.
* src/parse-gram.y: Clean up sorting of declarations. Use types to simplify %printer declarations where possible. Provide %printer for BRACKETED_ID and symbol.prec. * src/symtab.c: Whitespace change.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2009-10-04 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
Minor code cleanup.
|
||||
* src/parse-gram.y: Clean up sorting of declarations.
|
||||
Use types to simplify %printer declarations where possible.
|
||||
Provide %printer for BRACKETED_ID and symbol.prec.
|
||||
* src/symtab.c: Whitespace change.
|
||||
|
||||
2009-10-04 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
tests: skip tests of file names that platform does not support.
|
||||
|
||||
666
src/parse-gram.c
666
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.425-305c-dirty. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.434-7439c. */
|
||||
|
||||
/* Interface for Bison's Yacc-like parsers in C
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
version 2.2 of Bison. */
|
||||
/* "%code requires" blocks. */
|
||||
/* Line 1624 of yacc.c */
|
||||
#line 201 "src/parse-gram.y"
|
||||
#line 202 "src/parse-gram.y"
|
||||
|
||||
# ifndef PARAM_TYPE
|
||||
# define PARAM_TYPE
|
||||
@@ -94,19 +94,19 @@
|
||||
PERCENT_VERBOSE = 293,
|
||||
PERCENT_YACC = 294,
|
||||
BRACED_CODE = 295,
|
||||
CHAR = 296,
|
||||
EPILOGUE = 297,
|
||||
EQUAL = 298,
|
||||
ID = 299,
|
||||
ID_COLON = 300,
|
||||
PERCENT_PERCENT = 301,
|
||||
PIPE = 302,
|
||||
PROLOGUE = 303,
|
||||
SEMICOLON = 304,
|
||||
TAG = 305,
|
||||
TAG_ANY = 306,
|
||||
TAG_NONE = 307,
|
||||
BRACKETED_ID = 308,
|
||||
BRACKETED_ID = 296,
|
||||
CHAR = 297,
|
||||
EPILOGUE = 298,
|
||||
EQUAL = 299,
|
||||
ID = 300,
|
||||
ID_COLON = 301,
|
||||
PERCENT_PERCENT = 302,
|
||||
PIPE = 303,
|
||||
PROLOGUE = 304,
|
||||
SEMICOLON = 305,
|
||||
TAG = 306,
|
||||
TAG_ANY = 307,
|
||||
TAG_NONE = 308,
|
||||
PERCENT_PARAM = 309,
|
||||
PERCENT_UNION = 310
|
||||
};
|
||||
@@ -151,19 +151,19 @@
|
||||
#define PERCENT_VERBOSE 293
|
||||
#define PERCENT_YACC 294
|
||||
#define BRACED_CODE 295
|
||||
#define CHAR 296
|
||||
#define EPILOGUE 297
|
||||
#define EQUAL 298
|
||||
#define ID 299
|
||||
#define ID_COLON 300
|
||||
#define PERCENT_PERCENT 301
|
||||
#define PIPE 302
|
||||
#define PROLOGUE 303
|
||||
#define SEMICOLON 304
|
||||
#define TAG 305
|
||||
#define TAG_ANY 306
|
||||
#define TAG_NONE 307
|
||||
#define BRACKETED_ID 308
|
||||
#define BRACKETED_ID 296
|
||||
#define CHAR 297
|
||||
#define EPILOGUE 298
|
||||
#define EQUAL 299
|
||||
#define ID 300
|
||||
#define ID_COLON 301
|
||||
#define PERCENT_PERCENT 302
|
||||
#define PIPE 303
|
||||
#define PROLOGUE 304
|
||||
#define SEMICOLON 305
|
||||
#define TAG 306
|
||||
#define TAG_ANY 307
|
||||
#define TAG_NONE 308
|
||||
#define PERCENT_PARAM 309
|
||||
#define PERCENT_UNION 310
|
||||
|
||||
@@ -187,7 +187,7 @@ typedef union YYSTYPE
|
||||
unsigned char character;
|
||||
|
||||
/* Line 1624 of yacc.c */
|
||||
#line 225 "src/parse-gram.y"
|
||||
#line 226 "src/parse-gram.y"
|
||||
|
||||
param_type param;
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ static char const *char_name (char);
|
||||
;
|
||||
|
||||
%token BRACED_CODE "{...}"
|
||||
%token BRACKETED_ID "[identifier]"
|
||||
%token CHAR "char"
|
||||
%token EPILOGUE "epilogue"
|
||||
%token EQUAL "="
|
||||
@@ -163,7 +164,6 @@ static char const *char_name (char);
|
||||
%token TAG "<tag>"
|
||||
%token TAG_ANY "<*>"
|
||||
%token TAG_NONE "<>"
|
||||
%token BRACKETED_ID "[identifier]"
|
||||
|
||||
%type <character> CHAR
|
||||
%printer { fputs (char_name ($$), stderr); } CHAR
|
||||
@@ -177,22 +177,23 @@ static char const *char_name (char);
|
||||
%printer { fprintf (stderr, "{\n%s\n}", $$); }
|
||||
braceless content.opt "{...}" "%{...%}" EPILOGUE
|
||||
|
||||
%type <uniqstr> TAG ID ID_COLON BRACKETED_ID PERCENT_FLAG variable
|
||||
%type <named_ref> named_ref.opt
|
||||
%printer { fputs ($$, stderr); } ID variable
|
||||
%type <uniqstr> BRACKETED_ID ID ID_COLON PERCENT_FLAG TAG variable
|
||||
%printer { fputs ($$, stderr); } <uniqstr>
|
||||
%printer { fprintf (stderr, "[%s]", $$); } BRACKETED_ID
|
||||
%printer { fprintf (stderr, "%s:", $$); } ID_COLON
|
||||
%printer { fprintf (stderr, "%%%s", $$); } PERCENT_FLAG
|
||||
%printer { fprintf (stderr, "<%s>", $$); } TAG
|
||||
|
||||
%type <integer> INT
|
||||
%printer { fprintf (stderr, "%d", $$); } INT
|
||||
%printer { fprintf (stderr, "%d", $$); } <integer>
|
||||
|
||||
%type <symbol> id id_colon symbol symbol.prec string_as_id
|
||||
%printer { fprintf (stderr, "%s", $$->tag); } id symbol string_as_id
|
||||
%type <symbol> id id_colon string_as_id symbol symbol.prec
|
||||
%printer { fprintf (stderr, "%s", $$->tag); } <symbol>
|
||||
%printer { fprintf (stderr, "%s:", $$->tag); } id_colon
|
||||
|
||||
%type <assoc> precedence_declarator
|
||||
%type <list> symbols.1 symbols.prec generic_symlist generic_symlist_item
|
||||
%type <named_ref> named_ref.opt
|
||||
|
||||
/*---------.
|
||||
| %param. |
|
||||
|
||||
@@ -489,7 +489,7 @@ static inline void
|
||||
symbol_check_alias_consistency (symbol *this)
|
||||
{
|
||||
symbol *sym = this;
|
||||
symbol *str = this->alias;
|
||||
symbol *str = this->alias;
|
||||
|
||||
/* Check only the symbol in the symbol-string pair. */
|
||||
if (!(this->alias
|
||||
|
||||
Reference in New Issue
Block a user