Commit 781b2a25 authored by Anthony Martin's avatar Anthony Martin

cmd/cc: support 21-bit runes in wide string constants

Changeset 7557a627e9b5 added a temporary stop-gap to silence
a print format warning for %S. This has been reverted.

None of this code is original. It was copied from the latest
Plan 9 compilers.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/8630044
parent acd887ba
...@@ -55,6 +55,8 @@ typedef struct Bits Bits; ...@@ -55,6 +55,8 @@ typedef struct Bits Bits;
typedef struct Dynimp Dynimp; typedef struct Dynimp Dynimp;
typedef struct Dynexp Dynexp; typedef struct Dynexp Dynexp;
typedef Rune TRune; /* target system type */
#define BUFSIZ 8192 #define BUFSIZ 8192
#define NSYMB 500 #define NSYMB 500
#define NHASH 1024 #define NHASH 1024
...@@ -85,7 +87,7 @@ struct Node ...@@ -85,7 +87,7 @@ struct Node
double fconst; /* fp constant */ double fconst; /* fp constant */
vlong vconst; /* non fp const */ vlong vconst; /* non fp const */
char* cstring; /* character string */ char* cstring; /* character string */
ushort* rstring; /* rune string */ TRune* rstring; /* rune string */
Sym* sym; Sym* sym;
Type* type; Type* type;
...@@ -367,6 +369,9 @@ enum ...@@ -367,6 +369,9 @@ enum
TFILE, TFILE,
TOLD, TOLD,
NALLTYPES, NALLTYPES,
/* adapt size of Rune to target system's size */
TRUNE = sizeof(TRune)==4? TUINT: TUSHORT,
}; };
enum enum
{ {
...@@ -766,7 +771,7 @@ void gclean(void); ...@@ -766,7 +771,7 @@ void gclean(void);
void gextern(Sym*, Node*, int32, int32); void gextern(Sym*, Node*, int32, int32);
void ginit(void); void ginit(void);
int32 outstring(char*, int32); int32 outstring(char*, int32);
int32 outlstring(ushort*, int32); int32 outlstring(TRune*, int32);
void sextern(Sym*, Node*, int32, int32); void sextern(Sym*, Node*, int32, int32);
void xcom(Node*); void xcom(Node*);
int32 exreg(Type*); int32 exreg(Type*);
...@@ -800,7 +805,6 @@ int machcap(Node*); ...@@ -800,7 +805,6 @@ int machcap(Node*);
#pragma varargck type "Q" int32 #pragma varargck type "Q" int32
#pragma varargck type "O" int #pragma varargck type "O" int
#pragma varargck type "O" uint #pragma varargck type "O" uint
#pragma varargck type "S" ushort*
#pragma varargck type "T" Type* #pragma varargck type "T" Type*
#pragma varargck type "U" char* #pragma varargck type "U" char*
#pragma varargck type "|" int #pragma varargck type "|" int
......
...@@ -891,9 +891,9 @@ lstring: ...@@ -891,9 +891,9 @@ lstring:
LLSTRING LLSTRING
{ {
$$ = new(OLSTRING, Z, Z); $$ = new(OLSTRING, Z, Z);
$$->type = typ(TARRAY, types[TUSHORT]); $$->type = typ(TARRAY, types[TRUNE]);
$$->type->width = $1.l + sizeof(ushort); $$->type->width = $1.l + sizeof(TRune);
$$->rstring = (ushort*)$1.s; $$->rstring = (TRune*)$1.s;
$$->sym = symstring; $$->sym = symstring;
$$->etype = TARRAY; $$->etype = TARRAY;
$$->class = CSTATIC; $$->class = CSTATIC;
...@@ -903,16 +903,16 @@ lstring: ...@@ -903,16 +903,16 @@ lstring:
char *s; char *s;
int n; int n;
n = $1->type->width - sizeof(ushort); n = $1->type->width - sizeof(TRune);
s = alloc(n+$2.l+MAXALIGN); s = alloc(n+$2.l+MAXALIGN);
memcpy(s, $1->rstring, n); memcpy(s, $1->rstring, n);
memcpy(s+n, $2.s, $2.l); memcpy(s+n, $2.s, $2.l);
*(ushort*)(s+n+$2.l) = 0; *(TRune*)(s+n+$2.l) = 0;
$$ = $1; $$ = $1;
$$->type->width += $2.l; $$->type->width += $2.l;
$$->rstring = (ushort*)s; $$->rstring = (TRune*)s;
} }
zelist: zelist:
......
...@@ -87,6 +87,7 @@ tcomo(Node *n, int f) ...@@ -87,6 +87,7 @@ tcomo(Node *n, int f)
Node *l, *r; Node *l, *r;
Type *t; Type *t;
int o; int o;
static TRune zer;
if(n == Z) { if(n == Z) {
diag(Z, "Z in tcom"); diag(Z, "Z in tcom");
...@@ -651,12 +652,10 @@ tcomo(Node *n, int f) ...@@ -651,12 +652,10 @@ tcomo(Node *n, int f)
break; break;
case OLSTRING: case OLSTRING:
if(n->type->link != types[TUSHORT]) { if(n->type->link != types[TRUNE]) {
o = outstring(0, 0); o = outstring(0, 0);
while(o & 3) { while(o & 3) {
ushort a[1]; outlstring(&zer, sizeof(TRune));
a[0] = 0;
outlstring(a, sizeof(ushort));
o = outlstring(0, 0); o = outlstring(0, 0);
} }
} }
......
...@@ -268,7 +268,7 @@ nextinit(void) ...@@ -268,7 +268,7 @@ nextinit(void)
a->cstring++; a->cstring++;
} }
if(a->op == OLSTRING) { if(a->op == OLSTRING) {
b->vconst = convvtox(*a->rstring, TUSHORT); b->vconst = convvtox(*a->rstring, TRUNE);
a->rstring++; a->rstring++;
} }
a->type->width -= b->type->width; a->type->width -= b->type->width;
......
...@@ -533,7 +533,7 @@ l1: ...@@ -533,7 +533,7 @@ l1:
yyerror("missing '"); yyerror("missing '");
peekc = c1; peekc = c1;
} }
yylval.vval = convvtox(c, TUSHORT); yylval.vval = convvtox(c, TRUNE);
return LUCONST; return LUCONST;
} }
if(c == '"') { if(c == '"') {
...@@ -607,15 +607,15 @@ l1: ...@@ -607,15 +607,15 @@ l1:
c = escchar('"', 1, 0); c = escchar('"', 1, 0);
if(c == EOF) if(c == EOF)
break; break;
cp = allocn(cp, c1, sizeof(ushort)); cp = allocn(cp, c1, sizeof(TRune));
*(ushort*)(cp + c1) = c; *(TRune*)(cp + c1) = c;
c1 += sizeof(ushort); c1 += sizeof(TRune);
} }
yylval.sval.l = c1; yylval.sval.l = c1;
do { do {
cp = allocn(cp, c1, sizeof(ushort)); cp = allocn(cp, c1, sizeof(TRune));
*(ushort*)(cp + c1) = 0; *(TRune*)(cp + c1) = 0;
c1 += sizeof(ushort); c1 += sizeof(TRune);
} while(c1 & MAXALIGN); } while(c1 & MAXALIGN);
yylval.sval.s = cp; yylval.sval.s = cp;
return LLSTRING; return LLSTRING;
...@@ -1093,7 +1093,7 @@ getnsc(void) ...@@ -1093,7 +1093,7 @@ getnsc(void)
} else } else
c = GETC(); c = GETC();
for(;;) { for(;;) {
if(!isspace(c)) if(c >= Runeself || !isspace(c))
return c; return c;
if(c == '\n') { if(c == '\n') {
lineno++; lineno++;
...@@ -1137,7 +1137,7 @@ loop: ...@@ -1137,7 +1137,7 @@ loop:
*/ */
i = 2; i = 2;
if(longflg) if(longflg)
i = 4; i = 6;
l = 0; l = 0;
for(; i>0; i--) { for(; i>0; i--) {
c = getc(); c = getc();
...@@ -1167,7 +1167,7 @@ loop: ...@@ -1167,7 +1167,7 @@ loop:
*/ */
i = 2; i = 2;
if(longflg) if(longflg)
i = 5; i = 8;
l = c - '0'; l = c - '0';
for(; i>0; i--) { for(; i>0; i--) {
c = getc(); c = getc();
......
...@@ -102,28 +102,29 @@ newcase(void) ...@@ -102,28 +102,29 @@ newcase(void)
} }
int32 int32
outlstring(ushort *s, int32 n) outlstring(TRune *s, int32 n)
{ {
char buf[2]; char buf[sizeof(TRune)];
int c; uint c;
int i;
int32 r; int32 r;
if(suppress) if(suppress)
return nstring; return nstring;
while(nstring & 1) while(nstring & (sizeof(TRune)-1))
outstring("", 1); outstring("", 1);
r = nstring; r = nstring;
while(n > 0) { while(n > 0) {
c = *s++; c = *s++;
if(align(0, types[TCHAR], Aarg1, nil)) { if(align(0, types[TCHAR], Aarg1, nil)) {
buf[0] = c>>8; for(i = 0; i < sizeof(TRune); i++)
buf[1] = c; buf[i] = c>>(8*(sizeof(TRune) - i - 1));
} else { } else {
buf[0] = c; for(i = 0; i < sizeof(TRune); i++)
buf[1] = c>>8; buf[i] = c>>(8*i);
} }
outstring(buf, 2); outstring(buf, sizeof(TRune));
n -= sizeof(ushort); n -= sizeof(TRune);
} }
return r; return r;
} }
......
...@@ -116,7 +116,10 @@ prtree1(Node *n, int d, int f) ...@@ -116,7 +116,10 @@ prtree1(Node *n, int d, int f)
break; break;
case OLSTRING: case OLSTRING:
print(" \"%S\"", n->rstring); if(sizeof(TRune) == sizeof(Rune))
print(" \"%S\"", (Rune*)n->rstring);
else
print(" \"...\"");
i = 0; i = 0;
break; break;
......
/* A Bison parser, made by GNU Bison 2.3. */ /* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* 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-2013 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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
...@@ -29,7 +26,7 @@ ...@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public Bison output files to be licensed under the GNU General Public
License without this special exception. License without this special exception.
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. */
...@@ -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.7.12-4996"
/* 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
/* Using locations. */ /* Push parsers. */
#define YYLSP_NEEDED 0 #define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Copy the first part of user declarations. */
/* Line 371 of yacc.c */
#line 31 "cc.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and cc.h re-#defines getc */
#include "cc.h"
/* Line 371 of yacc.c */
#line 74 "y.tab.c"
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr
# else
# define YY_NULL 0
# endif
# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* In a future release of Bison, this section will be replaced
by #include "y.tab.h". */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -216,37 +256,12 @@ ...@@ -216,37 +256,12 @@
/* Copy the first part of user declarations. */
#line 31 "cc.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and cc.h re-#defines getc */
#include "cc.h"
/* 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 0
#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 36 "cc.y"
{ {
/* Line 387 of yacc.c */
#line 36 "cc.y"
Node* node; Node* node;
Sym* sym; Sym* sym;
Type* type; Type* type;
...@@ -270,22 +285,38 @@ typedef union YYSTYPE ...@@ -270,22 +285,38 @@ typedef union YYSTYPE
int32 lval; int32 lval;
double dval; double dval;
vlong vval; vlong vval;
}
/* Line 193 of yacc.c. */
#line 276 "y.tab.c" /* Line 387 of yacc.c */
YYSTYPE; #line 292 "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
extern YYSTYPE yylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/* Copy the second part of user declarations. */ #endif /* !YY_YY_Y_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */ /* Line 390 of yacc.c */
#line 289 "y.tab.c" #line 320 "y.tab.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -338,36 +369,45 @@ typedef short int yytype_int16; ...@@ -338,36 +369,45 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif # endif
# endif # endif
# ifndef YY_ # ifndef YY_
# define YY_(msgid) msgid # define YY_(Msgid) Msgid
# endif
#endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define __attribute__(Spec) /* empty */
# endif # endif
#endif #endif
/* Suppress unused-variable warnings by "using" E. */ /* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__ #if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e)) # define YYUSE(E) ((void) (E))
#else #else
# define YYUSE(e) /* empty */ # define YYUSE(E) /* empty */
#endif #endif
/* Identity function, used to suppress warnings about constant conditions. */ /* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint #ifndef lint
# define YYID(n) (n) # define YYID(N) (N)
#else #else
#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
...@@ -388,11 +428,12 @@ YYID (i) ...@@ -388,11 +428,12 @@ 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 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
# define _STDLIB_H 1 # ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# endif # endif
...@@ -415,24 +456,24 @@ YYID (i) ...@@ -415,24 +456,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
...@@ -448,9 +489,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ ...@@ -448,9 +489,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)
...@@ -461,35 +502,19 @@ union yyalloc ...@@ -461,35 +502,19 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM) + YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do # define YYCOPY_NEEDED 1
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The /* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next stack. Advance YYPTR to a properly aligned location for the next
stack. */ stack. */
# define YYSTACK_RELOCATE(Stack) \ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \ do \
{ \ { \
YYSIZE_T yynewbytes; \ YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack; \ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \ yyptr += yynewbytes / sizeof (*yyptr); \
} \ } \
...@@ -497,6 +522,26 @@ union yyalloc ...@@ -497,6 +522,26 @@ union yyalloc
#endif #endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 2 #define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
...@@ -701,7 +746,7 @@ static const yytype_uint16 yyrline[] = ...@@ -701,7 +746,7 @@ static const yytype_uint16 yyrline[] =
}; };
#endif #endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE #if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = static const char *const yytname[] =
...@@ -719,16 +764,16 @@ static const char *const yytname[] = ...@@ -719,16 +764,16 @@ static const char *const yytname[] =
"LTYPEDEF", "LTYPESTR", "LUNION", "LUNSIGNED", "LWHILE", "LVOID", "LTYPEDEF", "LTYPESTR", "LUNION", "LUNSIGNED", "LWHILE", "LVOID",
"LENUM", "LSIGNED", "LCONSTNT", "LVOLATILE", "LSET", "LSIGNOF", "LENUM", "LSIGNED", "LCONSTNT", "LVOLATILE", "LSET", "LSIGNOF",
"LRESTRICT", "LINLINE", "')'", "']'", "'{'", "'}'", "'!'", "'~'", "LRESTRICT", "LINLINE", "')'", "']'", "'{'", "'}'", "'!'", "'~'",
"$accept", "prog", "xdecl", "@1", "@2", "xdlist", "@3", "xdecor", "$accept", "prog", "xdecl", "$@1", "$@2", "xdlist", "$@3", "xdecor",
"xdecor2", "adecl", "adlist", "@4", "pdecl", "pdlist", "edecl", "@5", "xdecor2", "adecl", "adlist", "$@4", "pdecl", "pdlist", "edecl", "$@5",
"@6", "zedlist", "edlist", "edecor", "abdecor", "abdecor1", "abdecor2", "$@6", "zedlist", "edlist", "edecor", "abdecor", "abdecor1", "abdecor2",
"abdecor3", "init", "qual", "qlist", "ilist", "zarglist", "arglist", "abdecor3", "init", "qual", "qlist", "ilist", "zarglist", "arglist",
"block", "slist", "labels", "label", "stmnt", "forexpr", "ulstmnt", "@7", "block", "slist", "labels", "label", "stmnt", "forexpr", "ulstmnt",
"@8", "zcexpr", "zexpr", "lexpr", "cexpr", "expr", "xuexpr", "uexpr", "$@7", "$@8", "zcexpr", "zexpr", "lexpr", "cexpr", "expr", "xuexpr",
"pexpr", "string", "lstring", "zelist", "elist", "sbody", "@9", "uexpr", "pexpr", "string", "lstring", "zelist", "elist", "sbody", "@9",
"zctlist", "types", "tlist", "ctlist", "complex", "@10", "@11", "@12", "zctlist", "types", "tlist", "ctlist", "complex", "$@10", "$@11", "$@12",
"@13", "@14", "gctnlist", "zgnlist", "gctname", "gcnlist", "gcname", "$@13", "$@14", "gctnlist", "zgnlist", "gctname", "gcnlist", "gcname",
"enum", "tname", "cname", "gname", "name", "tag", "ltag", 0 "enum", "tname", "cname", "gname", "name", "tag", "ltag", YY_NULL
}; };
#endif #endif
...@@ -810,8 +855,8 @@ static const yytype_uint8 yyr2[] = ...@@ -810,8 +855,8 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1
}; };
/* 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_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
...@@ -936,8 +981,7 @@ static const yytype_int16 yypgoto[] = ...@@ -936,8 +981,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 -205 #define YYTABLE_NINF -205
static const yytype_int16 yytable[] = static const yytype_int16 yytable[] =
{ {
...@@ -1062,6 +1106,12 @@ static const yytype_int16 yytable[] = ...@@ -1062,6 +1106,12 @@ static const yytype_int16 yytable[] =
178, 179, 180, 181, 182, 183, 184, 185, 186 178, 179, 180, 181, 182, 183, 184, 185, 186
}; };
#define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-331)))
#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
1, 27, 14, 91, 131, 17, 30, 58, 20, 33, 1, 27, 14, 91, 131, 17, 30, 58, 20, 33,
...@@ -1245,78 +1295,50 @@ static const yytype_uint8 yystos[] = ...@@ -1245,78 +1295,50 @@ 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)
#define YYBACKUP(Token, Value) \ #define YYBACKUP(Token, Value) \
do \ do \
if (yychar == YYEMPTY && yylen == 1) \ if (yychar == YYEMPTY) \
{ \ { \
yychar = (Token); \ yychar = (Token); \
yylval = (Value); \ yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (yylen); \
YYPOPSTACK (1); \ yystate = *yyssp; \
goto yybackup; \ goto yybackup; \
} \ } \
else \ else \
{ \ { \
yyerror (YY_("syntax error: cannot back up")); \ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \ YYERROR; \
} \ } \
while (YYID (0)) while (YYID (0))
/* Error token number */
#define YYTERROR 1 #define YYTERROR 1
#define YYERRCODE 256 #define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. /* This macro is provided for backward compatibility. */
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif #endif
/* YYLEX -- calling `yylex' with the right arguments. */ /* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM #ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM) # define YYLEX yylex (YYLEX_PARAM)
#else #else
...@@ -1366,6 +1388,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) ...@@ -1366,6 +1388,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
YYSTYPE const * const yyvaluep; YYSTYPE const * const yyvaluep;
#endif #endif
{ {
FILE *yyo = yyoutput;
YYUSE (yyo);
if (!yyvaluep) if (!yyvaluep)
return; return;
# ifdef YYPRINT # ifdef YYPRINT
...@@ -1374,11 +1398,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) ...@@ -1374,11 +1398,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
# else # else
YYUSE (yyoutput); YYUSE (yyoutput);
# endif # endif
switch (yytype) YYUSE (yytype);
{
default:
break;
}
} }
...@@ -1415,17 +1435,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) ...@@ -1415,17 +1435,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");
} }
...@@ -1459,11 +1482,11 @@ yy_reduce_print (yyvsp, yyrule) ...@@ -1459,11 +1482,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");
} }
} }
...@@ -1500,7 +1523,6 @@ int yydebug; ...@@ -1500,7 +1523,6 @@ int yydebug;
# define YYMAXDEPTH 10000 # define YYMAXDEPTH 10000
#endif #endif
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
...@@ -1603,115 +1625,145 @@ yytnamerr (char *yyres, const char *yystr) ...@@ -1603,115 +1625,145 @@ 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,
YYSIZE_T yysize = yysize0; yytype_int16 *yyssp, int yytoken)
YYSIZE_T yysize1; {
int yysize_overflow = 0; YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; YYSIZE_T yysize = yysize0;
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
int yyx; /* Internationalized format string. */
const char *yyformat = YY_NULL;
# if 0 /* Arguments of yyformat. */
/* This is so xgettext sees the translatable formats that are char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
constructed on the fly. */ /* Number of reported tokens (one for the "unexpected", one per
YY_("syntax error, unexpected %s"); "expected"). */
YY_("syntax error, unexpected %s, expecting %s"); int yycount = 0;
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s"); /* There are many possibilities here to consider:
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); - Assume YYFAIL is not used. It's too flawed to consider. See
# endif <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
char *yyfmt; for details. YYERROR is fine as it does not invoke this
char const *yyf; function.
static char const yyunexpected[] = "syntax error, unexpected %s"; - If this state is a consistent state with a default action, then
static char const yyexpecting[] = ", expecting %s"; the only way this function was invoked is if the default action
static char const yyor[] = " or %s"; is an error action. In that case, don't check for expected
char yyformat[sizeof yyunexpected tokens because there are none.
+ sizeof yyexpecting - 1 - The only way there can be no lookahead present (in yychar) is if
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) this state is a consistent state with a default action. Thus,
* (sizeof yyor - 1))]; detecting the absence of a lookahead is sufficient to determine
char const *yyprefix = yyexpecting; that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
/* Start YYX at -YYN if negative to avoid negative indexes in - Don't assume there isn't a lookahead just because this state is a
YYCHECK. */ consistent state with a default action. There might have been a
int yyxbegin = yyn < 0 ? -yyn : 0; previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
/* Stay within bounds of both yycheck and yytname. */ - Of course, the expected token list depends on states to have
int yychecklim = YYLAST - yyn + 1; correct lookahead information, and it depends on the parser not
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; to perform extra reductions after fetching a lookahead from the
int yycount = 1; scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
yyarg[0] = yytname[yytype]; token list. However, the list is correct for canonical LR with
yyfmt = yystpcpy (yyformat, yyunexpected); one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
for (yyx = yyxbegin; yyx < yyxend; ++yyx) */
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) if (yytoken != YYEMPTY)
{ {
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) int yyn = yypact[*yyssp];
{ yyarg[yycount++] = yytname[yytoken];
yycount = 1; if (!yypact_value_is_default (yyn))
yysize = yysize0; {
yyformat[sizeof yyunexpected - 1] = '\0'; /* Start YYX at -YYN if negative to avoid negative indexes in
break; YYCHECK. In other words, skip the first -YYN actions for
} this state because they are default actions. */
yyarg[yycount++] = yytname[yyx]; int yyxbegin = yyn < 0 ? -yyn : 0;
yysize1 = yysize + yytnamerr (0, yytname[yyx]); /* Stay within bounds of both yycheck and yytname. */
yysize_overflow |= (yysize1 < yysize); int yychecklim = YYLAST - yyn + 1;
yysize = yysize1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
yyfmt = yystpcpy (yyfmt, yyprefix); int yyx;
yyprefix = yyor;
} for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
break;
}
yyarg[yycount++] = yytname[yyx];
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
}
}
}
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) {
return YYSIZE_MAXIMUM; YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
if (yyresult) if (*yymsg_alloc < yysize)
{ {
/* Avoid sprintf, as that infringes on the user's name space. *yymsg_alloc = 2 * yysize;
Don't have undefined behavior even if the translation if (! (yysize <= *yymsg_alloc
produced a string with the wrong number of "%s"s. */ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
char *yyp = yyresult; *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
int yyi = 0; return 1;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
} }
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
{
char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
yyp++;
yyformat++;
}
}
return 0;
} }
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
/*-----------------------------------------------. /*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
...@@ -1736,44 +1788,31 @@ yydestruct (yymsg, yytype, yyvaluep) ...@@ -1736,44 +1788,31 @@ yydestruct (yymsg, yytype, yyvaluep)
yymsg = "Deleting"; yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype) YYUSE (yytype);
{
default:
break;
}
} }
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/* The look-ahead symbol. */ /* The lookahead symbol. */
int yychar; int yychar;
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval; #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int yynerrs; int yynerrs;
/*----------. /*----------.
| yyparse. | | yyparse. |
`----------*/ `----------*/
...@@ -1800,14 +1839,37 @@ yyparse () ...@@ -1800,14 +1839,37 @@ yyparse ()
#endif #endif
#endif #endif
{ {
int yystate;
int yystate; /* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
`yyss': related to states.
`yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn; int yyn;
int yyresult; int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Lookahead token as an internal (translated) token number. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0; int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */ /* Buffer for error messages, and its allocated size. */
char yymsgbuf[128]; char yymsgbuf[128];
...@@ -1815,54 +1877,22 @@ yyparse () ...@@ -1815,54 +1877,22 @@ yyparse ()
YYSIZE_T yymsg_alloc = sizeof yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif #endif
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* The number of symbols on the RHS of the reduced rule. /* 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;
yyssp = yyss = yyssa;
yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n")); YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0; yystate = 0;
yyerrstatus = 0; yyerrstatus = 0;
yynerrs = 0; yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate; goto yysetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
...@@ -1889,7 +1919,6 @@ yyparse () ...@@ -1889,7 +1919,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
...@@ -1897,7 +1926,6 @@ yyparse () ...@@ -1897,7 +1926,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;
...@@ -1920,9 +1948,8 @@ yyparse () ...@@ -1920,9 +1948,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);
...@@ -1933,7 +1960,6 @@ yyparse () ...@@ -1933,7 +1960,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));
...@@ -1943,6 +1969,9 @@ yyparse () ...@@ -1943,6 +1969,9 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup; goto yybackup;
/*-----------. /*-----------.
...@@ -1951,16 +1980,16 @@ yyparse () ...@@ -1951,16 +1980,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: "));
...@@ -1986,29 +2015,27 @@ yybackup: ...@@ -1986,29 +2015,27 @@ 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;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval; *++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate; goto yynewstate;
...@@ -2045,6 +2072,7 @@ yyreduce: ...@@ -2045,6 +2072,7 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 4: case 4:
/* Line 1787 of yacc.c */
#line 109 "cc.y" #line 109 "cc.y"
{ {
dodecl(xdecl, lastclass, lasttype, Z); dodecl(xdecl, lastclass, lasttype, Z);
...@@ -2052,6 +2080,7 @@ yyreduce: ...@@ -2052,6 +2080,7 @@ yyreduce:
break; break;
case 6: case 6:
/* Line 1787 of yacc.c */
#line 114 "cc.y" #line 114 "cc.y"
{ {
lastdcl = T; lastdcl = T;
...@@ -2069,6 +2098,7 @@ yyreduce: ...@@ -2069,6 +2098,7 @@ yyreduce:
break; break;
case 7: case 7:
/* Line 1787 of yacc.c */
#line 128 "cc.y" #line 128 "cc.y"
{ {
argmark((yyvsp[(2) - (4)].node), 1); argmark((yyvsp[(2) - (4)].node), 1);
...@@ -2076,6 +2106,7 @@ yyreduce: ...@@ -2076,6 +2106,7 @@ yyreduce:
break; break;
case 8: case 8:
/* Line 1787 of yacc.c */
#line 132 "cc.y" #line 132 "cc.y"
{ {
Node *n; Node *n;
...@@ -2089,6 +2120,7 @@ yyreduce: ...@@ -2089,6 +2120,7 @@ yyreduce:
break; break;
case 9: case 9:
/* Line 1787 of yacc.c */
#line 144 "cc.y" #line 144 "cc.y"
{ {
dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2096,6 +2128,7 @@ yyreduce: ...@@ -2096,6 +2128,7 @@ yyreduce:
break; break;
case 10: case 10:
/* Line 1787 of yacc.c */
#line 148 "cc.y" #line 148 "cc.y"
{ {
(yyvsp[(1) - (1)].node) = dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); (yyvsp[(1) - (1)].node) = dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2103,6 +2136,7 @@ yyreduce: ...@@ -2103,6 +2136,7 @@ yyreduce:
break; break;
case 11: case 11:
/* Line 1787 of yacc.c */
#line 152 "cc.y" #line 152 "cc.y"
{ {
doinit((yyvsp[(1) - (4)].node)->sym, (yyvsp[(1) - (4)].node)->type, 0L, (yyvsp[(4) - (4)].node)); doinit((yyvsp[(1) - (4)].node)->sym, (yyvsp[(1) - (4)].node)->type, 0L, (yyvsp[(4) - (4)].node));
...@@ -2110,6 +2144,7 @@ yyreduce: ...@@ -2110,6 +2144,7 @@ yyreduce:
break; break;
case 14: case 14:
/* Line 1787 of yacc.c */
#line 160 "cc.y" #line 160 "cc.y"
{ {
(yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z); (yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z);
...@@ -2118,6 +2153,7 @@ yyreduce: ...@@ -2118,6 +2153,7 @@ yyreduce:
break; break;
case 16: case 16:
/* Line 1787 of yacc.c */
#line 168 "cc.y" #line 168 "cc.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -2125,6 +2161,7 @@ yyreduce: ...@@ -2125,6 +2161,7 @@ yyreduce:
break; break;
case 17: case 17:
/* Line 1787 of yacc.c */
#line 172 "cc.y" #line 172 "cc.y"
{ {
(yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
...@@ -2132,6 +2169,7 @@ yyreduce: ...@@ -2132,6 +2169,7 @@ yyreduce:
break; break;
case 18: case 18:
/* Line 1787 of yacc.c */
#line 176 "cc.y" #line 176 "cc.y"
{ {
(yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); (yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
...@@ -2139,6 +2177,7 @@ yyreduce: ...@@ -2139,6 +2177,7 @@ yyreduce:
break; break;
case 19: case 19:
/* Line 1787 of yacc.c */
#line 185 "cc.y" #line 185 "cc.y"
{ {
(yyval.node) = dodecl(adecl, lastclass, lasttype, Z); (yyval.node) = dodecl(adecl, lastclass, lasttype, Z);
...@@ -2146,6 +2185,7 @@ yyreduce: ...@@ -2146,6 +2185,7 @@ yyreduce:
break; break;
case 20: case 20:
/* Line 1787 of yacc.c */
#line 189 "cc.y" #line 189 "cc.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -2153,6 +2193,7 @@ yyreduce: ...@@ -2153,6 +2193,7 @@ yyreduce:
break; break;
case 21: case 21:
/* Line 1787 of yacc.c */
#line 195 "cc.y" #line 195 "cc.y"
{ {
dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2161,6 +2202,7 @@ yyreduce: ...@@ -2161,6 +2202,7 @@ yyreduce:
break; break;
case 22: case 22:
/* Line 1787 of yacc.c */
#line 200 "cc.y" #line 200 "cc.y"
{ {
(yyvsp[(1) - (1)].node) = dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); (yyvsp[(1) - (1)].node) = dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2168,6 +2210,7 @@ yyreduce: ...@@ -2168,6 +2210,7 @@ yyreduce:
break; break;
case 23: case 23:
/* Line 1787 of yacc.c */
#line 204 "cc.y" #line 204 "cc.y"
{ {
int32 w; int32 w;
...@@ -2179,6 +2222,7 @@ yyreduce: ...@@ -2179,6 +2222,7 @@ yyreduce:
break; break;
case 24: case 24:
/* Line 1787 of yacc.c */
#line 212 "cc.y" #line 212 "cc.y"
{ {
(yyval.node) = (yyvsp[(1) - (3)].node); (yyval.node) = (yyvsp[(1) - (3)].node);
...@@ -2191,6 +2235,7 @@ yyreduce: ...@@ -2191,6 +2235,7 @@ yyreduce:
break; break;
case 27: case 27:
/* Line 1787 of yacc.c */
#line 229 "cc.y" #line 229 "cc.y"
{ {
dodecl(pdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); dodecl(pdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2198,6 +2243,7 @@ yyreduce: ...@@ -2198,6 +2243,7 @@ yyreduce:
break; break;
case 29: case 29:
/* Line 1787 of yacc.c */
#line 239 "cc.y" #line 239 "cc.y"
{ {
lasttype = (yyvsp[(1) - (1)].type); lasttype = (yyvsp[(1) - (1)].type);
...@@ -2205,6 +2251,7 @@ yyreduce: ...@@ -2205,6 +2251,7 @@ yyreduce:
break; break;
case 31: case 31:
/* Line 1787 of yacc.c */
#line 244 "cc.y" #line 244 "cc.y"
{ {
lasttype = (yyvsp[(2) - (2)].type); lasttype = (yyvsp[(2) - (2)].type);
...@@ -2212,6 +2259,7 @@ yyreduce: ...@@ -2212,6 +2259,7 @@ yyreduce:
break; break;
case 33: case 33:
/* Line 1787 of yacc.c */
#line 250 "cc.y" #line 250 "cc.y"
{ {
lastfield = 0; lastfield = 0;
...@@ -2220,6 +2268,7 @@ yyreduce: ...@@ -2220,6 +2268,7 @@ yyreduce:
break; break;
case 35: case 35:
/* Line 1787 of yacc.c */
#line 258 "cc.y" #line 258 "cc.y"
{ {
dodecl(edecl, CXXX, lasttype, (yyvsp[(1) - (1)].node)); dodecl(edecl, CXXX, lasttype, (yyvsp[(1) - (1)].node));
...@@ -2227,6 +2276,7 @@ yyreduce: ...@@ -2227,6 +2276,7 @@ yyreduce:
break; break;
case 37: case 37:
/* Line 1787 of yacc.c */
#line 265 "cc.y" #line 265 "cc.y"
{ {
lastbit = 0; lastbit = 0;
...@@ -2235,6 +2285,7 @@ yyreduce: ...@@ -2235,6 +2285,7 @@ yyreduce:
break; break;
case 38: case 38:
/* Line 1787 of yacc.c */
#line 270 "cc.y" #line 270 "cc.y"
{ {
(yyval.node) = new(OBIT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OBIT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2242,6 +2293,7 @@ yyreduce: ...@@ -2242,6 +2293,7 @@ yyreduce:
break; break;
case 39: case 39:
/* Line 1787 of yacc.c */
#line 274 "cc.y" #line 274 "cc.y"
{ {
(yyval.node) = new(OBIT, Z, (yyvsp[(2) - (2)].node)); (yyval.node) = new(OBIT, Z, (yyvsp[(2) - (2)].node));
...@@ -2249,6 +2301,7 @@ yyreduce: ...@@ -2249,6 +2301,7 @@ yyreduce:
break; break;
case 40: case 40:
/* Line 1787 of yacc.c */
#line 282 "cc.y" #line 282 "cc.y"
{ {
(yyval.node) = (Z); (yyval.node) = (Z);
...@@ -2256,6 +2309,7 @@ yyreduce: ...@@ -2256,6 +2309,7 @@ yyreduce:
break; break;
case 42: case 42:
/* Line 1787 of yacc.c */
#line 289 "cc.y" #line 289 "cc.y"
{ {
(yyval.node) = new(OIND, (Z), Z); (yyval.node) = new(OIND, (Z), Z);
...@@ -2264,6 +2318,7 @@ yyreduce: ...@@ -2264,6 +2318,7 @@ yyreduce:
break; break;
case 43: case 43:
/* Line 1787 of yacc.c */
#line 294 "cc.y" #line 294 "cc.y"
{ {
(yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z); (yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z);
...@@ -2272,6 +2327,7 @@ yyreduce: ...@@ -2272,6 +2327,7 @@ yyreduce:
break; break;
case 46: case 46:
/* Line 1787 of yacc.c */
#line 303 "cc.y" #line 303 "cc.y"
{ {
(yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
...@@ -2279,6 +2335,7 @@ yyreduce: ...@@ -2279,6 +2335,7 @@ yyreduce:
break; break;
case 47: case 47:
/* Line 1787 of yacc.c */
#line 307 "cc.y" #line 307 "cc.y"
{ {
(yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); (yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
...@@ -2286,6 +2343,7 @@ yyreduce: ...@@ -2286,6 +2343,7 @@ yyreduce:
break; break;
case 48: case 48:
/* Line 1787 of yacc.c */
#line 313 "cc.y" #line 313 "cc.y"
{ {
(yyval.node) = new(OFUNC, (Z), Z); (yyval.node) = new(OFUNC, (Z), Z);
...@@ -2293,6 +2351,7 @@ yyreduce: ...@@ -2293,6 +2351,7 @@ yyreduce:
break; break;
case 49: case 49:
/* Line 1787 of yacc.c */
#line 317 "cc.y" #line 317 "cc.y"
{ {
(yyval.node) = new(OARRAY, (Z), (yyvsp[(2) - (3)].node)); (yyval.node) = new(OARRAY, (Z), (yyvsp[(2) - (3)].node));
...@@ -2300,6 +2359,7 @@ yyreduce: ...@@ -2300,6 +2359,7 @@ yyreduce:
break; break;
case 50: case 50:
/* Line 1787 of yacc.c */
#line 321 "cc.y" #line 321 "cc.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -2307,6 +2367,7 @@ yyreduce: ...@@ -2307,6 +2367,7 @@ yyreduce:
break; break;
case 52: case 52:
/* Line 1787 of yacc.c */
#line 328 "cc.y" #line 328 "cc.y"
{ {
(yyval.node) = new(OINIT, invert((yyvsp[(2) - (3)].node)), Z); (yyval.node) = new(OINIT, invert((yyvsp[(2) - (3)].node)), Z);
...@@ -2314,6 +2375,7 @@ yyreduce: ...@@ -2314,6 +2375,7 @@ yyreduce:
break; break;
case 53: case 53:
/* Line 1787 of yacc.c */
#line 334 "cc.y" #line 334 "cc.y"
{ {
(yyval.node) = new(OARRAY, (yyvsp[(2) - (3)].node), Z); (yyval.node) = new(OARRAY, (yyvsp[(2) - (3)].node), Z);
...@@ -2321,6 +2383,7 @@ yyreduce: ...@@ -2321,6 +2383,7 @@ yyreduce:
break; break;
case 54: case 54:
/* Line 1787 of yacc.c */
#line 338 "cc.y" #line 338 "cc.y"
{ {
(yyval.node) = new(OELEM, Z, Z); (yyval.node) = new(OELEM, Z, Z);
...@@ -2329,6 +2392,7 @@ yyreduce: ...@@ -2329,6 +2392,7 @@ yyreduce:
break; break;
case 57: case 57:
/* Line 1787 of yacc.c */
#line 347 "cc.y" #line 347 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
...@@ -2336,6 +2400,7 @@ yyreduce: ...@@ -2336,6 +2400,7 @@ yyreduce:
break; break;
case 59: case 59:
/* Line 1787 of yacc.c */
#line 352 "cc.y" #line 352 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2343,6 +2408,7 @@ yyreduce: ...@@ -2343,6 +2408,7 @@ yyreduce:
break; break;
case 62: case 62:
/* Line 1787 of yacc.c */
#line 360 "cc.y" #line 360 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2350,6 +2416,7 @@ yyreduce: ...@@ -2350,6 +2416,7 @@ yyreduce:
break; break;
case 63: case 63:
/* Line 1787 of yacc.c */
#line 365 "cc.y" #line 365 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -2357,6 +2424,7 @@ yyreduce: ...@@ -2357,6 +2424,7 @@ yyreduce:
break; break;
case 64: case 64:
/* Line 1787 of yacc.c */
#line 369 "cc.y" #line 369 "cc.y"
{ {
(yyval.node) = invert((yyvsp[(1) - (1)].node)); (yyval.node) = invert((yyvsp[(1) - (1)].node));
...@@ -2364,6 +2432,7 @@ yyreduce: ...@@ -2364,6 +2432,7 @@ yyreduce:
break; break;
case 66: case 66:
/* Line 1787 of yacc.c */
#line 377 "cc.y" #line 377 "cc.y"
{ {
(yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z);
...@@ -2372,6 +2441,7 @@ yyreduce: ...@@ -2372,6 +2441,7 @@ yyreduce:
break; break;
case 67: case 67:
/* Line 1787 of yacc.c */
#line 382 "cc.y" #line 382 "cc.y"
{ {
(yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z);
...@@ -2380,6 +2450,7 @@ yyreduce: ...@@ -2380,6 +2450,7 @@ yyreduce:
break; break;
case 68: case 68:
/* Line 1787 of yacc.c */
#line 387 "cc.y" #line 387 "cc.y"
{ {
(yyval.node) = new(ODOTDOT, Z, Z); (yyval.node) = new(ODOTDOT, Z, Z);
...@@ -2387,6 +2458,7 @@ yyreduce: ...@@ -2387,6 +2458,7 @@ yyreduce:
break; break;
case 69: case 69:
/* Line 1787 of yacc.c */
#line 391 "cc.y" #line 391 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2394,6 +2466,7 @@ yyreduce: ...@@ -2394,6 +2466,7 @@ yyreduce:
break; break;
case 70: case 70:
/* Line 1787 of yacc.c */
#line 397 "cc.y" #line 397 "cc.y"
{ {
(yyval.node) = invert((yyvsp[(2) - (3)].node)); (yyval.node) = invert((yyvsp[(2) - (3)].node));
...@@ -2405,6 +2478,7 @@ yyreduce: ...@@ -2405,6 +2478,7 @@ yyreduce:
break; break;
case 71: case 71:
/* Line 1787 of yacc.c */
#line 406 "cc.y" #line 406 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -2412,6 +2486,7 @@ yyreduce: ...@@ -2412,6 +2486,7 @@ yyreduce:
break; break;
case 72: case 72:
/* Line 1787 of yacc.c */
#line 410 "cc.y" #line 410 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2419,6 +2494,7 @@ yyreduce: ...@@ -2419,6 +2494,7 @@ yyreduce:
break; break;
case 73: case 73:
/* Line 1787 of yacc.c */
#line 414 "cc.y" #line 414 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2426,6 +2502,7 @@ yyreduce: ...@@ -2426,6 +2502,7 @@ yyreduce:
break; break;
case 75: case 75:
/* Line 1787 of yacc.c */
#line 421 "cc.y" #line 421 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2433,6 +2510,7 @@ yyreduce: ...@@ -2433,6 +2510,7 @@ yyreduce:
break; break;
case 76: case 76:
/* Line 1787 of yacc.c */
#line 427 "cc.y" #line 427 "cc.y"
{ {
(yyval.node) = new(OCASE, (yyvsp[(2) - (3)].node), Z); (yyval.node) = new(OCASE, (yyvsp[(2) - (3)].node), Z);
...@@ -2440,6 +2518,7 @@ yyreduce: ...@@ -2440,6 +2518,7 @@ yyreduce:
break; break;
case 77: case 77:
/* Line 1787 of yacc.c */
#line 431 "cc.y" #line 431 "cc.y"
{ {
(yyval.node) = new(OCASE, Z, Z); (yyval.node) = new(OCASE, Z, Z);
...@@ -2447,6 +2526,7 @@ yyreduce: ...@@ -2447,6 +2526,7 @@ yyreduce:
break; break;
case 78: case 78:
/* Line 1787 of yacc.c */
#line 435 "cc.y" #line 435 "cc.y"
{ {
(yyval.node) = new(OLABEL, dcllabel((yyvsp[(1) - (2)].sym), 1), Z); (yyval.node) = new(OLABEL, dcllabel((yyvsp[(1) - (2)].sym), 1), Z);
...@@ -2454,6 +2534,7 @@ yyreduce: ...@@ -2454,6 +2534,7 @@ yyreduce:
break; break;
case 79: case 79:
/* Line 1787 of yacc.c */
#line 441 "cc.y" #line 441 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -2461,6 +2542,7 @@ yyreduce: ...@@ -2461,6 +2542,7 @@ yyreduce:
break; break;
case 81: case 81:
/* Line 1787 of yacc.c */
#line 446 "cc.y" #line 446 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
...@@ -2468,6 +2550,7 @@ yyreduce: ...@@ -2468,6 +2550,7 @@ yyreduce:
break; break;
case 83: case 83:
/* Line 1787 of yacc.c */
#line 453 "cc.y" #line 453 "cc.y"
{ {
(yyval.node) = (yyvsp[(2) - (2)].node); (yyval.node) = (yyvsp[(2) - (2)].node);
...@@ -2475,6 +2558,7 @@ yyreduce: ...@@ -2475,6 +2558,7 @@ yyreduce:
break; break;
case 85: case 85:
/* Line 1787 of yacc.c */
#line 459 "cc.y" #line 459 "cc.y"
{ {
markdcl(); markdcl();
...@@ -2482,6 +2566,7 @@ yyreduce: ...@@ -2482,6 +2566,7 @@ yyreduce:
break; break;
case 86: case 86:
/* Line 1787 of yacc.c */
#line 463 "cc.y" #line 463 "cc.y"
{ {
(yyval.node) = revertdcl(); (yyval.node) = revertdcl();
...@@ -2493,6 +2578,7 @@ yyreduce: ...@@ -2493,6 +2578,7 @@ yyreduce:
break; break;
case 87: case 87:
/* Line 1787 of yacc.c */
#line 471 "cc.y" #line 471 "cc.y"
{ {
(yyval.node) = new(OIF, (yyvsp[(3) - (5)].node), new(OLIST, (yyvsp[(5) - (5)].node), Z)); (yyval.node) = new(OIF, (yyvsp[(3) - (5)].node), new(OLIST, (yyvsp[(5) - (5)].node), Z));
...@@ -2502,6 +2588,7 @@ yyreduce: ...@@ -2502,6 +2588,7 @@ yyreduce:
break; break;
case 88: case 88:
/* Line 1787 of yacc.c */
#line 477 "cc.y" #line 477 "cc.y"
{ {
(yyval.node) = new(OIF, (yyvsp[(3) - (7)].node), new(OLIST, (yyvsp[(5) - (7)].node), (yyvsp[(7) - (7)].node))); (yyval.node) = new(OIF, (yyvsp[(3) - (7)].node), new(OLIST, (yyvsp[(5) - (7)].node), (yyvsp[(7) - (7)].node)));
...@@ -2513,11 +2600,13 @@ yyreduce: ...@@ -2513,11 +2600,13 @@ yyreduce:
break; break;
case 89: case 89:
/* Line 1787 of yacc.c */
#line 484 "cc.y" #line 484 "cc.y"
{ markdcl(); } { markdcl(); }
break; break;
case 90: case 90:
/* Line 1787 of yacc.c */
#line 485 "cc.y" #line 485 "cc.y"
{ {
(yyval.node) = revertdcl(); (yyval.node) = revertdcl();
...@@ -2532,6 +2621,7 @@ yyreduce: ...@@ -2532,6 +2621,7 @@ yyreduce:
break; break;
case 91: case 91:
/* Line 1787 of yacc.c */
#line 496 "cc.y" #line 496 "cc.y"
{ {
(yyval.node) = new(OWHILE, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); (yyval.node) = new(OWHILE, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));
...@@ -2539,6 +2629,7 @@ yyreduce: ...@@ -2539,6 +2629,7 @@ yyreduce:
break; break;
case 92: case 92:
/* Line 1787 of yacc.c */
#line 500 "cc.y" #line 500 "cc.y"
{ {
(yyval.node) = new(ODWHILE, (yyvsp[(5) - (7)].node), (yyvsp[(2) - (7)].node)); (yyval.node) = new(ODWHILE, (yyvsp[(5) - (7)].node), (yyvsp[(2) - (7)].node));
...@@ -2546,6 +2637,7 @@ yyreduce: ...@@ -2546,6 +2637,7 @@ yyreduce:
break; break;
case 93: case 93:
/* Line 1787 of yacc.c */
#line 504 "cc.y" #line 504 "cc.y"
{ {
(yyval.node) = new(ORETURN, (yyvsp[(2) - (3)].node), Z); (yyval.node) = new(ORETURN, (yyvsp[(2) - (3)].node), Z);
...@@ -2554,6 +2646,7 @@ yyreduce: ...@@ -2554,6 +2646,7 @@ yyreduce:
break; break;
case 94: case 94:
/* Line 1787 of yacc.c */
#line 509 "cc.y" #line 509 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -2571,6 +2664,7 @@ yyreduce: ...@@ -2571,6 +2664,7 @@ yyreduce:
break; break;
case 95: case 95:
/* Line 1787 of yacc.c */
#line 523 "cc.y" #line 523 "cc.y"
{ {
(yyval.node) = new(OBREAK, Z, Z); (yyval.node) = new(OBREAK, Z, Z);
...@@ -2578,6 +2672,7 @@ yyreduce: ...@@ -2578,6 +2672,7 @@ yyreduce:
break; break;
case 96: case 96:
/* Line 1787 of yacc.c */
#line 527 "cc.y" #line 527 "cc.y"
{ {
(yyval.node) = new(OCONTINUE, Z, Z); (yyval.node) = new(OCONTINUE, Z, Z);
...@@ -2585,6 +2680,7 @@ yyreduce: ...@@ -2585,6 +2680,7 @@ yyreduce:
break; break;
case 97: case 97:
/* Line 1787 of yacc.c */
#line 531 "cc.y" #line 531 "cc.y"
{ {
(yyval.node) = new(OGOTO, dcllabel((yyvsp[(2) - (3)].sym), 0), Z); (yyval.node) = new(OGOTO, dcllabel((yyvsp[(2) - (3)].sym), 0), Z);
...@@ -2592,6 +2688,7 @@ yyreduce: ...@@ -2592,6 +2688,7 @@ yyreduce:
break; break;
case 98: case 98:
/* Line 1787 of yacc.c */
#line 535 "cc.y" #line 535 "cc.y"
{ {
(yyval.node) = new(OUSED, (yyvsp[(3) - (5)].node), Z); (yyval.node) = new(OUSED, (yyvsp[(3) - (5)].node), Z);
...@@ -2599,6 +2696,7 @@ yyreduce: ...@@ -2599,6 +2696,7 @@ yyreduce:
break; break;
case 99: case 99:
/* Line 1787 of yacc.c */
#line 539 "cc.y" #line 539 "cc.y"
{ {
(yyval.node) = new(OPREFETCH, (yyvsp[(3) - (5)].node), Z); (yyval.node) = new(OPREFETCH, (yyvsp[(3) - (5)].node), Z);
...@@ -2606,6 +2704,7 @@ yyreduce: ...@@ -2606,6 +2704,7 @@ yyreduce:
break; break;
case 100: case 100:
/* Line 1787 of yacc.c */
#line 543 "cc.y" #line 543 "cc.y"
{ {
(yyval.node) = new(OSET, (yyvsp[(3) - (5)].node), Z); (yyval.node) = new(OSET, (yyvsp[(3) - (5)].node), Z);
...@@ -2613,6 +2712,7 @@ yyreduce: ...@@ -2613,6 +2712,7 @@ yyreduce:
break; break;
case 101: case 101:
/* Line 1787 of yacc.c */
#line 548 "cc.y" #line 548 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -2620,6 +2720,7 @@ yyreduce: ...@@ -2620,6 +2720,7 @@ yyreduce:
break; break;
case 103: case 103:
/* Line 1787 of yacc.c */
#line 554 "cc.y" #line 554 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -2627,6 +2728,7 @@ yyreduce: ...@@ -2627,6 +2728,7 @@ yyreduce:
break; break;
case 105: case 105:
/* Line 1787 of yacc.c */
#line 561 "cc.y" #line 561 "cc.y"
{ {
(yyval.node) = new(OCAST, (yyvsp[(1) - (1)].node), Z); (yyval.node) = new(OCAST, (yyvsp[(1) - (1)].node), Z);
...@@ -2635,6 +2737,7 @@ yyreduce: ...@@ -2635,6 +2737,7 @@ yyreduce:
break; break;
case 107: case 107:
/* Line 1787 of yacc.c */
#line 569 "cc.y" #line 569 "cc.y"
{ {
(yyval.node) = new(OCOMMA, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OCOMMA, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2642,6 +2745,7 @@ yyreduce: ...@@ -2642,6 +2745,7 @@ yyreduce:
break; break;
case 109: case 109:
/* Line 1787 of yacc.c */
#line 576 "cc.y" #line 576 "cc.y"
{ {
(yyval.node) = new(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2649,6 +2753,7 @@ yyreduce: ...@@ -2649,6 +2753,7 @@ yyreduce:
break; break;
case 110: case 110:
/* Line 1787 of yacc.c */
#line 580 "cc.y" #line 580 "cc.y"
{ {
(yyval.node) = new(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2656,6 +2761,7 @@ yyreduce: ...@@ -2656,6 +2761,7 @@ yyreduce:
break; break;
case 111: case 111:
/* Line 1787 of yacc.c */
#line 584 "cc.y" #line 584 "cc.y"
{ {
(yyval.node) = new(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2663,6 +2769,7 @@ yyreduce: ...@@ -2663,6 +2769,7 @@ yyreduce:
break; break;
case 112: case 112:
/* Line 1787 of yacc.c */
#line 588 "cc.y" #line 588 "cc.y"
{ {
(yyval.node) = new(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2670,6 +2777,7 @@ yyreduce: ...@@ -2670,6 +2777,7 @@ yyreduce:
break; break;
case 113: case 113:
/* Line 1787 of yacc.c */
#line 592 "cc.y" #line 592 "cc.y"
{ {
(yyval.node) = new(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2677,6 +2785,7 @@ yyreduce: ...@@ -2677,6 +2785,7 @@ yyreduce:
break; break;
case 114: case 114:
/* Line 1787 of yacc.c */
#line 596 "cc.y" #line 596 "cc.y"
{ {
(yyval.node) = new(OASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2684,6 +2793,7 @@ yyreduce: ...@@ -2684,6 +2793,7 @@ yyreduce:
break; break;
case 115: case 115:
/* Line 1787 of yacc.c */
#line 600 "cc.y" #line 600 "cc.y"
{ {
(yyval.node) = new(OASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2691,6 +2801,7 @@ yyreduce: ...@@ -2691,6 +2801,7 @@ yyreduce:
break; break;
case 116: case 116:
/* Line 1787 of yacc.c */
#line 604 "cc.y" #line 604 "cc.y"
{ {
(yyval.node) = new(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2698,6 +2809,7 @@ yyreduce: ...@@ -2698,6 +2809,7 @@ yyreduce:
break; break;
case 117: case 117:
/* Line 1787 of yacc.c */
#line 608 "cc.y" #line 608 "cc.y"
{ {
(yyval.node) = new(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2705,6 +2817,7 @@ yyreduce: ...@@ -2705,6 +2817,7 @@ yyreduce:
break; break;
case 118: case 118:
/* Line 1787 of yacc.c */
#line 612 "cc.y" #line 612 "cc.y"
{ {
(yyval.node) = new(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2712,6 +2825,7 @@ yyreduce: ...@@ -2712,6 +2825,7 @@ yyreduce:
break; break;
case 119: case 119:
/* Line 1787 of yacc.c */
#line 616 "cc.y" #line 616 "cc.y"
{ {
(yyval.node) = new(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2719,6 +2833,7 @@ yyreduce: ...@@ -2719,6 +2833,7 @@ yyreduce:
break; break;
case 120: case 120:
/* Line 1787 of yacc.c */
#line 620 "cc.y" #line 620 "cc.y"
{ {
(yyval.node) = new(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2726,6 +2841,7 @@ yyreduce: ...@@ -2726,6 +2841,7 @@ yyreduce:
break; break;
case 121: case 121:
/* Line 1787 of yacc.c */
#line 624 "cc.y" #line 624 "cc.y"
{ {
(yyval.node) = new(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2733,6 +2849,7 @@ yyreduce: ...@@ -2733,6 +2849,7 @@ yyreduce:
break; break;
case 122: case 122:
/* Line 1787 of yacc.c */
#line 628 "cc.y" #line 628 "cc.y"
{ {
(yyval.node) = new(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2740,6 +2857,7 @@ yyreduce: ...@@ -2740,6 +2857,7 @@ yyreduce:
break; break;
case 123: case 123:
/* Line 1787 of yacc.c */
#line 632 "cc.y" #line 632 "cc.y"
{ {
(yyval.node) = new(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2747,6 +2865,7 @@ yyreduce: ...@@ -2747,6 +2865,7 @@ yyreduce:
break; break;
case 124: case 124:
/* Line 1787 of yacc.c */
#line 636 "cc.y" #line 636 "cc.y"
{ {
(yyval.node) = new(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2754,6 +2873,7 @@ yyreduce: ...@@ -2754,6 +2873,7 @@ yyreduce:
break; break;
case 125: case 125:
/* Line 1787 of yacc.c */
#line 640 "cc.y" #line 640 "cc.y"
{ {
(yyval.node) = new(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2761,6 +2881,7 @@ yyreduce: ...@@ -2761,6 +2881,7 @@ yyreduce:
break; break;
case 126: case 126:
/* Line 1787 of yacc.c */
#line 644 "cc.y" #line 644 "cc.y"
{ {
(yyval.node) = new(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2768,6 +2889,7 @@ yyreduce: ...@@ -2768,6 +2889,7 @@ yyreduce:
break; break;
case 127: case 127:
/* Line 1787 of yacc.c */
#line 648 "cc.y" #line 648 "cc.y"
{ {
(yyval.node) = new(OCOND, (yyvsp[(1) - (5)].node), new(OLIST, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node))); (yyval.node) = new(OCOND, (yyvsp[(1) - (5)].node), new(OLIST, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)));
...@@ -2775,6 +2897,7 @@ yyreduce: ...@@ -2775,6 +2897,7 @@ yyreduce:
break; break;
case 128: case 128:
/* Line 1787 of yacc.c */
#line 652 "cc.y" #line 652 "cc.y"
{ {
(yyval.node) = new(OAS, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OAS, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2782,6 +2905,7 @@ yyreduce: ...@@ -2782,6 +2905,7 @@ yyreduce:
break; break;
case 129: case 129:
/* Line 1787 of yacc.c */
#line 656 "cc.y" #line 656 "cc.y"
{ {
(yyval.node) = new(OASADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2789,6 +2913,7 @@ yyreduce: ...@@ -2789,6 +2913,7 @@ yyreduce:
break; break;
case 130: case 130:
/* Line 1787 of yacc.c */
#line 660 "cc.y" #line 660 "cc.y"
{ {
(yyval.node) = new(OASSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2796,6 +2921,7 @@ yyreduce: ...@@ -2796,6 +2921,7 @@ yyreduce:
break; break;
case 131: case 131:
/* Line 1787 of yacc.c */
#line 664 "cc.y" #line 664 "cc.y"
{ {
(yyval.node) = new(OASMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2803,6 +2929,7 @@ yyreduce: ...@@ -2803,6 +2929,7 @@ yyreduce:
break; break;
case 132: case 132:
/* Line 1787 of yacc.c */
#line 668 "cc.y" #line 668 "cc.y"
{ {
(yyval.node) = new(OASDIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASDIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2810,6 +2937,7 @@ yyreduce: ...@@ -2810,6 +2937,7 @@ yyreduce:
break; break;
case 133: case 133:
/* Line 1787 of yacc.c */
#line 672 "cc.y" #line 672 "cc.y"
{ {
(yyval.node) = new(OASMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2817,6 +2945,7 @@ yyreduce: ...@@ -2817,6 +2945,7 @@ yyreduce:
break; break;
case 134: case 134:
/* Line 1787 of yacc.c */
#line 676 "cc.y" #line 676 "cc.y"
{ {
(yyval.node) = new(OASASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2824,6 +2953,7 @@ yyreduce: ...@@ -2824,6 +2953,7 @@ yyreduce:
break; break;
case 135: case 135:
/* Line 1787 of yacc.c */
#line 680 "cc.y" #line 680 "cc.y"
{ {
(yyval.node) = new(OASASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2831,6 +2961,7 @@ yyreduce: ...@@ -2831,6 +2961,7 @@ yyreduce:
break; break;
case 136: case 136:
/* Line 1787 of yacc.c */
#line 684 "cc.y" #line 684 "cc.y"
{ {
(yyval.node) = new(OASAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2838,6 +2969,7 @@ yyreduce: ...@@ -2838,6 +2969,7 @@ yyreduce:
break; break;
case 137: case 137:
/* Line 1787 of yacc.c */
#line 688 "cc.y" #line 688 "cc.y"
{ {
(yyval.node) = new(OASXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2845,6 +2977,7 @@ yyreduce: ...@@ -2845,6 +2977,7 @@ yyreduce:
break; break;
case 138: case 138:
/* Line 1787 of yacc.c */
#line 692 "cc.y" #line 692 "cc.y"
{ {
(yyval.node) = new(OASOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OASOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -2852,6 +2985,7 @@ yyreduce: ...@@ -2852,6 +2985,7 @@ yyreduce:
break; break;
case 140: case 140:
/* Line 1787 of yacc.c */
#line 699 "cc.y" #line 699 "cc.y"
{ {
(yyval.node) = new(OCAST, (yyvsp[(5) - (5)].node), Z); (yyval.node) = new(OCAST, (yyvsp[(5) - (5)].node), Z);
...@@ -2862,6 +2996,7 @@ yyreduce: ...@@ -2862,6 +2996,7 @@ yyreduce:
break; break;
case 141: case 141:
/* Line 1787 of yacc.c */
#line 706 "cc.y" #line 706 "cc.y"
{ {
(yyval.node) = new(OSTRUCT, (yyvsp[(6) - (7)].node), Z); (yyval.node) = new(OSTRUCT, (yyvsp[(6) - (7)].node), Z);
...@@ -2871,6 +3006,7 @@ yyreduce: ...@@ -2871,6 +3006,7 @@ yyreduce:
break; break;
case 143: case 143:
/* Line 1787 of yacc.c */
#line 715 "cc.y" #line 715 "cc.y"
{ {
(yyval.node) = new(OIND, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OIND, (yyvsp[(2) - (2)].node), Z);
...@@ -2878,6 +3014,7 @@ yyreduce: ...@@ -2878,6 +3014,7 @@ yyreduce:
break; break;
case 144: case 144:
/* Line 1787 of yacc.c */
#line 719 "cc.y" #line 719 "cc.y"
{ {
(yyval.node) = new(OADDR, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OADDR, (yyvsp[(2) - (2)].node), Z);
...@@ -2885,6 +3022,7 @@ yyreduce: ...@@ -2885,6 +3022,7 @@ yyreduce:
break; break;
case 145: case 145:
/* Line 1787 of yacc.c */
#line 723 "cc.y" #line 723 "cc.y"
{ {
(yyval.node) = new(OPOS, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OPOS, (yyvsp[(2) - (2)].node), Z);
...@@ -2892,6 +3030,7 @@ yyreduce: ...@@ -2892,6 +3030,7 @@ yyreduce:
break; break;
case 146: case 146:
/* Line 1787 of yacc.c */
#line 727 "cc.y" #line 727 "cc.y"
{ {
(yyval.node) = new(ONEG, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(ONEG, (yyvsp[(2) - (2)].node), Z);
...@@ -2899,6 +3038,7 @@ yyreduce: ...@@ -2899,6 +3038,7 @@ yyreduce:
break; break;
case 147: case 147:
/* Line 1787 of yacc.c */
#line 731 "cc.y" #line 731 "cc.y"
{ {
(yyval.node) = new(ONOT, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(ONOT, (yyvsp[(2) - (2)].node), Z);
...@@ -2906,6 +3046,7 @@ yyreduce: ...@@ -2906,6 +3046,7 @@ yyreduce:
break; break;
case 148: case 148:
/* Line 1787 of yacc.c */
#line 735 "cc.y" #line 735 "cc.y"
{ {
(yyval.node) = new(OCOM, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OCOM, (yyvsp[(2) - (2)].node), Z);
...@@ -2913,6 +3054,7 @@ yyreduce: ...@@ -2913,6 +3054,7 @@ yyreduce:
break; break;
case 149: case 149:
/* Line 1787 of yacc.c */
#line 739 "cc.y" #line 739 "cc.y"
{ {
(yyval.node) = new(OPREINC, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OPREINC, (yyvsp[(2) - (2)].node), Z);
...@@ -2920,6 +3062,7 @@ yyreduce: ...@@ -2920,6 +3062,7 @@ yyreduce:
break; break;
case 150: case 150:
/* Line 1787 of yacc.c */
#line 743 "cc.y" #line 743 "cc.y"
{ {
(yyval.node) = new(OPREDEC, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OPREDEC, (yyvsp[(2) - (2)].node), Z);
...@@ -2927,6 +3070,7 @@ yyreduce: ...@@ -2927,6 +3070,7 @@ yyreduce:
break; break;
case 151: case 151:
/* Line 1787 of yacc.c */
#line 747 "cc.y" #line 747 "cc.y"
{ {
(yyval.node) = new(OSIZE, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OSIZE, (yyvsp[(2) - (2)].node), Z);
...@@ -2934,6 +3078,7 @@ yyreduce: ...@@ -2934,6 +3078,7 @@ yyreduce:
break; break;
case 152: case 152:
/* Line 1787 of yacc.c */
#line 751 "cc.y" #line 751 "cc.y"
{ {
(yyval.node) = new(OSIGN, (yyvsp[(2) - (2)].node), Z); (yyval.node) = new(OSIGN, (yyvsp[(2) - (2)].node), Z);
...@@ -2941,6 +3086,7 @@ yyreduce: ...@@ -2941,6 +3086,7 @@ yyreduce:
break; break;
case 153: case 153:
/* Line 1787 of yacc.c */
#line 757 "cc.y" #line 757 "cc.y"
{ {
(yyval.node) = (yyvsp[(2) - (3)].node); (yyval.node) = (yyvsp[(2) - (3)].node);
...@@ -2948,6 +3094,7 @@ yyreduce: ...@@ -2948,6 +3094,7 @@ yyreduce:
break; break;
case 154: case 154:
/* Line 1787 of yacc.c */
#line 761 "cc.y" #line 761 "cc.y"
{ {
(yyval.node) = new(OSIZE, Z, Z); (yyval.node) = new(OSIZE, Z, Z);
...@@ -2957,6 +3104,7 @@ yyreduce: ...@@ -2957,6 +3104,7 @@ yyreduce:
break; break;
case 155: case 155:
/* Line 1787 of yacc.c */
#line 767 "cc.y" #line 767 "cc.y"
{ {
(yyval.node) = new(OSIGN, Z, Z); (yyval.node) = new(OSIGN, Z, Z);
...@@ -2966,6 +3114,7 @@ yyreduce: ...@@ -2966,6 +3114,7 @@ yyreduce:
break; break;
case 156: case 156:
/* Line 1787 of yacc.c */
#line 773 "cc.y" #line 773 "cc.y"
{ {
(yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), Z); (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), Z);
...@@ -2977,6 +3126,7 @@ yyreduce: ...@@ -2977,6 +3126,7 @@ yyreduce:
break; break;
case 157: case 157:
/* Line 1787 of yacc.c */
#line 781 "cc.y" #line 781 "cc.y"
{ {
(yyval.node) = new(OIND, new(OADD, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)), Z); (yyval.node) = new(OIND, new(OADD, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)), Z);
...@@ -2984,6 +3134,7 @@ yyreduce: ...@@ -2984,6 +3134,7 @@ yyreduce:
break; break;
case 158: case 158:
/* Line 1787 of yacc.c */
#line 785 "cc.y" #line 785 "cc.y"
{ {
(yyval.node) = new(ODOT, new(OIND, (yyvsp[(1) - (3)].node), Z), Z); (yyval.node) = new(ODOT, new(OIND, (yyvsp[(1) - (3)].node), Z), Z);
...@@ -2992,6 +3143,7 @@ yyreduce: ...@@ -2992,6 +3143,7 @@ yyreduce:
break; break;
case 159: case 159:
/* Line 1787 of yacc.c */
#line 790 "cc.y" #line 790 "cc.y"
{ {
(yyval.node) = new(ODOT, (yyvsp[(1) - (3)].node), Z); (yyval.node) = new(ODOT, (yyvsp[(1) - (3)].node), Z);
...@@ -3000,6 +3152,7 @@ yyreduce: ...@@ -3000,6 +3152,7 @@ yyreduce:
break; break;
case 160: case 160:
/* Line 1787 of yacc.c */
#line 795 "cc.y" #line 795 "cc.y"
{ {
(yyval.node) = new(OPOSTINC, (yyvsp[(1) - (2)].node), Z); (yyval.node) = new(OPOSTINC, (yyvsp[(1) - (2)].node), Z);
...@@ -3007,6 +3160,7 @@ yyreduce: ...@@ -3007,6 +3160,7 @@ yyreduce:
break; break;
case 161: case 161:
/* Line 1787 of yacc.c */
#line 799 "cc.y" #line 799 "cc.y"
{ {
(yyval.node) = new(OPOSTDEC, (yyvsp[(1) - (2)].node), Z); (yyval.node) = new(OPOSTDEC, (yyvsp[(1) - (2)].node), Z);
...@@ -3014,6 +3168,7 @@ yyreduce: ...@@ -3014,6 +3168,7 @@ yyreduce:
break; break;
case 163: case 163:
/* Line 1787 of yacc.c */
#line 804 "cc.y" #line 804 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3024,6 +3179,7 @@ yyreduce: ...@@ -3024,6 +3179,7 @@ yyreduce:
break; break;
case 164: case 164:
/* Line 1787 of yacc.c */
#line 811 "cc.y" #line 811 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3034,6 +3190,7 @@ yyreduce: ...@@ -3034,6 +3190,7 @@ yyreduce:
break; break;
case 165: case 165:
/* Line 1787 of yacc.c */
#line 818 "cc.y" #line 818 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3044,6 +3201,7 @@ yyreduce: ...@@ -3044,6 +3201,7 @@ yyreduce:
break; break;
case 166: case 166:
/* Line 1787 of yacc.c */
#line 825 "cc.y" #line 825 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3054,6 +3212,7 @@ yyreduce: ...@@ -3054,6 +3212,7 @@ yyreduce:
break; break;
case 167: case 167:
/* Line 1787 of yacc.c */
#line 832 "cc.y" #line 832 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3064,6 +3223,7 @@ yyreduce: ...@@ -3064,6 +3223,7 @@ yyreduce:
break; break;
case 168: case 168:
/* Line 1787 of yacc.c */
#line 839 "cc.y" #line 839 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3074,6 +3234,7 @@ yyreduce: ...@@ -3074,6 +3234,7 @@ yyreduce:
break; break;
case 169: case 169:
/* Line 1787 of yacc.c */
#line 846 "cc.y" #line 846 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3084,6 +3245,7 @@ yyreduce: ...@@ -3084,6 +3245,7 @@ yyreduce:
break; break;
case 170: case 170:
/* Line 1787 of yacc.c */
#line 853 "cc.y" #line 853 "cc.y"
{ {
(yyval.node) = new(OCONST, Z, Z); (yyval.node) = new(OCONST, Z, Z);
...@@ -3094,6 +3256,7 @@ yyreduce: ...@@ -3094,6 +3256,7 @@ yyreduce:
break; break;
case 173: case 173:
/* Line 1787 of yacc.c */
#line 864 "cc.y" #line 864 "cc.y"
{ {
(yyval.node) = new(OSTRING, Z, Z); (yyval.node) = new(OSTRING, Z, Z);
...@@ -3107,6 +3270,7 @@ yyreduce: ...@@ -3107,6 +3270,7 @@ yyreduce:
break; break;
case 174: case 174:
/* Line 1787 of yacc.c */
#line 874 "cc.y" #line 874 "cc.y"
{ {
char *s; char *s;
...@@ -3126,12 +3290,13 @@ yyreduce: ...@@ -3126,12 +3290,13 @@ yyreduce:
break; break;
case 175: case 175:
/* Line 1787 of yacc.c */
#line 892 "cc.y" #line 892 "cc.y"
{ {
(yyval.node) = new(OLSTRING, Z, Z); (yyval.node) = new(OLSTRING, Z, Z);
(yyval.node)->type = typ(TARRAY, types[TUSHORT]); (yyval.node)->type = typ(TARRAY, types[TRUNE]);
(yyval.node)->type->width = (yyvsp[(1) - (1)].sval).l + sizeof(ushort); (yyval.node)->type->width = (yyvsp[(1) - (1)].sval).l + sizeof(TRune);
(yyval.node)->rstring = (ushort*)(yyvsp[(1) - (1)].sval).s; (yyval.node)->rstring = (TRune*)(yyvsp[(1) - (1)].sval).s;
(yyval.node)->sym = symstring; (yyval.node)->sym = symstring;
(yyval.node)->etype = TARRAY; (yyval.node)->etype = TARRAY;
(yyval.node)->class = CSTATIC; (yyval.node)->class = CSTATIC;
...@@ -3139,25 +3304,27 @@ yyreduce: ...@@ -3139,25 +3304,27 @@ yyreduce:
break; break;
case 176: case 176:
/* Line 1787 of yacc.c */
#line 902 "cc.y" #line 902 "cc.y"
{ {
char *s; char *s;
int n; int n;
n = (yyvsp[(1) - (2)].node)->type->width - sizeof(ushort); n = (yyvsp[(1) - (2)].node)->type->width - sizeof(TRune);
s = alloc(n+(yyvsp[(2) - (2)].sval).l+MAXALIGN); s = alloc(n+(yyvsp[(2) - (2)].sval).l+MAXALIGN);
memcpy(s, (yyvsp[(1) - (2)].node)->rstring, n); memcpy(s, (yyvsp[(1) - (2)].node)->rstring, n);
memcpy(s+n, (yyvsp[(2) - (2)].sval).s, (yyvsp[(2) - (2)].sval).l); memcpy(s+n, (yyvsp[(2) - (2)].sval).s, (yyvsp[(2) - (2)].sval).l);
*(ushort*)(s+n+(yyvsp[(2) - (2)].sval).l) = 0; *(TRune*)(s+n+(yyvsp[(2) - (2)].sval).l) = 0;
(yyval.node) = (yyvsp[(1) - (2)].node); (yyval.node) = (yyvsp[(1) - (2)].node);
(yyval.node)->type->width += (yyvsp[(2) - (2)].sval).l; (yyval.node)->type->width += (yyvsp[(2) - (2)].sval).l;
(yyval.node)->rstring = (ushort*)s; (yyval.node)->rstring = (TRune*)s;
} }
break; break;
case 177: case 177:
/* Line 1787 of yacc.c */
#line 919 "cc.y" #line 919 "cc.y"
{ {
(yyval.node) = Z; (yyval.node) = Z;
...@@ -3165,6 +3332,7 @@ yyreduce: ...@@ -3165,6 +3332,7 @@ yyreduce:
break; break;
case 180: case 180:
/* Line 1787 of yacc.c */
#line 927 "cc.y" #line 927 "cc.y"
{ {
(yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
...@@ -3172,6 +3340,7 @@ yyreduce: ...@@ -3172,6 +3340,7 @@ yyreduce:
break; break;
case 181: case 181:
/* Line 1787 of yacc.c */
#line 933 "cc.y" #line 933 "cc.y"
{ {
(yyval.tyty).t1 = strf; (yyval.tyty).t1 = strf;
...@@ -3188,6 +3357,7 @@ yyreduce: ...@@ -3188,6 +3357,7 @@ yyreduce:
break; break;
case 182: case 182:
/* Line 1787 of yacc.c */
#line 946 "cc.y" #line 946 "cc.y"
{ {
(yyval.type) = strf; (yyval.type) = strf;
...@@ -3199,6 +3369,7 @@ yyreduce: ...@@ -3199,6 +3369,7 @@ yyreduce:
break; break;
case 183: case 183:
/* Line 1787 of yacc.c */
#line 955 "cc.y" #line 955 "cc.y"
{ {
lastclass = CXXX; lastclass = CXXX;
...@@ -3207,6 +3378,7 @@ yyreduce: ...@@ -3207,6 +3378,7 @@ yyreduce:
break; break;
case 185: case 185:
/* Line 1787 of yacc.c */
#line 963 "cc.y" #line 963 "cc.y"
{ {
(yyval.tycl).t = (yyvsp[(1) - (1)].type); (yyval.tycl).t = (yyvsp[(1) - (1)].type);
...@@ -3215,6 +3387,7 @@ yyreduce: ...@@ -3215,6 +3387,7 @@ yyreduce:
break; break;
case 186: case 186:
/* Line 1787 of yacc.c */
#line 968 "cc.y" #line 968 "cc.y"
{ {
(yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval)); (yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval));
...@@ -3223,6 +3396,7 @@ yyreduce: ...@@ -3223,6 +3396,7 @@ yyreduce:
break; break;
case 187: case 187:
/* Line 1787 of yacc.c */
#line 973 "cc.y" #line 973 "cc.y"
{ {
(yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval)); (yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval));
...@@ -3232,6 +3406,7 @@ yyreduce: ...@@ -3232,6 +3406,7 @@ yyreduce:
break; break;
case 188: case 188:
/* Line 1787 of yacc.c */
#line 979 "cc.y" #line 979 "cc.y"
{ {
(yyval.tycl).t = (yyvsp[(1) - (2)].type); (yyval.tycl).t = (yyvsp[(1) - (2)].type);
...@@ -3243,6 +3418,7 @@ yyreduce: ...@@ -3243,6 +3418,7 @@ yyreduce:
break; break;
case 189: case 189:
/* Line 1787 of yacc.c */
#line 987 "cc.y" #line 987 "cc.y"
{ {
(yyval.tycl).t = simplet(typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval))); (yyval.tycl).t = simplet(typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)));
...@@ -3252,6 +3428,7 @@ yyreduce: ...@@ -3252,6 +3428,7 @@ yyreduce:
break; break;
case 190: case 190:
/* Line 1787 of yacc.c */
#line 993 "cc.y" #line 993 "cc.y"
{ {
(yyval.tycl).t = (yyvsp[(2) - (3)].type); (yyval.tycl).t = (yyvsp[(2) - (3)].type);
...@@ -3261,6 +3438,7 @@ yyreduce: ...@@ -3261,6 +3438,7 @@ yyreduce:
break; break;
case 191: case 191:
/* Line 1787 of yacc.c */
#line 999 "cc.y" #line 999 "cc.y"
{ {
(yyval.tycl).t = simplet((yyvsp[(2) - (2)].lval)); (yyval.tycl).t = simplet((yyvsp[(2) - (2)].lval));
...@@ -3270,6 +3448,7 @@ yyreduce: ...@@ -3270,6 +3448,7 @@ yyreduce:
break; break;
case 192: case 192:
/* Line 1787 of yacc.c */
#line 1005 "cc.y" #line 1005 "cc.y"
{ {
(yyval.tycl).t = simplet(typebitor((yyvsp[(2) - (3)].lval), (yyvsp[(3) - (3)].lval))); (yyval.tycl).t = simplet(typebitor((yyvsp[(2) - (3)].lval), (yyvsp[(3) - (3)].lval)));
...@@ -3279,6 +3458,7 @@ yyreduce: ...@@ -3279,6 +3458,7 @@ yyreduce:
break; break;
case 193: case 193:
/* Line 1787 of yacc.c */
#line 1013 "cc.y" #line 1013 "cc.y"
{ {
(yyval.type) = (yyvsp[(1) - (1)].tycl).t; (yyval.type) = (yyvsp[(1) - (1)].tycl).t;
...@@ -3288,6 +3468,7 @@ yyreduce: ...@@ -3288,6 +3468,7 @@ yyreduce:
break; break;
case 194: case 194:
/* Line 1787 of yacc.c */
#line 1021 "cc.y" #line 1021 "cc.y"
{ {
lasttype = (yyvsp[(1) - (1)].tycl).t; lasttype = (yyvsp[(1) - (1)].tycl).t;
...@@ -3296,6 +3477,7 @@ yyreduce: ...@@ -3296,6 +3477,7 @@ yyreduce:
break; break;
case 195: case 195:
/* Line 1787 of yacc.c */
#line 1028 "cc.y" #line 1028 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TSTRUCT, 0); dotag((yyvsp[(2) - (2)].sym), TSTRUCT, 0);
...@@ -3304,6 +3486,7 @@ yyreduce: ...@@ -3304,6 +3486,7 @@ yyreduce:
break; break;
case 196: case 196:
/* Line 1787 of yacc.c */
#line 1033 "cc.y" #line 1033 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TSTRUCT, autobn); dotag((yyvsp[(2) - (2)].sym), TSTRUCT, autobn);
...@@ -3311,6 +3494,7 @@ yyreduce: ...@@ -3311,6 +3494,7 @@ yyreduce:
break; break;
case 197: case 197:
/* Line 1787 of yacc.c */
#line 1037 "cc.y" #line 1037 "cc.y"
{ {
(yyval.type) = (yyvsp[(2) - (4)].sym)->suetag; (yyval.type) = (yyvsp[(2) - (4)].sym)->suetag;
...@@ -3322,6 +3506,7 @@ yyreduce: ...@@ -3322,6 +3506,7 @@ yyreduce:
break; break;
case 198: case 198:
/* Line 1787 of yacc.c */
#line 1045 "cc.y" #line 1045 "cc.y"
{ {
taggen++; taggen++;
...@@ -3333,6 +3518,7 @@ yyreduce: ...@@ -3333,6 +3518,7 @@ yyreduce:
break; break;
case 199: case 199:
/* Line 1787 of yacc.c */
#line 1053 "cc.y" #line 1053 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TUNION, 0); dotag((yyvsp[(2) - (2)].sym), TUNION, 0);
...@@ -3341,6 +3527,7 @@ yyreduce: ...@@ -3341,6 +3527,7 @@ yyreduce:
break; break;
case 200: case 200:
/* Line 1787 of yacc.c */
#line 1058 "cc.y" #line 1058 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TUNION, autobn); dotag((yyvsp[(2) - (2)].sym), TUNION, autobn);
...@@ -3348,6 +3535,7 @@ yyreduce: ...@@ -3348,6 +3535,7 @@ yyreduce:
break; break;
case 201: case 201:
/* Line 1787 of yacc.c */
#line 1062 "cc.y" #line 1062 "cc.y"
{ {
(yyval.type) = (yyvsp[(2) - (4)].sym)->suetag; (yyval.type) = (yyvsp[(2) - (4)].sym)->suetag;
...@@ -3359,6 +3547,7 @@ yyreduce: ...@@ -3359,6 +3547,7 @@ yyreduce:
break; break;
case 202: case 202:
/* Line 1787 of yacc.c */
#line 1070 "cc.y" #line 1070 "cc.y"
{ {
taggen++; taggen++;
...@@ -3370,6 +3559,7 @@ yyreduce: ...@@ -3370,6 +3559,7 @@ yyreduce:
break; break;
case 203: case 203:
/* Line 1787 of yacc.c */
#line 1078 "cc.y" #line 1078 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TENUM, 0); dotag((yyvsp[(2) - (2)].sym), TENUM, 0);
...@@ -3381,6 +3571,7 @@ yyreduce: ...@@ -3381,6 +3571,7 @@ yyreduce:
break; break;
case 204: case 204:
/* Line 1787 of yacc.c */
#line 1086 "cc.y" #line 1086 "cc.y"
{ {
dotag((yyvsp[(2) - (2)].sym), TENUM, autobn); dotag((yyvsp[(2) - (2)].sym), TENUM, autobn);
...@@ -3388,6 +3579,7 @@ yyreduce: ...@@ -3388,6 +3579,7 @@ yyreduce:
break; break;
case 205: case 205:
/* Line 1787 of yacc.c */
#line 1090 "cc.y" #line 1090 "cc.y"
{ {
en.tenum = T; en.tenum = T;
...@@ -3396,6 +3588,7 @@ yyreduce: ...@@ -3396,6 +3588,7 @@ yyreduce:
break; break;
case 206: case 206:
/* Line 1787 of yacc.c */
#line 1095 "cc.y" #line 1095 "cc.y"
{ {
(yyval.type) = (yyvsp[(2) - (7)].sym)->suetag; (yyval.type) = (yyvsp[(2) - (7)].sym)->suetag;
...@@ -3411,6 +3604,7 @@ yyreduce: ...@@ -3411,6 +3604,7 @@ yyreduce:
break; break;
case 207: case 207:
/* Line 1787 of yacc.c */
#line 1107 "cc.y" #line 1107 "cc.y"
{ {
en.tenum = T; en.tenum = T;
...@@ -3419,6 +3613,7 @@ yyreduce: ...@@ -3419,6 +3613,7 @@ yyreduce:
break; break;
case 208: case 208:
/* Line 1787 of yacc.c */
#line 1112 "cc.y" #line 1112 "cc.y"
{ {
(yyval.type) = en.tenum; (yyval.type) = en.tenum;
...@@ -3426,6 +3621,7 @@ yyreduce: ...@@ -3426,6 +3621,7 @@ yyreduce:
break; break;
case 209: case 209:
/* Line 1787 of yacc.c */
#line 1116 "cc.y" #line 1116 "cc.y"
{ {
(yyval.type) = tcopy((yyvsp[(1) - (1)].sym)->type); (yyval.type) = tcopy((yyvsp[(1) - (1)].sym)->type);
...@@ -3433,6 +3629,7 @@ yyreduce: ...@@ -3433,6 +3629,7 @@ yyreduce:
break; break;
case 211: case 211:
/* Line 1787 of yacc.c */
#line 1123 "cc.y" #line 1123 "cc.y"
{ {
(yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval));
...@@ -3440,6 +3637,7 @@ yyreduce: ...@@ -3440,6 +3637,7 @@ yyreduce:
break; break;
case 212: case 212:
/* Line 1787 of yacc.c */
#line 1128 "cc.y" #line 1128 "cc.y"
{ {
(yyval.lval) = 0; (yyval.lval) = 0;
...@@ -3447,6 +3645,7 @@ yyreduce: ...@@ -3447,6 +3645,7 @@ yyreduce:
break; break;
case 213: case 213:
/* Line 1787 of yacc.c */
#line 1132 "cc.y" #line 1132 "cc.y"
{ {
(yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval));
...@@ -3454,6 +3653,7 @@ yyreduce: ...@@ -3454,6 +3653,7 @@ yyreduce:
break; break;
case 218: case 218:
/* Line 1787 of yacc.c */
#line 1144 "cc.y" #line 1144 "cc.y"
{ {
(yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval));
...@@ -3461,6 +3661,7 @@ yyreduce: ...@@ -3461,6 +3661,7 @@ yyreduce:
break; break;
case 221: case 221:
/* Line 1787 of yacc.c */
#line 1154 "cc.y" #line 1154 "cc.y"
{ {
doenum((yyvsp[(1) - (1)].sym), Z); doenum((yyvsp[(1) - (1)].sym), Z);
...@@ -3468,6 +3669,7 @@ yyreduce: ...@@ -3468,6 +3669,7 @@ yyreduce:
break; break;
case 222: case 222:
/* Line 1787 of yacc.c */
#line 1158 "cc.y" #line 1158 "cc.y"
{ {
doenum((yyvsp[(1) - (3)].sym), (yyvsp[(3) - (3)].node)); doenum((yyvsp[(1) - (3)].sym), (yyvsp[(3) - (3)].node));
...@@ -3475,101 +3677,121 @@ yyreduce: ...@@ -3475,101 +3677,121 @@ yyreduce:
break; break;
case 225: case 225:
/* Line 1787 of yacc.c */
#line 1165 "cc.y" #line 1165 "cc.y"
{ (yyval.lval) = BCHAR; } { (yyval.lval) = BCHAR; }
break; break;
case 226: case 226:
/* Line 1787 of yacc.c */
#line 1166 "cc.y" #line 1166 "cc.y"
{ (yyval.lval) = BSHORT; } { (yyval.lval) = BSHORT; }
break; break;
case 227: case 227:
/* Line 1787 of yacc.c */
#line 1167 "cc.y" #line 1167 "cc.y"
{ (yyval.lval) = BINT; } { (yyval.lval) = BINT; }
break; break;
case 228: case 228:
/* Line 1787 of yacc.c */
#line 1168 "cc.y" #line 1168 "cc.y"
{ (yyval.lval) = BLONG; } { (yyval.lval) = BLONG; }
break; break;
case 229: case 229:
/* Line 1787 of yacc.c */
#line 1169 "cc.y" #line 1169 "cc.y"
{ (yyval.lval) = BSIGNED; } { (yyval.lval) = BSIGNED; }
break; break;
case 230: case 230:
/* Line 1787 of yacc.c */
#line 1170 "cc.y" #line 1170 "cc.y"
{ (yyval.lval) = BUNSIGNED; } { (yyval.lval) = BUNSIGNED; }
break; break;
case 231: case 231:
/* Line 1787 of yacc.c */
#line 1171 "cc.y" #line 1171 "cc.y"
{ (yyval.lval) = BFLOAT; } { (yyval.lval) = BFLOAT; }
break; break;
case 232: case 232:
/* Line 1787 of yacc.c */
#line 1172 "cc.y" #line 1172 "cc.y"
{ (yyval.lval) = BDOUBLE; } { (yyval.lval) = BDOUBLE; }
break; break;
case 233: case 233:
/* Line 1787 of yacc.c */
#line 1173 "cc.y" #line 1173 "cc.y"
{ (yyval.lval) = BVOID; } { (yyval.lval) = BVOID; }
break; break;
case 234: case 234:
/* Line 1787 of yacc.c */
#line 1176 "cc.y" #line 1176 "cc.y"
{ (yyval.lval) = BAUTO; } { (yyval.lval) = BAUTO; }
break; break;
case 235: case 235:
/* Line 1787 of yacc.c */
#line 1177 "cc.y" #line 1177 "cc.y"
{ (yyval.lval) = BSTATIC; } { (yyval.lval) = BSTATIC; }
break; break;
case 236: case 236:
/* Line 1787 of yacc.c */
#line 1178 "cc.y" #line 1178 "cc.y"
{ (yyval.lval) = BEXTERN; } { (yyval.lval) = BEXTERN; }
break; break;
case 237: case 237:
/* Line 1787 of yacc.c */
#line 1179 "cc.y" #line 1179 "cc.y"
{ (yyval.lval) = BTYPEDEF; } { (yyval.lval) = BTYPEDEF; }
break; break;
case 238: case 238:
/* Line 1787 of yacc.c */
#line 1180 "cc.y" #line 1180 "cc.y"
{ (yyval.lval) = BTYPESTR; } { (yyval.lval) = BTYPESTR; }
break; break;
case 239: case 239:
/* Line 1787 of yacc.c */
#line 1181 "cc.y" #line 1181 "cc.y"
{ (yyval.lval) = BREGISTER; } { (yyval.lval) = BREGISTER; }
break; break;
case 240: case 240:
/* Line 1787 of yacc.c */
#line 1182 "cc.y" #line 1182 "cc.y"
{ (yyval.lval) = 0; } { (yyval.lval) = 0; }
break; break;
case 241: case 241:
/* Line 1787 of yacc.c */
#line 1185 "cc.y" #line 1185 "cc.y"
{ (yyval.lval) = BCONSTNT; } { (yyval.lval) = BCONSTNT; }
break; break;
case 242: case 242:
/* Line 1787 of yacc.c */
#line 1186 "cc.y" #line 1186 "cc.y"
{ (yyval.lval) = BVOLATILE; } { (yyval.lval) = BVOLATILE; }
break; break;
case 243: case 243:
/* Line 1787 of yacc.c */
#line 1187 "cc.y" #line 1187 "cc.y"
{ (yyval.lval) = 0; } { (yyval.lval) = 0; }
break; break;
case 244: case 244:
/* Line 1787 of yacc.c */
#line 1191 "cc.y" #line 1191 "cc.y"
{ {
(yyval.node) = new(ONAME, Z, Z); (yyval.node) = new(ONAME, Z, Z);
...@@ -3587,6 +3809,7 @@ yyreduce: ...@@ -3587,6 +3809,7 @@ yyreduce:
break; break;
case 245: case 245:
/* Line 1787 of yacc.c */
#line 1206 "cc.y" #line 1206 "cc.y"
{ {
(yyval.node) = new(ONAME, Z, Z); (yyval.node) = new(ONAME, Z, Z);
...@@ -3601,10 +3824,21 @@ yyreduce: ...@@ -3601,10 +3824,21 @@ yyreduce:
break; break;
/* Line 1267 of yacc.c. */ /* Line 1787 of yacc.c */
#line 3606 "y.tab.c" #line 3829 "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);
...@@ -3613,7 +3847,6 @@ yyreduce: ...@@ -3613,7 +3847,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. */
...@@ -3633,6 +3866,10 @@ yyreduce: ...@@ -3633,6 +3866,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)
{ {
...@@ -3640,37 +3877,36 @@ yyerrlab: ...@@ -3640,37 +3877,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 const *yymsgp = YY_("syntax error");
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) int yysyntax_error_status;
{ yysyntax_error_status = YYSYNTAX_ERROR;
YYSIZE_T yyalloc = 2 * yysize; if (yysyntax_error_status == 0)
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yymsgp = yymsg;
yyalloc = YYSTACK_ALLOC_MAXIMUM; else if (yysyntax_error_status == 1)
if (yymsg != yymsgbuf) {
YYSTACK_FREE (yymsg); if (yymsg != yymsgbuf)
yymsg = (char *) YYSTACK_ALLOC (yyalloc); YYSTACK_FREE (yymsg);
if (yymsg) yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
yymsg_alloc = yyalloc; if (!yymsg)
else {
{ yymsg = yymsgbuf;
yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf;
yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2;
} }
} else
{
if (0 < yysize && yysize <= yymsg_alloc) yysyntax_error_status = YYSYNTAX_ERROR;
{ yymsgp = yymsg;
(void) yysyntax_error (yymsg, yystate, yychar); }
yyerror (yymsg); }
} yyerror (yymsgp);
else if (yysyntax_error_status == 2)
{ goto yyexhaustedlab;
yyerror (YY_("syntax error"));
if (yysize != 0)
goto yyexhaustedlab;
}
} }
# undef YYSYNTAX_ERROR
#endif #endif
} }
...@@ -3678,7 +3914,7 @@ yyerrlab: ...@@ -3678,7 +3914,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)
...@@ -3695,7 +3931,7 @@ yyerrlab: ...@@ -3695,7 +3931,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;
...@@ -3729,7 +3965,7 @@ yyerrlab1: ...@@ -3729,7 +3965,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)
...@@ -3752,10 +3988,9 @@ yyerrlab1: ...@@ -3752,10 +3988,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
} }
if (yyn == YYFINAL) YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYACCEPT;
*++yyvsp = yylval; *++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */ /* Shift the error token. */
...@@ -3779,7 +4014,7 @@ yyabortlab: ...@@ -3779,7 +4014,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. |
`-------------------------------------------------*/ `-------------------------------------------------*/
...@@ -3790,9 +4025,14 @@ yyexhaustedlab: ...@@ -3790,9 +4025,14 @@ yyexhaustedlab:
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY) if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead", {
yytoken, &yylval); /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
/* 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);
...@@ -3816,6 +4056,6 @@ yyreturn: ...@@ -3816,6 +4056,6 @@ yyreturn:
} }
/* Line 2050 of yacc.c */
#line 1219 "cc.y" #line 1219 "cc.y"
/* A Bison parser, made by GNU Bison 2.3. */ /* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* 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-2013 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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
...@@ -29,10 +26,20 @@ ...@@ -29,10 +26,20 @@
special exception, which will cause the skeleton and the resulting special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public Bison output files to be licensed under the GNU General Public
License without this special exception. License without this special exception.
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. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -189,11 +196,12 @@ ...@@ -189,11 +196,12 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
#line 36 "cc.y"
{ {
/* Line 2053 of yacc.c */
#line 36 "cc.y"
Node* node; Node* node;
Sym* sym; Sym* sym;
Type* type; Type* type;
...@@ -217,14 +225,30 @@ typedef union YYSTYPE ...@@ -217,14 +225,30 @@ typedef union YYSTYPE
int32 lval; int32 lval;
double dval; double dval;
vlong vval; vlong vval;
}
/* Line 1529 of yacc.c. */
#line 223 "y.tab.h" /* Line 2053 of yacc.c */
YYSTYPE; #line 232 "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;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_Y_TAB_H_INCLUDED */
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