bison-patches
[Top][All Lists]
Advanced

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

yy_token_number_type and yyr1


From: Paul Hilfinger
Subject: yy_token_number_type and yyr1
Date: Thu, 16 May 2002 16:30:02 -0700

yy_token_number_type is not big enough for yyr1, since the former 
encompasses only translations of terminal symbols.  When I change
yyr1, there is only one definition of yy_token_number_type.  I suggest
that it might be removed.

OK to commit?

Paul Hilfinger

----------------------------------------------------------------------

2002-05-16  Paul Hilfinger  <address@hidden>

        * data/bison.simple (yyr1): Don't use yy_token_number_type as element
        type; it isn't always big enough, since it doesn't necessarily
        include non-terminals.
        * yytranslate: Expand definition of yy_token_number_type, so that 
        the latter can be removed.
        * yy_token_number_type: Remove, only one use.

Index: bison-1_5.8/data/bison.simple
--- bison-1_5.8/data/bison.simple Sun, 12 May 2002 19:40:04 -0700 hilfingr 
(glrbison/37_bison.simp 1.4 644)
+++ 2.30(w)/data/bison.simple Thu, 16 May 2002 15:52:57 -0700 hilfingr 
(glrbison/37_bison.simp 1.6 644)
@@ -332,12 +332,11 @@
 #define YYUNDEFTOK  b4_undef_token_number
 #define YYMAXUTOK   b4_user_token_number_max
 
-typedef b4_uint_type(b4_translate_max) yy_token_number_type;
 #define YYTRANSLATE(X) \
   ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK)
 
 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX.  */
-static const yy_token_number_type yytranslate[[]] =
+static const b4_uint_type(b4_translate_max) yytranslate[[]] =
 {
   b4_translate
 };
@@ -379,7 +378,7 @@
 };
 
 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives.  */
-static const yy_token_number_type yyr1[[]] =
+static const b4_uint_type(b4_r1_max) yyr1[[]] =
 {
   b4_r1
 };



reply via email to

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