diff options
Diffstat (limited to 'src/cmd/rc/parse.c')
-rw-r--r-- | src/cmd/rc/parse.c | 203 |
1 files changed, 96 insertions, 107 deletions
diff --git a/src/cmd/rc/parse.c b/src/cmd/rc/parse.c index e57bf2e..7ff860e 100644 --- a/src/cmd/rc/parse.c +++ b/src/cmd/rc/parse.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -323,12 +323,18 @@ typedef int yy_state_fast_t; # define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -545,7 +551,7 @@ static const yytype_int8 yytranslate[] = }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 38, 38, 39, 42, 43, 46, 47, 50, 53, @@ -589,18 +595,6 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 41, 280, 281, 10, 94, - 36, 282, 283, 40, 123, 125, 59, 38, 61, 96 -}; -#endif - #define YYPACT_NINF (-44) #define yypact_value_is_default(Yyn) \ @@ -611,8 +605,8 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 124, -18, -16, -16, 19, 415, 447, 447, -44, 415, @@ -631,9 +625,9 @@ static const yytype_int16 yypact[] = -44, -44, -44, 267, -44, -8 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int8 yydefact[] = { 24, 0, 0, 0, 0, 0, 24, 24, 68, 0, @@ -652,7 +646,7 @@ static const yytype_int8 yydefact[] = 18, 39, 73, 24, 16, 0 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -44, -44, 77, -26, 98, 13, 26, -28, -44, -44, @@ -660,7 +654,7 @@ static const yytype_int8 yypgoto[] = -44, -43, -44, -30 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 18, 19, 56, 30, 20, 57, 58, 105, 127, @@ -668,9 +662,9 @@ static const yytype_uint8 yydefgoto[] = 47, 50, 55, 79 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 24, 80, 83, 78, 46, 63, 48, 49, 46, 68, @@ -777,8 +771,8 @@ static const yytype_int16 yycheck[] = 33, 34, -1, -1, -1, -1, 39 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int8 yystos[] = { 0, 3, 5, 6, 8, 11, 12, 13, 14, 15, @@ -797,7 +791,7 @@ static const yytype_int8 yystos[] = 50, 35, 36, 63, 47, 54 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { 0, 40, 41, 41, 42, 42, 43, 43, 44, 45, @@ -810,7 +804,7 @@ static const yytype_int8 yyr1[] = 62, 62, 62, 63, 63 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 2, 1, 2, 1, 2, 3, 3, @@ -832,6 +826,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -872,10 +867,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -902,10 +894,6 @@ yy_symbol_value_print (FILE *yyo, YY_USE (yyoutput); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END @@ -1360,6 +1348,7 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -1385,7 +1374,7 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -1413,7 +1402,7 @@ yysetstate: # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -1424,7 +1413,7 @@ yysetstate: YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -1446,6 +1435,7 @@ yysetstate: } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -1560,293 +1550,293 @@ yyreduce: case 2: /* rc: %empty */ #line 38 "src/cmd/rc/syntax.y" { return 0; } -#line 1564 "src/cmd/rc/parse.c" +#line 1554 "src/cmd/rc/parse.c" break; case 3: /* rc: line '\n' */ #line 39 "src/cmd/rc/syntax.y" { return compile((yyvsp[-1].tree)); } -#line 1570 "src/cmd/rc/parse.c" +#line 1560 "src/cmd/rc/parse.c" break; case 5: /* line: cmds line */ #line 43 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(';', (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1576 "src/cmd/rc/parse.c" +#line 1566 "src/cmd/rc/parse.c" break; case 7: /* body: cmdsln body */ #line 47 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(';', (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1582 "src/cmd/rc/parse.c" +#line 1572 "src/cmd/rc/parse.c" break; case 8: /* paren: '(' body ')' */ #line 50 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tparen, (yyvsp[-1].tree)); } -#line 1588 "src/cmd/rc/parse.c" +#line 1578 "src/cmd/rc/parse.c" break; case 9: /* block: '{' body '}' */ #line 53 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tblock, (yyvsp[-1].tree)); } -#line 1594 "src/cmd/rc/parse.c" +#line 1584 "src/cmd/rc/parse.c" break; case 11: /* cmds: cmd '&' */ #line 57 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1('&', (yyvsp[-1].tree)); } -#line 1600 "src/cmd/rc/parse.c" +#line 1590 "src/cmd/rc/parse.c" break; case 14: /* ifbody: cmd */ #line 64 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Tif, nil, (yyvsp[0].tree)); } -#line 1606 "src/cmd/rc/parse.c" +#line 1596 "src/cmd/rc/parse.c" break; case 15: /* ifbody: block Telse nl cmd */ #line 65 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree3(Tif, nil, (yyvsp[-3].tree), (yyvsp[-2].tree)); } -#line 1612 "src/cmd/rc/parse.c" +#line 1602 "src/cmd/rc/parse.c" break; case 16: /* case: Tcase words ';' nl cmdsln */ #line 68 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-4].tree), (yyvsp[-3].tree), 0, (yyvsp[0].tree), 1);} -#line 1618 "src/cmd/rc/parse.c" +#line 1608 "src/cmd/rc/parse.c" break; case 17: /* casebody: %empty */ #line 71 "src/cmd/rc/syntax.y" { (yyval.tree) = nil; } -#line 1624 "src/cmd/rc/parse.c" +#line 1614 "src/cmd/rc/parse.c" break; case 18: /* casebody: case casebody */ #line 72 "src/cmd/rc/syntax.y" { (yyval.tree) = (!(yyvsp[0].tree)) ? (yyvsp[-1].tree) : maketree2(';', (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1630 "src/cmd/rc/parse.c" +#line 1620 "src/cmd/rc/parse.c" break; case 19: /* assign: executable '=' word */ #line 75 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2('=', (yyvsp[-2].tree), (yyvsp[0].tree)); } -#line 1636 "src/cmd/rc/parse.c" +#line 1626 "src/cmd/rc/parse.c" break; case 21: /* redir: Tredir word */ #line 79 "src/cmd/rc/syntax.y" - { (yyval.tree) = hangchild1((yyvsp[-1].tree), (yyvsp[0].tree), 0); } -#line 1642 "src/cmd/rc/parse.c" + { (yyval.tree) = hangchild1((yyvsp[-1].tree), ((yyvsp[-1].tree)->redir.type == Rhere)?heredoc((yyvsp[0].tree)):(yyvsp[0].tree), 0); } +#line 1632 "src/cmd/rc/parse.c" break; case 22: /* epilog: %empty */ #line 82 "src/cmd/rc/syntax.y" { (yyval.tree) = nil; } -#line 1648 "src/cmd/rc/parse.c" +#line 1638 "src/cmd/rc/parse.c" break; case 23: /* epilog: redir epilog */ #line 83 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild1((yyvsp[-1].tree), (yyvsp[0].tree), 1); } -#line 1654 "src/cmd/rc/parse.c" +#line 1644 "src/cmd/rc/parse.c" break; case 24: /* cmd: %empty */ #line 86 "src/cmd/rc/syntax.y" { (yyval.tree) = nil; } -#line 1660 "src/cmd/rc/parse.c" +#line 1650 "src/cmd/rc/parse.c" break; case 25: /* cmd: basic */ #line 87 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tbasic, (yyvsp[0].tree)); } -#line 1666 "src/cmd/rc/parse.c" +#line 1656 "src/cmd/rc/parse.c" break; case 26: /* cmd: block epilog */ #line 88 "src/cmd/rc/syntax.y" { (yyval.tree) = hangepilog((yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1672 "src/cmd/rc/parse.c" +#line 1662 "src/cmd/rc/parse.c" break; case 27: /* cmd: cmd Tpipe nl cmd */ #line 89 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-2].tree), (yyvsp[-3].tree), 0, (yyvsp[0].tree), 1); } -#line 1678 "src/cmd/rc/parse.c" +#line 1668 "src/cmd/rc/parse.c" break; case 28: /* cmd: cmd Tandand nl cmd */ #line 90 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Tandand, (yyvsp[-3].tree), (yyvsp[0].tree)); } -#line 1684 "src/cmd/rc/parse.c" +#line 1674 "src/cmd/rc/parse.c" break; case 29: /* cmd: cmd Toror nl cmd */ #line 91 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Toror, (yyvsp[-3].tree), (yyvsp[0].tree)); } -#line 1690 "src/cmd/rc/parse.c" +#line 1680 "src/cmd/rc/parse.c" break; case 30: /* cmd: redir cmd */ #line 92 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild1((yyvsp[-1].tree), (yyvsp[0].tree), 1); } -#line 1696 "src/cmd/rc/parse.c" +#line 1686 "src/cmd/rc/parse.c" break; case 31: /* cmd: assign cmd */ #line 93 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild1((yyvsp[-1].tree), (yyvsp[0].tree), 2); } -#line 1702 "src/cmd/rc/parse.c" +#line 1692 "src/cmd/rc/parse.c" break; case 32: /* cmd: Tbang cmd */ #line 94 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tbang, (yyvsp[0].tree)); } -#line 1708 "src/cmd/rc/parse.c" +#line 1698 "src/cmd/rc/parse.c" break; case 33: /* cmd: Tsubshell cmd */ #line 95 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tsubshell, (yyvsp[0].tree)); } -#line 1714 "src/cmd/rc/parse.c" +#line 1704 "src/cmd/rc/parse.c" break; case 34: /* cmd: Ttwiddle word words */ #line 96 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-2].tree), (yyvsp[-1].tree), 0, (yyvsp[0].tree), 1); } -#line 1720 "src/cmd/rc/parse.c" +#line 1710 "src/cmd/rc/parse.c" break; case 35: /* cmd: Tfor '(' word ')' nl cmd */ #line 97 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild3((yyvsp[-5].tree), (yyvsp[-3].tree), nil, (yyvsp[0].tree)); } -#line 1726 "src/cmd/rc/parse.c" +#line 1716 "src/cmd/rc/parse.c" break; case 36: /* cmd: Tfor '(' word Tin words ')' nl cmd */ #line 98 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild3((yyvsp[-7].tree), (yyvsp[-5].tree), (yyvsp[-3].tree), (yyvsp[0].tree)); } -#line 1732 "src/cmd/rc/parse.c" +#line 1722 "src/cmd/rc/parse.c" break; case 37: /* cmd: Twhile paren nl cmd */ #line 99 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-3].tree), (yyvsp[-2].tree), 0, (yyvsp[0].tree), 1); } -#line 1738 "src/cmd/rc/parse.c" +#line 1728 "src/cmd/rc/parse.c" break; case 38: /* cmd: Tif paren nl ifbody */ #line 100 "src/cmd/rc/syntax.y" - { (yyval.tree) = hangchild1((yyvsp[-2].tree), (yyvsp[-2].tree), 0); } -#line 1744 "src/cmd/rc/parse.c" + { (yyval.tree) = hangchild1((yyvsp[0].tree), (yyvsp[-2].tree), 0); } +#line 1734 "src/cmd/rc/parse.c" break; case 39: /* cmd: Tswitch '(' word ')' nl '{' nl casebody '}' */ #line 101 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-8].tree), (yyvsp[-6].tree), 0, (yyvsp[-1].tree), 1); } -#line 1750 "src/cmd/rc/parse.c" +#line 1740 "src/cmd/rc/parse.c" break; case 40: /* cmd: Tfunc words block */ #line 102 "src/cmd/rc/syntax.y" { (yyval.tree) = hangchild2((yyvsp[-2].tree), (yyvsp[-1].tree), 0, (yyvsp[0].tree), 1); } -#line 1756 "src/cmd/rc/parse.c" +#line 1746 "src/cmd/rc/parse.c" break; case 42: /* basic: basic word */ #line 106 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Targs, (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1762 "src/cmd/rc/parse.c" +#line 1752 "src/cmd/rc/parse.c" break; case 43: /* basic: basic redir */ #line 107 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Targs, (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1768 "src/cmd/rc/parse.c" +#line 1758 "src/cmd/rc/parse.c" break; case 45: /* atom: keyword */ #line 111 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tword, (yyvsp[0].tree)); } -#line 1774 "src/cmd/rc/parse.c" +#line 1764 "src/cmd/rc/parse.c" break; case 47: /* word: word '^' atom */ #line 115 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2('^', (yyvsp[-2].tree), (yyvsp[0].tree)); } -#line 1780 "src/cmd/rc/parse.c" +#line 1770 "src/cmd/rc/parse.c" break; case 49: /* executable: executable '^' atom */ #line 119 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2('^', (yyvsp[-2].tree), (yyvsp[0].tree)); } -#line 1786 "src/cmd/rc/parse.c" +#line 1776 "src/cmd/rc/parse.c" break; case 51: /* nonkeyword: '$' atom */ #line 123 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1('$', (yyvsp[0].tree)); } -#line 1792 "src/cmd/rc/parse.c" +#line 1782 "src/cmd/rc/parse.c" break; case 52: /* nonkeyword: '$' atom Tindex words ')' */ #line 124 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Tindex, (yyvsp[-3].tree), (yyvsp[-1].tree)); } -#line 1798 "src/cmd/rc/parse.c" +#line 1788 "src/cmd/rc/parse.c" break; case 53: /* nonkeyword: '(' wordsnl ')' */ #line 125 "src/cmd/rc/syntax.y" { (yyval.tree) = (yyvsp[-1].tree); } -#line 1804 "src/cmd/rc/parse.c" +#line 1794 "src/cmd/rc/parse.c" break; case 54: /* nonkeyword: Tcount atom */ #line 126 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tcount, (yyvsp[0].tree)); } -#line 1810 "src/cmd/rc/parse.c" +#line 1800 "src/cmd/rc/parse.c" break; case 55: /* nonkeyword: Tjoin atom */ #line 127 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1(Tjoin, (yyvsp[0].tree)); } -#line 1816 "src/cmd/rc/parse.c" +#line 1806 "src/cmd/rc/parse.c" break; case 56: /* nonkeyword: '`' block */ #line 128 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree1('`', (yyvsp[0].tree)); } -#line 1822 "src/cmd/rc/parse.c" +#line 1812 "src/cmd/rc/parse.c" break; case 68: /* words: %empty */ #line 135 "src/cmd/rc/syntax.y" { (yyval.tree) = nil; } -#line 1828 "src/cmd/rc/parse.c" +#line 1818 "src/cmd/rc/parse.c" break; case 69: /* words: words word */ #line 136 "src/cmd/rc/syntax.y" { (yyval.tree) = maketree2(Twords, (yyvsp[-1].tree), (yyvsp[0].tree)); } -#line 1834 "src/cmd/rc/parse.c" +#line 1824 "src/cmd/rc/parse.c" break; case 70: /* wordsnl: %empty */ #line 139 "src/cmd/rc/syntax.y" { (yyval.tree) = nil; } -#line 1840 "src/cmd/rc/parse.c" +#line 1830 "src/cmd/rc/parse.c" break; case 72: /* wordsnl: wordsnl word */ #line 141 "src/cmd/rc/syntax.y" {(yyval.tree) = (!(yyvsp[-1].tree)) ? ((!(yyvsp[0].tree)) ? nil : (yyvsp[0].tree)) : ((!(yyvsp[0].tree)) ? (yyvsp[-1].tree) : maketree2(Twords, (yyvsp[-1].tree), (yyvsp[0].tree))); } -#line 1846 "src/cmd/rc/parse.c" +#line 1836 "src/cmd/rc/parse.c" break; -#line 1850 "src/cmd/rc/parse.c" +#line 1840 "src/cmd/rc/parse.c" default: break; } @@ -1922,7 +1912,7 @@ yyerrlab: } yyerror (yymsgp); if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; + YYNOMEM; } } @@ -1958,6 +1948,7 @@ yyerrorlab: label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -2018,7 +2009,7 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -2026,24 +2017,22 @@ yyacceptlab: `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at |