bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03-thong-out.patch


From: Akim Demaille
Subject: 03-thong-out.patch
Date: Sun, 09 Jun 2002 19:15:42 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        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.

Index: src/lex.h
--- src/lex.h Sat, 25 May 2002 18:16:05 +0200 akim
+++ src/lex.h Sun, 09 Jun 2002 16:07:58 +0200 akim
@@ -46,7 +46,6 @@
     tok_typename,
     tok_number,
     tok_expect,
-    tok_thong,
     tok_define,
     tok_skel,
     tok_noop,
Index: src/options.c
--- src/options.c Sat, 25 May 2002 18:16:05 +0200 akim
+++ src/options.c Sun, 09 Jun 2002 16:07:52 +0200 akim
@@ -87,7 +87,6 @@
   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: src/reader.c
--- src/reader.c Sun, 09 Jun 2002 16:07:13 +0200 akim
+++ src/reader.c Sun, 09 Jun 2002 16:07:41 +0200 akim
@@ -800,83 +800,6 @@
 }


-/*-------------------------------------------------------------------.
-| 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)
 {
@@ -1020,10 +943,6 @@

            case tok_expect:
              parse_expect_decl ();
-             break;
-
-           case tok_thong:
-             parse_thong_decl ();
              break;

            case tok_left:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]