Line 1... |
Line 1... |
/* A Bison parser, made by GNU Bison 1.875c. */
|
|
|
|
/* Skeleton parser for Yacc-like parsing with Bison,
|
/* A Bison parser, made by GNU Bison 2.4.1. */
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
|
|
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
|
Free Software Foundation, Inc.
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
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., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
/* As a special exception, you may create a larger work that contains
|
|
part or all of the Bison parser skeleton and distribute that work
|
/* As a special exception, when this file is copied by Bison into a
|
under terms of your choice, so long as that work isn't itself a
|
Bison output file, you may use that output file without restriction.
|
parser generator using the skeleton or a modified version thereof
|
This special exception was added by the Free Software Foundation
|
as a parser skeleton. Alternatively, if you modify or redistribute
|
in version 1.24 of Bison. */
|
the parser skeleton itself, you may (at your option) remove this
|
|
special exception, which will cause the skeleton and the resulting
|
|
Bison output files to be licensed under the GNU General Public
|
|
License without this special exception.
|
|
|
/* Written by Richard Stallman by simplifying the original so called
|
This special exception was added by the Free Software Foundation in
|
``semantic'' parser. */
|
version 2.2 of Bison. */
|
|
|
|
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
|
simplifying the original so-called "semantic" parser. */
|
|
|
/* All symbols defined below should begin with yy or YY, to avoid
|
/* All symbols defined below should begin with yy or YY, to avoid
|
infringing on user name space. This should be done even for local
|
infringing on user name space. This should be done even for local
|
variables, as they might otherwise be expanded by user macros.
|
variables, as they might otherwise be expanded by user macros.
|
There are some unavoidable exceptions within include files to
|
There are some unavoidable exceptions within include files to
|
Line 34... |
Line 43... |
USER NAME SPACE" below. */
|
USER NAME SPACE" below. */
|
|
|
/* Identify Bison output. */
|
/* Identify Bison output. */
|
#define YYBISON 1
|
#define YYBISON 1
|
|
|
|
/* Bison version. */
|
|
#define YYBISON_VERSION "2.4.1"
|
|
|
/* Skeleton name. */
|
/* Skeleton name. */
|
#define YYSKELETON_NAME "yacc.c"
|
#define YYSKELETON_NAME "yacc.c"
|
|
|
/* 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
|
|
|
/* Tokens. */
|
/* Using locations. */
|
#ifndef YYTOKENTYPE
|
#define YYLSP_NEEDED 0
|
# define YYTOKENTYPE
|
|
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
know about them. */
|
|
enum yytokentype {
|
|
INT = 258,
|
|
FLOAT = 259,
|
|
STRING = 260,
|
|
FIELDNAME = 261,
|
|
NAME = 262,
|
|
TYPENAME = 263,
|
|
NAME_OR_INT = 264,
|
|
STRUCT = 265,
|
|
CLASS = 266,
|
|
SIZEOF = 267,
|
|
COLONCOLON = 268,
|
|
ERROR = 269,
|
|
VARIABLE = 270,
|
|
THIS = 271,
|
|
TRUEKEYWORD = 272,
|
|
FALSEKEYWORD = 273,
|
|
ABOVE_COMMA = 274,
|
|
ASSIGN = 275,
|
|
NOT = 276,
|
|
OR = 277,
|
|
XOR = 278,
|
|
ANDAND = 279,
|
|
NOTEQUAL = 280,
|
|
GEQ = 281,
|
|
LEQ = 282,
|
|
MOD = 283,
|
|
DIV = 284,
|
|
RSH = 285,
|
|
LSH = 286,
|
|
DECREMENT = 287,
|
|
INCREMENT = 288,
|
|
UNARY = 289,
|
|
ARROW = 290,
|
|
BLOCKNAME = 291
|
|
};
|
|
#endif
|
|
#define INT 258
|
|
#define FLOAT 259
|
|
#define STRING 260
|
|
#define FIELDNAME 261
|
|
#define NAME 262
|
|
#define TYPENAME 263
|
|
#define NAME_OR_INT 264
|
|
#define STRUCT 265
|
|
#define CLASS 266
|
|
#define SIZEOF 267
|
|
#define COLONCOLON 268
|
|
#define ERROR 269
|
|
#define VARIABLE 270
|
|
#define THIS 271
|
|
#define TRUEKEYWORD 272
|
|
#define FALSEKEYWORD 273
|
|
#define ABOVE_COMMA 274
|
|
#define ASSIGN 275
|
|
#define NOT 276
|
|
#define OR 277
|
|
#define XOR 278
|
|
#define ANDAND 279
|
|
#define NOTEQUAL 280
|
|
#define GEQ 281
|
|
#define LEQ 282
|
|
#define MOD 283
|
|
#define DIV 284
|
|
#define RSH 285
|
|
#define LSH 286
|
|
#define DECREMENT 287
|
|
#define INCREMENT 288
|
|
#define UNARY 289
|
|
#define ARROW 290
|
|
#define BLOCKNAME 291
|
|
|
|
|
|
|
|
|
|
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
|
|
|
/* Line 189 of yacc.c */
|
#line 45 "p-exp.y"
|
#line 45 "p-exp.y"
|
|
|
|
|
#include "defs.h"
|
#include "defs.h"
|
#include "gdb_string.h"
|
#include "gdb_string.h"
|
Line 208... |
Line 148... |
yyerror (char *);
|
yyerror (char *);
|
|
|
static char * uptok (char *, int);
|
static char * uptok (char *, int);
|
|
|
|
|
|
/* Line 189 of yacc.c */
|
|
#line 155 "p-exp.c.tmp"
|
|
|
/* Enabling traces. */
|
/* Enabling traces. */
|
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
# define YYDEBUG 0
|
# define YYDEBUG 0
|
#endif
|
#endif
|
|
|
Line 221... |
Line 164... |
# define YYERROR_VERBOSE 1
|
# define YYERROR_VERBOSE 1
|
#else
|
#else
|
# define YYERROR_VERBOSE 0
|
# define YYERROR_VERBOSE 0
|
#endif
|
#endif
|
|
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
/* Enabling the token table. */
|
|
#ifndef YYTOKEN_TABLE
|
|
# define YYTOKEN_TABLE 0
|
|
#endif
|
|
|
|
|
|
/* Tokens. */
|
|
#ifndef YYTOKENTYPE
|
|
# define YYTOKENTYPE
|
|
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
know about them. */
|
|
enum yytokentype {
|
|
INT = 258,
|
|
FLOAT = 259,
|
|
STRING = 260,
|
|
FIELDNAME = 261,
|
|
NAME = 262,
|
|
TYPENAME = 263,
|
|
NAME_OR_INT = 264,
|
|
STRUCT = 265,
|
|
CLASS = 266,
|
|
SIZEOF = 267,
|
|
COLONCOLON = 268,
|
|
ERROR = 269,
|
|
VARIABLE = 270,
|
|
THIS = 271,
|
|
TRUEKEYWORD = 272,
|
|
FALSEKEYWORD = 273,
|
|
ABOVE_COMMA = 274,
|
|
ASSIGN = 275,
|
|
NOT = 276,
|
|
OR = 277,
|
|
XOR = 278,
|
|
ANDAND = 279,
|
|
NOTEQUAL = 280,
|
|
GEQ = 281,
|
|
LEQ = 282,
|
|
MOD = 283,
|
|
DIV = 284,
|
|
RSH = 285,
|
|
LSH = 286,
|
|
DECREMENT = 287,
|
|
INCREMENT = 288,
|
|
UNARY = 289,
|
|
ARROW = 290,
|
|
BLOCKNAME = 291
|
|
};
|
|
#endif
|
|
/* Tokens. */
|
|
#define INT 258
|
|
#define FLOAT 259
|
|
#define STRING 260
|
|
#define FIELDNAME 261
|
|
#define NAME 262
|
|
#define TYPENAME 263
|
|
#define NAME_OR_INT 264
|
|
#define STRUCT 265
|
|
#define CLASS 266
|
|
#define SIZEOF 267
|
|
#define COLONCOLON 268
|
|
#define ERROR 269
|
|
#define VARIABLE 270
|
|
#define THIS 271
|
|
#define TRUEKEYWORD 272
|
|
#define FALSEKEYWORD 273
|
|
#define ABOVE_COMMA 274
|
|
#define ASSIGN 275
|
|
#define NOT 276
|
|
#define OR 277
|
|
#define XOR 278
|
|
#define ANDAND 279
|
|
#define NOTEQUAL 280
|
|
#define GEQ 281
|
|
#define LEQ 282
|
|
#define MOD 283
|
|
#define DIV 284
|
|
#define RSH 285
|
|
#define LSH 286
|
|
#define DECREMENT 287
|
|
#define INCREMENT 288
|
|
#define UNARY 289
|
|
#define ARROW 290
|
|
#define BLOCKNAME 291
|
|
|
|
|
|
|
|
|
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
typedef union YYSTYPE
|
|
{
|
|
|
|
/* Line 214 of yacc.c */
|
#line 131 "p-exp.y"
|
#line 131 "p-exp.y"
|
typedef union YYSTYPE {
|
|
LONGEST lval;
|
LONGEST lval;
|
struct {
|
struct {
|
LONGEST val;
|
LONGEST val;
|
struct type *type;
|
struct type *type;
|
} typed_val_int;
|
} typed_val_int;
|
Line 245... |
Line 279... |
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
struct internalvar *ivar;
|
struct internalvar *ivar;
|
|
|
struct type **tvec;
|
struct type **tvec;
|
int *ivec;
|
int *ivec;
|
|
|
|
|
|
|
|
/* Line 214 of yacc.c */
|
|
#line 289 "p-exp.c.tmp"
|
} YYSTYPE;
|
} YYSTYPE;
|
/* Line 191 of yacc.c. */
|
# define YYSTYPE_IS_TRIVIAL 1
|
#line 253 "p-exp.c.tmp"
|
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
|
#endif
|
#endif
|
|
|
|
|
|
|
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
|
|
|
/* Line 264 of yacc.c */
|
#line 155 "p-exp.y"
|
#line 155 "p-exp.y"
|
|
|
/* YYSTYPE gets defined by %union */
|
/* YYSTYPE gets defined by %union */
|
static int
|
static int
|
parse_number (char *, int, int, YYSTYPE *);
|
parse_number (char *, int, int, YYSTYPE *);
|
Line 269... |
Line 307... |
static void push_current_type (void);
|
static void push_current_type (void);
|
static void pop_current_type (void);
|
static void pop_current_type (void);
|
static int search_field;
|
static int search_field;
|
|
|
|
|
/* Line 214 of yacc.c. */
|
/* Line 264 of yacc.c */
|
#line 276 "p-exp.c.tmp"
|
#line 314 "p-exp.c.tmp"
|
|
|
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
#ifdef short
|
|
# undef short
|
|
#endif
|
|
|
# ifndef YYFREE
|
#ifdef YYTYPE_UINT8
|
# define YYFREE xfree
|
typedef YYTYPE_UINT8 yytype_uint8;
|
|
#else
|
|
typedef unsigned char yytype_uint8;
|
# endif
|
# endif
|
# ifndef YYMALLOC
|
|
# define YYMALLOC xmalloc
|
#ifdef YYTYPE_INT8
|
|
typedef YYTYPE_INT8 yytype_int8;
|
|
#elif (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
typedef signed char yytype_int8;
|
|
#else
|
|
typedef short int yytype_int8;
|
# endif
|
# endif
|
|
|
/* The parser invokes alloca or xmalloc; define the necessary symbols. */
|
#ifdef YYTYPE_UINT16
|
|
typedef YYTYPE_UINT16 yytype_uint16;
|
|
#else
|
|
typedef unsigned short int yytype_uint16;
|
|
#endif
|
|
|
# ifdef YYSTACK_USE_ALLOCA
|
#ifdef YYTYPE_INT16
|
# if YYSTACK_USE_ALLOCA
|
typedef YYTYPE_INT16 yytype_int16;
|
# define YYSTACK_ALLOC alloca
|
#else
|
|
typedef short int yytype_int16;
|
# endif
|
# endif
|
|
|
|
#ifndef YYSIZE_T
|
|
# ifdef __SIZE_TYPE__
|
|
# define YYSIZE_T __SIZE_TYPE__
|
|
# elif defined size_t
|
|
# define YYSIZE_T size_t
|
|
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
|
# define YYSIZE_T size_t
|
# else
|
# else
|
# if defined (alloca) || defined (_ALLOCA_H)
|
# define YYSIZE_T unsigned int
|
# define YYSTACK_ALLOC alloca
|
# endif
|
|
#endif
|
|
|
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
|
|
|
#ifndef YY_
|
|
# if YYENABLE_NLS
|
|
# if ENABLE_NLS
|
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
|
# endif
|
|
# endif
|
|
# ifndef YY_
|
|
# define YY_(msgid) msgid
|
|
# endif
|
|
#endif
|
|
|
|
/* Suppress unused-variable warnings by "using" E. */
|
|
#if ! defined lint || defined __GNUC__
|
|
# define YYUSE(e) ((void) (e))
|
|
#else
|
|
# define YYUSE(e) /* empty */
|
|
#endif
|
|
|
|
/* Identity function, used to suppress warnings about constant conditions. */
|
|
#ifndef lint
|
|
# define YYID(n) (n)
|
|
#else
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
static int
|
|
YYID (int yyi)
|
# else
|
# else
|
|
static int
|
|
YYID (yyi)
|
|
int yyi;
|
|
#endif
|
|
{
|
|
return yyi;
|
|
}
|
|
#endif
|
|
|
|
#if ! defined yyoverflow || YYERROR_VERBOSE
|
|
|
|
/* The parser invokes alloca or xmalloc; define the necessary symbols. */
|
|
|
|
# ifdef YYSTACK_USE_ALLOCA
|
|
# if YYSTACK_USE_ALLOCA
|
# ifdef __GNUC__
|
# ifdef __GNUC__
|
# define YYSTACK_ALLOC __builtin_alloca
|
# define YYSTACK_ALLOC __builtin_alloca
|
|
# elif defined __BUILTIN_VA_ARG_INCR
|
|
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
|
|
# elif defined _AIX
|
|
# define YYSTACK_ALLOC __alloca
|
|
# elif defined _MSC_VER
|
|
# define alloca _alloca
|
|
# else
|
|
# define YYSTACK_ALLOC alloca
|
|
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
|
# ifndef _STDLIB_H
|
|
# define _STDLIB_H 1
|
|
# endif
|
|
# endif
|
# endif
|
# endif
|
# endif
|
# endif
|
# endif
|
# endif
|
|
|
# ifdef YYSTACK_ALLOC
|
# ifdef YYSTACK_ALLOC
|
/* Pacify GCC's `empty if-body' warning. */
|
/* Pacify GCC's `empty if-body' warning. */
|
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
|
# else
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
# if defined (__STDC__) || defined (__cplusplus)
|
/* The OS might guarantee only one guard page at the bottom of the stack,
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
and a page size can be as small as 4096 bytes. So we cannot safely
|
# define YYSIZE_T size_t
|
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
|
|
to allow for a few compiler-allocated temporary stack slots. */
|
|
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
|
# endif
|
# endif
|
|
# else
|
# define YYSTACK_ALLOC YYMALLOC
|
# define YYSTACK_ALLOC YYMALLOC
|
# define YYSTACK_FREE YYFREE
|
# define YYSTACK_FREE YYFREE
|
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
|
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
# endif
|
# endif
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
# if (defined __cplusplus && ! defined _STDLIB_H \
|
|
&& ! ((defined YYMALLOC || defined xmalloc) \
|
|
&& (defined YYFREE || defined xfree)))
|
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
|
# ifndef _STDLIB_H
|
|
# define _STDLIB_H 1
|
|
# endif
|
|
# endif
|
|
# ifndef YYMALLOC
|
|
# define YYMALLOC xmalloc
|
|
# if ! defined xmalloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
|
# endif
|
|
# endif
|
|
# ifndef YYFREE
|
|
# define YYFREE xfree
|
|
# if ! defined xfree && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
void xfree (void *); /* INFRINGES ON USER NAME SPACE */
|
|
# endif
|
|
# endif
|
|
# endif
|
|
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
|
|
|
|
|
#if (! defined (yyoverflow) \
|
#if (! defined yyoverflow \
|
&& (! defined (__cplusplus) \
|
&& (! defined __cplusplus \
|
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
|
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
|
|
/* A type that is properly aligned for any stack member. */
|
/* A type that is properly aligned for any stack member. */
|
union yyalloc
|
union yyalloc
|
{
|
{
|
short 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)
|
|
|
/* The size of an array large to enough to hold all stacks, each with
|
/* The size of an array large to enough to hold all stacks, each with
|
N elements. */
|
N elements. */
|
# define YYSTACK_BYTES(N) \
|
# define YYSTACK_BYTES(N) \
|
((N) * (sizeof (short) + 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
|
/* Copy COUNT objects from FROM to TO. The source and destination do
|
not overlap. */
|
not overlap. */
|
# ifndef YYCOPY
|
# ifndef YYCOPY
|
# if defined (__GNUC__) && 1 < __GNUC__
|
# if defined __GNUC__ && 1 < __GNUC__
|
# define YYCOPY(To, From, Count) \
|
# define YYCOPY(To, From, Count) \
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
# else
|
# else
|
# define YYCOPY(To, From, Count) \
|
# define YYCOPY(To, From, Count) \
|
do \
|
do \
|
{ \
|
{ \
|
register YYSIZE_T yyi; \
|
YYSIZE_T yyi; \
|
for (yyi = 0; yyi < (Count); yyi++) \
|
for (yyi = 0; yyi < (Count); yyi++) \
|
(To)[yyi] = (From)[yyi]; \
|
(To)[yyi] = (From)[yyi]; \
|
} \
|
} \
|
while (0)
|
while (YYID (0))
|
# endif
|
# endif
|
# 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); \
|
} \
|
} \
|
while (0)
|
while (YYID (0))
|
|
|
#endif
|
#endif
|
|
|
#if defined (__STDC__) || defined (__cplusplus)
|
|
typedef signed char yysigned_char;
|
|
#else
|
|
typedef short yysigned_char;
|
|
#endif
|
|
|
|
/* YYFINAL -- State number of the termination state. */
|
/* YYFINAL -- State number of the termination state. */
|
#define YYFINAL 3
|
#define YYFINAL 3
|
/* YYLAST -- Last index in YYTABLE. */
|
/* YYLAST -- Last index in YYTABLE. */
|
#define YYLAST 387
|
#define YYLAST 387
|
|
|
Line 395... |
Line 541... |
|
|
#define YYTRANSLATE(YYX) \
|
#define YYTRANSLATE(YYX) \
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
|
|
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
static const unsigned char yytranslate[] =
|
static const yytype_uint8 yytranslate[] =
|
{
|
{
|
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
Line 432... |
Line 578... |
};
|
};
|
|
|
#if YYDEBUG
|
#if YYDEBUG
|
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
YYRHS. */
|
YYRHS. */
|
static const unsigned char yyprhs[] =
|
static const yytype_uint8 yyprhs[] =
|
{
|
{
|
0, 0, 3, 4, 7, 9, 11, 13, 15, 19,
|
0, 0, 3, 4, 7, 9, 11, 13, 15, 19,
|
22, 25, 28, 31, 36, 41, 42, 47, 48, 54,
|
22, 25, 28, 31, 36, 41, 42, 47, 48, 54,
|
55, 61, 62, 64, 68, 73, 77, 81, 82, 87,
|
55, 61, 62, 64, 68, 73, 77, 81, 82, 87,
|
91, 95, 99, 103, 107, 111, 115, 119, 123, 127,
|
91, 95, 99, 103, 107, 111, 115, 119, 123, 127,
|
Line 445... |
Line 591... |
193, 195, 198, 200, 202, 204, 207, 209, 212, 215,
|
193, 195, 198, 200, 202, 204, 207, 209, 212, 215,
|
217, 219, 221, 223, 225
|
217, 219, 221, 223, 225
|
};
|
};
|
|
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
static const yysigned_char yyrhs[] =
|
static const yytype_int8 yyrhs[] =
|
{
|
{
|
53, 0, -1, -1, 54, 55, -1, 57, -1, 56,
|
53, 0, -1, -1, 54, 55, -1, 57, -1, 56,
|
-1, 68, -1, 58, -1, 57, 19, 58, -1, 58,
|
-1, 68, -1, 58, -1, 57, 19, 58, -1, 58,
|
48, -1, 36, 58, -1, 38, 58, -1, 22, 58,
|
48, -1, 36, 58, -1, 38, 58, -1, 22, 58,
|
-1, 42, 46, 58, 50, -1, 41, 46, 58, 50,
|
-1, 42, 46, 58, 50, -1, 41, 46, 58, 50,
|
Line 473... |
Line 619... |
70, -1, 11, 70, -1, 7, -1, 49, -1, 8,
|
70, -1, 11, 70, -1, 7, -1, 49, -1, 8,
|
-1, 9, -1, 7, -1, 49, -1
|
-1, 9, -1, 7, -1, 49, -1
|
};
|
};
|
|
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
static const unsigned short yyrline[] =
|
static const yytype_uint16 yyrline[] =
|
{
|
{
|
0, 235, 235, 235, 243, 244, 247, 254, 255, 260,
|
0, 235, 235, 235, 243, 244, 247, 254, 255, 260,
|
266, 272, 276, 280, 284, 288, 288, 303, 301, 331,
|
266, 272, 276, 280, 284, 288, 288, 303, 301, 331,
|
328, 343, 344, 346, 350, 365, 371, 375, 375, 395,
|
328, 343, 344, 346, 350, 365, 371, 375, 375, 395,
|
399, 403, 407, 411, 415, 419, 425, 431, 437, 443,
|
399, 403, 407, 411, 415, 419, 425, 431, 437, 443,
|
Line 486... |
Line 632... |
640, 641, 669, 738, 749, 753, 755, 757, 760, 768,
|
640, 641, 669, 738, 749, 753, 755, 757, 760, 768,
|
769, 770, 771, 774, 775
|
769, 770, 771, 774, 775
|
};
|
};
|
#endif
|
#endif
|
|
|
#if YYDEBUG || YYERROR_VERBOSE
|
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
/* YYTNME[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[] =
|
{
|
{
|
"$end", "error", "$undefined", "INT", "FLOAT", "STRING", "FIELDNAME",
|
"$end", "error", "$undefined", "INT", "FLOAT", "STRING", "FIELDNAME",
|
"NAME", "TYPENAME", "NAME_OR_INT", "STRUCT", "CLASS", "SIZEOF",
|
"NAME", "TYPENAME", "NAME_OR_INT", "STRUCT", "CLASS", "SIZEOF",
|
"COLONCOLON", "ERROR", "VARIABLE", "THIS", "TRUEKEYWORD", "FALSEKEYWORD",
|
"COLONCOLON", "ERROR", "VARIABLE", "THIS", "TRUEKEYWORD", "FALSEKEYWORD",
|
"','", "ABOVE_COMMA", "ASSIGN", "NOT", "OR", "XOR", "ANDAND", "'='",
|
"','", "ABOVE_COMMA", "ASSIGN", "NOT", "OR", "XOR", "ANDAND", "'='",
|
"NOTEQUAL", "'<'", "'>'", "GEQ", "LEQ", "MOD", "DIV", "RSH", "LSH",
|
"NOTEQUAL", "'<'", "'>'", "GEQ", "LEQ", "MOD", "DIV", "RSH", "LSH",
|
"'@'", "'+'", "'-'", "'*'", "'/'", "DECREMENT", "INCREMENT", "UNARY",
|
"'@'", "'+'", "'-'", "'*'", "'/'", "DECREMENT", "INCREMENT", "UNARY",
|
"'.'", "'['", "'('", "ARROW", "'^'", "BLOCKNAME", "')'", "']'",
|
"'.'", "'['", "'('", "ARROW", "'^'", "BLOCKNAME", "')'", "']'",
|
"$accept", "start", "@1", "normal_start", "type_exp", "exp1", "exp",
|
"$accept", "start", "$@1", "normal_start", "type_exp", "exp1", "exp",
|
"@2", "@3", "@4", "arglist", "@5", "block", "variable", "qualified_name",
|
"$@2", "$@3", "$@4", "arglist", "$@5", "block", "variable",
|
"ptype", "type", "typebase", "name", "name_not_typename", 0
|
"qualified_name", "ptype", "type", "typebase", "name",
|
|
"name_not_typename", 0
|
};
|
};
|
#endif
|
#endif
|
|
|
# ifdef YYPRINT
|
# ifdef YYPRINT
|
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
|
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
|
token YYLEX-NUM. */
|
token YYLEX-NUM. */
|
static const unsigned short yytoknum[] =
|
static const yytype_uint16 yytoknum[] =
|
{
|
{
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 44,
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 44,
|
274, 275, 276, 277, 278, 279, 61, 280, 60, 62,
|
274, 275, 276, 277, 278, 279, 61, 280, 60, 62,
|
281, 282, 283, 284, 285, 286, 64, 43, 45, 42,
|
281, 282, 283, 284, 285, 286, 64, 43, 45, 42,
|
Line 519... |
Line 666... |
41, 93
|
41, 93
|
};
|
};
|
# endif
|
# endif
|
|
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
static const unsigned char yyr1[] =
|
static const yytype_uint8 yyr1[] =
|
{
|
{
|
0, 52, 54, 53, 55, 55, 56, 57, 57, 58,
|
0, 52, 54, 53, 55, 55, 56, 57, 57, 58,
|
58, 58, 58, 58, 58, 59, 58, 60, 58, 61,
|
58, 58, 58, 58, 58, 59, 58, 60, 58, 61,
|
58, 62, 62, 62, 58, 58, 58, 63, 58, 58,
|
58, 62, 62, 62, 58, 58, 58, 63, 58, 58,
|
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
|
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
|
Line 532... |
Line 679... |
65, 65, 65, 67, 68, 69, 69, 69, 69, 70,
|
65, 65, 65, 67, 68, 69, 69, 69, 69, 70,
|
70, 70, 70, 71, 71
|
70, 70, 70, 71, 71
|
};
|
};
|
|
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
static const unsigned char yyr2[] =
|
static const yytype_uint8 yyr2[] =
|
{
|
{
|
0, 2, 0, 2, 1, 1, 1, 1, 3, 2,
|
0, 2, 0, 2, 1, 1, 1, 1, 3, 2,
|
2, 2, 2, 4, 4, 0, 4, 0, 5, 0,
|
2, 2, 2, 4, 4, 0, 4, 0, 5, 0,
|
5, 0, 1, 3, 4, 3, 3, 0, 4, 3,
|
5, 0, 1, 3, 4, 3, 3, 0, 4, 3,
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
Line 547... |
Line 694... |
};
|
};
|
|
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
means the default is an error. */
|
means the default is an error. */
|
static const unsigned char yydefact[] =
|
static const yytype_uint8 yydefact[] =
|
{
|
{
|
2, 0, 0, 1, 47, 49, 54, 73, 66, 48,
|
2, 0, 0, 1, 47, 49, 54, 73, 66, 48,
|
0, 0, 0, 0, 51, 55, 45, 46, 0, 0,
|
0, 0, 0, 0, 51, 55, 45, 46, 0, 0,
|
0, 0, 0, 0, 0, 74, 3, 5, 4, 7,
|
0, 0, 0, 0, 0, 74, 3, 5, 4, 7,
|
0, 50, 60, 64, 6, 63, 62, 69, 71, 72,
|
0, 50, 60, 64, 6, 63, 62, 69, 71, 72,
|
Line 565... |
Line 712... |
52, 14, 13, 28, 16, 0, 22, 0, 24, 18,
|
52, 14, 13, 28, 16, 0, 22, 0, 24, 18,
|
0, 20, 23
|
0, 20, 23
|
};
|
};
|
|
|
/* YYDEFGOTO[NTERM-NUM]. */
|
/* YYDEFGOTO[NTERM-NUM]. */
|
static const yysigned_char yydefgoto[] =
|
static const yytype_int8 yydefgoto[] =
|
{
|
{
|
-1, 1, 2, 26, 27, 28, 29, 103, 104, 105,
|
-1, 1, 2, 26, 27, 28, 29, 103, 104, 105,
|
117, 102, 30, 31, 32, 33, 46, 35, 41, 36
|
117, 102, 30, 31, 32, 33, 46, 35, 41, 36
|
};
|
};
|
|
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
STATE-NUM. */
|
STATE-NUM. */
|
#define YYPACT_NINF -39
|
#define YYPACT_NINF -39
|
static const short yypact[] =
|
static const yytype_int16 yypact[] =
|
{
|
{
|
-39, 9, 88, -39, -39, -39, -39, -39, -39, -39,
|
-39, 9, 88, -39, -39, -39, -39, -39, -39, -39,
|
4, 4, -31, 4, -39, -39, -39, -39, 88, 88,
|
4, 4, -31, 4, -39, -39, -39, -39, 88, 88,
|
88, -26, -23, 88, 8, 11, -39, -39, 14, 229,
|
88, -26, -23, 88, 8, 11, -39, -39, 14, 229,
|
15, -39, -39, -39, -16, 21, -39, -39, -39, -39,
|
15, -39, -39, -39, -16, 21, -39, -39, -39, -39,
|
Line 592... |
Line 739... |
-39, -39, -39, -38, -39, 3, 229, 10, -39, -39,
|
-39, -39, -39, -38, -39, 3, 229, 10, -39, -39,
|
88, -39, 229
|
88, -39, 229
|
};
|
};
|
|
|
/* YYPGOTO[NTERM-NUM]. */
|
/* YYPGOTO[NTERM-NUM]. */
|
static const yysigned_char yypgoto[] =
|
static const yytype_int8 yypgoto[] =
|
{
|
{
|
-39, -39, -39, -39, -39, -19, -18, -39, -39, -39,
|
-39, -39, -39, -39, -39, -19, -18, -39, -39, -39,
|
-39, -39, -39, -39, -39, -39, 12, 38, -8, -39
|
-39, -39, -39, -39, -39, -39, 12, 38, -8, -39
|
};
|
};
|
|
|
/* 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 zero, do what YYDEFACT says.
|
If YYTABLE_NINF, syntax error. */
|
If YYTABLE_NINF, syntax error. */
|
#define YYTABLE_NINF -58
|
#define YYTABLE_NINF -58
|
static const yysigned_char yytable[] =
|
static const yytype_int8 yytable[] =
|
{
|
{
|
45, 47, 48, 42, 51, 44, 72, 73, 74, 3,
|
45, 47, 48, 42, 51, 44, 72, 73, 74, 3,
|
75, 37, 38, 39, 34, 43, 8, 77, 10, 11,
|
75, 37, 38, 39, 34, 43, 8, 77, 10, 11,
|
49, 110, 53, 50, -56, 79, 53, 0, 76, 120,
|
49, 110, 53, 50, -56, 79, 53, 0, 76, 120,
|
77, 81, 82, 53, 78, 84, 85, 86, 87, 88,
|
77, 81, 82, 53, 78, 84, 85, 86, 87, 88,
|
Line 646... |
Line 793... |
69, 70, 71, 0, 0, 0, 72, 73, 74, 0,
|
69, 70, 71, 0, 0, 0, 72, 73, 74, 0,
|
75, 64, 65, 66, 67, 0, 68, 69, 70, 71,
|
75, 64, 65, 66, 67, 0, 68, 69, 70, 71,
|
0, 0, 0, 72, 73, 74, 0, 75
|
0, 0, 0, 72, 73, 74, 0, 75
|
};
|
};
|
|
|
static const yysigned_char yycheck[] =
|
static const yytype_int8 yycheck[] =
|
{
|
{
|
18, 19, 20, 11, 23, 13, 44, 45, 46, 0,
|
18, 19, 20, 11, 23, 13, 44, 45, 46, 0,
|
48, 7, 8, 9, 2, 46, 8, 46, 10, 11,
|
48, 7, 8, 9, 2, 46, 8, 46, 10, 11,
|
46, 50, 19, 46, 13, 43, 19, -1, 13, 19,
|
46, 50, 19, 46, 13, 43, 19, -1, 13, 19,
|
46, 49, 50, 19, 13, 53, 54, 55, 56, 57,
|
46, 49, 50, 19, 13, 53, 54, 55, 56, 57,
|
Line 691... |
Line 838... |
-1, -1, -1, 44, 45, 46, -1, 48
|
-1, -1, -1, 44, 45, 46, -1, 48
|
};
|
};
|
|
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
symbol of state STATE-NUM. */
|
symbol of state STATE-NUM. */
|
static const unsigned char yystos[] =
|
static const yytype_uint8 yystos[] =
|
{
|
{
|
0, 53, 54, 0, 3, 4, 5, 7, 8, 9,
|
0, 53, 54, 0, 3, 4, 5, 7, 8, 9,
|
10, 11, 12, 13, 15, 16, 17, 18, 22, 36,
|
10, 11, 12, 13, 15, 16, 17, 18, 22, 36,
|
38, 41, 42, 46, 48, 49, 55, 56, 57, 58,
|
38, 41, 42, 46, 48, 49, 55, 56, 57, 58,
|
64, 65, 66, 67, 68, 69, 71, 7, 8, 9,
|
64, 65, 66, 67, 68, 69, 71, 7, 8, 9,
|
Line 708... |
Line 855... |
58, 58, 63, 59, 60, 61, 70, 58, 70, 50,
|
58, 58, 63, 59, 60, 61, 70, 58, 70, 50,
|
50, 50, 50, 58, 6, 57, 58, 62, 50, 51,
|
50, 50, 50, 58, 6, 57, 58, 62, 50, 51,
|
19, 50, 58
|
19, 50, 58
|
};
|
};
|
|
|
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
|
# define YYSIZE_T __SIZE_TYPE__
|
|
#endif
|
|
#if ! defined (YYSIZE_T) && defined (size_t)
|
|
# define YYSIZE_T size_t
|
|
#endif
|
|
#if ! defined (YYSIZE_T)
|
|
# if defined (__STDC__) || defined (__cplusplus)
|
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
|
# define YYSIZE_T size_t
|
|
# endif
|
|
#endif
|
|
#if ! defined (YYSIZE_T)
|
|
# define YYSIZE_T unsigned int
|
|
#endif
|
|
|
|
#define yyerrok (yyerrstatus = 0)
|
#define yyerrok (yyerrstatus = 0)
|
#define yyclearin (yychar = YYEMPTY)
|
#define yyclearin (yychar = YYEMPTY)
|
#define YYEMPTY (-2)
|
#define YYEMPTY (-2)
|
#define YYEOF 0
|
#define YYEOF 0
|
|
|
Line 749... |
Line 880... |
if (yychar == YYEMPTY && yylen == 1) \
|
if (yychar == YYEMPTY && yylen == 1) \
|
{ \
|
{ \
|
yychar = (Token); \
|
yychar = (Token); \
|
yylval = (Value); \
|
yylval = (Value); \
|
yytoken = YYTRANSLATE (yychar); \
|
yytoken = YYTRANSLATE (yychar); \
|
YYPOPSTACK; \
|
YYPOPSTACK (1); \
|
goto yybackup; \
|
goto yybackup; \
|
} \
|
} \
|
else \
|
else \
|
{ \
|
{ \
|
yyerror ("syntax error: cannot back up");\
|
yyerror (YY_("syntax error: cannot back up")); \
|
YYERROR; \
|
YYERROR; \
|
} \
|
} \
|
while (0)
|
while (YYID (0))
|
|
|
|
|
#define YYTERROR 1
|
#define YYTERROR 1
|
#define YYERRCODE 256
|
#define YYERRCODE 256
|
|
|
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
|
|
are run). */
|
|
|
|
|
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
|
If N is 0, then set CURRENT to the empty location which ends
|
|
the previous symbol: RHS[0] (always defined). */
|
|
|
|
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
#ifndef YYLLOC_DEFAULT
|
#ifndef YYLLOC_DEFAULT
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
((Current).first_line = (Rhs)[1].first_line, \
|
do \
|
(Current).first_column = (Rhs)[1].first_column, \
|
if (YYID (N)) \
|
(Current).last_line = (Rhs)[N].last_line, \
|
{ \
|
(Current).last_column = (Rhs)[N].last_column)
|
(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
|
|
# if YYLTYPE_IS_TRIVIAL
|
|
# define YY_LOCATION_PRINT(File, Loc) \
|
|
fprintf (File, "%d.%d-%d.%d", \
|
|
(Loc).first_line, (Loc).first_column, \
|
|
(Loc).last_line, (Loc).last_column)
|
|
# else
|
|
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
#endif
|
#endif
|
|
#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)
|
Line 793... |
Line 957... |
|
|
# define YYDPRINTF(Args) \
|
# define YYDPRINTF(Args) \
|
do { \
|
do { \
|
if (yydebug) \
|
if (yydebug) \
|
YYFPRINTF Args; \
|
YYFPRINTF Args; \
|
} while (0)
|
} while (YYID (0))
|
|
|
# define YYDSYMPRINT(Args) \
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
do { \
|
do { \
|
if (yydebug) \
|
if (yydebug) \
|
yysymprint Args; \
|
{ \
|
} while (0)
|
YYFPRINTF (stderr, "%s ", Title); \
|
|
yy_symbol_print (stderr, \
|
|
Type, Value); \
|
|
YYFPRINTF (stderr, "\n"); \
|
|
} \
|
|
} while (YYID (0))
|
|
|
|
|
|
/*--------------------------------.
|
|
| Print this symbol on YYOUTPUT. |
|
|
`--------------------------------*/
|
|
|
|
/*ARGSUSED*/
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
static void
|
|
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
|
|
#else
|
|
static void
|
|
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
|
|
FILE *yyoutput;
|
|
int yytype;
|
|
YYSTYPE const * const yyvaluep;
|
|
#endif
|
|
{
|
|
if (!yyvaluep)
|
|
return;
|
|
# ifdef YYPRINT
|
|
if (yytype < YYNTOKENS)
|
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
|
# else
|
|
YYUSE (yyoutput);
|
|
# endif
|
|
switch (yytype)
|
|
{
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
/*--------------------------------.
|
|
| Print this symbol on YYOUTPUT. |
|
|
`--------------------------------*/
|
|
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
|
static void
|
|
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
|
|
#else
|
|
static void
|
|
yy_symbol_print (yyoutput, yytype, yyvaluep)
|
|
FILE *yyoutput;
|
|
int yytype;
|
|
YYSTYPE const * const yyvaluep;
|
|
#endif
|
|
{
|
|
if (yytype < YYNTOKENS)
|
|
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
|
|
else
|
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
|
|
# define YYDSYMPRINTF(Title, Token, Value, Location) \
|
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
|
do { \
|
YYFPRINTF (yyoutput, ")");
|
if (yydebug) \
|
}
|
{ \
|
|
YYFPRINTF (stderr, "%s ", Title); \
|
|
yysymprint (stderr, \
|
|
Token, Value); \
|
|
YYFPRINTF (stderr, "\n"); \
|
|
} \
|
|
} while (0)
|
|
|
|
/*------------------------------------------------------------------.
|
/*------------------------------------------------------------------.
|
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
| TOP (included). |
|
| TOP (included). |
|
`------------------------------------------------------------------*/
|
`------------------------------------------------------------------*/
|
|
|
#if defined (__STDC__) || defined (__cplusplus)
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
static void
|
static void
|
yy_stack_print (short *bottom, short *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)
|
short *bottom;
|
yytype_int16 *yybottom;
|
short *top;
|
yytype_int16 *yytop;
|
#endif
|
#endif
|
{
|
{
|
YYFPRINTF (stderr, "Stack now");
|
YYFPRINTF (stderr, "Stack now");
|
for (/* Nothing. */; bottom <= top; ++bottom)
|
for (; yybottom <= yytop; yybottom++)
|
YYFPRINTF (stderr, " %d", *bottom);
|
{
|
|
int yybot = *yybottom;
|
|
YYFPRINTF (stderr, " %d", yybot);
|
|
}
|
YYFPRINTF (stderr, "\n");
|
YYFPRINTF (stderr, "\n");
|
}
|
}
|
|
|
# define YY_STACK_PRINT(Bottom, Top) \
|
# define YY_STACK_PRINT(Bottom, Top) \
|
do { \
|
do { \
|
if (yydebug) \
|
if (yydebug) \
|
yy_stack_print ((Bottom), (Top)); \
|
yy_stack_print ((Bottom), (Top)); \
|
} while (0)
|
} while (YYID (0))
|
|
|
|
|
/*------------------------------------------------.
|
/*------------------------------------------------.
|
| Report that the YYRULE is going to be reduced. |
|
| Report that the YYRULE is going to be reduced. |
|
`------------------------------------------------*/
|
`------------------------------------------------*/
|
|
|
#if defined (__STDC__) || defined (__cplusplus)
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
static void
|
static void
|
yy_reduce_print (int yyrule)
|
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
|
#else
|
#else
|
static void
|
static void
|
yy_reduce_print (yyrule)
|
yy_reduce_print (yyvsp, yyrule)
|
|
YYSTYPE *yyvsp;
|
int yyrule;
|
int yyrule;
|
#endif
|
#endif
|
{
|
{
|
|
int yynrhs = yyr2[yyrule];
|
int yyi;
|
int yyi;
|
unsigned int yylno = yyrline[yyrule];
|
unsigned long int yylno = yyrline[yyrule];
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
|
yyrule - 1, yylno);
|
yyrule - 1, yylno);
|
/* Print the symbols being reduced, and their result. */
|
/* The symbols being reduced. */
|
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
for (yyi = 0; yyi < yynrhs; yyi++)
|
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
{
|
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
|
YYFPRINTF (stderr, " $%d = ", yyi + 1);
|
|
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
|
|
&(yyvsp[(yyi + 1) - (yynrhs)])
|
|
);
|
|
YYFPRINTF (stderr, "\n");
|
|
}
|
}
|
}
|
|
|
# define YY_REDUCE_PRINT(Rule) \
|
# define YY_REDUCE_PRINT(Rule) \
|
do { \
|
do { \
|
if (yydebug) \
|
if (yydebug) \
|
yy_reduce_print (Rule); \
|
yy_reduce_print (yyvsp, Rule); \
|
} while (0)
|
} while (YYID (0))
|
|
|
/* Nonzero means print parse trace. It is left uninitialized so that
|
/* Nonzero means print parse trace. It is left uninitialized so that
|
multiple parsers can coexist. */
|
multiple parsers can coexist. */
|
int yydebug;
|
int yydebug;
|
#else /* !YYDEBUG */
|
#else /* !YYDEBUG */
|
# define YYDPRINTF(Args)
|
# define YYDPRINTF(Args)
|
# define YYDSYMPRINT(Args)
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
# define YYDSYMPRINTF(Title, Token, Value, Location)
|
|
# define YY_STACK_PRINT(Bottom, Top)
|
# define YY_STACK_PRINT(Bottom, Top)
|
# define YY_REDUCE_PRINT(Rule)
|
# define YY_REDUCE_PRINT(Rule)
|
#endif /* !YYDEBUG */
|
#endif /* !YYDEBUG */
|
|
|
|
|
Line 890... |
Line 1118... |
|
|
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
if the built-in stack extension method is used).
|
if the built-in stack extension method is used).
|
|
|
Do not make this value too large; the results are undefined if
|
Do not make this value too large; the results are undefined if
|
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
|
evaluated with infinite-precision integer arithmetic. */
|
evaluated with infinite-precision integer arithmetic. */
|
|
|
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
|
|
# undef YYMAXDEPTH
|
|
#endif
|
|
|
|
#ifndef YYMAXDEPTH
|
#ifndef YYMAXDEPTH
|
# define YYMAXDEPTH 10000
|
# define YYMAXDEPTH 10000
|
#endif
|
#endif
|
|
|
|
|
|
|
#if YYERROR_VERBOSE
|
#if YYERROR_VERBOSE
|
|
|
# ifndef yystrlen
|
# ifndef yystrlen
|
# if defined (__GLIBC__) && defined (_STRING_H)
|
# if defined __GLIBC__ && defined _STRING_H
|
# define yystrlen strlen
|
# define yystrlen strlen
|
# else
|
# else
|
/* Return the length of YYSTR. */
|
/* Return the length of YYSTR. */
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
static YYSIZE_T
|
static YYSIZE_T
|
# if defined (__STDC__) || defined (__cplusplus)
|
|
yystrlen (const char *yystr)
|
yystrlen (const char *yystr)
|
# else
|
# else
|
|
static YYSIZE_T
|
yystrlen (yystr)
|
yystrlen (yystr)
|
const char *yystr;
|
const char *yystr;
|
# endif
|
# endif
|
{
|
{
|
register const char *yys = yystr;
|
YYSIZE_T yylen;
|
|
for (yylen = 0; yystr[yylen]; yylen++)
|
while (*yys++ != '\0')
|
|
continue;
|
continue;
|
|
return yylen;
|
return yys - yystr - 1;
|
|
}
|
}
|
# endif
|
# endif
|
# endif
|
# endif
|
|
|
# ifndef yystpcpy
|
# ifndef yystpcpy
|
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
|
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
|
# define yystpcpy stpcpy
|
# define yystpcpy stpcpy
|
# else
|
# else
|
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
YYDEST. */
|
YYDEST. */
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
static char *
|
static char *
|
# if defined (__STDC__) || defined (__cplusplus)
|
|
yystpcpy (char *yydest, const char *yysrc)
|
yystpcpy (char *yydest, const char *yysrc)
|
# else
|
# else
|
|
static char *
|
yystpcpy (yydest, yysrc)
|
yystpcpy (yydest, yysrc)
|
char *yydest;
|
char *yydest;
|
const char *yysrc;
|
const char *yysrc;
|
# endif
|
# endif
|
{
|
{
|
register char *yyd = yydest;
|
char *yyd = yydest;
|
register const char *yys = yysrc;
|
const char *yys = yysrc;
|
|
|
while ((*yyd++ = *yys++) != '\0')
|
while ((*yyd++ = *yys++) != '\0')
|
continue;
|
continue;
|
|
|
return yyd - 1;
|
return yyd - 1;
|
}
|
}
|
# endif
|
# endif
|
# endif
|
# endif
|
|
|
#endif /* !YYERROR_VERBOSE */
|
# ifndef yytnamerr
|
|
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
|
|
quotes and backslashes, so that it's suitable for yyerror. The
|
|
heuristic is that double-quoting is unnecessary unless the string
|
|
contains an apostrophe, a comma, or backslash (other than
|
|
backslash-backslash). YYSTR is taken from yytname. If YYRES is
|
|
null, do not copy; instead, return the length of what the result
|
|
would have been. */
|
|
static YYSIZE_T
|
|
yytnamerr (char *yyres, const char *yystr)
|
|
{
|
|
if (*yystr == '"')
|
|
{
|
|
YYSIZE_T yyn = 0;
|
|
char const *yyp = yystr;
|
|
|
|
for (;;)
|
|
switch (*++yyp)
|
|
{
|
|
case '\'':
|
|
case ',':
|
|
goto do_not_strip_quotes;
|
|
|
#if YYDEBUG
|
case '\\':
|
/*--------------------------------.
|
if (*++yyp != '\\')
|
| Print this symbol on YYOUTPUT. |
|
goto do_not_strip_quotes;
|
`--------------------------------*/
|
/* Fall through. */
|
|
default:
|
|
if (yyres)
|
|
yyres[yyn] = *yyp;
|
|
yyn++;
|
|
break;
|
|
|
#if defined (__STDC__) || defined (__cplusplus)
|
case '"':
|
static void
|
if (yyres)
|
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
|
yyres[yyn] = '\0';
|
#else
|
return yyn;
|
static void
|
}
|
yysymprint (yyoutput, yytype, yyvaluep)
|
do_not_strip_quotes: ;
|
FILE *yyoutput;
|
}
|
int yytype;
|
|
YYSTYPE *yyvaluep;
|
if (! yyres)
|
|
return yystrlen (yystr);
|
|
|
|
return yystpcpy (yyres, yystr) - yyres;
|
|
}
|
#endif
|
#endif
|
{
|
|
/* Pacify ``unused variable'' warnings. */
|
|
(void) yyvaluep;
|
|
|
|
if (yytype < YYNTOKENS)
|
/* Copy into YYRESULT an error message about the unexpected token
|
|
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
|
including the terminating null byte. If YYRESULT is null, do not
|
|
copy anything; just return the number of bytes that would be
|
|
copied. As a special case, return 0 if an ordinary "syntax error"
|
|
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
|
size calculation. */
|
|
static YYSIZE_T
|
|
yysyntax_error (char *yyresult, int yystate, int yychar)
|
{
|
{
|
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
|
int yyn = yypact[yystate];
|
# ifdef YYPRINT
|
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
# endif
|
return 0;
|
}
|
|
else
|
else
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
{
|
|
int yytype = YYTRANSLATE (yychar);
|
|
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
|
YYSIZE_T yysize = yysize0;
|
|
YYSIZE_T yysize1;
|
|
int yysize_overflow = 0;
|
|
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
|
int yyx;
|
|
|
switch (yytype)
|
# if 0
|
|
/* This is so xgettext sees the translatable formats that are
|
|
constructed on the fly. */
|
|
YY_("syntax error, unexpected %s");
|
|
YY_("syntax error, unexpected %s, expecting %s");
|
|
YY_("syntax error, unexpected %s, expecting %s or %s");
|
|
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
|
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
|
# endif
|
|
char *yyfmt;
|
|
char const *yyf;
|
|
static char const yyunexpected[] = "syntax error, unexpected %s";
|
|
static char const yyexpecting[] = ", expecting %s";
|
|
static char const yyor[] = " or %s";
|
|
char yyformat[sizeof yyunexpected
|
|
+ sizeof yyexpecting - 1
|
|
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
|
* (sizeof yyor - 1))];
|
|
char const *yyprefix = yyexpecting;
|
|
|
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
|
YYCHECK. */
|
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
|
|
|
/* Stay within bounds of both yycheck and yytname. */
|
|
int yychecklim = YYLAST - yyn + 1;
|
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
|
int yycount = 1;
|
|
|
|
yyarg[0] = yytname[yytype];
|
|
yyfmt = yystpcpy (yyformat, yyunexpected);
|
|
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
{
|
{
|
default:
|
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
|
{
|
|
yycount = 1;
|
|
yysize = yysize0;
|
|
yyformat[sizeof yyunexpected - 1] = '\0';
|
break;
|
break;
|
}
|
}
|
YYFPRINTF (yyoutput, ")");
|
yyarg[yycount++] = yytname[yyx];
|
|
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
|
yysize_overflow |= (yysize1 < yysize);
|
|
yysize = yysize1;
|
|
yyfmt = yystpcpy (yyfmt, yyprefix);
|
|
yyprefix = yyor;
|
}
|
}
|
|
|
#endif /* ! YYDEBUG */
|
yyf = YY_(yyformat);
|
|
yysize1 = yysize + yystrlen (yyf);
|
|
yysize_overflow |= (yysize1 < yysize);
|
|
yysize = yysize1;
|
|
|
|
if (yysize_overflow)
|
|
return YYSIZE_MAXIMUM;
|
|
|
|
if (yyresult)
|
|
{
|
|
/* Avoid sprintf, as that infringes on the user's name space.
|
|
Don't have undefined behavior even if the translation
|
|
produced a string with the wrong number of "%s"s. */
|
|
char *yyp = yyresult;
|
|
int yyi = 0;
|
|
while ((*yyp = *yyf) != '\0')
|
|
{
|
|
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
|
{
|
|
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
|
yyf += 2;
|
|
}
|
|
else
|
|
{
|
|
yyp++;
|
|
yyf++;
|
|
}
|
|
}
|
|
}
|
|
return yysize;
|
|
}
|
|
}
|
|
#endif /* YYERROR_VERBOSE */
|
|
|
|
|
/*-----------------------------------------------.
|
/*-----------------------------------------------.
|
| Release the memory associated to this symbol. |
|
| Release the memory associated to this symbol. |
|
`-----------------------------------------------*/
|
`-----------------------------------------------*/
|
|
|
#if defined (__STDC__) || defined (__cplusplus)
|
/*ARGSUSED*/
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
static void
|
static void
|
yydestruct (int yytype, YYSTYPE *yyvaluep)
|
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
|
#else
|
#else
|
static void
|
static void
|
yydestruct (yytype, yyvaluep)
|
yydestruct (yymsg, yytype, yyvaluep)
|
|
const char *yymsg;
|
int yytype;
|
int yytype;
|
YYSTYPE *yyvaluep;
|
YYSTYPE *yyvaluep;
|
#endif
|
#endif
|
{
|
{
|
/* Pacify ``unused variable'' warnings. */
|
YYUSE (yyvaluep);
|
(void) yyvaluep;
|
|
|
if (!yymsg)
|
|
yymsg = "Deleting";
|
|
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
|
|
switch (yytype)
|
switch (yytype)
|
{
|
{
|
|
|
default:
|
default:
|
break;
|
break;
|
}
|
}
|
}
|
}
|
|
|
|
|
/* Prevent warnings from -Wmissing-prototypes. */
|
/* Prevent warnings from -Wmissing-prototypes. */
|
|
|
#ifdef YYPARSE_PARAM
|
#ifdef YYPARSE_PARAM
|
# if defined (__STDC__) || defined (__cplusplus)
|
#if defined __STDC__ || defined __cplusplus
|
int yyparse (void *YYPARSE_PARAM);
|
int yyparse (void *YYPARSE_PARAM);
|
# else
|
# else
|
int yyparse ();
|
int yyparse ();
|
# endif
|
# endif
|
#else /* ! YYPARSE_PARAM */
|
#else /* ! YYPARSE_PARAM */
|
#if defined (__STDC__) || defined (__cplusplus)
|
#if defined __STDC__ || defined __cplusplus
|
int yyparse (void);
|
int yyparse (void);
|
#else
|
#else
|
int yyparse ();
|
int yyparse ();
|
#endif
|
#endif
|
#endif /* ! YYPARSE_PARAM */
|
#endif /* ! YYPARSE_PARAM */
|
|
|
|
|
|
|
/* The lookahead symbol. */
|
/* The lookahead symbol. */
|
int yychar;
|
int yychar;
|
|
|
/* The semantic value of the lookahead symbol. */
|
/* The semantic value of the lookahead symbol. */
|
YYSTYPE yylval;
|
YYSTYPE yylval;
|
Line 1051... |
Line 1396... |
/* Number of syntax errors so far. */
|
/* Number of syntax errors so far. */
|
int yynerrs;
|
int yynerrs;
|
|
|
|
|
|
|
/*----------.
|
/*-------------------------.
|
| yyparse. |
|
| yyparse or yypush_parse. |
|
`----------*/
|
`-------------------------*/
|
|
|
#ifdef YYPARSE_PARAM
|
#ifdef YYPARSE_PARAM
|
# if defined (__STDC__) || defined (__cplusplus)
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
int yyparse (void *YYPARSE_PARAM)
|
|| defined __cplusplus || defined _MSC_VER)
|
|
int
|
|
yyparse (void *YYPARSE_PARAM)
|
# else
|
# else
|
int yyparse (YYPARSE_PARAM)
|
int
|
|
yyparse (YYPARSE_PARAM)
|
void *YYPARSE_PARAM;
|
void *YYPARSE_PARAM;
|
# endif
|
# endif
|
#else /* ! YYPARSE_PARAM */
|
#else /* ! YYPARSE_PARAM */
|
#if defined (__STDC__) || defined (__cplusplus)
|
#if (defined __STDC__ || defined __C99__FUNC__ \
|
|
|| defined __cplusplus || defined _MSC_VER)
|
int
|
int
|
yyparse (void)
|
yyparse (void)
|
#else
|
#else
|
int
|
int
|
yyparse ()
|
yyparse ()
|
|
|
#endif
|
#endif
|
#endif
|
#endif
|
{
|
{
|
|
|
register int yystate;
|
|
register int yyn;
|
int yystate;
|
int yyresult;
|
|
/* Number of tokens to shift before error messages enabled. */
|
/* Number of tokens to shift before error messages enabled. */
|
int yyerrstatus;
|
int yyerrstatus;
|
/* Lookahead token as an internal (translated) token number. */
|
|
int yytoken = 0;
|
|
|
|
/* Three stacks and their tools:
|
/* The stacks and their tools:
|
`yyss': related to states,
|
`yyss': related to states.
|
`yyvs': related to semantic values,
|
`yyvs': related to semantic values.
|
`yyls': related to locations.
|
|
|
|
Refer to the stacks thru separate pointers, to allow yyoverflow
|
Refer to the stacks thru separate pointers, to allow yyoverflow
|
to xreallocate them elsewhere. */
|
to xreallocate them elsewhere. */
|
|
|
/* The state stack. */
|
/* The state stack. */
|
short yyssa[YYINITDEPTH];
|
yytype_int16 yyssa[YYINITDEPTH];
|
short *yyss = yyssa;
|
yytype_int16 *yyss;
|
register short *yyssp;
|
yytype_int16 *yyssp;
|
|
|
/* The semantic value stack. */
|
/* The semantic value stack. */
|
YYSTYPE yyvsa[YYINITDEPTH];
|
YYSTYPE yyvsa[YYINITDEPTH];
|
YYSTYPE *yyvs = yyvsa;
|
YYSTYPE *yyvs;
|
register YYSTYPE *yyvsp;
|
YYSTYPE *yyvsp;
|
|
|
|
|
|
YYSIZE_T yystacksize;
|
|
|
#define YYPOPSTACK (yyvsp--, yyssp--)
|
int yyn;
|
|
int yyresult;
|
YYSIZE_T yystacksize = YYINITDEPTH;
|
/* Lookahead token as an internal (translated) token number. */
|
|
int yytoken;
|
/* The variables used to return semantic value and location from the
|
/* The variables used to return semantic value and location from the
|
action routines. */
|
action routines. */
|
YYSTYPE yyval;
|
YYSTYPE yyval;
|
|
|
|
#if YYERROR_VERBOSE
|
/* When reducing, the number of symbols on the RHS of the reduced
|
/* Buffer for error messages, and its allocated size. */
|
rule. */
|
char yymsgbuf[128];
|
int yylen;
|
char *yymsg = yymsgbuf;
|
|
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
|
#endif
|
|
|
|
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
|
|
|
|
/* The number of symbols on the RHS of the reduced rule.
|
|
Keep to zero when no symbol should be popped. */
|
|
int yylen = 0;
|
|
|
|
yytoken = 0;
|
|
yyss = yyssa;
|
|
yyvs = yyvsa;
|
|
yystacksize = YYINITDEPTH;
|
|
|
YYDPRINTF ((stderr, "Starting parse\n"));
|
YYDPRINTF ((stderr, "Starting parse\n"));
|
|
|
yystate = 0;
|
yystate = 0;
|
yyerrstatus = 0;
|
yyerrstatus = 0;
|
Line 1126... |
Line 1484... |
|
|
/* Initialize stack pointers.
|
/* Initialize stack pointers.
|
Waste one element of value and location stack
|
Waste one element of value and location stack
|
so that they stay on the same level as the state stack.
|
so that they stay on the same level as the state stack.
|
The wasted elements are never initialized. */
|
The wasted elements are never initialized. */
|
|
|
yyssp = yyss;
|
yyssp = yyss;
|
yyvsp = yyvs;
|
yyvsp = yyvs;
|
|
|
goto yysetstate;
|
goto yysetstate;
|
|
|
/*------------------------------------------------------------.
|
/*------------------------------------------------------------.
|
| yynewstate -- Push a new state, which is found in yystate. |
|
| yynewstate -- Push a new state, which is found in yystate. |
|
`------------------------------------------------------------*/
|
`------------------------------------------------------------*/
|
yynewstate:
|
yynewstate:
|
/* In all cases, when you get here, the value and location stacks
|
/* In all cases, when you get here, the value and location stacks
|
have just been pushed. so pushing a state here evens the stacks.
|
have just been pushed. So pushing a state here evens the stacks. */
|
*/
|
|
yyssp++;
|
yyssp++;
|
|
|
yysetstate:
|
yysetstate:
|
*yyssp = yystate;
|
*yyssp = yystate;
|
|
|
Line 1155... |
Line 1511... |
{
|
{
|
/* Give user a chance to xreallocate the stack. Use copies of
|
/* Give user a chance to xreallocate the stack. Use copies of
|
these so that the &'s don't force the real ones into
|
these so that the &'s don't force the real ones into
|
memory. */
|
memory. */
|
YYSTYPE *yyvs1 = yyvs;
|
YYSTYPE *yyvs1 = yyvs;
|
short *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
|
be undefined if yyoverflow is a macro. */
|
be undefined if yyoverflow is a macro. */
|
yyoverflow ("parser stack overflow",
|
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;
|
yyvs = yyvs1;
|
yyvs = yyvs1;
|
}
|
}
|
#else /* no yyoverflow */
|
#else /* no yyoverflow */
|
# ifndef YYSTACK_RELOCATE
|
# ifndef YYSTACK_RELOCATE
|
goto yyoverflowlab;
|
goto yyexhaustedlab;
|
# else
|
# else
|
/* Extend the stack our own way. */
|
/* Extend the stack our own way. */
|
if (YYMAXDEPTH <= yystacksize)
|
if (YYMAXDEPTH <= yystacksize)
|
goto yyoverflowlab;
|
goto yyexhaustedlab;
|
yystacksize *= 2;
|
yystacksize *= 2;
|
if (YYMAXDEPTH < yystacksize)
|
if (YYMAXDEPTH < yystacksize)
|
yystacksize = YYMAXDEPTH;
|
yystacksize = YYMAXDEPTH;
|
|
|
{
|
{
|
short *yyss1 = yyss;
|
yytype_int16 *yyss1 = yyss;
|
union yyalloc *yyptr =
|
union yyalloc *yyptr =
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
if (! yyptr)
|
if (! yyptr)
|
goto yyoverflowlab;
|
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);
|
}
|
}
|
# endif
|
# endif
|
#endif /* no yyoverflow */
|
#endif /* no yyoverflow */
|
|
|
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));
|
|
|
if (yyss + yystacksize - 1 <= yyssp)
|
if (yyss + yystacksize - 1 <= yyssp)
|
YYABORT;
|
YYABORT;
|
}
|
}
|
|
|
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
|
|
|
if (yystate == YYFINAL)
|
|
YYACCEPT;
|
|
|
goto yybackup;
|
goto yybackup;
|
|
|
/*-----------.
|
/*-----------.
|
| yybackup. |
|
| yybackup. |
|
`-----------*/
|
`-----------*/
|
yybackup:
|
yybackup:
|
|
|
/* Do appropriate processing given the current state. */
|
/* Do appropriate processing given the current state. Read a
|
/* Read a lookahead token if we need one and don't already have one. */
|
lookahead token if we need one and don't already have one. */
|
/* yyresume: */
|
|
|
|
/* First try to decide what to do without reference to lookahead token. */
|
/* First try to decide what to do without reference to lookahead token. */
|
|
|
yyn = yypact[yystate];
|
yyn = yypact[yystate];
|
if (yyn == YYPACT_NINF)
|
if (yyn == YYPACT_NINF)
|
goto yydefault;
|
goto yydefault;
|
|
|
/* Not known => get a lookahead token if don't already have one. */
|
/* Not known => get a lookahead token if don't already have one. */
|
Line 1245... |
Line 1598... |
YYDPRINTF ((stderr, "Now at end of input.\n"));
|
YYDPRINTF ((stderr, "Now at end of input.\n"));
|
}
|
}
|
else
|
else
|
{
|
{
|
yytoken = YYTRANSLATE (yychar);
|
yytoken = YYTRANSLATE (yychar);
|
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
|
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
}
|
}
|
|
|
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
detect an error, take that action. */
|
detect an error, take that action. */
|
yyn += yytoken;
|
yyn += yytoken;
|
Line 1262... |
Line 1615... |
goto yyerrlab;
|
goto yyerrlab;
|
yyn = -yyn;
|
yyn = -yyn;
|
goto yyreduce;
|
goto yyreduce;
|
}
|
}
|
|
|
if (yyn == YYFINAL)
|
/* Count tokens shifted since error; after three, turn off error
|
YYACCEPT;
|
status. */
|
|
if (yyerrstatus)
|
|
yyerrstatus--;
|
|
|
/* Shift the lookahead token. */
|
/* Shift the lookahead token. */
|
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
|
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
|
|
/* Discard the token being shifted unless it is eof. */
|
/* Discard the shifted token. */
|
if (yychar != YYEOF)
|
|
yychar = YYEMPTY;
|
yychar = YYEMPTY;
|
|
|
|
yystate = yyn;
|
*++yyvsp = yylval;
|
*++yyvsp = yylval;
|
|
|
|
|
/* Count tokens shifted since error; after three, turn off error
|
|
status. */
|
|
if (yyerrstatus)
|
|
yyerrstatus--;
|
|
|
|
yystate = yyn;
|
|
goto yynewstate;
|
goto yynewstate;
|
|
|
|
|
/*-----------------------------------------------------------.
|
/*-----------------------------------------------------------.
|
| yydefault -- do the default action for the current state. |
|
| yydefault -- do the default action for the current state. |
|
Line 1316... |
Line 1664... |
|
|
YY_REDUCE_PRINT (yyn);
|
YY_REDUCE_PRINT (yyn);
|
switch (yyn)
|
switch (yyn)
|
{
|
{
|
case 2:
|
case 2:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 235 "p-exp.y"
|
#line 235 "p-exp.y"
|
{ current_type = NULL;
|
{ current_type = NULL;
|
search_field = 0;
|
search_field = 0;
|
leftdiv_is_integer = 0;
|
leftdiv_is_integer = 0;
|
}
|
}
|
break;
|
break;
|
|
|
case 3:
|
case 3:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 239 "p-exp.y"
|
#line 239 "p-exp.y"
|
{}
|
{}
|
break;
|
break;
|
|
|
case 6:
|
case 6:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 248 "p-exp.y"
|
#line 248 "p-exp.y"
|
{ write_exp_elt_opcode(OP_TYPE);
|
{ write_exp_elt_opcode(OP_TYPE);
|
write_exp_elt_type(yyvsp[0].tval);
|
write_exp_elt_type((yyvsp[(1) - (1)].tval));
|
write_exp_elt_opcode(OP_TYPE);
|
write_exp_elt_opcode(OP_TYPE);
|
current_type = yyvsp[0].tval; }
|
current_type = (yyvsp[(1) - (1)].tval); }
|
break;
|
break;
|
|
|
case 8:
|
case 8:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 256 "p-exp.y"
|
#line 256 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_COMMA); }
|
{ write_exp_elt_opcode (BINOP_COMMA); }
|
break;
|
break;
|
|
|
case 9:
|
case 9:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 261 "p-exp.y"
|
#line 261 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_IND);
|
{ write_exp_elt_opcode (UNOP_IND);
|
if (current_type)
|
if (current_type)
|
current_type = TYPE_TARGET_TYPE (current_type); }
|
current_type = TYPE_TARGET_TYPE (current_type); }
|
break;
|
break;
|
|
|
case 10:
|
case 10:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 267 "p-exp.y"
|
#line 267 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_ADDR);
|
{ write_exp_elt_opcode (UNOP_ADDR);
|
if (current_type)
|
if (current_type)
|
current_type = TYPE_POINTER_TYPE (current_type); }
|
current_type = TYPE_POINTER_TYPE (current_type); }
|
break;
|
break;
|
|
|
case 11:
|
case 11:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 273 "p-exp.y"
|
#line 273 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_NEG); }
|
{ write_exp_elt_opcode (UNOP_NEG); }
|
break;
|
break;
|
|
|
case 12:
|
case 12:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 277 "p-exp.y"
|
#line 277 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
|
{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
|
break;
|
break;
|
|
|
case 13:
|
case 13:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 281 "p-exp.y"
|
#line 281 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_PREINCREMENT); }
|
{ write_exp_elt_opcode (UNOP_PREINCREMENT); }
|
break;
|
break;
|
|
|
case 14:
|
case 14:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 285 "p-exp.y"
|
#line 285 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_PREDECREMENT); }
|
{ write_exp_elt_opcode (UNOP_PREDECREMENT); }
|
break;
|
break;
|
|
|
case 15:
|
case 15:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 288 "p-exp.y"
|
#line 288 "p-exp.y"
|
{ search_field = 1; }
|
{ search_field = 1; }
|
break;
|
break;
|
|
|
case 16:
|
case 16:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 291 "p-exp.y"
|
#line 291 "p-exp.y"
|
{ write_exp_elt_opcode (STRUCTOP_STRUCT);
|
{ write_exp_elt_opcode (STRUCTOP_STRUCT);
|
write_exp_string (yyvsp[0].sval);
|
write_exp_string ((yyvsp[(4) - (4)].sval));
|
write_exp_elt_opcode (STRUCTOP_STRUCT);
|
write_exp_elt_opcode (STRUCTOP_STRUCT);
|
search_field = 0;
|
search_field = 0;
|
if (current_type)
|
if (current_type)
|
{ while (TYPE_CODE (current_type) == TYPE_CODE_PTR)
|
{ while (TYPE_CODE (current_type) == TYPE_CODE_PTR)
|
current_type = TYPE_TARGET_TYPE (current_type);
|
current_type = TYPE_TARGET_TYPE (current_type);
|
current_type = lookup_struct_elt_type (
|
current_type = lookup_struct_elt_type (
|
current_type, yyvsp[0].sval.ptr, 0); };
|
current_type, (yyvsp[(4) - (4)].sval).ptr, 0); };
|
}
|
}
|
break;
|
break;
|
|
|
case 17:
|
case 17:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 303 "p-exp.y"
|
#line 303 "p-exp.y"
|
{ char *arrayname;
|
{ char *arrayname;
|
int arrayfieldindex;
|
int arrayfieldindex;
|
arrayfieldindex = is_pascal_string_type (
|
arrayfieldindex = is_pascal_string_type (
|
current_type, NULL, NULL,
|
current_type, NULL, NULL,
|
Line 1417... |
Line 1791... |
}
|
}
|
push_current_type (); }
|
push_current_type (); }
|
break;
|
break;
|
|
|
case 18:
|
case 18:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 322 "p-exp.y"
|
#line 322 "p-exp.y"
|
{ pop_current_type ();
|
{ pop_current_type ();
|
write_exp_elt_opcode (BINOP_SUBSCRIPT);
|
write_exp_elt_opcode (BINOP_SUBSCRIPT);
|
if (current_type)
|
if (current_type)
|
current_type = TYPE_TARGET_TYPE (current_type); }
|
current_type = TYPE_TARGET_TYPE (current_type); }
|
break;
|
break;
|
|
|
case 19:
|
case 19:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 331 "p-exp.y"
|
#line 331 "p-exp.y"
|
{ push_current_type ();
|
{ push_current_type ();
|
start_arglist (); }
|
start_arglist (); }
|
break;
|
break;
|
|
|
case 20:
|
case 20:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 334 "p-exp.y"
|
#line 334 "p-exp.y"
|
{ write_exp_elt_opcode (OP_FUNCALL);
|
{ write_exp_elt_opcode (OP_FUNCALL);
|
write_exp_elt_longcst ((LONGEST) end_arglist ());
|
write_exp_elt_longcst ((LONGEST) end_arglist ());
|
write_exp_elt_opcode (OP_FUNCALL);
|
write_exp_elt_opcode (OP_FUNCALL);
|
pop_current_type ();
|
pop_current_type ();
|
Line 1442... |
Line 1822... |
current_type = TYPE_TARGET_TYPE (current_type);
|
current_type = TYPE_TARGET_TYPE (current_type);
|
}
|
}
|
break;
|
break;
|
|
|
case 22:
|
case 22:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 345 "p-exp.y"
|
#line 345 "p-exp.y"
|
{ arglist_len = 1; }
|
{ arglist_len = 1; }
|
break;
|
break;
|
|
|
case 23:
|
case 23:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 347 "p-exp.y"
|
#line 347 "p-exp.y"
|
{ arglist_len++; }
|
{ arglist_len++; }
|
break;
|
break;
|
|
|
case 24:
|
case 24:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 351 "p-exp.y"
|
#line 351 "p-exp.y"
|
{ if (current_type)
|
{ if (current_type)
|
{
|
{
|
/* Allow automatic dereference of classes. */
|
/* Allow automatic dereference of classes. */
|
if ((TYPE_CODE (current_type) == TYPE_CODE_PTR)
|
if ((TYPE_CODE (current_type) == TYPE_CODE_PTR)
|
&& (TYPE_CODE (TYPE_TARGET_TYPE (current_type)) == TYPE_CODE_CLASS)
|
&& (TYPE_CODE (TYPE_TARGET_TYPE (current_type)) == TYPE_CODE_CLASS)
|
&& (TYPE_CODE (yyvsp[-3].tval) == TYPE_CODE_CLASS))
|
&& (TYPE_CODE ((yyvsp[(1) - (4)].tval)) == TYPE_CODE_CLASS))
|
write_exp_elt_opcode (UNOP_IND);
|
write_exp_elt_opcode (UNOP_IND);
|
}
|
}
|
write_exp_elt_opcode (UNOP_CAST);
|
write_exp_elt_opcode (UNOP_CAST);
|
write_exp_elt_type (yyvsp[-3].tval);
|
write_exp_elt_type ((yyvsp[(1) - (4)].tval));
|
write_exp_elt_opcode (UNOP_CAST);
|
write_exp_elt_opcode (UNOP_CAST);
|
current_type = yyvsp[-3].tval; }
|
current_type = (yyvsp[(1) - (4)].tval); }
|
break;
|
break;
|
|
|
case 25:
|
case 25:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 366 "p-exp.y"
|
#line 366 "p-exp.y"
|
{ }
|
{ }
|
break;
|
break;
|
|
|
case 26:
|
case 26:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 372 "p-exp.y"
|
#line 372 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_MUL); }
|
{ write_exp_elt_opcode (BINOP_MUL); }
|
break;
|
break;
|
|
|
case 27:
|
case 27:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 375 "p-exp.y"
|
#line 375 "p-exp.y"
|
{
|
{
|
if (current_type && is_integral_type (current_type))
|
if (current_type && is_integral_type (current_type))
|
leftdiv_is_integer = 1;
|
leftdiv_is_integer = 1;
|
}
|
}
|
break;
|
break;
|
|
|
case 28:
|
case 28:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 380 "p-exp.y"
|
#line 380 "p-exp.y"
|
{
|
{
|
if (leftdiv_is_integer && current_type
|
if (leftdiv_is_integer && current_type
|
&& is_integral_type (current_type))
|
&& is_integral_type (current_type))
|
{
|
{
|
Line 1503... |
Line 1897... |
write_exp_elt_opcode (BINOP_DIV);
|
write_exp_elt_opcode (BINOP_DIV);
|
}
|
}
|
break;
|
break;
|
|
|
case 29:
|
case 29:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 396 "p-exp.y"
|
#line 396 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_INTDIV); }
|
{ write_exp_elt_opcode (BINOP_INTDIV); }
|
break;
|
break;
|
|
|
case 30:
|
case 30:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 400 "p-exp.y"
|
#line 400 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_REM); }
|
{ write_exp_elt_opcode (BINOP_REM); }
|
break;
|
break;
|
|
|
case 31:
|
case 31:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 404 "p-exp.y"
|
#line 404 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_ADD); }
|
{ write_exp_elt_opcode (BINOP_ADD); }
|
break;
|
break;
|
|
|
case 32:
|
case 32:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 408 "p-exp.y"
|
#line 408 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_SUB); }
|
{ write_exp_elt_opcode (BINOP_SUB); }
|
break;
|
break;
|
|
|
case 33:
|
case 33:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 412 "p-exp.y"
|
#line 412 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_LSH); }
|
{ write_exp_elt_opcode (BINOP_LSH); }
|
break;
|
break;
|
|
|
case 34:
|
case 34:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 416 "p-exp.y"
|
#line 416 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_RSH); }
|
{ write_exp_elt_opcode (BINOP_RSH); }
|
break;
|
break;
|
|
|
case 35:
|
case 35:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 420 "p-exp.y"
|
#line 420 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_EQUAL);
|
{ write_exp_elt_opcode (BINOP_EQUAL);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 36:
|
case 36:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 426 "p-exp.y"
|
#line 426 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_NOTEQUAL);
|
{ write_exp_elt_opcode (BINOP_NOTEQUAL);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 37:
|
case 37:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 432 "p-exp.y"
|
#line 432 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_LEQ);
|
{ write_exp_elt_opcode (BINOP_LEQ);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 38:
|
case 38:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 438 "p-exp.y"
|
#line 438 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_GEQ);
|
{ write_exp_elt_opcode (BINOP_GEQ);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 39:
|
case 39:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 444 "p-exp.y"
|
#line 444 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_LESS);
|
{ write_exp_elt_opcode (BINOP_LESS);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 40:
|
case 40:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 450 "p-exp.y"
|
#line 450 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_GTR);
|
{ write_exp_elt_opcode (BINOP_GTR);
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
}
|
}
|
break;
|
break;
|
|
|
case 41:
|
case 41:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 456 "p-exp.y"
|
#line 456 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_BITWISE_AND); }
|
{ write_exp_elt_opcode (BINOP_BITWISE_AND); }
|
break;
|
break;
|
|
|
case 42:
|
case 42:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 460 "p-exp.y"
|
#line 460 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_BITWISE_XOR); }
|
{ write_exp_elt_opcode (BINOP_BITWISE_XOR); }
|
break;
|
break;
|
|
|
case 43:
|
case 43:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 464 "p-exp.y"
|
#line 464 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_BITWISE_IOR); }
|
{ write_exp_elt_opcode (BINOP_BITWISE_IOR); }
|
break;
|
break;
|
|
|
case 44:
|
case 44:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 468 "p-exp.y"
|
#line 468 "p-exp.y"
|
{ write_exp_elt_opcode (BINOP_ASSIGN); }
|
{ write_exp_elt_opcode (BINOP_ASSIGN); }
|
break;
|
break;
|
|
|
case 45:
|
case 45:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 472 "p-exp.y"
|
#line 472 "p-exp.y"
|
{ write_exp_elt_opcode (OP_BOOL);
|
{ write_exp_elt_opcode (OP_BOOL);
|
write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
|
write_exp_elt_longcst ((LONGEST) (yyvsp[(1) - (1)].lval));
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
write_exp_elt_opcode (OP_BOOL); }
|
write_exp_elt_opcode (OP_BOOL); }
|
break;
|
break;
|
|
|
case 46:
|
case 46:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 479 "p-exp.y"
|
#line 479 "p-exp.y"
|
{ write_exp_elt_opcode (OP_BOOL);
|
{ write_exp_elt_opcode (OP_BOOL);
|
write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
|
write_exp_elt_longcst ((LONGEST) (yyvsp[(1) - (1)].lval));
|
current_type = parse_type->builtin_bool;
|
current_type = parse_type->builtin_bool;
|
write_exp_elt_opcode (OP_BOOL); }
|
write_exp_elt_opcode (OP_BOOL); }
|
break;
|
break;
|
|
|
case 47:
|
case 47:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 486 "p-exp.y"
|
#line 486 "p-exp.y"
|
{ write_exp_elt_opcode (OP_LONG);
|
{ write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_type (yyvsp[0].typed_val_int.type);
|
write_exp_elt_type ((yyvsp[(1) - (1)].typed_val_int).type);
|
current_type = yyvsp[0].typed_val_int.type;
|
current_type = (yyvsp[(1) - (1)].typed_val_int).type;
|
write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val_int.val));
|
write_exp_elt_longcst ((LONGEST)((yyvsp[(1) - (1)].typed_val_int).val));
|
write_exp_elt_opcode (OP_LONG); }
|
write_exp_elt_opcode (OP_LONG); }
|
break;
|
break;
|
|
|
case 48:
|
case 48:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 494 "p-exp.y"
|
#line 494 "p-exp.y"
|
{ YYSTYPE val;
|
{ YYSTYPE val;
|
parse_number (yyvsp[0].ssym.stoken.ptr, yyvsp[0].ssym.stoken.length, 0, &val);
|
parse_number ((yyvsp[(1) - (1)].ssym).stoken.ptr, (yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_type (val.typed_val_int.type);
|
write_exp_elt_type (val.typed_val_int.type);
|
current_type = val.typed_val_int.type;
|
current_type = val.typed_val_int.type;
|
write_exp_elt_longcst ((LONGEST)val.typed_val_int.val);
|
write_exp_elt_longcst ((LONGEST)val.typed_val_int.val);
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
}
|
}
|
break;
|
break;
|
|
|
case 49:
|
case 49:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 506 "p-exp.y"
|
#line 506 "p-exp.y"
|
{ write_exp_elt_opcode (OP_DOUBLE);
|
{ write_exp_elt_opcode (OP_DOUBLE);
|
write_exp_elt_type (yyvsp[0].typed_val_float.type);
|
write_exp_elt_type ((yyvsp[(1) - (1)].typed_val_float).type);
|
current_type = yyvsp[0].typed_val_float.type;
|
current_type = (yyvsp[(1) - (1)].typed_val_float).type;
|
write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval);
|
write_exp_elt_dblcst ((yyvsp[(1) - (1)].typed_val_float).dval);
|
write_exp_elt_opcode (OP_DOUBLE); }
|
write_exp_elt_opcode (OP_DOUBLE); }
|
break;
|
break;
|
|
|
case 52:
|
case 52:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 521 "p-exp.y"
|
#line 521 "p-exp.y"
|
{ write_exp_elt_opcode (OP_LONG);
|
{ write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_type (parse_type->builtin_int);
|
write_exp_elt_type (parse_type->builtin_int);
|
CHECK_TYPEDEF (yyvsp[-1].tval);
|
CHECK_TYPEDEF ((yyvsp[(3) - (4)].tval));
|
write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
|
write_exp_elt_longcst ((LONGEST) TYPE_LENGTH ((yyvsp[(3) - (4)].tval)));
|
write_exp_elt_opcode (OP_LONG); }
|
write_exp_elt_opcode (OP_LONG); }
|
break;
|
break;
|
|
|
case 53:
|
case 53:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 529 "p-exp.y"
|
#line 529 "p-exp.y"
|
{ write_exp_elt_opcode (UNOP_SIZEOF); }
|
{ write_exp_elt_opcode (UNOP_SIZEOF); }
|
break;
|
break;
|
|
|
case 54:
|
case 54:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 532 "p-exp.y"
|
#line 532 "p-exp.y"
|
{ /* C strings are converted into array constants with
|
{ /* C strings are converted into array constants with
|
an explicit null byte added at the end. Thus
|
an explicit null byte added at the end. Thus
|
the array upper bound is the string length.
|
the array upper bound is the string length.
|
There is no such thing in C as a completely empty
|
There is no such thing in C as a completely empty
|
string. */
|
string. */
|
char *sp = yyvsp[0].sval.ptr; int count = yyvsp[0].sval.length;
|
char *sp = (yyvsp[(1) - (1)].sval).ptr; int count = (yyvsp[(1) - (1)].sval).length;
|
while (count-- > 0)
|
while (count-- > 0)
|
{
|
{
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_type (parse_type->builtin_char);
|
write_exp_elt_type (parse_type->builtin_char);
|
write_exp_elt_longcst ((LONGEST)(*sp++));
|
write_exp_elt_longcst ((LONGEST)(*sp++));
|
Line 1675... |
Line 2117... |
write_exp_elt_type (parse_type->builtin_char);
|
write_exp_elt_type (parse_type->builtin_char);
|
write_exp_elt_longcst ((LONGEST)'\0');
|
write_exp_elt_longcst ((LONGEST)'\0');
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_ARRAY);
|
write_exp_elt_opcode (OP_ARRAY);
|
write_exp_elt_longcst ((LONGEST) 0);
|
write_exp_elt_longcst ((LONGEST) 0);
|
write_exp_elt_longcst ((LONGEST) (yyvsp[0].sval.length));
|
write_exp_elt_longcst ((LONGEST) ((yyvsp[(1) - (1)].sval).length));
|
write_exp_elt_opcode (OP_ARRAY); }
|
write_exp_elt_opcode (OP_ARRAY); }
|
break;
|
break;
|
|
|
case 55:
|
case 55:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 557 "p-exp.y"
|
#line 557 "p-exp.y"
|
{
|
{
|
struct value * this_val;
|
struct value * this_val;
|
struct type * this_type;
|
struct type * this_type;
|
write_exp_elt_opcode (OP_THIS);
|
write_exp_elt_opcode (OP_THIS);
|
Line 1706... |
Line 2150... |
current_type = this_type;
|
current_type = this_type;
|
}
|
}
|
break;
|
break;
|
|
|
case 56:
|
case 56:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 584 "p-exp.y"
|
#line 584 "p-exp.y"
|
{
|
{
|
if (yyvsp[0].ssym.sym != 0)
|
if ((yyvsp[(1) - (1)].ssym).sym != 0)
|
yyval.bval = SYMBOL_BLOCK_VALUE (yyvsp[0].ssym.sym);
|
(yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym);
|
else
|
else
|
{
|
{
|
struct symtab *tem =
|
struct symtab *tem =
|
lookup_symtab (copy_name (yyvsp[0].ssym.stoken));
|
lookup_symtab (copy_name ((yyvsp[(1) - (1)].ssym).stoken));
|
if (tem)
|
if (tem)
|
yyval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), STATIC_BLOCK);
|
(yyval.bval) = BLOCKVECTOR_BLOCK (BLOCKVECTOR (tem), STATIC_BLOCK);
|
else
|
else
|
error ("No file or function \"%s\".",
|
error ("No file or function \"%s\".",
|
copy_name (yyvsp[0].ssym.stoken));
|
copy_name ((yyvsp[(1) - (1)].ssym).stoken));
|
}
|
}
|
}
|
}
|
break;
|
break;
|
|
|
case 57:
|
case 57:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 601 "p-exp.y"
|
#line 601 "p-exp.y"
|
{ struct symbol *tem
|
{ struct symbol *tem
|
= lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
|
= lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
|
VAR_DOMAIN, (int *) NULL);
|
VAR_DOMAIN, (int *) NULL);
|
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
|
if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
|
error ("No function \"%s\" in specified context.",
|
error ("No function \"%s\" in specified context.",
|
copy_name (yyvsp[0].sval));
|
copy_name ((yyvsp[(3) - (3)].sval)));
|
yyval.bval = SYMBOL_BLOCK_VALUE (tem); }
|
(yyval.bval) = SYMBOL_BLOCK_VALUE (tem); }
|
break;
|
break;
|
|
|
case 58:
|
case 58:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 611 "p-exp.y"
|
#line 611 "p-exp.y"
|
{ struct symbol *sym;
|
{ struct symbol *sym;
|
sym = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
|
sym = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
|
VAR_DOMAIN, (int *) NULL);
|
VAR_DOMAIN, (int *) NULL);
|
if (sym == 0)
|
if (sym == 0)
|
error ("No symbol \"%s\" in specified context.",
|
error ("No symbol \"%s\" in specified context.",
|
copy_name (yyvsp[0].sval));
|
copy_name ((yyvsp[(3) - (3)].sval)));
|
|
|
write_exp_elt_opcode (OP_VAR_VALUE);
|
write_exp_elt_opcode (OP_VAR_VALUE);
|
/* block_found is set by lookup_symbol. */
|
/* block_found is set by lookup_symbol. */
|
write_exp_elt_block (block_found);
|
write_exp_elt_block (block_found);
|
write_exp_elt_sym (sym);
|
write_exp_elt_sym (sym);
|
write_exp_elt_opcode (OP_VAR_VALUE); }
|
write_exp_elt_opcode (OP_VAR_VALUE); }
|
break;
|
break;
|
|
|
case 59:
|
case 59:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 626 "p-exp.y"
|
#line 626 "p-exp.y"
|
{
|
{
|
struct type *type = yyvsp[-2].tval;
|
struct type *type = (yyvsp[(1) - (3)].tval);
|
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
|
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
|
&& TYPE_CODE (type) != TYPE_CODE_UNION)
|
&& TYPE_CODE (type) != TYPE_CODE_UNION)
|
error ("`%s' is not defined as an aggregate type.",
|
error ("`%s' is not defined as an aggregate type.",
|
TYPE_NAME (type));
|
TYPE_NAME (type));
|
|
|
write_exp_elt_opcode (OP_SCOPE);
|
write_exp_elt_opcode (OP_SCOPE);
|
write_exp_elt_type (type);
|
write_exp_elt_type (type);
|
write_exp_string (yyvsp[0].sval);
|
write_exp_string ((yyvsp[(3) - (3)].sval));
|
write_exp_elt_opcode (OP_SCOPE);
|
write_exp_elt_opcode (OP_SCOPE);
|
}
|
}
|
break;
|
break;
|
|
|
case 61:
|
case 61:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 642 "p-exp.y"
|
#line 642 "p-exp.y"
|
{
|
{
|
char *name = copy_name (yyvsp[0].sval);
|
char *name = copy_name ((yyvsp[(2) - (2)].sval));
|
struct symbol *sym;
|
struct symbol *sym;
|
struct minimal_symbol *msymbol;
|
struct minimal_symbol *msymbol;
|
|
|
sym =
|
sym =
|
lookup_symbol (name, (const struct block *) NULL,
|
lookup_symbol (name, (const struct block *) NULL,
|
Line 1796... |
Line 2250... |
error ("No symbol \"%s\" in current context.", name);
|
error ("No symbol \"%s\" in current context.", name);
|
}
|
}
|
break;
|
break;
|
|
|
case 62:
|
case 62:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 670 "p-exp.y"
|
#line 670 "p-exp.y"
|
{ struct symbol *sym = yyvsp[0].ssym.sym;
|
{ struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
|
|
|
if (sym)
|
if (sym)
|
{
|
{
|
if (symbol_read_needs_frame (sym))
|
if (symbol_read_needs_frame (sym))
|
{
|
{
|
Line 1817... |
Line 2273... |
be in the same block. */
|
be in the same block. */
|
write_exp_elt_block (NULL);
|
write_exp_elt_block (NULL);
|
write_exp_elt_sym (sym);
|
write_exp_elt_sym (sym);
|
write_exp_elt_opcode (OP_VAR_VALUE);
|
write_exp_elt_opcode (OP_VAR_VALUE);
|
current_type = sym->type; }
|
current_type = sym->type; }
|
else if (yyvsp[0].ssym.is_a_field_of_this)
|
else if ((yyvsp[(1) - (1)].ssym).is_a_field_of_this)
|
{
|
{
|
struct value * this_val;
|
struct value * this_val;
|
struct type * this_type;
|
struct type * this_type;
|
/* Object pascal: it hangs off of `this'. Must
|
/* Object pascal: it hangs off of `this'. Must
|
not inadvertently convert from a method call
|
not inadvertently convert from a method call
|
Line 1831... |
Line 2287... |
innermost_block))
|
innermost_block))
|
innermost_block = block_found;
|
innermost_block = block_found;
|
write_exp_elt_opcode (OP_THIS);
|
write_exp_elt_opcode (OP_THIS);
|
write_exp_elt_opcode (OP_THIS);
|
write_exp_elt_opcode (OP_THIS);
|
write_exp_elt_opcode (STRUCTOP_PTR);
|
write_exp_elt_opcode (STRUCTOP_PTR);
|
write_exp_string (yyvsp[0].ssym.stoken);
|
write_exp_string ((yyvsp[(1) - (1)].ssym).stoken);
|
write_exp_elt_opcode (STRUCTOP_PTR);
|
write_exp_elt_opcode (STRUCTOP_PTR);
|
/* we need type of this */
|
/* we need type of this */
|
this_val = value_of_this (0);
|
this_val = value_of_this (0);
|
if (this_val)
|
if (this_val)
|
this_type = value_type (this_val);
|
this_type = value_type (this_val);
|
else
|
else
|
this_type = NULL;
|
this_type = NULL;
|
if (this_type)
|
if (this_type)
|
current_type = lookup_struct_elt_type (
|
current_type = lookup_struct_elt_type (
|
this_type,
|
this_type,
|
copy_name (yyvsp[0].ssym.stoken), 0);
|
copy_name ((yyvsp[(1) - (1)].ssym).stoken), 0);
|
else
|
else
|
current_type = NULL;
|
current_type = NULL;
|
}
|
}
|
else
|
else
|
{
|
{
|
struct minimal_symbol *msymbol;
|
struct minimal_symbol *msymbol;
|
char *arg = copy_name (yyvsp[0].ssym.stoken);
|
char *arg = copy_name ((yyvsp[(1) - (1)].ssym).stoken);
|
|
|
msymbol =
|
msymbol =
|
lookup_minimal_symbol (arg, NULL, NULL);
|
lookup_minimal_symbol (arg, NULL, NULL);
|
if (msymbol != NULL)
|
if (msymbol != NULL)
|
write_exp_msymbol (msymbol);
|
write_exp_msymbol (msymbol);
|
else if (!have_full_symbols () && !have_partial_symbols ())
|
else if (!have_full_symbols () && !have_partial_symbols ())
|
error ("No symbol table is loaded. Use the \"file\" command.");
|
error ("No symbol table is loaded. Use the \"file\" command.");
|
else
|
else
|
error ("No symbol \"%s\" in current context.",
|
error ("No symbol \"%s\" in current context.",
|
copy_name (yyvsp[0].ssym.stoken));
|
copy_name ((yyvsp[(1) - (1)].ssym).stoken));
|
}
|
}
|
}
|
}
|
break;
|
break;
|
|
|
case 65:
|
case 65:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 754 "p-exp.y"
|
#line 754 "p-exp.y"
|
{ yyval.tval = lookup_pointer_type (yyvsp[0].tval); }
|
{ (yyval.tval) = lookup_pointer_type ((yyvsp[(2) - (2)].tval)); }
|
break;
|
break;
|
|
|
case 66:
|
case 66:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 756 "p-exp.y"
|
#line 756 "p-exp.y"
|
{ yyval.tval = yyvsp[0].tsym.type; }
|
{ (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
|
break;
|
break;
|
|
|
case 67:
|
case 67:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 758 "p-exp.y"
|
#line 758 "p-exp.y"
|
{ yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
|
{ (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
|
expression_context_block); }
|
expression_context_block); }
|
break;
|
break;
|
|
|
case 68:
|
case 68:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 761 "p-exp.y"
|
#line 761 "p-exp.y"
|
{ yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
|
{ (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
|
expression_context_block); }
|
expression_context_block); }
|
break;
|
break;
|
|
|
case 69:
|
case 69:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 768 "p-exp.y"
|
#line 768 "p-exp.y"
|
{ yyval.sval = yyvsp[0].ssym.stoken; }
|
{ (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
|
break;
|
break;
|
|
|
case 70:
|
case 70:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 769 "p-exp.y"
|
#line 769 "p-exp.y"
|
{ yyval.sval = yyvsp[0].ssym.stoken; }
|
{ (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
|
break;
|
break;
|
|
|
case 71:
|
case 71:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 770 "p-exp.y"
|
#line 770 "p-exp.y"
|
{ yyval.sval = yyvsp[0].tsym.stoken; }
|
{ (yyval.sval) = (yyvsp[(1) - (1)].tsym).stoken; }
|
break;
|
break;
|
|
|
case 72:
|
case 72:
|
|
|
|
/* Line 1455 of yacc.c */
|
#line 771 "p-exp.y"
|
#line 771 "p-exp.y"
|
{ yyval.sval = yyvsp[0].ssym.stoken; }
|
{ (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
|
break;
|
break;
|
|
|
|
|
}
|
|
|
|
/* Line 1000 of yacc.c. */
|
|
#line 1916 "p-exp.c.tmp"
|
|
|
|
yyvsp -= yylen;
|
|
yyssp -= yylen;
|
|
|
|
|
/* Line 1455 of yacc.c */
|
|
#line 2388 "p-exp.c.tmp"
|
|
default: break;
|
|
}
|
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
|
|
|
YYPOPSTACK (yylen);
|
|
yylen = 0;
|
YY_STACK_PRINT (yyss, yyssp);
|
YY_STACK_PRINT (yyss, yyssp);
|
|
|
*++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. */
|
|
|
yyn = yyr1[yyn];
|
yyn = yyr1[yyn];
|
Line 1944... |
Line 2415... |
yyerrlab:
|
yyerrlab:
|
/* If not already recovering from an error, report this error. */
|
/* If not already recovering from an error, report this error. */
|
if (!yyerrstatus)
|
if (!yyerrstatus)
|
{
|
{
|
++yynerrs;
|
++yynerrs;
|
#if YYERROR_VERBOSE
|
#if ! YYERROR_VERBOSE
|
yyn = yypact[yystate];
|
yyerror (YY_("syntax error"));
|
|
#else
|
if (YYPACT_NINF < yyn && yyn < YYLAST)
|
|
{
|
{
|
YYSIZE_T yysize = 0;
|
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
int yytype = YYTRANSLATE (yychar);
|
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
const char* yyprefix;
|
|
char *yymsg;
|
|
int yyx;
|
|
|
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
|
YYCHECK. */
|
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
|
|
|
/* Stay within bounds of both yycheck and yytname. */
|
|
int yychecklim = YYLAST - yyn;
|
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
|
int yycount = 0;
|
|
|
|
yyprefix = ", expecting ";
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
|
{
|
{
|
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
|
YYSIZE_T yyalloc = 2 * yysize;
|
yycount += 1;
|
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
if (yycount == 5)
|
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
|
if (yymsg != yymsgbuf)
|
|
YYSTACK_FREE (yymsg);
|
|
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
|
if (yymsg)
|
|
yymsg_alloc = yyalloc;
|
|
else
|
{
|
{
|
yysize = 0;
|
yymsg = yymsgbuf;
|
break;
|
yymsg_alloc = sizeof yymsgbuf;
|
}
|
}
|
}
|
}
|
yysize += (sizeof ("syntax error, unexpected ")
|
|
+ yystrlen (yytname[yytype]));
|
|
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
|
if (yymsg != 0)
|
|
{
|
|
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
|
|
yyp = yystpcpy (yyp, yytname[yytype]);
|
|
|
|
if (yycount < 5)
|
if (0 < yysize && yysize <= yymsg_alloc)
|
{
|
|
yyprefix = ", expecting ";
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
|
{
|
{
|
yyp = yystpcpy (yyp, yyprefix);
|
(void) yysyntax_error (yymsg, yystate, yychar);
|
yyp = yystpcpy (yyp, yytname[yyx]);
|
|
yyprefix = " or ";
|
|
}
|
|
}
|
|
yyerror (yymsg);
|
yyerror (yymsg);
|
YYSTACK_FREE (yymsg);
|
|
}
|
}
|
else
|
else
|
yyerror ("syntax error; also virtual memory exhausted");
|
{
|
|
yyerror (YY_("syntax error"));
|
|
if (yysize != 0)
|
|
goto yyexhaustedlab;
|
}
|
}
|
else
|
}
|
#endif /* YYERROR_VERBOSE */
|
#endif
|
yyerror ("syntax error");
|
|
}
|
}
|
|
|
|
|
|
|
if (yyerrstatus == 3)
|
if (yyerrstatus == 3)
|
Line 2015... |
Line 2461... |
/* If just tried and failed to reuse lookahead 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)
|
{
|
{
|
/* If at end of input, pop the error token,
|
/* Return failure if at end of input. */
|
then the rest of the stack, then return failure. */
|
|
if (yychar == YYEOF)
|
if (yychar == YYEOF)
|
for (;;)
|
|
{
|
|
YYPOPSTACK;
|
|
if (yyssp == yyss)
|
|
YYABORT;
|
YYABORT;
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
|
yydestruct (yystos[*yyssp], yyvsp);
|
|
}
|
|
}
|
}
|
else
|
else
|
{
|
{
|
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
|
yydestruct ("Error: discarding",
|
yydestruct (yytoken, &yylval);
|
yytoken, &yylval);
|
yychar = YYEMPTY;
|
yychar = YYEMPTY;
|
|
|
}
|
}
|
}
|
}
|
|
|
/* Else will try to reuse lookahead token after shifting the error
|
/* Else will try to reuse lookahead token after shifting the error
|
token. */
|
token. */
|
Line 2046... |
Line 2483... |
/*---------------------------------------------------.
|
/*---------------------------------------------------.
|
| yyerrorlab -- error raised explicitly by YYERROR. |
|
| yyerrorlab -- error raised explicitly by YYERROR. |
|
`---------------------------------------------------*/
|
`---------------------------------------------------*/
|
yyerrorlab:
|
yyerrorlab:
|
|
|
#ifdef __GNUC__
|
/* Pacify compilers like GCC when the user code never invokes
|
/* Pacify GCC when the user code never invokes YYERROR and the label
|
YYERROR and the label yyerrorlab therefore never appears in user
|
yyerrorlab therefore never appears in user code. */
|
code. */
|
if (0)
|
if (/*CONSTCOND*/ 0)
|
goto yyerrorlab;
|
goto yyerrorlab;
|
#endif
|
|
|
|
yyvsp -= yylen;
|
/* Do not reclaim the symbols of the rule which action triggered
|
yyssp -= yylen;
|
this YYERROR. */
|
|
YYPOPSTACK (yylen);
|
|
yylen = 0;
|
|
YY_STACK_PRINT (yyss, yyssp);
|
yystate = *yyssp;
|
yystate = *yyssp;
|
goto yyerrlab1;
|
goto yyerrlab1;
|
|
|
|
|
/*-------------------------------------------------------------.
|
/*-------------------------------------------------------------.
|
Line 2083... |
Line 2522... |
|
|
/* Pop the current state because it cannot handle the error token. */
|
/* Pop the current state because it cannot handle the error token. */
|
if (yyssp == yyss)
|
if (yyssp == yyss)
|
YYABORT;
|
YYABORT;
|
|
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
|
yydestruct (yystos[yystate], yyvsp);
|
yydestruct ("Error: popping",
|
YYPOPSTACK;
|
yystos[yystate], yyvsp);
|
|
YYPOPSTACK (1);
|
yystate = *yyssp;
|
yystate = *yyssp;
|
YY_STACK_PRINT (yyss, yyssp);
|
YY_STACK_PRINT (yyss, yyssp);
|
}
|
}
|
|
|
if (yyn == YYFINAL)
|
|
YYACCEPT;
|
|
|
|
YYDPRINTF ((stderr, "Shifting error token, "));
|
|
|
|
*++yyvsp = yylval;
|
*++yyvsp = yylval;
|
|
|
|
|
|
/* Shift the error token. */
|
|
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
|
|
|
yystate = yyn;
|
yystate = yyn;
|
goto yynewstate;
|
goto yynewstate;
|
|
|
|
|
/*-------------------------------------.
|
/*-------------------------------------.
|
Line 2116... |
Line 2554... |
`-----------------------------------*/
|
`-----------------------------------*/
|
yyabortlab:
|
yyabortlab:
|
yyresult = 1;
|
yyresult = 1;
|
goto yyreturn;
|
goto yyreturn;
|
|
|
#ifndef yyoverflow
|
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
/*----------------------------------------------.
|
/*-------------------------------------------------.
|
| yyoverflowlab -- parser overflow comes here. |
|
| yyexhaustedlab -- memory exhaustion comes here. |
|
`----------------------------------------------*/
|
`-------------------------------------------------*/
|
yyoverflowlab:
|
yyexhaustedlab:
|
yyerror ("parser stack overflow");
|
yyerror (YY_("memory exhausted"));
|
yyresult = 2;
|
yyresult = 2;
|
/* Fall through. */
|
/* Fall through. */
|
#endif
|
#endif
|
|
|
yyreturn:
|
yyreturn:
|
|
if (yychar != YYEMPTY)
|
|
yydestruct ("Cleanup: discarding lookahead",
|
|
yytoken, &yylval);
|
|
/* Do not reclaim the symbols of the rule which action triggered
|
|
this YYABORT or YYACCEPT. */
|
|
YYPOPSTACK (yylen);
|
|
YY_STACK_PRINT (yyss, yyssp);
|
|
while (yyssp != yyss)
|
|
{
|
|
yydestruct ("Cleanup: popping",
|
|
yystos[*yyssp], yyvsp);
|
|
YYPOPSTACK (1);
|
|
}
|
#ifndef yyoverflow
|
#ifndef yyoverflow
|
if (yyss != yyssa)
|
if (yyss != yyssa)
|
YYSTACK_FREE (yyss);
|
YYSTACK_FREE (yyss);
|
#endif
|
#endif
|
return yyresult;
|
#if YYERROR_VERBOSE
|
|
if (yymsg != yymsgbuf)
|
|
YYSTACK_FREE (yymsg);
|
|
#endif
|
|
/* Make sure YYID is used. */
|
|
return YYID (yyresult);
|
}
|
}
|
|
|
|
|
|
|
|
/* Line 1675 of yacc.c */
|
#line 785 "p-exp.y"
|
#line 785 "p-exp.y"
|
|
|
|
|
/* Take care of parsing a number (anything that starts with a digit).
|
/* Take care of parsing a number (anything that starts with a digit).
|
Set yylval and return the token type; update lexptr.
|
Set yylval and return the token type; update lexptr.
|
Line 3038... |
Line 3496... |
|
|
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
|
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
|
}
|
}
|
|
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|