Rename <!> to <>. Discussed starting at

<http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
* NEWS (2.3a+): Update.
* doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
Update.
* src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
* src/scan-gram.l (INITIAL): Implement.
* src/symlist.c (symbol_list_default_tagless_new): Update comment.
* src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
comment.
* tests/actions.at (Default tagless %printer and %destructor,
Default tagged and per-type %printer and %destructor,
Default %printer and %destructor are not for error or $undefined,
Default %printer and %destructor are not for $accept,
Default %printer and %destructor for mid-rule values): Update.
* tests/input.at (Default %printer and %destructor redeclared,
Unused values with default %destructor): Update.
This commit is contained in:
Joel E. Denny
2006-11-21 00:43:26 +00:00
parent 26b8a43805
commit 3ebecc240d
10 changed files with 69 additions and 49 deletions

View File

@@ -699,7 +699,7 @@ static const char *const yytname[] =
"\"%requires\"", "\"%skeleton\"", "\"%start\"", "\"%token-table\"",
"\"%verbose\"", "\"%yacc\"", "\"{...}\"", "\"char\"", "\"epilogue\"",
"\"=\"", "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"",
"\"%{...%}\"", "\";\"", "\"type\"", "\"<*>\"", "\"<!>\"", "\"%union\"",
"\"%{...%}\"", "\";\"", "\"type\"", "\"<*>\"", "\"<>\"", "\"%union\"",
"$accept", "input", "prologue_declarations", "prologue_declaration",
"grammar_declaration", "union_name", "symbol_declaration", "$@1", "$@2",
"precedence_declaration", "precedence_declarator", "type.opt",

View File

@@ -176,7 +176,7 @@ static int current_prec = 0;
%token SEMICOLON ";"
%token TYPE "type"
%token TYPE_TAG_ANY "<*>"
%token TYPE_TAG_NONE "<!>"
%token TYPE_TAG_NONE "<>"
%type <character> CHAR
%printer { fputs (char_name ($$), stderr); } CHAR
@@ -397,7 +397,7 @@ generic_symlist_item:
symbol { $$ = symbol_list_sym_new ($1, @1); }
| TYPE { $$ = symbol_list_type_new ($1, @1); }
| "<*>" { $$ = symbol_list_default_tagged_new (@1); }
| "<!>" { $$ = symbol_list_default_tagless_new (@1); }
| "<>" { $$ = symbol_list_default_tagless_new (@1); }
;
/* One token definition. */

View File

@@ -210,7 +210,7 @@ splice (\\[ \f\t\v]*\n)*
"|" return PIPE;
";" return SEMICOLON;
"<*>" return TYPE_TAG_ANY;
"<!>" return TYPE_TAG_NONE;
"<>" return TYPE_TAG_NONE;
{id} {
val->uniqstr = uniqstr_new (yytext);

View File

@@ -91,9 +91,9 @@ symbol_list_default_tagged_new (location loc)
}
/*----------------------------------------.
| Create a list containing a <!> at LOC. |
`----------------------------------------*/
/*---------------------------------------.
| Create a list containing a <> at LOC. |
`---------------------------------------*/
symbol_list *
symbol_list_default_tagless_new (location loc)

View File

@@ -30,7 +30,7 @@ typedef struct symbol_list
{
/**
* Whether this node contains a symbol, a semantic type, a \c <*>, or a
* \c <!>.
* \c <>.
*/
enum {
SYMLIST_SYMBOL, SYMLIST_TYPE,
@@ -81,7 +81,7 @@ symbol_list *symbol_list_type_new (uniqstr type_name, location loc);
/** Create a list containing a \c <*> at \c loc. */
symbol_list *symbol_list_default_tagged_new (location loc);
/** Create a list containing a \c <!> at \c loc. */
/** Create a list containing a \c <> at \c loc. */
symbol_list *symbol_list_default_tagless_new (location loc);
/** Print this list.