* src/reader.c (readgram): Make sure rules for mid-rule actions

have a lineno equal to that of their host rule.
Reported by Hans Aberg.
* tests/regression.at (Rule Line Numbers): New.
This commit is contained in:
Akim Demaille
2001-11-26 15:24:06 +00:00
parent 6fedd4d1d6
commit 674fd9acbc
12 changed files with 379 additions and 228 deletions

View File

@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
"POT-Creation-Date: 2001-11-23 15:16+0100\n"
"POT-Creation-Date: 2001-11-26 16:23+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"
@@ -26,7 +26,7 @@ msgstr "
msgid "warning: "
msgstr "ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: "
#: src/complain.c:238 src/complain.c:279
#: src/complain.c:238
msgid "fatal error: "
msgstr "ÆÁÔÁÌØÎÁÑ ÏÛÉÂËÁ: "
@@ -72,37 +72,37 @@ msgstr "
#. If invoked with `--yacc', use the output format specified by
#. POSIX.
#: src/conflicts.c:460
#: src/conflicts.c:470
msgid "conflicts: "
msgstr "ËÏÎÆÌÉËÔÙ: "
#: src/conflicts.c:462
#: src/conflicts.c:472
#, c-format
msgid " %d shift/reduce"
msgstr " %d ÓÄ×ÉÇ/×Ù×ÏÄ"
#: src/conflicts.c:466
#: src/conflicts.c:476
#, c-format
msgid " %d reduce/reduce"
msgstr " %d ×Ù×ÏÄ/×Ù×ÏÄ"
#: src/conflicts.c:471 src/reduce.c:493
#: src/conflicts.c:481 src/reduce.c:493
#, c-format
msgid "%s contains "
msgstr "%s ÓÏÄÅÒÖÉÔ "
#: src/conflicts.c:480
#: src/conflicts.c:488
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:567 src/conflicts.c:688
#: src/conflicts.c:575 src/conflicts.c:696
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)]\n"
#: src/conflicts.c:579 src/print.c:156
#: src/conflicts.c:587 src/print.c:156
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -111,12 +111,12 @@ msgstr ""
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
#: src/conflicts.c:668 src/conflicts.c:682
#: src/conflicts.c:676 src/conflicts.c:690
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/conflicts.c:708
#: src/conflicts.c:716
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
@@ -570,69 +570,69 @@ msgstr "
msgid "rule given for %s, which is a token"
msgstr "ÐÒÁ×ÉÌÏ ÚÁÄÁÎÏ ÄÌÑ %s, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"
#: src/reader.c:1490
#: src/reader.c:1492
msgid "two @prec's in a row"
msgstr "Ä×Á @prec ÐÏÄÒÑÄ"
#: src/reader.c:1498
#: src/reader.c:1500
#, c-format
msgid "%%guard present but %%semantic_parser not specified"
msgstr "%%guard ÐÒÉÓÕÔÓÔ×ÕÅÔ, Á %%semantic_parser ÎÅ ÚÁÄÁÎ"
#: src/reader.c:1507
#: src/reader.c:1509
msgid "two actions at end of one rule"
msgstr "Ä×Á ÄÅÊÓÔ×ÉÑ × ËÏÎÃÅ ÏÄÎÏÇÏ ÐÒÁ×ÉÌÁ"
#: src/reader.c:1521
#: src/reader.c:1523
#, c-format
msgid "type clash (`%s' `%s') on default action"
msgstr "ËÏÎÆÌÉËÔ ÔÉÐÏ× (`%s' `%s') ÎÁ ÄÅÊÓÔ×ÉÉ ÐÏ ÕÍÏÌÞÁÎÉÀ"
#: src/reader.c:1527
#: src/reader.c:1529
msgid "empty rule for typed nonterminal, and no action"
msgstr ""
"ÐÕÓÔÏÅ ÐÒÁ×ÉÌÏ ÄÌÑ ÔÉÐÉÚÉÒÏ×ÁÎÎÏÇÏ ÎÅÔÅÒÍÉÎÁÌØÎÏÇÏ ÓÉÍ×ÏÌÁ, É ÎÅÔ ÄÅÊÓÔ×ÉÑ"
#: src/reader.c:1571
#: src/reader.c:1573
#, c-format
msgid "invalid input: %s"
msgstr "ÎÅ×ÅÒÎÙÅ ×ÈÏÄÎÙÅ ÄÁÎÎÙÅ: %s"
#: src/reader.c:1579
#: src/reader.c:1581
#, c-format
msgid "too many symbols (tokens plus nonterminals); maximum %d"
msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÉÍ×ÏÌÏ× (ÌÅËÓÅÍÙ ÐÌÀÓ ÎÅÔÅÒÍÉÎÁÌÙ); ÍÁËÓÉÍÁÌØÎÏ %d"
#: src/reader.c:1582
#: src/reader.c:1584
msgid "no rules in the input grammar"
msgstr "ÏÔÓÕÔÓÔ×ÕÀÔ ÐÒÁ×ÉÌÁ ×Ï ×ÈÏÄÎÏÊ ÇÒÁÍÍÁÔÉËÅ"
#: src/reader.c:1606
#: src/reader.c:1608
#, c-format
msgid "symbol %s is used, but is not defined as a token and has no rules"
msgstr "ÓÉÍ×ÏÌ %s ÉÓÐÏÌØÚÕÅÔÓÑ, ÎÏ ÎÅ ÏÐÒÅÄÅÌÅÎ ËÁË ÌÅËÓÅÍÁ É ÎÅ ÉÍÅÅÔ ÐÒÁ×ÉÌ"
#: src/reader.c:1741
#: src/reader.c:1743
#, c-format
msgid "tokens %s and %s both assigned number %d"
msgstr "ÏÂÅÉÍ ÌÅËÓÅÍÁÍ %s É %s ÐÒÉÓ×ÏÅÎ ÎÏÍÅÒ %d"
#: src/reader.c:1794
#: src/reader.c:1796
#, c-format
msgid "conflicting precedences for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÐÒÉÏÒÉÔÅÔÙ ÄÌÑ %s É %s"
#: src/reader.c:1806
#: src/reader.c:1808
#, c-format
msgid "conflicting assoc values for %s and %s"
msgstr "ÐÒÏÔÉ×ÏÒÅÞÉ×ÙÅ ÚÎÁÞÅÎÉÑ ÁÓÓÏÃÉÁÔÉ×ÎÏÓÔÉ ÄÌÑ %s É %s"
#: src/reader.c:1845
#: src/reader.c:1847
#, c-format
msgid "the start symbol %s is undefined"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s ÎÅÏÐÒÅÄÅÌÅÎ"
#: src/reader.c:1847
#: src/reader.c:1849
#, c-format
msgid "the start symbol %s is a token"
msgstr "ÎÁÞÁÌØÎÙÊ ÓÉÍ×ÏÌ %s Ñ×ÌÑÅÔÓÑ ÌÅËÓÅÍÏÊ"