GDB (API)
|
00001 /* A Bison parser, made by GNU Bison 2.5. */ 00002 00003 /* Bison implementation for Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 /* As a special exception, you may create a larger work that contains 00021 part or all of the Bison parser skeleton and distribute that work 00022 under terms of your choice, so long as that work isn't itself a 00023 parser generator using the skeleton or a modified version thereof 00024 as a parser skeleton. Alternatively, if you modify or redistribute 00025 the parser skeleton itself, you may (at your option) remove this 00026 special exception, which will cause the skeleton and the resulting 00027 Bison output files to be licensed under the GNU General Public 00028 License without this special exception. 00029 00030 This special exception was added by the Free Software Foundation in 00031 version 2.2 of Bison. */ 00032 00033 /* C LALR(1) parser skeleton written by Richard Stallman, by 00034 simplifying the original so-called "semantic" parser. */ 00035 00036 /* All symbols defined below should begin with yy or YY, to avoid 00037 infringing on user name space. This should be done even for local 00038 variables, as they might otherwise be expanded by user macros. 00039 There are some unavoidable exceptions within include files to 00040 define necessary library symbols; they are noted "INFRINGES ON 00041 USER NAME SPACE" below. */ 00042 00043 /* Identify Bison output. */ 00044 #define YYBISON 1 00045 00046 /* Bison version. */ 00047 #define YYBISON_VERSION "2.5" 00048 00049 /* Skeleton name. */ 00050 #define YYSKELETON_NAME "yacc.c" 00051 00052 /* Pure parsers. */ 00053 #define YYPURE 0 00054 00055 /* Push parsers. */ 00056 #define YYPUSH 0 00057 00058 /* Pull parsers. */ 00059 #define YYPULL 1 00060 00061 /* Using locations. */ 00062 #define YYLSP_NEEDED 0 00063 00064 00065 00066 /* Copy the first part of user declarations. */ 00067 00068 /* Line 268 of yacc.c */ 00069 #line 36 "../../src/gdb/ada-exp.y" 00070 00071 00072 #include "defs.h" 00073 #include "gdb_string.h" 00074 #include <ctype.h> 00075 #include "expression.h" 00076 #include "value.h" 00077 #include "parser-defs.h" 00078 #include "language.h" 00079 #include "ada-lang.h" 00080 #include "bfd.h" /* Required by objfiles.h. */ 00081 #include "symfile.h" /* Required by objfiles.h. */ 00082 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */ 00083 #include "frame.h" 00084 #include "block.h" 00085 00086 #define parse_type builtin_type (parse_gdbarch) 00087 00088 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), 00089 as well as gratuitiously global symbol names, so we can have multiple 00090 yacc generated parsers in gdb. These are only the variables 00091 produced by yacc. If other parser generators (bison, byacc, etc) produce 00092 additional global names that conflict at link time, then those parser 00093 generators need to be fixed instead of adding those names to this list. */ 00094 00095 /* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix 00096 options. I presume we are maintaining it to accommodate systems 00097 without BISON? (PNH) */ 00098 00099 #define yymaxdepth ada_maxdepth 00100 #define yyparse _ada_parse /* ada_parse calls this after initialization */ 00101 #define yylex ada_lex 00102 #define yyerror ada_error 00103 #define yylval ada_lval 00104 #define yychar ada_char 00105 #define yydebug ada_debug 00106 #define yypact ada_pact 00107 #define yyr1 ada_r1 00108 #define yyr2 ada_r2 00109 #define yydef ada_def 00110 #define yychk ada_chk 00111 #define yypgo ada_pgo 00112 #define yyact ada_act 00113 #define yyexca ada_exca 00114 #define yyerrflag ada_errflag 00115 #define yynerrs ada_nerrs 00116 #define yyps ada_ps 00117 #define yypv ada_pv 00118 #define yys ada_s 00119 #define yy_yys ada_yys 00120 #define yystate ada_state 00121 #define yytmp ada_tmp 00122 #define yyv ada_v 00123 #define yy_yyv ada_yyv 00124 #define yyval ada_val 00125 #define yylloc ada_lloc 00126 #define yyreds ada_reds /* With YYDEBUG defined */ 00127 #define yytoks ada_toks /* With YYDEBUG defined */ 00128 #define yyname ada_name /* With YYDEBUG defined */ 00129 #define yyrule ada_rule /* With YYDEBUG defined */ 00130 #define yyss ada_yyss 00131 #define yysslim ada_yysslim 00132 #define yyssp ada_yyssp 00133 #define yystacksize ada_yystacksize 00134 #define yyvs ada_yyvs 00135 #define yyvsp ada_yyvsp 00136 00137 #ifndef YYDEBUG 00138 #define YYDEBUG 1 /* Default to yydebug support */ 00139 #endif 00140 00141 #define YYFPRINTF parser_fprintf 00142 00143 struct name_info { 00144 struct symbol *sym; 00145 struct minimal_symbol *msym; 00146 struct block *block; 00147 struct stoken stoken; 00148 }; 00149 00150 static struct stoken empty_stoken = { "", 0 }; 00151 00152 /* If expression is in the context of TYPE'(...), then TYPE, else 00153 * NULL. */ 00154 static struct type *type_qualifier; 00155 00156 int yyparse (void); 00157 00158 static int yylex (void); 00159 00160 void yyerror (char *); 00161 00162 static void write_int (LONGEST, struct type *); 00163 00164 static void write_object_renaming (const struct block *, const char *, int, 00165 const char *, int); 00166 00167 static struct type* write_var_or_type (const struct block *, struct stoken); 00168 00169 static void write_name_assoc (struct stoken); 00170 00171 static void write_exp_op_with_string (enum exp_opcode, struct stoken); 00172 00173 static struct block *block_lookup (struct block *, const char *); 00174 00175 static LONGEST convert_char_literal (struct type *, LONGEST); 00176 00177 static void write_ambiguous_var (const struct block *, char *, int); 00178 00179 static struct type *type_int (void); 00180 00181 static struct type *type_long (void); 00182 00183 static struct type *type_long_long (void); 00184 00185 static struct type *type_float (void); 00186 00187 static struct type *type_double (void); 00188 00189 static struct type *type_long_double (void); 00190 00191 static struct type *type_char (void); 00192 00193 static struct type *type_boolean (void); 00194 00195 static struct type *type_system_address (void); 00196 00197 00198 00199 /* Line 268 of yacc.c */ 00200 #line 201 "ada-exp.c" 00201 00202 /* Enabling traces. */ 00203 #ifndef YYDEBUG 00204 # define YYDEBUG 0 00205 #endif 00206 00207 /* Enabling verbose error messages. */ 00208 #ifdef YYERROR_VERBOSE 00209 # undef YYERROR_VERBOSE 00210 # define YYERROR_VERBOSE 1 00211 #else 00212 # define YYERROR_VERBOSE 0 00213 #endif 00214 00215 /* Enabling the token table. */ 00216 #ifndef YYTOKEN_TABLE 00217 # define YYTOKEN_TABLE 0 00218 #endif 00219 00220 00221 /* Tokens. */ 00222 #ifndef YYTOKENTYPE 00223 # define YYTOKENTYPE 00224 /* Put the tokens into the symbol table, so that GDB and other debuggers 00225 know about them. */ 00226 enum yytokentype { 00227 INT = 258, 00228 NULL_PTR = 259, 00229 CHARLIT = 260, 00230 FLOAT = 261, 00231 TRUEKEYWORD = 262, 00232 FALSEKEYWORD = 263, 00233 COLONCOLON = 264, 00234 STRING = 265, 00235 NAME = 266, 00236 DOT_ID = 267, 00237 DOT_ALL = 268, 00238 SPECIAL_VARIABLE = 269, 00239 ASSIGN = 270, 00240 ELSE = 271, 00241 THEN = 272, 00242 XOR = 273, 00243 OR = 274, 00244 _AND_ = 275, 00245 DOTDOT = 276, 00246 IN = 277, 00247 GEQ = 278, 00248 LEQ = 279, 00249 NOTEQUAL = 280, 00250 UNARY = 281, 00251 REM = 282, 00252 MOD = 283, 00253 NOT = 284, 00254 ABS = 285, 00255 STARSTAR = 286, 00256 VAR = 287, 00257 ARROW = 288, 00258 TICK_LENGTH = 289, 00259 TICK_LAST = 290, 00260 TICK_FIRST = 291, 00261 TICK_ADDRESS = 292, 00262 TICK_ACCESS = 293, 00263 TICK_MODULUS = 294, 00264 TICK_MIN = 295, 00265 TICK_MAX = 296, 00266 TICK_VAL = 297, 00267 TICK_TAG = 298, 00268 TICK_SIZE = 299, 00269 TICK_RANGE = 300, 00270 TICK_POS = 301, 00271 NEW = 302, 00272 OTHERS = 303 00273 }; 00274 #endif 00275 /* Tokens. */ 00276 #define INT 258 00277 #define NULL_PTR 259 00278 #define CHARLIT 260 00279 #define FLOAT 261 00280 #define TRUEKEYWORD 262 00281 #define FALSEKEYWORD 263 00282 #define COLONCOLON 264 00283 #define STRING 265 00284 #define NAME 266 00285 #define DOT_ID 267 00286 #define DOT_ALL 268 00287 #define SPECIAL_VARIABLE 269 00288 #define ASSIGN 270 00289 #define ELSE 271 00290 #define THEN 272 00291 #define XOR 273 00292 #define OR 274 00293 #define _AND_ 275 00294 #define DOTDOT 276 00295 #define IN 277 00296 #define GEQ 278 00297 #define LEQ 279 00298 #define NOTEQUAL 280 00299 #define UNARY 281 00300 #define REM 282 00301 #define MOD 283 00302 #define NOT 284 00303 #define ABS 285 00304 #define STARSTAR 286 00305 #define VAR 287 00306 #define ARROW 288 00307 #define TICK_LENGTH 289 00308 #define TICK_LAST 290 00309 #define TICK_FIRST 291 00310 #define TICK_ADDRESS 292 00311 #define TICK_ACCESS 293 00312 #define TICK_MODULUS 294 00313 #define TICK_MIN 295 00314 #define TICK_MAX 296 00315 #define TICK_VAL 297 00316 #define TICK_TAG 298 00317 #define TICK_SIZE 299 00318 #define TICK_RANGE 300 00319 #define TICK_POS 301 00320 #define NEW 302 00321 #define OTHERS 303 00322 00323 00324 00325 00326 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00327 typedef union YYSTYPE 00328 { 00329 00330 /* Line 293 of yacc.c */ 00331 #line 166 "../../src/gdb/ada-exp.y" 00332 00333 LONGEST lval; 00334 struct { 00335 LONGEST val; 00336 struct type *type; 00337 } typed_val; 00338 struct { 00339 DOUBLEST dval; 00340 struct type *type; 00341 } typed_val_float; 00342 struct type *tval; 00343 struct stoken sval; 00344 struct block *bval; 00345 struct internalvar *ivar; 00346 00347 00348 00349 /* Line 293 of yacc.c */ 00350 #line 351 "ada-exp.c" 00351 } YYSTYPE; 00352 # define YYSTYPE_IS_TRIVIAL 1 00353 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00354 # define YYSTYPE_IS_DECLARED 1 00355 #endif 00356 00357 00358 /* Copy the second part of user declarations. */ 00359 00360 00361 /* Line 343 of yacc.c */ 00362 #line 363 "ada-exp.c" 00363 00364 #ifdef short 00365 # undef short 00366 #endif 00367 00368 #ifdef YYTYPE_UINT8 00369 typedef YYTYPE_UINT8 yytype_uint8; 00370 #else 00371 typedef unsigned char yytype_uint8; 00372 #endif 00373 00374 #ifdef YYTYPE_INT8 00375 typedef YYTYPE_INT8 yytype_int8; 00376 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00377 || defined __cplusplus || defined _MSC_VER) 00378 typedef signed char yytype_int8; 00379 #else 00380 typedef short int yytype_int8; 00381 #endif 00382 00383 #ifdef YYTYPE_UINT16 00384 typedef YYTYPE_UINT16 yytype_uint16; 00385 #else 00386 typedef unsigned short int yytype_uint16; 00387 #endif 00388 00389 #ifdef YYTYPE_INT16 00390 typedef YYTYPE_INT16 yytype_int16; 00391 #else 00392 typedef short int yytype_int16; 00393 #endif 00394 00395 #ifndef YYSIZE_T 00396 # ifdef __SIZE_TYPE__ 00397 # define YYSIZE_T __SIZE_TYPE__ 00398 # elif defined size_t 00399 # define YYSIZE_T size_t 00400 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00401 || defined __cplusplus || defined _MSC_VER) 00402 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00403 # define YYSIZE_T size_t 00404 # else 00405 # define YYSIZE_T unsigned int 00406 # endif 00407 #endif 00408 00409 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00410 00411 #ifndef YY_ 00412 # if defined YYENABLE_NLS && YYENABLE_NLS 00413 # if ENABLE_NLS 00414 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00415 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00416 # endif 00417 # endif 00418 # ifndef YY_ 00419 # define YY_(msgid) msgid 00420 # endif 00421 #endif 00422 00423 /* Suppress unused-variable warnings by "using" E. */ 00424 #if ! defined lint || defined __GNUC__ 00425 # define YYUSE(e) ((void) (e)) 00426 #else 00427 # define YYUSE(e) /* empty */ 00428 #endif 00429 00430 /* Identity function, used to suppress warnings about constant conditions. */ 00431 #ifndef lint 00432 # define YYID(n) (n) 00433 #else 00434 #if (defined __STDC__ || defined __C99__FUNC__ \ 00435 || defined __cplusplus || defined _MSC_VER) 00436 static int 00437 YYID (int yyi) 00438 #else 00439 static int 00440 YYID (yyi) 00441 int yyi; 00442 #endif 00443 { 00444 return yyi; 00445 } 00446 #endif 00447 00448 #if ! defined yyoverflow || YYERROR_VERBOSE 00449 00450 /* The parser invokes alloca or xmalloc; define the necessary symbols. */ 00451 00452 # ifdef YYSTACK_USE_ALLOCA 00453 # if YYSTACK_USE_ALLOCA 00454 # ifdef __GNUC__ 00455 # define YYSTACK_ALLOC __builtin_alloca 00456 # elif defined __BUILTIN_VA_ARG_INCR 00457 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00458 # elif defined _AIX 00459 # define YYSTACK_ALLOC __alloca 00460 # elif defined _MSC_VER 00461 # define alloca _alloca 00462 # else 00463 # define YYSTACK_ALLOC alloca 00464 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00465 || defined __cplusplus || defined _MSC_VER) 00466 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00467 # ifndef EXIT_SUCCESS 00468 # define EXIT_SUCCESS 0 00469 # endif 00470 # endif 00471 # endif 00472 # endif 00473 # endif 00474 00475 # ifdef YYSTACK_ALLOC 00476 /* Pacify GCC's `empty if-body' warning. */ 00477 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00478 # ifndef YYSTACK_ALLOC_MAXIMUM 00479 /* The OS might guarantee only one guard page at the bottom of the stack, 00480 and a page size can be as small as 4096 bytes. So we cannot safely 00481 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00482 to allow for a few compiler-allocated temporary stack slots. */ 00483 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00484 # endif 00485 # else 00486 # define YYSTACK_ALLOC YYMALLOC 00487 # define YYSTACK_FREE YYFREE 00488 # ifndef YYSTACK_ALLOC_MAXIMUM 00489 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00490 # endif 00491 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 00492 && ! ((defined YYMALLOC || defined xmalloc) \ 00493 && (defined YYFREE || defined xfree))) 00494 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00495 # ifndef EXIT_SUCCESS 00496 # define EXIT_SUCCESS 0 00497 # endif 00498 # endif 00499 # ifndef YYMALLOC 00500 # define YYMALLOC xmalloc 00501 # if ! defined xmalloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00502 || defined __cplusplus || defined _MSC_VER) 00503 void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00504 # endif 00505 # endif 00506 # ifndef YYFREE 00507 # define YYFREE xfree 00508 # if ! defined xfree && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00509 || defined __cplusplus || defined _MSC_VER) 00510 void xfree (void *); /* INFRINGES ON USER NAME SPACE */ 00511 # endif 00512 # endif 00513 # endif 00514 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 00515 00516 00517 #if (! defined yyoverflow \ 00518 && (! defined __cplusplus \ 00519 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 00520 00521 /* A type that is properly aligned for any stack member. */ 00522 union yyalloc 00523 { 00524 yytype_int16 yyss_alloc; 00525 YYSTYPE yyvs_alloc; 00526 }; 00527 00528 /* The size of the maximum gap between one aligned stack and the next. */ 00529 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 00530 00531 /* The size of an array large to enough to hold all stacks, each with 00532 N elements. */ 00533 # define YYSTACK_BYTES(N) \ 00534 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 00535 + YYSTACK_GAP_MAXIMUM) 00536 00537 # define YYCOPY_NEEDED 1 00538 00539 /* Relocate STACK from its old location to the new one. The 00540 local variables YYSIZE and YYSTACKSIZE give the old and new number of 00541 elements in the stack, and YYPTR gives the new location of the 00542 stack. Advance YYPTR to a properly aligned location for the next 00543 stack. */ 00544 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 00545 do \ 00546 { \ 00547 YYSIZE_T yynewbytes; \ 00548 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 00549 Stack = &yyptr->Stack_alloc; \ 00550 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 00551 yyptr += yynewbytes / sizeof (*yyptr); \ 00552 } \ 00553 while (YYID (0)) 00554 00555 #endif 00556 00557 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 00558 /* Copy COUNT objects from FROM to TO. The source and destination do 00559 not overlap. */ 00560 # ifndef YYCOPY 00561 # if defined __GNUC__ && 1 < __GNUC__ 00562 # define YYCOPY(To, From, Count) \ 00563 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 00564 # else 00565 # define YYCOPY(To, From, Count) \ 00566 do \ 00567 { \ 00568 YYSIZE_T yyi; \ 00569 for (yyi = 0; yyi < (Count); yyi++) \ 00570 (To)[yyi] = (From)[yyi]; \ 00571 } \ 00572 while (YYID (0)) 00573 # endif 00574 # endif 00575 #endif /* !YYCOPY_NEEDED */ 00576 00577 /* YYFINAL -- State number of the termination state. */ 00578 #define YYFINAL 57 00579 /* YYLAST -- Last index in YYTABLE. */ 00580 #define YYLAST 770 00581 00582 /* YYNTOKENS -- Number of terminals. */ 00583 #define YYNTOKENS 69 00584 /* YYNNTS -- Number of nonterminals. */ 00585 #define YYNNTS 31 00586 /* YYNRULES -- Number of rules. */ 00587 #define YYNRULES 122 00588 /* YYNRULES -- Number of states. */ 00589 #define YYNSTATES 233 00590 00591 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 00592 #define YYUNDEFTOK 2 00593 #define YYMAXUTOK 303 00594 00595 #define YYTRANSLATE(YYX) \ 00596 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 00597 00598 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 00599 static const yytype_uint8 yytranslate[] = 00600 { 00601 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00602 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00603 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00604 2, 2, 2, 2, 2, 2, 2, 2, 32, 64, 00605 58, 63, 34, 30, 65, 31, 57, 35, 2, 2, 00606 2, 2, 2, 2, 2, 2, 2, 2, 2, 62, 00607 22, 21, 23, 2, 29, 2, 2, 2, 2, 2, 00608 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00610 2, 59, 2, 68, 2, 2, 2, 2, 2, 2, 00611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00613 2, 2, 2, 66, 42, 67, 2, 2, 2, 2, 00614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00626 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 00627 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 00628 15, 16, 17, 18, 19, 20, 24, 25, 26, 27, 00629 28, 33, 36, 37, 38, 39, 40, 41, 43, 44, 00630 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 00631 55, 56, 60, 61 00632 }; 00633 00634 #if YYDEBUG 00635 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 00636 YYRHS. */ 00637 static const yytype_uint16 yyprhs[] = 00638 { 00639 0, 0, 3, 5, 7, 11, 15, 18, 21, 26, 00640 31, 32, 40, 41, 48, 55, 59, 61, 63, 65, 00641 67, 70, 73, 76, 79, 80, 82, 86, 90, 96, 00642 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 00643 139, 143, 147, 151, 157, 163, 167, 174, 181, 186, 00644 190, 194, 198, 200, 202, 204, 206, 208, 210, 214, 00645 218, 223, 228, 232, 236, 241, 246, 250, 254, 257, 00646 260, 264, 268, 272, 275, 278, 286, 294, 300, 306, 00647 309, 310, 314, 316, 318, 319, 321, 323, 325, 327, 00648 329, 331, 333, 336, 338, 341, 344, 348, 351, 355, 00649 359, 361, 364, 367, 370, 374, 376, 378, 382, 386, 00650 388, 389, 394, 398, 399, 406, 407, 412, 416, 417, 00651 424, 427, 430 00652 }; 00653 00654 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 00655 static const yytype_int8 yyrhs[] = 00656 { 00657 70, 0, -1, 71, -1, 78, -1, 71, 62, 78, 00658 -1, 72, 15, 78, -1, 72, 13, -1, 72, 12, 00659 -1, 72, 58, 76, 63, -1, 87, 58, 76, 63, 00660 -1, -1, 87, 64, 74, 73, 58, 78, 63, -1, 00661 -1, 72, 58, 75, 24, 75, 63, -1, 87, 58, 00662 75, 24, 75, 63, -1, 58, 71, 63, -1, 87, 00663 -1, 14, -1, 89, -1, 72, -1, 31, 75, -1, 00664 30, 75, -1, 38, 75, -1, 39, 75, -1, -1, 00665 78, -1, 11, 43, 78, -1, 76, 65, 78, -1, 00666 76, 65, 11, 43, 78, -1, 66, 87, 67, 72, 00667 -1, 75, 40, 75, -1, 75, 34, 75, -1, 75, 00668 35, 75, -1, 75, 36, 75, -1, 75, 37, 75, 00669 -1, 75, 29, 75, -1, 75, 30, 75, -1, 75, 00670 32, 75, -1, 75, 31, 75, -1, 75, -1, 75, 00671 21, 75, -1, 75, 28, 75, -1, 75, 27, 75, 00672 -1, 75, 25, 75, 24, 75, -1, 75, 25, 72, 00673 55, 84, -1, 75, 25, 87, -1, 75, 38, 25, 00674 75, 24, 75, -1, 75, 38, 25, 72, 55, 84, 00675 -1, 75, 38, 25, 87, -1, 75, 26, 75, -1, 00676 75, 22, 75, -1, 75, 23, 75, -1, 77, -1, 00677 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 00678 77, 20, 77, -1, 79, 20, 77, -1, 77, 20, 00679 17, 77, -1, 80, 20, 17, 77, -1, 77, 19, 00680 77, -1, 81, 19, 77, -1, 77, 19, 16, 77, 00681 -1, 82, 19, 16, 77, -1, 77, 18, 77, -1, 00682 83, 18, 77, -1, 72, 48, -1, 72, 47, -1, 00683 72, 46, 84, -1, 72, 45, 84, -1, 72, 44, 00684 84, -1, 72, 54, -1, 72, 53, -1, 86, 50, 00685 58, 78, 65, 78, 63, -1, 86, 51, 58, 78, 00686 65, 78, 63, -1, 86, 56, 58, 78, 63, -1, 00687 85, 52, 58, 78, 63, -1, 85, 49, -1, -1, 00688 58, 3, 63, -1, 87, -1, 85, -1, -1, 3, 00689 -1, 5, -1, 6, -1, 4, -1, 10, -1, 7, 00690 -1, 8, -1, 60, 11, -1, 11, -1, 88, 11, 00691 -1, 11, 48, -1, 88, 11, 48, -1, 11, 9, 00692 -1, 88, 11, 9, -1, 58, 90, 63, -1, 92, 00693 -1, 91, 78, -1, 91, 92, -1, 78, 65, -1, 00694 91, 78, 65, -1, 93, -1, 94, -1, 94, 65, 00695 92, -1, 61, 43, 78, -1, 95, -1, -1, 11, 00696 43, 96, 78, -1, 75, 43, 78, -1, -1, 75, 00697 24, 75, 43, 97, 78, -1, -1, 11, 42, 98, 00698 95, -1, 75, 42, 95, -1, -1, 75, 24, 75, 00699 42, 99, 95, -1, 34, 72, -1, 32, 72, -1, 00700 72, 59, 78, 68, -1 00701 }; 00702 00703 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 00704 static const yytype_uint16 yyrline[] = 00705 { 00706 0, 231, 231, 235, 236, 238, 243, 247, 251, 257, 00707 276, 276, 288, 292, 294, 302, 313, 323, 327, 330, 00708 333, 337, 341, 345, 349, 352, 354, 356, 358, 362, 00709 375, 379, 383, 387, 391, 395, 399, 403, 407, 411, 00710 414, 418, 422, 426, 428, 433, 441, 445, 451, 462, 00711 466, 470, 474, 475, 476, 477, 478, 479, 483, 485, 00712 490, 492, 497, 499, 504, 506, 510, 512, 524, 526, 00713 532, 535, 538, 541, 543, 545, 547, 549, 551, 553, 00714 557, 559, 564, 574, 576, 582, 586, 593, 601, 605, 00715 611, 613, 617, 621, 623, 625, 633, 644, 646, 651, 00716 660, 661, 667, 672, 678, 687, 688, 689, 693, 698, 00717 713, 712, 715, 718, 717, 723, 722, 725, 728, 727, 00718 735, 737, 739 00719 }; 00720 #endif 00721 00722 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00723 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 00724 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 00725 static const char *const yytname[] = 00726 { 00727 "$end", "error", "$undefined", "INT", "NULL_PTR", "CHARLIT", "FLOAT", 00728 "TRUEKEYWORD", "FALSEKEYWORD", "COLONCOLON", "STRING", "NAME", "DOT_ID", 00729 "DOT_ALL", "SPECIAL_VARIABLE", "ASSIGN", "ELSE", "THEN", "XOR", "OR", 00730 "_AND_", "'='", "'<'", "'>'", "DOTDOT", "IN", "GEQ", "LEQ", "NOTEQUAL", 00731 "'@'", "'+'", "'-'", "'&'", "UNARY", "'*'", "'/'", "REM", "MOD", "NOT", 00732 "ABS", "STARSTAR", "VAR", "'|'", "ARROW", "TICK_LENGTH", "TICK_LAST", 00733 "TICK_FIRST", "TICK_ADDRESS", "TICK_ACCESS", "TICK_MODULUS", "TICK_MIN", 00734 "TICK_MAX", "TICK_VAL", "TICK_TAG", "TICK_SIZE", "TICK_RANGE", 00735 "TICK_POS", "'.'", "'('", "'['", "NEW", "OTHERS", "';'", "')'", "'\\''", 00736 "','", "'{'", "'}'", "']'", "$accept", "start", "exp1", "primary", "$@1", 00737 "save_qualifier", "simple_exp", "arglist", "relation", "exp", "and_exp", 00738 "and_then_exp", "or_exp", "or_else_exp", "xor_exp", "tick_arglist", 00739 "type_prefix", "opt_type_prefix", "var_or_type", "block", "aggregate", 00740 "aggregate_component_list", "positional_list", "component_groups", 00741 "others", "component_group", "component_associations", "$@2", "$@3", 00742 "$@4", "$@5", 0 00743 }; 00744 #endif 00745 00746 # ifdef YYPRINT 00747 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 00748 token YYLEX-NUM. */ 00749 static const yytype_uint16 yytoknum[] = 00750 { 00751 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 00752 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 00753 275, 61, 60, 62, 276, 277, 278, 279, 280, 64, 00754 43, 45, 38, 281, 42, 47, 282, 283, 284, 285, 00755 286, 287, 124, 288, 289, 290, 291, 292, 293, 294, 00756 295, 296, 297, 298, 299, 300, 301, 46, 40, 91, 00757 302, 303, 59, 41, 39, 44, 123, 125, 93 00758 }; 00759 # endif 00760 00761 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 00762 static const yytype_uint8 yyr1[] = 00763 { 00764 0, 69, 70, 71, 71, 71, 72, 72, 72, 72, 00765 73, 72, 74, 72, 72, 72, 72, 72, 72, 75, 00766 75, 75, 75, 75, 76, 76, 76, 76, 76, 72, 00767 75, 75, 75, 75, 75, 75, 75, 75, 75, 77, 00768 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 00769 77, 77, 78, 78, 78, 78, 78, 78, 79, 79, 00770 80, 80, 81, 81, 82, 82, 83, 83, 72, 72, 00771 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 00772 84, 84, 85, 86, 86, 72, 72, 72, 72, 72, 00773 72, 72, 72, 87, 87, 87, 87, 88, 88, 89, 00774 90, 90, 90, 91, 91, 92, 92, 92, 93, 94, 00775 96, 95, 95, 97, 95, 98, 95, 95, 99, 95, 00776 72, 72, 72 00777 }; 00778 00779 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 00780 static const yytype_uint8 yyr2[] = 00781 { 00782 0, 2, 1, 1, 3, 3, 2, 2, 4, 4, 00783 0, 7, 0, 6, 6, 3, 1, 1, 1, 1, 00784 2, 2, 2, 2, 0, 1, 3, 3, 5, 4, 00785 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 00786 3, 3, 3, 5, 5, 3, 6, 6, 4, 3, 00787 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 00788 4, 4, 3, 3, 4, 4, 3, 3, 2, 2, 00789 3, 3, 3, 2, 2, 7, 7, 5, 5, 2, 00790 0, 3, 1, 1, 0, 1, 1, 1, 1, 1, 00791 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 00792 1, 2, 2, 2, 3, 1, 1, 3, 3, 1, 00793 0, 4, 3, 0, 6, 0, 4, 3, 0, 6, 00794 2, 2, 4 00795 }; 00796 00797 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 00798 Performed when YYTABLE doesn't specify something else to do. Zero 00799 means the default is an error. */ 00800 static const yytype_uint8 yydefact[] = 00801 { 00802 84, 85, 88, 86, 87, 90, 91, 89, 93, 17, 00803 84, 84, 84, 84, 84, 84, 84, 0, 0, 0, 00804 2, 19, 39, 52, 3, 53, 54, 55, 56, 57, 00805 83, 0, 16, 0, 18, 97, 95, 19, 21, 20, 00806 121, 120, 22, 23, 93, 0, 0, 39, 3, 0, 00807 84, 100, 105, 106, 109, 92, 0, 1, 84, 7, 00808 6, 84, 80, 80, 80, 69, 68, 74, 73, 84, 00809 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 00810 84, 84, 84, 84, 84, 84, 0, 84, 84, 84, 00811 84, 84, 0, 84, 0, 84, 79, 0, 0, 0, 00812 0, 84, 12, 94, 115, 110, 84, 15, 84, 84, 00813 84, 103, 99, 101, 102, 84, 84, 4, 5, 0, 00814 72, 71, 70, 93, 39, 0, 25, 0, 40, 50, 00815 51, 19, 0, 16, 49, 42, 41, 35, 36, 38, 00816 37, 31, 32, 33, 34, 84, 30, 66, 84, 62, 00817 84, 58, 59, 84, 63, 84, 67, 84, 84, 84, 00818 84, 39, 0, 10, 98, 96, 84, 84, 108, 0, 00819 0, 117, 112, 104, 107, 29, 0, 84, 84, 8, 00820 84, 122, 80, 84, 19, 0, 16, 64, 60, 61, 00821 65, 0, 0, 0, 0, 84, 9, 0, 116, 111, 00822 118, 113, 81, 26, 0, 93, 27, 44, 43, 80, 00823 84, 78, 84, 84, 77, 0, 84, 84, 84, 13, 00824 84, 47, 46, 0, 0, 14, 0, 119, 114, 28, 00825 75, 76, 11 00826 }; 00827 00828 /* YYDEFGOTO[NTERM-NUM]. */ 00829 static const yytype_int16 yydefgoto[] = 00830 { 00831 -1, 19, 20, 37, 197, 163, 22, 125, 23, 126, 00832 25, 26, 27, 28, 29, 120, 30, 31, 32, 33, 00833 34, 49, 50, 51, 52, 53, 54, 167, 218, 166, 00834 217 00835 }; 00836 00837 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 00838 STATE-NUM. */ 00839 #define YYPACT_NINF -104 00840 static const yytype_int16 yypact[] = 00841 { 00842 424, -104, -104, -104, -104, -104, -104, -104, 16, -104, 00843 424, 424, 118, 118, 424, 424, 286, -7, 6, 31, 00844 -26, 501, 674, 20, -104, 28, 32, 22, 34, 42, 00845 -44, -21, 84, 57, -104, -104, -104, 558, 63, 63, 00846 -3, -3, 63, 63, 23, 26, -36, 611, 9, 27, 00847 286, -104, -104, 29, -104, -104, 25, -104, 424, -104, 00848 -104, 424, 35, 35, 35, -104, -104, -104, -104, 274, 00849 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 00850 424, 424, 424, 424, 424, 424, 71, 424, 424, 350, 00851 387, 424, 91, 424, 85, 424, -104, 53, 58, 59, 00852 60, 274, -104, 19, -104, -104, 424, -104, 424, 461, 00853 424, -104, -104, 50, -104, 286, 118, -104, -104, 124, 00854 -104, -104, -104, 3, 634, -52, -104, 70, 719, 719, 00855 719, 521, 166, 173, 719, 719, 719, 730, 63, 63, 00856 63, 99, 99, 99, 99, 424, 99, -104, 424, -104, 00857 424, -104, -104, 424, -104, 424, -104, 424, 424, 424, 00858 424, 654, -41, -104, -104, -104, 461, 424, -104, 704, 00859 689, -104, -104, -104, -104, -3, 68, 424, 424, -104, 00860 498, -104, 35, 424, 538, 215, 208, -104, -104, -104, 00861 -104, 78, 79, 80, 83, 424, -104, 93, -104, -104, 00862 -104, -104, -104, -104, 339, 14, -104, -104, 719, 35, 00863 424, -104, 424, 424, -104, 589, 424, 461, 424, -104, 00864 424, -104, 719, 90, 92, -104, 98, -104, -104, -104, 00865 -104, -104, -104 00866 }; 00867 00868 /* YYPGOTO[NTERM-NUM]. */ 00869 static const yytype_int8 yypgoto[] = 00870 { 00871 -104, -104, 127, 21, -104, -104, 4, 55, -46, 0, 00872 -104, -104, -104, -104, -104, -62, -104, -104, -15, -104, 00873 -104, -104, -104, -43, -104, -104, -103, -104, -104, -104, 00874 -104 00875 }; 00876 00877 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 00878 positive, shift that token. If negative, reduce the rule which 00879 number is the opposite. If YYTABLE_NINF, syntax error. */ 00880 #define YYTABLE_NINF -83 00881 static const yytype_int16 yytable[] = 00882 { 00883 24, 121, 122, 56, 55, 96, 171, 114, 97, 59, 00884 60, 179, 35, 180, 38, 39, 48, 8, 42, 43, 00885 47, 21, 196, 35, 180, 35, 58, 107, 164, 98, 00886 99, 57, 35, 40, 41, 100, 58, 21, 88, 89, 00887 90, 93, 147, 149, 151, 152, 177, 154, 91, 156, 00888 113, 36, 92, 94, 47, 69, 70, 220, 117, 133, 00889 95, 118, 36, 198, 36, 104, 105, 165, 103, 106, 00890 127, 36, 174, 124, 111, 128, 129, 130, 132, 134, 00891 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 00892 112, 146, 116, 119, 115, 131, 145, 82, 83, 84, 00893 85, 155, 187, 87, 188, 161, 168, 189, 153, 190, 00894 172, 157, 169, 170, 227, 173, 158, 159, 160, 170, 00895 207, 1, 2, 3, 4, 5, 6, 176, 7, 8, 00896 186, 202, 9, -82, -82, -82, -82, 175, 181, 87, 00897 -82, 211, 101, 46, 212, 213, 214, 221, 102, 185, 00898 12, 216, 13, 230, 0, 231, 162, 191, 192, 193, 00899 194, 232, 0, 0, 0, 0, 184, 199, 0, 0, 00900 170, 0, 0, -45, 0, 0, 16, 203, 17, 0, 00901 206, 0, 204, 0, 18, 0, 0, 208, 0, 0, 00902 183, -45, -45, -45, 0, 78, 79, 80, 81, 215, 00903 82, 83, 84, 85, 0, 0, 87, 0, -48, 0, 00904 0, 0, 223, 224, 222, 0, 226, 0, 228, 0, 00905 229, 170, -82, -82, -82, -82, -48, -48, -48, -82, 00906 0, 101, 0, 0, 0, -45, -45, 102, -45, 210, 00907 0, -45, 0, 0, 78, 79, 80, 81, 0, 82, 00908 83, 84, 85, 0, 0, 87, 0, -82, -82, -82, 00909 -82, 0, 0, 0, -82, 0, 101, 0, 0, 0, 00910 -48, -48, 102, -48, 0, 0, -48, 1, 2, 3, 00911 4, 5, 6, 0, 7, 123, 0, 0, 9, 1, 00912 2, 3, 4, 5, 6, 0, 7, 44, 0, 0, 00913 9, 0, 0, 0, 10, 11, 12, 0, 13, 0, 00914 0, 0, 14, 15, 0, 0, 10, 11, 12, 0, 00915 13, 0, 0, 0, 14, 15, 0, 0, 0, 0, 00916 0, 0, 16, 0, 17, 0, 0, -24, 0, -24, 00917 18, 0, 0, 0, 16, 0, 17, 45, 0, 0, 00918 0, 0, 18, 1, 2, 3, 4, 5, 6, 0, 00919 7, 8, 0, 0, 9, 0, 148, 0, 78, 79, 00920 80, 81, 0, 82, 83, 84, 85, 0, 0, 87, 00921 10, 11, 12, 0, 13, 0, 0, 0, 14, 15, 00922 1, 2, 3, 4, 5, 6, 0, 7, 8, 0, 00923 0, 9, 219, 0, 150, 0, 0, 0, 16, 0, 00924 17, 0, 0, 0, 0, 0, 18, 10, 11, 12, 00925 0, 13, 0, 0, 0, 14, 15, 1, 2, 3, 00926 4, 5, 6, 0, 7, 8, 0, 0, 9, 0, 00927 0, 0, 0, 0, 0, 16, 0, 17, 0, 0, 00928 0, 0, 0, 18, 10, 11, 12, 0, 13, 0, 00929 0, 0, 14, 15, 1, 2, 3, 4, 5, 6, 00930 0, 7, 44, 0, 0, 9, 0, 0, 0, 0, 00931 0, 0, 16, 0, 17, 0, 0, 0, 0, 0, 00932 18, 10, 11, 12, 0, 13, 0, 0, 0, 14, 00933 15, 1, 2, 3, 4, 5, 6, 0, 7, 205, 00934 0, 0, 9, 59, 60, 0, 61, 0, 0, 16, 00935 0, 17, 0, 0, 0, 0, 0, 18, 10, 11, 00936 12, 0, 13, 59, 60, 0, 14, 15, 0, 0, 00937 0, 0, 0, 0, 0, 62, 63, 64, 65, 66, 00938 59, 60, 0, 0, 67, 68, 16, 0, 17, 69, 00939 70, 0, 0, 0, 18, 62, 63, 64, 65, 66, 00940 59, 60, 0, 0, 67, 68, 182, 0, 0, 69, 00941 70, 0, 62, 63, 64, 65, 66, 0, 0, 0, 00942 0, 67, 68, 209, 0, 0, 69, 70, 0, 0, 00943 0, 0, 62, 63, 64, 65, 66, 0, 0, 0, 00944 0, 67, 68, 0, 0, 0, 69, 70, 78, 79, 00945 80, 81, 0, 82, 83, 84, 85, 0, 0, 87, 00946 0, 0, 71, 72, 73, 108, 74, 75, 76, 77, 00947 78, 79, 80, 81, 0, 82, 83, 84, 85, 86, 00948 0, 87, 225, 109, 110, 71, 72, 73, 178, 74, 00949 75, 76, 77, 78, 79, 80, 81, 0, 82, 83, 00950 84, 85, 86, 0, 87, 71, 72, 73, 195, 74, 00951 75, 76, 77, 78, 79, 80, 81, 0, 82, 83, 00952 84, 85, 86, 0, 87, 71, 72, 73, 0, 74, 00953 75, 76, 77, 78, 79, 80, 81, 0, 82, 83, 00954 84, 85, 86, 108, 87, 0, 0, 0, 78, 79, 00955 80, 81, 0, 82, 83, 84, 85, 0, 0, 87, 00956 0, 109, 110, 78, 79, 80, 81, 0, 82, 83, 00957 84, 85, 0, 0, 87, 0, 200, 201, 78, 79, 00958 80, 81, 0, 82, 83, 84, 85, 0, 0, 87, 00959 79, 80, 81, 0, 82, 83, 84, 85, 0, 0, 00960 87 00961 }; 00962 00963 #define yypact_value_is_default(yystate) \ 00964 ((yystate) == (-104)) 00965 00966 #define yytable_value_is_error(yytable_value) \ 00967 YYID (0) 00968 00969 static const yytype_int16 yycheck[] = 00970 { 00971 0, 63, 64, 18, 11, 49, 109, 50, 52, 12, 00972 13, 63, 9, 65, 10, 11, 16, 11, 14, 15, 00973 16, 0, 63, 9, 65, 9, 62, 63, 9, 50, 00974 51, 0, 9, 12, 13, 56, 62, 16, 18, 19, 00975 20, 19, 88, 89, 90, 91, 43, 93, 20, 95, 00976 50, 48, 20, 19, 50, 58, 59, 43, 58, 74, 00977 18, 61, 48, 166, 48, 42, 43, 48, 11, 43, 00978 70, 48, 115, 69, 65, 71, 72, 73, 74, 75, 00979 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 00980 63, 87, 67, 58, 65, 74, 25, 34, 35, 36, 00981 37, 16, 148, 40, 150, 101, 106, 153, 17, 155, 00982 110, 58, 108, 109, 217, 65, 58, 58, 58, 115, 00983 182, 3, 4, 5, 6, 7, 8, 3, 10, 11, 00984 145, 63, 14, 49, 50, 51, 52, 116, 68, 40, 00985 56, 63, 58, 16, 65, 65, 63, 209, 64, 145, 00986 32, 58, 34, 63, -1, 63, 101, 157, 158, 159, 00987 160, 63, -1, -1, -1, -1, 145, 167, -1, -1, 00988 166, -1, -1, 0, -1, -1, 58, 177, 60, -1, 00989 180, -1, 178, -1, 66, -1, -1, 183, -1, -1, 00990 24, 18, 19, 20, -1, 29, 30, 31, 32, 195, 00991 34, 35, 36, 37, -1, -1, 40, -1, 0, -1, 00992 -1, -1, 212, 213, 210, -1, 216, -1, 218, -1, 00993 220, 217, 49, 50, 51, 52, 18, 19, 20, 56, 00994 -1, 58, -1, -1, -1, 62, 63, 64, 65, 24, 00995 -1, 68, -1, -1, 29, 30, 31, 32, -1, 34, 00996 35, 36, 37, -1, -1, 40, -1, 49, 50, 51, 00997 52, -1, -1, -1, 56, -1, 58, -1, -1, -1, 00998 62, 63, 64, 65, -1, -1, 68, 3, 4, 5, 00999 6, 7, 8, -1, 10, 11, -1, -1, 14, 3, 01000 4, 5, 6, 7, 8, -1, 10, 11, -1, -1, 01001 14, -1, -1, -1, 30, 31, 32, -1, 34, -1, 01002 -1, -1, 38, 39, -1, -1, 30, 31, 32, -1, 01003 34, -1, -1, -1, 38, 39, -1, -1, -1, -1, 01004 -1, -1, 58, -1, 60, -1, -1, 63, -1, 65, 01005 66, -1, -1, -1, 58, -1, 60, 61, -1, -1, 01006 -1, -1, 66, 3, 4, 5, 6, 7, 8, -1, 01007 10, 11, -1, -1, 14, -1, 16, -1, 29, 30, 01008 31, 32, -1, 34, 35, 36, 37, -1, -1, 40, 01009 30, 31, 32, -1, 34, -1, -1, -1, 38, 39, 01010 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, 01011 -1, 14, 63, -1, 17, -1, -1, -1, 58, -1, 01012 60, -1, -1, -1, -1, -1, 66, 30, 31, 32, 01013 -1, 34, -1, -1, -1, 38, 39, 3, 4, 5, 01014 6, 7, 8, -1, 10, 11, -1, -1, 14, -1, 01015 -1, -1, -1, -1, -1, 58, -1, 60, -1, -1, 01016 -1, -1, -1, 66, 30, 31, 32, -1, 34, -1, 01017 -1, -1, 38, 39, 3, 4, 5, 6, 7, 8, 01018 -1, 10, 11, -1, -1, 14, -1, -1, -1, -1, 01019 -1, -1, 58, -1, 60, -1, -1, -1, -1, -1, 01020 66, 30, 31, 32, -1, 34, -1, -1, -1, 38, 01021 39, 3, 4, 5, 6, 7, 8, -1, 10, 11, 01022 -1, -1, 14, 12, 13, -1, 15, -1, -1, 58, 01023 -1, 60, -1, -1, -1, -1, -1, 66, 30, 31, 01024 32, -1, 34, 12, 13, -1, 38, 39, -1, -1, 01025 -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 01026 12, 13, -1, -1, 53, 54, 58, -1, 60, 58, 01027 59, -1, -1, -1, 66, 44, 45, 46, 47, 48, 01028 12, 13, -1, -1, 53, 54, 55, -1, -1, 58, 01029 59, -1, 44, 45, 46, 47, 48, -1, -1, -1, 01030 -1, 53, 54, 55, -1, -1, 58, 59, -1, -1, 01031 -1, -1, 44, 45, 46, 47, 48, -1, -1, -1, 01032 -1, 53, 54, -1, -1, -1, 58, 59, 29, 30, 01033 31, 32, -1, 34, 35, 36, 37, -1, -1, 40, 01034 -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, 01035 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 01036 -1, 40, 63, 42, 43, 21, 22, 23, 24, 25, 01037 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 01038 36, 37, 38, -1, 40, 21, 22, 23, 24, 25, 01039 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 01040 36, 37, 38, -1, 40, 21, 22, 23, -1, 25, 01041 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 01042 36, 37, 38, 24, 40, -1, -1, -1, 29, 30, 01043 31, 32, -1, 34, 35, 36, 37, -1, -1, 40, 01044 -1, 42, 43, 29, 30, 31, 32, -1, 34, 35, 01045 36, 37, -1, -1, 40, -1, 42, 43, 29, 30, 01046 31, 32, -1, 34, 35, 36, 37, -1, -1, 40, 01047 30, 31, 32, -1, 34, 35, 36, 37, -1, -1, 01048 40 01049 }; 01050 01051 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 01052 symbol of state STATE-NUM. */ 01053 static const yytype_uint8 yystos[] = 01054 { 01055 0, 3, 4, 5, 6, 7, 8, 10, 11, 14, 01056 30, 31, 32, 34, 38, 39, 58, 60, 66, 70, 01057 71, 72, 75, 77, 78, 79, 80, 81, 82, 83, 01058 85, 86, 87, 88, 89, 9, 48, 72, 75, 75, 01059 72, 72, 75, 75, 11, 61, 71, 75, 78, 90, 01060 91, 92, 93, 94, 95, 11, 87, 0, 62, 12, 01061 13, 15, 44, 45, 46, 47, 48, 53, 54, 58, 01062 59, 21, 22, 23, 25, 26, 27, 28, 29, 30, 01063 31, 32, 34, 35, 36, 37, 38, 40, 18, 19, 01064 20, 20, 20, 19, 19, 18, 49, 52, 50, 51, 01065 56, 58, 64, 11, 42, 43, 43, 63, 24, 42, 01066 43, 65, 63, 78, 92, 65, 67, 78, 78, 58, 01067 84, 84, 84, 11, 75, 76, 78, 78, 75, 75, 01068 75, 72, 75, 87, 75, 75, 75, 75, 75, 75, 01069 75, 75, 75, 75, 75, 25, 75, 77, 16, 77, 01070 17, 77, 77, 17, 77, 16, 77, 58, 58, 58, 01071 58, 75, 76, 74, 9, 48, 98, 96, 78, 75, 01072 75, 95, 78, 65, 92, 72, 3, 43, 24, 63, 01073 65, 68, 55, 24, 72, 75, 87, 77, 77, 77, 01074 77, 78, 78, 78, 78, 24, 63, 73, 95, 78, 01075 42, 43, 63, 78, 75, 11, 78, 84, 75, 55, 01076 24, 63, 65, 65, 63, 75, 58, 99, 97, 63, 01077 43, 84, 75, 78, 78, 63, 78, 95, 78, 78, 01078 63, 63, 63 01079 }; 01080 01081 #define yyerrok (yyerrstatus = 0) 01082 #define yyclearin (yychar = YYEMPTY) 01083 #define YYEMPTY (-2) 01084 #define YYEOF 0 01085 01086 #define YYACCEPT goto yyacceptlab 01087 #define YYABORT goto yyabortlab 01088 #define YYERROR goto yyerrorlab 01089 01090 01091 /* Like YYERROR except do call yyerror. This remains here temporarily 01092 to ease the transition to the new meaning of YYERROR, for GCC. 01093 Once GCC version 2 has supplanted version 1, this can go. However, 01094 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 01095 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 01096 discussed. */ 01097 01098 #define YYFAIL goto yyerrlab 01099 #if defined YYFAIL 01100 /* This is here to suppress warnings from the GCC cpp's 01101 -Wunused-macros. Normally we don't worry about that warning, but 01102 some users do, and we want to make it easy for users to remove 01103 YYFAIL uses, which will produce warnings from Bison 2.5. */ 01104 #endif 01105 01106 #define YYRECOVERING() (!!yyerrstatus) 01107 01108 #define YYBACKUP(Token, Value) \ 01109 do \ 01110 if (yychar == YYEMPTY && yylen == 1) \ 01111 { \ 01112 yychar = (Token); \ 01113 yylval = (Value); \ 01114 YYPOPSTACK (1); \ 01115 goto yybackup; \ 01116 } \ 01117 else \ 01118 { \ 01119 yyerror (YY_("syntax error: cannot back up")); \ 01120 YYERROR; \ 01121 } \ 01122 while (YYID (0)) 01123 01124 01125 #define YYTERROR 1 01126 #define YYERRCODE 256 01127 01128 01129 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 01130 If N is 0, then set CURRENT to the empty location which ends 01131 the previous symbol: RHS[0] (always defined). */ 01132 01133 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 01134 #ifndef YYLLOC_DEFAULT 01135 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 01136 do \ 01137 if (YYID (N)) \ 01138 { \ 01139 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 01140 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 01141 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 01142 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 01143 } \ 01144 else \ 01145 { \ 01146 (Current).first_line = (Current).last_line = \ 01147 YYRHSLOC (Rhs, 0).last_line; \ 01148 (Current).first_column = (Current).last_column = \ 01149 YYRHSLOC (Rhs, 0).last_column; \ 01150 } \ 01151 while (YYID (0)) 01152 #endif 01153 01154 01155 /* This macro is provided for backward compatibility. */ 01156 01157 #ifndef YY_LOCATION_PRINT 01158 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 01159 #endif 01160 01161 01162 /* YYLEX -- calling `yylex' with the right arguments. */ 01163 01164 #ifdef YYLEX_PARAM 01165 # define YYLEX yylex (YYLEX_PARAM) 01166 #else 01167 # define YYLEX yylex () 01168 #endif 01169 01170 /* Enable debugging if requested. */ 01171 #if YYDEBUG 01172 01173 # ifndef YYFPRINTF 01174 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 01175 # define YYFPRINTF fprintf 01176 # endif 01177 01178 # define YYDPRINTF(Args) \ 01179 do { \ 01180 if (yydebug) \ 01181 YYFPRINTF Args; \ 01182 } while (YYID (0)) 01183 01184 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 01185 do { \ 01186 if (yydebug) \ 01187 { \ 01188 YYFPRINTF (stderr, "%s ", Title); \ 01189 yy_symbol_print (stderr, \ 01190 Type, Value); \ 01191 YYFPRINTF (stderr, "\n"); \ 01192 } \ 01193 } while (YYID (0)) 01194 01195 01196 /*--------------------------------. 01197 | Print this symbol on YYOUTPUT. | 01198 `--------------------------------*/ 01199 01200 /*ARGSUSED*/ 01201 #if (defined __STDC__ || defined __C99__FUNC__ \ 01202 || defined __cplusplus || defined _MSC_VER) 01203 static void 01204 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 01205 #else 01206 static void 01207 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 01208 FILE *yyoutput; 01209 int yytype; 01210 YYSTYPE const * const yyvaluep; 01211 #endif 01212 { 01213 if (!yyvaluep) 01214 return; 01215 # ifdef YYPRINT 01216 if (yytype < YYNTOKENS) 01217 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 01218 # else 01219 YYUSE (yyoutput); 01220 # endif 01221 switch (yytype) 01222 { 01223 default: 01224 break; 01225 } 01226 } 01227 01228 01229 /*--------------------------------. 01230 | Print this symbol on YYOUTPUT. | 01231 `--------------------------------*/ 01232 01233 #if (defined __STDC__ || defined __C99__FUNC__ \ 01234 || defined __cplusplus || defined _MSC_VER) 01235 static void 01236 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 01237 #else 01238 static void 01239 yy_symbol_print (yyoutput, yytype, yyvaluep) 01240 FILE *yyoutput; 01241 int yytype; 01242 YYSTYPE const * const yyvaluep; 01243 #endif 01244 { 01245 if (yytype < YYNTOKENS) 01246 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 01247 else 01248 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 01249 01250 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 01251 YYFPRINTF (yyoutput, ")"); 01252 } 01253 01254 /*------------------------------------------------------------------. 01255 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 01256 | TOP (included). | 01257 `------------------------------------------------------------------*/ 01258 01259 #if (defined __STDC__ || defined __C99__FUNC__ \ 01260 || defined __cplusplus || defined _MSC_VER) 01261 static void 01262 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 01263 #else 01264 static void 01265 yy_stack_print (yybottom, yytop) 01266 yytype_int16 *yybottom; 01267 yytype_int16 *yytop; 01268 #endif 01269 { 01270 YYFPRINTF (stderr, "Stack now"); 01271 for (; yybottom <= yytop; yybottom++) 01272 { 01273 int yybot = *yybottom; 01274 YYFPRINTF (stderr, " %d", yybot); 01275 } 01276 YYFPRINTF (stderr, "\n"); 01277 } 01278 01279 # define YY_STACK_PRINT(Bottom, Top) \ 01280 do { \ 01281 if (yydebug) \ 01282 yy_stack_print ((Bottom), (Top)); \ 01283 } while (YYID (0)) 01284 01285 01286 /*------------------------------------------------. 01287 | Report that the YYRULE is going to be reduced. | 01288 `------------------------------------------------*/ 01289 01290 #if (defined __STDC__ || defined __C99__FUNC__ \ 01291 || defined __cplusplus || defined _MSC_VER) 01292 static void 01293 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 01294 #else 01295 static void 01296 yy_reduce_print (yyvsp, yyrule) 01297 YYSTYPE *yyvsp; 01298 int yyrule; 01299 #endif 01300 { 01301 int yynrhs = yyr2[yyrule]; 01302 int yyi; 01303 unsigned long int yylno = yyrline[yyrule]; 01304 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 01305 yyrule - 1, yylno); 01306 /* The symbols being reduced. */ 01307 for (yyi = 0; yyi < yynrhs; yyi++) 01308 { 01309 YYFPRINTF (stderr, " $%d = ", yyi + 1); 01310 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 01311 &(yyvsp[(yyi + 1) - (yynrhs)]) 01312 ); 01313 YYFPRINTF (stderr, "\n"); 01314 } 01315 } 01316 01317 # define YY_REDUCE_PRINT(Rule) \ 01318 do { \ 01319 if (yydebug) \ 01320 yy_reduce_print (yyvsp, Rule); \ 01321 } while (YYID (0)) 01322 01323 /* Nonzero means print parse trace. It is left uninitialized so that 01324 multiple parsers can coexist. */ 01325 int yydebug; 01326 #else /* !YYDEBUG */ 01327 # define YYDPRINTF(Args) 01328 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 01329 # define YY_STACK_PRINT(Bottom, Top) 01330 # define YY_REDUCE_PRINT(Rule) 01331 #endif /* !YYDEBUG */ 01332 01333 01334 /* YYINITDEPTH -- initial size of the parser's stacks. */ 01335 #ifndef YYINITDEPTH 01336 # define YYINITDEPTH 200 01337 #endif 01338 01339 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 01340 if the built-in stack extension method is used). 01341 01342 Do not make this value too large; the results are undefined if 01343 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 01344 evaluated with infinite-precision integer arithmetic. */ 01345 01346 #ifndef YYMAXDEPTH 01347 # define YYMAXDEPTH 10000 01348 #endif 01349 01350 01351 #if YYERROR_VERBOSE 01352 01353 # ifndef yystrlen 01354 # if defined __GLIBC__ && defined _STRING_H 01355 # define yystrlen strlen 01356 # else 01357 /* Return the length of YYSTR. */ 01358 #if (defined __STDC__ || defined __C99__FUNC__ \ 01359 || defined __cplusplus || defined _MSC_VER) 01360 static YYSIZE_T 01361 yystrlen (const char *yystr) 01362 #else 01363 static YYSIZE_T 01364 yystrlen (yystr) 01365 const char *yystr; 01366 #endif 01367 { 01368 YYSIZE_T yylen; 01369 for (yylen = 0; yystr[yylen]; yylen++) 01370 continue; 01371 return yylen; 01372 } 01373 # endif 01374 # endif 01375 01376 # ifndef yystpcpy 01377 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 01378 # define yystpcpy stpcpy 01379 # else 01380 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 01381 YYDEST. */ 01382 #if (defined __STDC__ || defined __C99__FUNC__ \ 01383 || defined __cplusplus || defined _MSC_VER) 01384 static char * 01385 yystpcpy (char *yydest, const char *yysrc) 01386 #else 01387 static char * 01388 yystpcpy (yydest, yysrc) 01389 char *yydest; 01390 const char *yysrc; 01391 #endif 01392 { 01393 char *yyd = yydest; 01394 const char *yys = yysrc; 01395 01396 while ((*yyd++ = *yys++) != '\0') 01397 continue; 01398 01399 return yyd - 1; 01400 } 01401 # endif 01402 # endif 01403 01404 # ifndef yytnamerr 01405 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 01406 quotes and backslashes, so that it's suitable for yyerror. The 01407 heuristic is that double-quoting is unnecessary unless the string 01408 contains an apostrophe, a comma, or backslash (other than 01409 backslash-backslash). YYSTR is taken from yytname. If YYRES is 01410 null, do not copy; instead, return the length of what the result 01411 would have been. */ 01412 static YYSIZE_T 01413 yytnamerr (char *yyres, const char *yystr) 01414 { 01415 if (*yystr == '"') 01416 { 01417 YYSIZE_T yyn = 0; 01418 char const *yyp = yystr; 01419 01420 for (;;) 01421 switch (*++yyp) 01422 { 01423 case '\'': 01424 case ',': 01425 goto do_not_strip_quotes; 01426 01427 case '\\': 01428 if (*++yyp != '\\') 01429 goto do_not_strip_quotes; 01430 /* Fall through. */ 01431 default: 01432 if (yyres) 01433 yyres[yyn] = *yyp; 01434 yyn++; 01435 break; 01436 01437 case '"': 01438 if (yyres) 01439 yyres[yyn] = '\0'; 01440 return yyn; 01441 } 01442 do_not_strip_quotes: ; 01443 } 01444 01445 if (! yyres) 01446 return yystrlen (yystr); 01447 01448 return yystpcpy (yyres, yystr) - yyres; 01449 } 01450 # endif 01451 01452 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 01453 about the unexpected token YYTOKEN for the state stack whose top is 01454 YYSSP. 01455 01456 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 01457 not large enough to hold the message. In that case, also set 01458 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 01459 required number of bytes is too large to store. */ 01460 static int 01461 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 01462 yytype_int16 *yyssp, int yytoken) 01463 { 01464 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 01465 YYSIZE_T yysize = yysize0; 01466 YYSIZE_T yysize1; 01467 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 01468 /* Internationalized format string. */ 01469 const char *yyformat = 0; 01470 /* Arguments of yyformat. */ 01471 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 01472 /* Number of reported tokens (one for the "unexpected", one per 01473 "expected"). */ 01474 int yycount = 0; 01475 01476 /* There are many possibilities here to consider: 01477 - Assume YYFAIL is not used. It's too flawed to consider. See 01478 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 01479 for details. YYERROR is fine as it does not invoke this 01480 function. 01481 - If this state is a consistent state with a default action, then 01482 the only way this function was invoked is if the default action 01483 is an error action. In that case, don't check for expected 01484 tokens because there are none. 01485 - The only way there can be no lookahead present (in yychar) is if 01486 this state is a consistent state with a default action. Thus, 01487 detecting the absence of a lookahead is sufficient to determine 01488 that there is no unexpected or expected token to report. In that 01489 case, just report a simple "syntax error". 01490 - Don't assume there isn't a lookahead just because this state is a 01491 consistent state with a default action. There might have been a 01492 previous inconsistent state, consistent state with a non-default 01493 action, or user semantic action that manipulated yychar. 01494 - Of course, the expected token list depends on states to have 01495 correct lookahead information, and it depends on the parser not 01496 to perform extra reductions after fetching a lookahead from the 01497 scanner and before detecting a syntax error. Thus, state merging 01498 (from LALR or IELR) and default reductions corrupt the expected 01499 token list. However, the list is correct for canonical LR with 01500 one exception: it will still contain any token that will not be 01501 accepted due to an error action in a later state. 01502 */ 01503 if (yytoken != YYEMPTY) 01504 { 01505 int yyn = yypact[*yyssp]; 01506 yyarg[yycount++] = yytname[yytoken]; 01507 if (!yypact_value_is_default (yyn)) 01508 { 01509 /* Start YYX at -YYN if negative to avoid negative indexes in 01510 YYCHECK. In other words, skip the first -YYN actions for 01511 this state because they are default actions. */ 01512 int yyxbegin = yyn < 0 ? -yyn : 0; 01513 /* Stay within bounds of both yycheck and yytname. */ 01514 int yychecklim = YYLAST - yyn + 1; 01515 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 01516 int yyx; 01517 01518 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 01519 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 01520 && !yytable_value_is_error (yytable[yyx + yyn])) 01521 { 01522 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 01523 { 01524 yycount = 1; 01525 yysize = yysize0; 01526 break; 01527 } 01528 yyarg[yycount++] = yytname[yyx]; 01529 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 01530 if (! (yysize <= yysize1 01531 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 01532 return 2; 01533 yysize = yysize1; 01534 } 01535 } 01536 } 01537 01538 switch (yycount) 01539 { 01540 # define YYCASE_(N, S) \ 01541 case N: \ 01542 yyformat = S; \ 01543 break 01544 YYCASE_(0, YY_("syntax error")); 01545 YYCASE_(1, YY_("syntax error, unexpected %s")); 01546 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 01547 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 01548 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 01549 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 01550 # undef YYCASE_ 01551 } 01552 01553 yysize1 = yysize + yystrlen (yyformat); 01554 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 01555 return 2; 01556 yysize = yysize1; 01557 01558 if (*yymsg_alloc < yysize) 01559 { 01560 *yymsg_alloc = 2 * yysize; 01561 if (! (yysize <= *yymsg_alloc 01562 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 01563 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 01564 return 1; 01565 } 01566 01567 /* Avoid sprintf, as that infringes on the user's name space. 01568 Don't have undefined behavior even if the translation 01569 produced a string with the wrong number of "%s"s. */ 01570 { 01571 char *yyp = *yymsg; 01572 int yyi = 0; 01573 while ((*yyp = *yyformat) != '\0') 01574 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 01575 { 01576 yyp += yytnamerr (yyp, yyarg[yyi++]); 01577 yyformat += 2; 01578 } 01579 else 01580 { 01581 yyp++; 01582 yyformat++; 01583 } 01584 } 01585 return 0; 01586 } 01587 #endif /* YYERROR_VERBOSE */ 01588 01589 /*-----------------------------------------------. 01590 | Release the memory associated to this symbol. | 01591 `-----------------------------------------------*/ 01592 01593 /*ARGSUSED*/ 01594 #if (defined __STDC__ || defined __C99__FUNC__ \ 01595 || defined __cplusplus || defined _MSC_VER) 01596 static void 01597 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 01598 #else 01599 static void 01600 yydestruct (yymsg, yytype, yyvaluep) 01601 const char *yymsg; 01602 int yytype; 01603 YYSTYPE *yyvaluep; 01604 #endif 01605 { 01606 YYUSE (yyvaluep); 01607 01608 if (!yymsg) 01609 yymsg = "Deleting"; 01610 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 01611 01612 switch (yytype) 01613 { 01614 01615 default: 01616 break; 01617 } 01618 } 01619 01620 01621 /* Prevent warnings from -Wmissing-prototypes. */ 01622 #ifdef YYPARSE_PARAM 01623 #if defined __STDC__ || defined __cplusplus 01624 int yyparse (void *YYPARSE_PARAM); 01625 #else 01626 int yyparse (); 01627 #endif 01628 #else /* ! YYPARSE_PARAM */ 01629 #if defined __STDC__ || defined __cplusplus 01630 int yyparse (void); 01631 #else 01632 int yyparse (); 01633 #endif 01634 #endif /* ! YYPARSE_PARAM */ 01635 01636 01637 /* The lookahead symbol. */ 01638 int yychar; 01639 01640 /* The semantic value of the lookahead symbol. */ 01641 YYSTYPE yylval; 01642 01643 /* Number of syntax errors so far. */ 01644 int yynerrs; 01645 01646 01647 /*----------. 01648 | yyparse. | 01649 `----------*/ 01650 01651 #ifdef YYPARSE_PARAM 01652 #if (defined __STDC__ || defined __C99__FUNC__ \ 01653 || defined __cplusplus || defined _MSC_VER) 01654 int 01655 yyparse (void *YYPARSE_PARAM) 01656 #else 01657 int 01658 yyparse (YYPARSE_PARAM) 01659 void *YYPARSE_PARAM; 01660 #endif 01661 #else /* ! YYPARSE_PARAM */ 01662 #if (defined __STDC__ || defined __C99__FUNC__ \ 01663 || defined __cplusplus || defined _MSC_VER) 01664 int 01665 yyparse (void) 01666 #else 01667 int 01668 yyparse () 01669 01670 #endif 01671 #endif 01672 { 01673 int yystate; 01674 /* Number of tokens to shift before error messages enabled. */ 01675 int yyerrstatus; 01676 01677 /* The stacks and their tools: 01678 `yyss': related to states. 01679 `yyvs': related to semantic values. 01680 01681 Refer to the stacks thru separate pointers, to allow yyoverflow 01682 to xreallocate them elsewhere. */ 01683 01684 /* The state stack. */ 01685 yytype_int16 yyssa[YYINITDEPTH]; 01686 yytype_int16 *yyss; 01687 yytype_int16 *yyssp; 01688 01689 /* The semantic value stack. */ 01690 YYSTYPE yyvsa[YYINITDEPTH]; 01691 YYSTYPE *yyvs; 01692 YYSTYPE *yyvsp; 01693 01694 YYSIZE_T yystacksize; 01695 01696 int yyn; 01697 int yyresult; 01698 /* Lookahead token as an internal (translated) token number. */ 01699 int yytoken; 01700 /* The variables used to return semantic value and location from the 01701 action routines. */ 01702 YYSTYPE yyval; 01703 01704 #if YYERROR_VERBOSE 01705 /* Buffer for error messages, and its allocated size. */ 01706 char yymsgbuf[128]; 01707 char *yymsg = yymsgbuf; 01708 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 01709 #endif 01710 01711 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 01712 01713 /* The number of symbols on the RHS of the reduced rule. 01714 Keep to zero when no symbol should be popped. */ 01715 int yylen = 0; 01716 01717 yytoken = 0; 01718 yyss = yyssa; 01719 yyvs = yyvsa; 01720 yystacksize = YYINITDEPTH; 01721 01722 YYDPRINTF ((stderr, "Starting parse\n")); 01723 01724 yystate = 0; 01725 yyerrstatus = 0; 01726 yynerrs = 0; 01727 yychar = YYEMPTY; /* Cause a token to be read. */ 01728 01729 /* Initialize stack pointers. 01730 Waste one element of value and location stack 01731 so that they stay on the same level as the state stack. 01732 The wasted elements are never initialized. */ 01733 yyssp = yyss; 01734 yyvsp = yyvs; 01735 01736 goto yysetstate; 01737 01738 /*------------------------------------------------------------. 01739 | yynewstate -- Push a new state, which is found in yystate. | 01740 `------------------------------------------------------------*/ 01741 yynewstate: 01742 /* In all cases, when you get here, the value and location stacks 01743 have just been pushed. So pushing a state here evens the stacks. */ 01744 yyssp++; 01745 01746 yysetstate: 01747 *yyssp = yystate; 01748 01749 if (yyss + yystacksize - 1 <= yyssp) 01750 { 01751 /* Get the current used size of the three stacks, in elements. */ 01752 YYSIZE_T yysize = yyssp - yyss + 1; 01753 01754 #ifdef yyoverflow 01755 { 01756 /* Give user a chance to xreallocate the stack. Use copies of 01757 these so that the &'s don't force the real ones into 01758 memory. */ 01759 YYSTYPE *yyvs1 = yyvs; 01760 yytype_int16 *yyss1 = yyss; 01761 01762 /* Each stack pointer address is followed by the size of the 01763 data in use in that stack, in bytes. This used to be a 01764 conditional around just the two extra args, but that might 01765 be undefined if yyoverflow is a macro. */ 01766 yyoverflow (YY_("memory exhausted"), 01767 &yyss1, yysize * sizeof (*yyssp), 01768 &yyvs1, yysize * sizeof (*yyvsp), 01769 &yystacksize); 01770 01771 yyss = yyss1; 01772 yyvs = yyvs1; 01773 } 01774 #else /* no yyoverflow */ 01775 # ifndef YYSTACK_RELOCATE 01776 goto yyexhaustedlab; 01777 # else 01778 /* Extend the stack our own way. */ 01779 if (YYMAXDEPTH <= yystacksize) 01780 goto yyexhaustedlab; 01781 yystacksize *= 2; 01782 if (YYMAXDEPTH < yystacksize) 01783 yystacksize = YYMAXDEPTH; 01784 01785 { 01786 yytype_int16 *yyss1 = yyss; 01787 union yyalloc *yyptr = 01788 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01789 if (! yyptr) 01790 goto yyexhaustedlab; 01791 YYSTACK_RELOCATE (yyss_alloc, yyss); 01792 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 01793 # undef YYSTACK_RELOCATE 01794 if (yyss1 != yyssa) 01795 YYSTACK_FREE (yyss1); 01796 } 01797 # endif 01798 #endif /* no yyoverflow */ 01799 01800 yyssp = yyss + yysize - 1; 01801 yyvsp = yyvs + yysize - 1; 01802 01803 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01804 (unsigned long int) yystacksize)); 01805 01806 if (yyss + yystacksize - 1 <= yyssp) 01807 YYABORT; 01808 } 01809 01810 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01811 01812 if (yystate == YYFINAL) 01813 YYACCEPT; 01814 01815 goto yybackup; 01816 01817 /*-----------. 01818 | yybackup. | 01819 `-----------*/ 01820 yybackup: 01821 01822 /* Do appropriate processing given the current state. Read a 01823 lookahead token if we need one and don't already have one. */ 01824 01825 /* First try to decide what to do without reference to lookahead token. */ 01826 yyn = yypact[yystate]; 01827 if (yypact_value_is_default (yyn)) 01828 goto yydefault; 01829 01830 /* Not known => get a lookahead token if don't already have one. */ 01831 01832 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 01833 if (yychar == YYEMPTY) 01834 { 01835 YYDPRINTF ((stderr, "Reading a token: ")); 01836 yychar = YYLEX; 01837 } 01838 01839 if (yychar <= YYEOF) 01840 { 01841 yychar = yytoken = YYEOF; 01842 YYDPRINTF ((stderr, "Now at end of input.\n")); 01843 } 01844 else 01845 { 01846 yytoken = YYTRANSLATE (yychar); 01847 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 01848 } 01849 01850 /* If the proper action on seeing token YYTOKEN is to reduce or to 01851 detect an error, take that action. */ 01852 yyn += yytoken; 01853 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 01854 goto yydefault; 01855 yyn = yytable[yyn]; 01856 if (yyn <= 0) 01857 { 01858 if (yytable_value_is_error (yyn)) 01859 goto yyerrlab; 01860 yyn = -yyn; 01861 goto yyreduce; 01862 } 01863 01864 /* Count tokens shifted since error; after three, turn off error 01865 status. */ 01866 if (yyerrstatus) 01867 yyerrstatus--; 01868 01869 /* Shift the lookahead token. */ 01870 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 01871 01872 /* Discard the shifted token. */ 01873 yychar = YYEMPTY; 01874 01875 yystate = yyn; 01876 *++yyvsp = yylval; 01877 01878 goto yynewstate; 01879 01880 01881 /*-----------------------------------------------------------. 01882 | yydefault -- do the default action for the current state. | 01883 `-----------------------------------------------------------*/ 01884 yydefault: 01885 yyn = yydefact[yystate]; 01886 if (yyn == 0) 01887 goto yyerrlab; 01888 goto yyreduce; 01889 01890 01891 /*-----------------------------. 01892 | yyreduce -- Do a reduction. | 01893 `-----------------------------*/ 01894 yyreduce: 01895 /* yyn is the number of a rule to reduce with. */ 01896 yylen = yyr2[yyn]; 01897 01898 /* If YYLEN is nonzero, implement the default value of the action: 01899 `$$ = $1'. 01900 01901 Otherwise, the following line sets YYVAL to garbage. 01902 This behavior is undocumented and Bison 01903 users should not rely upon it. Assigning to YYVAL 01904 unconditionally makes the parser a bit smaller, and it avoids a 01905 GCC warning that YYVAL may be used uninitialized. */ 01906 yyval = yyvsp[1-yylen]; 01907 01908 01909 YY_REDUCE_PRINT (yyn); 01910 switch (yyn) 01911 { 01912 case 4: 01913 01914 /* Line 1806 of yacc.c */ 01915 #line 237 "../../src/gdb/ada-exp.y" 01916 { write_exp_elt_opcode (BINOP_COMMA); } 01917 break; 01918 01919 case 5: 01920 01921 /* Line 1806 of yacc.c */ 01922 #line 239 "../../src/gdb/ada-exp.y" 01923 { write_exp_elt_opcode (BINOP_ASSIGN); } 01924 break; 01925 01926 case 6: 01927 01928 /* Line 1806 of yacc.c */ 01929 #line 244 "../../src/gdb/ada-exp.y" 01930 { write_exp_elt_opcode (UNOP_IND); } 01931 break; 01932 01933 case 7: 01934 01935 /* Line 1806 of yacc.c */ 01936 #line 248 "../../src/gdb/ada-exp.y" 01937 { write_exp_op_with_string (STRUCTOP_STRUCT, (yyvsp[(2) - (2)].sval)); } 01938 break; 01939 01940 case 8: 01941 01942 /* Line 1806 of yacc.c */ 01943 #line 252 "../../src/gdb/ada-exp.y" 01944 { 01945 write_exp_elt_opcode (OP_FUNCALL); 01946 write_exp_elt_longcst ((yyvsp[(3) - (4)].lval)); 01947 write_exp_elt_opcode (OP_FUNCALL); 01948 } 01949 break; 01950 01951 case 9: 01952 01953 /* Line 1806 of yacc.c */ 01954 #line 258 "../../src/gdb/ada-exp.y" 01955 { 01956 if ((yyvsp[(1) - (4)].tval) != NULL) 01957 { 01958 if ((yyvsp[(3) - (4)].lval) != 1) 01959 error (_("Invalid conversion")); 01960 write_exp_elt_opcode (UNOP_CAST); 01961 write_exp_elt_type ((yyvsp[(1) - (4)].tval)); 01962 write_exp_elt_opcode (UNOP_CAST); 01963 } 01964 else 01965 { 01966 write_exp_elt_opcode (OP_FUNCALL); 01967 write_exp_elt_longcst ((yyvsp[(3) - (4)].lval)); 01968 write_exp_elt_opcode (OP_FUNCALL); 01969 } 01970 } 01971 break; 01972 01973 case 10: 01974 01975 /* Line 1806 of yacc.c */ 01976 #line 276 "../../src/gdb/ada-exp.y" 01977 { type_qualifier = (yyvsp[(1) - (3)].tval); } 01978 break; 01979 01980 case 11: 01981 01982 /* Line 1806 of yacc.c */ 01983 #line 278 "../../src/gdb/ada-exp.y" 01984 { 01985 if ((yyvsp[(1) - (7)].tval) == NULL) 01986 error (_("Type required for qualification")); 01987 write_exp_elt_opcode (UNOP_QUAL); 01988 write_exp_elt_type ((yyvsp[(1) - (7)].tval)); 01989 write_exp_elt_opcode (UNOP_QUAL); 01990 type_qualifier = (yyvsp[(3) - (7)].tval); 01991 } 01992 break; 01993 01994 case 12: 01995 01996 /* Line 1806 of yacc.c */ 01997 #line 288 "../../src/gdb/ada-exp.y" 01998 { (yyval.tval) = type_qualifier; } 01999 break; 02000 02001 case 13: 02002 02003 /* Line 1806 of yacc.c */ 02004 #line 293 "../../src/gdb/ada-exp.y" 02005 { write_exp_elt_opcode (TERNOP_SLICE); } 02006 break; 02007 02008 case 14: 02009 02010 /* Line 1806 of yacc.c */ 02011 #line 295 "../../src/gdb/ada-exp.y" 02012 { if ((yyvsp[(1) - (6)].tval) == NULL) 02013 write_exp_elt_opcode (TERNOP_SLICE); 02014 else 02015 error (_("Cannot slice a type")); 02016 } 02017 break; 02018 02019 case 15: 02020 02021 /* Line 1806 of yacc.c */ 02022 #line 302 "../../src/gdb/ada-exp.y" 02023 { } 02024 break; 02025 02026 case 16: 02027 02028 /* Line 1806 of yacc.c */ 02029 #line 314 "../../src/gdb/ada-exp.y" 02030 { if ((yyvsp[(1) - (1)].tval) != NULL) 02031 { 02032 write_exp_elt_opcode (OP_TYPE); 02033 write_exp_elt_type ((yyvsp[(1) - (1)].tval)); 02034 write_exp_elt_opcode (OP_TYPE); 02035 } 02036 } 02037 break; 02038 02039 case 17: 02040 02041 /* Line 1806 of yacc.c */ 02042 #line 324 "../../src/gdb/ada-exp.y" 02043 { write_dollar_variable ((yyvsp[(1) - (1)].sval)); } 02044 break; 02045 02046 case 20: 02047 02048 /* Line 1806 of yacc.c */ 02049 #line 334 "../../src/gdb/ada-exp.y" 02050 { write_exp_elt_opcode (UNOP_NEG); } 02051 break; 02052 02053 case 21: 02054 02055 /* Line 1806 of yacc.c */ 02056 #line 338 "../../src/gdb/ada-exp.y" 02057 { write_exp_elt_opcode (UNOP_PLUS); } 02058 break; 02059 02060 case 22: 02061 02062 /* Line 1806 of yacc.c */ 02063 #line 342 "../../src/gdb/ada-exp.y" 02064 { write_exp_elt_opcode (UNOP_LOGICAL_NOT); } 02065 break; 02066 02067 case 23: 02068 02069 /* Line 1806 of yacc.c */ 02070 #line 346 "../../src/gdb/ada-exp.y" 02071 { write_exp_elt_opcode (UNOP_ABS); } 02072 break; 02073 02074 case 24: 02075 02076 /* Line 1806 of yacc.c */ 02077 #line 349 "../../src/gdb/ada-exp.y" 02078 { (yyval.lval) = 0; } 02079 break; 02080 02081 case 25: 02082 02083 /* Line 1806 of yacc.c */ 02084 #line 353 "../../src/gdb/ada-exp.y" 02085 { (yyval.lval) = 1; } 02086 break; 02087 02088 case 26: 02089 02090 /* Line 1806 of yacc.c */ 02091 #line 355 "../../src/gdb/ada-exp.y" 02092 { (yyval.lval) = 1; } 02093 break; 02094 02095 case 27: 02096 02097 /* Line 1806 of yacc.c */ 02098 #line 357 "../../src/gdb/ada-exp.y" 02099 { (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1; } 02100 break; 02101 02102 case 28: 02103 02104 /* Line 1806 of yacc.c */ 02105 #line 359 "../../src/gdb/ada-exp.y" 02106 { (yyval.lval) = (yyvsp[(1) - (5)].lval) + 1; } 02107 break; 02108 02109 case 29: 02110 02111 /* Line 1806 of yacc.c */ 02112 #line 364 "../../src/gdb/ada-exp.y" 02113 { 02114 if ((yyvsp[(2) - (4)].tval) == NULL) 02115 error (_("Type required within braces in coercion")); 02116 write_exp_elt_opcode (UNOP_MEMVAL); 02117 write_exp_elt_type ((yyvsp[(2) - (4)].tval)); 02118 write_exp_elt_opcode (UNOP_MEMVAL); 02119 } 02120 break; 02121 02122 case 30: 02123 02124 /* Line 1806 of yacc.c */ 02125 #line 376 "../../src/gdb/ada-exp.y" 02126 { write_exp_elt_opcode (BINOP_EXP); } 02127 break; 02128 02129 case 31: 02130 02131 /* Line 1806 of yacc.c */ 02132 #line 380 "../../src/gdb/ada-exp.y" 02133 { write_exp_elt_opcode (BINOP_MUL); } 02134 break; 02135 02136 case 32: 02137 02138 /* Line 1806 of yacc.c */ 02139 #line 384 "../../src/gdb/ada-exp.y" 02140 { write_exp_elt_opcode (BINOP_DIV); } 02141 break; 02142 02143 case 33: 02144 02145 /* Line 1806 of yacc.c */ 02146 #line 388 "../../src/gdb/ada-exp.y" 02147 { write_exp_elt_opcode (BINOP_REM); } 02148 break; 02149 02150 case 34: 02151 02152 /* Line 1806 of yacc.c */ 02153 #line 392 "../../src/gdb/ada-exp.y" 02154 { write_exp_elt_opcode (BINOP_MOD); } 02155 break; 02156 02157 case 35: 02158 02159 /* Line 1806 of yacc.c */ 02160 #line 396 "../../src/gdb/ada-exp.y" 02161 { write_exp_elt_opcode (BINOP_REPEAT); } 02162 break; 02163 02164 case 36: 02165 02166 /* Line 1806 of yacc.c */ 02167 #line 400 "../../src/gdb/ada-exp.y" 02168 { write_exp_elt_opcode (BINOP_ADD); } 02169 break; 02170 02171 case 37: 02172 02173 /* Line 1806 of yacc.c */ 02174 #line 404 "../../src/gdb/ada-exp.y" 02175 { write_exp_elt_opcode (BINOP_CONCAT); } 02176 break; 02177 02178 case 38: 02179 02180 /* Line 1806 of yacc.c */ 02181 #line 408 "../../src/gdb/ada-exp.y" 02182 { write_exp_elt_opcode (BINOP_SUB); } 02183 break; 02184 02185 case 40: 02186 02187 /* Line 1806 of yacc.c */ 02188 #line 415 "../../src/gdb/ada-exp.y" 02189 { write_exp_elt_opcode (BINOP_EQUAL); } 02190 break; 02191 02192 case 41: 02193 02194 /* Line 1806 of yacc.c */ 02195 #line 419 "../../src/gdb/ada-exp.y" 02196 { write_exp_elt_opcode (BINOP_NOTEQUAL); } 02197 break; 02198 02199 case 42: 02200 02201 /* Line 1806 of yacc.c */ 02202 #line 423 "../../src/gdb/ada-exp.y" 02203 { write_exp_elt_opcode (BINOP_LEQ); } 02204 break; 02205 02206 case 43: 02207 02208 /* Line 1806 of yacc.c */ 02209 #line 427 "../../src/gdb/ada-exp.y" 02210 { write_exp_elt_opcode (TERNOP_IN_RANGE); } 02211 break; 02212 02213 case 44: 02214 02215 /* Line 1806 of yacc.c */ 02216 #line 429 "../../src/gdb/ada-exp.y" 02217 { write_exp_elt_opcode (BINOP_IN_BOUNDS); 02218 write_exp_elt_longcst ((LONGEST) (yyvsp[(5) - (5)].lval)); 02219 write_exp_elt_opcode (BINOP_IN_BOUNDS); 02220 } 02221 break; 02222 02223 case 45: 02224 02225 /* Line 1806 of yacc.c */ 02226 #line 434 "../../src/gdb/ada-exp.y" 02227 { 02228 if ((yyvsp[(3) - (3)].tval) == NULL) 02229 error (_("Right operand of 'in' must be type")); 02230 write_exp_elt_opcode (UNOP_IN_RANGE); 02231 write_exp_elt_type ((yyvsp[(3) - (3)].tval)); 02232 write_exp_elt_opcode (UNOP_IN_RANGE); 02233 } 02234 break; 02235 02236 case 46: 02237 02238 /* Line 1806 of yacc.c */ 02239 #line 442 "../../src/gdb/ada-exp.y" 02240 { write_exp_elt_opcode (TERNOP_IN_RANGE); 02241 write_exp_elt_opcode (UNOP_LOGICAL_NOT); 02242 } 02243 break; 02244 02245 case 47: 02246 02247 /* Line 1806 of yacc.c */ 02248 #line 446 "../../src/gdb/ada-exp.y" 02249 { write_exp_elt_opcode (BINOP_IN_BOUNDS); 02250 write_exp_elt_longcst ((LONGEST) (yyvsp[(6) - (6)].lval)); 02251 write_exp_elt_opcode (BINOP_IN_BOUNDS); 02252 write_exp_elt_opcode (UNOP_LOGICAL_NOT); 02253 } 02254 break; 02255 02256 case 48: 02257 02258 /* Line 1806 of yacc.c */ 02259 #line 452 "../../src/gdb/ada-exp.y" 02260 { 02261 if ((yyvsp[(4) - (4)].tval) == NULL) 02262 error (_("Right operand of 'in' must be type")); 02263 write_exp_elt_opcode (UNOP_IN_RANGE); 02264 write_exp_elt_type ((yyvsp[(4) - (4)].tval)); 02265 write_exp_elt_opcode (UNOP_IN_RANGE); 02266 write_exp_elt_opcode (UNOP_LOGICAL_NOT); 02267 } 02268 break; 02269 02270 case 49: 02271 02272 /* Line 1806 of yacc.c */ 02273 #line 463 "../../src/gdb/ada-exp.y" 02274 { write_exp_elt_opcode (BINOP_GEQ); } 02275 break; 02276 02277 case 50: 02278 02279 /* Line 1806 of yacc.c */ 02280 #line 467 "../../src/gdb/ada-exp.y" 02281 { write_exp_elt_opcode (BINOP_LESS); } 02282 break; 02283 02284 case 51: 02285 02286 /* Line 1806 of yacc.c */ 02287 #line 471 "../../src/gdb/ada-exp.y" 02288 { write_exp_elt_opcode (BINOP_GTR); } 02289 break; 02290 02291 case 58: 02292 02293 /* Line 1806 of yacc.c */ 02294 #line 484 "../../src/gdb/ada-exp.y" 02295 { write_exp_elt_opcode (BINOP_BITWISE_AND); } 02296 break; 02297 02298 case 59: 02299 02300 /* Line 1806 of yacc.c */ 02301 #line 486 "../../src/gdb/ada-exp.y" 02302 { write_exp_elt_opcode (BINOP_BITWISE_AND); } 02303 break; 02304 02305 case 60: 02306 02307 /* Line 1806 of yacc.c */ 02308 #line 491 "../../src/gdb/ada-exp.y" 02309 { write_exp_elt_opcode (BINOP_LOGICAL_AND); } 02310 break; 02311 02312 case 61: 02313 02314 /* Line 1806 of yacc.c */ 02315 #line 493 "../../src/gdb/ada-exp.y" 02316 { write_exp_elt_opcode (BINOP_LOGICAL_AND); } 02317 break; 02318 02319 case 62: 02320 02321 /* Line 1806 of yacc.c */ 02322 #line 498 "../../src/gdb/ada-exp.y" 02323 { write_exp_elt_opcode (BINOP_BITWISE_IOR); } 02324 break; 02325 02326 case 63: 02327 02328 /* Line 1806 of yacc.c */ 02329 #line 500 "../../src/gdb/ada-exp.y" 02330 { write_exp_elt_opcode (BINOP_BITWISE_IOR); } 02331 break; 02332 02333 case 64: 02334 02335 /* Line 1806 of yacc.c */ 02336 #line 505 "../../src/gdb/ada-exp.y" 02337 { write_exp_elt_opcode (BINOP_LOGICAL_OR); } 02338 break; 02339 02340 case 65: 02341 02342 /* Line 1806 of yacc.c */ 02343 #line 507 "../../src/gdb/ada-exp.y" 02344 { write_exp_elt_opcode (BINOP_LOGICAL_OR); } 02345 break; 02346 02347 case 66: 02348 02349 /* Line 1806 of yacc.c */ 02350 #line 511 "../../src/gdb/ada-exp.y" 02351 { write_exp_elt_opcode (BINOP_BITWISE_XOR); } 02352 break; 02353 02354 case 67: 02355 02356 /* Line 1806 of yacc.c */ 02357 #line 513 "../../src/gdb/ada-exp.y" 02358 { write_exp_elt_opcode (BINOP_BITWISE_XOR); } 02359 break; 02360 02361 case 68: 02362 02363 /* Line 1806 of yacc.c */ 02364 #line 525 "../../src/gdb/ada-exp.y" 02365 { write_exp_elt_opcode (UNOP_ADDR); } 02366 break; 02367 02368 case 69: 02369 02370 /* Line 1806 of yacc.c */ 02371 #line 527 "../../src/gdb/ada-exp.y" 02372 { write_exp_elt_opcode (UNOP_ADDR); 02373 write_exp_elt_opcode (UNOP_CAST); 02374 write_exp_elt_type (type_system_address ()); 02375 write_exp_elt_opcode (UNOP_CAST); 02376 } 02377 break; 02378 02379 case 70: 02380 02381 /* Line 1806 of yacc.c */ 02382 #line 533 "../../src/gdb/ada-exp.y" 02383 { write_int ((yyvsp[(3) - (3)].lval), type_int ()); 02384 write_exp_elt_opcode (OP_ATR_FIRST); } 02385 break; 02386 02387 case 71: 02388 02389 /* Line 1806 of yacc.c */ 02390 #line 536 "../../src/gdb/ada-exp.y" 02391 { write_int ((yyvsp[(3) - (3)].lval), type_int ()); 02392 write_exp_elt_opcode (OP_ATR_LAST); } 02393 break; 02394 02395 case 72: 02396 02397 /* Line 1806 of yacc.c */ 02398 #line 539 "../../src/gdb/ada-exp.y" 02399 { write_int ((yyvsp[(3) - (3)].lval), type_int ()); 02400 write_exp_elt_opcode (OP_ATR_LENGTH); } 02401 break; 02402 02403 case 73: 02404 02405 /* Line 1806 of yacc.c */ 02406 #line 542 "../../src/gdb/ada-exp.y" 02407 { write_exp_elt_opcode (OP_ATR_SIZE); } 02408 break; 02409 02410 case 74: 02411 02412 /* Line 1806 of yacc.c */ 02413 #line 544 "../../src/gdb/ada-exp.y" 02414 { write_exp_elt_opcode (OP_ATR_TAG); } 02415 break; 02416 02417 case 75: 02418 02419 /* Line 1806 of yacc.c */ 02420 #line 546 "../../src/gdb/ada-exp.y" 02421 { write_exp_elt_opcode (OP_ATR_MIN); } 02422 break; 02423 02424 case 76: 02425 02426 /* Line 1806 of yacc.c */ 02427 #line 548 "../../src/gdb/ada-exp.y" 02428 { write_exp_elt_opcode (OP_ATR_MAX); } 02429 break; 02430 02431 case 77: 02432 02433 /* Line 1806 of yacc.c */ 02434 #line 550 "../../src/gdb/ada-exp.y" 02435 { write_exp_elt_opcode (OP_ATR_POS); } 02436 break; 02437 02438 case 78: 02439 02440 /* Line 1806 of yacc.c */ 02441 #line 552 "../../src/gdb/ada-exp.y" 02442 { write_exp_elt_opcode (OP_ATR_VAL); } 02443 break; 02444 02445 case 79: 02446 02447 /* Line 1806 of yacc.c */ 02448 #line 554 "../../src/gdb/ada-exp.y" 02449 { write_exp_elt_opcode (OP_ATR_MODULUS); } 02450 break; 02451 02452 case 80: 02453 02454 /* Line 1806 of yacc.c */ 02455 #line 558 "../../src/gdb/ada-exp.y" 02456 { (yyval.lval) = 1; } 02457 break; 02458 02459 case 81: 02460 02461 /* Line 1806 of yacc.c */ 02462 #line 560 "../../src/gdb/ada-exp.y" 02463 { (yyval.lval) = (yyvsp[(2) - (3)].typed_val).val; } 02464 break; 02465 02466 case 82: 02467 02468 /* Line 1806 of yacc.c */ 02469 #line 565 "../../src/gdb/ada-exp.y" 02470 { 02471 if ((yyvsp[(1) - (1)].tval) == NULL) 02472 error (_("Prefix must be type")); 02473 write_exp_elt_opcode (OP_TYPE); 02474 write_exp_elt_type ((yyvsp[(1) - (1)].tval)); 02475 write_exp_elt_opcode (OP_TYPE); } 02476 break; 02477 02478 case 84: 02479 02480 /* Line 1806 of yacc.c */ 02481 #line 576 "../../src/gdb/ada-exp.y" 02482 { write_exp_elt_opcode (OP_TYPE); 02483 write_exp_elt_type (parse_type->builtin_void); 02484 write_exp_elt_opcode (OP_TYPE); } 02485 break; 02486 02487 case 85: 02488 02489 /* Line 1806 of yacc.c */ 02490 #line 583 "../../src/gdb/ada-exp.y" 02491 { write_int ((LONGEST) (yyvsp[(1) - (1)].typed_val).val, (yyvsp[(1) - (1)].typed_val).type); } 02492 break; 02493 02494 case 86: 02495 02496 /* Line 1806 of yacc.c */ 02497 #line 587 "../../src/gdb/ada-exp.y" 02498 { write_int (convert_char_literal (type_qualifier, (yyvsp[(1) - (1)].typed_val).val), 02499 (type_qualifier == NULL) 02500 ? (yyvsp[(1) - (1)].typed_val).type : type_qualifier); 02501 } 02502 break; 02503 02504 case 87: 02505 02506 /* Line 1806 of yacc.c */ 02507 #line 594 "../../src/gdb/ada-exp.y" 02508 { write_exp_elt_opcode (OP_DOUBLE); 02509 write_exp_elt_type ((yyvsp[(1) - (1)].typed_val_float).type); 02510 write_exp_elt_dblcst ((yyvsp[(1) - (1)].typed_val_float).dval); 02511 write_exp_elt_opcode (OP_DOUBLE); 02512 } 02513 break; 02514 02515 case 88: 02516 02517 /* Line 1806 of yacc.c */ 02518 #line 602 "../../src/gdb/ada-exp.y" 02519 { write_int (0, type_int ()); } 02520 break; 02521 02522 case 89: 02523 02524 /* Line 1806 of yacc.c */ 02525 #line 606 "../../src/gdb/ada-exp.y" 02526 { 02527 write_exp_op_with_string (OP_STRING, (yyvsp[(1) - (1)].sval)); 02528 } 02529 break; 02530 02531 case 90: 02532 02533 /* Line 1806 of yacc.c */ 02534 #line 612 "../../src/gdb/ada-exp.y" 02535 { write_int (1, type_boolean ()); } 02536 break; 02537 02538 case 91: 02539 02540 /* Line 1806 of yacc.c */ 02541 #line 614 "../../src/gdb/ada-exp.y" 02542 { write_int (0, type_boolean ()); } 02543 break; 02544 02545 case 92: 02546 02547 /* Line 1806 of yacc.c */ 02548 #line 618 "../../src/gdb/ada-exp.y" 02549 { error (_("NEW not implemented.")); } 02550 break; 02551 02552 case 93: 02553 02554 /* Line 1806 of yacc.c */ 02555 #line 622 "../../src/gdb/ada-exp.y" 02556 { (yyval.tval) = write_var_or_type (NULL, (yyvsp[(1) - (1)].sval)); } 02557 break; 02558 02559 case 94: 02560 02561 /* Line 1806 of yacc.c */ 02562 #line 624 "../../src/gdb/ada-exp.y" 02563 { (yyval.tval) = write_var_or_type ((yyvsp[(1) - (2)].bval), (yyvsp[(2) - (2)].sval)); } 02564 break; 02565 02566 case 95: 02567 02568 /* Line 1806 of yacc.c */ 02569 #line 626 "../../src/gdb/ada-exp.y" 02570 { 02571 (yyval.tval) = write_var_or_type (NULL, (yyvsp[(1) - (2)].sval)); 02572 if ((yyval.tval) == NULL) 02573 write_exp_elt_opcode (UNOP_ADDR); 02574 else 02575 (yyval.tval) = lookup_pointer_type ((yyval.tval)); 02576 } 02577 break; 02578 02579 case 96: 02580 02581 /* Line 1806 of yacc.c */ 02582 #line 634 "../../src/gdb/ada-exp.y" 02583 { 02584 (yyval.tval) = write_var_or_type ((yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval)); 02585 if ((yyval.tval) == NULL) 02586 write_exp_elt_opcode (UNOP_ADDR); 02587 else 02588 (yyval.tval) = lookup_pointer_type ((yyval.tval)); 02589 } 02590 break; 02591 02592 case 97: 02593 02594 /* Line 1806 of yacc.c */ 02595 #line 645 "../../src/gdb/ada-exp.y" 02596 { (yyval.bval) = block_lookup (NULL, (yyvsp[(1) - (2)].sval).ptr); } 02597 break; 02598 02599 case 98: 02600 02601 /* Line 1806 of yacc.c */ 02602 #line 647 "../../src/gdb/ada-exp.y" 02603 { (yyval.bval) = block_lookup ((yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval).ptr); } 02604 break; 02605 02606 case 99: 02607 02608 /* Line 1806 of yacc.c */ 02609 #line 652 "../../src/gdb/ada-exp.y" 02610 { 02611 write_exp_elt_opcode (OP_AGGREGATE); 02612 write_exp_elt_longcst ((yyvsp[(2) - (3)].lval)); 02613 write_exp_elt_opcode (OP_AGGREGATE); 02614 } 02615 break; 02616 02617 case 100: 02618 02619 /* Line 1806 of yacc.c */ 02620 #line 660 "../../src/gdb/ada-exp.y" 02621 { (yyval.lval) = (yyvsp[(1) - (1)].lval); } 02622 break; 02623 02624 case 101: 02625 02626 /* Line 1806 of yacc.c */ 02627 #line 662 "../../src/gdb/ada-exp.y" 02628 { write_exp_elt_opcode (OP_POSITIONAL); 02629 write_exp_elt_longcst ((yyvsp[(1) - (2)].lval)); 02630 write_exp_elt_opcode (OP_POSITIONAL); 02631 (yyval.lval) = (yyvsp[(1) - (2)].lval) + 1; 02632 } 02633 break; 02634 02635 case 102: 02636 02637 /* Line 1806 of yacc.c */ 02638 #line 668 "../../src/gdb/ada-exp.y" 02639 { (yyval.lval) = (yyvsp[(1) - (2)].lval) + (yyvsp[(2) - (2)].lval); } 02640 break; 02641 02642 case 103: 02643 02644 /* Line 1806 of yacc.c */ 02645 #line 673 "../../src/gdb/ada-exp.y" 02646 { write_exp_elt_opcode (OP_POSITIONAL); 02647 write_exp_elt_longcst (0); 02648 write_exp_elt_opcode (OP_POSITIONAL); 02649 (yyval.lval) = 1; 02650 } 02651 break; 02652 02653 case 104: 02654 02655 /* Line 1806 of yacc.c */ 02656 #line 679 "../../src/gdb/ada-exp.y" 02657 { write_exp_elt_opcode (OP_POSITIONAL); 02658 write_exp_elt_longcst ((yyvsp[(1) - (3)].lval)); 02659 write_exp_elt_opcode (OP_POSITIONAL); 02660 (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1; 02661 } 02662 break; 02663 02664 case 105: 02665 02666 /* Line 1806 of yacc.c */ 02667 #line 687 "../../src/gdb/ada-exp.y" 02668 { (yyval.lval) = 1; } 02669 break; 02670 02671 case 106: 02672 02673 /* Line 1806 of yacc.c */ 02674 #line 688 "../../src/gdb/ada-exp.y" 02675 { (yyval.lval) = 1; } 02676 break; 02677 02678 case 107: 02679 02680 /* Line 1806 of yacc.c */ 02681 #line 690 "../../src/gdb/ada-exp.y" 02682 { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; } 02683 break; 02684 02685 case 108: 02686 02687 /* Line 1806 of yacc.c */ 02688 #line 694 "../../src/gdb/ada-exp.y" 02689 { write_exp_elt_opcode (OP_OTHERS); } 02690 break; 02691 02692 case 109: 02693 02694 /* Line 1806 of yacc.c */ 02695 #line 699 "../../src/gdb/ada-exp.y" 02696 { 02697 write_exp_elt_opcode (OP_CHOICES); 02698 write_exp_elt_longcst ((yyvsp[(1) - (1)].lval)); 02699 write_exp_elt_opcode (OP_CHOICES); 02700 } 02701 break; 02702 02703 case 110: 02704 02705 /* Line 1806 of yacc.c */ 02706 #line 713 "../../src/gdb/ada-exp.y" 02707 { write_name_assoc ((yyvsp[(1) - (2)].sval)); } 02708 break; 02709 02710 case 111: 02711 02712 /* Line 1806 of yacc.c */ 02713 #line 714 "../../src/gdb/ada-exp.y" 02714 { (yyval.lval) = 1; } 02715 break; 02716 02717 case 112: 02718 02719 /* Line 1806 of yacc.c */ 02720 #line 716 "../../src/gdb/ada-exp.y" 02721 { (yyval.lval) = 1; } 02722 break; 02723 02724 case 113: 02725 02726 /* Line 1806 of yacc.c */ 02727 #line 718 "../../src/gdb/ada-exp.y" 02728 { write_exp_elt_opcode (OP_DISCRETE_RANGE); 02729 write_exp_op_with_string (OP_NAME, empty_stoken); 02730 } 02731 break; 02732 02733 case 114: 02734 02735 /* Line 1806 of yacc.c */ 02736 #line 721 "../../src/gdb/ada-exp.y" 02737 { (yyval.lval) = 1; } 02738 break; 02739 02740 case 115: 02741 02742 /* Line 1806 of yacc.c */ 02743 #line 723 "../../src/gdb/ada-exp.y" 02744 { write_name_assoc ((yyvsp[(1) - (2)].sval)); } 02745 break; 02746 02747 case 116: 02748 02749 /* Line 1806 of yacc.c */ 02750 #line 724 "../../src/gdb/ada-exp.y" 02751 { (yyval.lval) = (yyvsp[(4) - (4)].lval) + 1; } 02752 break; 02753 02754 case 117: 02755 02756 /* Line 1806 of yacc.c */ 02757 #line 726 "../../src/gdb/ada-exp.y" 02758 { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; } 02759 break; 02760 02761 case 118: 02762 02763 /* Line 1806 of yacc.c */ 02764 #line 728 "../../src/gdb/ada-exp.y" 02765 { write_exp_elt_opcode (OP_DISCRETE_RANGE); } 02766 break; 02767 02768 case 119: 02769 02770 /* Line 1806 of yacc.c */ 02771 #line 729 "../../src/gdb/ada-exp.y" 02772 { (yyval.lval) = (yyvsp[(6) - (6)].lval) + 1; } 02773 break; 02774 02775 case 120: 02776 02777 /* Line 1806 of yacc.c */ 02778 #line 736 "../../src/gdb/ada-exp.y" 02779 { write_exp_elt_opcode (UNOP_IND); } 02780 break; 02781 02782 case 121: 02783 02784 /* Line 1806 of yacc.c */ 02785 #line 738 "../../src/gdb/ada-exp.y" 02786 { write_exp_elt_opcode (UNOP_ADDR); } 02787 break; 02788 02789 case 122: 02790 02791 /* Line 1806 of yacc.c */ 02792 #line 740 "../../src/gdb/ada-exp.y" 02793 { write_exp_elt_opcode (BINOP_SUBSCRIPT); } 02794 break; 02795 02796 02797 02798 /* Line 1806 of yacc.c */ 02799 #line 2801 "ada-exp.c" 02800 default: break; 02801 } 02802 /* User semantic actions sometimes alter yychar, and that requires 02803 that yytoken be updated with the new translation. We take the 02804 approach of translating immediately before every use of yytoken. 02805 One alternative is translating here after every semantic action, 02806 but that translation would be missed if the semantic action invokes 02807 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 02808 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 02809 incorrect destructor might then be invoked immediately. In the 02810 case of YYERROR or YYBACKUP, subsequent parser actions might lead 02811 to an incorrect destructor call or verbose syntax error message 02812 before the lookahead is translated. */ 02813 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 02814 02815 YYPOPSTACK (yylen); 02816 yylen = 0; 02817 YY_STACK_PRINT (yyss, yyssp); 02818 02819 *++yyvsp = yyval; 02820 02821 /* Now `shift' the result of the reduction. Determine what state 02822 that goes to, based on the state we popped back to and the rule 02823 number reduced by. */ 02824 02825 yyn = yyr1[yyn]; 02826 02827 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 02828 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 02829 yystate = yytable[yystate]; 02830 else 02831 yystate = yydefgoto[yyn - YYNTOKENS]; 02832 02833 goto yynewstate; 02834 02835 02836 /*------------------------------------. 02837 | yyerrlab -- here on detecting error | 02838 `------------------------------------*/ 02839 yyerrlab: 02840 /* Make sure we have latest lookahead translation. See comments at 02841 user semantic actions for why this is necessary. */ 02842 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 02843 02844 /* If not already recovering from an error, report this error. */ 02845 if (!yyerrstatus) 02846 { 02847 ++yynerrs; 02848 #if ! YYERROR_VERBOSE 02849 yyerror (YY_("syntax error")); 02850 #else 02851 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 02852 yyssp, yytoken) 02853 { 02854 char const *yymsgp = YY_("syntax error"); 02855 int yysyntax_error_status; 02856 yysyntax_error_status = YYSYNTAX_ERROR; 02857 if (yysyntax_error_status == 0) 02858 yymsgp = yymsg; 02859 else if (yysyntax_error_status == 1) 02860 { 02861 if (yymsg != yymsgbuf) 02862 YYSTACK_FREE (yymsg); 02863 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 02864 if (!yymsg) 02865 { 02866 yymsg = yymsgbuf; 02867 yymsg_alloc = sizeof yymsgbuf; 02868 yysyntax_error_status = 2; 02869 } 02870 else 02871 { 02872 yysyntax_error_status = YYSYNTAX_ERROR; 02873 yymsgp = yymsg; 02874 } 02875 } 02876 yyerror (yymsgp); 02877 if (yysyntax_error_status == 2) 02878 goto yyexhaustedlab; 02879 } 02880 # undef YYSYNTAX_ERROR 02881 #endif 02882 } 02883 02884 02885 02886 if (yyerrstatus == 3) 02887 { 02888 /* If just tried and failed to reuse lookahead token after an 02889 error, discard it. */ 02890 02891 if (yychar <= YYEOF) 02892 { 02893 /* Return failure if at end of input. */ 02894 if (yychar == YYEOF) 02895 YYABORT; 02896 } 02897 else 02898 { 02899 yydestruct ("Error: discarding", 02900 yytoken, &yylval); 02901 yychar = YYEMPTY; 02902 } 02903 } 02904 02905 /* Else will try to reuse lookahead token after shifting the error 02906 token. */ 02907 goto yyerrlab1; 02908 02909 02910 /*---------------------------------------------------. 02911 | yyerrorlab -- error raised explicitly by YYERROR. | 02912 `---------------------------------------------------*/ 02913 yyerrorlab: 02914 02915 /* Pacify compilers like GCC when the user code never invokes 02916 YYERROR and the label yyerrorlab therefore never appears in user 02917 code. */ 02918 if (/*CONSTCOND*/ 0) 02919 goto yyerrorlab; 02920 02921 /* Do not reclaim the symbols of the rule which action triggered 02922 this YYERROR. */ 02923 YYPOPSTACK (yylen); 02924 yylen = 0; 02925 YY_STACK_PRINT (yyss, yyssp); 02926 yystate = *yyssp; 02927 goto yyerrlab1; 02928 02929 02930 /*-------------------------------------------------------------. 02931 | yyerrlab1 -- common code for both syntax error and YYERROR. | 02932 `-------------------------------------------------------------*/ 02933 yyerrlab1: 02934 yyerrstatus = 3; /* Each real token shifted decrements this. */ 02935 02936 for (;;) 02937 { 02938 yyn = yypact[yystate]; 02939 if (!yypact_value_is_default (yyn)) 02940 { 02941 yyn += YYTERROR; 02942 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 02943 { 02944 yyn = yytable[yyn]; 02945 if (0 < yyn) 02946 break; 02947 } 02948 } 02949 02950 /* Pop the current state because it cannot handle the error token. */ 02951 if (yyssp == yyss) 02952 YYABORT; 02953 02954 02955 yydestruct ("Error: popping", 02956 yystos[yystate], yyvsp); 02957 YYPOPSTACK (1); 02958 yystate = *yyssp; 02959 YY_STACK_PRINT (yyss, yyssp); 02960 } 02961 02962 *++yyvsp = yylval; 02963 02964 02965 /* Shift the error token. */ 02966 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 02967 02968 yystate = yyn; 02969 goto yynewstate; 02970 02971 02972 /*-------------------------------------. 02973 | yyacceptlab -- YYACCEPT comes here. | 02974 `-------------------------------------*/ 02975 yyacceptlab: 02976 yyresult = 0; 02977 goto yyreturn; 02978 02979 /*-----------------------------------. 02980 | yyabortlab -- YYABORT comes here. | 02981 `-----------------------------------*/ 02982 yyabortlab: 02983 yyresult = 1; 02984 goto yyreturn; 02985 02986 #if !defined(yyoverflow) || YYERROR_VERBOSE 02987 /*-------------------------------------------------. 02988 | yyexhaustedlab -- memory exhaustion comes here. | 02989 `-------------------------------------------------*/ 02990 yyexhaustedlab: 02991 yyerror (YY_("memory exhausted")); 02992 yyresult = 2; 02993 /* Fall through. */ 02994 #endif 02995 02996 yyreturn: 02997 if (yychar != YYEMPTY) 02998 { 02999 /* Make sure we have latest lookahead translation. See comments at 03000 user semantic actions for why this is necessary. */ 03001 yytoken = YYTRANSLATE (yychar); 03002 yydestruct ("Cleanup: discarding lookahead", 03003 yytoken, &yylval); 03004 } 03005 /* Do not reclaim the symbols of the rule which action triggered 03006 this YYABORT or YYACCEPT. */ 03007 YYPOPSTACK (yylen); 03008 YY_STACK_PRINT (yyss, yyssp); 03009 while (yyssp != yyss) 03010 { 03011 yydestruct ("Cleanup: popping", 03012 yystos[*yyssp], yyvsp); 03013 YYPOPSTACK (1); 03014 } 03015 #ifndef yyoverflow 03016 if (yyss != yyssa) 03017 YYSTACK_FREE (yyss); 03018 #endif 03019 #if YYERROR_VERBOSE 03020 if (yymsg != yymsgbuf) 03021 YYSTACK_FREE (yymsg); 03022 #endif 03023 /* Make sure YYID is used. */ 03024 return YYID (yyresult); 03025 } 03026 03027 03028 03029 /* Line 2067 of yacc.c */ 03030 #line 743 "../../src/gdb/ada-exp.y" 03031 03032 03033 /* yylex defined in ada-lex.c: Reads one token, getting characters */ 03034 /* through lexptr. */ 03035 03036 /* Remap normal flex interface names (yylex) as well as gratuitiously */ 03037 /* global symbol names, so we can have multiple flex-generated parsers */ 03038 /* in gdb. */ 03039 03040 /* (See note above on previous definitions for YACC.) */ 03041 03042 #define yy_create_buffer ada_yy_create_buffer 03043 #define yy_delete_buffer ada_yy_delete_buffer 03044 #define yy_init_buffer ada_yy_init_buffer 03045 #define yy_load_buffer_state ada_yy_load_buffer_state 03046 #define yy_switch_to_buffer ada_yy_switch_to_buffer 03047 #define yyrestart ada_yyrestart 03048 #define yytext ada_yytext 03049 #define yywrap ada_yywrap 03050 03051 static struct obstack temp_parse_space; 03052 03053 /* The following kludge was found necessary to prevent conflicts between */ 03054 /* defs.h and non-standard stdlib.h files. */ 03055 #define qsort __qsort__dummy 03056 #include "ada-lex.c" 03057 03058 int 03059 ada_parse (void) 03060 { 03061 lexer_init (yyin); /* (Re-)initialize lexer. */ 03062 type_qualifier = NULL; 03063 obstack_free (&temp_parse_space, NULL); 03064 obstack_init (&temp_parse_space); 03065 03066 return _ada_parse (); 03067 } 03068 03069 void 03070 yyerror (char *msg) 03071 { 03072 error (_("Error in expression, near `%s'."), lexptr); 03073 } 03074 03075 /* Emit expression to access an instance of SYM, in block BLOCK (if 03076 * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */ 03077 static void 03078 write_var_from_sym (const struct block *orig_left_context, 03079 const struct block *block, 03080 struct symbol *sym) 03081 { 03082 if (orig_left_context == NULL && symbol_read_needs_frame (sym)) 03083 { 03084 if (innermost_block == 0 03085 || contained_in (block, innermost_block)) 03086 innermost_block = block; 03087 } 03088 03089 write_exp_elt_opcode (OP_VAR_VALUE); 03090 write_exp_elt_block (block); 03091 write_exp_elt_sym (sym); 03092 write_exp_elt_opcode (OP_VAR_VALUE); 03093 } 03094 03095 /* Write integer or boolean constant ARG of type TYPE. */ 03096 03097 static void 03098 write_int (LONGEST arg, struct type *type) 03099 { 03100 write_exp_elt_opcode (OP_LONG); 03101 write_exp_elt_type (type); 03102 write_exp_elt_longcst (arg); 03103 write_exp_elt_opcode (OP_LONG); 03104 } 03105 03106 /* Write an OPCODE, string, OPCODE sequence to the current expression. */ 03107 static void 03108 write_exp_op_with_string (enum exp_opcode opcode, struct stoken token) 03109 { 03110 write_exp_elt_opcode (opcode); 03111 write_exp_string (token); 03112 write_exp_elt_opcode (opcode); 03113 } 03114 03115 /* Emit expression corresponding to the renamed object named 03116 * designated by RENAMED_ENTITY[0 .. RENAMED_ENTITY_LEN-1] in the 03117 * context of ORIG_LEFT_CONTEXT, to which is applied the operations 03118 * encoded by RENAMING_EXPR. MAX_DEPTH is the maximum number of 03119 * cascaded renamings to allow. If ORIG_LEFT_CONTEXT is null, it 03120 * defaults to the currently selected block. ORIG_SYMBOL is the 03121 * symbol that originally encoded the renaming. It is needed only 03122 * because its prefix also qualifies any index variables used to index 03123 * or slice an array. It should not be necessary once we go to the 03124 * new encoding entirely (FIXME pnh 7/20/2007). */ 03125 03126 static void 03127 write_object_renaming (const struct block *orig_left_context, 03128 const char *renamed_entity, int renamed_entity_len, 03129 const char *renaming_expr, int max_depth) 03130 { 03131 char *name; 03132 enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state; 03133 struct ada_symbol_info sym_info; 03134 03135 if (max_depth <= 0) 03136 error (_("Could not find renamed symbol")); 03137 03138 if (orig_left_context == NULL) 03139 orig_left_context = get_selected_block (NULL); 03140 03141 name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len); 03142 ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info); 03143 if (sym_info.sym == NULL) 03144 error (_("Could not find renamed variable: %s"), ada_decode (name)); 03145 else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF) 03146 /* We have a renaming of an old-style renaming symbol. Don't 03147 trust the block information. */ 03148 sym_info.block = orig_left_context; 03149 03150 { 03151 const char *inner_renamed_entity; 03152 int inner_renamed_entity_len; 03153 const char *inner_renaming_expr; 03154 03155 switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity, 03156 &inner_renamed_entity_len, 03157 &inner_renaming_expr)) 03158 { 03159 case ADA_NOT_RENAMING: 03160 write_var_from_sym (orig_left_context, sym_info.block, sym_info.sym); 03161 break; 03162 case ADA_OBJECT_RENAMING: 03163 write_object_renaming (sym_info.block, 03164 inner_renamed_entity, inner_renamed_entity_len, 03165 inner_renaming_expr, max_depth - 1); 03166 break; 03167 default: 03168 goto BadEncoding; 03169 } 03170 } 03171 03172 slice_state = SIMPLE_INDEX; 03173 while (*renaming_expr == 'X') 03174 { 03175 renaming_expr += 1; 03176 03177 switch (*renaming_expr) { 03178 case 'A': 03179 renaming_expr += 1; 03180 write_exp_elt_opcode (UNOP_IND); 03181 break; 03182 case 'L': 03183 slice_state = LOWER_BOUND; 03184 /* FALLTHROUGH */ 03185 case 'S': 03186 renaming_expr += 1; 03187 if (isdigit (*renaming_expr)) 03188 { 03189 char *next; 03190 long val = strtol (renaming_expr, &next, 10); 03191 if (next == renaming_expr) 03192 goto BadEncoding; 03193 renaming_expr = next; 03194 write_exp_elt_opcode (OP_LONG); 03195 write_exp_elt_type (type_int ()); 03196 write_exp_elt_longcst ((LONGEST) val); 03197 write_exp_elt_opcode (OP_LONG); 03198 } 03199 else 03200 { 03201 const char *end; 03202 char *index_name; 03203 struct ada_symbol_info index_sym_info; 03204 03205 end = strchr (renaming_expr, 'X'); 03206 if (end == NULL) 03207 end = renaming_expr + strlen (renaming_expr); 03208 03209 index_name = 03210 obstack_copy0 (&temp_parse_space, renaming_expr, 03211 end - renaming_expr); 03212 renaming_expr = end; 03213 03214 ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN, 03215 &index_sym_info); 03216 if (index_sym_info.sym == NULL) 03217 error (_("Could not find %s"), index_name); 03218 else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF) 03219 /* Index is an old-style renaming symbol. */ 03220 index_sym_info.block = orig_left_context; 03221 write_var_from_sym (NULL, index_sym_info.block, 03222 index_sym_info.sym); 03223 } 03224 if (slice_state == SIMPLE_INDEX) 03225 { 03226 write_exp_elt_opcode (OP_FUNCALL); 03227 write_exp_elt_longcst ((LONGEST) 1); 03228 write_exp_elt_opcode (OP_FUNCALL); 03229 } 03230 else if (slice_state == LOWER_BOUND) 03231 slice_state = UPPER_BOUND; 03232 else if (slice_state == UPPER_BOUND) 03233 { 03234 write_exp_elt_opcode (TERNOP_SLICE); 03235 slice_state = SIMPLE_INDEX; 03236 } 03237 break; 03238 03239 case 'R': 03240 { 03241 struct stoken field_name; 03242 const char *end; 03243 char *buf; 03244 03245 renaming_expr += 1; 03246 03247 if (slice_state != SIMPLE_INDEX) 03248 goto BadEncoding; 03249 end = strchr (renaming_expr, 'X'); 03250 if (end == NULL) 03251 end = renaming_expr + strlen (renaming_expr); 03252 field_name.length = end - renaming_expr; 03253 buf = xmalloc (end - renaming_expr + 1); 03254 field_name.ptr = buf; 03255 strncpy (buf, renaming_expr, end - renaming_expr); 03256 buf[end - renaming_expr] = '\000'; 03257 renaming_expr = end; 03258 write_exp_op_with_string (STRUCTOP_STRUCT, field_name); 03259 break; 03260 } 03261 03262 default: 03263 goto BadEncoding; 03264 } 03265 } 03266 if (slice_state == SIMPLE_INDEX) 03267 return; 03268 03269 BadEncoding: 03270 error (_("Internal error in encoding of renaming declaration")); 03271 } 03272 03273 static struct block* 03274 block_lookup (struct block *context, const char *raw_name) 03275 { 03276 const char *name; 03277 struct ada_symbol_info *syms; 03278 int nsyms; 03279 struct symtab *symtab; 03280 03281 if (raw_name[0] == '\'') 03282 { 03283 raw_name += 1; 03284 name = raw_name; 03285 } 03286 else 03287 name = ada_encode (raw_name); 03288 03289 nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms); 03290 if (context == NULL 03291 && (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)) 03292 symtab = lookup_symtab (name); 03293 else 03294 symtab = NULL; 03295 03296 if (symtab != NULL) 03297 return BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK); 03298 else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK) 03299 { 03300 if (context == NULL) 03301 error (_("No file or function \"%s\"."), raw_name); 03302 else 03303 error (_("No function \"%s\" in specified context."), raw_name); 03304 } 03305 else 03306 { 03307 if (nsyms > 1) 03308 warning (_("Function name \"%s\" ambiguous here"), raw_name); 03309 return SYMBOL_BLOCK_VALUE (syms[0].sym); 03310 } 03311 } 03312 03313 static struct symbol* 03314 select_possible_type_sym (struct ada_symbol_info *syms, int nsyms) 03315 { 03316 int i; 03317 int preferred_index; 03318 struct type *preferred_type; 03319 03320 preferred_index = -1; preferred_type = NULL; 03321 for (i = 0; i < nsyms; i += 1) 03322 switch (SYMBOL_CLASS (syms[i].sym)) 03323 { 03324 case LOC_TYPEDEF: 03325 if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type)) 03326 { 03327 preferred_index = i; 03328 preferred_type = SYMBOL_TYPE (syms[i].sym); 03329 } 03330 break; 03331 case LOC_REGISTER: 03332 case LOC_ARG: 03333 case LOC_REF_ARG: 03334 case LOC_REGPARM_ADDR: 03335 case LOC_LOCAL: 03336 case LOC_COMPUTED: 03337 return NULL; 03338 default: 03339 break; 03340 } 03341 if (preferred_type == NULL) 03342 return NULL; 03343 return syms[preferred_index].sym; 03344 } 03345 03346 static struct type* 03347 find_primitive_type (char *name) 03348 { 03349 struct type *type; 03350 type = language_lookup_primitive_type_by_name (parse_language, 03351 parse_gdbarch, 03352 name); 03353 if (type == NULL && strcmp ("system__address", name) == 0) 03354 type = type_system_address (); 03355 03356 if (type != NULL) 03357 { 03358 /* Check to see if we have a regular definition of this 03359 type that just didn't happen to have been read yet. */ 03360 struct symbol *sym; 03361 char *expanded_name = 03362 (char *) alloca (strlen (name) + sizeof ("standard__")); 03363 strcpy (expanded_name, "standard__"); 03364 strcat (expanded_name, name); 03365 sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL); 03366 if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF) 03367 type = SYMBOL_TYPE (sym); 03368 } 03369 03370 return type; 03371 } 03372 03373 static int 03374 chop_selector (char *name, int end) 03375 { 03376 int i; 03377 for (i = end - 1; i > 0; i -= 1) 03378 if (name[i] == '.' || (name[i] == '_' && name[i+1] == '_')) 03379 return i; 03380 return -1; 03381 } 03382 03383 /* If NAME is a string beginning with a separator (either '__', or 03384 '.'), chop this separator and return the result; else, return 03385 NAME. */ 03386 03387 static char * 03388 chop_separator (char *name) 03389 { 03390 if (*name == '.') 03391 return name + 1; 03392 03393 if (name[0] == '_' && name[1] == '_') 03394 return name + 2; 03395 03396 return name; 03397 } 03398 03399 /* Given that SELS is a string of the form (<sep><identifier>)*, where 03400 <sep> is '__' or '.', write the indicated sequence of 03401 STRUCTOP_STRUCT expression operators. */ 03402 static void 03403 write_selectors (char *sels) 03404 { 03405 while (*sels != '\0') 03406 { 03407 struct stoken field_name; 03408 char *p = chop_separator (sels); 03409 sels = p; 03410 while (*sels != '\0' && *sels != '.' 03411 && (sels[0] != '_' || sels[1] != '_')) 03412 sels += 1; 03413 field_name.length = sels - p; 03414 field_name.ptr = p; 03415 write_exp_op_with_string (STRUCTOP_STRUCT, field_name); 03416 } 03417 } 03418 03419 /* Write a variable access (OP_VAR_VALUE) to ambiguous encoded name 03420 NAME[0..LEN-1], in block context BLOCK, to be resolved later. Writes 03421 a temporary symbol that is valid until the next call to ada_parse. 03422 */ 03423 static void 03424 write_ambiguous_var (const struct block *block, char *name, int len) 03425 { 03426 struct symbol *sym = 03427 obstack_alloc (&temp_parse_space, sizeof (struct symbol)); 03428 memset (sym, 0, sizeof (struct symbol)); 03429 SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN; 03430 SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len); 03431 SYMBOL_LANGUAGE (sym) = language_ada; 03432 03433 write_exp_elt_opcode (OP_VAR_VALUE); 03434 write_exp_elt_block (block); 03435 write_exp_elt_sym (sym); 03436 write_exp_elt_opcode (OP_VAR_VALUE); 03437 } 03438 03439 /* A convenient wrapper around ada_get_field_index that takes 03440 a non NUL-terminated FIELD_NAME0 and a FIELD_NAME_LEN instead 03441 of a NUL-terminated field name. */ 03442 03443 static int 03444 ada_nget_field_index (const struct type *type, const char *field_name0, 03445 int field_name_len, int maybe_missing) 03446 { 03447 char *field_name = alloca ((field_name_len + 1) * sizeof (char)); 03448 03449 strncpy (field_name, field_name0, field_name_len); 03450 field_name[field_name_len] = '\0'; 03451 return ada_get_field_index (type, field_name, maybe_missing); 03452 } 03453 03454 /* If encoded_field_name is the name of a field inside symbol SYM, 03455 then return the type of that field. Otherwise, return NULL. 03456 03457 This function is actually recursive, so if ENCODED_FIELD_NAME 03458 doesn't match one of the fields of our symbol, then try to see 03459 if ENCODED_FIELD_NAME could not be a succession of field names 03460 (in other words, the user entered an expression of the form 03461 TYPE_NAME.FIELD1.FIELD2.FIELD3), in which case we evaluate 03462 each field name sequentially to obtain the desired field type. 03463 In case of failure, we return NULL. */ 03464 03465 static struct type * 03466 get_symbol_field_type (struct symbol *sym, char *encoded_field_name) 03467 { 03468 char *field_name = encoded_field_name; 03469 char *subfield_name; 03470 struct type *type = SYMBOL_TYPE (sym); 03471 int fieldno; 03472 03473 if (type == NULL || field_name == NULL) 03474 return NULL; 03475 type = check_typedef (type); 03476 03477 while (field_name[0] != '\0') 03478 { 03479 field_name = chop_separator (field_name); 03480 03481 fieldno = ada_get_field_index (type, field_name, 1); 03482 if (fieldno >= 0) 03483 return TYPE_FIELD_TYPE (type, fieldno); 03484 03485 subfield_name = field_name; 03486 while (*subfield_name != '\0' && *subfield_name != '.' 03487 && (subfield_name[0] != '_' || subfield_name[1] != '_')) 03488 subfield_name += 1; 03489 03490 if (subfield_name[0] == '\0') 03491 return NULL; 03492 03493 fieldno = ada_nget_field_index (type, field_name, 03494 subfield_name - field_name, 1); 03495 if (fieldno < 0) 03496 return NULL; 03497 03498 type = TYPE_FIELD_TYPE (type, fieldno); 03499 field_name = subfield_name; 03500 } 03501 03502 return NULL; 03503 } 03504 03505 /* Look up NAME0 (an unencoded identifier or dotted name) in BLOCK (or 03506 expression_block_context if NULL). If it denotes a type, return 03507 that type. Otherwise, write expression code to evaluate it as an 03508 object and return NULL. In this second case, NAME0 will, in general, 03509 have the form <name>(.<selector_name>)*, where <name> is an object 03510 or renaming encoded in the debugging data. Calls error if no 03511 prefix <name> matches a name in the debugging data (i.e., matches 03512 either a complete name or, as a wild-card match, the final 03513 identifier). */ 03514 03515 static struct type* 03516 write_var_or_type (const struct block *block, struct stoken name0) 03517 { 03518 int depth; 03519 char *encoded_name; 03520 int name_len; 03521 03522 if (block == NULL) 03523 block = expression_context_block; 03524 03525 encoded_name = ada_encode (name0.ptr); 03526 name_len = strlen (encoded_name); 03527 encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len); 03528 for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1) 03529 { 03530 int tail_index; 03531 03532 tail_index = name_len; 03533 while (tail_index > 0) 03534 { 03535 int nsyms; 03536 struct ada_symbol_info *syms; 03537 struct symbol *type_sym; 03538 struct symbol *renaming_sym; 03539 const char* renaming; 03540 int renaming_len; 03541 const char* renaming_expr; 03542 int terminator = encoded_name[tail_index]; 03543 03544 encoded_name[tail_index] = '\0'; 03545 nsyms = ada_lookup_symbol_list (encoded_name, block, 03546 VAR_DOMAIN, &syms); 03547 encoded_name[tail_index] = terminator; 03548 03549 /* A single symbol may rename a package or object. */ 03550 03551 /* This should go away when we move entirely to new version. 03552 FIXME pnh 7/20/2007. */ 03553 if (nsyms == 1) 03554 { 03555 struct symbol *ren_sym = 03556 ada_find_renaming_symbol (syms[0].sym, syms[0].block); 03557 03558 if (ren_sym != NULL) 03559 syms[0].sym = ren_sym; 03560 } 03561 03562 type_sym = select_possible_type_sym (syms, nsyms); 03563 03564 if (type_sym != NULL) 03565 renaming_sym = type_sym; 03566 else if (nsyms == 1) 03567 renaming_sym = syms[0].sym; 03568 else 03569 renaming_sym = NULL; 03570 03571 switch (ada_parse_renaming (renaming_sym, &renaming, 03572 &renaming_len, &renaming_expr)) 03573 { 03574 case ADA_NOT_RENAMING: 03575 break; 03576 case ADA_PACKAGE_RENAMING: 03577 case ADA_EXCEPTION_RENAMING: 03578 case ADA_SUBPROGRAM_RENAMING: 03579 { 03580 char *new_name 03581 = obstack_alloc (&temp_parse_space, 03582 renaming_len + name_len - tail_index + 1); 03583 strncpy (new_name, renaming, renaming_len); 03584 strcpy (new_name + renaming_len, encoded_name + tail_index); 03585 encoded_name = new_name; 03586 name_len = renaming_len + name_len - tail_index; 03587 goto TryAfterRenaming; 03588 } 03589 case ADA_OBJECT_RENAMING: 03590 write_object_renaming (block, renaming, renaming_len, 03591 renaming_expr, MAX_RENAMING_CHAIN_LENGTH); 03592 write_selectors (encoded_name + tail_index); 03593 return NULL; 03594 default: 03595 internal_error (__FILE__, __LINE__, 03596 _("impossible value from ada_parse_renaming")); 03597 } 03598 03599 if (type_sym != NULL) 03600 { 03601 struct type *field_type; 03602 03603 if (tail_index == name_len) 03604 return SYMBOL_TYPE (type_sym); 03605 03606 /* We have some extraneous characters after the type name. 03607 If this is an expression "TYPE_NAME.FIELD0.[...].FIELDN", 03608 then try to get the type of FIELDN. */ 03609 field_type 03610 = get_symbol_field_type (type_sym, encoded_name + tail_index); 03611 if (field_type != NULL) 03612 return field_type; 03613 else 03614 error (_("Invalid attempt to select from type: \"%s\"."), 03615 name0.ptr); 03616 } 03617 else if (tail_index == name_len && nsyms == 0) 03618 { 03619 struct type *type = find_primitive_type (encoded_name); 03620 03621 if (type != NULL) 03622 return type; 03623 } 03624 03625 if (nsyms == 1) 03626 { 03627 write_var_from_sym (block, syms[0].block, syms[0].sym); 03628 write_selectors (encoded_name + tail_index); 03629 return NULL; 03630 } 03631 else if (nsyms == 0) 03632 { 03633 struct bound_minimal_symbol msym 03634 = ada_lookup_simple_minsym (encoded_name); 03635 if (msym.minsym != NULL) 03636 { 03637 write_exp_msymbol (msym); 03638 /* Maybe cause error here rather than later? FIXME? */ 03639 write_selectors (encoded_name + tail_index); 03640 return NULL; 03641 } 03642 03643 if (tail_index == name_len 03644 && strncmp (encoded_name, "standard__", 03645 sizeof ("standard__") - 1) == 0) 03646 error (_("No definition of \"%s\" found."), name0.ptr); 03647 03648 tail_index = chop_selector (encoded_name, tail_index); 03649 } 03650 else 03651 { 03652 write_ambiguous_var (block, encoded_name, tail_index); 03653 write_selectors (encoded_name + tail_index); 03654 return NULL; 03655 } 03656 } 03657 03658 if (!have_full_symbols () && !have_partial_symbols () && block == NULL) 03659 error (_("No symbol table is loaded. Use the \"file\" command.")); 03660 if (block == expression_context_block) 03661 error (_("No definition of \"%s\" in current context."), name0.ptr); 03662 else 03663 error (_("No definition of \"%s\" in specified context."), name0.ptr); 03664 03665 TryAfterRenaming: ; 03666 } 03667 03668 error (_("Could not find renamed symbol \"%s\""), name0.ptr); 03669 03670 } 03671 03672 /* Write a left side of a component association (e.g., NAME in NAME => 03673 exp). If NAME has the form of a selected component, write it as an 03674 ordinary expression. If it is a simple variable that unambiguously 03675 corresponds to exactly one symbol that does not denote a type or an 03676 object renaming, also write it normally as an OP_VAR_VALUE. 03677 Otherwise, write it as an OP_NAME. 03678 03679 Unfortunately, we don't know at this point whether NAME is supposed 03680 to denote a record component name or the value of an array index. 03681 Therefore, it is not appropriate to disambiguate an ambiguous name 03682 as we normally would, nor to replace a renaming with its referent. 03683 As a result, in the (one hopes) rare case that one writes an 03684 aggregate such as (R => 42) where R renames an object or is an 03685 ambiguous name, one must write instead ((R) => 42). */ 03686 03687 static void 03688 write_name_assoc (struct stoken name) 03689 { 03690 if (strchr (name.ptr, '.') == NULL) 03691 { 03692 struct ada_symbol_info *syms; 03693 int nsyms = ada_lookup_symbol_list (name.ptr, expression_context_block, 03694 VAR_DOMAIN, &syms); 03695 if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF) 03696 write_exp_op_with_string (OP_NAME, name); 03697 else 03698 write_var_from_sym (NULL, syms[0].block, syms[0].sym); 03699 } 03700 else 03701 if (write_var_or_type (NULL, name) != NULL) 03702 error (_("Invalid use of type.")); 03703 } 03704 03705 /* Convert the character literal whose ASCII value would be VAL to the 03706 appropriate value of type TYPE, if there is a translation. 03707 Otherwise return VAL. Hence, in an enumeration type ('A', 'B'), 03708 the literal 'A' (VAL == 65), returns 0. */ 03709 03710 static LONGEST 03711 convert_char_literal (struct type *type, LONGEST val) 03712 { 03713 char name[7]; 03714 int f; 03715 03716 if (type == NULL) 03717 return val; 03718 type = check_typedef (type); 03719 if (TYPE_CODE (type) != TYPE_CODE_ENUM) 03720 return val; 03721 03722 xsnprintf (name, sizeof (name), "QU%02x", (int) val); 03723 for (f = 0; f < TYPE_NFIELDS (type); f += 1) 03724 { 03725 if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0) 03726 return TYPE_FIELD_ENUMVAL (type, f); 03727 } 03728 return val; 03729 } 03730 03731 static struct type * 03732 type_int (void) 03733 { 03734 return parse_type->builtin_int; 03735 } 03736 03737 static struct type * 03738 type_long (void) 03739 { 03740 return parse_type->builtin_long; 03741 } 03742 03743 static struct type * 03744 type_long_long (void) 03745 { 03746 return parse_type->builtin_long_long; 03747 } 03748 03749 static struct type * 03750 type_float (void) 03751 { 03752 return parse_type->builtin_float; 03753 } 03754 03755 static struct type * 03756 type_double (void) 03757 { 03758 return parse_type->builtin_double; 03759 } 03760 03761 static struct type * 03762 type_long_double (void) 03763 { 03764 return parse_type->builtin_long_double; 03765 } 03766 03767 static struct type * 03768 type_char (void) 03769 { 03770 return language_string_char_type (parse_language, parse_gdbarch); 03771 } 03772 03773 static struct type * 03774 type_boolean (void) 03775 { 03776 return parse_type->builtin_bool; 03777 } 03778 03779 static struct type * 03780 type_system_address (void) 03781 { 03782 struct type *type 03783 = language_lookup_primitive_type_by_name (parse_language, 03784 parse_gdbarch, 03785 "system__address"); 03786 return type != NULL ? type : parse_type->builtin_data_ptr; 03787 } 03788 03789 /* Provide a prototype to silence -Wmissing-prototypes. */ 03790 extern initialize_file_ftype _initialize_ada_exp; 03791 03792 void 03793 _initialize_ada_exp (void) 03794 { 03795 obstack_init (&temp_parse_space); 03796 } 03797