Commit 49da9a8e authored by Rémy Oudompheng's avatar Rémy Oudompheng

cmd/gc: fix inlining of unnamed structs with embedded fields.

Update #5910.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/11373044
parent 8a0779f9
...@@ -1541,8 +1541,8 @@ structdcl: ...@@ -1541,8 +1541,8 @@ structdcl:
Node *n; Node *n;
l = $1; l = $1;
if(l != nil && l->next == nil && l->n == nil) { if(l == nil) {
// ? symbol, during import // ? symbol, during import (list1(N) == nil)
n = $2; n = $2;
if(n->op == OIND) if(n->op == OIND)
n = n->left; n = n->left;
......
/* A Bison parser, made by GNU Bison 2.3. */ /* A Bison parser, made by GNU Bison 2.5. */
/* Skeleton implementation for Bison's Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation, either version 3 of the License, or
any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -16,9 +15,7 @@ ...@@ -16,9 +15,7 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>. */
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -47,7 +44,7 @@ ...@@ -47,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.3" #define YYBISON_VERSION "2.5"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -55,11 +52,54 @@ ...@@ -55,11 +52,54 @@
/* Pure parsers. */ /* Pure parsers. */
#define YYPURE 0 #define YYPURE 0
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */ /* Using locations. */
#define YYLSP_NEEDED 0 #define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
/* Line 268 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 int isrelease = -1;
static void fixlbrace(int);
/* Line 268 of yacc.c */
#line 83 "y.tab.c"
/* 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
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -171,63 +211,36 @@ ...@@ -171,63 +211,36 @@
/* 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 int isrelease = -1;
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 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
#line 30 "go.y"
{ {
/* Line 293 of yacc.c */
#line 30 "go.y"
Node* node; Node* node;
NodeList* list; NodeList* list;
Type* type; Type* type;
Sym* sym; Sym* sym;
struct Val val; struct Val val;
int i; int i;
}
/* Line 193 of yacc.c. */
#line 218 "y.tab.c"
YYSTYPE; /* Line 293 of yacc.c */
#line 232 "y.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */ /* Line 343 of yacc.c */
#line 231 "y.tab.c" #line 244 "y.tab.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -302,14 +315,14 @@ typedef short int yytype_int16; ...@@ -302,14 +315,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static int static int
YYID (int i) YYID (int yyi)
#else #else
static int static int
YYID (i) YYID (yyi)
int i; int yyi;
#endif #endif
{ {
return i; return yyi;
} }
#endif #endif
...@@ -330,11 +343,11 @@ YYID (i) ...@@ -330,11 +343,11 @@ YYID (i)
# define alloca _alloca # define alloca _alloca
# else # else
# define YYSTACK_ALLOC alloca # define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# endif # endif
...@@ -357,24 +370,24 @@ YYID (i) ...@@ -357,24 +370,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM # ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif # endif
# if (defined __cplusplus && ! defined _STDLIB_H \ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \ && ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# ifndef YYMALLOC # ifndef YYMALLOC
# define YYMALLOC malloc # define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef YYFREE # ifndef YYFREE
# define YYFREE free # define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
...@@ -390,9 +403,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ ...@@ -390,9 +403,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */ /* A type that is properly aligned for any stack member. */
union yyalloc union yyalloc
{ {
yytype_int16 yyss; yytype_int16 yyss_alloc;
YYSTYPE yyvs; YYSTYPE yyvs_alloc;
}; };
/* The size of the maximum gap between one aligned stack and the next. */ /* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
...@@ -403,6 +416,27 @@ union yyalloc ...@@ -403,6 +416,27 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM) + YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
/* 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) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do /* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */ not overlap. */
# ifndef YYCOPY # ifndef YYCOPY
...@@ -420,24 +454,7 @@ union yyalloc ...@@ -420,24 +454,7 @@ union yyalloc
while (YYID (0)) while (YYID (0))
# endif # endif
# endif # endif
#endif /* !YYCOPY_NEEDED */
/* 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) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 4 #define YYFINAL 4
...@@ -714,16 +731,16 @@ const char *yytname[] = ...@@ -714,16 +731,16 @@ const char *yytname[] =
"'/'", "'%'", "'&'", "NotPackage", "NotParen", "'('", "')'", "'/'", "'%'", "'&'", "NotPackage", "NotParen", "'('", "')'",
"PreferToRightParen", "';'", "'.'", "'$'", "'='", "':'", "'{'", "'}'", "PreferToRightParen", "';'", "'.'", "'$'", "'='", "':'", "'{'", "'}'",
"'!'", "'~'", "'['", "']'", "'?'", "'@'", "','", "$accept", "file", "'!'", "'~'", "'['", "']'", "'?'", "'@'", "','", "$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_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", "constdcl", "constdcl1", "typedclname", "typedcl", "simple_stmt", "case",
"compound_stmt", "@3", "caseblock", "@4", "caseblock_list", "loop_body", "compound_stmt", "$@3", "caseblock", "$@4", "caseblock_list",
"@5", "range_stmt", "for_header", "for_body", "for_stmt", "@6", "loop_body", "$@5", "range_stmt", "for_header", "for_body", "for_stmt",
"if_header", "if_stmt", "@7", "@8", "@9", "elseif", "@10", "elseif_list", "$@6", "if_header", "if_stmt", "$@7", "$@8", "$@9", "elseif", "$@10",
"else", "switch_stmt", "@11", "@12", "select_stmt", "@13", "expr", "elseif_list", "else", "switch_stmt", "$@11", "$@12", "select_stmt",
"uexpr", "pseudocall", "pexpr_no_paren", "start_complit", "keyval", "$@13", "expr", "uexpr", "pseudocall", "pexpr_no_paren", "start_complit",
"bare_complitexpr", "complitexpr", "pexpr", "expr_or_type", "keyval", "bare_complitexpr", "complitexpr", "pexpr", "expr_or_type",
"name_or_type", "lbrace", "new_name", "dcl_name", "onew_name", "sym", "name_or_type", "lbrace", "new_name", "dcl_name", "onew_name", "sym",
"hidden_importsym", "name", "labelname", "dotdotdot", "ntype", "hidden_importsym", "name", "labelname", "dotdotdot", "ntype",
"non_expr_type", "non_recvchantype", "convtype", "comptype", "non_expr_type", "non_recvchantype", "convtype", "comptype",
...@@ -733,7 +750,7 @@ const char *yytname[] = ...@@ -733,7 +750,7 @@ const char *yytname[] =
"vardcl_list", "constdcl_list", "typedcl_list", "structdcl_list", "vardcl_list", "constdcl_list", "typedcl_list", "structdcl_list",
"interfacedcl_list", "structdcl", "packname", "embed", "interfacedcl", "interfacedcl_list", "structdcl", "packname", "embed", "interfacedcl",
"indcl", "arg_type", "arg_type_list", "oarg_type_list_ocomma", "stmt", "indcl", "arg_type", "arg_type_list", "oarg_type_list_ocomma", "stmt",
"non_dcl_stmt", "@14", "stmt_list", "new_name_list", "dcl_name_list", "non_dcl_stmt", "$@14", "stmt_list", "new_name_list", "dcl_name_list",
"expr_list", "expr_or_type_list", "keyval_list", "braced_keyval_list", "expr_list", "expr_or_type_list", "keyval_list", "braced_keyval_list",
"osemi", "ocomma", "oexpr", "oexpr_list", "osimple_stmt", "osemi", "ocomma", "oexpr", "oexpr_list", "osimple_stmt",
"ohidden_funarg_list", "ohidden_structdcl_list", "ohidden_funarg_list", "ohidden_structdcl_list",
...@@ -846,8 +863,8 @@ static const yytype_uint8 yyr2[] = ...@@ -846,8 +863,8 @@ static const yytype_uint8 yyr2[] =
3 3
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
STATE-NUM when YYTABLE doesn't specify something else to do. Zero Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */ means the default is an error. */
static const yytype_uint16 yydefact[] = static const yytype_uint16 yydefact[] =
{ {
...@@ -1036,8 +1053,7 @@ static const yytype_int16 yypgoto[] = ...@@ -1036,8 +1053,7 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. number is the opposite. If YYTABLE_NINF, syntax error. */
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -276 #define YYTABLE_NINF -276
static const yytype_int16 yytable[] = static const yytype_int16 yytable[] =
{ {
...@@ -1263,6 +1279,12 @@ static const yytype_int16 yytable[] = ...@@ -1263,6 +1279,12 @@ static const yytype_int16 yytable[] =
189, 190, 191, 192, 193, 194, 195, 196, 197 189, 190, 191, 192, 193, 194, 195, 196, 197
}; };
#define yypact_value_is_default(yystate) \
((yystate) == (-552))
#define yytable_value_is_error(yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
37, 37, 61, 142, 67, 37, 37, 201, 250, 143, 37, 37, 61, 142, 67, 37, 37, 201, 250, 143,
...@@ -1572,9 +1594,18 @@ static const yytype_uint8 yystos[] = ...@@ -1572,9 +1594,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily /* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC. to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */ 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. */
#define YYFAIL goto yyerrlab #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 YYRECOVERING() (!!yyerrstatus)
...@@ -1584,7 +1615,6 @@ do \ ...@@ -1584,7 +1615,6 @@ do \
{ \ { \
yychar = (Token); \ yychar = (Token); \
yylval = (Value); \ yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \ YYPOPSTACK (1); \
goto yybackup; \ goto yybackup; \
} \ } \
...@@ -1626,19 +1656,10 @@ while (YYID (0)) ...@@ -1626,19 +1656,10 @@ while (YYID (0))
#endif #endif
/* YY_LOCATION_PRINT -- Print the location on the stream. /* This macro is provided for backward compatibility. */
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 #ifndef YY_LOCATION_PRINT
# 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) # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif #endif
...@@ -1742,17 +1763,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) ...@@ -1742,17 +1763,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static void static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else #else
static void static void
yy_stack_print (bottom, top) yy_stack_print (yybottom, yytop)
yytype_int16 *bottom; yytype_int16 *yybottom;
yytype_int16 *top; yytype_int16 *yytop;
#endif #endif
{ {
YYFPRINTF (stderr, "Stack now"); YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom) for (; yybottom <= yytop; yybottom++)
YYFPRINTF (stderr, " %d", *bottom); {
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
...@@ -1786,11 +1810,11 @@ yy_reduce_print (yyvsp, yyrule) ...@@ -1786,11 +1810,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */ /* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++) for (yyi = 0; yyi < yynrhs; yyi++)
{ {
fprintf (stderr, " $%d = ", yyi + 1); YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)]) &(yyvsp[(yyi + 1) - (yynrhs)])
); );
fprintf (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
} }
...@@ -1828,7 +1852,6 @@ int yydebug; ...@@ -1828,7 +1852,6 @@ int yydebug;
#endif #endif
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
# ifndef yystrlen # ifndef yystrlen
...@@ -1930,116 +1953,143 @@ yytnamerr (char *yyres, const char *yystr) ...@@ -1930,116 +1953,143 @@ yytnamerr (char *yyres, const char *yystr)
} }
# endif # endif
/* Copy into YYRESULT an error message about the unexpected token /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
YYCHAR while in state YYSTATE. Return the number of bytes copied, about the unexpected token YYTOKEN for the state stack whose top is
including the terminating null byte. If YYRESULT is null, do not YYSSP.
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)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
return 0; not large enough to hold the message. In that case, also set
else *YYMSG_ALLOC to the required number of bytes. Return 2 if the
{ required number of bytes is too large to store. */
int yytype = YYTRANSLATE (yychar); static int
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1; YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = 0;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx; /* Number of reported tokens (one for the "unexpected", one per
"expected"). */
# if 0 int yycount = 0;
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */ /* There are many possibilities here to consider:
YY_("syntax error, unexpected %s"); - Assume YYFAIL is not used. It's too flawed to consider. See
YY_("syntax error, unexpected %s, expecting %s"); <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
YY_("syntax error, unexpected %s, expecting %s or %s"); for details. YYERROR is fine as it does not invoke this
YY_("syntax error, unexpected %s, expecting %s or %s or %s"); function.
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); - If this state is a consistent state with a default action, then
# endif the only way this function was invoked is if the default action
char *yyfmt; is an error action. In that case, don't check for expected
char const *yyf; tokens because there are none.
static char const yyunexpected[] = "syntax error, unexpected %s"; - The only way there can be no lookahead present (in yychar) is if
static char const yyexpecting[] = ", expecting %s"; this state is a consistent state with a default action. Thus,
static char const yyor[] = " or %s"; detecting the absence of a lookahead is sufficient to determine
char yyformat[sizeof yyunexpected that there is no unexpected or expected token to report. In that
+ sizeof yyexpecting - 1 case, just report a simple "syntax error".
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - Don't assume there isn't a lookahead just because this state is a
* (sizeof yyor - 1))]; consistent state with a default action. There might have been a
char const *yyprefix = yyexpecting; 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 /* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */ YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0; int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */ /* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1; int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 1; int yyx;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx) for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{ {
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{ {
yycount = 1; yycount = 1;
yysize = yysize0; yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break; break;
} }
yyarg[yycount++] = yytname[yyx]; yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize); if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1; yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix); }
yyprefix = yyor; }
} }
yyf = YY_(yyformat); switch (yycount)
yysize1 = yysize + yystrlen (yyf); {
yysize_overflow |= (yysize1 < yysize); # define YYCASE_(N, S) \
yysize = yysize1; 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_
}
if (yysize_overflow) yysize1 = yysize + yystrlen (yyformat);
return YYSIZE_MAXIMUM; if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
if (yyresult) 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. /* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */ 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) char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{ {
yyp += yytnamerr (yyp, yyarg[yyi++]); yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2; yyformat += 2;
} }
else else
{ {
yyp++; yyp++;
yyf++; yyformat++;
} }
} }
} return 0;
return yysize;
}
} }
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
/*-----------------------------------------------. /*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
`-----------------------------------------------*/ `-----------------------------------------------*/
...@@ -2073,7 +2123,6 @@ yydestruct (yymsg, yytype, yyvaluep) ...@@ -2073,7 +2123,6 @@ yydestruct (yymsg, yytype, yyvaluep)
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus #if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM); int yyparse (void *YYPARSE_PARAM);
...@@ -2089,18 +2138,16 @@ int yyparse (); ...@@ -2089,18 +2138,16 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */ #endif /* ! YYPARSE_PARAM */
/* The lookahead symbol. */
/* The look-ahead symbol. */
int yychar, yystate; int yychar, yystate;
/* The semantic value of the look-ahead symbol. */ /* The semantic value of the lookahead symbol. */
YYSTYPE yylval; YYSTYPE yylval;
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int yynerrs; int yynerrs;
/*----------. /*----------.
| yyparse. | | yyparse. |
`----------*/ `----------*/
...@@ -2127,53 +2174,54 @@ yyparse () ...@@ -2127,53 +2174,54 @@ yyparse ()
#endif #endif
#endif #endif
{ {
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* Three stacks and their tools: /* The stacks and their tools:
`yyss': related to states, `yyss': related to states.
`yyvs': related to semantic values, `yyvs': related to semantic values.
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
/* The state stack. */ /* The state stack. */
yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa; yytype_int16 *yyss;
yytype_int16 *yyssp; yytype_int16 *yyssp;
/* The semantic value stack. */ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvs;
YYSTYPE *yyvsp; YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) int yyresult;
/* Lookahead token as an internal (translated) token number. */
YYSIZE_T yystacksize = YYINITDEPTH; int yytoken;
/* The variables used to return semantic value and location from the /* The variables used to return semantic value and location from the
action routines. */ action routines. */
YYSTYPE yyval; YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule. /* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */ Keep to zero when no symbol should be popped. */
int yylen = 0; int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n")); YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0; yystate = 0;
...@@ -2185,7 +2233,6 @@ yyparse () ...@@ -2185,7 +2233,6 @@ yyparse ()
Waste one element of value and location stack Waste one element of value and location stack
so that they stay on the same level as the state stack. so that they stay on the same level as the state stack.
The wasted elements are never initialized. */ The wasted elements are never initialized. */
yyssp = yyss; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
...@@ -2215,7 +2262,6 @@ yyparse () ...@@ -2215,7 +2262,6 @@ yyparse ()
YYSTYPE *yyvs1 = yyvs; YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss; yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the /* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
...@@ -2223,7 +2269,6 @@ yyparse () ...@@ -2223,7 +2269,6 @@ yyparse ()
yyoverflow (YY_("memory exhausted"), yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
&yystacksize); &yystacksize);
yyss = yyss1; yyss = yyss1;
...@@ -2246,9 +2291,8 @@ yyparse () ...@@ -2246,9 +2291,8 @@ yyparse ()
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyexhaustedlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs); YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE # undef YYSTACK_RELOCATE
if (yyss1 != yyssa) if (yyss1 != yyssa)
YYSTACK_FREE (yyss1); YYSTACK_FREE (yyss1);
...@@ -2259,7 +2303,6 @@ yyparse () ...@@ -2259,7 +2303,6 @@ yyparse ()
yyssp = yyss + yysize - 1; yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1; yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n", YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize)); (unsigned long int) yystacksize));
...@@ -2269,6 +2312,9 @@ yyparse () ...@@ -2269,6 +2312,9 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup; goto yybackup;
/*-----------. /*-----------.
...@@ -2277,16 +2323,16 @@ yyparse () ...@@ -2277,16 +2323,16 @@ yyparse ()
yybackup: yybackup:
/* Do appropriate processing given the current state. Read a /* Do appropriate processing given the current state. Read a
look-ahead token if we need one and don't already have one. */ lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yypact_value_is_default (yyn))
goto yydefault; goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */ /* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY) if (yychar == YYEMPTY)
{ {
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
...@@ -2312,25 +2358,21 @@ yybackup: ...@@ -2312,25 +2358,21 @@ yybackup:
yyn = yytable[yyn]; yyn = yytable[yyn];
if (yyn <= 0) if (yyn <= 0)
{ {
if (yyn == 0 || yyn == YYTABLE_NINF) if (yytable_value_is_error (yyn))
goto yyerrlab; goto yyerrlab;
yyn = -yyn; yyn = -yyn;
goto yyreduce; goto yyreduce;
} }
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error /* Count tokens shifted since error; after three, turn off error
status. */ status. */
if (yyerrstatus) if (yyerrstatus)
yyerrstatus--; yyerrstatus--;
/* Shift the look-ahead token. */ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */ /* Discard the shifted token. */
if (yychar != YYEOF)
yychar = YYEMPTY; yychar = YYEMPTY;
yystate = yyn; yystate = yyn;
...@@ -2371,6 +2413,8 @@ yyreduce: ...@@ -2371,6 +2413,8 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 2: case 2:
/* Line 1806 of yacc.c */
#line 130 "go.y" #line 130 "go.y"
{ {
xtop = concat(xtop, (yyvsp[(4) - (4)].list)); xtop = concat(xtop, (yyvsp[(4) - (4)].list));
...@@ -2378,6 +2422,8 @@ yyreduce: ...@@ -2378,6 +2422,8 @@ yyreduce:
break; break;
case 3: case 3:
/* Line 1806 of yacc.c */
#line 136 "go.y" #line 136 "go.y"
{ {
prevlineno = lineno; prevlineno = lineno;
...@@ -2388,6 +2434,8 @@ yyreduce: ...@@ -2388,6 +2434,8 @@ yyreduce:
break; break;
case 4: case 4:
/* Line 1806 of yacc.c */
#line 143 "go.y" #line 143 "go.y"
{ {
mkpackage((yyvsp[(2) - (3)].sym)->name); mkpackage((yyvsp[(2) - (3)].sym)->name);
...@@ -2395,6 +2443,8 @@ yyreduce: ...@@ -2395,6 +2443,8 @@ yyreduce:
break; break;
case 5: case 5:
/* Line 1806 of yacc.c */
#line 153 "go.y" #line 153 "go.y"
{ {
importpkg = runtimepkg; importpkg = runtimepkg;
...@@ -2408,6 +2458,8 @@ yyreduce: ...@@ -2408,6 +2458,8 @@ yyreduce:
break; break;
case 6: case 6:
/* Line 1806 of yacc.c */
#line 164 "go.y" #line 164 "go.y"
{ {
importpkg = nil; importpkg = nil;
...@@ -2415,6 +2467,8 @@ yyreduce: ...@@ -2415,6 +2467,8 @@ yyreduce:
break; break;
case 12: case 12:
/* Line 1806 of yacc.c */
#line 178 "go.y" #line 178 "go.y"
{ {
Pkg *ipkg; Pkg *ipkg;
...@@ -2455,6 +2509,8 @@ yyreduce: ...@@ -2455,6 +2509,8 @@ yyreduce:
break; break;
case 13: case 13:
/* Line 1806 of yacc.c */
#line 215 "go.y" #line 215 "go.y"
{ {
// When an invalid import path is passed to importfile, // When an invalid import path is passed to importfile,
...@@ -2467,6 +2523,8 @@ yyreduce: ...@@ -2467,6 +2523,8 @@ yyreduce:
break; break;
case 16: case 16:
/* Line 1806 of yacc.c */
#line 230 "go.y" #line 230 "go.y"
{ {
// import with original name // import with original name
...@@ -2477,6 +2535,8 @@ yyreduce: ...@@ -2477,6 +2535,8 @@ yyreduce:
break; break;
case 17: case 17:
/* Line 1806 of yacc.c */
#line 237 "go.y" #line 237 "go.y"
{ {
// import with given name // import with given name
...@@ -2487,6 +2547,8 @@ yyreduce: ...@@ -2487,6 +2547,8 @@ yyreduce:
break; break;
case 18: case 18:
/* Line 1806 of yacc.c */
#line 244 "go.y" #line 244 "go.y"
{ {
// import into my name space // import into my name space
...@@ -2497,6 +2559,8 @@ yyreduce: ...@@ -2497,6 +2559,8 @@ yyreduce:
break; break;
case 19: case 19:
/* Line 1806 of yacc.c */
#line 253 "go.y" #line 253 "go.y"
{ {
if(importpkg->name == nil) { if(importpkg->name == nil) {
...@@ -2513,6 +2577,8 @@ yyreduce: ...@@ -2513,6 +2577,8 @@ yyreduce:
break; break;
case 21: case 21:
/* Line 1806 of yacc.c */
#line 268 "go.y" #line 268 "go.y"
{ {
if(strcmp((yyvsp[(1) - (1)].sym)->name, "safe") == 0) if(strcmp((yyvsp[(1) - (1)].sym)->name, "safe") == 0)
...@@ -2521,6 +2587,8 @@ yyreduce: ...@@ -2521,6 +2587,8 @@ yyreduce:
break; break;
case 22: case 22:
/* Line 1806 of yacc.c */
#line 274 "go.y" #line 274 "go.y"
{ {
defercheckwidth(); defercheckwidth();
...@@ -2528,6 +2596,8 @@ yyreduce: ...@@ -2528,6 +2596,8 @@ yyreduce:
break; break;
case 23: case 23:
/* Line 1806 of yacc.c */
#line 278 "go.y" #line 278 "go.y"
{ {
resumecheckwidth(); resumecheckwidth();
...@@ -2536,6 +2606,8 @@ yyreduce: ...@@ -2536,6 +2606,8 @@ yyreduce:
break; break;
case 24: case 24:
/* Line 1806 of yacc.c */
#line 287 "go.y" #line 287 "go.y"
{ {
yyerror("empty top-level declaration"); yyerror("empty top-level declaration");
...@@ -2544,6 +2616,8 @@ yyreduce: ...@@ -2544,6 +2616,8 @@ yyreduce:
break; break;
case 26: case 26:
/* Line 1806 of yacc.c */
#line 293 "go.y" #line 293 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -2551,6 +2625,8 @@ yyreduce: ...@@ -2551,6 +2625,8 @@ yyreduce:
break; break;
case 27: case 27:
/* Line 1806 of yacc.c */
#line 297 "go.y" #line 297 "go.y"
{ {
yyerror("non-declaration statement outside function body"); yyerror("non-declaration statement outside function body");
...@@ -2559,6 +2635,8 @@ yyreduce: ...@@ -2559,6 +2635,8 @@ yyreduce:
break; break;
case 28: case 28:
/* Line 1806 of yacc.c */
#line 302 "go.y" #line 302 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -2566,6 +2644,8 @@ yyreduce: ...@@ -2566,6 +2644,8 @@ yyreduce:
break; break;
case 29: case 29:
/* Line 1806 of yacc.c */
#line 308 "go.y" #line 308 "go.y"
{ {
(yyval.list) = (yyvsp[(2) - (2)].list); (yyval.list) = (yyvsp[(2) - (2)].list);
...@@ -2573,6 +2653,8 @@ yyreduce: ...@@ -2573,6 +2653,8 @@ yyreduce:
break; break;
case 30: case 30:
/* Line 1806 of yacc.c */
#line 312 "go.y" #line 312 "go.y"
{ {
(yyval.list) = (yyvsp[(3) - (5)].list); (yyval.list) = (yyvsp[(3) - (5)].list);
...@@ -2580,6 +2662,8 @@ yyreduce: ...@@ -2580,6 +2662,8 @@ yyreduce:
break; break;
case 31: case 31:
/* Line 1806 of yacc.c */
#line 316 "go.y" #line 316 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -2587,6 +2671,8 @@ yyreduce: ...@@ -2587,6 +2671,8 @@ yyreduce:
break; break;
case 32: case 32:
/* Line 1806 of yacc.c */
#line 320 "go.y" #line 320 "go.y"
{ {
(yyval.list) = (yyvsp[(2) - (2)].list); (yyval.list) = (yyvsp[(2) - (2)].list);
...@@ -2596,6 +2682,8 @@ yyreduce: ...@@ -2596,6 +2682,8 @@ yyreduce:
break; break;
case 33: case 33:
/* Line 1806 of yacc.c */
#line 326 "go.y" #line 326 "go.y"
{ {
(yyval.list) = (yyvsp[(3) - (5)].list); (yyval.list) = (yyvsp[(3) - (5)].list);
...@@ -2605,6 +2693,8 @@ yyreduce: ...@@ -2605,6 +2693,8 @@ yyreduce:
break; break;
case 34: case 34:
/* Line 1806 of yacc.c */
#line 332 "go.y" #line 332 "go.y"
{ {
(yyval.list) = concat((yyvsp[(3) - (7)].list), (yyvsp[(5) - (7)].list)); (yyval.list) = concat((yyvsp[(3) - (7)].list), (yyvsp[(5) - (7)].list));
...@@ -2614,6 +2704,8 @@ yyreduce: ...@@ -2614,6 +2704,8 @@ yyreduce:
break; break;
case 35: case 35:
/* Line 1806 of yacc.c */
#line 338 "go.y" #line 338 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -2622,6 +2714,8 @@ yyreduce: ...@@ -2622,6 +2714,8 @@ yyreduce:
break; break;
case 36: case 36:
/* Line 1806 of yacc.c */
#line 343 "go.y" #line 343 "go.y"
{ {
(yyval.list) = list1((yyvsp[(2) - (2)].node)); (yyval.list) = list1((yyvsp[(2) - (2)].node));
...@@ -2629,6 +2723,8 @@ yyreduce: ...@@ -2629,6 +2723,8 @@ yyreduce:
break; break;
case 37: case 37:
/* Line 1806 of yacc.c */
#line 347 "go.y" #line 347 "go.y"
{ {
(yyval.list) = (yyvsp[(3) - (5)].list); (yyval.list) = (yyvsp[(3) - (5)].list);
...@@ -2636,6 +2732,8 @@ yyreduce: ...@@ -2636,6 +2732,8 @@ yyreduce:
break; break;
case 38: case 38:
/* Line 1806 of yacc.c */
#line 351 "go.y" #line 351 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -2643,6 +2741,8 @@ yyreduce: ...@@ -2643,6 +2741,8 @@ yyreduce:
break; break;
case 39: case 39:
/* Line 1806 of yacc.c */
#line 357 "go.y" #line 357 "go.y"
{ {
iota = 0; iota = 0;
...@@ -2650,6 +2750,8 @@ yyreduce: ...@@ -2650,6 +2750,8 @@ yyreduce:
break; break;
case 40: case 40:
/* Line 1806 of yacc.c */
#line 363 "go.y" #line 363 "go.y"
{ {
(yyval.list) = variter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); (yyval.list) = variter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil);
...@@ -2657,6 +2759,8 @@ yyreduce: ...@@ -2657,6 +2759,8 @@ yyreduce:
break; break;
case 41: case 41:
/* Line 1806 of yacc.c */
#line 367 "go.y" #line 367 "go.y"
{ {
(yyval.list) = variter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); (yyval.list) = variter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list));
...@@ -2664,6 +2768,8 @@ yyreduce: ...@@ -2664,6 +2768,8 @@ yyreduce:
break; break;
case 42: case 42:
/* Line 1806 of yacc.c */
#line 371 "go.y" #line 371 "go.y"
{ {
(yyval.list) = variter((yyvsp[(1) - (3)].list), nil, (yyvsp[(3) - (3)].list)); (yyval.list) = variter((yyvsp[(1) - (3)].list), nil, (yyvsp[(3) - (3)].list));
...@@ -2671,6 +2777,8 @@ yyreduce: ...@@ -2671,6 +2777,8 @@ yyreduce:
break; break;
case 43: case 43:
/* Line 1806 of yacc.c */
#line 377 "go.y" #line 377 "go.y"
{ {
(yyval.list) = constiter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); (yyval.list) = constiter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list));
...@@ -2678,6 +2786,8 @@ yyreduce: ...@@ -2678,6 +2786,8 @@ yyreduce:
break; break;
case 44: case 44:
/* Line 1806 of yacc.c */
#line 381 "go.y" #line 381 "go.y"
{ {
(yyval.list) = constiter((yyvsp[(1) - (3)].list), N, (yyvsp[(3) - (3)].list)); (yyval.list) = constiter((yyvsp[(1) - (3)].list), N, (yyvsp[(3) - (3)].list));
...@@ -2685,6 +2795,8 @@ yyreduce: ...@@ -2685,6 +2795,8 @@ yyreduce:
break; break;
case 46: case 46:
/* Line 1806 of yacc.c */
#line 388 "go.y" #line 388 "go.y"
{ {
(yyval.list) = constiter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); (yyval.list) = constiter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil);
...@@ -2692,6 +2804,8 @@ yyreduce: ...@@ -2692,6 +2804,8 @@ yyreduce:
break; break;
case 47: case 47:
/* Line 1806 of yacc.c */
#line 392 "go.y" #line 392 "go.y"
{ {
(yyval.list) = constiter((yyvsp[(1) - (1)].list), N, nil); (yyval.list) = constiter((yyvsp[(1) - (1)].list), N, nil);
...@@ -2699,6 +2813,8 @@ yyreduce: ...@@ -2699,6 +2813,8 @@ yyreduce:
break; break;
case 48: case 48:
/* Line 1806 of yacc.c */
#line 398 "go.y" #line 398 "go.y"
{ {
// different from dclname because the name // different from dclname because the name
...@@ -2709,6 +2825,8 @@ yyreduce: ...@@ -2709,6 +2825,8 @@ yyreduce:
break; break;
case 49: case 49:
/* Line 1806 of yacc.c */
#line 407 "go.y" #line 407 "go.y"
{ {
(yyval.node) = typedcl1((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), 1); (yyval.node) = typedcl1((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), 1);
...@@ -2716,6 +2834,8 @@ yyreduce: ...@@ -2716,6 +2834,8 @@ yyreduce:
break; break;
case 50: case 50:
/* Line 1806 of yacc.c */
#line 413 "go.y" #line 413 "go.y"
{ {
(yyval.node) = (yyvsp[(1) - (1)].node); (yyval.node) = (yyvsp[(1) - (1)].node);
...@@ -2737,6 +2857,8 @@ yyreduce: ...@@ -2737,6 +2857,8 @@ yyreduce:
break; break;
case 51: case 51:
/* Line 1806 of yacc.c */
#line 431 "go.y" #line 431 "go.y"
{ {
(yyval.node) = nod(OASOP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OASOP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2745,6 +2867,8 @@ yyreduce: ...@@ -2745,6 +2867,8 @@ yyreduce:
break; break;
case 52: case 52:
/* Line 1806 of yacc.c */
#line 436 "go.y" #line 436 "go.y"
{ {
if((yyvsp[(1) - (3)].list)->next == nil && (yyvsp[(3) - (3)].list)->next == nil) { if((yyvsp[(1) - (3)].list)->next == nil && (yyvsp[(3) - (3)].list)->next == nil) {
...@@ -2760,6 +2884,8 @@ yyreduce: ...@@ -2760,6 +2884,8 @@ yyreduce:
break; break;
case 53: case 53:
/* Line 1806 of yacc.c */
#line 448 "go.y" #line 448 "go.y"
{ {
if((yyvsp[(3) - (3)].list)->n->op == OTYPESW) { if((yyvsp[(3) - (3)].list)->n->op == OTYPESW) {
...@@ -2779,6 +2905,8 @@ yyreduce: ...@@ -2779,6 +2905,8 @@ yyreduce:
break; break;
case 54: case 54:
/* Line 1806 of yacc.c */
#line 464 "go.y" #line 464 "go.y"
{ {
(yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); (yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1));
...@@ -2787,6 +2915,8 @@ yyreduce: ...@@ -2787,6 +2915,8 @@ yyreduce:
break; break;
case 55: case 55:
/* Line 1806 of yacc.c */
#line 469 "go.y" #line 469 "go.y"
{ {
(yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); (yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1));
...@@ -2795,6 +2925,8 @@ yyreduce: ...@@ -2795,6 +2925,8 @@ yyreduce:
break; break;
case 56: case 56:
/* Line 1806 of yacc.c */
#line 476 "go.y" #line 476 "go.y"
{ {
Node *n, *nn; Node *n, *nn;
...@@ -2818,6 +2950,8 @@ yyreduce: ...@@ -2818,6 +2950,8 @@ yyreduce:
break; break;
case 57: case 57:
/* Line 1806 of yacc.c */
#line 496 "go.y" #line 496 "go.y"
{ {
Node *n; Node *n;
...@@ -2839,6 +2973,8 @@ yyreduce: ...@@ -2839,6 +2973,8 @@ yyreduce:
break; break;
case 58: case 58:
/* Line 1806 of yacc.c */
#line 514 "go.y" #line 514 "go.y"
{ {
// will be converted to OCASE // will be converted to OCASE
...@@ -2851,6 +2987,8 @@ yyreduce: ...@@ -2851,6 +2987,8 @@ yyreduce:
break; break;
case 59: case 59:
/* Line 1806 of yacc.c */
#line 523 "go.y" #line 523 "go.y"
{ {
Node *n, *nn; Node *n, *nn;
...@@ -2870,6 +3008,8 @@ yyreduce: ...@@ -2870,6 +3008,8 @@ yyreduce:
break; break;
case 60: case 60:
/* Line 1806 of yacc.c */
#line 541 "go.y" #line 541 "go.y"
{ {
markdcl(); markdcl();
...@@ -2877,6 +3017,8 @@ yyreduce: ...@@ -2877,6 +3017,8 @@ yyreduce:
break; break;
case 61: case 61:
/* Line 1806 of yacc.c */
#line 545 "go.y" #line 545 "go.y"
{ {
if((yyvsp[(3) - (4)].list) == nil) if((yyvsp[(3) - (4)].list) == nil)
...@@ -2888,6 +3030,8 @@ yyreduce: ...@@ -2888,6 +3030,8 @@ yyreduce:
break; break;
case 62: case 62:
/* Line 1806 of yacc.c */
#line 555 "go.y" #line 555 "go.y"
{ {
// If the last token read by the lexer was consumed // If the last token read by the lexer was consumed
...@@ -2901,6 +3045,8 @@ yyreduce: ...@@ -2901,6 +3045,8 @@ yyreduce:
break; break;
case 63: case 63:
/* Line 1806 of yacc.c */
#line 565 "go.y" #line 565 "go.y"
{ {
int last; int last;
...@@ -2923,6 +3069,8 @@ yyreduce: ...@@ -2923,6 +3069,8 @@ yyreduce:
break; break;
case 64: case 64:
/* Line 1806 of yacc.c */
#line 585 "go.y" #line 585 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -2930,6 +3078,8 @@ yyreduce: ...@@ -2930,6 +3078,8 @@ yyreduce:
break; break;
case 65: case 65:
/* Line 1806 of yacc.c */
#line 589 "go.y" #line 589 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); (yyval.list) = list((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node));
...@@ -2937,6 +3087,8 @@ yyreduce: ...@@ -2937,6 +3087,8 @@ yyreduce:
break; break;
case 66: case 66:
/* Line 1806 of yacc.c */
#line 595 "go.y" #line 595 "go.y"
{ {
markdcl(); markdcl();
...@@ -2944,6 +3096,8 @@ yyreduce: ...@@ -2944,6 +3096,8 @@ yyreduce:
break; break;
case 67: case 67:
/* Line 1806 of yacc.c */
#line 599 "go.y" #line 599 "go.y"
{ {
(yyval.list) = (yyvsp[(3) - (4)].list); (yyval.list) = (yyvsp[(3) - (4)].list);
...@@ -2952,6 +3106,8 @@ yyreduce: ...@@ -2952,6 +3106,8 @@ yyreduce:
break; break;
case 68: case 68:
/* Line 1806 of yacc.c */
#line 606 "go.y" #line 606 "go.y"
{ {
(yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); (yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node));
...@@ -2961,6 +3117,8 @@ yyreduce: ...@@ -2961,6 +3117,8 @@ yyreduce:
break; break;
case 69: case 69:
/* Line 1806 of yacc.c */
#line 612 "go.y" #line 612 "go.y"
{ {
(yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); (yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node));
...@@ -2971,6 +3129,8 @@ yyreduce: ...@@ -2971,6 +3129,8 @@ yyreduce:
break; break;
case 70: case 70:
/* Line 1806 of yacc.c */
#line 621 "go.y" #line 621 "go.y"
{ {
// init ; test ; incr // init ; test ; incr
...@@ -2985,6 +3145,8 @@ yyreduce: ...@@ -2985,6 +3145,8 @@ yyreduce:
break; break;
case 71: case 71:
/* Line 1806 of yacc.c */
#line 632 "go.y" #line 632 "go.y"
{ {
// normal test // normal test
...@@ -2994,6 +3156,8 @@ yyreduce: ...@@ -2994,6 +3156,8 @@ yyreduce:
break; break;
case 73: case 73:
/* Line 1806 of yacc.c */
#line 641 "go.y" #line 641 "go.y"
{ {
(yyval.node) = (yyvsp[(1) - (2)].node); (yyval.node) = (yyvsp[(1) - (2)].node);
...@@ -3002,6 +3166,8 @@ yyreduce: ...@@ -3002,6 +3166,8 @@ yyreduce:
break; break;
case 74: case 74:
/* Line 1806 of yacc.c */
#line 648 "go.y" #line 648 "go.y"
{ {
markdcl(); markdcl();
...@@ -3009,6 +3175,8 @@ yyreduce: ...@@ -3009,6 +3175,8 @@ yyreduce:
break; break;
case 75: case 75:
/* Line 1806 of yacc.c */
#line 652 "go.y" #line 652 "go.y"
{ {
(yyval.node) = (yyvsp[(3) - (3)].node); (yyval.node) = (yyvsp[(3) - (3)].node);
...@@ -3017,6 +3185,8 @@ yyreduce: ...@@ -3017,6 +3185,8 @@ yyreduce:
break; break;
case 76: case 76:
/* Line 1806 of yacc.c */
#line 659 "go.y" #line 659 "go.y"
{ {
// test // test
...@@ -3026,6 +3196,8 @@ yyreduce: ...@@ -3026,6 +3196,8 @@ yyreduce:
break; break;
case 77: case 77:
/* Line 1806 of yacc.c */
#line 665 "go.y" #line 665 "go.y"
{ {
// init ; test // init ; test
...@@ -3037,6 +3209,8 @@ yyreduce: ...@@ -3037,6 +3209,8 @@ yyreduce:
break; break;
case 78: case 78:
/* Line 1806 of yacc.c */
#line 676 "go.y" #line 676 "go.y"
{ {
markdcl(); markdcl();
...@@ -3044,6 +3218,8 @@ yyreduce: ...@@ -3044,6 +3218,8 @@ yyreduce:
break; break;
case 79: case 79:
/* Line 1806 of yacc.c */
#line 680 "go.y" #line 680 "go.y"
{ {
if((yyvsp[(3) - (3)].node)->ntest == N) if((yyvsp[(3) - (3)].node)->ntest == N)
...@@ -3052,6 +3228,8 @@ yyreduce: ...@@ -3052,6 +3228,8 @@ yyreduce:
break; break;
case 80: case 80:
/* Line 1806 of yacc.c */
#line 685 "go.y" #line 685 "go.y"
{ {
(yyvsp[(3) - (5)].node)->nbody = (yyvsp[(5) - (5)].list); (yyvsp[(3) - (5)].node)->nbody = (yyvsp[(5) - (5)].list);
...@@ -3059,6 +3237,8 @@ yyreduce: ...@@ -3059,6 +3237,8 @@ yyreduce:
break; break;
case 81: case 81:
/* Line 1806 of yacc.c */
#line 689 "go.y" #line 689 "go.y"
{ {
Node *n; Node *n;
...@@ -3077,6 +3257,8 @@ yyreduce: ...@@ -3077,6 +3257,8 @@ yyreduce:
break; break;
case 82: case 82:
/* Line 1806 of yacc.c */
#line 706 "go.y" #line 706 "go.y"
{ {
markdcl(); markdcl();
...@@ -3084,6 +3266,8 @@ yyreduce: ...@@ -3084,6 +3266,8 @@ yyreduce:
break; break;
case 83: case 83:
/* Line 1806 of yacc.c */
#line 710 "go.y" #line 710 "go.y"
{ {
if((yyvsp[(4) - (5)].node)->ntest == N) if((yyvsp[(4) - (5)].node)->ntest == N)
...@@ -3094,6 +3278,8 @@ yyreduce: ...@@ -3094,6 +3278,8 @@ yyreduce:
break; break;
case 84: case 84:
/* Line 1806 of yacc.c */
#line 718 "go.y" #line 718 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -3101,6 +3287,8 @@ yyreduce: ...@@ -3101,6 +3287,8 @@ yyreduce:
break; break;
case 85: case 85:
/* Line 1806 of yacc.c */
#line 722 "go.y" #line 722 "go.y"
{ {
(yyval.list) = concat((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); (yyval.list) = concat((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list));
...@@ -3108,6 +3296,8 @@ yyreduce: ...@@ -3108,6 +3296,8 @@ yyreduce:
break; break;
case 86: case 86:
/* Line 1806 of yacc.c */
#line 727 "go.y" #line 727 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -3115,6 +3305,8 @@ yyreduce: ...@@ -3115,6 +3305,8 @@ yyreduce:
break; break;
case 87: case 87:
/* Line 1806 of yacc.c */
#line 731 "go.y" #line 731 "go.y"
{ {
NodeList *node; NodeList *node;
...@@ -3127,6 +3319,8 @@ yyreduce: ...@@ -3127,6 +3319,8 @@ yyreduce:
break; break;
case 88: case 88:
/* Line 1806 of yacc.c */
#line 742 "go.y" #line 742 "go.y"
{ {
markdcl(); markdcl();
...@@ -3134,6 +3328,8 @@ yyreduce: ...@@ -3134,6 +3328,8 @@ yyreduce:
break; break;
case 89: case 89:
/* Line 1806 of yacc.c */
#line 746 "go.y" #line 746 "go.y"
{ {
Node *n; Node *n;
...@@ -3145,6 +3341,8 @@ yyreduce: ...@@ -3145,6 +3341,8 @@ yyreduce:
break; break;
case 90: case 90:
/* Line 1806 of yacc.c */
#line 754 "go.y" #line 754 "go.y"
{ {
(yyval.node) = (yyvsp[(3) - (7)].node); (yyval.node) = (yyvsp[(3) - (7)].node);
...@@ -3156,6 +3354,8 @@ yyreduce: ...@@ -3156,6 +3354,8 @@ yyreduce:
break; break;
case 91: case 91:
/* Line 1806 of yacc.c */
#line 764 "go.y" #line 764 "go.y"
{ {
typesw = nod(OXXX, typesw, N); typesw = nod(OXXX, typesw, N);
...@@ -3163,6 +3363,8 @@ yyreduce: ...@@ -3163,6 +3363,8 @@ yyreduce:
break; break;
case 92: case 92:
/* Line 1806 of yacc.c */
#line 768 "go.y" #line 768 "go.y"
{ {
(yyval.node) = nod(OSELECT, N, N); (yyval.node) = nod(OSELECT, N, N);
...@@ -3173,6 +3375,8 @@ yyreduce: ...@@ -3173,6 +3375,8 @@ yyreduce:
break; break;
case 94: case 94:
/* Line 1806 of yacc.c */
#line 781 "go.y" #line 781 "go.y"
{ {
(yyval.node) = nod(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3180,6 +3384,8 @@ yyreduce: ...@@ -3180,6 +3384,8 @@ yyreduce:
break; break;
case 95: case 95:
/* Line 1806 of yacc.c */
#line 785 "go.y" #line 785 "go.y"
{ {
(yyval.node) = nod(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3187,6 +3393,8 @@ yyreduce: ...@@ -3187,6 +3393,8 @@ yyreduce:
break; break;
case 96: case 96:
/* Line 1806 of yacc.c */
#line 789 "go.y" #line 789 "go.y"
{ {
(yyval.node) = nod(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3194,6 +3402,8 @@ yyreduce: ...@@ -3194,6 +3402,8 @@ yyreduce:
break; break;
case 97: case 97:
/* Line 1806 of yacc.c */
#line 793 "go.y" #line 793 "go.y"
{ {
(yyval.node) = nod(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3201,6 +3411,8 @@ yyreduce: ...@@ -3201,6 +3411,8 @@ yyreduce:
break; break;
case 98: case 98:
/* Line 1806 of yacc.c */
#line 797 "go.y" #line 797 "go.y"
{ {
(yyval.node) = nod(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3208,6 +3420,8 @@ yyreduce: ...@@ -3208,6 +3420,8 @@ yyreduce:
break; break;
case 99: case 99:
/* Line 1806 of yacc.c */
#line 801 "go.y" #line 801 "go.y"
{ {
(yyval.node) = nod(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3215,6 +3429,8 @@ yyreduce: ...@@ -3215,6 +3429,8 @@ yyreduce:
break; break;
case 100: case 100:
/* Line 1806 of yacc.c */
#line 805 "go.y" #line 805 "go.y"
{ {
(yyval.node) = nod(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3222,6 +3438,8 @@ yyreduce: ...@@ -3222,6 +3438,8 @@ yyreduce:
break; break;
case 101: case 101:
/* Line 1806 of yacc.c */
#line 809 "go.y" #line 809 "go.y"
{ {
(yyval.node) = nod(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3229,6 +3447,8 @@ yyreduce: ...@@ -3229,6 +3447,8 @@ yyreduce:
break; break;
case 102: case 102:
/* Line 1806 of yacc.c */
#line 813 "go.y" #line 813 "go.y"
{ {
(yyval.node) = nod(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3236,6 +3456,8 @@ yyreduce: ...@@ -3236,6 +3456,8 @@ yyreduce:
break; break;
case 103: case 103:
/* Line 1806 of yacc.c */
#line 817 "go.y" #line 817 "go.y"
{ {
(yyval.node) = nod(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3243,6 +3465,8 @@ yyreduce: ...@@ -3243,6 +3465,8 @@ yyreduce:
break; break;
case 104: case 104:
/* Line 1806 of yacc.c */
#line 821 "go.y" #line 821 "go.y"
{ {
(yyval.node) = nod(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3250,6 +3474,8 @@ yyreduce: ...@@ -3250,6 +3474,8 @@ yyreduce:
break; break;
case 105: case 105:
/* Line 1806 of yacc.c */
#line 825 "go.y" #line 825 "go.y"
{ {
(yyval.node) = nod(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3257,6 +3483,8 @@ yyreduce: ...@@ -3257,6 +3483,8 @@ yyreduce:
break; break;
case 106: case 106:
/* Line 1806 of yacc.c */
#line 829 "go.y" #line 829 "go.y"
{ {
(yyval.node) = nod(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3264,6 +3492,8 @@ yyreduce: ...@@ -3264,6 +3492,8 @@ yyreduce:
break; break;
case 107: case 107:
/* Line 1806 of yacc.c */
#line 833 "go.y" #line 833 "go.y"
{ {
(yyval.node) = nod(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3271,6 +3501,8 @@ yyreduce: ...@@ -3271,6 +3501,8 @@ yyreduce:
break; break;
case 108: case 108:
/* Line 1806 of yacc.c */
#line 837 "go.y" #line 837 "go.y"
{ {
(yyval.node) = nod(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3278,6 +3510,8 @@ yyreduce: ...@@ -3278,6 +3510,8 @@ yyreduce:
break; break;
case 109: case 109:
/* Line 1806 of yacc.c */
#line 841 "go.y" #line 841 "go.y"
{ {
(yyval.node) = nod(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3285,6 +3519,8 @@ yyreduce: ...@@ -3285,6 +3519,8 @@ yyreduce:
break; break;
case 110: case 110:
/* Line 1806 of yacc.c */
#line 845 "go.y" #line 845 "go.y"
{ {
(yyval.node) = nod(OANDNOT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OANDNOT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3292,6 +3528,8 @@ yyreduce: ...@@ -3292,6 +3528,8 @@ yyreduce:
break; break;
case 111: case 111:
/* Line 1806 of yacc.c */
#line 849 "go.y" #line 849 "go.y"
{ {
(yyval.node) = nod(OLSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OLSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3299,6 +3537,8 @@ yyreduce: ...@@ -3299,6 +3537,8 @@ yyreduce:
break; break;
case 112: case 112:
/* Line 1806 of yacc.c */
#line 853 "go.y" #line 853 "go.y"
{ {
(yyval.node) = nod(ORSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(ORSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3306,6 +3546,8 @@ yyreduce: ...@@ -3306,6 +3546,8 @@ yyreduce:
break; break;
case 113: case 113:
/* Line 1806 of yacc.c */
#line 858 "go.y" #line 858 "go.y"
{ {
(yyval.node) = nod(OSEND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OSEND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3313,6 +3555,8 @@ yyreduce: ...@@ -3313,6 +3555,8 @@ yyreduce:
break; break;
case 115: case 115:
/* Line 1806 of yacc.c */
#line 865 "go.y" #line 865 "go.y"
{ {
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N);
...@@ -3320,6 +3564,8 @@ yyreduce: ...@@ -3320,6 +3564,8 @@ yyreduce:
break; break;
case 116: case 116:
/* Line 1806 of yacc.c */
#line 869 "go.y" #line 869 "go.y"
{ {
if((yyvsp[(2) - (2)].node)->op == OCOMPLIT) { if((yyvsp[(2) - (2)].node)->op == OCOMPLIT) {
...@@ -3334,6 +3580,8 @@ yyreduce: ...@@ -3334,6 +3580,8 @@ yyreduce:
break; break;
case 117: case 117:
/* Line 1806 of yacc.c */
#line 880 "go.y" #line 880 "go.y"
{ {
(yyval.node) = nod(OPLUS, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OPLUS, (yyvsp[(2) - (2)].node), N);
...@@ -3341,6 +3589,8 @@ yyreduce: ...@@ -3341,6 +3589,8 @@ yyreduce:
break; break;
case 118: case 118:
/* Line 1806 of yacc.c */
#line 884 "go.y" #line 884 "go.y"
{ {
(yyval.node) = nod(OMINUS, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OMINUS, (yyvsp[(2) - (2)].node), N);
...@@ -3348,6 +3598,8 @@ yyreduce: ...@@ -3348,6 +3598,8 @@ yyreduce:
break; break;
case 119: case 119:
/* Line 1806 of yacc.c */
#line 888 "go.y" #line 888 "go.y"
{ {
(yyval.node) = nod(ONOT, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(ONOT, (yyvsp[(2) - (2)].node), N);
...@@ -3355,6 +3607,8 @@ yyreduce: ...@@ -3355,6 +3607,8 @@ yyreduce:
break; break;
case 120: case 120:
/* Line 1806 of yacc.c */
#line 892 "go.y" #line 892 "go.y"
{ {
yyerror("the bitwise complement operator is ^"); yyerror("the bitwise complement operator is ^");
...@@ -3363,6 +3617,8 @@ yyreduce: ...@@ -3363,6 +3617,8 @@ yyreduce:
break; break;
case 121: case 121:
/* Line 1806 of yacc.c */
#line 897 "go.y" #line 897 "go.y"
{ {
(yyval.node) = nod(OCOM, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OCOM, (yyvsp[(2) - (2)].node), N);
...@@ -3370,6 +3626,8 @@ yyreduce: ...@@ -3370,6 +3626,8 @@ yyreduce:
break; break;
case 122: case 122:
/* Line 1806 of yacc.c */
#line 901 "go.y" #line 901 "go.y"
{ {
(yyval.node) = nod(ORECV, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(ORECV, (yyvsp[(2) - (2)].node), N);
...@@ -3377,6 +3635,8 @@ yyreduce: ...@@ -3377,6 +3635,8 @@ yyreduce:
break; break;
case 123: case 123:
/* Line 1806 of yacc.c */
#line 911 "go.y" #line 911 "go.y"
{ {
(yyval.node) = nod(OCALL, (yyvsp[(1) - (3)].node), N); (yyval.node) = nod(OCALL, (yyvsp[(1) - (3)].node), N);
...@@ -3384,6 +3644,8 @@ yyreduce: ...@@ -3384,6 +3644,8 @@ yyreduce:
break; break;
case 124: case 124:
/* Line 1806 of yacc.c */
#line 915 "go.y" #line 915 "go.y"
{ {
(yyval.node) = nod(OCALL, (yyvsp[(1) - (5)].node), N); (yyval.node) = nod(OCALL, (yyvsp[(1) - (5)].node), N);
...@@ -3392,6 +3654,8 @@ yyreduce: ...@@ -3392,6 +3654,8 @@ yyreduce:
break; break;
case 125: case 125:
/* Line 1806 of yacc.c */
#line 920 "go.y" #line 920 "go.y"
{ {
(yyval.node) = nod(OCALL, (yyvsp[(1) - (6)].node), N); (yyval.node) = nod(OCALL, (yyvsp[(1) - (6)].node), N);
...@@ -3401,6 +3665,8 @@ yyreduce: ...@@ -3401,6 +3665,8 @@ yyreduce:
break; break;
case 126: case 126:
/* Line 1806 of yacc.c */
#line 928 "go.y" #line 928 "go.y"
{ {
(yyval.node) = nodlit((yyvsp[(1) - (1)].val)); (yyval.node) = nodlit((yyvsp[(1) - (1)].val));
...@@ -3408,6 +3674,8 @@ yyreduce: ...@@ -3408,6 +3674,8 @@ yyreduce:
break; break;
case 128: case 128:
/* Line 1806 of yacc.c */
#line 933 "go.y" #line 933 "go.y"
{ {
if((yyvsp[(1) - (3)].node)->op == OPACK) { if((yyvsp[(1) - (3)].node)->op == OPACK) {
...@@ -3422,6 +3690,8 @@ yyreduce: ...@@ -3422,6 +3690,8 @@ yyreduce:
break; break;
case 129: case 129:
/* Line 1806 of yacc.c */
#line 944 "go.y" #line 944 "go.y"
{ {
(yyval.node) = nod(ODOTTYPE, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node)); (yyval.node) = nod(ODOTTYPE, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node));
...@@ -3429,6 +3699,8 @@ yyreduce: ...@@ -3429,6 +3699,8 @@ yyreduce:
break; break;
case 130: case 130:
/* Line 1806 of yacc.c */
#line 948 "go.y" #line 948 "go.y"
{ {
(yyval.node) = nod(OTYPESW, N, (yyvsp[(1) - (5)].node)); (yyval.node) = nod(OTYPESW, N, (yyvsp[(1) - (5)].node));
...@@ -3436,6 +3708,8 @@ yyreduce: ...@@ -3436,6 +3708,8 @@ yyreduce:
break; break;
case 131: case 131:
/* Line 1806 of yacc.c */
#line 952 "go.y" #line 952 "go.y"
{ {
(yyval.node) = nod(OINDEX, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); (yyval.node) = nod(OINDEX, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
...@@ -3443,6 +3717,8 @@ yyreduce: ...@@ -3443,6 +3717,8 @@ yyreduce:
break; break;
case 132: case 132:
/* Line 1806 of yacc.c */
#line 956 "go.y" #line 956 "go.y"
{ {
(yyval.node) = nod(OSLICE, (yyvsp[(1) - (6)].node), nod(OKEY, (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node))); (yyval.node) = nod(OSLICE, (yyvsp[(1) - (6)].node), nod(OKEY, (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)));
...@@ -3450,6 +3726,8 @@ yyreduce: ...@@ -3450,6 +3726,8 @@ yyreduce:
break; break;
case 133: case 133:
/* Line 1806 of yacc.c */
#line 960 "go.y" #line 960 "go.y"
{ {
// Make sure we don't accidentally release this experimental feature. // Make sure we don't accidentally release this experimental feature.
...@@ -3468,6 +3746,8 @@ yyreduce: ...@@ -3468,6 +3746,8 @@ yyreduce:
break; break;
case 135: case 135:
/* Line 1806 of yacc.c */
#line 976 "go.y" #line 976 "go.y"
{ {
// conversion // conversion
...@@ -3477,6 +3757,8 @@ yyreduce: ...@@ -3477,6 +3757,8 @@ yyreduce:
break; break;
case 136: case 136:
/* Line 1806 of yacc.c */
#line 982 "go.y" #line 982 "go.y"
{ {
(yyval.node) = (yyvsp[(3) - (5)].node); (yyval.node) = (yyvsp[(3) - (5)].node);
...@@ -3487,6 +3769,8 @@ yyreduce: ...@@ -3487,6 +3769,8 @@ yyreduce:
break; break;
case 137: case 137:
/* Line 1806 of yacc.c */
#line 989 "go.y" #line 989 "go.y"
{ {
(yyval.node) = (yyvsp[(3) - (5)].node); (yyval.node) = (yyvsp[(3) - (5)].node);
...@@ -3496,6 +3780,8 @@ yyreduce: ...@@ -3496,6 +3780,8 @@ yyreduce:
break; break;
case 138: case 138:
/* Line 1806 of yacc.c */
#line 995 "go.y" #line 995 "go.y"
{ {
yyerror("cannot parenthesize type in composite literal"); yyerror("cannot parenthesize type in composite literal");
...@@ -3506,6 +3792,8 @@ yyreduce: ...@@ -3506,6 +3792,8 @@ yyreduce:
break; break;
case 140: case 140:
/* Line 1806 of yacc.c */
#line 1004 "go.y" #line 1004 "go.y"
{ {
// composite expression. // composite expression.
...@@ -3515,6 +3803,8 @@ yyreduce: ...@@ -3515,6 +3803,8 @@ yyreduce:
break; break;
case 141: case 141:
/* Line 1806 of yacc.c */
#line 1012 "go.y" #line 1012 "go.y"
{ {
(yyval.node) = nod(OKEY, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = nod(OKEY, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3522,6 +3812,8 @@ yyreduce: ...@@ -3522,6 +3812,8 @@ yyreduce:
break; break;
case 142: case 142:
/* Line 1806 of yacc.c */
#line 1018 "go.y" #line 1018 "go.y"
{ {
// These nodes do not carry line numbers. // These nodes do not carry line numbers.
...@@ -3542,6 +3834,8 @@ yyreduce: ...@@ -3542,6 +3834,8 @@ yyreduce:
break; break;
case 143: case 143:
/* Line 1806 of yacc.c */
#line 1035 "go.y" #line 1035 "go.y"
{ {
(yyval.node) = (yyvsp[(2) - (4)].node); (yyval.node) = (yyvsp[(2) - (4)].node);
...@@ -3550,6 +3844,8 @@ yyreduce: ...@@ -3550,6 +3844,8 @@ yyreduce:
break; break;
case 145: case 145:
/* Line 1806 of yacc.c */
#line 1043 "go.y" #line 1043 "go.y"
{ {
(yyval.node) = (yyvsp[(2) - (4)].node); (yyval.node) = (yyvsp[(2) - (4)].node);
...@@ -3558,6 +3854,8 @@ yyreduce: ...@@ -3558,6 +3854,8 @@ yyreduce:
break; break;
case 147: case 147:
/* Line 1806 of yacc.c */
#line 1051 "go.y" #line 1051 "go.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -3578,6 +3876,8 @@ yyreduce: ...@@ -3578,6 +3876,8 @@ yyreduce:
break; break;
case 151: case 151:
/* Line 1806 of yacc.c */
#line 1077 "go.y" #line 1077 "go.y"
{ {
(yyval.i) = LBODY; (yyval.i) = LBODY;
...@@ -3585,6 +3885,8 @@ yyreduce: ...@@ -3585,6 +3885,8 @@ yyreduce:
break; break;
case 152: case 152:
/* Line 1806 of yacc.c */
#line 1081 "go.y" #line 1081 "go.y"
{ {
(yyval.i) = '{'; (yyval.i) = '{';
...@@ -3592,6 +3894,8 @@ yyreduce: ...@@ -3592,6 +3894,8 @@ yyreduce:
break; break;
case 153: case 153:
/* Line 1806 of yacc.c */
#line 1092 "go.y" #line 1092 "go.y"
{ {
if((yyvsp[(1) - (1)].sym) == S) if((yyvsp[(1) - (1)].sym) == S)
...@@ -3602,6 +3906,8 @@ yyreduce: ...@@ -3602,6 +3906,8 @@ yyreduce:
break; break;
case 154: case 154:
/* Line 1806 of yacc.c */
#line 1101 "go.y" #line 1101 "go.y"
{ {
(yyval.node) = dclname((yyvsp[(1) - (1)].sym)); (yyval.node) = dclname((yyvsp[(1) - (1)].sym));
...@@ -3609,6 +3915,8 @@ yyreduce: ...@@ -3609,6 +3915,8 @@ yyreduce:
break; break;
case 155: case 155:
/* Line 1806 of yacc.c */
#line 1106 "go.y" #line 1106 "go.y"
{ {
(yyval.node) = N; (yyval.node) = N;
...@@ -3616,6 +3924,8 @@ yyreduce: ...@@ -3616,6 +3924,8 @@ yyreduce:
break; break;
case 157: case 157:
/* Line 1806 of yacc.c */
#line 1113 "go.y" #line 1113 "go.y"
{ {
(yyval.sym) = (yyvsp[(1) - (1)].sym); (yyval.sym) = (yyvsp[(1) - (1)].sym);
...@@ -3626,6 +3936,8 @@ yyreduce: ...@@ -3626,6 +3936,8 @@ yyreduce:
break; break;
case 159: case 159:
/* Line 1806 of yacc.c */
#line 1121 "go.y" #line 1121 "go.y"
{ {
(yyval.sym) = S; (yyval.sym) = S;
...@@ -3633,6 +3945,8 @@ yyreduce: ...@@ -3633,6 +3945,8 @@ yyreduce:
break; break;
case 160: case 160:
/* Line 1806 of yacc.c */
#line 1127 "go.y" #line 1127 "go.y"
{ {
Pkg *p; Pkg *p;
...@@ -3649,6 +3963,8 @@ yyreduce: ...@@ -3649,6 +3963,8 @@ yyreduce:
break; break;
case 161: case 161:
/* Line 1806 of yacc.c */
#line 1142 "go.y" #line 1142 "go.y"
{ {
(yyval.node) = oldname((yyvsp[(1) - (1)].sym)); (yyval.node) = oldname((yyvsp[(1) - (1)].sym));
...@@ -3658,6 +3974,8 @@ yyreduce: ...@@ -3658,6 +3974,8 @@ yyreduce:
break; break;
case 163: case 163:
/* Line 1806 of yacc.c */
#line 1162 "go.y" #line 1162 "go.y"
{ {
yyerror("final argument in variadic function missing type"); yyerror("final argument in variadic function missing type");
...@@ -3666,6 +3984,8 @@ yyreduce: ...@@ -3666,6 +3984,8 @@ yyreduce:
break; break;
case 164: case 164:
/* Line 1806 of yacc.c */
#line 1167 "go.y" #line 1167 "go.y"
{ {
(yyval.node) = nod(ODDD, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(ODDD, (yyvsp[(2) - (2)].node), N);
...@@ -3673,6 +3993,8 @@ yyreduce: ...@@ -3673,6 +3993,8 @@ yyreduce:
break; break;
case 170: case 170:
/* Line 1806 of yacc.c */
#line 1178 "go.y" #line 1178 "go.y"
{ {
(yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); (yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N);
...@@ -3680,6 +4002,8 @@ yyreduce: ...@@ -3680,6 +4002,8 @@ yyreduce:
break; break;
case 174: case 174:
/* Line 1806 of yacc.c */
#line 1187 "go.y" #line 1187 "go.y"
{ {
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N);
...@@ -3687,6 +4011,8 @@ yyreduce: ...@@ -3687,6 +4011,8 @@ yyreduce:
break; break;
case 179: case 179:
/* Line 1806 of yacc.c */
#line 1197 "go.y" #line 1197 "go.y"
{ {
(yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); (yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N);
...@@ -3694,6 +4020,8 @@ yyreduce: ...@@ -3694,6 +4020,8 @@ yyreduce:
break; break;
case 189: case 189:
/* Line 1806 of yacc.c */
#line 1218 "go.y" #line 1218 "go.y"
{ {
if((yyvsp[(1) - (3)].node)->op == OPACK) { if((yyvsp[(1) - (3)].node)->op == OPACK) {
...@@ -3708,6 +4036,8 @@ yyreduce: ...@@ -3708,6 +4036,8 @@ yyreduce:
break; break;
case 190: case 190:
/* Line 1806 of yacc.c */
#line 1231 "go.y" #line 1231 "go.y"
{ {
(yyval.node) = nod(OTARRAY, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); (yyval.node) = nod(OTARRAY, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node));
...@@ -3715,6 +4045,8 @@ yyreduce: ...@@ -3715,6 +4045,8 @@ yyreduce:
break; break;
case 191: case 191:
/* Line 1806 of yacc.c */
#line 1235 "go.y" #line 1235 "go.y"
{ {
// array literal of nelem // array literal of nelem
...@@ -3723,6 +4055,8 @@ yyreduce: ...@@ -3723,6 +4055,8 @@ yyreduce:
break; break;
case 192: case 192:
/* Line 1806 of yacc.c */
#line 1240 "go.y" #line 1240 "go.y"
{ {
(yyval.node) = nod(OTCHAN, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OTCHAN, (yyvsp[(2) - (2)].node), N);
...@@ -3731,6 +4065,8 @@ yyreduce: ...@@ -3731,6 +4065,8 @@ yyreduce:
break; break;
case 193: case 193:
/* Line 1806 of yacc.c */
#line 1245 "go.y" #line 1245 "go.y"
{ {
(yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); (yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N);
...@@ -3739,6 +4075,8 @@ yyreduce: ...@@ -3739,6 +4075,8 @@ yyreduce:
break; break;
case 194: case 194:
/* Line 1806 of yacc.c */
#line 1250 "go.y" #line 1250 "go.y"
{ {
(yyval.node) = nod(OTMAP, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); (yyval.node) = nod(OTMAP, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));
...@@ -3746,6 +4084,8 @@ yyreduce: ...@@ -3746,6 +4084,8 @@ yyreduce:
break; break;
case 197: case 197:
/* Line 1806 of yacc.c */
#line 1258 "go.y" #line 1258 "go.y"
{ {
(yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N);
...@@ -3753,6 +4093,8 @@ yyreduce: ...@@ -3753,6 +4093,8 @@ yyreduce:
break; break;
case 198: case 198:
/* Line 1806 of yacc.c */
#line 1264 "go.y" #line 1264 "go.y"
{ {
(yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); (yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N);
...@@ -3761,6 +4103,8 @@ yyreduce: ...@@ -3761,6 +4103,8 @@ yyreduce:
break; break;
case 199: case 199:
/* Line 1806 of yacc.c */
#line 1271 "go.y" #line 1271 "go.y"
{ {
(yyval.node) = nod(OTSTRUCT, N, N); (yyval.node) = nod(OTSTRUCT, N, N);
...@@ -3770,6 +4114,8 @@ yyreduce: ...@@ -3770,6 +4114,8 @@ yyreduce:
break; break;
case 200: case 200:
/* Line 1806 of yacc.c */
#line 1277 "go.y" #line 1277 "go.y"
{ {
(yyval.node) = nod(OTSTRUCT, N, N); (yyval.node) = nod(OTSTRUCT, N, N);
...@@ -3778,6 +4124,8 @@ yyreduce: ...@@ -3778,6 +4124,8 @@ yyreduce:
break; break;
case 201: case 201:
/* Line 1806 of yacc.c */
#line 1284 "go.y" #line 1284 "go.y"
{ {
(yyval.node) = nod(OTINTER, N, N); (yyval.node) = nod(OTINTER, N, N);
...@@ -3787,6 +4135,8 @@ yyreduce: ...@@ -3787,6 +4135,8 @@ yyreduce:
break; break;
case 202: case 202:
/* Line 1806 of yacc.c */
#line 1290 "go.y" #line 1290 "go.y"
{ {
(yyval.node) = nod(OTINTER, N, N); (yyval.node) = nod(OTINTER, N, N);
...@@ -3795,6 +4145,8 @@ yyreduce: ...@@ -3795,6 +4145,8 @@ yyreduce:
break; break;
case 203: case 203:
/* Line 1806 of yacc.c */
#line 1301 "go.y" #line 1301 "go.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -3810,6 +4162,8 @@ yyreduce: ...@@ -3810,6 +4162,8 @@ yyreduce:
break; break;
case 204: case 204:
/* Line 1806 of yacc.c */
#line 1315 "go.y" #line 1315 "go.y"
{ {
Node *t; Node *t;
...@@ -3842,6 +4196,8 @@ yyreduce: ...@@ -3842,6 +4196,8 @@ yyreduce:
break; break;
case 205: case 205:
/* Line 1806 of yacc.c */
#line 1344 "go.y" #line 1344 "go.y"
{ {
Node *rcvr, *t; Node *rcvr, *t;
...@@ -3883,6 +4239,8 @@ yyreduce: ...@@ -3883,6 +4239,8 @@ yyreduce:
break; break;
case 206: case 206:
/* Line 1806 of yacc.c */
#line 1384 "go.y" #line 1384 "go.y"
{ {
Sym *s; Sym *s;
...@@ -3911,6 +4269,8 @@ yyreduce: ...@@ -3911,6 +4269,8 @@ yyreduce:
break; break;
case 207: case 207:
/* Line 1806 of yacc.c */
#line 1409 "go.y" #line 1409 "go.y"
{ {
(yyval.node) = methodname1(newname((yyvsp[(4) - (8)].sym)), (yyvsp[(2) - (8)].list)->n->right); (yyval.node) = methodname1(newname((yyvsp[(4) - (8)].sym)), (yyvsp[(2) - (8)].list)->n->right);
...@@ -3930,6 +4290,8 @@ yyreduce: ...@@ -3930,6 +4290,8 @@ yyreduce:
break; break;
case 208: case 208:
/* Line 1806 of yacc.c */
#line 1427 "go.y" #line 1427 "go.y"
{ {
(yyvsp[(3) - (5)].list) = checkarglist((yyvsp[(3) - (5)].list), 1); (yyvsp[(3) - (5)].list) = checkarglist((yyvsp[(3) - (5)].list), 1);
...@@ -3940,6 +4302,8 @@ yyreduce: ...@@ -3940,6 +4302,8 @@ yyreduce:
break; break;
case 209: case 209:
/* Line 1806 of yacc.c */
#line 1435 "go.y" #line 1435 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -3947,6 +4311,8 @@ yyreduce: ...@@ -3947,6 +4311,8 @@ yyreduce:
break; break;
case 210: case 210:
/* Line 1806 of yacc.c */
#line 1439 "go.y" #line 1439 "go.y"
{ {
(yyval.list) = (yyvsp[(2) - (3)].list); (yyval.list) = (yyvsp[(2) - (3)].list);
...@@ -3956,6 +4322,8 @@ yyreduce: ...@@ -3956,6 +4322,8 @@ yyreduce:
break; break;
case 211: case 211:
/* Line 1806 of yacc.c */
#line 1447 "go.y" #line 1447 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -3963,6 +4331,8 @@ yyreduce: ...@@ -3963,6 +4331,8 @@ yyreduce:
break; break;
case 212: case 212:
/* Line 1806 of yacc.c */
#line 1451 "go.y" #line 1451 "go.y"
{ {
(yyval.list) = list1(nod(ODCLFIELD, N, (yyvsp[(1) - (1)].node))); (yyval.list) = list1(nod(ODCLFIELD, N, (yyvsp[(1) - (1)].node)));
...@@ -3970,6 +4340,8 @@ yyreduce: ...@@ -3970,6 +4340,8 @@ yyreduce:
break; break;
case 213: case 213:
/* Line 1806 of yacc.c */
#line 1455 "go.y" #line 1455 "go.y"
{ {
(yyvsp[(2) - (3)].list) = checkarglist((yyvsp[(2) - (3)].list), 0); (yyvsp[(2) - (3)].list) = checkarglist((yyvsp[(2) - (3)].list), 0);
...@@ -3978,6 +4350,8 @@ yyreduce: ...@@ -3978,6 +4350,8 @@ yyreduce:
break; break;
case 214: case 214:
/* Line 1806 of yacc.c */
#line 1462 "go.y" #line 1462 "go.y"
{ {
closurehdr((yyvsp[(1) - (1)].node)); closurehdr((yyvsp[(1) - (1)].node));
...@@ -3985,6 +4359,8 @@ yyreduce: ...@@ -3985,6 +4359,8 @@ yyreduce:
break; break;
case 215: case 215:
/* Line 1806 of yacc.c */
#line 1468 "go.y" #line 1468 "go.y"
{ {
(yyval.node) = closurebody((yyvsp[(3) - (4)].list)); (yyval.node) = closurebody((yyvsp[(3) - (4)].list));
...@@ -3993,6 +4369,8 @@ yyreduce: ...@@ -3993,6 +4369,8 @@ yyreduce:
break; break;
case 216: case 216:
/* Line 1806 of yacc.c */
#line 1473 "go.y" #line 1473 "go.y"
{ {
(yyval.node) = closurebody(nil); (yyval.node) = closurebody(nil);
...@@ -4000,6 +4378,8 @@ yyreduce: ...@@ -4000,6 +4378,8 @@ yyreduce:
break; break;
case 217: case 217:
/* Line 1806 of yacc.c */
#line 1484 "go.y" #line 1484 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4007,6 +4387,8 @@ yyreduce: ...@@ -4007,6 +4387,8 @@ yyreduce:
break; break;
case 218: case 218:
/* Line 1806 of yacc.c */
#line 1488 "go.y" #line 1488 "go.y"
{ {
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(2) - (3)].list)); (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(2) - (3)].list));
...@@ -4018,6 +4400,8 @@ yyreduce: ...@@ -4018,6 +4400,8 @@ yyreduce:
break; break;
case 220: case 220:
/* Line 1806 of yacc.c */
#line 1499 "go.y" #line 1499 "go.y"
{ {
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list));
...@@ -4025,6 +4409,8 @@ yyreduce: ...@@ -4025,6 +4409,8 @@ yyreduce:
break; break;
case 222: case 222:
/* Line 1806 of yacc.c */
#line 1506 "go.y" #line 1506 "go.y"
{ {
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list));
...@@ -4032,6 +4418,8 @@ yyreduce: ...@@ -4032,6 +4418,8 @@ yyreduce:
break; break;
case 223: case 223:
/* Line 1806 of yacc.c */
#line 1512 "go.y" #line 1512 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4039,6 +4427,8 @@ yyreduce: ...@@ -4039,6 +4427,8 @@ yyreduce:
break; break;
case 224: case 224:
/* Line 1806 of yacc.c */
#line 1516 "go.y" #line 1516 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4046,6 +4436,8 @@ yyreduce: ...@@ -4046,6 +4436,8 @@ yyreduce:
break; break;
case 226: case 226:
/* Line 1806 of yacc.c */
#line 1523 "go.y" #line 1523 "go.y"
{ {
(yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list));
...@@ -4053,6 +4445,8 @@ yyreduce: ...@@ -4053,6 +4445,8 @@ yyreduce:
break; break;
case 227: case 227:
/* Line 1806 of yacc.c */
#line 1529 "go.y" #line 1529 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4060,6 +4454,8 @@ yyreduce: ...@@ -4060,6 +4454,8 @@ yyreduce:
break; break;
case 228: case 228:
/* Line 1806 of yacc.c */
#line 1533 "go.y" #line 1533 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4067,14 +4463,16 @@ yyreduce: ...@@ -4067,14 +4463,16 @@ yyreduce:
break; break;
case 229: case 229:
/* Line 1806 of yacc.c */
#line 1539 "go.y" #line 1539 "go.y"
{ {
NodeList *l; NodeList *l;
Node *n; Node *n;
l = (yyvsp[(1) - (3)].list); l = (yyvsp[(1) - (3)].list);
if(l != nil && l->next == nil && l->n == nil) { if(l == nil) {
// ? symbol, during import // ? symbol, during import (list1(N) == nil)
n = (yyvsp[(2) - (3)].node); n = (yyvsp[(2) - (3)].node);
if(n->op == OIND) if(n->op == OIND)
n = n->left; n = n->left;
...@@ -4093,6 +4491,8 @@ yyreduce: ...@@ -4093,6 +4491,8 @@ yyreduce:
break; break;
case 230: case 230:
/* Line 1806 of yacc.c */
#line 1562 "go.y" #line 1562 "go.y"
{ {
(yyvsp[(1) - (2)].node)->val = (yyvsp[(2) - (2)].val); (yyvsp[(1) - (2)].node)->val = (yyvsp[(2) - (2)].val);
...@@ -4101,6 +4501,8 @@ yyreduce: ...@@ -4101,6 +4501,8 @@ yyreduce:
break; break;
case 231: case 231:
/* Line 1806 of yacc.c */
#line 1567 "go.y" #line 1567 "go.y"
{ {
(yyvsp[(2) - (4)].node)->val = (yyvsp[(4) - (4)].val); (yyvsp[(2) - (4)].node)->val = (yyvsp[(4) - (4)].val);
...@@ -4110,6 +4512,8 @@ yyreduce: ...@@ -4110,6 +4512,8 @@ yyreduce:
break; break;
case 232: case 232:
/* Line 1806 of yacc.c */
#line 1573 "go.y" #line 1573 "go.y"
{ {
(yyvsp[(2) - (3)].node)->right = nod(OIND, (yyvsp[(2) - (3)].node)->right, N); (yyvsp[(2) - (3)].node)->right = nod(OIND, (yyvsp[(2) - (3)].node)->right, N);
...@@ -4119,6 +4523,8 @@ yyreduce: ...@@ -4119,6 +4523,8 @@ yyreduce:
break; break;
case 233: case 233:
/* Line 1806 of yacc.c */
#line 1579 "go.y" #line 1579 "go.y"
{ {
(yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); (yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N);
...@@ -4129,6 +4535,8 @@ yyreduce: ...@@ -4129,6 +4535,8 @@ yyreduce:
break; break;
case 234: case 234:
/* Line 1806 of yacc.c */
#line 1586 "go.y" #line 1586 "go.y"
{ {
(yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); (yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N);
...@@ -4139,6 +4547,8 @@ yyreduce: ...@@ -4139,6 +4547,8 @@ yyreduce:
break; break;
case 235: case 235:
/* Line 1806 of yacc.c */
#line 1595 "go.y" #line 1595 "go.y"
{ {
Node *n; Node *n;
...@@ -4151,6 +4561,8 @@ yyreduce: ...@@ -4151,6 +4561,8 @@ yyreduce:
break; break;
case 236: case 236:
/* Line 1806 of yacc.c */
#line 1604 "go.y" #line 1604 "go.y"
{ {
Pkg *pkg; Pkg *pkg;
...@@ -4167,6 +4579,8 @@ yyreduce: ...@@ -4167,6 +4579,8 @@ yyreduce:
break; break;
case 237: case 237:
/* Line 1806 of yacc.c */
#line 1619 "go.y" #line 1619 "go.y"
{ {
(yyval.node) = embedded((yyvsp[(1) - (1)].sym)); (yyval.node) = embedded((yyvsp[(1) - (1)].sym));
...@@ -4174,6 +4588,8 @@ yyreduce: ...@@ -4174,6 +4588,8 @@ yyreduce:
break; break;
case 238: case 238:
/* Line 1806 of yacc.c */
#line 1625 "go.y" #line 1625 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = nod(ODCLFIELD, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -4182,6 +4598,8 @@ yyreduce: ...@@ -4182,6 +4598,8 @@ yyreduce:
break; break;
case 239: case 239:
/* Line 1806 of yacc.c */
#line 1630 "go.y" #line 1630 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(1) - (1)].sym))); (yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(1) - (1)].sym)));
...@@ -4189,6 +4607,8 @@ yyreduce: ...@@ -4189,6 +4607,8 @@ yyreduce:
break; break;
case 240: case 240:
/* Line 1806 of yacc.c */
#line 1634 "go.y" #line 1634 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(2) - (3)].sym))); (yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(2) - (3)].sym)));
...@@ -4197,6 +4617,8 @@ yyreduce: ...@@ -4197,6 +4617,8 @@ yyreduce:
break; break;
case 241: case 241:
/* Line 1806 of yacc.c */
#line 1641 "go.y" #line 1641 "go.y"
{ {
// without func keyword // without func keyword
...@@ -4208,6 +4630,8 @@ yyreduce: ...@@ -4208,6 +4630,8 @@ yyreduce:
break; break;
case 243: case 243:
/* Line 1806 of yacc.c */
#line 1655 "go.y" #line 1655 "go.y"
{ {
(yyval.node) = nod(ONONAME, N, N); (yyval.node) = nod(ONONAME, N, N);
...@@ -4217,6 +4641,8 @@ yyreduce: ...@@ -4217,6 +4641,8 @@ yyreduce:
break; break;
case 244: case 244:
/* Line 1806 of yacc.c */
#line 1661 "go.y" #line 1661 "go.y"
{ {
(yyval.node) = nod(ONONAME, N, N); (yyval.node) = nod(ONONAME, N, N);
...@@ -4226,6 +4652,8 @@ yyreduce: ...@@ -4226,6 +4652,8 @@ yyreduce:
break; break;
case 246: case 246:
/* Line 1806 of yacc.c */
#line 1670 "go.y" #line 1670 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4233,6 +4661,8 @@ yyreduce: ...@@ -4233,6 +4661,8 @@ yyreduce:
break; break;
case 247: case 247:
/* Line 1806 of yacc.c */
#line 1674 "go.y" #line 1674 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4240,6 +4670,8 @@ yyreduce: ...@@ -4240,6 +4670,8 @@ yyreduce:
break; break;
case 248: case 248:
/* Line 1806 of yacc.c */
#line 1679 "go.y" #line 1679 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4247,6 +4679,8 @@ yyreduce: ...@@ -4247,6 +4679,8 @@ yyreduce:
break; break;
case 249: case 249:
/* Line 1806 of yacc.c */
#line 1683 "go.y" #line 1683 "go.y"
{ {
(yyval.list) = (yyvsp[(1) - (2)].list); (yyval.list) = (yyvsp[(1) - (2)].list);
...@@ -4254,6 +4688,8 @@ yyreduce: ...@@ -4254,6 +4688,8 @@ yyreduce:
break; break;
case 250: case 250:
/* Line 1806 of yacc.c */
#line 1691 "go.y" #line 1691 "go.y"
{ {
(yyval.node) = N; (yyval.node) = N;
...@@ -4261,6 +4697,8 @@ yyreduce: ...@@ -4261,6 +4697,8 @@ yyreduce:
break; break;
case 252: case 252:
/* Line 1806 of yacc.c */
#line 1696 "go.y" #line 1696 "go.y"
{ {
(yyval.node) = liststmt((yyvsp[(1) - (1)].list)); (yyval.node) = liststmt((yyvsp[(1) - (1)].list));
...@@ -4268,6 +4706,8 @@ yyreduce: ...@@ -4268,6 +4706,8 @@ yyreduce:
break; break;
case 254: case 254:
/* Line 1806 of yacc.c */
#line 1701 "go.y" #line 1701 "go.y"
{ {
(yyval.node) = N; (yyval.node) = N;
...@@ -4275,6 +4715,8 @@ yyreduce: ...@@ -4275,6 +4715,8 @@ yyreduce:
break; break;
case 260: case 260:
/* Line 1806 of yacc.c */
#line 1712 "go.y" #line 1712 "go.y"
{ {
(yyvsp[(1) - (2)].node) = nod(OLABEL, (yyvsp[(1) - (2)].node), N); (yyvsp[(1) - (2)].node) = nod(OLABEL, (yyvsp[(1) - (2)].node), N);
...@@ -4283,6 +4725,8 @@ yyreduce: ...@@ -4283,6 +4725,8 @@ yyreduce:
break; break;
case 261: case 261:
/* Line 1806 of yacc.c */
#line 1717 "go.y" #line 1717 "go.y"
{ {
NodeList *l; NodeList *l;
...@@ -4296,6 +4740,8 @@ yyreduce: ...@@ -4296,6 +4740,8 @@ yyreduce:
break; break;
case 262: case 262:
/* Line 1806 of yacc.c */
#line 1727 "go.y" #line 1727 "go.y"
{ {
// will be converted to OFALL // will be converted to OFALL
...@@ -4304,6 +4750,8 @@ yyreduce: ...@@ -4304,6 +4750,8 @@ yyreduce:
break; break;
case 263: case 263:
/* Line 1806 of yacc.c */
#line 1732 "go.y" #line 1732 "go.y"
{ {
(yyval.node) = nod(OBREAK, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OBREAK, (yyvsp[(2) - (2)].node), N);
...@@ -4311,6 +4759,8 @@ yyreduce: ...@@ -4311,6 +4759,8 @@ yyreduce:
break; break;
case 264: case 264:
/* Line 1806 of yacc.c */
#line 1736 "go.y" #line 1736 "go.y"
{ {
(yyval.node) = nod(OCONTINUE, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OCONTINUE, (yyvsp[(2) - (2)].node), N);
...@@ -4318,6 +4768,8 @@ yyreduce: ...@@ -4318,6 +4768,8 @@ yyreduce:
break; break;
case 265: case 265:
/* Line 1806 of yacc.c */
#line 1740 "go.y" #line 1740 "go.y"
{ {
(yyval.node) = nod(OPROC, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OPROC, (yyvsp[(2) - (2)].node), N);
...@@ -4325,6 +4777,8 @@ yyreduce: ...@@ -4325,6 +4777,8 @@ yyreduce:
break; break;
case 266: case 266:
/* Line 1806 of yacc.c */
#line 1744 "go.y" #line 1744 "go.y"
{ {
(yyval.node) = nod(ODEFER, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(ODEFER, (yyvsp[(2) - (2)].node), N);
...@@ -4332,6 +4786,8 @@ yyreduce: ...@@ -4332,6 +4786,8 @@ yyreduce:
break; break;
case 267: case 267:
/* Line 1806 of yacc.c */
#line 1748 "go.y" #line 1748 "go.y"
{ {
(yyval.node) = nod(OGOTO, (yyvsp[(2) - (2)].node), N); (yyval.node) = nod(OGOTO, (yyvsp[(2) - (2)].node), N);
...@@ -4340,6 +4796,8 @@ yyreduce: ...@@ -4340,6 +4796,8 @@ yyreduce:
break; break;
case 268: case 268:
/* Line 1806 of yacc.c */
#line 1753 "go.y" #line 1753 "go.y"
{ {
(yyval.node) = nod(ORETURN, N, N); (yyval.node) = nod(ORETURN, N, N);
...@@ -4360,6 +4818,8 @@ yyreduce: ...@@ -4360,6 +4818,8 @@ yyreduce:
break; break;
case 269: case 269:
/* Line 1806 of yacc.c */
#line 1772 "go.y" #line 1772 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4369,6 +4829,8 @@ yyreduce: ...@@ -4369,6 +4829,8 @@ yyreduce:
break; break;
case 270: case 270:
/* Line 1806 of yacc.c */
#line 1778 "go.y" #line 1778 "go.y"
{ {
(yyval.list) = (yyvsp[(1) - (3)].list); (yyval.list) = (yyvsp[(1) - (3)].list);
...@@ -4378,6 +4840,8 @@ yyreduce: ...@@ -4378,6 +4840,8 @@ yyreduce:
break; break;
case 271: case 271:
/* Line 1806 of yacc.c */
#line 1786 "go.y" #line 1786 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4385,6 +4849,8 @@ yyreduce: ...@@ -4385,6 +4849,8 @@ yyreduce:
break; break;
case 272: case 272:
/* Line 1806 of yacc.c */
#line 1790 "go.y" #line 1790 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4392,6 +4858,8 @@ yyreduce: ...@@ -4392,6 +4858,8 @@ yyreduce:
break; break;
case 273: case 273:
/* Line 1806 of yacc.c */
#line 1796 "go.y" #line 1796 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4399,6 +4867,8 @@ yyreduce: ...@@ -4399,6 +4867,8 @@ yyreduce:
break; break;
case 274: case 274:
/* Line 1806 of yacc.c */
#line 1800 "go.y" #line 1800 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4406,6 +4876,8 @@ yyreduce: ...@@ -4406,6 +4876,8 @@ yyreduce:
break; break;
case 275: case 275:
/* Line 1806 of yacc.c */
#line 1806 "go.y" #line 1806 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4413,6 +4885,8 @@ yyreduce: ...@@ -4413,6 +4885,8 @@ yyreduce:
break; break;
case 276: case 276:
/* Line 1806 of yacc.c */
#line 1810 "go.y" #line 1810 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4420,6 +4894,8 @@ yyreduce: ...@@ -4420,6 +4894,8 @@ yyreduce:
break; break;
case 277: case 277:
/* Line 1806 of yacc.c */
#line 1816 "go.y" #line 1816 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4427,6 +4903,8 @@ yyreduce: ...@@ -4427,6 +4903,8 @@ yyreduce:
break; break;
case 278: case 278:
/* Line 1806 of yacc.c */
#line 1820 "go.y" #line 1820 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4434,6 +4912,8 @@ yyreduce: ...@@ -4434,6 +4912,8 @@ yyreduce:
break; break;
case 279: case 279:
/* Line 1806 of yacc.c */
#line 1829 "go.y" #line 1829 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4441,6 +4921,8 @@ yyreduce: ...@@ -4441,6 +4921,8 @@ yyreduce:
break; break;
case 280: case 280:
/* Line 1806 of yacc.c */
#line 1833 "go.y" #line 1833 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4448,6 +4930,8 @@ yyreduce: ...@@ -4448,6 +4930,8 @@ yyreduce:
break; break;
case 281: case 281:
/* Line 1806 of yacc.c */
#line 1837 "go.y" #line 1837 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4455,6 +4939,8 @@ yyreduce: ...@@ -4455,6 +4939,8 @@ yyreduce:
break; break;
case 282: case 282:
/* Line 1806 of yacc.c */
#line 1841 "go.y" #line 1841 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4462,6 +4948,8 @@ yyreduce: ...@@ -4462,6 +4948,8 @@ yyreduce:
break; break;
case 283: case 283:
/* Line 1806 of yacc.c */
#line 1846 "go.y" #line 1846 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4469,6 +4957,8 @@ yyreduce: ...@@ -4469,6 +4957,8 @@ yyreduce:
break; break;
case 284: case 284:
/* Line 1806 of yacc.c */
#line 1850 "go.y" #line 1850 "go.y"
{ {
(yyval.list) = (yyvsp[(1) - (2)].list); (yyval.list) = (yyvsp[(1) - (2)].list);
...@@ -4476,6 +4966,8 @@ yyreduce: ...@@ -4476,6 +4966,8 @@ yyreduce:
break; break;
case 289: case 289:
/* Line 1806 of yacc.c */
#line 1864 "go.y" #line 1864 "go.y"
{ {
(yyval.node) = N; (yyval.node) = N;
...@@ -4483,6 +4975,8 @@ yyreduce: ...@@ -4483,6 +4975,8 @@ yyreduce:
break; break;
case 291: case 291:
/* Line 1806 of yacc.c */
#line 1870 "go.y" #line 1870 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4490,6 +4984,8 @@ yyreduce: ...@@ -4490,6 +4984,8 @@ yyreduce:
break; break;
case 293: case 293:
/* Line 1806 of yacc.c */
#line 1876 "go.y" #line 1876 "go.y"
{ {
(yyval.node) = N; (yyval.node) = N;
...@@ -4497,6 +4993,8 @@ yyreduce: ...@@ -4497,6 +4993,8 @@ yyreduce:
break; break;
case 295: case 295:
/* Line 1806 of yacc.c */
#line 1882 "go.y" #line 1882 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4504,6 +5002,8 @@ yyreduce: ...@@ -4504,6 +5002,8 @@ yyreduce:
break; break;
case 297: case 297:
/* Line 1806 of yacc.c */
#line 1888 "go.y" #line 1888 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4511,6 +5011,8 @@ yyreduce: ...@@ -4511,6 +5011,8 @@ yyreduce:
break; break;
case 299: case 299:
/* Line 1806 of yacc.c */
#line 1894 "go.y" #line 1894 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4518,6 +5020,8 @@ yyreduce: ...@@ -4518,6 +5020,8 @@ yyreduce:
break; break;
case 301: case 301:
/* Line 1806 of yacc.c */
#line 1900 "go.y" #line 1900 "go.y"
{ {
(yyval.val).ctype = CTxxx; (yyval.val).ctype = CTxxx;
...@@ -4525,6 +5029,8 @@ yyreduce: ...@@ -4525,6 +5029,8 @@ yyreduce:
break; break;
case 303: case 303:
/* Line 1806 of yacc.c */
#line 1910 "go.y" #line 1910 "go.y"
{ {
importimport((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].val).u.sval); importimport((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].val).u.sval);
...@@ -4532,6 +5038,8 @@ yyreduce: ...@@ -4532,6 +5038,8 @@ yyreduce:
break; break;
case 304: case 304:
/* Line 1806 of yacc.c */
#line 1914 "go.y" #line 1914 "go.y"
{ {
importvar((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].type)); importvar((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].type));
...@@ -4539,6 +5047,8 @@ yyreduce: ...@@ -4539,6 +5047,8 @@ yyreduce:
break; break;
case 305: case 305:
/* Line 1806 of yacc.c */
#line 1918 "go.y" #line 1918 "go.y"
{ {
importconst((yyvsp[(2) - (5)].sym), types[TIDEAL], (yyvsp[(4) - (5)].node)); importconst((yyvsp[(2) - (5)].sym), types[TIDEAL], (yyvsp[(4) - (5)].node));
...@@ -4546,6 +5056,8 @@ yyreduce: ...@@ -4546,6 +5056,8 @@ yyreduce:
break; break;
case 306: case 306:
/* Line 1806 of yacc.c */
#line 1922 "go.y" #line 1922 "go.y"
{ {
importconst((yyvsp[(2) - (6)].sym), (yyvsp[(3) - (6)].type), (yyvsp[(5) - (6)].node)); importconst((yyvsp[(2) - (6)].sym), (yyvsp[(3) - (6)].type), (yyvsp[(5) - (6)].node));
...@@ -4553,6 +5065,8 @@ yyreduce: ...@@ -4553,6 +5065,8 @@ yyreduce:
break; break;
case 307: case 307:
/* Line 1806 of yacc.c */
#line 1926 "go.y" #line 1926 "go.y"
{ {
importtype((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].type)); importtype((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].type));
...@@ -4560,6 +5074,8 @@ yyreduce: ...@@ -4560,6 +5074,8 @@ yyreduce:
break; break;
case 308: case 308:
/* Line 1806 of yacc.c */
#line 1930 "go.y" #line 1930 "go.y"
{ {
if((yyvsp[(2) - (4)].node) == N) { if((yyvsp[(2) - (4)].node) == N) {
...@@ -4581,6 +5097,8 @@ yyreduce: ...@@ -4581,6 +5097,8 @@ yyreduce:
break; break;
case 309: case 309:
/* Line 1806 of yacc.c */
#line 1950 "go.y" #line 1950 "go.y"
{ {
(yyval.sym) = (yyvsp[(1) - (1)].sym); (yyval.sym) = (yyvsp[(1) - (1)].sym);
...@@ -4589,6 +5107,8 @@ yyreduce: ...@@ -4589,6 +5107,8 @@ yyreduce:
break; break;
case 310: case 310:
/* Line 1806 of yacc.c */
#line 1957 "go.y" #line 1957 "go.y"
{ {
(yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); (yyval.type) = pkgtype((yyvsp[(1) - (1)].sym));
...@@ -4597,6 +5117,8 @@ yyreduce: ...@@ -4597,6 +5117,8 @@ yyreduce:
break; break;
case 316: case 316:
/* Line 1806 of yacc.c */
#line 1977 "go.y" #line 1977 "go.y"
{ {
(yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); (yyval.type) = pkgtype((yyvsp[(1) - (1)].sym));
...@@ -4604,6 +5126,8 @@ yyreduce: ...@@ -4604,6 +5126,8 @@ yyreduce:
break; break;
case 317: case 317:
/* Line 1806 of yacc.c */
#line 1981 "go.y" #line 1981 "go.y"
{ {
// predefined name like uint8 // predefined name like uint8
...@@ -4617,6 +5141,8 @@ yyreduce: ...@@ -4617,6 +5141,8 @@ yyreduce:
break; break;
case 318: case 318:
/* Line 1806 of yacc.c */
#line 1991 "go.y" #line 1991 "go.y"
{ {
(yyval.type) = aindex(N, (yyvsp[(3) - (3)].type)); (yyval.type) = aindex(N, (yyvsp[(3) - (3)].type));
...@@ -4624,6 +5150,8 @@ yyreduce: ...@@ -4624,6 +5150,8 @@ yyreduce:
break; break;
case 319: case 319:
/* Line 1806 of yacc.c */
#line 1995 "go.y" #line 1995 "go.y"
{ {
(yyval.type) = aindex(nodlit((yyvsp[(2) - (4)].val)), (yyvsp[(4) - (4)].type)); (yyval.type) = aindex(nodlit((yyvsp[(2) - (4)].val)), (yyvsp[(4) - (4)].type));
...@@ -4631,6 +5159,8 @@ yyreduce: ...@@ -4631,6 +5159,8 @@ yyreduce:
break; break;
case 320: case 320:
/* Line 1806 of yacc.c */
#line 1999 "go.y" #line 1999 "go.y"
{ {
(yyval.type) = maptype((yyvsp[(3) - (5)].type), (yyvsp[(5) - (5)].type)); (yyval.type) = maptype((yyvsp[(3) - (5)].type), (yyvsp[(5) - (5)].type));
...@@ -4638,6 +5168,8 @@ yyreduce: ...@@ -4638,6 +5168,8 @@ yyreduce:
break; break;
case 321: case 321:
/* Line 1806 of yacc.c */
#line 2003 "go.y" #line 2003 "go.y"
{ {
(yyval.type) = tostruct((yyvsp[(3) - (4)].list)); (yyval.type) = tostruct((yyvsp[(3) - (4)].list));
...@@ -4645,6 +5177,8 @@ yyreduce: ...@@ -4645,6 +5177,8 @@ yyreduce:
break; break;
case 322: case 322:
/* Line 1806 of yacc.c */
#line 2007 "go.y" #line 2007 "go.y"
{ {
(yyval.type) = tointerface((yyvsp[(3) - (4)].list)); (yyval.type) = tointerface((yyvsp[(3) - (4)].list));
...@@ -4652,6 +5186,8 @@ yyreduce: ...@@ -4652,6 +5186,8 @@ yyreduce:
break; break;
case 323: case 323:
/* Line 1806 of yacc.c */
#line 2011 "go.y" #line 2011 "go.y"
{ {
(yyval.type) = ptrto((yyvsp[(2) - (2)].type)); (yyval.type) = ptrto((yyvsp[(2) - (2)].type));
...@@ -4659,6 +5195,8 @@ yyreduce: ...@@ -4659,6 +5195,8 @@ yyreduce:
break; break;
case 324: case 324:
/* Line 1806 of yacc.c */
#line 2015 "go.y" #line 2015 "go.y"
{ {
(yyval.type) = typ(TCHAN); (yyval.type) = typ(TCHAN);
...@@ -4668,6 +5206,8 @@ yyreduce: ...@@ -4668,6 +5206,8 @@ yyreduce:
break; break;
case 325: case 325:
/* Line 1806 of yacc.c */
#line 2021 "go.y" #line 2021 "go.y"
{ {
(yyval.type) = typ(TCHAN); (yyval.type) = typ(TCHAN);
...@@ -4677,6 +5217,8 @@ yyreduce: ...@@ -4677,6 +5217,8 @@ yyreduce:
break; break;
case 326: case 326:
/* Line 1806 of yacc.c */
#line 2027 "go.y" #line 2027 "go.y"
{ {
(yyval.type) = typ(TCHAN); (yyval.type) = typ(TCHAN);
...@@ -4686,6 +5228,8 @@ yyreduce: ...@@ -4686,6 +5228,8 @@ yyreduce:
break; break;
case 327: case 327:
/* Line 1806 of yacc.c */
#line 2035 "go.y" #line 2035 "go.y"
{ {
(yyval.type) = typ(TCHAN); (yyval.type) = typ(TCHAN);
...@@ -4695,6 +5239,8 @@ yyreduce: ...@@ -4695,6 +5239,8 @@ yyreduce:
break; break;
case 328: case 328:
/* Line 1806 of yacc.c */
#line 2043 "go.y" #line 2043 "go.y"
{ {
(yyval.type) = functype(nil, (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)); (yyval.type) = functype(nil, (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list));
...@@ -4702,6 +5248,8 @@ yyreduce: ...@@ -4702,6 +5248,8 @@ yyreduce:
break; break;
case 329: case 329:
/* Line 1806 of yacc.c */
#line 2049 "go.y" #line 2049 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(2) - (3)].type))); (yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(2) - (3)].type)));
...@@ -4712,6 +5260,8 @@ yyreduce: ...@@ -4712,6 +5260,8 @@ yyreduce:
break; break;
case 330: case 330:
/* Line 1806 of yacc.c */
#line 2056 "go.y" #line 2056 "go.y"
{ {
Type *t; Type *t;
...@@ -4729,6 +5279,8 @@ yyreduce: ...@@ -4729,6 +5279,8 @@ yyreduce:
break; break;
case 331: case 331:
/* Line 1806 of yacc.c */
#line 2072 "go.y" #line 2072 "go.y"
{ {
Sym *s; Sym *s;
...@@ -4748,6 +5300,8 @@ yyreduce: ...@@ -4748,6 +5300,8 @@ yyreduce:
break; break;
case 332: case 332:
/* Line 1806 of yacc.c */
#line 2090 "go.y" #line 2090 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, newname((yyvsp[(1) - (5)].sym)), typenod(functype(fakethis(), (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)))); (yyval.node) = nod(ODCLFIELD, newname((yyvsp[(1) - (5)].sym)), typenod(functype(fakethis(), (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list))));
...@@ -4755,6 +5309,8 @@ yyreduce: ...@@ -4755,6 +5309,8 @@ yyreduce:
break; break;
case 333: case 333:
/* Line 1806 of yacc.c */
#line 2094 "go.y" #line 2094 "go.y"
{ {
(yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type))); (yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type)));
...@@ -4762,6 +5318,8 @@ yyreduce: ...@@ -4762,6 +5318,8 @@ yyreduce:
break; break;
case 334: case 334:
/* Line 1806 of yacc.c */
#line 2099 "go.y" #line 2099 "go.y"
{ {
(yyval.list) = nil; (yyval.list) = nil;
...@@ -4769,6 +5327,8 @@ yyreduce: ...@@ -4769,6 +5327,8 @@ yyreduce:
break; break;
case 336: case 336:
/* Line 1806 of yacc.c */
#line 2106 "go.y" #line 2106 "go.y"
{ {
(yyval.list) = (yyvsp[(2) - (3)].list); (yyval.list) = (yyvsp[(2) - (3)].list);
...@@ -4776,6 +5336,8 @@ yyreduce: ...@@ -4776,6 +5336,8 @@ yyreduce:
break; break;
case 337: case 337:
/* Line 1806 of yacc.c */
#line 2110 "go.y" #line 2110 "go.y"
{ {
(yyval.list) = list1(nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type)))); (yyval.list) = list1(nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type))));
...@@ -4783,6 +5345,8 @@ yyreduce: ...@@ -4783,6 +5345,8 @@ yyreduce:
break; break;
case 338: case 338:
/* Line 1806 of yacc.c */
#line 2120 "go.y" #line 2120 "go.y"
{ {
(yyval.node) = nodlit((yyvsp[(1) - (1)].val)); (yyval.node) = nodlit((yyvsp[(1) - (1)].val));
...@@ -4790,6 +5354,8 @@ yyreduce: ...@@ -4790,6 +5354,8 @@ yyreduce:
break; break;
case 339: case 339:
/* Line 1806 of yacc.c */
#line 2124 "go.y" #line 2124 "go.y"
{ {
(yyval.node) = nodlit((yyvsp[(2) - (2)].val)); (yyval.node) = nodlit((yyvsp[(2) - (2)].val));
...@@ -4808,6 +5374,8 @@ yyreduce: ...@@ -4808,6 +5374,8 @@ yyreduce:
break; break;
case 340: case 340:
/* Line 1806 of yacc.c */
#line 2139 "go.y" #line 2139 "go.y"
{ {
(yyval.node) = oldname(pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg)); (yyval.node) = oldname(pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg));
...@@ -4817,6 +5385,8 @@ yyreduce: ...@@ -4817,6 +5385,8 @@ yyreduce:
break; break;
case 342: case 342:
/* Line 1806 of yacc.c */
#line 2148 "go.y" #line 2148 "go.y"
{ {
if((yyvsp[(2) - (5)].node)->val.ctype == CTRUNE && (yyvsp[(4) - (5)].node)->val.ctype == CTINT) { if((yyvsp[(2) - (5)].node)->val.ctype == CTRUNE && (yyvsp[(4) - (5)].node)->val.ctype == CTINT) {
...@@ -4831,6 +5401,8 @@ yyreduce: ...@@ -4831,6 +5401,8 @@ yyreduce:
break; break;
case 345: case 345:
/* Line 1806 of yacc.c */
#line 2164 "go.y" #line 2164 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4838,6 +5410,8 @@ yyreduce: ...@@ -4838,6 +5410,8 @@ yyreduce:
break; break;
case 346: case 346:
/* Line 1806 of yacc.c */
#line 2168 "go.y" #line 2168 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4845,6 +5419,8 @@ yyreduce: ...@@ -4845,6 +5419,8 @@ yyreduce:
break; break;
case 347: case 347:
/* Line 1806 of yacc.c */
#line 2174 "go.y" #line 2174 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4852,6 +5428,8 @@ yyreduce: ...@@ -4852,6 +5428,8 @@ yyreduce:
break; break;
case 348: case 348:
/* Line 1806 of yacc.c */
#line 2178 "go.y" #line 2178 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4859,6 +5437,8 @@ yyreduce: ...@@ -4859,6 +5437,8 @@ yyreduce:
break; break;
case 349: case 349:
/* Line 1806 of yacc.c */
#line 2184 "go.y" #line 2184 "go.y"
{ {
(yyval.list) = list1((yyvsp[(1) - (1)].node)); (yyval.list) = list1((yyvsp[(1) - (1)].node));
...@@ -4866,6 +5446,8 @@ yyreduce: ...@@ -4866,6 +5446,8 @@ yyreduce:
break; break;
case 350: case 350:
/* Line 1806 of yacc.c */
#line 2188 "go.y" #line 2188 "go.y"
{ {
(yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
...@@ -4873,10 +5455,22 @@ yyreduce: ...@@ -4873,10 +5455,22 @@ yyreduce:
break; break;
/* Line 1267 of yacc.c. */
#line 4879 "y.tab.c" /* Line 1806 of yacc.c */
#line 5462 "y.tab.c"
default: break; 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); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -4885,7 +5479,6 @@ yyreduce: ...@@ -4885,7 +5479,6 @@ yyreduce:
*++yyvsp = yyval; *++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state /* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule that goes to, based on the state we popped back to and the rule
number reduced by. */ number reduced by. */
...@@ -4905,6 +5498,10 @@ yyreduce: ...@@ -4905,6 +5498,10 @@ yyreduce:
| yyerrlab -- here on detecting error | | yyerrlab -- here on detecting error |
`------------------------------------*/ `------------------------------------*/
yyerrlab: 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 not already recovering from an error, report this error. */
if (!yyerrstatus) if (!yyerrstatus)
{ {
...@@ -4912,37 +5509,36 @@ yyerrlab: ...@@ -4912,37 +5509,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE #if ! YYERROR_VERBOSE
yyerror (YY_("syntax error")); yyerror (YY_("syntax error"));
#else #else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{ {
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); char *yymsgp = YY_("syntax error");
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{ {
YYSIZE_T yyalloc = 2 * yysize;
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
yyalloc = YYSTACK_ALLOC_MAXIMUM;
if (yymsg != yymsgbuf) if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yyalloc); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (yymsg) if (!yymsg)
yymsg_alloc = yyalloc;
else
{ {
yymsg = yymsgbuf; yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf; yymsg_alloc = sizeof yymsgbuf;
} yysyntax_error_status = 2;
}
if (0 < yysize && yysize <= yymsg_alloc)
{
(void) yysyntax_error (yymsg, yystate, yychar);
yyerror (yymsg);
} }
else else
{ {
yyerror (YY_("syntax error")); yysyntax_error_status = YYSYNTAX_ERROR;
if (yysize != 0) yymsgp = yymsg;
goto yyexhaustedlab; }
} }
yyerror (yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
} }
# undef YYSYNTAX_ERROR
#endif #endif
} }
...@@ -4950,7 +5546,7 @@ yyerrlab: ...@@ -4950,7 +5546,7 @@ yyerrlab:
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse look-ahead token after an /* If just tried and failed to reuse lookahead token after an
error, discard it. */ error, discard it. */
if (yychar <= YYEOF) if (yychar <= YYEOF)
...@@ -4967,7 +5563,7 @@ yyerrlab: ...@@ -4967,7 +5563,7 @@ yyerrlab:
} }
} }
/* Else will try to reuse look-ahead token after shifting the error /* Else will try to reuse lookahead token after shifting the error
token. */ token. */
goto yyerrlab1; goto yyerrlab1;
...@@ -5001,7 +5597,7 @@ yyerrlab1: ...@@ -5001,7 +5597,7 @@ yyerrlab1:
for (;;) for (;;)
{ {
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn != YYPACT_NINF) if (!yypact_value_is_default (yyn))
{ {
yyn += YYTERROR; yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
...@@ -5024,9 +5620,6 @@ yyerrlab1: ...@@ -5024,9 +5620,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
} }
if (yyn == YYFINAL)
YYACCEPT;
*++yyvsp = yylval; *++yyvsp = yylval;
...@@ -5051,7 +5644,7 @@ yyabortlab: ...@@ -5051,7 +5644,7 @@ yyabortlab:
yyresult = 1; yyresult = 1;
goto yyreturn; goto yyreturn;
#ifndef yyoverflow #if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------. /*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/ `-------------------------------------------------*/
...@@ -5062,9 +5655,14 @@ yyexhaustedlab: ...@@ -5062,9 +5655,14 @@ yyexhaustedlab:
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY) 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", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval); yytoken, &yylval);
}
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */ this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
...@@ -5088,6 +5686,8 @@ yyreturn: ...@@ -5088,6 +5686,8 @@ yyreturn:
} }
/* Line 2067 of yacc.c */
#line 2192 "go.y" #line 2192 "go.y"
......
/* A Bison parser, made by GNU Bison 2.3. */ /* A Bison parser, made by GNU Bison 2.5. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation, either version 3 of the License, or
any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -16,9 +15,7 @@ ...@@ -16,9 +15,7 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>. */
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -33,6 +30,7 @@ ...@@ -33,6 +30,7 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -146,22 +144,28 @@ ...@@ -146,22 +144,28 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
#line 30 "go.y"
{ {
/* Line 2068 of yacc.c */
#line 30 "go.y"
Node* node; Node* node;
NodeList* list; NodeList* list;
Type* type; Type* type;
Sym* sym; Sym* sym;
struct Val val; struct Val val;
int i; int i;
}
/* Line 1529 of yacc.c. */
#line 160 "y.tab.h"
YYSTYPE; /* Line 2068 of yacc.c */
#line 163 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
extern YYSTYPE yylval; extern YYSTYPE yylval;
package a
type Package struct {
name string
}
type Future struct {
result chan struct {
*Package
}
}
func (t *Future) Result() *Package {
result := <-t.result
t.result <- result
return result.Package
}
package main
import "a"
func main() {
f := new(a.Future)
f.Result()
}
// compiledir
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 5910: parsing of unnamed struct types
// in inlined bodies was broken.
package ignored
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment