duplicates ntokens.
* src/bison.simple: Formatting/comment changes.
Use YYNTOKENS only, which is documented, but not YYNTBASE, which
is an undocumented synonym.
+2001-12-27 Akim Demaille <akim@epita.fr>
+
+ * src/output.c (prepare): Drop the muscle `ntbase' which
+ duplicates ntokens.
+ * src/bison.simple: Formatting/comment changes.
+ Use YYNTOKENS only, which is documented, but not YYNTBASE, which
+ is an undocumented synonym.
+
+
2001-12-22 Akim Demaille <akim@epita.fr>
* src/output.c (output_table_data): Change the prototype to use
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: German <de@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d Schiebe/Reduziere Konflikte"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduziere mit Regel %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\treduziere mit Regel %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treduziere mit Tegel %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\treduziere mit Regel %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
"Language-Team: Spanish <es@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d conflictos desplazamiento/reducción"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduce usando la regla %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\treduce usando la regla %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treduce usando la regla %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\treduce usando la regla %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28d\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 2001-08-29 17:06+02:00\n"
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d nihutamine/redutseerimine konflikti"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[redutseerin, kasutades reeglit %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\tredutseerin kasutades reeglit %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tredutseerin kasutades reeglit %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28d\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 2001-08-29 20:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d conflits décalage/réduction"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[réduction par la règle %d (%s)\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $défaut\tréduction par la règle %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tréduction par la règle %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $défaut\tréduction par la règle %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.28\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d ¥·¥Õ¥È/´Ô¸µ¾×ÆÍ"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[µ¬Â§ %d ¤òÍøÍѤ·¤Æ´Ô¸µ (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\tµ¬Â§ %d ¤òÍøÍѤ·¤Æ´Ô¸µ (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tµ¬Â§ %d ¤òÍøÍѤ·¤Æ´Ô¸µ (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tµ¬Â§ %d ¤òÍøÍѤ·¤Æ´Ô¸µ (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d verschuif/reduceer conflicten"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduceer gebruikt regel %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\treduce using rule %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr ""
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
"Language-Team: Russian <ru@li.org>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.30c\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 2001-11-18 15:17+0100\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.pp.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
msgstr[0] "förväntade %d skifta/reducerakonflikt"
msgstr[1] "förväntade %d skifta/reducerakonflikter"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reducera med regel %d (%s)]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $standard\treducera med regel %d (%s)\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treducera med regel %d (%s)\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $standard\treducera med regel %d (%s)\n"
msgid ""
msgstr ""
"Project-Id-Version: bison 1.28c\n"
-"POT-Creation-Date: 2001-12-17 18:27+0100\n"
+"POT-Creation-Date: 2001-12-22 17:25+0100\n"
"PO-Revision-Date: 2001-09-10 10:54GMT\n"
"Last-Translator: Altug Bayram <altugbayram_2000@yahoo.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d öteleme/indirgeme çeliþkisi"
-#: src/conflicts.c:451 src/conflicts.c:528
+#: src/conflicts.c:450 src/conflicts.c:527
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[indirgeme kural %d (%s)'i kullanýyor]\n"
-#: src/conflicts.c:455 src/print.c:147
+#: src/conflicts.c:454 src/print.c:147
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
" $default\tindirgeme kural %d (%s)'i kullanýyor\n"
"\n"
-#: src/conflicts.c:509 src/conflicts.c:522
+#: src/conflicts.c:508 src/conflicts.c:521
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tindirgeme kural %d (%s)'i kullanýyor\n"
-#: src/conflicts.c:538
+#: src/conflicts.c:537
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tindirgeme kural %d (%s)'i kullanýyor\n"
/* Tokens. */
%%tokendef
-#define YYFINAL %%final
-#define YYFLAG %%flag
-#define YYNTBASE %%ntbase
-#define YYLAST %%last
-
-#define YYNTOKENS %%ntokens
-#define YYNNTS %%nnts
-#define YYNRULES %%nrules
-#define YYNSTATES %%nstates
-#define YYMAXUTOK %%maxtok
-
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL %%final
+#define YYFLAG %%flag
+#define YYLAST %%last
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS %%ntokens
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS %%nnts
+/* YYNRULES -- Number of rules. */
+#define YYNRULES %%nrules
+/* YYNRULES -- Number of states. */
+#define YYNSTATES %%nstates
+#define YYMAXUTOK %%maxtok
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym)
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const char yytranslate[] =
{
%%translate
};
#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
static const short yyprhs[] =
{
%%prhs
};
+/* YYRHS -- A `0'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
%%rhs
#endif
#if (YYDEBUG) || YYERROR_VERBOSE
-/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
%%tname
%%defact
};
+/* YYPGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
%%defgoto
};
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const short yypact[] =
{
%%pact
};
+/* YYPGOTO[NTERM-NUM]. */
static const short yypgoto[] =
{
%%pgoto
};
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says. */
static const short yytable[] =
{
%%table
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
- yylval = (Value); \
+ yylval = (Value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ \
- yyerror ("syntax error: cannot back up"); \
+ yyerror ("syntax error: cannot back up"); \
YYERROR; \
} \
while (0)
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
MUSCLE_INSERT_INT ("debug", debug_flag);
MUSCLE_INSERT_INT ("final", final_state);
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
- MUSCLE_INSERT_INT ("ntbase", ntokens);
MUSCLE_INSERT_INT ("error-verbose", error_verbose);
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
for (i = ntokens; i < nsyms; i++)
/* don't make these for dummy nonterminals made by gensym. */
if (*tags[i] != '@')
- fprintf (out, "# define\tNT%s\t%d\n", tags[i], i);
+ fprintf (out, "# define NT%s\t%d\n", tags[i], i);
}
fprintf (out, "\n#endif /* not %s */\n", macro_name);
if (c != '\0')
continue;
- obstack_fgrow2 (&tokendefs, "# define\t%s\t%d\n",
+ obstack_fgrow2 (&tokendefs, "# define %s\t%d\n",
symbol, bp->user_token_number);
if (semantic_parser)
/* FIXME: This is probably wrong, and should be just as
above. --akim. */
- obstack_fgrow2 (&tokendefs, "# define\tT%s\t%d\n", symbol, bp->value);
+ obstack_fgrow2 (&tokendefs, "# define T%s\t%d\n", symbol, bp->value);
}
obstack_1grow (&tokendefs, 0);