mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +00:00
Remove `%thong' support as it is undocumented, unused, duplicates
`%token's job, and creates useless e-mail traffic with people who want to know what it is, why it is undocumented, unused, and duplicates `%token's job. * src/reader.c (parse_thong_decl): Remove. * src/options.c (option_table): Remove "thong". * src/lex.h (tok_thong): Remove.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
|||||||
|
2002-06-10 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
Remove `%thong' support as it is undocumented, unused, duplicates
|
||||||
|
`%token's job, and creates useless e-mail traffic with people who
|
||||||
|
want to know what it is, why it is undocumented, unused, and
|
||||||
|
duplicates `%token's job.
|
||||||
|
|
||||||
|
* src/reader.c (parse_thong_decl): Remove.
|
||||||
|
* src/options.c (option_table): Remove "thong".
|
||||||
|
* src/lex.h (tok_thong): Remove.
|
||||||
|
|
||||||
2002-06-10 Akim Demaille <akim@epita.fr>
|
2002-06-10 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/symtab.c, src/symtab.c (symbol_type_set)
|
* src/symtab.c, src/symtab.c (symbol_type_set)
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ typedef enum token_e
|
|||||||
tok_typename,
|
tok_typename,
|
||||||
tok_number,
|
tok_number,
|
||||||
tok_expect,
|
tok_expect,
|
||||||
tok_thong,
|
|
||||||
tok_define,
|
tok_define,
|
||||||
tok_skel,
|
tok_skel,
|
||||||
tok_noop,
|
tok_noop,
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ const struct option_table_s option_table[] =
|
|||||||
DRTV ("type", no, NULL, tok_type)
|
DRTV ("type", no, NULL, tok_type)
|
||||||
DRTV ("union", no, NULL, tok_union)
|
DRTV ("union", no, NULL, tok_union)
|
||||||
DRTV ("expect", no, NULL, tok_expect)
|
DRTV ("expect", no, NULL, tok_expect)
|
||||||
DRTV ("thong", no, NULL, tok_thong)
|
|
||||||
DRTV ("start", no, NULL, tok_start)
|
DRTV ("start", no, NULL, tok_start)
|
||||||
DRTV ("left", no, NULL, tok_left)
|
DRTV ("left", no, NULL, tok_left)
|
||||||
DRTV ("right", no, NULL, tok_right)
|
DRTV ("right", no, NULL, tok_right)
|
||||||
|
|||||||
81
src/reader.c
81
src/reader.c
@@ -800,83 +800,6 @@ parse_expect_decl (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------.
|
|
||||||
| Parse what comes after %thong. the full syntax is |
|
|
||||||
| |
|
|
||||||
| %thong <type> token number literal |
|
|
||||||
| |
|
|
||||||
| the <type> or number may be omitted. The number specifies the |
|
|
||||||
| user_token_number. |
|
|
||||||
| |
|
|
||||||
| Two symbols are entered in the table, one for the token symbol and |
|
|
||||||
| one for the literal. Both are given the <type>, if any, from the |
|
|
||||||
| declaration. The ->user_token_number of the first is |
|
|
||||||
| USER_NUMBER_ALIAS and the ->user_token_number of the second is set |
|
|
||||||
| to the number, if any, from the declaration. The two symbols are |
|
|
||||||
| linked via pointers in their ->alias fields. |
|
|
||||||
| |
|
|
||||||
| During OUTPUT_DEFINES_TABLE, the symbol is reported thereafter, |
|
|
||||||
| only the literal string is retained it is the literal string that |
|
|
||||||
| is output to yytname |
|
|
||||||
`-------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
parse_thong_decl (void)
|
|
||||||
{
|
|
||||||
token_t token;
|
|
||||||
symbol_t *symbol;
|
|
||||||
char *typename = 0;
|
|
||||||
int usrtoknum = USER_NUMBER_UNDEFINED;
|
|
||||||
|
|
||||||
token = lex (); /* fetch typename or first token */
|
|
||||||
if (token == tok_typename)
|
|
||||||
{
|
|
||||||
typename = xstrdup (token_buffer);
|
|
||||||
token = lex (); /* fetch first token */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* process first token */
|
|
||||||
|
|
||||||
if (token != tok_identifier)
|
|
||||||
{
|
|
||||||
complain (_("unrecognized item %s, expected an identifier"),
|
|
||||||
token_buffer);
|
|
||||||
skip_to_char ('%');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
symval->class = token_sym;
|
|
||||||
symval->type_name = typename;
|
|
||||||
symval->user_token_number = USER_NUMBER_ALIAS;
|
|
||||||
symbol = symval;
|
|
||||||
|
|
||||||
token = lex (); /* get number or literal string */
|
|
||||||
|
|
||||||
if (token == tok_number)
|
|
||||||
{
|
|
||||||
usrtoknum = numval;
|
|
||||||
token = lex (); /* okay, did number, now get literal */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* process literal string token */
|
|
||||||
|
|
||||||
if (token != tok_identifier || *symval->tag != '\"')
|
|
||||||
{
|
|
||||||
complain (_("expected string constant instead of %s"), token_buffer);
|
|
||||||
skip_to_char ('%');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
symval->class = token_sym;
|
|
||||||
symval->type_name = typename;
|
|
||||||
symval->user_token_number = usrtoknum;
|
|
||||||
|
|
||||||
symval->alias = symbol;
|
|
||||||
symbol->alias = symval;
|
|
||||||
|
|
||||||
/* symbol and symval combined are only one symbol. */
|
|
||||||
nsyms--;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_muscle_decl (void)
|
parse_muscle_decl (void)
|
||||||
{
|
{
|
||||||
@@ -1022,10 +945,6 @@ read_declarations (void)
|
|||||||
parse_expect_decl ();
|
parse_expect_decl ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case tok_thong:
|
|
||||||
parse_thong_decl ();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case tok_left:
|
case tok_left:
|
||||||
parse_assoc_decl (left_assoc);
|
parse_assoc_decl (left_assoc);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user