From: Akim Demaille Date: Mon, 10 Jun 2002 08:37:30 +0000 (+0000) Subject: Remove `%thong' support as it is undocumented, unused, duplicates X-Git-Tag: BISON-1_49b~200 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/8b9f2372c70b91359921b4967275b02b83cdc110 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. --- diff --git a/ChangeLog b/ChangeLog index 45aaf92d..19a390d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-06-10 Akim Demaille + + 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 * src/symtab.c, src/symtab.c (symbol_type_set) diff --git a/src/lex.h b/src/lex.h index c379cad3..4e93a1c5 100644 --- a/src/lex.h +++ b/src/lex.h @@ -46,7 +46,6 @@ typedef enum token_e tok_typename, tok_number, tok_expect, - tok_thong, tok_define, tok_skel, tok_noop, diff --git a/src/options.c b/src/options.c index afbae7cf..73b77c06 100644 --- a/src/options.c +++ b/src/options.c @@ -87,7 +87,6 @@ const struct option_table_s option_table[] = DRTV ("type", no, NULL, tok_type) DRTV ("union", no, NULL, tok_union) DRTV ("expect", no, NULL, tok_expect) - DRTV ("thong", no, NULL, tok_thong) DRTV ("start", no, NULL, tok_start) DRTV ("left", no, NULL, tok_left) DRTV ("right", no, NULL, tok_right) diff --git a/src/reader.c b/src/reader.c index 70629837..8447f904 100644 --- a/src/reader.c +++ b/src/reader.c @@ -800,83 +800,6 @@ parse_expect_decl (void) } -/*-------------------------------------------------------------------. -| Parse what comes after %thong. the full syntax is | -| | -| %thong token number literal | -| | -| the 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 , 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 parse_muscle_decl (void) { @@ -1022,10 +945,6 @@ read_declarations (void) parse_expect_decl (); break; - case tok_thong: - parse_thong_decl (); - break; - case tok_left: parse_assoc_decl (left_assoc); break;