gdb/c-exp.c - gdb
Global variables defined
Data types defined
Functions defined
Macros defined
Source code
- #define YYBISON 1
- #define YYBISON_VERSION "2.7"
- #define YYSKELETON_NAME "yacc.c"
- #define YYPURE 0
- #define YYPUSH 0
- #define YYPULL 1
- #line 36 "c-exp.y"
- #include "defs.h"
- #include <ctype.h>
- #include "expression.h"
- #include "value.h"
- #include "parser-defs.h"
- #include "language.h"
- #include "c-lang.h"
- #include "bfd.h"
- #include "symfile.h"
- #include "objfiles.h"
- #include "charset.h"
- #include "block.h"
- #include "cp-support.h"
- #include "dfp.h"
- #include "macroscope.h"
- #include "objc-lang.h"
- #include "typeprint.h"
- #include "cp-abi.h"
- #define parse_type(ps) builtin_type (parse_gdbarch (ps))
- #define yymaxdepth c_maxdepth
- #define yyparse c_parse_internal
- #define yylex c_lex
- #define yyerror c_error
- #define yylval c_lval
- #define yychar c_char
- #define yydebug c_debug
- #define yypact c_pact
- #define yyr1 c_r1
- #define yyr2 c_r2
- #define yydef c_def
- #define yychk c_chk
- #define yypgo c_pgo
- #define yyact c_act
- #define yyexca c_exca
- #define yyerrflag c_errflag
- #define yynerrs c_nerrs
- #define yyps c_ps
- #define yypv c_pv
- #define yys c_s
- #define yy_yys c_yys
- #define yystate c_state
- #define yytmp c_tmp
- #define yyv c_v
- #define yy_yyv c_yyv
- #define yyval c_val
- #define yylloc c_lloc
- #define yyreds c_reds
- #define yytoks c_toks
- #define yyname c_name
- #define yyrule c_rule
- #define yylhs c_yylhs
- #define yylen c_yylen
- #define yydefred c_yydefred
- #define yydgoto c_yydgoto
- #define yysindex c_yysindex
- #define yyrindex c_yyrindex
- #define yygindex c_yygindex
- #define yytable c_yytable
- #define yycheck c_yycheck
- #define yyss c_yyss
- #define yysslim c_yysslim
- #define yyssp c_yyssp
- #define yystacksize c_yystacksize
- #define yyvs c_yyvs
- #define yyvsp c_yyvsp
- #ifndef YYDEBUG
- #define YYDEBUG 1
- #endif
- #define YYFPRINTF parser_fprintf
- static struct parser_state *pstate = NULL;
- int yyparse (void);
- static int yylex (void);
- void yyerror (char *);
- static int type_aggregate_p (struct type *);
- #line 166 "c-exp.c"
- # ifndef YY_NULL
- # if defined __cplusplus && 201103L <= __cplusplus
- # define YY_NULL nullptr
- # else
- # define YY_NULL 0
- # endif
- # endif
- #ifdef YYERROR_VERBOSE
- # undef YYERROR_VERBOSE
- # define YYERROR_VERBOSE 1
- #else
- # define YYERROR_VERBOSE 0
- #endif
- #ifndef YYDEBUG
- # define YYDEBUG 0
- #endif
- #if YYDEBUG
- extern int yydebug;
- #endif
- #ifndef YYTOKENTYPE
- # define YYTOKENTYPE
-
- enum yytokentype {
- INT = 258,
- FLOAT = 259,
- DECFLOAT = 260,
- STRING = 261,
- NSSTRING = 262,
- SELECTOR = 263,
- CHAR = 264,
- NAME = 265,
- UNKNOWN_CPP_NAME = 266,
- COMPLETE = 267,
- TYPENAME = 268,
- CLASSNAME = 269,
- OBJC_LBRAC = 270,
- NAME_OR_INT = 271,
- OPERATOR = 272,
- STRUCT = 273,
- CLASS = 274,
- UNION = 275,
- ENUM = 276,
- SIZEOF = 277,
- UNSIGNED = 278,
- COLONCOLON = 279,
- TEMPLATE = 280,
- ERROR = 281,
- NEW = 282,
- DELETE = 283,
- REINTERPRET_CAST = 284,
- DYNAMIC_CAST = 285,
- STATIC_CAST = 286,
- CONST_CAST = 287,
- ENTRY = 288,
- TYPEOF = 289,
- DECLTYPE = 290,
- TYPEID = 291,
- SIGNED_KEYWORD = 292,
- LONG = 293,
- SHORT = 294,
- INT_KEYWORD = 295,
- CONST_KEYWORD = 296,
- VOLATILE_KEYWORD = 297,
- DOUBLE_KEYWORD = 298,
- VARIABLE = 299,
- ASSIGN_MODIFY = 300,
- TRUEKEYWORD = 301,
- FALSEKEYWORD = 302,
- ABOVE_COMMA = 303,
- OROR = 304,
- ANDAND = 305,
- NOTEQUAL = 306,
- EQUAL = 307,
- GEQ = 308,
- LEQ = 309,
- RSH = 310,
- LSH = 311,
- DECREMENT = 312,
- INCREMENT = 313,
- UNARY = 314,
- DOT_STAR = 315,
- ARROW_STAR = 316,
- ARROW = 317,
- BLOCKNAME = 318,
- FILENAME = 319,
- DOTDOTDOT = 320
- };
- #endif
- #define INT 258
- #define FLOAT 259
- #define DECFLOAT 260
- #define STRING 261
- #define NSSTRING 262
- #define SELECTOR 263
- #define CHAR 264
- #define NAME 265
- #define UNKNOWN_CPP_NAME 266
- #define COMPLETE 267
- #define TYPENAME 268
- #define CLASSNAME 269
- #define OBJC_LBRAC 270
- #define NAME_OR_INT 271
- #define OPERATOR 272
- #define STRUCT 273
- #define CLASS 274
- #define UNION 275
- #define ENUM 276
- #define SIZEOF 277
- #define UNSIGNED 278
- #define COLONCOLON 279
- #define TEMPLATE 280
- #define ERROR 281
- #define NEW 282
- #define DELETE 283
- #define REINTERPRET_CAST 284
- #define DYNAMIC_CAST 285
- #define STATIC_CAST 286
- #define CONST_CAST 287
- #define ENTRY 288
- #define TYPEOF 289
- #define DECLTYPE 290
- #define TYPEID 291
- #define SIGNED_KEYWORD 292
- #define LONG 293
- #define SHORT 294
- #define INT_KEYWORD 295
- #define CONST_KEYWORD 296
- #define VOLATILE_KEYWORD 297
- #define DOUBLE_KEYWORD 298
- #define VARIABLE 299
- #define ASSIGN_MODIFY 300
- #define TRUEKEYWORD 301
- #define FALSEKEYWORD 302
- #define ABOVE_COMMA 303
- #define OROR 304
- #define ANDAND 305
- #define NOTEQUAL 306
- #define EQUAL 307
- #define GEQ 308
- #define LEQ 309
- #define RSH 310
- #define LSH 311
- #define DECREMENT 312
- #define INCREMENT 313
- #define UNARY 314
- #define DOT_STAR 315
- #define ARROW_STAR 316
- #define ARROW 317
- #define BLOCKNAME 318
- #define FILENAME 319
- #define DOTDOTDOT 320
- #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
- typedef union YYSTYPE
- {
- #line 139 "c-exp.y"
- LONGEST lval;
- struct {
- LONGEST val;
- struct type *type;
- } typed_val_int;
- struct {
- DOUBLEST dval;
- struct type *type;
- } typed_val_float;
- struct {
- gdb_byte val[16];
- struct type *type;
- } typed_val_decfloat;
- struct type *tval;
- struct stoken sval;
- struct typed_stoken tsval;
- struct ttype tsym;
- struct symtoken ssym;
- int voidval;
- const struct block *bval;
- enum exp_opcode opcode;
- struct stoken_vector svec;
- VEC (type_ptr) *tvec;
- struct type_stack *type_stack;
- struct objc_class_str class;
- #line 368 "c-exp.c"
- } YYSTYPE;
- # define YYSTYPE_IS_TRIVIAL 1
- # define yystype YYSTYPE
- # define YYSTYPE_IS_DECLARED 1
- #endif
- extern YYSTYPE yylval;
- #ifdef YYPARSE_PARAM
- #if defined __STDC__ || defined __cplusplus
- int yyparse (void *YYPARSE_PARAM);
- #else
- int yyparse ();
- #endif
- #else
- #if defined __STDC__ || defined __cplusplus
- int yyparse (void);
- #else
- int yyparse ();
- #endif
- #endif
- #line 170 "c-exp.y"
- static int parse_number (struct parser_state *par_state,
- const char *, int, int, YYSTYPE *);
- static struct stoken operator_stoken (const char *);
- static void check_parameter_typelist (VEC (type_ptr) *);
- static void write_destructor_name (struct parser_state *par_state,
- struct stoken);
- #ifdef YYBISON
- static void c_print_token (FILE *file, int type, YYSTYPE value);
- #define YYPRINT(FILE, TYPE, VALUE) c_print_token (FILE, TYPE, VALUE)
- #endif
- #line 411 "c-exp.c"
- #ifdef short
- # undef short
- #endif
- #ifdef YYTYPE_UINT8
- typedef YYTYPE_UINT8 yytype_uint8;
- #else
- typedef unsigned char yytype_uint8;
- #endif
- #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
- #ifdef YYTYPE_UINT16
- typedef YYTYPE_UINT16 yytype_uint16;
- #else
- typedef unsigned short int yytype_uint16;
- #endif
- #ifdef YYTYPE_INT16
- typedef YYTYPE_INT16 yytype_int16;
- #else
- typedef short int yytype_int16;
- #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>
- # define YYSIZE_T size_t
- # else
- # define YYSIZE_T unsigned int
- # endif
- #endif
- #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
- #ifndef YY_
- # if defined YYENABLE_NLS && YYENABLE_NLS
- # if ENABLE_NLS
- # include <libintl.h>
- # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
- # endif
- # endif
- # ifndef YY_
- # define YY_(Msgid) Msgid
- # endif
- #endif
- #if ! defined lint || defined __GNUC__
- # define YYUSE(E) ((void) (E))
- #else
- # define YYUSE(E)
- #endif
- #ifndef lint
- # define YYID(N) (N)
- #else
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static int
- YYID (int yyi)
- #else
- static int
- YYID (yyi)
- int yyi;
- #endif
- {
- return yyi;
- }
- #endif
- #if ! defined yyoverflow || YYERROR_VERBOSE
- # ifdef YYSTACK_USE_ALLOCA
- # if YYSTACK_USE_ALLOCA
- # ifdef __GNUC__
- # define YYSTACK_ALLOC __builtin_alloca
- # elif defined __BUILTIN_VA_ARG_INCR
- # include <alloca.h>
- # elif defined _AIX
- # define YYSTACK_ALLOC __alloca
- # elif defined _MSC_VER
- # define alloca _alloca
- # else
- # define YYSTACK_ALLOC alloca
- # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- # include <stdlib.h>
-
- # ifndef EXIT_SUCCESS
- # define EXIT_SUCCESS 0
- # endif
- # endif
- # endif
- # endif
- # endif
- # ifdef YYSTACK_ALLOC
-
- # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
- # ifndef YYSTACK_ALLOC_MAXIMUM
-
- # define YYSTACK_ALLOC_MAXIMUM 4032
- # endif
- # else
- # define YYSTACK_ALLOC YYMALLOC
- # define YYSTACK_FREE YYFREE
- # ifndef YYSTACK_ALLOC_MAXIMUM
- # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
- # endif
- # if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined xmalloc) \
- && (defined YYFREE || defined xfree)))
- # include <stdlib.h>
- # ifndef EXIT_SUCCESS
- # define EXIT_SUCCESS 0
- # endif
- # endif
- # ifndef YYMALLOC
- # define YYMALLOC xmalloc
- # if ! defined xmalloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- void *xmalloc (YYSIZE_T);
- # endif
- # endif
- # ifndef YYFREE
- # define YYFREE xfree
- # if ! defined xfree && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- void xfree (void *);
- # endif
- # endif
- # endif
- #endif
- #if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
- union yyalloc
- {
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
- };
- # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
- # define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
- # define YYCOPY_NEEDED 1
- # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
- #endif
- #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
- # ifndef YYCOPY
- # if defined __GNUC__ && 1 < __GNUC__
- # define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
- # else
- # define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
- # endif
- # endif
- #endif
- #define YYFINAL 167
- #define YYLAST 1734
- #define YYNTOKENS 90
- #define YYNNTS 46
- #define YYNRULES 260
- #define YYNSTATES 413
- #define YYUNDEFTOK 2
- #define YYMAXUTOK 320
- #define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
- static const yytype_uint8 yytranslate[] =
- {
- 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, 84, 2, 2, 2, 70, 56, 2,
- 76, 83, 68, 66, 48, 67, 74, 69, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 87, 2,
- 59, 50, 60, 51, 65, 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, 75, 2, 86, 55, 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, 88, 54, 89, 85, 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, 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, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 49, 52, 53, 57, 58, 61, 62,
- 63, 64, 71, 72, 73, 77, 78, 79, 80, 81,
- 82
- };
- #if YYDEBUG
- static const yytype_uint16 yyprhs[] =
- {
- 0, 0, 3, 5, 7, 9, 14, 19, 24, 26,
- 30, 33, 36, 39, 42, 45, 48, 51, 54, 57,
- 60, 65, 70, 73, 77, 82, 86, 91, 97, 101,
- 105, 109, 114, 118, 123, 129, 133, 137, 142, 147,
- 148, 154, 155, 161, 162, 168, 170, 172, 174, 177,
- 181, 184, 187, 188, 194, 195, 201, 203, 204, 206,
- 210, 216, 218, 222, 227, 232, 236, 240, 244, 248,
- 252, 256, 260, 264, 268, 272, 276, 280, 284, 288,
- 292, 296, 300, 304, 308, 312, 318, 322, 326, 328,
- 330, 332, 334, 336, 338, 340, 345, 350, 358, 366,
- 374, 382, 384, 387, 389, 391, 393, 395, 397, 399,
- 403, 406, 410, 414, 419, 425, 427, 430, 432, 435,
- 437, 438, 442, 444, 446, 448, 449, 450, 455, 456,
- 460, 462, 465, 467, 470, 472, 474, 478, 481, 483,
- 486, 488, 491, 494, 498, 502, 505, 509, 511, 513,
- 515, 517, 519, 522, 526, 529, 533, 537, 541, 544,
- 547, 551, 556, 560, 564, 569, 573, 578, 582, 587,
- 590, 594, 597, 601, 604, 608, 610, 613, 616, 619,
- 623, 626, 629, 633, 636, 639, 643, 646, 649, 653,
- 656, 658, 661, 663, 669, 672, 675, 677, 679, 681,
- 683, 685, 689, 691, 695, 697, 700, 703, 704, 707,
- 710, 713, 715, 717, 719, 722, 725, 730, 735, 740,
- 745, 748, 751, 754, 757, 760, 763, 766, 769, 772,
- 775, 778, 781, 784, 787, 790, 793, 796, 799, 802,
- 805, 808, 811, 814, 817, 820, 823, 826, 830, 834,
- 838, 841, 843, 845, 847, 849, 851, 853, 855, 857,
- 859
- };
- static const yytype_int16 yyrhs[] =
- {
- 91, 0, -1, 93, -1, 92, -1, 123, -1, 34,
- 76, 94, 83, -1, 34, 76, 123, 83, -1, 35,
- 76, 94, 83, -1, 94, -1, 93, 48, 94, -1,
- 68, 94, -1, 56, 94, -1, 67, 94, -1, 66,
- 94, -1, 84, 94, -1, 85, 94, -1, 72, 94,
- -1, 71, 94, -1, 94, 72, -1, 94, 71, -1,
- 36, 76, 94, 83, -1, 36, 76, 92, 83, -1,
- 22, 94, -1, 94, 79, 134, -1, 94, 79, 134,
- 12, -1, 94, 79, 12, -1, 94, 79, 85, 134,
- -1, 94, 79, 85, 134, 12, -1, 94, 79, 109,
- -1, 94, 78, 94, -1, 94, 74, 134, -1, 94,
- 74, 134, 12, -1, 94, 74, 12, -1, 94, 74,
- 85, 134, -1, 94, 74, 85, 134, 12, -1, 94,
- 74, 109, -1, 94, 77, 94, -1, 94, 75, 93,
- 86, -1, 94, 15, 93, 86, -1, -1, 15, 13,
- 95, 98, 86, -1, -1, 15, 14, 96, 98, 86,
- -1, -1, 15, 94, 97, 98, 86, -1, 134, -1,
- 99, -1, 100, -1, 99, 100, -1, 134, 87, 94,
- -1, 87, 94, -1, 48, 94, -1, -1, 94, 76,
- 101, 104, 83, -1, -1, 11, 76, 102, 104, 83,
- -1, 88, -1, -1, 94, -1, 104, 48, 94, -1,
- 94, 76, 126, 83, 111, -1, 89, -1, 103, 104,
- 105, -1, 103, 92, 105, 94, -1, 76, 92, 83,
- 94, -1, 76, 93, 83, -1, 94, 65, 94, -1,
- 94, 68, 94, -1, 94, 69, 94, -1, 94, 70,
- 94, -1, 94, 66, 94, -1, 94, 67, 94, -1,
- 94, 64, 94, -1, 94, 63, 94, -1, 94, 58,
- 94, -1, 94, 57, 94, -1, 94, 62, 94, -1,
- 94, 61, 94, -1, 94, 59, 94, -1, 94, 60,
- 94, -1, 94, 56, 94, -1, 94, 55, 94, -1,
- 94, 54, 94, -1, 94, 53, 94, -1, 94, 52,
- 94, -1, 94, 51, 94, 87, 94, -1, 94, 50,
- 94, -1, 94, 45, 94, -1, 3, -1, 9, -1,
- 16, -1, 4, -1, 5, -1, 108, -1, 44, -1,
- 8, 76, 134, 83, -1, 22, 76, 123, 83, -1,
- 29, 59, 92, 60, 76, 94, 83, -1, 31, 59,
- 92, 60, 76, 94, 83, -1, 30, 59, 92, 60,
- 76, 94, 83, -1, 32, 59, 92, 60, 76, 94,
- 83, -1, 6, -1, 106, 6, -1, 106, -1, 7,
- -1, 46, -1, 47, -1, 80, -1, 81, -1, 107,
- 24, 134, -1, 135, 33, -1, 107, 24, 134, -1,
- 13, 24, 134, -1, 13, 24, 85, 134, -1, 13,
- 24, 134, 24, 134, -1, 109, -1, 24, 135, -1,
- 135, -1, 65, 10, -1, 132, -1, -1, 111, 110,
- 111, -1, 112, -1, 132, -1, 113, -1, -1, -1,
- 115, 68, 116, 114, -1, -1, 68, 117, 114, -1,
- 56, -1, 56, 115, -1, 115, -1, 118, 120, -1,
- 118, -1, 120, -1, 76, 119, 83, -1, 120, 121,
- -1, 121, -1, 120, 122, -1, 122, -1, 75, 86,
- -1, 15, 86, -1, 75, 3, 86, -1, 15, 3,
- 86, -1, 76, 83, -1, 76, 126, 83, -1, 128,
- -1, 13, -1, 40, -1, 38, -1, 39, -1, 38,
- 40, -1, 38, 37, 40, -1, 38, 37, -1, 37,
- 38, 40, -1, 23, 38, 40, -1, 38, 23, 40,
- -1, 38, 23, -1, 38, 38, -1, 38, 38, 40,
- -1, 38, 38, 37, 40, -1, 38, 38, 37, -1,
- 37, 38, 38, -1, 37, 38, 38, 40, -1, 23,
- 38, 38, -1, 23, 38, 38, 40, -1, 38, 38,
- 23, -1, 38, 38, 23, 40, -1, 39, 40, -1,
- 39, 37, 40, -1, 39, 37, -1, 23, 39, 40,
- -1, 39, 23, -1, 39, 23, 40, -1, 43, -1,
- 38, 43, -1, 18, 134, -1, 18, 12, -1, 18,
- 134, 12, -1, 19, 134, -1, 19, 12, -1, 19,
- 134, 12, -1, 20, 134, -1, 20, 12, -1, 20,
- 134, 12, -1, 21, 134, -1, 21, 12, -1, 21,
- 134, 12, -1, 23, 125, -1, 23, -1, 37, 125,
- -1, 37, -1, 25, 134, 59, 123, 60, -1, 113,
- 124, -1, 124, 113, -1, 13, -1, 40, -1, 38,
- -1, 39, -1, 127, -1, 127, 48, 82, -1, 123,
- -1, 127, 48, 123, -1, 124, -1, 128, 119, -1,
- 124, 130, -1, -1, 115, 130, -1, 41, 42, -1,
- 42, 41, -1, 131, -1, 41, -1, 42, -1, 17,
- 27, -1, 17, 28, -1, 17, 27, 75, 86, -1,
- 17, 28, 75, 86, -1, 17, 27, 15, 86, -1,
- 17, 28, 15, 86, -1, 17, 66, -1, 17, 67,
- -1, 17, 68, -1, 17, 69, -1, 17, 70, -1,
- 17, 55, -1, 17, 56, -1, 17, 54, -1, 17,
- 85, -1, 17, 84, -1, 17, 50, -1, 17, 59,
- -1, 17, 60, -1, 17, 45, -1, 17, 64, -1,
- 17, 63, -1, 17, 58, -1, 17, 57, -1, 17,
- 62, -1, 17, 61, -1, 17, 53, -1, 17, 52,
- -1, 17, 72, -1, 17, 71, -1, 17, 48, -1,
- 17, 78, -1, 17, 79, -1, 17, 76, 83, -1,
- 17, 75, 86, -1, 17, 15, 86, -1, 17, 129,
- -1, 10, -1, 80, -1, 13, -1, 16, -1, 11,
- -1, 133, -1, 10, -1, 80, -1, 133, -1, 11,
- -1
- };
- static const yytype_uint16 yyrline[] =
- {
- 0, 288, 288, 289, 292, 296, 300, 306, 313, 314,
- 319, 323, 327, 331, 335, 339, 343, 347, 351, 355,
- 359, 363, 367, 371, 377, 384, 394, 400, 407, 415,
- 419, 425, 432, 442, 448, 455, 463, 467, 471, 481,
- 480, 504, 503, 520, 519, 528, 530, 533, 534, 537,
- 539, 541, 548, 545, 557, 556, 582, 586, 589, 593,
- 597, 615, 618, 625, 629, 633, 639, 643, 647, 651,
- 655, 659, 663, 667, 671, 675, 679, 683, 687, 691,
- 695, 699, 703, 707, 711, 715, 719, 723, 730, 737,
- 746, 759, 766, 773, 776, 782, 789, 809, 814, 818,
- 822, 829, 846, 864, 897, 906, 914, 924, 932, 938,
- 948, 963, 985, 998, 1022, 1031, 1032, 1060, 1114, 1118,
- 1119, 1122, 1125, 1126, 1130, 1131, 1136, 1135, 1139, 1138,
- 1141, 1143, 1147, 1156, 1158, 1159, 1162, 1164, 1171, 1178,
- 1184, 1191, 1193, 1195, 1197, 1201, 1203, 1215, 1219, 1221,
- 1225, 1229, 1233, 1237, 1241, 1245, 1249, 1253, 1257, 1261,
- 1265, 1269, 1273, 1277, 1281, 1285, 1289, 1293, 1297, 1301,
- 1305, 1309, 1313, 1317, 1321, 1325, 1331, 1337, 1340, 1345,
- 1351, 1354, 1359, 1365, 1368, 1373, 1379, 1382, 1387, 1393,
- 1397, 1401, 1405, 1412, 1416, 1418, 1422, 1423, 1431, 1439,
- 1450, 1452, 1461, 1467, 1474, 1475, 1482, 1486, 1487, 1490,
- 1491, 1494, 1498, 1500, 1504, 1506, 1508, 1510, 1512, 1514,
- 1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534,
- 1536, 1538, 1540, 1542, 1582, 1584, 1586, 1588, 1590, 1592,
- 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612,
- 1614, 1630, 1631, 1632, 1633, 1634, 1635, 1638, 1639, 1647,
- 1659
- };
- #endif
- #if YYDEBUG || YYERROR_VERBOSE || 0
- static const char *const yytname[] =
- {
- "$end", "error", "$undefined", "INT", "FLOAT", "DECFLOAT", "STRING",
- "NSSTRING", "SELECTOR", "CHAR", "NAME", "UNKNOWN_CPP_NAME", "COMPLETE",
- "TYPENAME", "CLASSNAME", "OBJC_LBRAC", "NAME_OR_INT", "OPERATOR",
- "STRUCT", "CLASS", "UNION", "ENUM", "SIZEOF", "UNSIGNED", "COLONCOLON",
- "TEMPLATE", "ERROR", "NEW", "DELETE", "REINTERPRET_CAST", "DYNAMIC_CAST",
- "STATIC_CAST", "CONST_CAST", "ENTRY", "TYPEOF", "DECLTYPE", "TYPEID",
- "SIGNED_KEYWORD", "LONG", "SHORT", "INT_KEYWORD", "CONST_KEYWORD",
- "VOLATILE_KEYWORD", "DOUBLE_KEYWORD", "VARIABLE", "ASSIGN_MODIFY",
- "TRUEKEYWORD", "FALSEKEYWORD", "','", "ABOVE_COMMA", "'='", "'?'",
- "OROR", "ANDAND", "'|'", "'^'", "'&'", "NOTEQUAL", "EQUAL", "'<'", "'>'",
- "GEQ", "LEQ", "RSH", "LSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'",
- "DECREMENT", "INCREMENT", "UNARY", "'.'", "'['", "'('", "DOT_STAR",
- "ARROW_STAR", "ARROW", "BLOCKNAME", "FILENAME", "DOTDOTDOT", "')'",
- "'!'", "'~'", "']'", "':'", "'{'", "'}'", "$accept", "start", "type_exp",
- "exp1", "exp", "$@1", "$@2", "$@3", "msglist", "msgarglist", "msgarg",
- "$@4", "$@5", "lcurly", "arglist", "rcurly", "string_exp", "block",
- "variable", "qualified_name", "space_identifier", "const_or_volatile",
- "cv_with_space_id", "const_or_volatile_or_space_identifier_noopt",
- "const_or_volatile_or_space_identifier", "ptr_operator", "$@6", "$@7",
- "ptr_operator_ts", "abs_decl", "direct_abs_decl", "array_mod",
- "func_mod", "type", "typebase", "typename", "parameter_typelist",
- "nonempty_typelist", "ptype", "conversion_type_id",
- "conversion_declarator", "const_and_volatile", "const_or_volatile_noopt",
- "operator", "name", "name_not_typename", YY_NULL
- };
- #endif
- # ifdef YYPRINT
- static const yytype_uint16 yytoknum[] =
- {
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 44, 303,
- 61, 63, 304, 305, 124, 94, 38, 306, 307, 60,
- 62, 308, 309, 310, 311, 64, 43, 45, 42, 47,
- 37, 312, 313, 314, 46, 91, 40, 315, 316, 317,
- 318, 319, 320, 41, 33, 126, 93, 58, 123, 125
- };
- # endif
- static const yytype_uint8 yyr1[] =
- {
- 0, 90, 91, 91, 92, 92, 92, 92, 93, 93,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 95,
- 94, 96, 94, 97, 94, 98, 98, 99, 99, 100,
- 100, 100, 101, 94, 102, 94, 103, 104, 104, 104,
- 94, 105, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 106, 106, 94, 94, 94, 94, 107, 107, 107,
- 108, 108, 109, 109, 109, 108, 108, 108, 110, 111,
- 111, 112, 113, 113, 114, 114, 116, 115, 117, 115,
- 115, 115, 118, 119, 119, 119, 120, 120, 120, 120,
- 120, 121, 121, 121, 121, 122, 122, 123, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 125, 125, 125, 125,
- 126, 126, 127, 127, 128, 128, 129, 130, 130, 131,
- 131, 132, 132, 132, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 134, 134, 134, 134, 134, 134, 135, 135, 135,
- 135
- };
- static const yytype_uint8 yyr2[] =
- {
- 0, 2, 1, 1, 1, 4, 4, 4, 1, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 4, 4, 2, 3, 4, 3, 4, 5, 3, 3,
- 3, 4, 3, 4, 5, 3, 3, 4, 4, 0,
- 5, 0, 5, 0, 5, 1, 1, 1, 2, 3,
- 2, 2, 0, 5, 0, 5, 1, 0, 1, 3,
- 5, 1, 3, 4, 4, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 5, 3, 3, 1, 1,
- 1, 1, 1, 1, 1, 4, 4, 7, 7, 7,
- 7, 1, 2, 1, 1, 1, 1, 1, 1, 3,
- 2, 3, 3, 4, 5, 1, 2, 1, 2, 1,
- 0, 3, 1, 1, 1, 0, 0, 4, 0, 3,
- 1, 2, 1, 2, 1, 1, 3, 2, 1, 2,
- 1, 2, 2, 3, 3, 2, 3, 1, 1, 1,
- 1, 1, 2, 3, 2, 3, 3, 3, 2, 2,
- 3, 4, 3, 3, 4, 3, 4, 3, 4, 2,
- 3, 2, 3, 2, 3, 1, 2, 2, 2, 3,
- 2, 2, 3, 2, 2, 3, 2, 2, 3, 2,
- 1, 2, 1, 5, 2, 2, 1, 1, 1, 1,
- 1, 3, 1, 3, 1, 2, 2, 0, 2, 2,
- 2, 1, 1, 1, 2, 2, 4, 4, 4, 4,
- 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, 3, 3, 3,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1
- };
- static const yytype_uint16 yydefact[] =
- {
- 120, 88, 91, 92, 101, 104, 0, 89, 257, 260,
- 148, 0, 90, 120, 0, 0, 0, 0, 0, 190,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,
- 150, 151, 149, 212, 213, 175, 94, 105, 106, 0,
- 0, 0, 0, 0, 0, 120, 258, 108, 0, 0,
- 56, 0, 3, 2, 8, 57, 103, 0, 93, 115,
- 0, 122, 120, 4, 204, 147, 211, 123, 259, 117,
- 0, 54, 0, 39, 41, 43, 148, 0, 214, 215,
- 233, 244, 230, 241, 240, 227, 225, 226, 237, 236,
- 231, 232, 239, 238, 235, 234, 220, 221, 222, 223,
- 224, 243, 242, 0, 0, 245, 246, 229, 228, 207,
- 250, 251, 255, 178, 253, 254, 252, 256, 177, 181,
- 180, 184, 183, 187, 186, 0, 120, 22, 196, 198,
- 199, 197, 189, 260, 258, 116, 0, 120, 120, 120,
- 120, 120, 0, 120, 198, 199, 191, 158, 154, 159,
- 152, 176, 173, 171, 169, 209, 210, 11, 13, 12,
- 10, 17, 16, 0, 0, 14, 15, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 18, 0, 0, 52, 0, 0, 0,
- 0, 58, 0, 102, 0, 0, 120, 194, 195, 0,
- 130, 128, 0, 120, 132, 134, 205, 135, 138, 140,
- 110, 0, 57, 0, 112, 0, 0, 0, 249, 0,
- 0, 0, 0, 248, 247, 207, 206, 179, 182, 185,
- 188, 0, 165, 156, 172, 120, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 163, 155, 157, 153, 167,
- 162, 160, 174, 170, 0, 65, 9, 0, 87, 86,
- 0, 84, 83, 82, 81, 80, 75, 74, 78, 79,
- 77, 76, 73, 72, 66, 70, 71, 67, 68, 69,
- 32, 253, 0, 35, 30, 0, 57, 202, 0, 200,
- 36, 29, 25, 0, 28, 23, 61, 0, 0, 62,
- 111, 118, 121, 119, 0, 142, 131, 125, 0, 141,
- 145, 0, 0, 126, 133, 120, 137, 139, 95, 0,
- 113, 0, 0, 0, 0, 46, 47, 45, 0, 0,
- 218, 216, 219, 217, 126, 208, 96, 166, 0, 0,
- 0, 0, 0, 5, 6, 7, 21, 20, 164, 168,
- 161, 64, 38, 0, 33, 31, 37, 0, 120, 120,
- 26, 24, 63, 59, 144, 124, 129, 143, 136, 146,
- 125, 55, 114, 51, 50, 40, 48, 0, 0, 42,
- 44, 193, 0, 0, 0, 0, 85, 34, 53, 60,
- 201, 203, 27, 127, 49, 0, 0, 0, 0, 97,
- 99, 98, 100
- };
- static const yytype_int16 yydefgoto[] =
- {
- -1, 51, 163, 164, 54, 225, 226, 227, 334, 335,
- 336, 296, 222, 55, 202, 307, 56, 57, 58, 59,
- 206, 60, 61, 62, 376, 214, 380, 317, 215, 216,
- 217, 218, 219, 63, 64, 132, 322, 299, 65, 110,
- 236, 66, 67, 68, 337, 69
- };
- #define YYPACT_NINF -214
- static const yytype_int16 yypact[] =
- {
- 468, -214, -214, -214, -214, -214, -24, -214, -214, -2,
- 58, 640, -214, 886, 265, 292, 330, 347, 726, 110,
- 25, 193, 33, 48, 63, 84, 50, 80, 82, 185,
- 328, 22, -214, 139, 149, -214, -214, -214, -214, 812,
- 812, 812, 812, 812, 812, 468, 167, -214, 812, 812,
- -214, 192, -214, 145, 1399, 382, 189, 172, -214, -214,
- 135, -214, 746, -214, 86, 215, -214, 136, -214, 186,
- 193, -214, 53, 58, -214, 1399, -214, 141, 19, 43,
- -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
- -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
- -214, -214, -214, 142, 146, -214, -214, -214, -214, 271,
- -214, -214, -214, -214, -214, -214, -214, -214, 220, -214,
- 222, -214, 223, -214, 230, 58, 468, 24, -214, 96,
- 204, -214, -214, -214, -214, -214, 203, 660, 660, 660,
- 660, 554, 812, 468, 97, -214, -214, 211, 232, 288,
- -214, -214, 239, 240, -214, -214, -214, 24, 24, 24,
- 24, 24, 24, 180, -23, 24, 24, -214, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, -214, -214, 67, 812, 1669, 812, 812, 103,
- 195, 1399, -8, -214, 193, 278, 30, 86, -214, 5,
- 221, -214, 11, 218, 224, 12, -214, 34, -214, -214,
- -214, 216, 812, 193, 276, 37, 37, 37, -214, 228,
- 229, 233, 234, -214, -214, -13, -214, -214, -214, -214,
- -214, 235, 267, -214, -214, 746, 256, 263, 264, 269,
- 993, 248, 1051, 249, 1109, 293, -214, -214, -214, 295,
- 297, -214, -214, -214, 812, -214, 1399, 20, 1399, 1399,
- 922, 1457, 1486, 1515, 1544, 1573, 1602, 1602, 1072, 1072,
- 1072, 1072, 365, 365, 1130, 1188, 1188, 24, 24, 24,
- -214, 58, 193, -214, 332, 60, 812, -214, 266, 300,
- 138, 138, -214, 193, -214, 338, -214, 812, 812, -214,
- 329, -214, -214, -214, 268, -214, 224, 86, 270, -214,
- -214, 272, 279, -214, 34, 227, -214, -214, -214, -22,
- -214, 193, 812, 812, 275, 37, -214, 280, 283, 284,
- -214, -214, -214, -214, -214, -214, -214, -214, 313, 298,
- 299, 302, 303, -214, -214, -214, -214, -214, -214, -214,
- -214, 24, -214, 812, 364, -214, -214, 38, 30, 992,
- 384, -214, 24, 1399, -214, -214, -214, -214, -214, -214,
- 86, -214, -214, 1399, 1399, -214, -214, 280, 812, -214,
- -214, -214, 812, 812, 812, 812, 1428, -214, -214, -214,
- -214, -214, -214, -214, 1399, 1167, 1225, 1283, 1341, -214,
- -214, -214, -214
- };
- static const yytype_int16 yypgoto[] =
- {
- -214, -214, 2, 13, -11, -214, -214, -214, -72, -214,
- 59, -214, -214, -214, -207, 206, -214, -214, -214, -143,
- -214, -184, -214, -63, 29, -106, -214, -214, -214, 202,
- 231, -213, -212, -120, 28, 416, 255, -214, -214, -214,
- 217, -214, -183, -5, 3, 435
- };
- #define YYTABLE_NINF -121
- static const yytype_int16 yytable[] =
- {
- 75, 208, 52, 235, 326, 327, 241, 127, 314, 117,
- 117, 117, 117, 53, 318, 329, 117, 118, 120, 122,
- 124, 251, 312, 313, 136, 168, 308, 209, 157, 158,
- 159, 160, 161, 162, 229, 8, 133, 165, 166, 169,
- 308, 109, 13, 210, 201, 152, 208, 111, 112, 209,
- 114, 293, 70, 115, 13, 344, 304, 200, 231, 153,
- 265, 381, 154, 111, 112, 117, 114, 117, 168, 115,
- 13, 33, 34, 221, 71, 224, 297, 111, 112, 290,
- 291, 306, 72, 115, 13, 332, 308, 212, 213, 367,
- 207, 315, 137, 297, 230, 192, 193, 319, 194, 195,
- 196, 197, 198, 199, 316, 134, 362, 138, 168, 212,
- 325, 326, 327, 111, 112, 302, 291, 116, 232, 115,
- 13, 398, 139, 128, 333, 348, 141, 33, 34, 235,
- 250, 252, 254, 116, 242, 255, 243, 256, 223, 246,
- 247, 248, 249, 140, 208, 253, 366, 116, 129, 130,
- 131, -120, 292, 169, 338, 339, 142, 266, 143, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 155, 267, 116, 399, 313, 300, 301, 303, 117,
- 156, -107, 167, 168, 117, 203, 204, 294, 128, 117,
- 205, -119, 305, 111, 112, 297, 114, 310, 295, 115,
- 13, 201, 194, 195, 196, 197, 198, 199, 117, 220,
- 117, 117, 117, 144, 145, 131, 330, 228, 233, 234,
- 209, 76, 237, 209, 238, 239, 14, 15, 16, 17,
- 76, 19, 240, 21, 244, 14, 15, 16, 17, 401,
- 19, 257, 21, 361, 375, 29, 30, 31, 32, 33,
- 34, 35, 245, 264, 29, 30, 31, 32, 33, 34,
- 35, 210, 258, 116, 210, 111, 112, 113, 114, 262,
- 263, 115, 13, 211, 306, 201, 211, 117, 311, 211,
- 212, 213, 323, 212, 213, 364, 372, 373, 117, 328,
- 331, 320, 111, 112, 119, 114, 370, 347, 115, 13,
- 320, 259, 33, 34, 340, 341, 349, 375, 346, 342,
- 343, 383, 384, 350, 351, 260, 117, 210, 261, 352,
- 117, 354, 356, 358, 382, 359, -120, 360, 387, 211,
- 111, 112, 121, 114, 365, 116, 115, 13, 369, 368,
- 371, 147, 396, -109, 374, 378, 377, 111, 112, 123,
- 114, 385, 379, 115, 13, 148, 149, 388, 150, 389,
- 390, 151, 116, 391, 392, 393, 397, 404, 394, 395,
- 169, 405, 406, 407, 408, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 386, 10, 402, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 309, 403,
- 116, 22, 23, 24, 25, 321, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 116, 37, 38,
- 186, 187, 188, 189, 190, 191, 192, 193, 39, 194,
- 195, 196, 197, 198, 199, 146, 324, -120, 40, 41,
- 42, 298, 345, 43, 44, 135, 0, 0, 45, 0,
- 0, 0, 46, 47, 0, 0, 48, 49, 0, 0,
- 50, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 0, 10, 0, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 0, 0, 0, 22, 23, 24,
- 25, 0, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 0, 37, 38, 0, 0, 0, 0,
- 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 40, 41, 42, 0, 0, 43,
- 44, 0, 0, 0, 45, 0, 0, 0, 46, 47,
- 0, 0, 48, 49, 0, 0, 50, 1, 2, 3,
- 4, 5, 6, 7, 8, 9, 0, 10, 0, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 0, 0, 0, 22, 23, 24, 25, 0, 0, 0,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 0,
- 37, 38, 0, 0, 0, 0, 0, 0, 0, 0,
- 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 40, 41, 42, 0, 0, 43, 44, 0, 0, 0,
- 45, 0, 0, 0, 46, 47, 0, 0, 48, 49,
- 0, 0, 50, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 0, 73, 74, 11, 12, 13, 0, 0,
- 0, 0, 18, 0, 20, 0, 0, 0, 0, 22,
- 23, 24, 25, 76, 0, 0, 28, 0, 14, 15,
- 16, 17, 0, 19, 36, 21, 37, 38, 0, 0,
- 0, 0, 0, 0, 26, 27, 39, 29, 30, 31,
- 32, 33, 34, 35, 0, 0, 40, 41, 42, 0,
- 0, 43, 44, 0, 0, 0, 45, 0, 0, 0,
- 46, 47, 0, 0, 48, 49, 0, 0, 50, 1,
- 2, 3, 4, 5, 6, 7, 8, 9, 0, 125,
- 0, 11, 12, 13, 0, 0, 0, 0, 18, 0,
- 20, 0, 0, 0, 0, 22, 23, 24, 25, 76,
- 0, 0, 28, 0, 14, 15, 16, 17, 0, 19,
- 36, 21, 37, 38, 0, 0, 0, 0, 0, 0,
- 0, 0, 39, 29, 30, 31, 32, 33, 34, 35,
- 0, 0, 40, 41, 42, 0, 0, 43, 44, 0,
- 0, 0, 126, 0, 0, 0, 46, 47, 0, 0,
- 48, 49, 0, 0, 50, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 0, 125, 0, 11, 12, 13,
- 0, 0, 0, 0, 18, 0, 20, 0, 0, 0,
- 0, 22, 23, 24, 25, 0, 0, 0, 28, 0,
- 0, 0, 0, 0, 0, 0, 36, 0, 37, 38,
- 0, 0, 0, 0, 0, 0, 0, 0, 39, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 40, 41,
- 42, 0, 0, 43, 44, 0, 0, 0, 45, 0,
- 0, 0, 46, 47, 0, 0, 48, 49, 0, 76,
- 50, 77, 0, 0, 14, 15, 16, 17, 0, 19,
- 0, 21, 0, 78, 79, 0, 0, 0, 0, 0,
- 0, 0, 0, 29, 30, 31, 32, 33, 34, 35,
- 0, 80, 0, 0, 81, 0, 82, 169, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 0, 96, 97, 98, 99, 100, 101, 102, 0,
- 0, 103, 104, 0, 105, 106, 0, 170, 0, 0,
- 107, 108, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 0, 194, 195, 196, 197,
- 198, 199, 0, 0, 0, 76, 0, 0, 169, 363,
- 14, 15, 16, 17, 0, 19, 0, 21, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
- 30, 31, 32, 33, 34, 35, 0, 0, 170, 0,
- 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
- 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 169, 194, 195, 196,
- 197, 198, 199, 0, 400, 0, 353, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 169, 0, 0,
- 0, 0, 0, 0, 0, 0, 170, 0, 0, 0,
- 0, 171, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 169, 194, 195, 196, 197, 198,
- 199, 0, 0, 0, 355, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 169, 194, 195, 196, 197,
- 198, 199, 0, 0, 170, 0, 0, 0, 0, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 169, 194, 195, 196, 197, 198, 199, 0,
- 0, 0, 357, 0, 0, 0, 187, 188, 189, 190,
- 191, 192, 193, 169, 194, 195, 196, 197, 198, 199,
- 0, 0, 170, 0, 0, 0, 0, 171, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 169, 194, 195, 196, 197, 198, 199, 0, 0, 0,
- 409, 0, 0, 0, 0, 0, 189, 190, 191, 192,
- 193, 0, 194, 195, 196, 197, 198, 199, 0, 0,
- 170, 0, 0, 0, 0, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 169, 194,
- 195, 196, 197, 198, 199, 0, 0, 0, 410, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 170, 0,
- 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
- 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 169, 194, 195, 196,
- 197, 198, 199, 0, 0, 0, 411, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 170, 0, 0, 0,
- 0, 171, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 169, 194, 195, 196, 197, 198,
- 199, 0, 0, 0, 412, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 169, 170, 0, 0, 0, 0, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 169, 194, 195, 196, 197, 198, 199, 172,
- 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
- 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
- 193, 169, 194, 195, 196, 197, 198, 199, 0, 0,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 169, 194, 195, 196, 197, 198, 199, 0, 0, 0,
- 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 169,
- 194, 195, 196, 197, 198, 199, 0, 0, 0, 0,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 169, 194,
- 195, 196, 197, 198, 199, 0, 0, 0, 0, 0,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 169, 194, 195,
- 196, 197, 198, 199, 0, 0, 0, 0, 0, 0,
- 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 0, 194, 195, 196,
- 197, 198, 199, 0, 0, 0, 0, 0, 0, 0,
- 0, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 0, 194, 195, 196, 197,
- 198, 199, 76, 0, 0, 0, 0, 14, 15, 16,
- 17, 0, 19, 0, 21, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 29, 30, 31, 32,
- 33, 34, 35, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -120
- };
- #define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-214)))
- #define yytable_value_is_error(Yytable_value) \
- YYID (0)
- static const yytype_int16 yycheck[] =
- {
- 11, 64, 0, 109, 217, 217, 126, 18, 3, 14,
- 15, 16, 17, 0, 3, 222, 21, 14, 15, 16,
- 17, 141, 206, 206, 21, 48, 48, 15, 39, 40,
- 41, 42, 43, 44, 15, 10, 11, 48, 49, 15,
- 48, 13, 17, 56, 55, 23, 109, 10, 11, 15,
- 13, 194, 76, 16, 17, 68, 199, 55, 15, 37,
- 83, 83, 40, 10, 11, 70, 13, 72, 48, 16,
- 17, 41, 42, 70, 76, 72, 196, 10, 11, 12,
- 13, 89, 24, 16, 17, 48, 48, 75, 76, 296,
- 62, 86, 59, 213, 75, 71, 72, 86, 74, 75,
- 76, 77, 78, 79, 210, 80, 86, 59, 48, 75,
- 76, 324, 324, 10, 11, 12, 13, 80, 75, 16,
- 17, 83, 59, 13, 87, 245, 76, 41, 42, 235,
- 141, 142, 143, 80, 38, 38, 40, 40, 85, 137,
- 138, 139, 140, 59, 207, 143, 86, 80, 38, 39,
- 40, 65, 85, 15, 226, 227, 76, 168, 76, 170,
- 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
- 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
- 191, 42, 169, 80, 368, 368, 197, 198, 85, 194,
- 41, 24, 0, 48, 199, 6, 24, 194, 13, 204,
- 65, 65, 199, 10, 11, 325, 13, 204, 195, 16,
- 17, 222, 74, 75, 76, 77, 78, 79, 223, 33,
- 225, 226, 227, 38, 39, 40, 223, 86, 86, 83,
- 15, 13, 12, 15, 12, 12, 18, 19, 20, 21,
- 13, 23, 12, 25, 40, 18, 19, 20, 21, 369,
- 23, 40, 25, 264, 317, 37, 38, 39, 40, 41,
- 42, 43, 59, 83, 37, 38, 39, 40, 41, 42,
- 43, 56, 40, 80, 56, 10, 11, 12, 13, 40,
- 40, 16, 17, 68, 89, 296, 68, 292, 10, 68,
- 75, 76, 68, 75, 76, 292, 307, 308, 303, 83,
- 24, 83, 10, 11, 12, 13, 303, 40, 16, 17,
- 83, 23, 41, 42, 86, 86, 60, 380, 83, 86,
- 86, 332, 333, 60, 60, 37, 331, 56, 40, 60,
- 335, 83, 83, 40, 331, 40, 65, 40, 335, 68,
- 10, 11, 12, 13, 12, 80, 16, 17, 48, 83,
- 12, 23, 363, 24, 86, 83, 86, 10, 11, 12,
- 13, 86, 83, 16, 17, 37, 38, 87, 40, 86,
- 86, 43, 80, 60, 76, 76, 12, 388, 76, 76,
- 15, 392, 393, 394, 395, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 335, 13, 12, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 202, 380,
- 80, 29, 30, 31, 32, 213, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 80, 46, 47,
- 65, 66, 67, 68, 69, 70, 71, 72, 56, 74,
- 75, 76, 77, 78, 79, 29, 215, 65, 66, 67,
- 68, 196, 235, 71, 72, 20, -1, -1, 76, -1,
- -1, -1, 80, 81, -1, -1, 84, 85, -1, -1,
- 88, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- -1, 13, -1, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, -1, -1, -1, 29, 30, 31,
- 32, -1, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, -1, 46, 47, -1, -1, -1, -1,
- -1, -1, -1, -1, 56, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 66, 67, 68, -1, -1, 71,
- 72, -1, -1, -1, 76, -1, -1, -1, 80, 81,
- -1, -1, 84, 85, -1, -1, 88, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, -1, 13, -1, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- -1, -1, -1, 29, 30, 31, 32, -1, -1, -1,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
- 46, 47, -1, -1, -1, -1, -1, -1, -1, -1,
- 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 66, 67, 68, -1, -1, 71, 72, -1, -1, -1,
- 76, -1, -1, -1, 80, 81, -1, -1, 84, 85,
- -1, -1, 88, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, -1, 13, 14, 15, 16, 17, -1, -1,
- -1, -1, 22, -1, 24, -1, -1, -1, -1, 29,
- 30, 31, 32, 13, -1, -1, 36, -1, 18, 19,
- 20, 21, -1, 23, 44, 25, 46, 47, -1, -1,
- -1, -1, -1, -1, 34, 35, 56, 37, 38, 39,
- 40, 41, 42, 43, -1, -1, 66, 67, 68, -1,
- -1, 71, 72, -1, -1, -1, 76, -1, -1, -1,
- 80, 81, -1, -1, 84, 85, -1, -1, 88, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, -1, 13,
- -1, 15, 16, 17, -1, -1, -1, -1, 22, -1,
- 24, -1, -1, -1, -1, 29, 30, 31, 32, 13,
- -1, -1, 36, -1, 18, 19, 20, 21, -1, 23,
- 44, 25, 46, 47, -1, -1, -1, -1, -1, -1,
- -1, -1, 56, 37, 38, 39, 40, 41, 42, 43,
- -1, -1, 66, 67, 68, -1, -1, 71, 72, -1,
- -1, -1, 76, -1, -1, -1, 80, 81, -1, -1,
- 84, 85, -1, -1, 88, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, -1, 13, -1, 15, 16, 17,
- -1, -1, -1, -1, 22, -1, 24, -1, -1, -1,
- -1, 29, 30, 31, 32, -1, -1, -1, 36, -1,
- -1, -1, -1, -1, -1, -1, 44, -1, 46, 47,
- -1, -1, -1, -1, -1, -1, -1, -1, 56, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 66, 67,
- 68, -1, -1, 71, 72, -1, -1, -1, 76, -1,
- -1, -1, 80, 81, -1, -1, 84, 85, -1, 13,
- 88, 15, -1, -1, 18, 19, 20, 21, -1, 23,
- -1, 25, -1, 27, 28, -1, -1, -1, -1, -1,
- -1, -1, -1, 37, 38, 39, 40, 41, 42, 43,
- -1, 45, -1, -1, 48, -1, 50, 15, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, -1, 66, 67, 68, 69, 70, 71, 72, -1,
- -1, 75, 76, -1, 78, 79, -1, 45, -1, -1,
- 84, 85, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, -1, 74, 75, 76, 77,
- 78, 79, -1, -1, -1, 13, -1, -1, 15, 87,
- 18, 19, 20, 21, -1, 23, -1, 25, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
- 38, 39, 40, 41, 42, 43, -1, -1, 45, -1,
- -1, -1, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 15, 74, 75, 76,
- 77, 78, 79, -1, 82, -1, 83, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 15, -1, -1,
- -1, -1, -1, -1, -1, -1, 45, -1, -1, -1,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 15, 74, 75, 76, 77, 78,
- 79, -1, -1, -1, 83, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 15, 74, 75, 76, 77,
- 78, 79, -1, -1, 45, -1, -1, -1, -1, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 15, 74, 75, 76, 77, 78, 79, -1,
- -1, -1, 83, -1, -1, -1, 66, 67, 68, 69,
- 70, 71, 72, 15, 74, 75, 76, 77, 78, 79,
- -1, -1, 45, -1, -1, -1, -1, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 15, 74, 75, 76, 77, 78, 79, -1, -1, -1,
- 83, -1, -1, -1, -1, -1, 68, 69, 70, 71,
- 72, -1, 74, 75, 76, 77, 78, 79, -1, -1,
- 45, -1, -1, -1, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 15, 74,
- 75, 76, 77, 78, 79, -1, -1, -1, 83, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 45, -1,
- -1, -1, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 15, 74, 75, 76,
- 77, 78, 79, -1, -1, -1, 83, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 45, -1, -1, -1,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 15, 74, 75, 76, 77, 78,
- 79, -1, -1, -1, 83, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 15, 45, -1, -1, -1, -1, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 15, 74, 75, 76, 77, 78, 79, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 15, 74, 75, 76, 77, 78, 79, -1, -1,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 15, 74, 75, 76, 77, 78, 79, -1, -1, -1,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 15,
- 74, 75, 76, 77, 78, 79, -1, -1, -1, -1,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 15, 74,
- 75, 76, 77, 78, 79, -1, -1, -1, -1, -1,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 15, 74, 75,
- 76, 77, 78, 79, -1, -1, -1, -1, -1, -1,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, -1, 74, 75, 76,
- 77, 78, 79, -1, -1, -1, -1, -1, -1, -1,
- -1, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, -1, 74, 75, 76, 77,
- 78, 79, 13, -1, -1, -1, -1, 18, 19, 20,
- 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 37, 38, 39, 40,
- 41, 42, 43, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 65
- };
- static const yytype_uint8 yystos[] =
- {
- 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 13, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 29, 30, 31, 32, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 46, 47, 56,
- 66, 67, 68, 71, 72, 76, 80, 81, 84, 85,
- 88, 91, 92, 93, 94, 103, 106, 107, 108, 109,
- 111, 112, 113, 123, 124, 128, 131, 132, 133, 135,
- 76, 76, 24, 13, 14, 94, 13, 15, 27, 28,
- 45, 48, 50, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 66, 67, 68, 69,
- 70, 71, 72, 75, 76, 78, 79, 84, 85, 124,
- 129, 10, 11, 12, 13, 16, 80, 133, 134, 12,
- 134, 12, 134, 12, 134, 13, 76, 94, 13, 38,
- 39, 40, 125, 11, 80, 135, 134, 59, 59, 59,
- 59, 76, 76, 76, 38, 39, 125, 23, 37, 38,
- 40, 43, 23, 37, 40, 42, 41, 94, 94, 94,
- 94, 94, 94, 92, 93, 94, 94, 0, 48, 15,
- 45, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 74, 75, 76, 77, 78, 79,
- 92, 94, 104, 6, 24, 65, 110, 124, 113, 15,
- 56, 68, 75, 76, 115, 118, 119, 120, 121, 122,
- 33, 134, 102, 85, 134, 95, 96, 97, 86, 15,
- 75, 15, 75, 86, 83, 115, 130, 12, 12, 12,
- 12, 123, 38, 40, 40, 59, 92, 92, 92, 92,
- 94, 123, 94, 92, 94, 38, 40, 40, 40, 23,
- 37, 40, 40, 40, 83, 83, 94, 93, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 12, 13, 85, 109, 134, 93, 101, 123, 126, 127,
- 94, 94, 12, 85, 109, 134, 89, 105, 48, 105,
- 134, 10, 111, 132, 3, 86, 115, 117, 3, 86,
- 83, 119, 126, 68, 120, 76, 121, 122, 83, 104,
- 134, 24, 48, 87, 98, 99, 100, 134, 98, 98,
- 86, 86, 86, 86, 68, 130, 83, 40, 123, 60,
- 60, 60, 60, 83, 83, 83, 83, 83, 40, 40,
- 40, 94, 86, 87, 134, 12, 86, 104, 83, 48,
- 134, 12, 94, 94, 86, 113, 114, 86, 83, 83,
- 116, 83, 134, 94, 94, 86, 100, 134, 87, 86,
- 86, 60, 76, 76, 76, 76, 94, 12, 83, 111,
- 82, 123, 12, 114, 94, 94, 94, 94, 94, 83,
- 83, 83, 83
- };
- #define yyerrok (yyerrstatus = 0)
- #define yyclearin (yychar = YYEMPTY)
- #define YYEMPTY (-2)
- #define YYEOF 0
- #define YYACCEPT goto yyacceptlab
- #define YYABORT goto yyabortlab
- #define YYERROR goto yyerrorlab
- #define YYFAIL goto yyerrlab
- #if defined YYFAIL
-
- #endif
- #define YYRECOVERING() (!!yyerrstatus)
- #define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (YYID (0))
- #define YYTERROR 1
- #define YYERRCODE 256
- #ifndef YY_LOCATION_PRINT
- # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
- #endif
- #ifdef YYLEX_PARAM
- # define YYLEX yylex (YYLEX_PARAM)
- #else
- # define YYLEX yylex ()
- #endif
- #if YYDEBUG
- # ifndef YYFPRINTF
- # include <stdio.h>
- # define YYFPRINTF fprintf
- # endif
- # define YYDPRINTF(Args) \
- do { \
- if (yydebug) \
- YYFPRINTF Args; \
- } while (YYID (0))
- # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
- do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
- } while (YYID (0))
- #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
- {
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
- # ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
- # else
- YYUSE (yyoutput);
- # endif
- switch (yytype)
- {
- default:
- break;
- }
- }
- #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]);
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
- }
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static void
- yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
- #else
- static void
- yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
- #endif
- {
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
- }
- # define YY_STACK_PRINT(Bottom, Top) \
- do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
- } while (YYID (0))
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static void
- yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
- #else
- static void
- yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
- #endif
- {
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
-
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- 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) \
- do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
- } while (YYID (0))
- int yydebug;
- #else
- # define YYDPRINTF(Args)
- # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
- # define YY_STACK_PRINT(Bottom, Top)
- # define YY_REDUCE_PRINT(Rule)
- #endif
- #ifndef YYINITDEPTH
- # define YYINITDEPTH 200
- #endif
- #ifndef YYMAXDEPTH
- # define YYMAXDEPTH 10000
- #endif
- #if YYERROR_VERBOSE
- # ifndef yystrlen
- # if defined __GLIBC__ && defined _STRING_H
- # define yystrlen strlen
- # else
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static YYSIZE_T
- yystrlen (const char *yystr)
- #else
- static YYSIZE_T
- yystrlen (yystr)
- const char *yystr;
- #endif
- {
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
- }
- # endif
- # endif
- # ifndef yystpcpy
- # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
- # define yystpcpy stpcpy
- # else
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static char *
- yystpcpy (char *yydest, const char *yysrc)
- #else
- static char *
- yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
- #endif
- {
- char *yyd = yydest;
- const char *yys = yysrc;
- while ((*yyd++ = *yys++) != '\0')
- continue;
- return yyd - 1;
- }
- # endif
- # endif
- # ifndef yytnamerr
- 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;
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
-
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
- if (! yyres)
- return yystrlen (yystr);
- return yystpcpy (yyres, yystr) - yyres;
- }
- # endif
- static int
- yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
- {
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-
- const char *yyformat = YY_NULL;
-
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-
- int yycount = 0;
-
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
-
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
- switch (yycount)
- {
- # define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
- # undef YYCASE_
- }
- {
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
- }
- #endif
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static void
- yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
- #else
- static void
- yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- #endif
- {
- YYUSE (yyvaluep);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- switch (yytype)
- {
- default:
- break;
- }
- }
- int yychar;
- #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- # define YY_IGNORE_MAYBE_UNINITIALIZED_END
- #endif
- #ifndef YY_INITIAL_VALUE
- # define YY_INITIAL_VALUE(Value)
- #endif
- YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
- int yynerrs;
- #ifdef YYPARSE_PARAM
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- int
- yyparse (void *YYPARSE_PARAM)
- #else
- int
- yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
- #endif
- #else
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- int
- yyparse (void)
- #else
- int
- yyparse ()
- #endif
- #endif
- {
- int yystate;
-
- int yyerrstatus;
-
-
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
- YYSIZE_T yystacksize;
- int yyn;
- int yyresult;
-
- int yytoken = 0;
-
- YYSTYPE yyval;
- #if YYERROR_VERBOSE
-
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
- #endif
- #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- int yylen = 0;
- yyssp = yyss = yyssa;
- yyvsp = yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
- YYDPRINTF ((stderr, "Starting parse\n"));
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY;
- goto yysetstate;
- yynewstate:
-
- yyssp++;
- yysetstate:
- *yyssp = yystate;
- if (yyss + yystacksize - 1 <= yyssp)
- {
-
- YYSIZE_T yysize = yyssp - yyss + 1;
- #ifdef yyoverflow
- {
-
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
- yyss = yyss1;
- yyvs = yyvs1;
- }
- #else
- # ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
- # else
-
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- # undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
- # endif
- #endif
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
- goto yybackup;
- yybackup:
-
-
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
-
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- if (yyerrstatus)
- yyerrstatus--;
-
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- yychar = YYEMPTY;
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
- goto yynewstate;
- yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
- yyreduce:
-
- yylen = yyr2[yyn];
-
- yyval = yyvsp[1-yylen];
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 4:
- #line 293 "c-exp.y"
- { write_exp_elt_opcode(pstate, OP_TYPE);
- write_exp_elt_type(pstate, (yyvsp[(1) - (1)].tval));
- write_exp_elt_opcode(pstate, OP_TYPE);}
- break;
- case 5:
- #line 297 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_TYPEOF);
- }
- break;
- case 6:
- #line 301 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_TYPE);
- write_exp_elt_type (pstate, (yyvsp[(3) - (4)].tval));
- write_exp_elt_opcode (pstate, OP_TYPE);
- }
- break;
- case 7:
- #line 307 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_DECLTYPE);
- }
- break;
- case 9:
- #line 315 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_COMMA); }
- break;
- case 10:
- #line 320 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_IND); }
- break;
- case 11:
- #line 324 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_ADDR); }
- break;
- case 12:
- #line 328 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_NEG); }
- break;
- case 13:
- #line 332 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_PLUS); }
- break;
- case 14:
- #line 336 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
- break;
- case 15:
- #line 340 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
- break;
- case 16:
- #line 344 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
- break;
- case 17:
- #line 348 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
- break;
- case 18:
- #line 352 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
- break;
- case 19:
- #line 356 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
- break;
- case 20:
- #line 360 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_TYPEID); }
- break;
- case 21:
- #line 364 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_TYPEID); }
- break;
- case 22:
- #line 368 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
- break;
- case 23:
- #line 372 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
- break;
- case 24:
- #line 378 "c-exp.y"
- { mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
- break;
- case 25:
- #line 385 "c-exp.y"
- { struct stoken s;
- mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- s.ptr = "";
- s.length = 0;
- write_exp_string (pstate, s);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
- break;
- case 26:
- #line 395 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- write_destructor_name (pstate, (yyvsp[(4) - (4)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
- break;
- case 27:
- #line 401 "c-exp.y"
- { mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- write_destructor_name (pstate, (yyvsp[(4) - (5)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
- break;
- case 28:
- #line 408 "c-exp.y"
- {
-
- FIXME
- write_exp_elt_opcode (pstate, UNOP_ADDR);
- write_exp_elt_opcode (pstate, STRUCTOP_MPTR); }
- break;
- case 29:
- #line 416 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_MPTR); }
- break;
- case 30:
- #line 420 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
- write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
- break;
- case 31:
- #line 426 "c-exp.y"
- { mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
- write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
- break;
- case 32:
- #line 433 "c-exp.y"
- { struct stoken s;
- mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
- s.ptr = "";
- s.length = 0;
- write_exp_string (pstate, s);
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
- break;
- case 33:
- #line 443 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
- write_destructor_name (pstate, (yyvsp[(4) - (4)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
- break;
- case 34:
- #line 449 "c-exp.y"
- { mark_struct_expression (pstate);
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
- write_destructor_name (pstate, (yyvsp[(4) - (5)].sval));
- write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
- break;
- case 35:
- #line 456 "c-exp.y"
- {
-
- FIXME
- write_exp_elt_opcode (pstate, UNOP_ADDR);
- write_exp_elt_opcode (pstate, STRUCTOP_MEMBER); }
- break;
- case 36:
- #line 464 "c-exp.y"
- { write_exp_elt_opcode (pstate, STRUCTOP_MEMBER); }
- break;
- case 37:
- #line 468 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
- break;
- case 38:
- #line 472 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
- break;
- case 39:
- #line 481 "c-exp.y"
- {
- CORE_ADDR class;
- class = lookup_objc_class (parse_gdbarch (pstate),
- copy_name ((yyvsp[(2) - (2)].tsym).stoken));
- if (class == 0)
- error (_("%s is not an ObjC Class"),
- copy_name ((yyvsp[(2) - (2)].tsym).stoken));
- write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate,
- parse_type (pstate)->builtin_int);
- write_exp_elt_longcst (pstate, (LONGEST) class);
- write_exp_elt_opcode (pstate, OP_LONG);
- start_msglist();
- }
- break;
- case 40:
- #line 497 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- end_msglist (pstate);
- write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- }
- break;
- case 41:
- #line 504 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate,
- parse_type (pstate)->builtin_int);
- write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(2) - (2)].class).class);
- write_exp_elt_opcode (pstate, OP_LONG);
- start_msglist();
- }
- break;
- case 42:
- #line 513 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- end_msglist (pstate);
- write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- }
- break;
- case 43:
- #line 520 "c-exp.y"
- { start_msglist(); }
- break;
- case 44:
- #line 522 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- end_msglist (pstate);
- write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
- }
- break;
- case 45:
- #line 529 "c-exp.y"
- { add_msglist(&(yyvsp[(1) - (1)].sval), 0); }
- break;
- case 49:
- #line 538 "c-exp.y"
- { add_msglist(&(yyvsp[(1) - (3)].sval), 1); }
- break;
- case 50:
- #line 540 "c-exp.y"
- { add_msglist(0, 1); }
- break;
- case 51:
- #line 542 "c-exp.y"
- { add_msglist(0, 0); }
- break;
- case 52:
- #line 548 "c-exp.y"
- { start_arglist (); }
- break;
- case 53:
- #line 550 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_FUNCALL);
- write_exp_elt_longcst (pstate,
- (LONGEST) end_arglist ());
- write_exp_elt_opcode (pstate, OP_FUNCALL); }
- break;
- case 54:
- #line 557 "c-exp.y"
- {
-
- write_exp_elt_opcode (pstate, OP_ADL_FUNC);
- write_exp_elt_block (pstate,
- expression_context_block);
- write_exp_elt_sym (pstate,
- NULL);
- write_exp_string (pstate, (yyvsp[(1) - (2)].ssym).stoken);
- write_exp_elt_opcode (pstate, OP_ADL_FUNC);
-
- start_arglist ();
- }
- break;
- case 55:
- #line 574 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_FUNCALL);
- write_exp_elt_longcst (pstate,
- (LONGEST) end_arglist ());
- write_exp_elt_opcode (pstate, OP_FUNCALL);
- }
- break;
- case 56:
- #line 583 "c-exp.y"
- { start_arglist (); }
- break;
- case 58:
- #line 590 "c-exp.y"
- { arglist_len = 1; }
- break;
- case 59:
- #line 594 "c-exp.y"
- { arglist_len++; }
- break;
- case 60:
- #line 598 "c-exp.y"
- { int i;
- VEC (type_ptr) *type_list = (yyvsp[(3) - (5)].tvec);
- struct type *type_elt;
- LONGEST len = VEC_length (type_ptr, type_list);
- write_exp_elt_opcode (pstate, TYPE_INSTANCE);
- write_exp_elt_longcst (pstate, len);
- for (i = 0;
- VEC_iterate (type_ptr, type_list, i, type_elt);
- ++i)
- write_exp_elt_type (pstate, type_elt);
- write_exp_elt_longcst(pstate, len);
- write_exp_elt_opcode (pstate, TYPE_INSTANCE);
- VEC_free (type_ptr, type_list);
- }
- break;
- case 61:
- #line 616 "c-exp.y"
- { (yyval.lval) = end_arglist () - 1; }
- break;
- case 62:
- #line 619 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_ARRAY);
- write_exp_elt_longcst (pstate, (LONGEST) 0);
- write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[(3) - (3)].lval));
- write_exp_elt_opcode (pstate, OP_ARRAY); }
- break;
- case 63:
- #line 626 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_MEMVAL_TYPE); }
- break;
- case 64:
- #line 630 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
- break;
- case 65:
- #line 634 "c-exp.y"
- { }
- break;
- case 66:
- #line 640 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
- break;
- case 67:
- #line 644 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_MUL); }
- break;
- case 68:
- #line 648 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_DIV); }
- break;
- case 69:
- #line 652 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_REM); }
- break;
- case 70:
- #line 656 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_ADD); }
- break;
- case 71:
- #line 660 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_SUB); }
- break;
- case 72:
- #line 664 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_LSH); }
- break;
- case 73:
- #line 668 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_RSH); }
- break;
- case 74:
- #line 672 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
- break;
- case 75:
- #line 676 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
- break;
- case 76:
- #line 680 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_LEQ); }
- break;
- case 77:
- #line 684 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_GEQ); }
- break;
- case 78:
- #line 688 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_LESS); }
- break;
- case 79:
- #line 692 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_GTR); }
- break;
- case 80:
- #line 696 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
- break;
- case 81:
- #line 700 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
- break;
- case 82:
- #line 704 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
- break;
- case 83:
- #line 708 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
- break;
- case 84:
- #line 712 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
- break;
- case 85:
- #line 716 "c-exp.y"
- { write_exp_elt_opcode (pstate, TERNOP_COND); }
- break;
- case 86:
- #line 720 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
- break;
- case 87:
- #line 724 "c-exp.y"
- { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode (pstate, (yyvsp[(2) - (3)].opcode));
- write_exp_elt_opcode (pstate,
- BINOP_ASSIGN_MODIFY); }
- break;
- case 88:
- #line 731 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_int).type);
- write_exp_elt_longcst (pstate, (LONGEST) ((yyvsp[(1) - (1)].typed_val_int).val));
- write_exp_elt_opcode (pstate, OP_LONG); }
- break;
- case 89:
- #line 738 "c-exp.y"
- {
- struct stoken_vector vec;
- vec.len = 1;
- vec.tokens = &(yyvsp[(1) - (1)].tsval);
- write_exp_string_vector (pstate, (yyvsp[(1) - (1)].tsval).type, &vec);
- }
- break;
- case 90:
- #line 747 "c-exp.y"
- { YYSTYPE val;
- parse_number (pstate, (yyvsp[(1) - (1)].ssym).stoken.ptr,
- (yyvsp[(1) - (1)].ssym).stoken.length, 0, &val);
- write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate, val.typed_val_int.type);
- write_exp_elt_longcst (pstate,
- (LONGEST) val.typed_val_int.val);
- write_exp_elt_opcode (pstate, OP_LONG);
- }
- break;
- case 91:
- #line 760 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_DOUBLE);
- write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_float).type);
- write_exp_elt_dblcst (pstate, (yyvsp[(1) - (1)].typed_val_float).dval);
- write_exp_elt_opcode (pstate, OP_DOUBLE); }
- break;
- case 92:
- #line 767 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_DECFLOAT);
- write_exp_elt_type (pstate, (yyvsp[(1) - (1)].typed_val_decfloat).type);
- write_exp_elt_decfloatcst (pstate, (yyvsp[(1) - (1)].typed_val_decfloat).val);
- write_exp_elt_opcode (pstate, OP_DECFLOAT); }
- break;
- case 94:
- #line 777 "c-exp.y"
- {
- write_dollar_variable (pstate, (yyvsp[(1) - (1)].sval));
- }
- break;
- case 95:
- #line 783 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, OP_OBJC_SELECTOR);
- write_exp_string (pstate, (yyvsp[(3) - (4)].sval));
- write_exp_elt_opcode (pstate, OP_OBJC_SELECTOR); }
- break;
- case 96:
- #line 790 "c-exp.y"
- { struct type *type = (yyvsp[(3) - (4)].tval);
- write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate, lookup_signed_typename
- (parse_language (pstate),
- parse_gdbarch (pstate),
- "int"));
- CHECK_TYPEDEF (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_REF)
- type = check_typedef (TYPE_TARGET_TYPE (type));
- write_exp_elt_longcst (pstate,
- (LONGEST) TYPE_LENGTH (type));
- write_exp_elt_opcode (pstate, OP_LONG); }
- break;
- case 97:
- #line 810 "c-exp.y"
- { write_exp_elt_opcode (pstate,
- UNOP_REINTERPRET_CAST); }
- break;
- case 98:
- #line 815 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
- break;
- case 99:
- #line 819 "c-exp.y"
- { write_exp_elt_opcode (pstate, UNOP_DYNAMIC_CAST); }
- break;
- case 100:
- #line 823 "c-exp.y"
- {
- write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
- break;
- case 101:
- #line 830 "c-exp.y"
- {
-
- struct typed_stoken *vec = XNEW (struct typed_stoken);
- (yyval.svec).len = 1;
- (yyval.svec).tokens = vec;
- vec->type = (yyvsp[(1) - (1)].tsval).type;
- vec->length = (yyvsp[(1) - (1)].tsval).length;
- vec->ptr = xmalloc ((yyvsp[(1) - (1)].tsval).length + 1);
- memcpy (vec->ptr, (yyvsp[(1) - (1)].tsval).ptr, (yyvsp[(1) - (1)].tsval).length + 1);
- }
- break;
- case 102:
- #line 847 "c-exp.y"
- {
-
- char *p;
- ++(yyval.svec).len;
- (yyval.svec).tokens = xrealloc ((yyval.svec).tokens,
- (yyval.svec).len * sizeof (struct typed_stoken));
- p = xmalloc ((yyvsp[(2) - (2)].tsval).length + 1);
- memcpy (p, (yyvsp[(2) - (2)].tsval).ptr, (yyvsp[(2) - (2)].tsval).length + 1);
- (yyval.svec).tokens[(yyval.svec).len - 1].type = (yyvsp[(2) - (2)].tsval).type;
- (yyval.svec).tokens[(yyval.svec).len - 1].length = (yyvsp[(2) - (2)].tsval).length;
- (yyval.svec).tokens[(yyval.svec).len - 1].ptr = p;
- }
- break;
- case 103:
- #line 865 "c-exp.y"
- {
- int i;
- enum c_string_type type = C_STRING;
- for (i = 0; i < (yyvsp[(1) - (1)].svec).len; ++i)
- {
- switch ((yyvsp[(1) - (1)].svec).tokens[i].type)
- {
- case C_STRING:
- break;
- case C_WIDE_STRING:
- case C_STRING_16:
- case C_STRING_32:
- if (type != C_STRING
- && type != (yyvsp[(1) - (1)].svec).tokens[i].type)
- error (_("Undefined string concatenation."));
- type = (yyvsp[(1) - (1)].svec).tokens[i].type;
- break;
- default:
-
- internal_error (__FILE__, __LINE__,
- "unrecognized type in string concatenation");
- }
- }
- write_exp_string_vector (pstate, type, &(yyvsp[(1) - (1)].svec));
- for (i = 0; i < (yyvsp[(1) - (1)].svec).len; ++i)
- xfree ((yyvsp[(1) - (1)].svec).tokens[i].ptr);
- xfree ((yyvsp[(1) - (1)].svec).tokens);
- }
- break;
- case 104:
- #line 900 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING);
- write_exp_string (pstate, (yyvsp[(1) - (1)].sval));
- write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING); }
- break;
- case 105:
- #line 907 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate,
- parse_type (pstate)->builtin_bool);
- write_exp_elt_longcst (pstate, (LONGEST) 1);
- write_exp_elt_opcode (pstate, OP_LONG); }
- break;
- case 106:
- #line 915 "c-exp.y"
- { write_exp_elt_opcode (pstate, OP_LONG);
- write_exp_elt_type (pstate,
- parse_type (pstate)->builtin_bool);
- write_exp_elt_longcst (pstate, (LONGEST) 0);
- write_exp_elt_opcode (pstate, OP_LONG); }
- break;
- case 107:
- #line 925 "c-exp.y"
- {
- if ((yyvsp[(1) - (1)].ssym).sym)
- (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[(1) - (1)].ssym).sym);
- else
- error (_("No file or function \"%s\"."),
- copy_name ((yyvsp[(1) - (1)].ssym).stoken));
- }
- break;
- case 108:
- #line 933 "c-exp.y"
- {
- (yyval.bval) = (yyvsp[(1) - (1)].bval);
- }
- break;
- case 109:
- #line 939 "c-exp.y"
- { struct symbol *tem
- = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
- VAR_DOMAIN, NULL);
- if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
- error (_("No function \"%s\" in specified context."),
- copy_name ((yyvsp[(3) - (3)].sval)));
- (yyval.bval) = SYMBOL_BLOCK_VALUE (tem); }
- break;
- case 110:
- #line 949 "c-exp.y"
- { struct symbol *sym = (yyvsp[(1) - (2)].ssym).sym;
- if (sym == NULL || !SYMBOL_IS_ARGUMENT (sym)
- || !symbol_read_needs_frame (sym))
- error (_("@entry can be used only for function "
- "parameters, not for \"%s\""),
- copy_name ((yyvsp[(1) - (2)].ssym).stoken));
- write_exp_elt_opcode (pstate, OP_VAR_ENTRY_VALUE);
- write_exp_elt_sym (pstate, sym);
- write_exp_elt_opcode (pstate, OP_VAR_ENTRY_VALUE);
- }
- break;
- case 111:
- #line 964 "c-exp.y"
- { struct symbol *sym;
- sym = lookup_symbol (copy_name ((yyvsp[(3) - (3)].sval)), (yyvsp[(1) - (3)].bval),
- VAR_DOMAIN, NULL);
- if (sym == 0)
- error (_("No symbol \"%s\" in specified context."),
- copy_name ((yyvsp[(3) - (3)].sval)));
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0
- || contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- }
- write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-
- write_exp_elt_block (pstate, block_found);
- write_exp_elt_sym (pstate, sym);
- write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
- break;
- case 112:
- #line 986 "c-exp.y"
- {
- struct type *type = (yyvsp[(1) - (3)].tsym).type;
- CHECK_TYPEDEF (type);
- if (!type_aggregate_p (type))
- error (_("`%s' is not defined as an aggregate type."),
- TYPE_SAFE_NAME (type));
- write_exp_elt_opcode (pstate, OP_SCOPE);
- write_exp_elt_type (pstate, type);
- write_exp_string (pstate, (yyvsp[(3) - (3)].sval));
- write_exp_elt_opcode (pstate, OP_SCOPE);
- }
- break;
- case 113:
- #line 999 "c-exp.y"
- {
- struct type *type = (yyvsp[(1) - (4)].tsym).type;
- struct stoken tmp_token;
- char *buf;
- CHECK_TYPEDEF (type);
- if (!type_aggregate_p (type))
- error (_("`%s' is not defined as an aggregate type."),
- TYPE_SAFE_NAME (type));
- buf = alloca ((yyvsp[(4) - (4)].sval).length + 2);
- tmp_token.ptr = buf;
- tmp_token.length = (yyvsp[(4) - (4)].sval).length + 1;
- buf[0] = '~';
- memcpy (buf+1, (yyvsp[(4) - (4)].sval).ptr, (yyvsp[(4) - (4)].sval).length);
- buf[tmp_token.length] = 0;
-
- destructor_name_p (tmp_token.ptr, (yyvsp[(1) - (4)].tsym).type);
- write_exp_elt_opcode (pstate, OP_SCOPE);
- write_exp_elt_type (pstate, type);
- write_exp_string (pstate, tmp_token);
- write_exp_elt_opcode (pstate, OP_SCOPE);
- }
- break;
- case 114:
- #line 1023 "c-exp.y"
- {
- char *copy = copy_name ((yyvsp[(3) - (5)].sval));
- error (_("No type \"%s\" within class "
- "or namespace \"%s\"."),
- copy, TYPE_SAFE_NAME ((yyvsp[(1) - (5)].tsym).type));
- }
- break;
- case 116:
- #line 1033 "c-exp.y"
- {
- char *name = copy_name ((yyvsp[(2) - (2)].ssym).stoken);
- struct symbol *sym;
- struct bound_minimal_symbol msymbol;
- sym =
- lookup_symbol (name, (const struct block *) NULL,
- VAR_DOMAIN, NULL);
- if (sym)
- {
- write_exp_elt_opcode (pstate, OP_VAR_VALUE);
- write_exp_elt_block (pstate, NULL);
- write_exp_elt_sym (pstate, sym);
- write_exp_elt_opcode (pstate, OP_VAR_VALUE);
- break;
- }
- msymbol = lookup_bound_minimal_symbol (name);
- if (msymbol.minsym != NULL)
- write_exp_msymbol (pstate, msymbol);
- else if (!have_full_symbols () && !have_partial_symbols ())
- error (_("No symbol table is loaded. Use the \"file\" command."));
- else
- error (_("No symbol \"%s\" in current context."), name);
- }
- break;
- case 117:
- #line 1061 "c-exp.y"
- { struct symbol *sym = (yyvsp[(1) - (1)].ssym).sym;
- if (sym)
- {
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0
- || contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- }
- write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-
- write_exp_elt_block (pstate, NULL);
- write_exp_elt_sym (pstate, sym);
- write_exp_elt_opcode (pstate, OP_VAR_VALUE);
- }
- else if ((yyvsp[(1) - (1)].ssym).is_a_field_of_this)
- {
-
- if (innermost_block == 0
- || contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- write_exp_elt_opcode (pstate, OP_THIS);
- write_exp_elt_opcode (pstate, OP_THIS);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- write_exp_string (pstate, (yyvsp[(1) - (1)].ssym).stoken);
- write_exp_elt_opcode (pstate, STRUCTOP_PTR);
- }
- else
- {
- struct bound_minimal_symbol msymbol;
- char *arg = copy_name ((yyvsp[(1) - (1)].ssym).stoken);
- msymbol =
- lookup_bound_minimal_symbol (arg);
- if (msymbol.minsym != NULL)
- write_exp_msymbol (pstate, msymbol);
- else if (!have_full_symbols () && !have_partial_symbols ())
- error (_("No symbol table is loaded. Use the \"file\" command."));
- else
- error (_("No symbol \"%s\" in current context."),
- copy_name ((yyvsp[(1) - (1)].ssym).stoken));
- }
- }
- break;
- case 118:
- #line 1115 "c-exp.y"
- { insert_type_address_space (pstate, copy_name ((yyvsp[(2) - (2)].ssym).stoken)); }
- break;
- case 126:
- #line 1136 "c-exp.y"
- { insert_type (tp_pointer); }
- break;
- case 128:
- #line 1139 "c-exp.y"
- { insert_type (tp_pointer); }
- break;
- case 130:
- #line 1142 "c-exp.y"
- { insert_type (tp_reference); }
- break;
- case 131:
- #line 1144 "c-exp.y"
- { insert_type (tp_reference); }
- break;
- case 132:
- #line 1148 "c-exp.y"
- {
- (yyval.type_stack) = get_type_stack ();
-
- make_cleanup (type_stack_cleanup, (yyval.type_stack));
- }
- break;
- case 133:
- #line 1157 "c-exp.y"
- { (yyval.type_stack) = append_type_stack ((yyvsp[(2) - (2)].type_stack), (yyvsp[(1) - (2)].type_stack)); }
- break;
- case 136:
- #line 1163 "c-exp.y"
- { (yyval.type_stack) = (yyvsp[(2) - (3)].type_stack); }
- break;
- case 137:
- #line 1165 "c-exp.y"
- {
- push_type_stack ((yyvsp[(1) - (2)].type_stack));
- push_type_int ((yyvsp[(2) - (2)].lval));
- push_type (tp_array);
- (yyval.type_stack) = get_type_stack ();
- }
- break;
- case 138:
- #line 1172 "c-exp.y"
- {
- push_type_int ((yyvsp[(1) - (1)].lval));
- push_type (tp_array);
- (yyval.type_stack) = get_type_stack ();
- }
- break;
- case 139:
- #line 1179 "c-exp.y"
- {
- push_type_stack ((yyvsp[(1) - (2)].type_stack));
- push_typelist ((yyvsp[(2) - (2)].tvec));
- (yyval.type_stack) = get_type_stack ();
- }
- break;
- case 140:
- #line 1185 "c-exp.y"
- {
- push_typelist ((yyvsp[(1) - (1)].tvec));
- (yyval.type_stack) = get_type_stack ();
- }
- break;
- case 141:
- #line 1192 "c-exp.y"
- { (yyval.lval) = -1; }
- break;
- case 142:
- #line 1194 "c-exp.y"
- { (yyval.lval) = -1; }
- break;
- case 143:
- #line 1196 "c-exp.y"
- { (yyval.lval) = (yyvsp[(2) - (3)].typed_val_int).val; }
- break;
- case 144:
- #line 1198 "c-exp.y"
- { (yyval.lval) = (yyvsp[(2) - (3)].typed_val_int).val; }
- break;
- case 145:
- #line 1202 "c-exp.y"
- { (yyval.tvec) = NULL; }
- break;
- case 146:
- #line 1204 "c-exp.y"
- { (yyval.tvec) = (yyvsp[(2) - (3)].tvec); }
- break;
- case 148:
- #line 1220 "c-exp.y"
- { (yyval.tval) = (yyvsp[(1) - (1)].tsym).type; }
- break;
- case 149:
- #line 1222 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "int"); }
- break;
- case 150:
- #line 1226 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 151:
- #line 1230 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 152:
- #line 1234 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 153:
- #line 1238 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 154:
- #line 1242 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 155:
- #line 1246 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 156:
- #line 1250 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 157:
- #line 1254 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 158:
- #line 1258 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long"); }
- break;
- case 159:
- #line 1262 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 160:
- #line 1266 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 161:
- #line 1270 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 162:
- #line 1274 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 163:
- #line 1278 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 164:
- #line 1282 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 165:
- #line 1286 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 166:
- #line 1290 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 167:
- #line 1294 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 168:
- #line 1298 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long long"); }
- break;
- case 169:
- #line 1302 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 170:
- #line 1306 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 171:
- #line 1310 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 172:
- #line 1314 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 173:
- #line 1318 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 174:
- #line 1322 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short"); }
- break;
- case 175:
- #line 1326 "c-exp.y"
- { (yyval.tval) = lookup_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "double",
- (struct block *) NULL,
- 0); }
- break;
- case 176:
- #line 1332 "c-exp.y"
- { (yyval.tval) = lookup_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long double",
- (struct block *) NULL,
- 0); }
- break;
- case 177:
- #line 1338 "c-exp.y"
- { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
- expression_context_block); }
- break;
- case 178:
- #line 1341 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
- (yyval.tval) = NULL;
- }
- break;
- case 179:
- #line 1346 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[(2) - (3)].sval).ptr,
- (yyvsp[(2) - (3)].sval).length);
- (yyval.tval) = NULL;
- }
- break;
- case 180:
- #line 1352 "c-exp.y"
- { (yyval.tval) = lookup_struct (copy_name ((yyvsp[(2) - (2)].sval)),
- expression_context_block); }
- break;
- case 181:
- #line 1355 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_CLASS, "", 0);
- (yyval.tval) = NULL;
- }
- break;
- case 182:
- #line 1360 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_CLASS, (yyvsp[(2) - (3)].sval).ptr,
- (yyvsp[(2) - (3)].sval).length);
- (yyval.tval) = NULL;
- }
- break;
- case 183:
- #line 1366 "c-exp.y"
- { (yyval.tval) = lookup_union (copy_name ((yyvsp[(2) - (2)].sval)),
- expression_context_block); }
- break;
- case 184:
- #line 1369 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_UNION, "", 0);
- (yyval.tval) = NULL;
- }
- break;
- case 185:
- #line 1374 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_UNION, (yyvsp[(2) - (3)].sval).ptr,
- (yyvsp[(2) - (3)].sval).length);
- (yyval.tval) = NULL;
- }
- break;
- case 186:
- #line 1380 "c-exp.y"
- { (yyval.tval) = lookup_enum (copy_name ((yyvsp[(2) - (2)].sval)),
- expression_context_block); }
- break;
- case 187:
- #line 1383 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_ENUM, "", 0);
- (yyval.tval) = NULL;
- }
- break;
- case 188:
- #line 1388 "c-exp.y"
- {
- mark_completion_tag (TYPE_CODE_ENUM, (yyvsp[(2) - (3)].sval).ptr,
- (yyvsp[(2) - (3)].sval).length);
- (yyval.tval) = NULL;
- }
- break;
- case 189:
- #line 1394 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- TYPE_NAME((yyvsp[(2) - (2)].tsym).type)); }
- break;
- case 190:
- #line 1398 "c-exp.y"
- { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "int"); }
- break;
- case 191:
- #line 1402 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- TYPE_NAME((yyvsp[(2) - (2)].tsym).type)); }
- break;
- case 192:
- #line 1406 "c-exp.y"
- { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "int"); }
- break;
- case 193:
- #line 1413 "c-exp.y"
- { (yyval.tval) = lookup_template_type(copy_name((yyvsp[(2) - (5)].sval)), (yyvsp[(4) - (5)].tval),
- expression_context_block);
- }
- break;
- case 194:
- #line 1417 "c-exp.y"
- { (yyval.tval) = follow_types ((yyvsp[(2) - (2)].tval)); }
- break;
- case 195:
- #line 1419 "c-exp.y"
- { (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval)); }
- break;
- case 197:
- #line 1424 "c-exp.y"
- {
- (yyval.tsym).stoken.ptr = "int";
- (yyval.tsym).stoken.length = 3;
- (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "int");
- }
- break;
- case 198:
- #line 1432 "c-exp.y"
- {
- (yyval.tsym).stoken.ptr = "long";
- (yyval.tsym).stoken.length = 4;
- (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "long");
- }
- break;
- case 199:
- #line 1440 "c-exp.y"
- {
- (yyval.tsym).stoken.ptr = "short";
- (yyval.tsym).stoken.length = 5;
- (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
- parse_gdbarch (pstate),
- "short");
- }
- break;
- case 200:
- #line 1451 "c-exp.y"
- { check_parameter_typelist ((yyvsp[(1) - (1)].tvec)); }
- break;
- case 201:
- #line 1453 "c-exp.y"
- {
- VEC_safe_push (type_ptr, (yyvsp[(1) - (3)].tvec), NULL);
- check_parameter_typelist ((yyvsp[(1) - (3)].tvec));
- (yyval.tvec) = (yyvsp[(1) - (3)].tvec);
- }
- break;
- case 202:
- #line 1462 "c-exp.y"
- {
- VEC (type_ptr) *typelist = NULL;
- VEC_safe_push (type_ptr, typelist, (yyvsp[(1) - (1)].tval));
- (yyval.tvec) = typelist;
- }
- break;
- case 203:
- #line 1468 "c-exp.y"
- {
- VEC_safe_push (type_ptr, (yyvsp[(1) - (3)].tvec), (yyvsp[(3) - (3)].tval));
- (yyval.tvec) = (yyvsp[(1) - (3)].tvec);
- }
- break;
- case 205:
- #line 1476 "c-exp.y"
- {
- push_type_stack ((yyvsp[(2) - (2)].type_stack));
- (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval));
- }
- break;
- case 206:
- #line 1483 "c-exp.y"
- { (yyval.tval) = follow_types ((yyvsp[(1) - (2)].tval)); }
- break;
- case 211:
- #line 1495 "c-exp.y"
- { insert_type (tp_const);
- insert_type (tp_volatile);
- }
- break;
- case 212:
- #line 1499 "c-exp.y"
- { insert_type (tp_const); }
- break;
- case 213:
- #line 1501 "c-exp.y"
- { insert_type (tp_volatile); }
- break;
- case 214:
- #line 1505 "c-exp.y"
- { (yyval.sval) = operator_stoken (" new"); }
- break;
- case 215:
- #line 1507 "c-exp.y"
- { (yyval.sval) = operator_stoken (" delete"); }
- break;
- case 216:
- #line 1509 "c-exp.y"
- { (yyval.sval) = operator_stoken (" new[]"); }
- break;
- case 217:
- #line 1511 "c-exp.y"
- { (yyval.sval) = operator_stoken (" delete[]"); }
- break;
- case 218:
- #line 1513 "c-exp.y"
- { (yyval.sval) = operator_stoken (" new[]"); }
- break;
- case 219:
- #line 1515 "c-exp.y"
- { (yyval.sval) = operator_stoken (" delete[]"); }
- break;
- case 220:
- #line 1517 "c-exp.y"
- { (yyval.sval) = operator_stoken ("+"); }
- break;
- case 221:
- #line 1519 "c-exp.y"
- { (yyval.sval) = operator_stoken ("-"); }
- break;
- case 222:
- #line 1521 "c-exp.y"
- { (yyval.sval) = operator_stoken ("*"); }
- break;
- case 223:
- #line 1523 "c-exp.y"
- { (yyval.sval) = operator_stoken ("/"); }
- break;
- case 224:
- #line 1525 "c-exp.y"
- { (yyval.sval) = operator_stoken ("%"); }
- break;
- case 225:
- #line 1527 "c-exp.y"
- { (yyval.sval) = operator_stoken ("^"); }
- break;
- case 226:
- #line 1529 "c-exp.y"
- { (yyval.sval) = operator_stoken ("&"); }
- break;
- case 227:
- #line 1531 "c-exp.y"
- { (yyval.sval) = operator_stoken ("|"); }
- break;
- case 228:
- #line 1533 "c-exp.y"
- { (yyval.sval) = operator_stoken ("~"); }
- break;
- case 229:
- #line 1535 "c-exp.y"
- { (yyval.sval) = operator_stoken ("!"); }
- break;
- case 230:
- #line 1537 "c-exp.y"
- { (yyval.sval) = operator_stoken ("="); }
- break;
- case 231:
- #line 1539 "c-exp.y"
- { (yyval.sval) = operator_stoken ("<"); }
- break;
- case 232:
- #line 1541 "c-exp.y"
- { (yyval.sval) = operator_stoken (">"); }
- break;
- case 233:
- #line 1543 "c-exp.y"
- { const char *op = "unknown";
- switch ((yyvsp[(2) - (2)].opcode))
- {
- case BINOP_RSH:
- op = ">>=";
- break;
- case BINOP_LSH:
- op = "<<=";
- break;
- case BINOP_ADD:
- op = "+=";
- break;
- case BINOP_SUB:
- op = "-=";
- break;
- case BINOP_MUL:
- op = "*=";
- break;
- case BINOP_DIV:
- op = "/=";
- break;
- case BINOP_REM:
- op = "%=";
- break;
- case BINOP_BITWISE_IOR:
- op = "|=";
- break;
- case BINOP_BITWISE_AND:
- op = "&=";
- break;
- case BINOP_BITWISE_XOR:
- op = "^=";
- break;
- default:
- break;
- }
- (yyval.sval) = operator_stoken (op);
- }
- break;
- case 234:
- #line 1583 "c-exp.y"
- { (yyval.sval) = operator_stoken ("<<"); }
- break;
- case 235:
- #line 1585 "c-exp.y"
- { (yyval.sval) = operator_stoken (">>"); }
- break;
- case 236:
- #line 1587 "c-exp.y"
- { (yyval.sval) = operator_stoken ("=="); }
- break;
- case 237:
- #line 1589 "c-exp.y"
- { (yyval.sval) = operator_stoken ("!="); }
- break;
- case 238:
- #line 1591 "c-exp.y"
- { (yyval.sval) = operator_stoken ("<="); }
- break;
- case 239:
- #line 1593 "c-exp.y"
- { (yyval.sval) = operator_stoken (">="); }
- break;
- case 240:
- #line 1595 "c-exp.y"
- { (yyval.sval) = operator_stoken ("&&"); }
- break;
- case 241:
- #line 1597 "c-exp.y"
- { (yyval.sval) = operator_stoken ("||"); }
- break;
- case 242:
- #line 1599 "c-exp.y"
- { (yyval.sval) = operator_stoken ("++"); }
- break;
- case 243:
- #line 1601 "c-exp.y"
- { (yyval.sval) = operator_stoken ("--"); }
- break;
- case 244:
- #line 1603 "c-exp.y"
- { (yyval.sval) = operator_stoken (","); }
- break;
- case 245:
- #line 1605 "c-exp.y"
- { (yyval.sval) = operator_stoken ("->*"); }
- break;
- case 246:
- #line 1607 "c-exp.y"
- { (yyval.sval) = operator_stoken ("->"); }
- break;
- case 247:
- #line 1609 "c-exp.y"
- { (yyval.sval) = operator_stoken ("()"); }
- break;
- case 248:
- #line 1611 "c-exp.y"
- { (yyval.sval) = operator_stoken ("[]"); }
- break;
- case 249:
- #line 1613 "c-exp.y"
- { (yyval.sval) = operator_stoken ("[]"); }
- break;
- case 250:
- #line 1615 "c-exp.y"
- { char *name;
- long length;
- struct ui_file *buf = mem_fileopen ();
- c_print_type ((yyvsp[(2) - (2)].tval), NULL, buf, -1, 0,
- &type_print_raw_options);
- name = ui_file_xstrdup (buf, &length);
- ui_file_delete (buf);
- (yyval.sval) = operator_stoken (name);
- xfree (name);
- }
- break;
- case 251:
- #line 1630 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
- break;
- case 252:
- #line 1631 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
- break;
- case 253:
- #line 1632 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].tsym).stoken; }
- break;
- case 254:
- #line 1633 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
- break;
- case 255:
- #line 1634 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].ssym).stoken; }
- break;
- case 256:
- #line 1635 "c-exp.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
- break;
- case 259:
- #line 1648 "c-exp.y"
- {
- struct field_of_this_result is_a_field_of_this;
- (yyval.ssym).stoken = (yyvsp[(1) - (1)].sval);
- (yyval.ssym).sym = lookup_symbol ((yyvsp[(1) - (1)].sval).ptr,
- expression_context_block,
- VAR_DOMAIN,
- &is_a_field_of_this);
- (yyval.ssym).is_a_field_of_this
- = is_a_field_of_this.type != NULL;
- }
- break;
- #line 4270 "c-exp.c"
- default: break;
- }
-
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- *++yyvsp = yyval;
-
- yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
- goto yynewstate;
- yyerrlab:
-
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- if (!yyerrstatus)
- {
- ++yynerrs;
- #if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
- #else
- # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
- # undef YYSYNTAX_ERROR
- #endif
- }
- if (yyerrstatus == 3)
- {
-
- if (yychar <= YYEOF)
- {
-
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- goto yyerrlab1;
- yyerrorlab:
-
- if ( 0)
- goto yyerrorlab;
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
- yyerrlab1:
- yyerrstatus = 3;
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- if (yyssp == yyss)
- YYABORT;
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
- yystate = yyn;
- goto yynewstate;
- yyacceptlab:
- yyresult = 0;
- goto yyreturn;
- yyabortlab:
- yyresult = 1;
- goto yyreturn;
- #if !defined yyoverflow || YYERROR_VERBOSE
- yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
-
- #endif
- yyreturn:
- if (yychar != YYEMPTY)
- {
-
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
-
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
- #ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
- #endif
- #if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- #endif
-
- return YYID (yyresult);
- }
- #line 1662 "c-exp.y"
- static void
- write_destructor_name (struct parser_state *par_state, struct stoken token)
- {
- char *copy = alloca (token.length + 1);
- copy[0] = '~';
- memcpy (©[1], token.ptr, token.length);
- token.ptr = copy;
- ++token.length;
- write_exp_string (par_state, token);
- }
- static struct stoken
- operator_stoken (const char *op)
- {
- static const char *operator_string = "operator";
- struct stoken st = { NULL, 0 };
- char *buf;
- st.length = strlen (operator_string) + strlen (op);
- buf = xmalloc (st.length + 1);
- strcpy (buf, operator_string);
- strcat (buf, op);
- st.ptr = buf;
-
- make_cleanup (xfree, buf);
- return st;
- };
- static int
- type_aggregate_p (struct type *type)
- {
- return (TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION
- || TYPE_CODE (type) == TYPE_CODE_NAMESPACE
- || (TYPE_CODE (type) == TYPE_CODE_ENUM
- && TYPE_DECLARED_CLASS (type)));
- }
- static void
- check_parameter_typelist (VEC (type_ptr) *params)
- {
- struct type *type;
- int ix;
- for (ix = 0; VEC_iterate (type_ptr, params, ix, type); ++ix)
- {
- if (type != NULL && TYPE_CODE (check_typedef (type)) == TYPE_CODE_VOID)
- {
- if (ix == 0)
- {
- if (VEC_length (type_ptr, params) == 1)
- {
-
- break;
- }
- VEC_free (type_ptr, params);
- error (_("parameter types following 'void'"));
- }
- else
- {
- VEC_free (type_ptr, params);
- error (_("'void' invalid as parameter type"));
- }
- }
- }
- }
- static int
- parse_number (struct parser_state *par_state,
- const char *buf, int len, int parsed_float, YYSTYPE *putithere)
- {
- FIXME
- LONGEST n = 0;
- LONGEST prevn = 0;
- ULONGEST un;
- int i = 0;
- int c;
- int base = input_radix;
- int unsigned_p = 0;
-
- int long_p = 0;
-
- int found_suffix = 0;
- ULONGEST high_bit;
- struct type *signed_type;
- struct type *unsigned_type;
- char *p;
- p = alloca (len);
- memcpy (p, buf, len);
- if (parsed_float)
- {
-
- if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'f')
- {
- p[len - 2] = '\0';
- putithere->typed_val_decfloat.type
- = parse_type (par_state)->builtin_decfloat;
- decimal_from_string (putithere->typed_val_decfloat.val, 4,
- gdbarch_byte_order (parse_gdbarch (par_state)),
- p);
- p[len - 2] = 'd';
- return DECFLOAT;
- }
- if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'd')
- {
- p[len - 2] = '\0';
- putithere->typed_val_decfloat.type
- = parse_type (par_state)->builtin_decdouble;
- decimal_from_string (putithere->typed_val_decfloat.val, 8,
- gdbarch_byte_order (parse_gdbarch (par_state)),
- p);
- p[len - 2] = 'd';
- return DECFLOAT;
- }
- if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'l')
- {
- p[len - 2] = '\0';
- putithere->typed_val_decfloat.type
- = parse_type (par_state)->builtin_declong;
- decimal_from_string (putithere->typed_val_decfloat.val, 16,
- gdbarch_byte_order (parse_gdbarch (par_state)),
- p);
- p[len - 2] = 'd';
- return DECFLOAT;
- }
- if (! parse_c_float (parse_gdbarch (par_state), p, len,
- &putithere->typed_val_float.dval,
- &putithere->typed_val_float.type))
- return ERROR;
- return FLOAT;
- }
-
- if (p[0] == '0' && len > 1)
- switch (p[1])
- {
- case 'x':
- case 'X':
- if (len >= 3)
- {
- p += 2;
- base = 16;
- len -= 2;
- }
- break;
- case 'b':
- case 'B':
- if (len >= 3)
- {
- p += 2;
- base = 2;
- len -= 2;
- }
- break;
- case 't':
- case 'T':
- case 'd':
- case 'D':
- if (len >= 3)
- {
- p += 2;
- base = 10;
- len -= 2;
- }
- break;
- default:
- base = 8;
- break;
- }
- while (len-- > 0)
- {
- c = *p++;
- if (c >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- if (c != 'l' && c != 'u')
- n *= base;
- if (c >= '0' && c <= '9')
- {
- if (found_suffix)
- return ERROR;
- n += i = c - '0';
- }
- else
- {
- if (base > 10 && c >= 'a' && c <= 'f')
- {
- if (found_suffix)
- return ERROR;
- n += i = c - 'a' + 10;
- }
- else if (c == 'l')
- {
- ++long_p;
- found_suffix = 1;
- }
- else if (c == 'u')
- {
- unsigned_p = 1;
- found_suffix = 1;
- }
- else
- return ERROR;
- }
- if (i >= base)
- return ERROR;
-
- FIXME
- if (c != 'l' && c != 'u' && (prevn >= n) && n != 0)
- unsigned_p = 1;
-
- FIXME
- if (c != 'l' && c != 'u' && n != 0)
- {
- if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
- error (_("Numeric constant too large."));
- }
- prevn = n;
- }
-
- un = (ULONGEST)n >> 2;
- if (long_p == 0
- && (un >> (gdbarch_int_bit (parse_gdbarch (par_state)) - 2)) == 0)
- {
- high_bit
- = ((ULONGEST)1) << (gdbarch_int_bit (parse_gdbarch (par_state)) - 1);
-
- unsigned_type = parse_type (par_state)->builtin_unsigned_int;
- signed_type = parse_type (par_state)->builtin_int;
- }
- else if (long_p <= 1
- && (un >> (gdbarch_long_bit (parse_gdbarch (par_state)) - 2)) == 0)
- {
- high_bit
- = ((ULONGEST)1) << (gdbarch_long_bit (parse_gdbarch (par_state)) - 1);
- unsigned_type = parse_type (par_state)->builtin_unsigned_long;
- signed_type = parse_type (par_state)->builtin_long;
- }
- else
- {
- int shift;
- if (sizeof (ULONGEST) * HOST_CHAR_BIT
- < gdbarch_long_long_bit (parse_gdbarch (par_state)))
-
- shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
- else
- shift = (gdbarch_long_long_bit (parse_gdbarch (par_state)) - 1);
- high_bit = (ULONGEST) 1 << shift;
- unsigned_type = parse_type (par_state)->builtin_unsigned_long_long;
- signed_type = parse_type (par_state)->builtin_long_long;
- }
- putithere->typed_val_int.val = n;
-
- if (unsigned_p || (n & high_bit))
- {
- putithere->typed_val_int.type = unsigned_type;
- }
- else
- {
- putithere->typed_val_int.type = signed_type;
- }
- return INT;
- }
- static struct obstack tempbuf;
- static int tempbuf_init;
- int
- c_parse_escape (const char **ptr, struct obstack *output)
- {
- const char *tokptr = *ptr;
- int result = 1;
-
- switch (*tokptr)
- {
-
- case 'x':
- if (output)
- obstack_grow_str (output, "\\x");
- ++tokptr;
- if (!isxdigit (*tokptr))
- error (_("\\x escape without a following hex digit"));
- while (isxdigit (*tokptr))
- {
- if (output)
- obstack_1grow (output, *tokptr);
- ++tokptr;
- }
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- int i;
- if (output)
- obstack_grow_str (output, "\\");
- for (i = 0;
- i < 3 && isdigit (*tokptr) && *tokptr != '8' && *tokptr != '9';
- ++i)
- {
- if (output)
- obstack_1grow (output, *tokptr);
- ++tokptr;
- }
- }
- break;
-
- case 'u':
- case 'U':
- {
- char c = *tokptr;
- int i, len = c == 'U' ? 8 : 4;
- if (output)
- {
- obstack_1grow (output, '\\');
- obstack_1grow (output, *tokptr);
- }
- ++tokptr;
- if (!isxdigit (*tokptr))
- error (_("\\%c escape without a following hex digit"), c);
- for (i = 0; i < len && isxdigit (*tokptr); ++i)
- {
- if (output)
- obstack_1grow (output, *tokptr);
- ++tokptr;
- }
- }
- break;
-
- case '\\':
- if (output)
- obstack_grow_str (output, "\\\\");
- ++tokptr;
- break;
-
- case 'a':
- if (output)
- obstack_1grow (output, '\a');
- ++tokptr;
- break;
- case 'b':
- if (output)
- obstack_1grow (output, '\b');
- ++tokptr;
- break;
- case 'f':
- if (output)
- obstack_1grow (output, '\f');
- ++tokptr;
- break;
- case 'n':
- if (output)
- obstack_1grow (output, '\n');
- ++tokptr;
- break;
- case 'r':
- if (output)
- obstack_1grow (output, '\r');
- ++tokptr;
- break;
- case 't':
- if (output)
- obstack_1grow (output, '\t');
- ++tokptr;
- break;
- case 'v':
- if (output)
- obstack_1grow (output, '\v');
- ++tokptr;
- break;
-
- case 'e':
- if (output)
- obstack_1grow (output, HOST_ESCAPE_CHAR);
- ++tokptr;
- break;
-
- case '\n':
- ++tokptr;
- result = 0;
- break;
-
- case '\'':
- case '\"':
- case '?':
-
- case '(':
- case '{':
- case '[':
- case '%':
-
- default:
- if (output)
- obstack_1grow (output, *tokptr);
- ++tokptr;
- break;
- }
- *ptr = tokptr;
- return result;
- }
- static int
- parse_string_or_char (const char *tokptr, const char **outptr,
- struct typed_stoken *value, int *host_chars)
- {
- int quote;
- enum c_string_type type;
- int is_objc = 0;
-
- if (!tempbuf_init)
- tempbuf_init = 1;
- else
- obstack_free (&tempbuf, NULL);
- obstack_init (&tempbuf);
-
- if (*tokptr == 'L')
- {
- type = C_WIDE_STRING;
- ++tokptr;
- }
- else if (*tokptr == 'u')
- {
- type = C_STRING_16;
- ++tokptr;
- }
- else if (*tokptr == 'U')
- {
- type = C_STRING_32;
- ++tokptr;
- }
- else if (*tokptr == '@')
- {
-
- is_objc = 1;
- type = C_STRING;
- ++tokptr;
- }
- else
- type = C_STRING;
-
- quote = *tokptr;
- if (quote == '\'')
- type |= C_CHAR;
- ++tokptr;
- *host_chars = 0;
- while (*tokptr)
- {
- char c = *tokptr;
- if (c == '\\')
- {
- ++tokptr;
- *host_chars += c_parse_escape (&tokptr, &tempbuf);
- }
- else if (c == quote)
- break;
- else
- {
- obstack_1grow (&tempbuf, c);
- ++tokptr;
- FIXME
- ++*host_chars;
- }
- }
- if (*tokptr != quote)
- {
- if (quote == '"')
- error (_("Unterminated string in expression."));
- else
- error (_("Unmatched single quote."));
- }
- ++tokptr;
- value->type = type;
- value->ptr = obstack_base (&tempbuf);
- value->length = obstack_object_size (&tempbuf);
- *outptr = tokptr;
- return quote == '"' ? (is_objc ? NSSTRING : STRING) : CHAR;
- }
- enum token_flags
- {
-
- FLAG_CXX = 1,
-
- FLAG_SHADOW = 2
- };
- struct token
- {
- char *operator;
- int token;
- enum exp_opcode opcode;
- enum token_flags flags;
- };
- static const struct token tokentab3[] =
- {
- {">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
- {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
- {"->*", ARROW_STAR, BINOP_END, FLAG_CXX},
- {"...", DOTDOTDOT, BINOP_END, 0}
- };
- static const struct token tokentab2[] =
- {
- {"+=", ASSIGN_MODIFY, BINOP_ADD, 0},
- {"-=", ASSIGN_MODIFY, BINOP_SUB, 0},
- {"*=", ASSIGN_MODIFY, BINOP_MUL, 0},
- {"/=", ASSIGN_MODIFY, BINOP_DIV, 0},
- {"%=", ASSIGN_MODIFY, BINOP_REM, 0},
- {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR, 0},
- {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND, 0},
- {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR, 0},
- {"++", INCREMENT, BINOP_END, 0},
- {"--", DECREMENT, BINOP_END, 0},
- {"->", ARROW, BINOP_END, 0},
- {"&&", ANDAND, BINOP_END, 0},
- {"||", OROR, BINOP_END, 0},
-
- {"::", COLONCOLON, BINOP_END, 0},
- {"<<", LSH, BINOP_END, 0},
- {">>", RSH, BINOP_END, 0},
- {"==", EQUAL, BINOP_END, 0},
- {"!=", NOTEQUAL, BINOP_END, 0},
- {"<=", LEQ, BINOP_END, 0},
- {">=", GEQ, BINOP_END, 0},
- {".*", DOT_STAR, BINOP_END, FLAG_CXX}
- };
- static const struct token ident_tokens[] =
- {
- {"unsigned", UNSIGNED, OP_NULL, 0},
- {"template", TEMPLATE, OP_NULL, FLAG_CXX},
- {"volatile", VOLATILE_KEYWORD, OP_NULL, 0},
- {"struct", STRUCT, OP_NULL, 0},
- {"signed", SIGNED_KEYWORD, OP_NULL, 0},
- {"sizeof", SIZEOF, OP_NULL, 0},
- {"double", DOUBLE_KEYWORD, OP_NULL, 0},
- {"false", FALSEKEYWORD, OP_NULL, FLAG_CXX},
- {"class", CLASS, OP_NULL, FLAG_CXX},
- {"union", UNION, OP_NULL, 0},
- {"short", SHORT, OP_NULL, 0},
- {"const", CONST_KEYWORD, OP_NULL, 0},
- {"enum", ENUM, OP_NULL, 0},
- {"long", LONG, OP_NULL, 0},
- {"true", TRUEKEYWORD, OP_NULL, FLAG_CXX},
- {"int", INT_KEYWORD, OP_NULL, 0},
- {"new", NEW, OP_NULL, FLAG_CXX},
- {"delete", DELETE, OP_NULL, FLAG_CXX},
- {"operator", OPERATOR, OP_NULL, FLAG_CXX},
- {"and", ANDAND, BINOP_END, FLAG_CXX},
- {"and_eq", ASSIGN_MODIFY, BINOP_BITWISE_AND, FLAG_CXX},
- {"bitand", '&', OP_NULL, FLAG_CXX},
- {"bitor", '|', OP_NULL, FLAG_CXX},
- {"compl", '~', OP_NULL, FLAG_CXX},
- {"not", '!', OP_NULL, FLAG_CXX},
- {"not_eq", NOTEQUAL, BINOP_END, FLAG_CXX},
- {"or", OROR, BINOP_END, FLAG_CXX},
- {"or_eq", ASSIGN_MODIFY, BINOP_BITWISE_IOR, FLAG_CXX},
- {"xor", '^', OP_NULL, FLAG_CXX},
- {"xor_eq", ASSIGN_MODIFY, BINOP_BITWISE_XOR, FLAG_CXX},
- {"const_cast", CONST_CAST, OP_NULL, FLAG_CXX },
- {"dynamic_cast", DYNAMIC_CAST, OP_NULL, FLAG_CXX },
- {"static_cast", STATIC_CAST, OP_NULL, FLAG_CXX },
- {"reinterpret_cast", REINTERPRET_CAST, OP_NULL, FLAG_CXX },
- {"__typeof__", TYPEOF, OP_TYPEOF, 0 },
- {"__typeof", TYPEOF, OP_TYPEOF, 0 },
- {"typeof", TYPEOF, OP_TYPEOF, FLAG_SHADOW },
- {"__decltype", DECLTYPE, OP_DECLTYPE, FLAG_CXX },
- {"decltype", DECLTYPE, OP_DECLTYPE, FLAG_CXX | FLAG_SHADOW },
- {"typeid", TYPEID, OP_TYPEID, FLAG_CXX}
- };
- static const char *macro_original_text;
- static struct obstack expansion_obstack;
- static void
- scan_macro_expansion (char *expansion)
- {
- char *copy;
-
- gdb_assert (! macro_original_text);
-
- copy = obstack_copy0 (&expansion_obstack, expansion, strlen (expansion));
- xfree (expansion);
-
- macro_original_text = lexptr;
- lexptr = copy;
- }
- static int
- scanning_macro_expansion (void)
- {
- return macro_original_text != 0;
- }
- static void
- finished_macro_expansion (void)
- {
-
- gdb_assert (macro_original_text);
-
- lexptr = macro_original_text;
- macro_original_text = 0;
- }
- static void
- scan_macro_cleanup (void *dummy)
- {
- if (macro_original_text)
- finished_macro_expansion ();
- obstack_free (&expansion_obstack, NULL);
- }
- static int
- is_cast_operator (const char *token, int len)
- {
- return (! strncmp (token, "dynamic_cast", len)
- || ! strncmp (token, "static_cast", len)
- || ! strncmp (token, "reinterpret_cast", len)
- || ! strncmp (token, "const_cast", len));
- }
- static struct macro_scope *expression_macro_scope;
- static int saw_name_at_eof;
- static int last_was_structop;
- static int
- lex_one_token (struct parser_state *par_state, int *is_quoted_name)
- {
- int c;
- int namelen;
- unsigned int i;
- const char *tokstart;
- int saw_structop = last_was_structop;
- char *copy;
- last_was_structop = 0;
- *is_quoted_name = 0;
- retry:
-
- if (! scanning_macro_expansion ())
- {
- char *expanded = macro_expand_next (&lexptr,
- standard_macro_lookup,
- expression_macro_scope);
- if (expanded)
- scan_macro_expansion (expanded);
- }
- prev_lexptr = lexptr;
- tokstart = lexptr;
-
- for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
- {
- if ((tokentab3[i].flags & FLAG_CXX) != 0
- && parse_language (par_state)->la_language != language_cplus)
- break;
- lexptr += 3;
- yylval.opcode = tokentab3[i].opcode;
- return tokentab3[i].token;
- }
-
- for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
- {
- if ((tokentab2[i].flags & FLAG_CXX) != 0
- && parse_language (par_state)->la_language != language_cplus)
- break;
- lexptr += 2;
- yylval.opcode = tokentab2[i].opcode;
- if (parse_completion && tokentab2[i].token == ARROW)
- last_was_structop = 1;
- return tokentab2[i].token;
- }
- switch (c = *tokstart)
- {
- case 0:
-
- if (scanning_macro_expansion ())
- {
- finished_macro_expansion ();
- goto retry;
- }
- else if (saw_name_at_eof)
- {
- saw_name_at_eof = 0;
- return COMPLETE;
- }
- else if (saw_structop)
- return COMPLETE;
- else
- return 0;
- case ' ':
- case '\t':
- case '\n':
- lexptr++;
- goto retry;
- case '[':
- case '(':
- paren_depth++;
- lexptr++;
- if (parse_language (par_state)->la_language == language_objc
- && c == '[')
- return OBJC_LBRAC;
- return c;
- case ']':
- case ')':
- if (paren_depth == 0)
- return 0;
- paren_depth--;
- lexptr++;
- return c;
- case ',':
- if (comma_terminates
- && paren_depth == 0
- && ! scanning_macro_expansion ())
- return 0;
- lexptr++;
- return c;
- case '.':
-
- if (lexptr[1] < '0' || lexptr[1] > '9')
- {
- if (parse_completion)
- last_was_structop = 1;
- goto symbol;
- }
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
-
- int got_dot = 0, got_e = 0, toktype;
- const char *p = tokstart;
- int hex = input_radix > 10;
- if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
- {
- p += 2;
- hex = 1;
- }
- else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
- {
- p += 2;
- hex = 0;
- }
- for (;; ++p)
- {
-
- if (!hex && !got_e && (*p == 'e' || *p == 'E'))
- got_dot = got_e = 1;
-
- else if (!got_dot && *p == '.')
- got_dot = 1;
- else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
- && (*p == '-' || *p == '+'))
-
- continue;
-
- else if ((*p < '0' || *p > '9')
- && ((*p < 'a' || *p > 'z')
- && (*p < 'A' || *p > 'Z')))
- break;
- }
- toktype = parse_number (par_state, tokstart, p - tokstart,
- got_dot|got_e, &yylval);
- if (toktype == ERROR)
- {
- char *err_copy = (char *) alloca (p - tokstart + 1);
- memcpy (err_copy, tokstart, p - tokstart);
- err_copy[p - tokstart] = 0;
- error (_("Invalid number \"%s\"."), err_copy);
- }
- lexptr = p;
- return toktype;
- }
- case '@':
- {
- const char *p = &tokstart[1];
- size_t len = strlen ("entry");
- if (parse_language (par_state)->la_language == language_objc)
- {
- size_t len = strlen ("selector");
- if (strncmp (p, "selector", len) == 0
- && (p[len] == '\0' || isspace (p[len])))
- {
- lexptr = p + len;
- return SELECTOR;
- }
- else if (*p == '"')
- goto parse_string;
- }
- while (isspace (*p))
- p++;
- if (strncmp (p, "entry", len) == 0 && !isalnum (p[len])
- && p[len] != '_')
- {
- lexptr = &p[len];
- return ENTRY;
- }
- }
-
- case '+':
- case '-':
- case '*':
- case '/':
- case '%':
- case '|':
- case '&':
- case '^':
- case '~':
- case '!':
- case '<':
- case '>':
- case '?':
- case ':':
- case '=':
- case '{':
- case '}':
- symbol:
- lexptr++;
- return c;
- case 'L':
- case 'u':
- case 'U':
- if (tokstart[1] != '"' && tokstart[1] != '\'')
- break;
-
- case '\'':
- case '"':
- parse_string:
- {
- int host_len;
- int result = parse_string_or_char (tokstart, &lexptr, &yylval.tsval,
- &host_len);
- if (result == CHAR)
- {
- if (host_len == 0)
- error (_("Empty character constant."));
- else if (host_len > 2 && c == '\'')
- {
- ++tokstart;
- namelen = lexptr - tokstart - 1;
- *is_quoted_name = 1;
- goto tryname;
- }
- else if (host_len > 1)
- error (_("Invalid character constant."));
- }
- return result;
- }
- }
- if (!(c == '_' || c == '$'
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
-
- error (_("Invalid character '%c' in expression."), c);
-
- namelen = 0;
- for (c = tokstart[namelen];
- (c == '_' || c == '$' || (c >= '0' && c <= '9')
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');)
- {
-
- FIXME
- if (c == '<')
- {
- if (! is_cast_operator (tokstart, namelen))
- {
-
- const char *p = find_template_name_end (tokstart + namelen);
- if (p)
- namelen = p - tokstart;
- }
- break;
- }
- c = tokstart[++namelen];
- }
-
- if (namelen == 2
- && tokstart[0] == 'i'
- && tokstart[1] == 'f'
- && ! scanning_macro_expansion ())
- {
- return 0;
- }
-
- if (namelen >= 1
- && (strncmp (tokstart, "thread", namelen) == 0
- || strncmp (tokstart, "task", namelen) == 0)
- && (tokstart[namelen] == ' ' || tokstart[namelen] == '\t')
- && ! scanning_macro_expansion ())
- {
- const char *p = tokstart + namelen + 1;
- while (*p == ' ' || *p == '\t')
- p++;
- if (*p >= '0' && *p <= '9')
- return 0;
- }
- lexptr += namelen;
- tryname:
- yylval.sval.ptr = tokstart;
- yylval.sval.length = namelen;
-
- copy = copy_name (yylval.sval);
- for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
- if (strcmp (copy, ident_tokens[i].operator) == 0)
- {
- if ((ident_tokens[i].flags & FLAG_CXX) != 0
- && parse_language (par_state)->la_language != language_cplus)
- break;
- if ((ident_tokens[i].flags & FLAG_SHADOW) != 0)
- {
- struct field_of_this_result is_a_field_of_this;
- if (lookup_symbol (copy, expression_context_block,
- VAR_DOMAIN,
- (parse_language (par_state)->la_language
- == language_cplus ? &is_a_field_of_this
- : NULL))
- != NULL)
- {
-
- break;
- }
- }
-
- yylval.opcode = ident_tokens[i].opcode;
- return ident_tokens[i].token;
- }
- if (*tokstart == '$')
- return VARIABLE;
- if (parse_completion && *lexptr == '\0')
- saw_name_at_eof = 1;
- yylval.ssym.stoken = yylval.sval;
- yylval.ssym.sym = NULL;
- yylval.ssym.is_a_field_of_this = 0;
- return NAME;
- }
- typedef struct
- {
- int token;
- YYSTYPE value;
- } token_and_value;
- DEF_VEC_O (token_and_value);
- static VEC (token_and_value) *token_fifo;
- static int popping;
- static struct obstack name_obstack;
- static int
- classify_name (struct parser_state *par_state, const struct block *block,
- int is_quoted_name)
- {
- struct symbol *sym;
- char *copy;
- struct field_of_this_result is_a_field_of_this;
- copy = copy_name (yylval.sval);
-
- memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
- sym = lookup_symbol (copy, block, VAR_DOMAIN,
- parse_language (par_state)->la_name_of_this
- ? &is_a_field_of_this : NULL);
- if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
- {
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
- return BLOCKNAME;
- }
- else if (!sym)
- {
-
- if (is_a_field_of_this.type != NULL
- && is_a_field_of_this.fn_field != NULL
- && TYPE_FN_FIELD_CONSTRUCTOR (is_a_field_of_this.fn_field->fn_fields,
- 0))
- {
- struct field_of_this_result inner_is_a_field_of_this;
- sym = lookup_symbol (copy, block, STRUCT_DOMAIN,
- &inner_is_a_field_of_this);
- if (sym != NULL)
- {
- yylval.tsym.type = SYMBOL_TYPE (sym);
- return TYPENAME;
- }
- }
-
- if (is_a_field_of_this.type == NULL || is_quoted_name)
- {
-
- struct symtab *symtab;
- symtab = lookup_symtab (copy);
- if (symtab)
- {
- yylval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab),
- STATIC_BLOCK);
- return FILENAME;
- }
- }
- }
- if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- {
- yylval.tsym.type = SYMBOL_TYPE (sym);
- return TYPENAME;
- }
- yylval.tsym.type
- = language_lookup_primitive_type_by_name (parse_language (par_state),
- parse_gdbarch (par_state),
- copy);
- if (yylval.tsym.type != NULL)
- return TYPENAME;
-
- if (parse_language (par_state)->la_language == language_objc && !sym)
- {
- CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
- if (Class)
- {
- yylval.class.class = Class;
- sym = lookup_struct_typedef (copy, expression_context_block, 1);
- if (sym)
- yylval.class.type = SYMBOL_TYPE (sym);
- return CLASSNAME;
- }
- }
-
- if (!sym
- && ((copy[0] >= 'a' && copy[0] < 'a' + input_radix - 10)
- || (copy[0] >= 'A' && copy[0] < 'A' + input_radix - 10)))
- {
- YYSTYPE newlval;
- int hextype = parse_number (par_state, copy, yylval.sval.length,
- 0, &newlval);
- if (hextype == INT)
- {
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
- return NAME_OR_INT;
- }
- }
-
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
- if (sym == NULL
- && parse_language (par_state)->la_language == language_cplus
- && is_a_field_of_this.type == NULL
- && lookup_minimal_symbol (copy, NULL, NULL).minsym == NULL)
- return UNKNOWN_CPP_NAME;
- return NAME;
- }
- static int
- classify_inner_name (struct parser_state *par_state,
- const struct block *block, struct type *context)
- {
- struct type *type;
- char *copy;
- if (context == NULL)
- return classify_name (par_state, block, 0);
- type = check_typedef (context);
- if (!type_aggregate_p (type))
- return ERROR;
- copy = copy_name (yylval.ssym.stoken);
- yylval.ssym.sym = cp_lookup_nested_symbol (type, copy, block);
-
- if (yylval.ssym.sym == NULL)
- {
- struct type *base_type = find_type_baseclass_by_name (type, copy);
- if (base_type != NULL)
- {
- yylval.tsym.type = base_type;
- return TYPENAME;
- }
- return ERROR;
- }
- switch (SYMBOL_CLASS (yylval.ssym.sym))
- {
- case LOC_BLOCK:
- case LOC_LABEL:
-
- {
- struct type *base_type = find_type_baseclass_by_name (type, copy);
- if (base_type != NULL)
- {
- yylval.tsym.type = base_type;
- return TYPENAME;
- }
- }
- return ERROR;
- case LOC_TYPEDEF:
- yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym);;
- return TYPENAME;
- default:
- return NAME;
- }
- internal_error (__FILE__, __LINE__, _("not reached"));
- }
- static int
- yylex (void)
- {
- token_and_value current;
- int first_was_coloncolon, last_was_coloncolon;
- struct type *context_type = NULL;
- int last_to_examine, next_to_examine, checkpoint;
- const struct block *search_block;
- int is_quoted_name;
- if (popping && !VEC_empty (token_and_value, token_fifo))
- goto do_pop;
- popping = 0;
-
- current.token = lex_one_token (pstate, &is_quoted_name);
- if (current.token == NAME)
- current.token = classify_name (pstate, expression_context_block,
- is_quoted_name);
- if (parse_language (pstate)->la_language != language_cplus
- || (current.token != TYPENAME && current.token != COLONCOLON
- && current.token != FILENAME))
- return current.token;
-
- current.value = yylval;
- VEC_safe_push (token_and_value, token_fifo, ¤t);
- last_was_coloncolon = current.token == COLONCOLON;
- while (1)
- {
- int ignore;
-
- current.token = lex_one_token (pstate, &ignore);
- current.value = yylval;
- VEC_safe_push (token_and_value, token_fifo, ¤t);
- if ((last_was_coloncolon && current.token != NAME)
- || (!last_was_coloncolon && current.token != COLONCOLON))
- break;
- last_was_coloncolon = !last_was_coloncolon;
- }
- popping = 1;
-
- last_to_examine = VEC_length (token_and_value, token_fifo) - 2;
- next_to_examine = 0;
- current = *VEC_index (token_and_value, token_fifo, next_to_examine);
- ++next_to_examine;
- obstack_free (&name_obstack, obstack_base (&name_obstack));
- checkpoint = 0;
- if (current.token == FILENAME)
- search_block = current.value.bval;
- else if (current.token == COLONCOLON)
- search_block = NULL;
- else
- {
- gdb_assert (current.token == TYPENAME);
- search_block = expression_context_block;
- obstack_grow (&name_obstack, current.value.sval.ptr,
- current.value.sval.length);
- context_type = current.value.tsym.type;
- checkpoint = 1;
- }
- first_was_coloncolon = current.token == COLONCOLON;
- last_was_coloncolon = first_was_coloncolon;
- while (next_to_examine <= last_to_examine)
- {
- token_and_value *next;
- next = VEC_index (token_and_value, token_fifo, next_to_examine);
- ++next_to_examine;
- if (next->token == NAME && last_was_coloncolon)
- {
- int classification;
- yylval = next->value;
- classification = classify_inner_name (pstate, search_block,
- context_type);
-
- if (classification != TYPENAME && classification != NAME)
- break;
-
- checkpoint = next_to_examine;
-
- if (context_type != NULL)
- {
-
- obstack_grow_str (&name_obstack, "::");
- }
- obstack_grow (&name_obstack, next->value.sval.ptr,
- next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
- yylval.sval.length = obstack_object_size (&name_obstack);
- current.value = yylval;
- current.token = classification;
- last_was_coloncolon = 0;
- if (classification == NAME)
- break;
- context_type = yylval.tsym.type;
- }
- else if (next->token == COLONCOLON && !last_was_coloncolon)
- last_was_coloncolon = 1;
- else
- {
-
- break;
- }
- }
-
- if (checkpoint > 0)
- {
- current.value.sval.ptr = obstack_copy0 (&expansion_obstack,
- current.value.sval.ptr,
- current.value.sval.length);
- VEC_replace (token_and_value, token_fifo, 0, ¤t);
- if (checkpoint > 1)
- VEC_block_remove (token_and_value, token_fifo, 1, checkpoint - 1);
- }
- do_pop:
- current = *VEC_index (token_and_value, token_fifo, 0);
- VEC_ordered_remove (token_and_value, token_fifo, 0);
- yylval = current.value;
- return current.token;
- }
- int
- c_parse (struct parser_state *par_state)
- {
- int result;
- struct cleanup *back_to;
-
- gdb_assert (par_state != NULL);
- pstate = par_state;
- back_to = make_cleanup (free_current_contents, &expression_macro_scope);
- make_cleanup_clear_parser_state (&pstate);
-
- expression_macro_scope = NULL;
- if (expression_context_block)
- expression_macro_scope
- = sal_macro_scope (find_pc_line (expression_context_pc, 0));
- else
- expression_macro_scope = default_macro_scope ();
- if (! expression_macro_scope)
- expression_macro_scope = user_macro_scope ();
-
- obstack_init (&expansion_obstack);
- gdb_assert (! macro_original_text);
- make_cleanup (scan_macro_cleanup, 0);
- make_cleanup_restore_integer (&yydebug);
- yydebug = parser_debug;
-
- last_was_structop = 0;
- saw_name_at_eof = 0;
- VEC_free (token_and_value, token_fifo);
- popping = 0;
- obstack_init (&name_obstack);
- make_cleanup_obstack_free (&name_obstack);
- result = yyparse ();
- do_cleanups (back_to);
- return result;
- }
- #ifdef YYBISON
- static void
- c_print_token (FILE *file, int type, YYSTYPE value)
- {
- switch (type)
- {
- case INT:
- fprintf (file, "typed_val_int<%s, %s>",
- TYPE_SAFE_NAME (value.typed_val_int.type),
- pulongest (value.typed_val_int.val));
- break;
- case CHAR:
- case STRING:
- {
- char *copy = alloca (value.tsval.length + 1);
- memcpy (copy, value.tsval.ptr, value.tsval.length);
- copy[value.tsval.length] = '\0';
- fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
- }
- break;
- case NSSTRING:
- case VARIABLE:
- fprintf (file, "sval<%s>", copy_name (value.sval));
- break;
- case TYPENAME:
- fprintf (file, "tsym<type=%s, name=%s>",
- TYPE_SAFE_NAME (value.tsym.type),
- copy_name (value.tsym.stoken));
- break;
- case NAME:
- case UNKNOWN_CPP_NAME:
- case NAME_OR_INT:
- case BLOCKNAME:
- fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
- copy_name (value.ssym.stoken),
- (value.ssym.sym == NULL
- ? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym)),
- value.ssym.is_a_field_of_this);
- break;
- case FILENAME:
- fprintf (file, "bval<%s>", host_address_to_string (value.bval));
- break;
- }
- }
- #endif
- void
- yyerror (char *msg)
- {
- if (prev_lexptr)
- lexptr = prev_lexptr;
- error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
- }