]> git.saurik.com Git - bison.git/commitdiff
Remove `%thong' support as it is undocumented, unused, duplicates
authorAkim Demaille <akim@epita.fr>
Mon, 10 Jun 2002 08:37:30 +0000 (08:37 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 10 Jun 2002 08:37:30 +0000 (08:37 +0000)
`%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.

ChangeLog
src/lex.h
src/options.c
src/reader.c

index 45aaf92dcbddb9391433afccd347c0c1d71de550..19a390d9b7b05a2d4def51cc5cafd3f0539201ea 100644 (file)
--- a/ChangeLog
+++ b/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>
 
        * src/symtab.c, src/symtab.c (symbol_type_set)
index c379cad3c3176e522545765b80472556bd998fe4..4e93a1c5548256400036ab777986e9a48ff5a07d 100644 (file)
--- 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,
index afbae7cf874dce33a1236209db4f4d3a2e593b4f..73b77c06c784584a6cc43a2ea05986bea56a3749 100644 (file)
@@ -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)
index 70629837b215717c1d9d215c205975baae88fe7f..8447f904ce8e1135e45bd95c8a54737c49e84936 100644 (file)
@@ -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
 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;