Index: src/cmd/gc/y.tab.c |
=================================================================== |
--- a/src/cmd/gc/y.tab.c |
+++ b/src/cmd/gc/y.tab.c |
@@ -1,21 +1,24 @@ |
-/* A Bison parser, made by GNU Bison 2.6.5. */ |
- |
-/* Bison implementation for Yacc-like parsers in C |
- |
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. |
- |
- This program is free software: you can redistribute it and/or modify |
+/* A Bison parser, made by GNU Bison 2.3. */ |
+ |
+/* Skeleton implementation for Bison's Yacc-like parsers in C |
+ |
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
+ Free Software Foundation, Inc. |
+ |
+ This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
- the Free Software Foundation, either version 3 of the License, or |
- (at your option) any later version. |
- |
+ the Free Software Foundation; either version 2, or (at your option) |
+ any later version. |
+ |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
- |
+ |
You should have received a copy of the GNU General Public License |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
+ along with this program; if not, write to the Free Software |
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, |
+ Boston, MA 02110-1301, USA. */ |
/* As a special exception, you may create a larger work that contains |
part or all of the Bison parser skeleton and distribute that work |
@@ -26,7 +29,7 @@ |
special exception, which will cause the skeleton and the resulting |
Bison output files to be licensed under the GNU General Public |
License without this special exception. |
- |
+ |
This special exception was added by the Free Software Foundation in |
version 2.2 of Bison. */ |
@@ -44,7 +47,7 @@ |
#define YYBISON 1 |
/* Bison version. */ |
-#define YYBISON_VERSION "2.6.5" |
+#define YYBISON_VERSION "2.3" |
/* Skeleton name. */ |
#define YYSKELETON_NAME "yacc.c" |
@@ -52,56 +55,10 @@ |
/* Pure parsers. */ |
#define YYPURE 0 |
-/* Push parsers. */ |
-#define YYPUSH 0 |
- |
-/* Pull parsers. */ |
-#define YYPULL 1 |
- |
- |
- |
- |
-/* Copy the first part of user declarations. */ |
-/* Line 360 of yacc.c */ |
-#line 20 "go.y" |
- |
-#include <u.h> |
-#include <stdio.h> /* if we don't, bison will, and go.h re-#defines getc */ |
-#include <libc.h> |
-#include "go.h" |
- |
-static void fixlbrace(int); |
- |
-/* Line 360 of yacc.c */ |
-#line 77 "y.tab.c" |
- |
-# ifndef YY_NULL |
-# if defined __cplusplus && 201103L <= __cplusplus |
-# define YY_NULL nullptr |
-# else |
-# define YY_NULL 0 |
-# endif |
-# endif |
- |
-/* Enabling verbose error messages. */ |
-#ifdef YYERROR_VERBOSE |
-# undef YYERROR_VERBOSE |
-# define YYERROR_VERBOSE 1 |
-#else |
-# define YYERROR_VERBOSE 1 |
-#endif |
- |
-/* In a future release of Bison, this section will be replaced |
- by #include "y.tab.h". */ |
-#ifndef YY_YY_Y_TAB_H_INCLUDED |
-# define YY_YY_Y_TAB_H_INCLUDED |
-/* Enabling traces. */ |
-#ifndef YYDEBUG |
-# define YYDEBUG 0 |
-#endif |
-#if YYDEBUG |
-extern int yydebug; |
-#endif |
+/* Using locations. */ |
+#define YYLSP_NEEDED 0 |
+ |
+ |
/* Tokens. */ |
#ifndef YYTOKENTYPE |
@@ -213,50 +170,62 @@ |
+ |
+/* Copy the first part of user declarations. */ |
+#line 20 "go.y" |
+ |
+#include <u.h> |
+#include <stdio.h> /* if we don't, bison will, and go.h re-#defines getc */ |
+#include <libc.h> |
+#include "go.h" |
+ |
+static void fixlbrace(int); |
+ |
+ |
+/* Enabling traces. */ |
+#ifndef YYDEBUG |
+# define YYDEBUG 0 |
+#endif |
+ |
+/* Enabling verbose error messages. */ |
+#ifdef YYERROR_VERBOSE |
+# undef YYERROR_VERBOSE |
+# define YYERROR_VERBOSE 1 |
+#else |
+# define YYERROR_VERBOSE 1 |
+#endif |
+ |
+/* Enabling the token table. */ |
+#ifndef YYTOKEN_TABLE |
+# define YYTOKEN_TABLE 0 |
+#endif |
+ |
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
typedef union YYSTYPE |
+#line 28 "go.y" |
{ |
-/* Line 376 of yacc.c */ |
-#line 28 "go.y" |
- |
Node* node; |
NodeList* list; |
Type* type; |
Sym* sym; |
struct Val val; |
int i; |
- |
- |
-/* Line 376 of yacc.c */ |
-#line 232 "y.tab.c" |
-} YYSTYPE; |
-# define YYSTYPE_IS_TRIVIAL 1 |
+} |
+/* Line 193 of yacc.c. */ |
+#line 216 "y.tab.c" |
+ YYSTYPE; |
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
# define YYSTYPE_IS_DECLARED 1 |
+# define YYSTYPE_IS_TRIVIAL 1 |
#endif |
-extern YYSTYPE yylval; |
- |
-#ifdef YYPARSE_PARAM |
-#if defined __STDC__ || defined __cplusplus |
-int yyparse (void *YYPARSE_PARAM); |
-#else |
-int yyparse (); |
-#endif |
-#else /* ! YYPARSE_PARAM */ |
-#if defined __STDC__ || defined __cplusplus |
-int yyparse (void); |
-#else |
-int yyparse (); |
-#endif |
-#endif /* ! YYPARSE_PARAM */ |
- |
-#endif /* !YY_YY_Y_TAB_H_INCLUDED */ |
+ |
/* Copy the second part of user declarations. */ |
-/* Line 379 of yacc.c */ |
-#line 260 "y.tab.c" |
+ |
+/* Line 216 of yacc.c. */ |
+#line 229 "y.tab.c" |
#ifdef short |
# undef short |
@@ -309,36 +278,36 @@ |
# if defined YYENABLE_NLS && YYENABLE_NLS |
# if ENABLE_NLS |
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
+# define YY_(msgid) dgettext ("bison-runtime", msgid) |
# endif |
# endif |
# ifndef YY_ |
-# define YY_(Msgid) Msgid |
+# define YY_(msgid) msgid |
# endif |
#endif |
/* Suppress unused-variable warnings by "using" E. */ |
#if ! defined lint || defined __GNUC__ |
-# define YYUSE(E) ((void) (E)) |
+# define YYUSE(e) ((void) (e)) |
#else |
-# define YYUSE(E) /* empty */ |
+# define YYUSE(e) /* empty */ |
#endif |
/* Identity function, used to suppress warnings about constant conditions. */ |
#ifndef lint |
-# define YYID(N) (N) |
+# define YYID(n) (n) |
#else |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|| defined __cplusplus || defined _MSC_VER) |
static int |
-YYID (int yyi) |
+YYID (int i) |
#else |
static int |
-YYID (yyi) |
- int yyi; |
+YYID (i) |
+ int i; |
#endif |
{ |
- return yyi; |
+ return i; |
} |
#endif |
@@ -359,12 +328,11 @@ |
# define alloca _alloca |
# else |
# define YYSTACK_ALLOC alloca |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
|| defined __cplusplus || defined _MSC_VER) |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
-# ifndef EXIT_SUCCESS |
-# define EXIT_SUCCESS 0 |
+# ifndef _STDLIB_H |
+# define _STDLIB_H 1 |
# endif |
# endif |
# endif |
@@ -387,24 +355,24 @@ |
# ifndef YYSTACK_ALLOC_MAXIMUM |
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
# endif |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
+# if (defined __cplusplus && ! defined _STDLIB_H \ |
&& ! ((defined YYMALLOC || defined malloc) \ |
&& (defined YYFREE || defined free))) |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
-# ifndef EXIT_SUCCESS |
-# define EXIT_SUCCESS 0 |
+# ifndef _STDLIB_H |
+# define _STDLIB_H 1 |
# endif |
# endif |
# ifndef YYMALLOC |
# define YYMALLOC malloc |
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
|| defined __cplusplus || defined _MSC_VER) |
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
# endif |
# endif |
# ifndef YYFREE |
# define YYFREE free |
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
|| defined __cplusplus || defined _MSC_VER) |
void free (void *); /* INFRINGES ON USER NAME SPACE */ |
# endif |
@@ -420,9 +388,9 @@ |
/* A type that is properly aligned for any stack member. */ |
union yyalloc |
{ |
- yytype_int16 yyss_alloc; |
- YYSTYPE yyvs_alloc; |
-}; |
+ yytype_int16 yyss; |
+ YYSTYPE yyvs; |
+ }; |
/* The size of the maximum gap between one aligned stack and the next. */ |
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
@@ -433,19 +401,35 @@ |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
+ YYSTACK_GAP_MAXIMUM) |
-# define YYCOPY_NEEDED 1 |
+/* Copy COUNT objects from FROM to TO. The source and destination do |
+ not overlap. */ |
+# ifndef YYCOPY |
+# if defined __GNUC__ && 1 < __GNUC__ |
+# define YYCOPY(To, From, Count) \ |
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
+# else |
+# define YYCOPY(To, From, Count) \ |
+ do \ |
+ { \ |
+ YYSIZE_T yyi; \ |
+ for (yyi = 0; yyi < (Count); yyi++) \ |
+ (To)[yyi] = (From)[yyi]; \ |
+ } \ |
+ while (YYID (0)) |
+# endif |
+# endif |
/* Relocate STACK from its old location to the new one. The |
local variables YYSIZE and YYSTACKSIZE give the old and new number of |
elements in the stack, and YYPTR gives the new location of the |
stack. Advance YYPTR to a properly aligned location for the next |
stack. */ |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
+# define YYSTACK_RELOCATE(Stack) \ |
do \ |
{ \ |
YYSIZE_T yynewbytes; \ |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
- Stack = &yyptr->Stack_alloc; \ |
+ YYCOPY (&yyptr->Stack, Stack, yysize); \ |
+ Stack = &yyptr->Stack; \ |
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
yyptr += yynewbytes / sizeof (*yyptr); \ |
} \ |
@@ -453,26 +437,6 @@ |
#endif |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
- not overlap. */ |
-# ifndef YYCOPY |
-# if defined __GNUC__ && 1 < __GNUC__ |
-# define YYCOPY(Dst, Src, Count) \ |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
-# else |
-# define YYCOPY(Dst, Src, Count) \ |
- do \ |
- { \ |
- YYSIZE_T yyi; \ |
- for (yyi = 0; yyi < (Count); yyi++) \ |
- (Dst)[yyi] = (Src)[yyi]; \ |
- } \ |
- while (YYID (0)) |
-# endif |
-# endif |
-#endif /* !YYCOPY_NEEDED */ |
- |
/* YYFINAL -- State number of the termination state. */ |
#define YYFINAL 4 |
/* YYLAST -- Last index in YYTABLE. */ |
@@ -711,25 +675,25 @@ |
1121, 1122, 1128, 1129, 1130, 1131, 1132, 1138, 1139, 1142, |
1145, 1146, 1147, 1148, 1149, 1152, 1153, 1166, 1170, 1175, |
1180, 1185, 1189, 1190, 1193, 1199, 1206, 1212, 1219, 1225, |
- 1236, 1247, 1276, 1316, 1341, 1359, 1368, 1371, 1379, 1383, |
- 1387, 1394, 1400, 1405, 1417, 1420, 1429, 1430, 1436, 1437, |
- 1443, 1447, 1453, 1454, 1460, 1464, 1470, 1493, 1498, 1504, |
- 1510, 1517, 1526, 1535, 1550, 1556, 1561, 1565, 1572, 1585, |
- 1586, 1592, 1598, 1601, 1605, 1611, 1614, 1623, 1626, 1627, |
- 1631, 1632, 1638, 1639, 1640, 1641, 1642, 1644, 1643, 1658, |
- 1663, 1667, 1671, 1675, 1679, 1684, 1703, 1709, 1717, 1721, |
- 1727, 1731, 1737, 1741, 1747, 1751, 1760, 1764, 1768, 1772, |
- 1778, 1781, 1789, 1790, 1792, 1793, 1796, 1799, 1802, 1805, |
- 1808, 1811, 1814, 1817, 1820, 1823, 1826, 1829, 1832, 1835, |
- 1841, 1845, 1849, 1853, 1857, 1861, 1881, 1888, 1899, 1900, |
- 1901, 1904, 1905, 1908, 1912, 1922, 1926, 1930, 1934, 1938, |
- 1942, 1946, 1952, 1958, 1966, 1974, 1980, 1987, 2003, 2021, |
- 2025, 2031, 2034, 2037, 2041, 2051, 2055, 2070, 2078, 2079, |
- 2091, 2092, 2095, 2099, 2105, 2109, 2115, 2119 |
+ 1236, 1247, 1276, 1316, 1341, 1367, 1376, 1379, 1387, 1391, |
+ 1395, 1402, 1408, 1413, 1425, 1428, 1437, 1438, 1444, 1445, |
+ 1451, 1455, 1461, 1462, 1468, 1472, 1478, 1501, 1506, 1512, |
+ 1518, 1525, 1534, 1543, 1558, 1564, 1569, 1573, 1580, 1593, |
+ 1594, 1600, 1606, 1609, 1613, 1619, 1622, 1631, 1634, 1635, |
+ 1639, 1640, 1646, 1647, 1648, 1649, 1650, 1652, 1651, 1666, |
+ 1671, 1675, 1679, 1683, 1687, 1692, 1711, 1717, 1725, 1729, |
+ 1735, 1739, 1745, 1749, 1755, 1759, 1768, 1772, 1776, 1780, |
+ 1786, 1789, 1797, 1798, 1800, 1801, 1804, 1807, 1810, 1813, |
+ 1816, 1819, 1822, 1825, 1828, 1831, 1834, 1837, 1840, 1843, |
+ 1849, 1853, 1857, 1861, 1865, 1869, 1889, 1896, 1907, 1908, |
+ 1909, 1912, 1913, 1916, 1920, 1930, 1934, 1938, 1942, 1946, |
+ 1950, 1954, 1960, 1966, 1974, 1982, 1988, 1995, 2011, 2029, |
+ 2033, 2039, 2042, 2045, 2049, 2059, 2063, 2078, 2086, 2087, |
+ 2099, 2100, 2103, 2107, 2113, 2117, 2123, 2127 |
}; |
#endif |
-#if YYDEBUG || YYERROR_VERBOSE || 1 |
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
const char *yytname[] = |
@@ -744,28 +708,28 @@ |
"'/'", "'%'", "'&'", "NotPackage", "NotParen", "'('", "')'", |
"PreferToRightParen", "';'", "'.'", "'$'", "'='", "':'", "'{'", "'}'", |
"'!'", "'~'", "'['", "']'", "'?'", "'@'", "','", "$accept", "file", |
- "package", "loadsys", "$@1", "imports", "import", "import_stmt", |
+ "package", "loadsys", "@1", "imports", "import", "import_stmt", |
"import_stmt_list", "import_here", "import_package", "import_safety", |
- "import_there", "$@2", "xdcl", "common_dcl", "lconst", "vardcl", |
+ "import_there", "@2", "xdcl", "common_dcl", "lconst", "vardcl", |
"constdcl", "constdcl1", "typedclname", "typedcl", "simple_stmt", "case", |
- "compound_stmt", "$@3", "caseblock", "$@4", "caseblock_list", |
- "loop_body", "$@5", "range_stmt", "for_header", "for_body", "for_stmt", |
- "$@6", "if_header", "if_stmt", "$@7", "$@8", "$@9", "elseif", "$@10", |
- "elseif_list", "else", "switch_stmt", "$@11", "$@12", "select_stmt", |
- "$@13", "expr", "uexpr", "pseudocall", "pexpr_no_paren", "start_complit", |
- "keyval", "complitexpr", "pexpr", "expr_or_type", "name_or_type", |
- "lbrace", "new_name", "dcl_name", "onew_name", "sym", "hidden_importsym", |
- "name", "labelname", "dotdotdot", "ntype", "non_expr_type", |
- "non_recvchantype", "convtype", "comptype", "fnret_type", "dotname", |
- "othertype", "ptrtype", "recvchantype", "structtype", "interfacetype", |
- "xfndcl", "fndcl", "hidden_fndcl", "fntype", "fnbody", "fnres", |
- "fnlitdcl", "fnliteral", "xdcl_list", "vardcl_list", "constdcl_list", |
- "typedcl_list", "structdcl_list", "interfacedcl_list", "structdcl", |
- "packname", "embed", "interfacedcl", "indcl", "arg_type", |
- "arg_type_list", "oarg_type_list_ocomma", "stmt", "non_dcl_stmt", "$@14", |
- "stmt_list", "new_name_list", "dcl_name_list", "expr_list", |
- "expr_or_type_list", "keyval_list", "braced_keyval_list", "osemi", |
- "ocomma", "oexpr", "oexpr_list", "osimple_stmt", "ohidden_funarg_list", |
+ "compound_stmt", "@3", "caseblock", "@4", "caseblock_list", "loop_body", |
+ "@5", "range_stmt", "for_header", "for_body", "for_stmt", "@6", |
+ "if_header", "if_stmt", "@7", "@8", "@9", "elseif", "@10", "elseif_list", |
+ "else", "switch_stmt", "@11", "@12", "select_stmt", "@13", "expr", |
+ "uexpr", "pseudocall", "pexpr_no_paren", "start_complit", "keyval", |
+ "complitexpr", "pexpr", "expr_or_type", "name_or_type", "lbrace", |
+ "new_name", "dcl_name", "onew_name", "sym", "hidden_importsym", "name", |
+ "labelname", "dotdotdot", "ntype", "non_expr_type", "non_recvchantype", |
+ "convtype", "comptype", "fnret_type", "dotname", "othertype", "ptrtype", |
+ "recvchantype", "structtype", "interfacetype", "xfndcl", "fndcl", |
+ "hidden_fndcl", "fntype", "fnbody", "fnres", "fnlitdcl", "fnliteral", |
+ "xdcl_list", "vardcl_list", "constdcl_list", "typedcl_list", |
+ "structdcl_list", "interfacedcl_list", "structdcl", "packname", "embed", |
+ "interfacedcl", "indcl", "arg_type", "arg_type_list", |
+ "oarg_type_list_ocomma", "stmt", "non_dcl_stmt", "@14", "stmt_list", |
+ "new_name_list", "dcl_name_list", "expr_list", "expr_or_type_list", |
+ "keyval_list", "braced_keyval_list", "osemi", "ocomma", "oexpr", |
+ "oexpr_list", "osimple_stmt", "ohidden_funarg_list", |
"ohidden_structdcl_list", "ohidden_interfacedcl_list", "oliteral", |
"hidden_import", "hidden_pkg_importsym", "hidden_pkgtype", "hidden_type", |
"hidden_type_non_recv_chan", "hidden_type_misc", "hidden_type_recv_chan", |
@@ -773,7 +737,7 @@ |
"hidden_interfacedcl", "ohidden_funres", "hidden_funres", |
"hidden_literal", "hidden_constant", "hidden_import_list", |
"hidden_funarg_list", "hidden_structdcl_list", |
- "hidden_interfacedcl_list", YY_NULL |
+ "hidden_interfacedcl_list", 0 |
}; |
#endif |
@@ -873,8 +837,8 @@ |
0, 2, 1, 3, 1, 3, 1, 3 |
}; |
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
- Performed when YYTABLE doesn't specify something else to do. Zero |
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
means the default is an error. */ |
static const yytype_uint16 yydefact[] = |
{ |
@@ -1061,7 +1025,8 @@ |
/* 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 YYTABLE_NINF, syntax error. */ |
+ number is the opposite. If zero, do what YYDEFACT says. |
+ If YYTABLE_NINF, syntax error. */ |
#define YYTABLE_NINF -273 |
static const yytype_int16 yytable[] = |
{ |
@@ -1272,12 +1237,6 @@ |
0, 189, 190, 191, 192, 193, 194, 195, 196, 197 |
}; |
-#define yypact_value_is_default(Yystate) \ |
- (!!((Yystate) == (-459))) |
- |
-#define yytable_value_is_error(Yytable_value) \ |
- YYID (0) |
- |
static const yytype_int16 yycheck[] = |
{ |
5, 67, 142, 377, 37, 126, 61, 126, 143, 201, |
@@ -1571,50 +1530,78 @@ |
/* Like YYERROR except do call yyerror. This remains here temporarily |
to ease the transition to the new meaning of YYERROR, for GCC. |
- Once GCC version 2 has supplanted version 1, this can go. However, |
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
- discussed. */ |
+ Once GCC version 2 has supplanted version 1, this can go. */ |
#define YYFAIL goto yyerrlab |
-#if defined YYFAIL |
- /* This is here to suppress warnings from the GCC cpp's |
- -Wunused-macros. Normally we don't worry about that warning, but |
- some users do, and we want to make it easy for users to remove |
- YYFAIL uses, which will produce warnings from Bison 2.5. */ |
-#endif |
#define YYRECOVERING() (!!yyerrstatus) |
-#define YYBACKUP(Token, Value) \ |
-do \ |
- if (yychar == YYEMPTY) \ |
- { \ |
- yychar = (Token); \ |
- yylval = (Value); \ |
- YYPOPSTACK (yylen); \ |
- yystate = *yyssp; \ |
- goto yybackup; \ |
- } \ |
- else \ |
- { \ |
+#define YYBACKUP(Token, Value) \ |
+do \ |
+ if (yychar == YYEMPTY && yylen == 1) \ |
+ { \ |
+ yychar = (Token); \ |
+ yylval = (Value); \ |
+ yytoken = YYTRANSLATE (yychar); \ |
+ YYPOPSTACK (1); \ |
+ goto yybackup; \ |
+ } \ |
+ else \ |
+ { \ |
yyerror (YY_("syntax error: cannot back up")); \ |
YYERROR; \ |
} \ |
while (YYID (0)) |
-/* Error token number */ |
+ |
#define YYTERROR 1 |
#define YYERRCODE 256 |
-/* This macro is provided for backward compatibility. */ |
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
+ If N is 0, then set CURRENT to the empty location which ends |
+ the previous symbol: RHS[0] (always defined). */ |
+ |
+#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
+#ifndef YYLLOC_DEFAULT |
+# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
+ do \ |
+ if (YYID (N)) \ |
+ { \ |
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
+ } \ |
+ else \ |
+ { \ |
+ (Current).first_line = (Current).last_line = \ |
+ YYRHSLOC (Rhs, 0).last_line; \ |
+ (Current).first_column = (Current).last_column = \ |
+ YYRHSLOC (Rhs, 0).last_column; \ |
+ } \ |
+ while (YYID (0)) |
+#endif |
+ |
+ |
+/* YY_LOCATION_PRINT -- Print the location on the stream. |
+ This macro was not mandated originally: define only if we know |
+ we won't break user code: when these are the locations we know. */ |
+ |
#ifndef YY_LOCATION_PRINT |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
+# define YY_LOCATION_PRINT(File, Loc) \ |
+ fprintf (File, "%d.%d-%d.%d", \ |
+ (Loc).first_line, (Loc).first_column, \ |
+ (Loc).last_line, (Loc).last_column) |
+# else |
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
+# endif |
#endif |
/* YYLEX -- calling `yylex' with the right arguments. */ |
+ |
#ifdef YYLEX_PARAM |
# define YYLEX yylex (YYLEX_PARAM) |
#else |
@@ -1664,8 +1651,6 @@ |
YYSTYPE const * const yyvaluep; |
#endif |
{ |
- FILE *yyo = yyoutput; |
- YYUSE (yyo); |
if (!yyvaluep) |
return; |
# ifdef YYPRINT |
@@ -1715,20 +1700,17 @@ |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|| defined __cplusplus || defined _MSC_VER) |
static void |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
#else |
static void |
-yy_stack_print (yybottom, yytop) |
- yytype_int16 *yybottom; |
- yytype_int16 *yytop; |
+yy_stack_print (bottom, top) |
+ yytype_int16 *bottom; |
+ yytype_int16 *top; |
#endif |
{ |
YYFPRINTF (stderr, "Stack now"); |
- for (; yybottom <= yytop; yybottom++) |
- { |
- int yybot = *yybottom; |
- YYFPRINTF (stderr, " %d", yybot); |
- } |
+ for (; bottom <= top; ++bottom) |
+ YYFPRINTF (stderr, " %d", *bottom); |
YYFPRINTF (stderr, "\n"); |
} |
@@ -1762,11 +1744,11 @@ |
/* The symbols being reduced. */ |
for (yyi = 0; yyi < yynrhs; yyi++) |
{ |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
+ fprintf (stderr, " $%d = ", yyi + 1); |
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
&(yyvsp[(yyi + 1) - (yynrhs)]) |
); |
- YYFPRINTF (stderr, "\n"); |
+ fprintf (stderr, "\n"); |
} |
} |
@@ -1803,6 +1785,7 @@ |
# define YYMAXDEPTH 10000 |
#endif |
+ |
#if YYERROR_VERBOSE |
@@ -1905,142 +1888,115 @@ |
} |
# endif |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
- about the unexpected token YYTOKEN for the state stack whose top is |
- YYSSP. |
- |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
- not large enough to hold the message. In that case, also set |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
- required number of bytes is too large to store. */ |
-static int |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
- yytype_int16 *yyssp, int yytoken) |
+/* Copy into YYRESULT an error message about the unexpected token |
+ YYCHAR while in state YYSTATE. Return the number of bytes copied, |
+ including the terminating null byte. If YYRESULT is null, do not |
+ copy anything; just return the number of bytes that would be |
+ copied. As a special case, return 0 if an ordinary "syntax error" |
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
+ size calculation. */ |
+static YYSIZE_T |
+yysyntax_error (char *yyresult, int yystate, int yychar) |
{ |
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
- YYSIZE_T yysize = yysize0; |
- YYSIZE_T yysize1; |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
- /* Internationalized format string. */ |
- const char *yyformat = YY_NULL; |
- /* Arguments of yyformat. */ |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
- /* Number of reported tokens (one for the "unexpected", one per |
- "expected"). */ |
- int yycount = 0; |
- |
- /* There are many possibilities here to consider: |
- - Assume YYFAIL is not used. It's too flawed to consider. See |
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
- for details. YYERROR is fine as it does not invoke this |
- function. |
- - If this state is a consistent state with a default action, then |
- the only way this function was invoked is if the default action |
- is an error action. In that case, don't check for expected |
- tokens because there are none. |
- - The only way there can be no lookahead present (in yychar) is if |
- this state is a consistent state with a default action. Thus, |
- detecting the absence of a lookahead is sufficient to determine |
- that there is no unexpected or expected token to report. In that |
- case, just report a simple "syntax error". |
- - Don't assume there isn't a lookahead just because this state is a |
- consistent state with a default action. There might have been a |
- previous inconsistent state, consistent state with a non-default |
- action, or user semantic action that manipulated yychar. |
- - Of course, the expected token list depends on states to have |
- correct lookahead information, and it depends on the parser not |
- to perform extra reductions after fetching a lookahead from the |
- scanner and before detecting a syntax error. Thus, state merging |
- (from LALR or IELR) and default reductions corrupt the expected |
- token list. However, the list is correct for canonical LR with |
- one exception: it will still contain any token that will not be |
- accepted due to an error action in a later state. |
- */ |
- if (yytoken != YYEMPTY) |
- { |
- int yyn = yypact[*yyssp]; |
- yyarg[yycount++] = yytname[yytoken]; |
- if (!yypact_value_is_default (yyn)) |
- { |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
- YYCHECK. In other words, skip the first -YYN actions for |
- this state because they are default actions. */ |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
- /* Stay within bounds of both yycheck and yytname. */ |
- int yychecklim = YYLAST - yyn + 1; |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
- int yyx; |
- |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
- { |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
- { |
- yycount = 1; |
- yysize = yysize0; |
- break; |
- } |
- yyarg[yycount++] = yytname[yyx]; |
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
- if (! (yysize <= yysize1 |
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
- return 2; |
- yysize = yysize1; |
- } |
- } |
+ int yyn = yypact[yystate]; |
+ |
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
+ return 0; |
+ else |
+ { |
+ int yytype = YYTRANSLATE (yychar); |
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
+ YYSIZE_T yysize = yysize0; |
+ YYSIZE_T yysize1; |
+ int yysize_overflow = 0; |
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
+ int yyx; |
+ |
+# if 0 |
+ /* This is so xgettext sees the translatable formats that are |
+ constructed on the fly. */ |
+ YY_("syntax error, unexpected %s"); |
+ YY_("syntax error, unexpected %s, expecting %s"); |
+ YY_("syntax error, unexpected %s, expecting %s or %s"); |
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
+# endif |
+ char *yyfmt; |
+ char const *yyf; |
+ static char const yyunexpected[] = "syntax error, unexpected %s"; |
+ static char const yyexpecting[] = ", expecting %s"; |
+ static char const yyor[] = " or %s"; |
+ char yyformat[sizeof yyunexpected |
+ + sizeof yyexpecting - 1 |
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
+ * (sizeof yyor - 1))]; |
+ char const *yyprefix = yyexpecting; |
+ |
+ /* Start YYX at -YYN if negative to avoid negative indexes in |
+ YYCHECK. */ |
+ int yyxbegin = yyn < 0 ? -yyn : 0; |
+ |
+ /* Stay within bounds of both yycheck and yytname. */ |
+ int yychecklim = YYLAST - yyn + 1; |
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
+ int yycount = 1; |
+ |
+ yyarg[0] = yytname[yytype]; |
+ yyfmt = yystpcpy (yyformat, yyunexpected); |
+ |
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
+ { |
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
+ { |
+ yycount = 1; |
+ yysize = yysize0; |
+ yyformat[sizeof yyunexpected - 1] = '\0'; |
+ break; |
+ } |
+ yyarg[yycount++] = yytname[yyx]; |
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
+ yysize_overflow |= (yysize1 < yysize); |
+ yysize = yysize1; |
+ yyfmt = yystpcpy (yyfmt, yyprefix); |
+ yyprefix = yyor; |
+ } |
+ |
+ yyf = YY_(yyformat); |
+ yysize1 = yysize + yystrlen (yyf); |
+ yysize_overflow |= (yysize1 < yysize); |
+ yysize = yysize1; |
+ |
+ if (yysize_overflow) |
+ return YYSIZE_MAXIMUM; |
+ |
+ if (yyresult) |
+ { |
+ /* Avoid sprintf, as that infringes on the user's name space. |
+ Don't have undefined behavior even if the translation |
+ produced a string with the wrong number of "%s"s. */ |
+ char *yyp = yyresult; |
+ int yyi = 0; |
+ while ((*yyp = *yyf) != '\0') |
+ { |
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
+ { |
+ yyp += yytnamerr (yyp, yyarg[yyi++]); |
+ yyf += 2; |
+ } |
+ else |
+ { |
+ yyp++; |
+ yyf++; |
+ } |
+ } |
+ } |
+ return yysize; |
} |
- |
- switch (yycount) |
- { |
-# define YYCASE_(N, S) \ |
- case N: \ |
- yyformat = S; \ |
- break |
- YYCASE_(0, YY_("syntax error")); |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
-# undef YYCASE_ |
- } |
- |
- yysize1 = yysize + yystrlen (yyformat); |
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
- return 2; |
- yysize = yysize1; |
- |
- if (*yymsg_alloc < yysize) |
- { |
- *yymsg_alloc = 2 * yysize; |
- if (! (yysize <= *yymsg_alloc |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
- return 1; |
- } |
- |
- /* Avoid sprintf, as that infringes on the user's name space. |
- Don't have undefined behavior even if the translation |
- produced a string with the wrong number of "%s"s. */ |
- { |
- char *yyp = *yymsg; |
- int yyi = 0; |
- while ((*yyp = *yyformat) != '\0') |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
- { |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
- yyformat += 2; |
- } |
- else |
- { |
- yyp++; |
- yyformat++; |
- } |
- } |
- return 0; |
} |
#endif /* YYERROR_VERBOSE */ |
+ |
/*-----------------------------------------------. |
| Release the memory associated to this symbol. | |
@@ -2072,29 +2028,37 @@ |
break; |
} |
} |
- |
- |
- |
- |
-/* The lookahead symbol. */ |
+ |
+ |
+/* Prevent warnings from -Wmissing-prototypes. */ |
+ |
+#ifdef YYPARSE_PARAM |
+#if defined __STDC__ || defined __cplusplus |
+int yyparse (void *YYPARSE_PARAM); |
+#else |
+int yyparse (); |
+#endif |
+#else /* ! YYPARSE_PARAM */ |
+#if defined __STDC__ || defined __cplusplus |
+int yyparse (void); |
+#else |
+int yyparse (); |
+#endif |
+#endif /* ! YYPARSE_PARAM */ |
+ |
+ |
+ |
+/* The look-ahead symbol. */ |
int yychar, yystate; |
- |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
-#endif |
-#ifndef YY_INITIAL_VALUE |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
-#endif |
- |
-/* The semantic value of the lookahead symbol. */ |
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); |
+/* The semantic value of the look-ahead symbol. */ |
+YYSTYPE yylval; |
/* Number of syntax errors so far. */ |
int yynerrs; |
+ |
/*----------. |
| yyparse. | |
`----------*/ |
@@ -2121,36 +2085,13 @@ |
#endif |
#endif |
{ |
- /* Number of tokens to shift before error messages enabled. */ |
- int yyerrstatus; |
- |
- /* The stacks and their tools: |
- `yyss': related to states. |
- `yyvs': related to semantic values. |
- |
- Refer to the stacks through separate pointers, to allow yyoverflow |
- to reallocate them elsewhere. */ |
- |
- /* The state stack. */ |
- yytype_int16 yyssa[YYINITDEPTH]; |
- yytype_int16 *yyss; |
- yytype_int16 *yyssp; |
- |
- /* The semantic value stack. */ |
- YYSTYPE yyvsa[YYINITDEPTH]; |
- YYSTYPE *yyvs; |
- YYSTYPE *yyvsp; |
- |
- YYSIZE_T yystacksize; |
- |
+ |
int yyn; |
int yyresult; |
- /* Lookahead token as an internal (translated) token number. */ |
+ /* Number of tokens to shift before error messages enabled. */ |
+ int yyerrstatus; |
+ /* Look-ahead token as an internal (translated) token number. */ |
int yytoken = 0; |
- /* The variables used to return semantic value and location from the |
- action routines. */ |
- YYSTYPE yyval; |
- |
#if YYERROR_VERBOSE |
/* Buffer for error messages, and its allocated size. */ |
char yymsgbuf[128]; |
@@ -2158,22 +2099,54 @@ |
YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
#endif |
+ /* Three stacks and their tools: |
+ `yyss': related to states, |
+ `yyvs': related to semantic values, |
+ `yyls': related to locations. |
+ |
+ Refer to the stacks thru separate pointers, to allow yyoverflow |
+ to reallocate them elsewhere. */ |
+ |
+ /* The state stack. */ |
+ yytype_int16 yyssa[YYINITDEPTH]; |
+ yytype_int16 *yyss = yyssa; |
+ yytype_int16 *yyssp; |
+ |
+ /* The semantic value stack. */ |
+ YYSTYPE yyvsa[YYINITDEPTH]; |
+ YYSTYPE *yyvs = yyvsa; |
+ YYSTYPE *yyvsp; |
+ |
+ |
+ |
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
+ YYSIZE_T yystacksize = YYINITDEPTH; |
+ |
+ /* The variables used to return semantic value and location from the |
+ action routines. */ |
+ YYSTYPE yyval; |
+ |
+ |
/* The number of symbols on the RHS of the reduced rule. |
Keep to zero when no symbol should be popped. */ |
int yylen = 0; |
- yyssp = yyss = yyssa; |
- yyvsp = yyvs = yyvsa; |
- yystacksize = YYINITDEPTH; |
- |
YYDPRINTF ((stderr, "Starting parse\n")); |
yystate = 0; |
yyerrstatus = 0; |
yynerrs = 0; |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
+ yychar = YYEMPTY; /* Cause a token to be read. */ |
+ |
+ /* Initialize stack pointers. |
+ Waste one element of value and location stack |
+ so that they stay on the same level as the state stack. |
+ The wasted elements are never initialized. */ |
+ |
+ yyssp = yyss; |
+ yyvsp = yyvs; |
+ |
goto yysetstate; |
/*------------------------------------------------------------. |
@@ -2200,6 +2173,7 @@ |
YYSTYPE *yyvs1 = yyvs; |
yytype_int16 *yyss1 = yyss; |
+ |
/* Each stack pointer address is followed by the size of the |
data in use in that stack, in bytes. This used to be a |
conditional around just the two extra args, but that might |
@@ -2207,6 +2181,7 @@ |
yyoverflow (YY_("memory exhausted"), |
&yyss1, yysize * sizeof (*yyssp), |
&yyvs1, yysize * sizeof (*yyvsp), |
+ |
&yystacksize); |
yyss = yyss1; |
@@ -2229,8 +2204,9 @@ |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
if (! yyptr) |
goto yyexhaustedlab; |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
+ YYSTACK_RELOCATE (yyss); |
+ YYSTACK_RELOCATE (yyvs); |
+ |
# undef YYSTACK_RELOCATE |
if (yyss1 != yyssa) |
YYSTACK_FREE (yyss1); |
@@ -2241,6 +2217,7 @@ |
yyssp = yyss + yysize - 1; |
yyvsp = yyvs + yysize - 1; |
+ |
YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
(unsigned long int) yystacksize)); |
@@ -2250,9 +2227,6 @@ |
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
- if (yystate == YYFINAL) |
- YYACCEPT; |
- |
goto yybackup; |
/*-----------. |
@@ -2261,16 +2235,16 @@ |
yybackup: |
/* Do appropriate processing given the current state. Read a |
- lookahead token if we need one and don't already have one. */ |
- |
- /* First try to decide what to do without reference to lookahead token. */ |
+ look-ahead token if we need one and don't already have one. */ |
+ |
+ /* First try to decide what to do without reference to look-ahead token. */ |
yyn = yypact[yystate]; |
- if (yypact_value_is_default (yyn)) |
+ if (yyn == YYPACT_NINF) |
goto yydefault; |
- /* Not known => get a lookahead token if don't already have one. */ |
- |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
+ /* Not known => get a look-ahead token if don't already have one. */ |
+ |
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
if (yychar == YYEMPTY) |
{ |
YYDPRINTF ((stderr, "Reading a token: ")); |
@@ -2296,27 +2270,29 @@ |
yyn = yytable[yyn]; |
if (yyn <= 0) |
{ |
- if (yytable_value_is_error (yyn)) |
- goto yyerrlab; |
+ if (yyn == 0 || yyn == YYTABLE_NINF) |
+ goto yyerrlab; |
yyn = -yyn; |
goto yyreduce; |
} |
+ if (yyn == YYFINAL) |
+ YYACCEPT; |
+ |
/* Count tokens shifted since error; after three, turn off error |
status. */ |
if (yyerrstatus) |
yyerrstatus--; |
- /* Shift the lookahead token. */ |
+ /* Shift the look-ahead token. */ |
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
- /* Discard the shifted token. */ |
- yychar = YYEMPTY; |
+ /* Discard the shifted token unless it is eof. */ |
+ if (yychar != YYEOF) |
+ yychar = YYEMPTY; |
yystate = yyn; |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
*++yyvsp = yylval; |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
goto yynewstate; |
@@ -2353,7 +2329,6 @@ |
switch (yyn) |
{ |
case 2: |
-/* Line 1778 of yacc.c */ |
#line 128 "go.y" |
{ |
xtop = concat(xtop, (yyvsp[(4) - (4)].list)); |
@@ -2361,7 +2336,6 @@ |
break; |
case 3: |
-/* Line 1778 of yacc.c */ |
#line 134 "go.y" |
{ |
prevlineno = lineno; |
@@ -2372,7 +2346,6 @@ |
break; |
case 4: |
-/* Line 1778 of yacc.c */ |
#line 141 "go.y" |
{ |
mkpackage((yyvsp[(2) - (3)].sym)->name); |
@@ -2380,7 +2353,6 @@ |
break; |
case 5: |
-/* Line 1778 of yacc.c */ |
#line 151 "go.y" |
{ |
importpkg = runtimepkg; |
@@ -2394,7 +2366,6 @@ |
break; |
case 6: |
-/* Line 1778 of yacc.c */ |
#line 162 "go.y" |
{ |
importpkg = nil; |
@@ -2402,7 +2373,6 @@ |
break; |
case 12: |
-/* Line 1778 of yacc.c */ |
#line 176 "go.y" |
{ |
Pkg *ipkg; |
@@ -2439,7 +2409,6 @@ |
break; |
case 13: |
-/* Line 1778 of yacc.c */ |
#line 209 "go.y" |
{ |
// When an invalid import path is passed to importfile, |
@@ -2452,7 +2421,6 @@ |
break; |
case 16: |
-/* Line 1778 of yacc.c */ |
#line 224 "go.y" |
{ |
// import with original name |
@@ -2463,7 +2431,6 @@ |
break; |
case 17: |
-/* Line 1778 of yacc.c */ |
#line 231 "go.y" |
{ |
// import with given name |
@@ -2474,7 +2441,6 @@ |
break; |
case 18: |
-/* Line 1778 of yacc.c */ |
#line 238 "go.y" |
{ |
// import into my name space |
@@ -2485,7 +2451,6 @@ |
break; |
case 19: |
-/* Line 1778 of yacc.c */ |
#line 247 "go.y" |
{ |
if(importpkg->name == nil) { |
@@ -2501,7 +2466,6 @@ |
break; |
case 21: |
-/* Line 1778 of yacc.c */ |
#line 261 "go.y" |
{ |
if(strcmp((yyvsp[(1) - (1)].sym)->name, "safe") == 0) |
@@ -2510,7 +2474,6 @@ |
break; |
case 22: |
-/* Line 1778 of yacc.c */ |
#line 267 "go.y" |
{ |
defercheckwidth(); |
@@ -2518,7 +2481,6 @@ |
break; |
case 23: |
-/* Line 1778 of yacc.c */ |
#line 271 "go.y" |
{ |
resumecheckwidth(); |
@@ -2527,7 +2489,6 @@ |
break; |
case 24: |
-/* Line 1778 of yacc.c */ |
#line 280 "go.y" |
{ |
yyerror("empty top-level declaration"); |
@@ -2536,7 +2497,6 @@ |
break; |
case 26: |
-/* Line 1778 of yacc.c */ |
#line 286 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
@@ -2544,7 +2504,6 @@ |
break; |
case 27: |
-/* Line 1778 of yacc.c */ |
#line 290 "go.y" |
{ |
yyerror("non-declaration statement outside function body"); |
@@ -2553,7 +2512,6 @@ |
break; |
case 28: |
-/* Line 1778 of yacc.c */ |
#line 295 "go.y" |
{ |
(yyval.list) = nil; |
@@ -2561,7 +2519,6 @@ |
break; |
case 29: |
-/* Line 1778 of yacc.c */ |
#line 301 "go.y" |
{ |
(yyval.list) = (yyvsp[(2) - (2)].list); |
@@ -2569,7 +2526,6 @@ |
break; |
case 30: |
-/* Line 1778 of yacc.c */ |
#line 305 "go.y" |
{ |
(yyval.list) = (yyvsp[(3) - (5)].list); |
@@ -2577,7 +2533,6 @@ |
break; |
case 31: |
-/* Line 1778 of yacc.c */ |
#line 309 "go.y" |
{ |
(yyval.list) = nil; |
@@ -2585,7 +2540,6 @@ |
break; |
case 32: |
-/* Line 1778 of yacc.c */ |
#line 313 "go.y" |
{ |
(yyval.list) = (yyvsp[(2) - (2)].list); |
@@ -2595,7 +2549,6 @@ |
break; |
case 33: |
-/* Line 1778 of yacc.c */ |
#line 319 "go.y" |
{ |
(yyval.list) = (yyvsp[(3) - (5)].list); |
@@ -2605,7 +2558,6 @@ |
break; |
case 34: |
-/* Line 1778 of yacc.c */ |
#line 325 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(3) - (7)].list), (yyvsp[(5) - (7)].list)); |
@@ -2615,7 +2567,6 @@ |
break; |
case 35: |
-/* Line 1778 of yacc.c */ |
#line 331 "go.y" |
{ |
(yyval.list) = nil; |
@@ -2624,7 +2575,6 @@ |
break; |
case 36: |
-/* Line 1778 of yacc.c */ |
#line 336 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(2) - (2)].node)); |
@@ -2632,7 +2582,6 @@ |
break; |
case 37: |
-/* Line 1778 of yacc.c */ |
#line 340 "go.y" |
{ |
(yyval.list) = (yyvsp[(3) - (5)].list); |
@@ -2640,7 +2589,6 @@ |
break; |
case 38: |
-/* Line 1778 of yacc.c */ |
#line 344 "go.y" |
{ |
(yyval.list) = nil; |
@@ -2648,7 +2596,6 @@ |
break; |
case 39: |
-/* Line 1778 of yacc.c */ |
#line 350 "go.y" |
{ |
iota = 0; |
@@ -2656,7 +2603,6 @@ |
break; |
case 40: |
-/* Line 1778 of yacc.c */ |
#line 356 "go.y" |
{ |
(yyval.list) = variter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); |
@@ -2664,7 +2610,6 @@ |
break; |
case 41: |
-/* Line 1778 of yacc.c */ |
#line 360 "go.y" |
{ |
(yyval.list) = variter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); |
@@ -2672,7 +2617,6 @@ |
break; |
case 42: |
-/* Line 1778 of yacc.c */ |
#line 364 "go.y" |
{ |
(yyval.list) = variter((yyvsp[(1) - (3)].list), nil, (yyvsp[(3) - (3)].list)); |
@@ -2680,7 +2624,6 @@ |
break; |
case 43: |
-/* Line 1778 of yacc.c */ |
#line 370 "go.y" |
{ |
(yyval.list) = constiter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); |
@@ -2688,7 +2631,6 @@ |
break; |
case 44: |
-/* Line 1778 of yacc.c */ |
#line 374 "go.y" |
{ |
(yyval.list) = constiter((yyvsp[(1) - (3)].list), N, (yyvsp[(3) - (3)].list)); |
@@ -2696,7 +2638,6 @@ |
break; |
case 46: |
-/* Line 1778 of yacc.c */ |
#line 381 "go.y" |
{ |
(yyval.list) = constiter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); |
@@ -2704,7 +2645,6 @@ |
break; |
case 47: |
-/* Line 1778 of yacc.c */ |
#line 385 "go.y" |
{ |
(yyval.list) = constiter((yyvsp[(1) - (1)].list), N, nil); |
@@ -2712,7 +2652,6 @@ |
break; |
case 48: |
-/* Line 1778 of yacc.c */ |
#line 391 "go.y" |
{ |
// different from dclname because the name |
@@ -2723,7 +2662,6 @@ |
break; |
case 49: |
-/* Line 1778 of yacc.c */ |
#line 400 "go.y" |
{ |
(yyval.node) = typedcl1((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), 1); |
@@ -2731,7 +2669,6 @@ |
break; |
case 50: |
-/* Line 1778 of yacc.c */ |
#line 406 "go.y" |
{ |
(yyval.node) = (yyvsp[(1) - (1)].node); |
@@ -2739,7 +2676,6 @@ |
break; |
case 51: |
-/* Line 1778 of yacc.c */ |
#line 410 "go.y" |
{ |
(yyval.node) = nod(OASOP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -2748,7 +2684,6 @@ |
break; |
case 52: |
-/* Line 1778 of yacc.c */ |
#line 415 "go.y" |
{ |
if((yyvsp[(1) - (3)].list)->next == nil && (yyvsp[(3) - (3)].list)->next == nil) { |
@@ -2764,7 +2699,6 @@ |
break; |
case 53: |
-/* Line 1778 of yacc.c */ |
#line 427 "go.y" |
{ |
if((yyvsp[(3) - (3)].list)->n->op == OTYPESW) { |
@@ -2784,7 +2718,6 @@ |
break; |
case 54: |
-/* Line 1778 of yacc.c */ |
#line 443 "go.y" |
{ |
(yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); |
@@ -2793,7 +2726,6 @@ |
break; |
case 55: |
-/* Line 1778 of yacc.c */ |
#line 448 "go.y" |
{ |
(yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); |
@@ -2802,7 +2734,6 @@ |
break; |
case 56: |
-/* Line 1778 of yacc.c */ |
#line 455 "go.y" |
{ |
Node *n, *nn; |
@@ -2826,7 +2757,6 @@ |
break; |
case 57: |
-/* Line 1778 of yacc.c */ |
#line 475 "go.y" |
{ |
Node *n; |
@@ -2848,7 +2778,6 @@ |
break; |
case 58: |
-/* Line 1778 of yacc.c */ |
#line 493 "go.y" |
{ |
// will be converted to OCASE |
@@ -2861,7 +2790,6 @@ |
break; |
case 59: |
-/* Line 1778 of yacc.c */ |
#line 502 "go.y" |
{ |
Node *n, *nn; |
@@ -2881,7 +2809,6 @@ |
break; |
case 60: |
-/* Line 1778 of yacc.c */ |
#line 520 "go.y" |
{ |
markdcl(); |
@@ -2889,7 +2816,6 @@ |
break; |
case 61: |
-/* Line 1778 of yacc.c */ |
#line 524 "go.y" |
{ |
(yyval.node) = liststmt((yyvsp[(3) - (4)].list)); |
@@ -2898,7 +2824,6 @@ |
break; |
case 62: |
-/* Line 1778 of yacc.c */ |
#line 531 "go.y" |
{ |
// If the last token read by the lexer was consumed |
@@ -2912,7 +2837,6 @@ |
break; |
case 63: |
-/* Line 1778 of yacc.c */ |
#line 541 "go.y" |
{ |
int last; |
@@ -2935,7 +2859,6 @@ |
break; |
case 64: |
-/* Line 1778 of yacc.c */ |
#line 561 "go.y" |
{ |
(yyval.list) = nil; |
@@ -2943,7 +2866,6 @@ |
break; |
case 65: |
-/* Line 1778 of yacc.c */ |
#line 565 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); |
@@ -2951,7 +2873,6 @@ |
break; |
case 66: |
-/* Line 1778 of yacc.c */ |
#line 571 "go.y" |
{ |
markdcl(); |
@@ -2959,7 +2880,6 @@ |
break; |
case 67: |
-/* Line 1778 of yacc.c */ |
#line 575 "go.y" |
{ |
(yyval.list) = (yyvsp[(3) - (4)].list); |
@@ -2968,7 +2888,6 @@ |
break; |
case 68: |
-/* Line 1778 of yacc.c */ |
#line 582 "go.y" |
{ |
(yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); |
@@ -2978,7 +2897,6 @@ |
break; |
case 69: |
-/* Line 1778 of yacc.c */ |
#line 588 "go.y" |
{ |
(yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); |
@@ -2989,7 +2907,6 @@ |
break; |
case 70: |
-/* Line 1778 of yacc.c */ |
#line 597 "go.y" |
{ |
// init ; test ; incr |
@@ -3004,7 +2921,6 @@ |
break; |
case 71: |
-/* Line 1778 of yacc.c */ |
#line 608 "go.y" |
{ |
// normal test |
@@ -3014,7 +2930,6 @@ |
break; |
case 73: |
-/* Line 1778 of yacc.c */ |
#line 617 "go.y" |
{ |
(yyval.node) = (yyvsp[(1) - (2)].node); |
@@ -3023,7 +2938,6 @@ |
break; |
case 74: |
-/* Line 1778 of yacc.c */ |
#line 624 "go.y" |
{ |
markdcl(); |
@@ -3031,7 +2945,6 @@ |
break; |
case 75: |
-/* Line 1778 of yacc.c */ |
#line 628 "go.y" |
{ |
(yyval.node) = (yyvsp[(3) - (3)].node); |
@@ -3040,7 +2953,6 @@ |
break; |
case 76: |
-/* Line 1778 of yacc.c */ |
#line 635 "go.y" |
{ |
// test |
@@ -3050,7 +2962,6 @@ |
break; |
case 77: |
-/* Line 1778 of yacc.c */ |
#line 641 "go.y" |
{ |
// init ; test |
@@ -3062,7 +2973,6 @@ |
break; |
case 78: |
-/* Line 1778 of yacc.c */ |
#line 652 "go.y" |
{ |
markdcl(); |
@@ -3070,7 +2980,6 @@ |
break; |
case 79: |
-/* Line 1778 of yacc.c */ |
#line 656 "go.y" |
{ |
if((yyvsp[(3) - (3)].node)->ntest == N) |
@@ -3079,7 +2988,6 @@ |
break; |
case 80: |
-/* Line 1778 of yacc.c */ |
#line 661 "go.y" |
{ |
(yyvsp[(3) - (5)].node)->nbody = (yyvsp[(5) - (5)].list); |
@@ -3087,7 +2995,6 @@ |
break; |
case 81: |
-/* Line 1778 of yacc.c */ |
#line 665 "go.y" |
{ |
Node *n; |
@@ -3106,7 +3013,6 @@ |
break; |
case 82: |
-/* Line 1778 of yacc.c */ |
#line 682 "go.y" |
{ |
markdcl(); |
@@ -3114,7 +3020,6 @@ |
break; |
case 83: |
-/* Line 1778 of yacc.c */ |
#line 686 "go.y" |
{ |
if((yyvsp[(4) - (5)].node)->ntest == N) |
@@ -3125,7 +3030,6 @@ |
break; |
case 84: |
-/* Line 1778 of yacc.c */ |
#line 694 "go.y" |
{ |
(yyval.list) = nil; |
@@ -3133,7 +3037,6 @@ |
break; |
case 85: |
-/* Line 1778 of yacc.c */ |
#line 698 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); |
@@ -3141,7 +3044,6 @@ |
break; |
case 86: |
-/* Line 1778 of yacc.c */ |
#line 703 "go.y" |
{ |
(yyval.list) = nil; |
@@ -3149,7 +3051,6 @@ |
break; |
case 87: |
-/* Line 1778 of yacc.c */ |
#line 707 "go.y" |
{ |
NodeList *node; |
@@ -3162,7 +3063,6 @@ |
break; |
case 88: |
-/* Line 1778 of yacc.c */ |
#line 718 "go.y" |
{ |
markdcl(); |
@@ -3170,7 +3070,6 @@ |
break; |
case 89: |
-/* Line 1778 of yacc.c */ |
#line 722 "go.y" |
{ |
Node *n; |
@@ -3182,7 +3081,6 @@ |
break; |
case 90: |
-/* Line 1778 of yacc.c */ |
#line 730 "go.y" |
{ |
(yyval.node) = (yyvsp[(3) - (7)].node); |
@@ -3194,7 +3092,6 @@ |
break; |
case 91: |
-/* Line 1778 of yacc.c */ |
#line 740 "go.y" |
{ |
typesw = nod(OXXX, typesw, N); |
@@ -3202,7 +3099,6 @@ |
break; |
case 92: |
-/* Line 1778 of yacc.c */ |
#line 744 "go.y" |
{ |
(yyval.node) = nod(OSELECT, N, N); |
@@ -3213,7 +3109,6 @@ |
break; |
case 94: |
-/* Line 1778 of yacc.c */ |
#line 757 "go.y" |
{ |
(yyval.node) = nod(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3221,7 +3116,6 @@ |
break; |
case 95: |
-/* Line 1778 of yacc.c */ |
#line 761 "go.y" |
{ |
(yyval.node) = nod(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3229,7 +3123,6 @@ |
break; |
case 96: |
-/* Line 1778 of yacc.c */ |
#line 765 "go.y" |
{ |
(yyval.node) = nod(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3237,7 +3130,6 @@ |
break; |
case 97: |
-/* Line 1778 of yacc.c */ |
#line 769 "go.y" |
{ |
(yyval.node) = nod(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3245,7 +3137,6 @@ |
break; |
case 98: |
-/* Line 1778 of yacc.c */ |
#line 773 "go.y" |
{ |
(yyval.node) = nod(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3253,7 +3144,6 @@ |
break; |
case 99: |
-/* Line 1778 of yacc.c */ |
#line 777 "go.y" |
{ |
(yyval.node) = nod(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3261,7 +3151,6 @@ |
break; |
case 100: |
-/* Line 1778 of yacc.c */ |
#line 781 "go.y" |
{ |
(yyval.node) = nod(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3269,7 +3158,6 @@ |
break; |
case 101: |
-/* Line 1778 of yacc.c */ |
#line 785 "go.y" |
{ |
(yyval.node) = nod(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3277,7 +3165,6 @@ |
break; |
case 102: |
-/* Line 1778 of yacc.c */ |
#line 789 "go.y" |
{ |
(yyval.node) = nod(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3285,7 +3172,6 @@ |
break; |
case 103: |
-/* Line 1778 of yacc.c */ |
#line 793 "go.y" |
{ |
(yyval.node) = nod(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3293,7 +3179,6 @@ |
break; |
case 104: |
-/* Line 1778 of yacc.c */ |
#line 797 "go.y" |
{ |
(yyval.node) = nod(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3301,7 +3186,6 @@ |
break; |
case 105: |
-/* Line 1778 of yacc.c */ |
#line 801 "go.y" |
{ |
(yyval.node) = nod(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3309,7 +3193,6 @@ |
break; |
case 106: |
-/* Line 1778 of yacc.c */ |
#line 805 "go.y" |
{ |
(yyval.node) = nod(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3317,7 +3200,6 @@ |
break; |
case 107: |
-/* Line 1778 of yacc.c */ |
#line 809 "go.y" |
{ |
(yyval.node) = nod(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3325,7 +3207,6 @@ |
break; |
case 108: |
-/* Line 1778 of yacc.c */ |
#line 813 "go.y" |
{ |
(yyval.node) = nod(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3333,7 +3214,6 @@ |
break; |
case 109: |
-/* Line 1778 of yacc.c */ |
#line 817 "go.y" |
{ |
(yyval.node) = nod(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3341,7 +3221,6 @@ |
break; |
case 110: |
-/* Line 1778 of yacc.c */ |
#line 821 "go.y" |
{ |
(yyval.node) = nod(OANDNOT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3349,7 +3228,6 @@ |
break; |
case 111: |
-/* Line 1778 of yacc.c */ |
#line 825 "go.y" |
{ |
(yyval.node) = nod(OLSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3357,7 +3235,6 @@ |
break; |
case 112: |
-/* Line 1778 of yacc.c */ |
#line 829 "go.y" |
{ |
(yyval.node) = nod(ORSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3365,7 +3242,6 @@ |
break; |
case 113: |
-/* Line 1778 of yacc.c */ |
#line 834 "go.y" |
{ |
(yyval.node) = nod(OSEND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3373,7 +3249,6 @@ |
break; |
case 115: |
-/* Line 1778 of yacc.c */ |
#line 841 "go.y" |
{ |
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); |
@@ -3381,7 +3256,6 @@ |
break; |
case 116: |
-/* Line 1778 of yacc.c */ |
#line 845 "go.y" |
{ |
if((yyvsp[(2) - (2)].node)->op == OCOMPLIT) { |
@@ -3396,7 +3270,6 @@ |
break; |
case 117: |
-/* Line 1778 of yacc.c */ |
#line 856 "go.y" |
{ |
(yyval.node) = nod(OPLUS, (yyvsp[(2) - (2)].node), N); |
@@ -3404,7 +3277,6 @@ |
break; |
case 118: |
-/* Line 1778 of yacc.c */ |
#line 860 "go.y" |
{ |
(yyval.node) = nod(OMINUS, (yyvsp[(2) - (2)].node), N); |
@@ -3412,7 +3284,6 @@ |
break; |
case 119: |
-/* Line 1778 of yacc.c */ |
#line 864 "go.y" |
{ |
(yyval.node) = nod(ONOT, (yyvsp[(2) - (2)].node), N); |
@@ -3420,7 +3291,6 @@ |
break; |
case 120: |
-/* Line 1778 of yacc.c */ |
#line 868 "go.y" |
{ |
yyerror("the bitwise complement operator is ^"); |
@@ -3429,7 +3299,6 @@ |
break; |
case 121: |
-/* Line 1778 of yacc.c */ |
#line 873 "go.y" |
{ |
(yyval.node) = nod(OCOM, (yyvsp[(2) - (2)].node), N); |
@@ -3437,7 +3306,6 @@ |
break; |
case 122: |
-/* Line 1778 of yacc.c */ |
#line 877 "go.y" |
{ |
(yyval.node) = nod(ORECV, (yyvsp[(2) - (2)].node), N); |
@@ -3445,7 +3313,6 @@ |
break; |
case 123: |
-/* Line 1778 of yacc.c */ |
#line 887 "go.y" |
{ |
(yyval.node) = nod(OCALL, (yyvsp[(1) - (3)].node), N); |
@@ -3453,7 +3320,6 @@ |
break; |
case 124: |
-/* Line 1778 of yacc.c */ |
#line 891 "go.y" |
{ |
(yyval.node) = nod(OCALL, (yyvsp[(1) - (5)].node), N); |
@@ -3462,7 +3328,6 @@ |
break; |
case 125: |
-/* Line 1778 of yacc.c */ |
#line 896 "go.y" |
{ |
(yyval.node) = nod(OCALL, (yyvsp[(1) - (6)].node), N); |
@@ -3472,7 +3337,6 @@ |
break; |
case 126: |
-/* Line 1778 of yacc.c */ |
#line 904 "go.y" |
{ |
(yyval.node) = nodlit((yyvsp[(1) - (1)].val)); |
@@ -3480,7 +3344,6 @@ |
break; |
case 128: |
-/* Line 1778 of yacc.c */ |
#line 909 "go.y" |
{ |
if((yyvsp[(1) - (3)].node)->op == OPACK) { |
@@ -3495,7 +3358,6 @@ |
break; |
case 129: |
-/* Line 1778 of yacc.c */ |
#line 920 "go.y" |
{ |
(yyval.node) = nod(ODOTTYPE, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node)); |
@@ -3503,7 +3365,6 @@ |
break; |
case 130: |
-/* Line 1778 of yacc.c */ |
#line 924 "go.y" |
{ |
(yyval.node) = nod(OTYPESW, N, (yyvsp[(1) - (5)].node)); |
@@ -3511,7 +3372,6 @@ |
break; |
case 131: |
-/* Line 1778 of yacc.c */ |
#line 928 "go.y" |
{ |
(yyval.node) = nod(OINDEX, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); |
@@ -3519,7 +3379,6 @@ |
break; |
case 132: |
-/* Line 1778 of yacc.c */ |
#line 932 "go.y" |
{ |
(yyval.node) = nod(OSLICE, (yyvsp[(1) - (6)].node), nod(OKEY, (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node))); |
@@ -3527,7 +3386,6 @@ |
break; |
case 134: |
-/* Line 1778 of yacc.c */ |
#line 937 "go.y" |
{ |
// conversion |
@@ -3537,7 +3395,6 @@ |
break; |
case 135: |
-/* Line 1778 of yacc.c */ |
#line 943 "go.y" |
{ |
(yyval.node) = (yyvsp[(3) - (5)].node); |
@@ -3548,7 +3405,6 @@ |
break; |
case 136: |
-/* Line 1778 of yacc.c */ |
#line 950 "go.y" |
{ |
(yyval.node) = (yyvsp[(3) - (5)].node); |
@@ -3558,7 +3414,6 @@ |
break; |
case 137: |
-/* Line 1778 of yacc.c */ |
#line 956 "go.y" |
{ |
yyerror("cannot parenthesize type in composite literal"); |
@@ -3569,7 +3424,6 @@ |
break; |
case 139: |
-/* Line 1778 of yacc.c */ |
#line 965 "go.y" |
{ |
// composite expression. |
@@ -3579,7 +3433,6 @@ |
break; |
case 140: |
-/* Line 1778 of yacc.c */ |
#line 973 "go.y" |
{ |
(yyval.node) = nod(OKEY, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); |
@@ -3587,7 +3440,6 @@ |
break; |
case 142: |
-/* Line 1778 of yacc.c */ |
#line 980 "go.y" |
{ |
(yyval.node) = (yyvsp[(2) - (4)].node); |
@@ -3596,7 +3448,6 @@ |
break; |
case 144: |
-/* Line 1778 of yacc.c */ |
#line 988 "go.y" |
{ |
(yyval.node) = (yyvsp[(2) - (3)].node); |
@@ -3616,7 +3467,6 @@ |
break; |
case 148: |
-/* Line 1778 of yacc.c */ |
#line 1013 "go.y" |
{ |
(yyval.i) = LBODY; |
@@ -3624,7 +3474,6 @@ |
break; |
case 149: |
-/* Line 1778 of yacc.c */ |
#line 1017 "go.y" |
{ |
(yyval.i) = '{'; |
@@ -3632,7 +3481,6 @@ |
break; |
case 150: |
-/* Line 1778 of yacc.c */ |
#line 1028 "go.y" |
{ |
if((yyvsp[(1) - (1)].sym) == S) |
@@ -3643,7 +3491,6 @@ |
break; |
case 151: |
-/* Line 1778 of yacc.c */ |
#line 1037 "go.y" |
{ |
(yyval.node) = dclname((yyvsp[(1) - (1)].sym)); |
@@ -3651,7 +3498,6 @@ |
break; |
case 152: |
-/* Line 1778 of yacc.c */ |
#line 1042 "go.y" |
{ |
(yyval.node) = N; |
@@ -3659,7 +3505,6 @@ |
break; |
case 154: |
-/* Line 1778 of yacc.c */ |
#line 1049 "go.y" |
{ |
(yyval.sym) = (yyvsp[(1) - (1)].sym); |
@@ -3670,7 +3515,6 @@ |
break; |
case 156: |
-/* Line 1778 of yacc.c */ |
#line 1057 "go.y" |
{ |
(yyval.sym) = S; |
@@ -3678,7 +3522,6 @@ |
break; |
case 157: |
-/* Line 1778 of yacc.c */ |
#line 1063 "go.y" |
{ |
Pkg *p; |
@@ -3695,7 +3538,6 @@ |
break; |
case 158: |
-/* Line 1778 of yacc.c */ |
#line 1078 "go.y" |
{ |
(yyval.node) = oldname((yyvsp[(1) - (1)].sym)); |
@@ -3705,7 +3547,6 @@ |
break; |
case 160: |
-/* Line 1778 of yacc.c */ |
#line 1098 "go.y" |
{ |
yyerror("final argument in variadic function missing type"); |
@@ -3714,7 +3555,6 @@ |
break; |
case 161: |
-/* Line 1778 of yacc.c */ |
#line 1103 "go.y" |
{ |
(yyval.node) = nod(ODDD, (yyvsp[(2) - (2)].node), N); |
@@ -3722,7 +3562,6 @@ |
break; |
case 167: |
-/* Line 1778 of yacc.c */ |
#line 1114 "go.y" |
{ |
(yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); |
@@ -3730,7 +3569,6 @@ |
break; |
case 171: |
-/* Line 1778 of yacc.c */ |
#line 1123 "go.y" |
{ |
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); |
@@ -3738,7 +3576,6 @@ |
break; |
case 176: |
-/* Line 1778 of yacc.c */ |
#line 1133 "go.y" |
{ |
(yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); |
@@ -3746,7 +3583,6 @@ |
break; |
case 186: |
-/* Line 1778 of yacc.c */ |
#line 1154 "go.y" |
{ |
if((yyvsp[(1) - (3)].node)->op == OPACK) { |
@@ -3761,7 +3597,6 @@ |
break; |
case 187: |
-/* Line 1778 of yacc.c */ |
#line 1167 "go.y" |
{ |
(yyval.node) = nod(OTARRAY, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); |
@@ -3769,7 +3604,6 @@ |
break; |
case 188: |
-/* Line 1778 of yacc.c */ |
#line 1171 "go.y" |
{ |
// array literal of nelem |
@@ -3778,7 +3612,6 @@ |
break; |
case 189: |
-/* Line 1778 of yacc.c */ |
#line 1176 "go.y" |
{ |
(yyval.node) = nod(OTCHAN, (yyvsp[(2) - (2)].node), N); |
@@ -3787,7 +3620,6 @@ |
break; |
case 190: |
-/* Line 1778 of yacc.c */ |
#line 1181 "go.y" |
{ |
(yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); |
@@ -3796,7 +3628,6 @@ |
break; |
case 191: |
-/* Line 1778 of yacc.c */ |
#line 1186 "go.y" |
{ |
(yyval.node) = nod(OTMAP, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); |
@@ -3804,7 +3635,6 @@ |
break; |
case 194: |
-/* Line 1778 of yacc.c */ |
#line 1194 "go.y" |
{ |
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); |
@@ -3812,7 +3642,6 @@ |
break; |
case 195: |
-/* Line 1778 of yacc.c */ |
#line 1200 "go.y" |
{ |
(yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); |
@@ -3821,7 +3650,6 @@ |
break; |
case 196: |
-/* Line 1778 of yacc.c */ |
#line 1207 "go.y" |
{ |
(yyval.node) = nod(OTSTRUCT, N, N); |
@@ -3831,7 +3659,6 @@ |
break; |
case 197: |
-/* Line 1778 of yacc.c */ |
#line 1213 "go.y" |
{ |
(yyval.node) = nod(OTSTRUCT, N, N); |
@@ -3840,7 +3667,6 @@ |
break; |
case 198: |
-/* Line 1778 of yacc.c */ |
#line 1220 "go.y" |
{ |
(yyval.node) = nod(OTINTER, N, N); |
@@ -3850,7 +3676,6 @@ |
break; |
case 199: |
-/* Line 1778 of yacc.c */ |
#line 1226 "go.y" |
{ |
(yyval.node) = nod(OTINTER, N, N); |
@@ -3859,7 +3684,6 @@ |
break; |
case 200: |
-/* Line 1778 of yacc.c */ |
#line 1237 "go.y" |
{ |
(yyval.node) = (yyvsp[(2) - (3)].node); |
@@ -3872,7 +3696,6 @@ |
break; |
case 201: |
-/* Line 1778 of yacc.c */ |
#line 1248 "go.y" |
{ |
Node *t; |
@@ -3905,7 +3728,6 @@ |
break; |
case 202: |
-/* Line 1778 of yacc.c */ |
#line 1277 "go.y" |
{ |
Node *rcvr, *t; |
@@ -3947,7 +3769,6 @@ |
break; |
case 203: |
-/* Line 1778 of yacc.c */ |
#line 1317 "go.y" |
{ |
Sym *s; |
@@ -3976,14 +3797,21 @@ |
break; |
case 204: |
-/* Line 1778 of yacc.c */ |
#line 1342 "go.y" |
{ |
(yyval.node) = methodname1(newname((yyvsp[(4) - (8)].sym)), (yyvsp[(2) - (8)].list)->n->right); |
(yyval.node)->type = functype((yyvsp[(2) - (8)].list)->n, (yyvsp[(6) - (8)].list), (yyvsp[(8) - (8)].list)); |
checkwidth((yyval.node)->type); |
- addmethod((yyvsp[(4) - (8)].sym), (yyval.node)->type, 0, nointerface); |
+ thingsused++; |
+ if(addmethod((yyvsp[(4) - (8)].sym), (yyval.node)->type, 0, nointerface)) { |
+ // repeated add |
+ dclcontext = PDISCARD; // since we skip funchdr below |
+ freenode((yyval.node)); // TODO find more recyclable nodes from ->type |
+ (yyval.node) = N; |
+ break; |
+ } |
+ thingsallocs++; |
nointerface = 0; |
funchdr((yyval.node)); |
@@ -3996,8 +3824,7 @@ |
break; |
case 205: |
-/* Line 1778 of yacc.c */ |
-#line 1360 "go.y" |
+#line 1368 "go.y" |
{ |
(yyvsp[(3) - (5)].list) = checkarglist((yyvsp[(3) - (5)].list), 1); |
(yyval.node) = nod(OTFUNC, N, N); |
@@ -4007,16 +3834,14 @@ |
break; |
case 206: |
-/* Line 1778 of yacc.c */ |
-#line 1368 "go.y" |
+#line 1376 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 207: |
-/* Line 1778 of yacc.c */ |
-#line 1372 "go.y" |
+#line 1380 "go.y" |
{ |
(yyval.list) = (yyvsp[(2) - (3)].list); |
if((yyval.list) == nil) |
@@ -4025,24 +3850,21 @@ |
break; |
case 208: |
-/* Line 1778 of yacc.c */ |
-#line 1380 "go.y" |
+#line 1388 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 209: |
-/* Line 1778 of yacc.c */ |
-#line 1384 "go.y" |
+#line 1392 "go.y" |
{ |
(yyval.list) = list1(nod(ODCLFIELD, N, (yyvsp[(1) - (1)].node))); |
} |
break; |
case 210: |
-/* Line 1778 of yacc.c */ |
-#line 1388 "go.y" |
+#line 1396 "go.y" |
{ |
(yyvsp[(2) - (3)].list) = checkarglist((yyvsp[(2) - (3)].list), 0); |
(yyval.list) = (yyvsp[(2) - (3)].list); |
@@ -4050,16 +3872,14 @@ |
break; |
case 211: |
-/* Line 1778 of yacc.c */ |
-#line 1395 "go.y" |
+#line 1403 "go.y" |
{ |
closurehdr((yyvsp[(1) - (1)].node)); |
} |
break; |
case 212: |
-/* Line 1778 of yacc.c */ |
-#line 1401 "go.y" |
+#line 1409 "go.y" |
{ |
(yyval.node) = closurebody((yyvsp[(3) - (4)].list)); |
fixlbrace((yyvsp[(2) - (4)].i)); |
@@ -4067,24 +3887,21 @@ |
break; |
case 213: |
-/* Line 1778 of yacc.c */ |
-#line 1406 "go.y" |
+#line 1414 "go.y" |
{ |
(yyval.node) = closurebody(nil); |
} |
break; |
case 214: |
-/* Line 1778 of yacc.c */ |
-#line 1417 "go.y" |
+#line 1425 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 215: |
-/* Line 1778 of yacc.c */ |
-#line 1421 "go.y" |
+#line 1429 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(2) - (3)].list)); |
if(nsyntaxerrors == 0) |
@@ -4094,64 +3911,56 @@ |
break; |
case 217: |
-/* Line 1778 of yacc.c */ |
-#line 1431 "go.y" |
+#line 1439 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); |
} |
break; |
case 219: |
-/* Line 1778 of yacc.c */ |
-#line 1438 "go.y" |
+#line 1446 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); |
} |
break; |
case 220: |
-/* Line 1778 of yacc.c */ |
-#line 1444 "go.y" |
+#line 1452 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 221: |
-/* Line 1778 of yacc.c */ |
-#line 1448 "go.y" |
+#line 1456 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 223: |
-/* Line 1778 of yacc.c */ |
-#line 1455 "go.y" |
+#line 1463 "go.y" |
{ |
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); |
} |
break; |
case 224: |
-/* Line 1778 of yacc.c */ |
-#line 1461 "go.y" |
+#line 1469 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 225: |
-/* Line 1778 of yacc.c */ |
-#line 1465 "go.y" |
+#line 1473 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 226: |
-/* Line 1778 of yacc.c */ |
-#line 1471 "go.y" |
+#line 1479 "go.y" |
{ |
NodeList *l; |
@@ -4177,8 +3986,7 @@ |
break; |
case 227: |
-/* Line 1778 of yacc.c */ |
-#line 1494 "go.y" |
+#line 1502 "go.y" |
{ |
(yyvsp[(1) - (2)].node)->val = (yyvsp[(2) - (2)].val); |
(yyval.list) = list1((yyvsp[(1) - (2)].node)); |
@@ -4186,8 +3994,7 @@ |
break; |
case 228: |
-/* Line 1778 of yacc.c */ |
-#line 1499 "go.y" |
+#line 1507 "go.y" |
{ |
(yyvsp[(2) - (4)].node)->val = (yyvsp[(4) - (4)].val); |
(yyval.list) = list1((yyvsp[(2) - (4)].node)); |
@@ -4196,8 +4003,7 @@ |
break; |
case 229: |
-/* Line 1778 of yacc.c */ |
-#line 1505 "go.y" |
+#line 1513 "go.y" |
{ |
(yyvsp[(2) - (3)].node)->right = nod(OIND, (yyvsp[(2) - (3)].node)->right, N); |
(yyvsp[(2) - (3)].node)->val = (yyvsp[(3) - (3)].val); |
@@ -4206,8 +4012,7 @@ |
break; |
case 230: |
-/* Line 1778 of yacc.c */ |
-#line 1511 "go.y" |
+#line 1519 "go.y" |
{ |
(yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); |
(yyvsp[(3) - (5)].node)->val = (yyvsp[(5) - (5)].val); |
@@ -4217,8 +4022,7 @@ |
break; |
case 231: |
-/* Line 1778 of yacc.c */ |
-#line 1518 "go.y" |
+#line 1526 "go.y" |
{ |
(yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); |
(yyvsp[(3) - (5)].node)->val = (yyvsp[(5) - (5)].val); |
@@ -4228,8 +4032,7 @@ |
break; |
case 232: |
-/* Line 1778 of yacc.c */ |
-#line 1527 "go.y" |
+#line 1535 "go.y" |
{ |
Node *n; |
@@ -4241,8 +4044,7 @@ |
break; |
case 233: |
-/* Line 1778 of yacc.c */ |
-#line 1536 "go.y" |
+#line 1544 "go.y" |
{ |
Pkg *pkg; |
@@ -4258,16 +4060,14 @@ |
break; |
case 234: |
-/* Line 1778 of yacc.c */ |
-#line 1551 "go.y" |
+#line 1559 "go.y" |
{ |
(yyval.node) = embedded((yyvsp[(1) - (1)].sym)); |
} |
break; |
case 235: |
-/* Line 1778 of yacc.c */ |
-#line 1557 "go.y" |
+#line 1565 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); |
ifacedcl((yyval.node)); |
@@ -4275,16 +4075,14 @@ |
break; |
case 236: |
-/* Line 1778 of yacc.c */ |
-#line 1562 "go.y" |
+#line 1570 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(1) - (1)].sym))); |
} |
break; |
case 237: |
-/* Line 1778 of yacc.c */ |
-#line 1566 "go.y" |
+#line 1574 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(2) - (3)].sym))); |
yyerror("cannot parenthesize embedded type"); |
@@ -4292,8 +4090,7 @@ |
break; |
case 238: |
-/* Line 1778 of yacc.c */ |
-#line 1573 "go.y" |
+#line 1581 "go.y" |
{ |
// without func keyword |
(yyvsp[(2) - (4)].list) = checkarglist((yyvsp[(2) - (4)].list), 1); |
@@ -4304,8 +4101,7 @@ |
break; |
case 240: |
-/* Line 1778 of yacc.c */ |
-#line 1587 "go.y" |
+#line 1595 "go.y" |
{ |
(yyval.node) = nod(ONONAME, N, N); |
(yyval.node)->sym = (yyvsp[(1) - (2)].sym); |
@@ -4314,8 +4110,7 @@ |
break; |
case 241: |
-/* Line 1778 of yacc.c */ |
-#line 1593 "go.y" |
+#line 1601 "go.y" |
{ |
(yyval.node) = nod(ONONAME, N, N); |
(yyval.node)->sym = (yyvsp[(1) - (2)].sym); |
@@ -4324,64 +4119,56 @@ |
break; |
case 243: |
-/* Line 1778 of yacc.c */ |
-#line 1602 "go.y" |
+#line 1610 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 244: |
-/* Line 1778 of yacc.c */ |
-#line 1606 "go.y" |
+#line 1614 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 245: |
-/* Line 1778 of yacc.c */ |
-#line 1611 "go.y" |
+#line 1619 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 246: |
-/* Line 1778 of yacc.c */ |
-#line 1615 "go.y" |
+#line 1623 "go.y" |
{ |
(yyval.list) = (yyvsp[(1) - (2)].list); |
} |
break; |
case 247: |
-/* Line 1778 of yacc.c */ |
-#line 1623 "go.y" |
+#line 1631 "go.y" |
{ |
(yyval.node) = N; |
} |
break; |
case 249: |
-/* Line 1778 of yacc.c */ |
-#line 1628 "go.y" |
+#line 1636 "go.y" |
{ |
(yyval.node) = liststmt((yyvsp[(1) - (1)].list)); |
} |
break; |
case 251: |
-/* Line 1778 of yacc.c */ |
-#line 1633 "go.y" |
+#line 1641 "go.y" |
{ |
(yyval.node) = N; |
} |
break; |
case 257: |
-/* Line 1778 of yacc.c */ |
-#line 1644 "go.y" |
+#line 1652 "go.y" |
{ |
(yyvsp[(1) - (2)].node) = nod(OLABEL, (yyvsp[(1) - (2)].node), N); |
(yyvsp[(1) - (2)].node)->sym = dclstack; // context, for goto restrictions |
@@ -4389,8 +4176,7 @@ |
break; |
case 258: |
-/* Line 1778 of yacc.c */ |
-#line 1649 "go.y" |
+#line 1657 "go.y" |
{ |
NodeList *l; |
@@ -4403,8 +4189,7 @@ |
break; |
case 259: |
-/* Line 1778 of yacc.c */ |
-#line 1659 "go.y" |
+#line 1667 "go.y" |
{ |
// will be converted to OFALL |
(yyval.node) = nod(OXFALL, N, N); |
@@ -4412,40 +4197,35 @@ |
break; |
case 260: |
-/* Line 1778 of yacc.c */ |
-#line 1664 "go.y" |
+#line 1672 "go.y" |
{ |
(yyval.node) = nod(OBREAK, (yyvsp[(2) - (2)].node), N); |
} |
break; |
case 261: |
-/* Line 1778 of yacc.c */ |
-#line 1668 "go.y" |
+#line 1676 "go.y" |
{ |
(yyval.node) = nod(OCONTINUE, (yyvsp[(2) - (2)].node), N); |
} |
break; |
case 262: |
-/* Line 1778 of yacc.c */ |
-#line 1672 "go.y" |
+#line 1680 "go.y" |
{ |
(yyval.node) = nod(OPROC, (yyvsp[(2) - (2)].node), N); |
} |
break; |
case 263: |
-/* Line 1778 of yacc.c */ |
-#line 1676 "go.y" |
+#line 1684 "go.y" |
{ |
(yyval.node) = nod(ODEFER, (yyvsp[(2) - (2)].node), N); |
} |
break; |
case 264: |
-/* Line 1778 of yacc.c */ |
-#line 1680 "go.y" |
+#line 1688 "go.y" |
{ |
(yyval.node) = nod(OGOTO, (yyvsp[(2) - (2)].node), N); |
(yyval.node)->sym = dclstack; // context, for goto restrictions |
@@ -4453,8 +4233,7 @@ |
break; |
case 265: |
-/* Line 1778 of yacc.c */ |
-#line 1685 "go.y" |
+#line 1693 "go.y" |
{ |
(yyval.node) = nod(ORETURN, N, N); |
(yyval.node)->list = (yyvsp[(2) - (2)].list); |
@@ -4474,8 +4253,7 @@ |
break; |
case 266: |
-/* Line 1778 of yacc.c */ |
-#line 1704 "go.y" |
+#line 1712 "go.y" |
{ |
(yyval.list) = nil; |
if((yyvsp[(1) - (1)].node) != N) |
@@ -4484,8 +4262,7 @@ |
break; |
case 267: |
-/* Line 1778 of yacc.c */ |
-#line 1710 "go.y" |
+#line 1718 "go.y" |
{ |
(yyval.list) = (yyvsp[(1) - (3)].list); |
if((yyvsp[(3) - (3)].node) != N) |
@@ -4494,216 +4271,189 @@ |
break; |
case 268: |
-/* Line 1778 of yacc.c */ |
-#line 1718 "go.y" |
+#line 1726 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 269: |
-/* Line 1778 of yacc.c */ |
-#line 1722 "go.y" |
+#line 1730 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 270: |
-/* Line 1778 of yacc.c */ |
-#line 1728 "go.y" |
+#line 1736 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 271: |
-/* Line 1778 of yacc.c */ |
-#line 1732 "go.y" |
+#line 1740 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 272: |
-/* Line 1778 of yacc.c */ |
-#line 1738 "go.y" |
+#line 1746 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 273: |
-/* Line 1778 of yacc.c */ |
-#line 1742 "go.y" |
+#line 1750 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 274: |
-/* Line 1778 of yacc.c */ |
-#line 1748 "go.y" |
+#line 1756 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 275: |
-/* Line 1778 of yacc.c */ |
-#line 1752 "go.y" |
+#line 1760 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 276: |
-/* Line 1778 of yacc.c */ |
-#line 1761 "go.y" |
+#line 1769 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 277: |
-/* Line 1778 of yacc.c */ |
-#line 1765 "go.y" |
+#line 1773 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 278: |
-/* Line 1778 of yacc.c */ |
-#line 1769 "go.y" |
+#line 1777 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 279: |
-/* Line 1778 of yacc.c */ |
-#line 1773 "go.y" |
+#line 1781 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 280: |
-/* Line 1778 of yacc.c */ |
-#line 1778 "go.y" |
+#line 1786 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 281: |
-/* Line 1778 of yacc.c */ |
-#line 1782 "go.y" |
+#line 1790 "go.y" |
{ |
(yyval.list) = (yyvsp[(1) - (2)].list); |
} |
break; |
case 286: |
-/* Line 1778 of yacc.c */ |
-#line 1796 "go.y" |
+#line 1804 "go.y" |
{ |
(yyval.node) = N; |
} |
break; |
case 288: |
-/* Line 1778 of yacc.c */ |
-#line 1802 "go.y" |
+#line 1810 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 290: |
-/* Line 1778 of yacc.c */ |
-#line 1808 "go.y" |
+#line 1816 "go.y" |
{ |
(yyval.node) = N; |
} |
break; |
case 292: |
-/* Line 1778 of yacc.c */ |
-#line 1814 "go.y" |
+#line 1822 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 294: |
-/* Line 1778 of yacc.c */ |
-#line 1820 "go.y" |
+#line 1828 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 296: |
-/* Line 1778 of yacc.c */ |
-#line 1826 "go.y" |
+#line 1834 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 298: |
-/* Line 1778 of yacc.c */ |
-#line 1832 "go.y" |
+#line 1840 "go.y" |
{ |
(yyval.val).ctype = CTxxx; |
} |
break; |
case 300: |
-/* Line 1778 of yacc.c */ |
-#line 1842 "go.y" |
+#line 1850 "go.y" |
{ |
importimport((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].val).u.sval); |
} |
break; |
case 301: |
-/* Line 1778 of yacc.c */ |
-#line 1846 "go.y" |
+#line 1854 "go.y" |
{ |
importvar((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].type)); |
} |
break; |
case 302: |
-/* Line 1778 of yacc.c */ |
-#line 1850 "go.y" |
+#line 1858 "go.y" |
{ |
importconst((yyvsp[(2) - (5)].sym), types[TIDEAL], (yyvsp[(4) - (5)].node)); |
} |
break; |
case 303: |
-/* Line 1778 of yacc.c */ |
-#line 1854 "go.y" |
+#line 1862 "go.y" |
{ |
importconst((yyvsp[(2) - (6)].sym), (yyvsp[(3) - (6)].type), (yyvsp[(5) - (6)].node)); |
} |
break; |
case 304: |
-/* Line 1778 of yacc.c */ |
-#line 1858 "go.y" |
+#line 1866 "go.y" |
{ |
importtype((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].type)); |
} |
break; |
case 305: |
-/* Line 1778 of yacc.c */ |
-#line 1862 "go.y" |
+#line 1870 "go.y" |
{ |
if((yyvsp[(2) - (4)].node) == N) { |
dclcontext = PEXTERN; // since we skip the funcbody below |
@@ -4724,8 +4474,7 @@ |
break; |
case 306: |
-/* Line 1778 of yacc.c */ |
-#line 1882 "go.y" |
+#line 1890 "go.y" |
{ |
(yyval.sym) = (yyvsp[(1) - (1)].sym); |
structpkg = (yyval.sym)->pkg; |
@@ -4733,8 +4482,7 @@ |
break; |
case 307: |
-/* Line 1778 of yacc.c */ |
-#line 1889 "go.y" |
+#line 1897 "go.y" |
{ |
(yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); |
importsym((yyvsp[(1) - (1)].sym), OTYPE); |
@@ -4742,16 +4490,14 @@ |
break; |
case 313: |
-/* Line 1778 of yacc.c */ |
-#line 1909 "go.y" |
+#line 1917 "go.y" |
{ |
(yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); |
} |
break; |
case 314: |
-/* Line 1778 of yacc.c */ |
-#line 1913 "go.y" |
+#line 1921 "go.y" |
{ |
// predefined name like uint8 |
(yyvsp[(1) - (1)].sym) = pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg); |
@@ -4764,56 +4510,49 @@ |
break; |
case 315: |
-/* Line 1778 of yacc.c */ |
-#line 1923 "go.y" |
+#line 1931 "go.y" |
{ |
(yyval.type) = aindex(N, (yyvsp[(3) - (3)].type)); |
} |
break; |
case 316: |
-/* Line 1778 of yacc.c */ |
-#line 1927 "go.y" |
+#line 1935 "go.y" |
{ |
(yyval.type) = aindex(nodlit((yyvsp[(2) - (4)].val)), (yyvsp[(4) - (4)].type)); |
} |
break; |
case 317: |
-/* Line 1778 of yacc.c */ |
-#line 1931 "go.y" |
+#line 1939 "go.y" |
{ |
(yyval.type) = maptype((yyvsp[(3) - (5)].type), (yyvsp[(5) - (5)].type)); |
} |
break; |
case 318: |
-/* Line 1778 of yacc.c */ |
-#line 1935 "go.y" |
+#line 1943 "go.y" |
{ |
(yyval.type) = tostruct((yyvsp[(3) - (4)].list)); |
} |
break; |
case 319: |
-/* Line 1778 of yacc.c */ |
-#line 1939 "go.y" |
+#line 1947 "go.y" |
{ |
(yyval.type) = tointerface((yyvsp[(3) - (4)].list)); |
} |
break; |
case 320: |
-/* Line 1778 of yacc.c */ |
-#line 1943 "go.y" |
+#line 1951 "go.y" |
{ |
(yyval.type) = ptrto((yyvsp[(2) - (2)].type)); |
} |
break; |
case 321: |
-/* Line 1778 of yacc.c */ |
-#line 1947 "go.y" |
+#line 1955 "go.y" |
{ |
(yyval.type) = typ(TCHAN); |
(yyval.type)->type = (yyvsp[(2) - (2)].type); |
@@ -4822,8 +4561,7 @@ |
break; |
case 322: |
-/* Line 1778 of yacc.c */ |
-#line 1953 "go.y" |
+#line 1961 "go.y" |
{ |
(yyval.type) = typ(TCHAN); |
(yyval.type)->type = (yyvsp[(3) - (4)].type); |
@@ -4832,8 +4570,7 @@ |
break; |
case 323: |
-/* Line 1778 of yacc.c */ |
-#line 1959 "go.y" |
+#line 1967 "go.y" |
{ |
(yyval.type) = typ(TCHAN); |
(yyval.type)->type = (yyvsp[(3) - (3)].type); |
@@ -4842,8 +4579,7 @@ |
break; |
case 324: |
-/* Line 1778 of yacc.c */ |
-#line 1967 "go.y" |
+#line 1975 "go.y" |
{ |
(yyval.type) = typ(TCHAN); |
(yyval.type)->type = (yyvsp[(3) - (3)].type); |
@@ -4852,16 +4588,14 @@ |
break; |
case 325: |
-/* Line 1778 of yacc.c */ |
-#line 1975 "go.y" |
+#line 1983 "go.y" |
{ |
(yyval.type) = functype(nil, (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)); |
} |
break; |
case 326: |
-/* Line 1778 of yacc.c */ |
-#line 1981 "go.y" |
+#line 1989 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(2) - (3)].type))); |
if((yyvsp[(1) - (3)].sym)) |
@@ -4871,8 +4605,7 @@ |
break; |
case 327: |
-/* Line 1778 of yacc.c */ |
-#line 1988 "go.y" |
+#line 1996 "go.y" |
{ |
Type *t; |
@@ -4889,8 +4622,7 @@ |
break; |
case 328: |
-/* Line 1778 of yacc.c */ |
-#line 2004 "go.y" |
+#line 2012 "go.y" |
{ |
Sym *s; |
@@ -4909,56 +4641,49 @@ |
break; |
case 329: |
-/* Line 1778 of yacc.c */ |
-#line 2022 "go.y" |
+#line 2030 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, newname((yyvsp[(1) - (5)].sym)), typenod(functype(fakethis(), (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)))); |
} |
break; |
case 330: |
-/* Line 1778 of yacc.c */ |
-#line 2026 "go.y" |
+#line 2034 "go.y" |
{ |
(yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type))); |
} |
break; |
case 331: |
-/* Line 1778 of yacc.c */ |
-#line 2031 "go.y" |
+#line 2039 "go.y" |
{ |
(yyval.list) = nil; |
} |
break; |
case 333: |
-/* Line 1778 of yacc.c */ |
-#line 2038 "go.y" |
+#line 2046 "go.y" |
{ |
(yyval.list) = (yyvsp[(2) - (3)].list); |
} |
break; |
case 334: |
-/* Line 1778 of yacc.c */ |
-#line 2042 "go.y" |
+#line 2050 "go.y" |
{ |
(yyval.list) = list1(nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type)))); |
} |
break; |
case 335: |
-/* Line 1778 of yacc.c */ |
-#line 2052 "go.y" |
+#line 2060 "go.y" |
{ |
(yyval.node) = nodlit((yyvsp[(1) - (1)].val)); |
} |
break; |
case 336: |
-/* Line 1778 of yacc.c */ |
-#line 2056 "go.y" |
+#line 2064 "go.y" |
{ |
(yyval.node) = nodlit((yyvsp[(2) - (2)].val)); |
switch((yyval.node)->val.ctype){ |
@@ -4976,8 +4701,7 @@ |
break; |
case 337: |
-/* Line 1778 of yacc.c */ |
-#line 2071 "go.y" |
+#line 2079 "go.y" |
{ |
(yyval.node) = oldname(pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg)); |
if((yyval.node)->op != OLITERAL) |
@@ -4986,8 +4710,7 @@ |
break; |
case 339: |
-/* Line 1778 of yacc.c */ |
-#line 2080 "go.y" |
+#line 2088 "go.y" |
{ |
if((yyvsp[(2) - (5)].node)->val.ctype == CTRUNE && (yyvsp[(4) - (5)].node)->val.ctype == CTINT) { |
(yyval.node) = (yyvsp[(2) - (5)].node); |
@@ -5001,69 +4724,52 @@ |
break; |
case 342: |
-/* Line 1778 of yacc.c */ |
-#line 2096 "go.y" |
+#line 2104 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 343: |
-/* Line 1778 of yacc.c */ |
-#line 2100 "go.y" |
+#line 2108 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 344: |
-/* Line 1778 of yacc.c */ |
-#line 2106 "go.y" |
+#line 2114 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 345: |
-/* Line 1778 of yacc.c */ |
-#line 2110 "go.y" |
+#line 2118 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
case 346: |
-/* Line 1778 of yacc.c */ |
-#line 2116 "go.y" |
+#line 2124 "go.y" |
{ |
(yyval.list) = list1((yyvsp[(1) - (1)].node)); |
} |
break; |
case 347: |
-/* Line 1778 of yacc.c */ |
-#line 2120 "go.y" |
+#line 2128 "go.y" |
{ |
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); |
} |
break; |
-/* Line 1778 of yacc.c */ |
-#line 5055 "y.tab.c" |
+/* Line 1267 of yacc.c. */ |
+#line 4772 "y.tab.c" |
default: break; |
} |
- /* User semantic actions sometimes alter yychar, and that requires |
- that yytoken be updated with the new translation. We take the |
- approach of translating immediately before every use of yytoken. |
- One alternative is translating here after every semantic action, |
- but that translation would be missed if the semantic action invokes |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
- incorrect destructor might then be invoked immediately. In the |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
- to an incorrect destructor call or verbose syntax error message |
- before the lookahead is translated. */ |
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
YYPOPSTACK (yylen); |
@@ -5072,6 +4778,7 @@ |
*++yyvsp = yyval; |
+ |
/* Now `shift' the result of the reduction. Determine what state |
that goes to, based on the state we popped back to and the rule |
number reduced by. */ |
@@ -5091,10 +4798,6 @@ |
| yyerrlab -- here on detecting error | |
`------------------------------------*/ |
yyerrlab: |
- /* Make sure we have latest lookahead translation. See comments at |
- user semantic actions for why this is necessary. */ |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
- |
/* If not already recovering from an error, report this error. */ |
if (!yyerrstatus) |
{ |
@@ -5102,36 +4805,37 @@ |
#if ! YYERROR_VERBOSE |
yyerror (YY_("syntax error")); |
#else |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
- yyssp, yytoken) |
{ |
- char *yymsgp = YY_("syntax error"); |
- int yysyntax_error_status; |
- yysyntax_error_status = YYSYNTAX_ERROR; |
- if (yysyntax_error_status == 0) |
- yymsgp = yymsg; |
- else if (yysyntax_error_status == 1) |
- { |
- if (yymsg != yymsgbuf) |
- YYSTACK_FREE (yymsg); |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
- if (!yymsg) |
- { |
- yymsg = yymsgbuf; |
- yymsg_alloc = sizeof yymsgbuf; |
- yysyntax_error_status = 2; |
- } |
- else |
- { |
- yysyntax_error_status = YYSYNTAX_ERROR; |
- yymsgp = yymsg; |
- } |
- } |
- yyerror (yymsgp); |
- if (yysyntax_error_status == 2) |
- goto yyexhaustedlab; |
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
+ { |
+ YYSIZE_T yyalloc = 2 * yysize; |
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
+ yyalloc = YYSTACK_ALLOC_MAXIMUM; |
+ if (yymsg != yymsgbuf) |
+ YYSTACK_FREE (yymsg); |
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
+ if (yymsg) |
+ yymsg_alloc = yyalloc; |
+ else |
+ { |
+ yymsg = yymsgbuf; |
+ yymsg_alloc = sizeof yymsgbuf; |
+ } |
+ } |
+ |
+ if (0 < yysize && yysize <= yymsg_alloc) |
+ { |
+ (void) yysyntax_error (yymsg, yystate, yychar); |
+ yyerror (yymsg); |
+ } |
+ else |
+ { |
+ yyerror (YY_("syntax error")); |
+ if (yysize != 0) |
+ goto yyexhaustedlab; |
+ } |
} |
-# undef YYSYNTAX_ERROR |
#endif |
} |
@@ -5139,7 +4843,7 @@ |
if (yyerrstatus == 3) |
{ |
- /* If just tried and failed to reuse lookahead token after an |
+ /* If just tried and failed to reuse look-ahead token after an |
error, discard it. */ |
if (yychar <= YYEOF) |
@@ -5156,7 +4860,7 @@ |
} |
} |
- /* Else will try to reuse lookahead token after shifting the error |
+ /* Else will try to reuse look-ahead token after shifting the error |
token. */ |
goto yyerrlab1; |
@@ -5190,7 +4894,7 @@ |
for (;;) |
{ |
yyn = yypact[yystate]; |
- if (!yypact_value_is_default (yyn)) |
+ if (yyn != YYPACT_NINF) |
{ |
yyn += YYTERROR; |
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
@@ -5213,9 +4917,10 @@ |
YY_STACK_PRINT (yyss, yyssp); |
} |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
+ if (yyn == YYFINAL) |
+ YYACCEPT; |
+ |
*++yyvsp = yylval; |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
/* Shift the error token. */ |
@@ -5239,7 +4944,7 @@ |
yyresult = 1; |
goto yyreturn; |
-#if !defined yyoverflow || YYERROR_VERBOSE |
+#ifndef yyoverflow |
/*-------------------------------------------------. |
| yyexhaustedlab -- memory exhaustion comes here. | |
`-------------------------------------------------*/ |
@@ -5250,14 +4955,9 @@ |
#endif |
yyreturn: |
- if (yychar != YYEMPTY) |
- { |
- /* Make sure we have latest lookahead translation. See comments at |
- user semantic actions for why this is necessary. */ |
- yytoken = YYTRANSLATE (yychar); |
- yydestruct ("Cleanup: discarding lookahead", |
- yytoken, &yylval); |
- } |
+ if (yychar != YYEOF && yychar != YYEMPTY) |
+ yydestruct ("Cleanup: discarding lookahead", |
+ yytoken, &yylval); |
/* Do not reclaim the symbols of the rule which action triggered |
this YYABORT or YYACCEPT. */ |
YYPOPSTACK (yylen); |
@@ -5281,8 +4981,7 @@ |
} |
-/* Line 2041 of yacc.c */ |
-#line 2124 "go.y" |
+#line 2132 "go.y" |
static void |
@@ -5295,3 +4994,4 @@ |
loophack = 1; |
} |
+ |