GDB (xrefs)
/tmp/gdb-7.10/gdb/ada-exp.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.2"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 0
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations. */
65 #line 36 "ada-exp.y" /* yacc.c:339 */
66 
67 
68 #include "defs.h"
69 #include <ctype.h>
70 #include "expression.h"
71 #include "value.h"
72 #include "parser-defs.h"
73 #include "language.h"
74 #include "ada-lang.h"
75 #include "bfd.h" /* Required by objfiles.h. */
76 #include "symfile.h" /* Required by objfiles.h. */
77 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
78 #include "frame.h"
79 #include "block.h"
80 
81 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
82 
83 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
84  as well as gratuitiously global symbol names, so we can have multiple
85  yacc generated parsers in gdb. These are only the variables
86  produced by yacc. If other parser generators (bison, byacc, etc) produce
87  additional global names that conflict at link time, then those parser
88  generators need to be fixed instead of adding those names to this list. */
89 
90 /* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
91  options. I presume we are maintaining it to accommodate systems
92  without BISON? (PNH) */
93 
94 #define yymaxdepth ada_maxdepth
95 /* ada_parse calls this after initialization */
96 #define yyparse ada_parse_internal
97 #define yylex ada_lex
98 #define yyerror ada_error
99 #define yylval ada_lval
100 #define yychar ada_char
101 #define yydebug ada_debug
102 #define yypact ada_pact
103 #define yyr1 ada_r1
104 #define yyr2 ada_r2
105 #define yydef ada_def
106 #define yychk ada_chk
107 #define yypgo ada_pgo
108 #define yyact ada_act
109 #define yyexca ada_exca
110 #define yyerrflag ada_errflag
111 #define yynerrs ada_nerrs
112 #define yyps ada_ps
113 #define yypv ada_pv
114 #define yys ada_s
115 #define yy_yys ada_yys
116 #define yystate ada_state
117 #define yytmp ada_tmp
118 #define yyv ada_v
119 #define yy_yyv ada_yyv
120 #define yyval ada_val
121 #define yylloc ada_lloc
122 #define yyreds ada_reds /* With YYDEBUG defined */
123 #define yytoks ada_toks /* With YYDEBUG defined */
124 #define yyname ada_name /* With YYDEBUG defined */
125 #define yyrule ada_rule /* With YYDEBUG defined */
126 #define yyss ada_yyss
127 #define yysslim ada_yysslim
128 #define yyssp ada_yyssp
129 #define yystacksize ada_yystacksize
130 #define yyvs ada_yyvs
131 #define yyvsp ada_yyvsp
132 
133 #ifndef YYDEBUG
134 #define YYDEBUG 1 /* Default to yydebug support */
135 #endif
136 
137 #define YYFPRINTF parser_fprintf
138 
139 struct name_info {
140  struct symbol *sym;
142  const struct block *block;
143  struct stoken stoken;
144 };
145 
146 /* The state of the parser, used internally when we are parsing the
147  expression. */
148 
149 static struct parser_state *pstate = NULL;
150 
151 static struct stoken empty_stoken = { "", 0 };
152 
153 /* If expression is in the context of TYPE'(...), then TYPE, else
154  * NULL. */
155 static struct type *type_qualifier;
156 
157 int yyparse (void);
158 
159 static int yylex (void);
160 
161 void yyerror (char *);
162 
163 static void write_int (struct parser_state *, LONGEST, struct type *);
164 
165 static void write_object_renaming (struct parser_state *,
166  const struct block *, const char *, int,
167  const char *, int);
168 
169 static struct type* write_var_or_type (struct parser_state *,
170  const struct block *, struct stoken);
171 
172 static void write_name_assoc (struct parser_state *, struct stoken);
173 
174 static void write_exp_op_with_string (struct parser_state *, enum exp_opcode,
175  struct stoken);
176 
177 static const struct block *block_lookup (const struct block *, const char *);
178 
179 static LONGEST convert_char_literal (struct type *, LONGEST);
180 
181 static void write_ambiguous_var (struct parser_state *,
182  const struct block *, char *, int);
183 
184 static struct type *type_int (struct parser_state *);
185 
186 static struct type *type_long (struct parser_state *);
187 
188 static struct type *type_long_long (struct parser_state *);
189 
190 static struct type *type_float (struct parser_state *);
191 
192 static struct type *type_double (struct parser_state *);
193 
194 static struct type *type_long_double (struct parser_state *);
195 
196 static struct type *type_char (struct parser_state *);
197 
198 static struct type *type_boolean (struct parser_state *);
199 
200 static struct type *type_system_address (struct parser_state *);
201 
202 
203 #line 204 "ada-exp.c" /* yacc.c:339 */
204 
205 # ifndef YY_NULLPTR
206 # if defined __cplusplus && 201103L <= __cplusplus
207 # define YY_NULLPTR nullptr
208 # else
209 # define YY_NULLPTR 0
210 # endif
211 # endif
212 
213 /* Enabling verbose error messages. */
214 #ifdef YYERROR_VERBOSE
215 # undef YYERROR_VERBOSE
216 # define YYERROR_VERBOSE 1
217 #else
218 # define YYERROR_VERBOSE 0
219 #endif
220 
221 
222 /* Debug traces. */
223 #ifndef YYDEBUG
224 # define YYDEBUG 0
225 #endif
226 #if YYDEBUG
227 extern int yydebug;
228 #endif
229 
230 /* Token type. */
231 #ifndef YYTOKENTYPE
232 # define YYTOKENTYPE
234  {
235  INT = 258,
236  NULL_PTR = 259,
237  CHARLIT = 260,
238  FLOAT = 261,
239  TRUEKEYWORD = 262,
241  COLONCOLON = 264,
242  STRING = 265,
243  NAME = 266,
244  DOT_ID = 267,
245  DOT_ALL = 268,
247  ASSIGN = 270,
248  _AND_ = 271,
249  OR = 272,
250  XOR = 273,
251  THEN = 274,
252  ELSE = 275,
253  NOTEQUAL = 276,
254  LEQ = 277,
255  GEQ = 278,
256  IN = 279,
257  DOTDOT = 280,
258  UNARY = 281,
259  MOD = 282,
260  REM = 283,
261  STARSTAR = 284,
262  ABS = 285,
263  NOT = 286,
264  VAR = 287,
265  ARROW = 288,
266  TICK_ACCESS = 289,
268  TICK_FIRST = 291,
269  TICK_LAST = 292,
270  TICK_LENGTH = 293,
271  TICK_MAX = 294,
272  TICK_MIN = 295,
274  TICK_POS = 297,
275  TICK_RANGE = 298,
276  TICK_SIZE = 299,
277  TICK_TAG = 300,
278  TICK_VAL = 301,
279  NEW = 302,
280  OTHERS = 303
281  };
282 #endif
283 /* Tokens. */
284 #define INT 258
285 #define NULL_PTR 259
286 #define CHARLIT 260
287 #define FLOAT 261
288 #define TRUEKEYWORD 262
289 #define FALSEKEYWORD 263
290 #define COLONCOLON 264
291 #define STRING 265
292 #define NAME 266
293 #define DOT_ID 267
294 #define DOT_ALL 268
295 #define SPECIAL_VARIABLE 269
296 #define ASSIGN 270
297 #define _AND_ 271
298 #define OR 272
299 #define XOR 273
300 #define THEN 274
301 #define ELSE 275
302 #define NOTEQUAL 276
303 #define LEQ 277
304 #define GEQ 278
305 #define IN 279
306 #define DOTDOT 280
307 #define UNARY 281
308 #define MOD 282
309 #define REM 283
310 #define STARSTAR 284
311 #define ABS 285
312 #define NOT 286
313 #define VAR 287
314 #define ARROW 288
315 #define TICK_ACCESS 289
316 #define TICK_ADDRESS 290
317 #define TICK_FIRST 291
318 #define TICK_LAST 292
319 #define TICK_LENGTH 293
320 #define TICK_MAX 294
321 #define TICK_MIN 295
322 #define TICK_MODULUS 296
323 #define TICK_POS 297
324 #define TICK_RANGE 298
325 #define TICK_SIZE 299
326 #define TICK_TAG 300
327 #define TICK_VAL 301
328 #define NEW 302
329 #define OTHERS 303
330 
331 /* Value type. */
332 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
333 typedef union YYSTYPE YYSTYPE;
334 union YYSTYPE
335 {
336 #line 175 "ada-exp.y" /* yacc.c:355 */
337 
339  struct {
341  struct type *type;
342  } typed_val;
343  struct {
345  struct type *type;
346  } typed_val_float;
347  struct type *tval;
348  struct stoken sval;
349  const struct block *bval;
350  struct internalvar *ivar;
351 
352 
353 #line 354 "ada-exp.c" /* yacc.c:355 */
354 };
355 # define YYSTYPE_IS_TRIVIAL 1
356 # define YYSTYPE_IS_DECLARED 1
357 #endif
358 
359 
360 extern YYSTYPE yylval;
361 
362 int yyparse (void);
363 
364 
365 
366 /* Copy the second part of user declarations. */
367 
368 #line 369 "ada-exp.c" /* yacc.c:358 */
369 
370 #ifdef short
371 # undef short
372 #endif
373 
374 #ifdef YYTYPE_UINT8
375 typedef YYTYPE_UINT8 yytype_uint8;
376 #else
377 typedef unsigned char yytype_uint8;
378 #endif
379 
380 #ifdef YYTYPE_INT8
381 typedef YYTYPE_INT8 yytype_int8;
382 #else
383 typedef signed char yytype_int8;
384 #endif
385 
386 #ifdef YYTYPE_UINT16
387 typedef YYTYPE_UINT16 yytype_uint16;
388 #else
389 typedef unsigned short int yytype_uint16;
390 #endif
391 
392 #ifdef YYTYPE_INT16
393 typedef YYTYPE_INT16 yytype_int16;
394 #else
395 typedef short int yytype_int16;
396 #endif
397 
398 #ifndef YYSIZE_T
399 # ifdef __SIZE_TYPE__
400 # define YYSIZE_T __SIZE_TYPE__
401 # elif defined size_t
402 # define YYSIZE_T size_t
403 # elif ! defined YYSIZE_T
404 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
405 # define YYSIZE_T size_t
406 # else
407 # define YYSIZE_T unsigned int
408 # endif
409 #endif
410 
411 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
412 
413 #ifndef YY_
414 # if defined YYENABLE_NLS && YYENABLE_NLS
415 # if ENABLE_NLS
416 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
417 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
418 # endif
419 # endif
420 # ifndef YY_
421 # define YY_(Msgid) Msgid
422 # endif
423 #endif
424 
425 #ifndef YY_ATTRIBUTE
426 # if (defined __GNUC__ \
427  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
428  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
429 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
430 # else
431 # define YY_ATTRIBUTE(Spec) /* empty */
432 # endif
433 #endif
434 
435 #ifndef YY_ATTRIBUTE_PURE
436 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
437 #endif
438 
439 #ifndef YY_ATTRIBUTE_UNUSED
440 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
441 #endif
442 
443 #if !defined _Noreturn \
444  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
445 # if defined _MSC_VER && 1200 <= _MSC_VER
446 # define _Noreturn __declspec (noreturn)
447 # else
448 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
449 # endif
450 #endif
451 
452 /* Suppress unused-variable warnings by "using" E. */
453 #if ! defined lint || defined __GNUC__
454 # define YYUSE(E) ((void) (E))
455 #else
456 # define YYUSE(E) /* empty */
457 #endif
458 
459 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
460 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
461 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
462  _Pragma ("GCC diagnostic push") \
463  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
464  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
465 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
466  _Pragma ("GCC diagnostic pop")
467 #else
468 # define YY_INITIAL_VALUE(Value) Value
469 #endif
470 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
471 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
472 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
473 #endif
474 #ifndef YY_INITIAL_VALUE
475 # define YY_INITIAL_VALUE(Value) /* Nothing. */
476 #endif
477 
478 
479 #if ! defined yyoverflow || YYERROR_VERBOSE
480 
481 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
482 
483 # ifdef YYSTACK_USE_ALLOCA
484 # if YYSTACK_USE_ALLOCA
485 # ifdef __GNUC__
486 # define YYSTACK_ALLOC __builtin_alloca
487 # elif defined __BUILTIN_VA_ARG_INCR
488 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
489 # elif defined _AIX
490 # define YYSTACK_ALLOC __alloca
491 # elif defined _MSC_VER
492 # define alloca _alloca
493 # else
494 # define YYSTACK_ALLOC alloca
495 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
496 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
497  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
498 # ifndef EXIT_SUCCESS
499 # define EXIT_SUCCESS 0
500 # endif
501 # endif
502 # endif
503 # endif
504 # endif
505 
506 # ifdef YYSTACK_ALLOC
507  /* Pacify GCC's 'empty if-body' warning. */
508 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
509 # ifndef YYSTACK_ALLOC_MAXIMUM
510  /* The OS might guarantee only one guard page at the bottom of the stack,
511  and a page size can be as small as 4096 bytes. So we cannot safely
512  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
513  to allow for a few compiler-allocated temporary stack slots. */
514 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
515 # endif
516 # else
517 # define YYSTACK_ALLOC YYMALLOC
518 # define YYSTACK_FREE YYFREE
519 # ifndef YYSTACK_ALLOC_MAXIMUM
520 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
521 # endif
522 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
523  && ! ((defined YYMALLOC || defined xmalloc) \
524  && (defined YYFREE || defined xfree)))
525 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
526 # ifndef EXIT_SUCCESS
527 # define EXIT_SUCCESS 0
528 # endif
529 # endif
530 # ifndef YYMALLOC
531 # define YYMALLOC xmalloc
532 # if ! defined xmalloc && ! defined EXIT_SUCCESS
533 void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
534 # endif
535 # endif
536 # ifndef YYFREE
537 # define YYFREE xfree
538 # if ! defined xfree && ! defined EXIT_SUCCESS
539 void xfree (void *); /* INFRINGES ON USER NAME SPACE */
540 # endif
541 # endif
542 # endif
543 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
544 
545 
546 #if (! defined yyoverflow \
547  && (! defined __cplusplus \
548  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
549 
550 /* A type that is properly aligned for any stack member. */
551 union yyalloc
552 {
553  yytype_int16 yyss_alloc;
555 };
556 
557 /* The size of the maximum gap between one aligned stack and the next. */
558 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
559 
560 /* The size of an array large to enough to hold all stacks, each with
561  N elements. */
562 # define YYSTACK_BYTES(N) \
563  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
564  + YYSTACK_GAP_MAXIMUM)
565 
566 # define YYCOPY_NEEDED 1
567 
568 /* Relocate STACK from its old location to the new one. The
569  local variables YYSIZE and YYSTACKSIZE give the old and new number of
570  elements in the stack, and YYPTR gives the new location of the
571  stack. Advance YYPTR to a properly aligned location for the next
572  stack. */
573 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
574  do \
575  { \
576  YYSIZE_T yynewbytes; \
577  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
578  Stack = &yyptr->Stack_alloc; \
579  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
580  yyptr += yynewbytes / sizeof (*yyptr); \
581  } \
582  while (0)
583 
584 #endif
585 
586 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
587 /* Copy COUNT objects from SRC to DST. The source and destination do
588  not overlap. */
589 # ifndef YYCOPY
590 # if defined __GNUC__ && 1 < __GNUC__
591 # define YYCOPY(Dst, Src, Count) \
592  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
593 # else
594 # define YYCOPY(Dst, Src, Count) \
595  do \
596  { \
597  YYSIZE_T yyi; \
598  for (yyi = 0; yyi < (Count); yyi++) \
599  (Dst)[yyi] = (Src)[yyi]; \
600  } \
601  while (0)
602 # endif
603 # endif
604 #endif /* !YYCOPY_NEEDED */
605 
606 /* YYFINAL -- State number of the termination state. */
607 #define YYFINAL 57
608 /* YYLAST -- Last index in YYTABLE. */
609 #define YYLAST 746
610 
611 /* YYNTOKENS -- Number of terminals. */
612 #define YYNTOKENS 69
613 /* YYNNTS -- Number of nonterminals. */
614 #define YYNNTS 31
615 /* YYNRULES -- Number of rules. */
616 #define YYNRULES 122
617 /* YYNSTATES -- Number of states. */
618 #define YYNSTATES 233
619 
620 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
621  by yylex, with out-of-bounds checking. */
622 #define YYUNDEFTOK 2
623 #define YYMAXUTOK 303
624 
625 #define YYTRANSLATE(YYX) \
626  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
627 
628 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
629  as returned by yylex, without out-of-bounds checking. */
630 static const yytype_uint8 yytranslate[] =
631 {
632  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635  2, 2, 2, 2, 2, 2, 2, 2, 32, 64,
636  58, 63, 34, 30, 65, 31, 57, 35, 2, 2,
637  2, 2, 2, 2, 2, 2, 2, 2, 2, 62,
638  23, 21, 24, 2, 29, 2, 2, 2, 2, 2,
639  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641  2, 59, 2, 68, 2, 2, 2, 2, 2, 2,
642  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644  2, 2, 2, 66, 43, 67, 2, 2, 2, 2,
645  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
652  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
658  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
659  15, 16, 17, 18, 19, 20, 22, 25, 26, 27,
660  28, 33, 36, 37, 38, 39, 40, 41, 42, 44,
661  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
662  55, 56, 60, 61
663 };
664 
665 #if YYDEBUG
666  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
667 static const yytype_uint16 yyrline[] =
668 {
669  0, 240, 240, 244, 245, 247, 252, 256, 261, 267,
670  286, 286, 298, 302, 304, 312, 323, 333, 337, 340,
671  343, 347, 351, 355, 359, 362, 364, 366, 368, 372,
672  385, 389, 393, 397, 401, 405, 409, 413, 417, 421,
673  424, 428, 432, 436, 438, 443, 451, 455, 461, 472,
674  476, 480, 484, 485, 486, 487, 488, 489, 493, 495,
675  500, 502, 507, 509, 514, 516, 520, 522, 534, 536,
676  543, 546, 549, 552, 554, 556, 558, 560, 562, 564,
677  568, 570, 575, 585, 587, 594, 598, 606, 614, 618,
678  624, 626, 630, 634, 636, 638, 646, 657, 659, 664,
679  673, 674, 680, 685, 691, 700, 701, 702, 706, 711,
680  726, 725, 728, 731, 730, 737, 736, 739, 742, 741,
681  749, 751, 753
682 };
683 #endif
684 
685 #if YYDEBUG || YYERROR_VERBOSE || 0
686 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
687  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
688 static const char *const yytname[] =
689 {
690  "$end", "error", "$undefined", "INT", "NULL_PTR", "CHARLIT", "FLOAT",
691  "TRUEKEYWORD", "FALSEKEYWORD", "COLONCOLON", "STRING", "NAME", "DOT_ID",
692  "DOT_ALL", "SPECIAL_VARIABLE", "ASSIGN", "_AND_", "OR", "XOR", "THEN",
693  "ELSE", "'='", "NOTEQUAL", "'<'", "'>'", "LEQ", "GEQ", "IN", "DOTDOT",
694  "'@'", "'+'", "'-'", "'&'", "UNARY", "'*'", "'/'", "MOD", "REM",
695  "STARSTAR", "ABS", "NOT", "VAR", "ARROW", "'|'", "TICK_ACCESS",
696  "TICK_ADDRESS", "TICK_FIRST", "TICK_LAST", "TICK_LENGTH", "TICK_MAX",
697  "TICK_MIN", "TICK_MODULUS", "TICK_POS", "TICK_RANGE", "TICK_SIZE",
698  "TICK_TAG", "TICK_VAL", "'.'", "'('", "'['", "NEW", "OTHERS", "';'",
699  "')'", "'\\''", "','", "'{'", "'}'", "']'", "$accept", "start", "exp1",
700  "primary", "$@1", "save_qualifier", "simple_exp", "arglist", "relation",
701  "exp", "and_exp", "and_then_exp", "or_exp", "or_else_exp", "xor_exp",
702  "tick_arglist", "type_prefix", "opt_type_prefix", "var_or_type", "block",
703  "aggregate", "aggregate_component_list", "positional_list",
704  "component_groups", "others", "component_group",
705  "component_associations", "$@2", "$@3", "$@4", "$@5", YY_NULLPTR
706 };
707 #endif
708 
709 # ifdef YYPRINT
710 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
711  (internal) symbol number NUM (which must be that of a token). */
712 static const yytype_uint16 yytoknum[] =
713 {
714  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
715  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
716  275, 61, 276, 60, 62, 277, 278, 279, 280, 64,
717  43, 45, 38, 281, 42, 47, 282, 283, 284, 285,
718  286, 287, 288, 124, 289, 290, 291, 292, 293, 294,
719  295, 296, 297, 298, 299, 300, 301, 46, 40, 91,
720  302, 303, 59, 41, 39, 44, 123, 125, 93
721 };
722 # endif
723 
724 #define YYPACT_NINF -104
725 
726 #define yypact_value_is_default(Yystate) \
727  (!!((Yystate) == (-104)))
728 
729 #define YYTABLE_NINF -83
730 
731 #define yytable_value_is_error(Yytable_value) \
732  0
733 
734  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
735  STATE-NUM. */
736 static const yytype_int16 yypact[] =
737 {
738  430, -104, -104, -104, -104, -104, -104, -104, 3, -104,
739  430, 430, 544, 544, 430, 430, 289, 44, 49, 26,
740  -53, -2, 679, 86, -104, 50, 55, 48, 57, 74,
741  -28, -1, 275, 61, -104, -104, -104, 577, 219, 219,
742  9, 9, 219, 219, 54, 58, -31, 616, 42, 45,
743  289, -104, -104, 46, -104, -104, 43, -104, 430, -104,
744  -104, 430, -104, -104, 59, 59, 59, -104, -104, 277,
745  430, 430, 430, 430, 430, 430, 430, 430, 430, 430,
746  430, 430, 430, 430, 430, 430, 430, 89, 353, 392,
747  430, 430, 94, 430, 100, 430, -104, 63, 64, 65,
748  67, 277, -104, 15, -104, -104, 430, -104, 430, 430,
749  468, -104, -104, 62, -104, 289, 544, -104, -104, 125,
750  -104, -104, -104, -4, 639, -57, -104, 70, 117, 117,
751  117, 117, 117, 117, 149, 563, 174, 549, 219, 219,
752  219, 91, 91, 91, 91, 91, 430, 430, -104, 430,
753  -104, -104, -104, 430, -104, 430, -104, 430, 430, 430,
754  430, 659, -38, -104, -104, -104, 430, 468, -104, 339,
755  -104, 692, -104, -104, -104, 9, 69, 430, 430, -104,
756  506, -104, 59, 430, 561, 708, 211, -104, -104, -104,
757  -104, 81, 99, 102, 93, 430, -104, 72, -104, -104,
758  -104, -104, -104, -104, 105, 82, -104, -104, 117, 59,
759  430, -104, 430, 430, -104, 214, 430, 430, 468, -104,
760  430, -104, 117, 106, 107, -104, 109, -104, -104, -104,
761  -104, -104, -104
762 };
763 
764  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
765  Performed when YYTABLE does not specify something else to do. Zero
766  means the default is an error. */
767 static const yytype_uint8 yydefact[] =
768 {
769  84, 85, 88, 86, 87, 90, 91, 89, 93, 17,
770  84, 84, 84, 84, 84, 84, 84, 0, 0, 0,
771  2, 19, 39, 52, 3, 53, 54, 55, 56, 57,
772  83, 0, 16, 0, 18, 97, 95, 19, 21, 20,
773  121, 120, 23, 22, 93, 0, 0, 39, 3, 0,
774  84, 100, 105, 106, 109, 92, 0, 1, 84, 7,
775  6, 84, 68, 69, 80, 80, 80, 73, 74, 84,
776  84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
777  84, 84, 84, 84, 84, 84, 84, 0, 84, 84,
778  84, 84, 0, 84, 0, 84, 79, 0, 0, 0,
779  0, 84, 12, 94, 110, 115, 84, 15, 84, 84,
780  84, 103, 99, 101, 102, 84, 84, 4, 5, 0,
781  70, 71, 72, 93, 39, 0, 25, 0, 40, 41,
782  50, 51, 42, 49, 19, 0, 16, 35, 36, 38,
783  37, 31, 32, 34, 33, 30, 84, 84, 58, 84,
784  62, 66, 59, 84, 63, 84, 67, 84, 84, 84,
785  84, 39, 0, 10, 98, 96, 84, 84, 108, 0,
786  112, 0, 117, 104, 107, 29, 0, 84, 84, 8,
787  84, 122, 80, 84, 19, 0, 16, 60, 64, 61,
788  65, 0, 0, 0, 0, 84, 9, 0, 111, 116,
789  113, 118, 81, 26, 0, 93, 27, 44, 43, 80,
790  84, 78, 84, 84, 77, 0, 84, 84, 84, 13,
791  84, 47, 46, 0, 0, 14, 0, 114, 119, 28,
792  76, 75, 11
793 };
794 
795  /* YYPGOTO[NTERM-NUM]. */
796 static const yytype_int16 yypgoto[] =
797 {
798  -104, -104, 157, 17, -104, -104, 4, 75, -54, 0,
799  -104, -104, -104, -104, -104, -64, -104, -104, -15, -104,
800  -104, -104, -104, -46, -104, -104, -103, -104, -104, -104,
801  -104
802 };
803 
804  /* YYDEFGOTO[NTERM-NUM]. */
805 static const yytype_int16 yydefgoto[] =
806 {
807  -1, 19, 20, 37, 197, 163, 22, 125, 23, 126,
808  25, 26, 27, 28, 29, 120, 30, 31, 32, 33,
809  34, 49, 50, 51, 52, 53, 54, 166, 217, 167,
810  218
811 };
812 
813  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
814  positive, shift that token. If negative, reduce the rule whose
815  number is the opposite. If YYTABLE_NINF, syntax error. */
816 static const yytype_int16 yytable[] =
817 {
818  24, 121, 122, 56, 114, 35, 179, 172, 180, 58,
819  59, 60, 35, 61, 38, 39, 48, 21, 42, 43,
820  47, 59, 60, 96, 164, 196, 57, 180, 97, 40,
821  41, 58, 107, 21, 148, 150, 151, 152, 177, 154,
822  36, 156, 62, 63, 64, 65, 66, 36, 98, 99,
823  113, 100, 67, 68, 47, 55, 69, 70, 117, 165,
824  8, 118, 136, 35, 199, 93, 91, 69, 70, 174,
825  127, 92, 103, 124, 94, 128, 129, 130, 131, 132,
826  133, 135, 137, 138, 139, 140, 141, 142, 143, 144,
827  145, 35, 95, 187, 134, 188, 104, 105, 36, 189,
828  106, 190, 88, 89, 90, 161, 168, 111, 112, 170,
829  116, 115, 169, 153, 171, 228, 146, 119, 207, 171,
830  155, 157, 158, 159, 220, 160, 36, 173, 176, 86,
831  216, 186, 202, 175, 78, 79, 80, 81, 181, 82,
832  83, 84, 85, 86, 211, 221, 78, 79, 80, 81,
833  185, 82, 83, 84, 85, 86, 214, 191, 192, 193,
834  194, 59, 60, 184, 212, 0, 198, 213, 219, 230,
835  231, 171, 232, 46, -45, 0, 162, 203, 0, 0,
836  206, 0, 204, 0, 0, 0, 0, 208, 0, 0,
837  -45, -45, -45, 62, 63, 64, 65, 66, 0, 215,
838  0, 0, 182, 67, 68, 0, 0, 69, 70, 0,
839  0, -48, 223, 224, 222, 0, 226, 227, 0, 0,
840  229, 0, 171, -82, -82, -82, -82, -48, -48, -48,
841  -82, 0, 101, 0, 0, 0, -45, -45, 102, -45,
842  0, 0, -45, 78, 79, 80, 81, 0, 82, 83,
843  84, 85, 86, 82, 83, 84, 85, 86, 0, 0,
844  -82, -82, -82, -82, 0, 0, 0, -82, 0, 101,
845  0, 0, 0, -48, -48, 102, -48, 225, 0, -48,
846  1, 2, 3, 4, 5, 6, 0, 7, 123, 0,
847  0, 9, 1, 2, 3, 4, 5, 6, 0, 7,
848  44, 0, 0, 9, 0, 0, 0, 10, 11, 12,
849  0, 13, 0, 0, 0, 0, 14, 15, 0, 10,
850  11, 12, 0, 13, -82, -82, -82, -82, 14, 15,
851  0, -82, 0, 101, 0, 16, 0, 17, 0, 102,
852  -24, 0, -24, 18, 0, 0, 0, 16, 0, 17,
853  45, 0, 0, 0, 0, 18, 1, 2, 3, 4,
854  5, 6, 0, 7, 8, 0, 0, 9, 78, 79,
855  80, 81, 147, 82, 83, 84, 85, 86, 0, 0,
856  0, 200, 201, 10, 11, 12, 0, 13, 0, 0,
857  0, 0, 14, 15, 0, 1, 2, 3, 4, 5,
858  6, 0, 7, 8, 0, 0, 9, 0, 0, 0,
859  0, 16, 149, 17, 0, 0, 0, 0, 0, 18,
860  0, 0, 10, 11, 12, 0, 13, 0, 0, 0,
861  0, 14, 15, 1, 2, 3, 4, 5, 6, 0,
862  7, 8, 0, 0, 9, 0, 0, 0, 0, 0,
863  16, 0, 17, 0, 0, 0, 0, 0, 18, 0,
864  10, 11, 12, 0, 13, 0, 0, 0, 0, 14,
865  15, 1, 2, 3, 4, 5, 6, 0, 7, 44,
866  0, 0, 9, 0, 0, 0, 0, 0, 16, 0,
867  17, 0, 0, 0, 0, 0, 18, 0, 10, 11,
868  12, 0, 13, 0, 0, 0, 0, 14, 15, 1,
869  2, 3, 4, 5, 6, 0, 7, 205, 0, 0,
870  9, 0, 0, 0, 0, 0, 16, 0, 17, 0,
871  0, 0, 0, 0, 18, 0, 10, 11, 12, 0,
872  13, 0, 0, 0, 0, 14, 15, 1, 2, 3,
873  4, 5, 6, 0, 7, 8, 0, 0, 9, 0,
874  0, 0, 0, 0, 16, 0, 17, 0, 0, 0,
875  0, 0, 18, 59, 60, 0, 12, 0, 13, 79,
876  80, 81, 0, 82, 83, 84, 85, 86, 0, 59,
877  60, 183, 78, 79, 80, 81, 0, 82, 83, 84,
878  85, 86, 16, 0, 17, 62, 63, 64, 65, 66,
879  18, 0, 0, 0, 209, 67, 68, 0, 0, 69,
880  70, 62, 63, 64, 65, 66, 0, 0, 0, 0,
881  0, 67, 68, 0, 0, 69, 70, 71, 72, 73,
882  74, 75, 76, 77, 108, 78, 79, 80, 81, 0,
883  82, 83, 84, 85, 86, 0, 87, 0, 109, 110,
884  71, 72, 73, 74, 75, 76, 77, 178, 78, 79,
885  80, 81, 0, 82, 83, 84, 85, 86, 0, 87,
886  71, 72, 73, 74, 75, 76, 77, 195, 78, 79,
887  80, 81, 0, 82, 83, 84, 85, 86, 0, 87,
888  71, 72, 73, 74, 75, 76, 77, 0, 78, 79,
889  80, 81, 0, 82, 83, 84, 85, 86, 0, 87,
890  108, 78, 79, 80, 81, 0, 82, 83, 84, 85,
891  86, 0, 0, 0, 109, 110, 210, 78, 79, 80,
892  81, 0, 82, 83, 84, 85, 86
893 };
894 
895 static const yytype_int16 yycheck[] =
896 {
897  0, 65, 66, 18, 50, 9, 63, 110, 65, 62,
898  12, 13, 9, 15, 10, 11, 16, 0, 14, 15,
899  16, 12, 13, 51, 9, 63, 0, 65, 56, 12,
900  13, 62, 63, 16, 88, 89, 90, 91, 42, 93,
901  44, 95, 44, 45, 46, 47, 48, 44, 49, 50,
902  50, 52, 54, 55, 50, 11, 58, 59, 58, 44,
903  11, 61, 77, 9, 167, 17, 16, 58, 59, 115,
904  70, 16, 11, 69, 17, 71, 72, 73, 74, 75,
905  76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
906  86, 9, 18, 147, 77, 149, 42, 43, 44, 153,
907  42, 155, 16, 17, 18, 101, 106, 65, 63, 109,
908  67, 65, 108, 19, 110, 218, 27, 58, 182, 115,
909  20, 58, 58, 58, 42, 58, 44, 65, 3, 38,
910  58, 146, 63, 116, 29, 30, 31, 32, 68, 34,
911  35, 36, 37, 38, 63, 209, 29, 30, 31, 32,
912  146, 34, 35, 36, 37, 38, 63, 157, 158, 159,
913  160, 12, 13, 146, 65, -1, 166, 65, 63, 63,
914  63, 167, 63, 16, 0, -1, 101, 177, -1, -1,
915  180, -1, 178, -1, -1, -1, -1, 183, -1, -1,
916  16, 17, 18, 44, 45, 46, 47, 48, -1, 195,
917  -1, -1, 53, 54, 55, -1, -1, 58, 59, -1,
918  -1, 0, 212, 213, 210, -1, 216, 217, -1, -1,
919  220, -1, 218, 49, 50, 51, 52, 16, 17, 18,
920  56, -1, 58, -1, -1, -1, 62, 63, 64, 65,
921  -1, -1, 68, 29, 30, 31, 32, -1, 34, 35,
922  36, 37, 38, 34, 35, 36, 37, 38, -1, -1,
923  49, 50, 51, 52, -1, -1, -1, 56, -1, 58,
924  -1, -1, -1, 62, 63, 64, 65, 63, -1, 68,
925  3, 4, 5, 6, 7, 8, -1, 10, 11, -1,
926  -1, 14, 3, 4, 5, 6, 7, 8, -1, 10,
927  11, -1, -1, 14, -1, -1, -1, 30, 31, 32,
928  -1, 34, -1, -1, -1, -1, 39, 40, -1, 30,
929  31, 32, -1, 34, 49, 50, 51, 52, 39, 40,
930  -1, 56, -1, 58, -1, 58, -1, 60, -1, 64,
931  63, -1, 65, 66, -1, -1, -1, 58, -1, 60,
932  61, -1, -1, -1, -1, 66, 3, 4, 5, 6,
933  7, 8, -1, 10, 11, -1, -1, 14, 29, 30,
934  31, 32, 19, 34, 35, 36, 37, 38, -1, -1,
935  -1, 42, 43, 30, 31, 32, -1, 34, -1, -1,
936  -1, -1, 39, 40, -1, 3, 4, 5, 6, 7,
937  8, -1, 10, 11, -1, -1, 14, -1, -1, -1,
938  -1, 58, 20, 60, -1, -1, -1, -1, -1, 66,
939  -1, -1, 30, 31, 32, -1, 34, -1, -1, -1,
940  -1, 39, 40, 3, 4, 5, 6, 7, 8, -1,
941  10, 11, -1, -1, 14, -1, -1, -1, -1, -1,
942  58, -1, 60, -1, -1, -1, -1, -1, 66, -1,
943  30, 31, 32, -1, 34, -1, -1, -1, -1, 39,
944  40, 3, 4, 5, 6, 7, 8, -1, 10, 11,
945  -1, -1, 14, -1, -1, -1, -1, -1, 58, -1,
946  60, -1, -1, -1, -1, -1, 66, -1, 30, 31,
947  32, -1, 34, -1, -1, -1, -1, 39, 40, 3,
948  4, 5, 6, 7, 8, -1, 10, 11, -1, -1,
949  14, -1, -1, -1, -1, -1, 58, -1, 60, -1,
950  -1, -1, -1, -1, 66, -1, 30, 31, 32, -1,
951  34, -1, -1, -1, -1, 39, 40, 3, 4, 5,
952  6, 7, 8, -1, 10, 11, -1, -1, 14, -1,
953  -1, -1, -1, -1, 58, -1, 60, -1, -1, -1,
954  -1, -1, 66, 12, 13, -1, 32, -1, 34, 30,
955  31, 32, -1, 34, 35, 36, 37, 38, -1, 12,
956  13, 28, 29, 30, 31, 32, -1, 34, 35, 36,
957  37, 38, 58, -1, 60, 44, 45, 46, 47, 48,
958  66, -1, -1, -1, 53, 54, 55, -1, -1, 58,
959  59, 44, 45, 46, 47, 48, -1, -1, -1, -1,
960  -1, 54, 55, -1, -1, 58, 59, 21, 22, 23,
961  24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
962  34, 35, 36, 37, 38, -1, 40, -1, 42, 43,
963  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
964  31, 32, -1, 34, 35, 36, 37, 38, -1, 40,
965  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
966  31, 32, -1, 34, 35, 36, 37, 38, -1, 40,
967  21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
968  31, 32, -1, 34, 35, 36, 37, 38, -1, 40,
969  28, 29, 30, 31, 32, -1, 34, 35, 36, 37,
970  38, -1, -1, -1, 42, 43, 28, 29, 30, 31,
971  32, -1, 34, 35, 36, 37, 38
972 };
973 
974  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
975  symbol of state STATE-NUM. */
976 static const yytype_uint8 yystos[] =
977 {
978  0, 3, 4, 5, 6, 7, 8, 10, 11, 14,
979  30, 31, 32, 34, 39, 40, 58, 60, 66, 70,
980  71, 72, 75, 77, 78, 79, 80, 81, 82, 83,
981  85, 86, 87, 88, 89, 9, 44, 72, 75, 75,
982  72, 72, 75, 75, 11, 61, 71, 75, 78, 90,
983  91, 92, 93, 94, 95, 11, 87, 0, 62, 12,
984  13, 15, 44, 45, 46, 47, 48, 54, 55, 58,
985  59, 21, 22, 23, 24, 25, 26, 27, 29, 30,
986  31, 32, 34, 35, 36, 37, 38, 40, 16, 17,
987  18, 16, 16, 17, 17, 18, 51, 56, 49, 50,
988  52, 58, 64, 11, 42, 43, 42, 63, 28, 42,
989  43, 65, 63, 78, 92, 65, 67, 78, 78, 58,
990  84, 84, 84, 11, 75, 76, 78, 78, 75, 75,
991  75, 75, 75, 75, 72, 75, 87, 75, 75, 75,
992  75, 75, 75, 75, 75, 75, 27, 19, 77, 20,
993  77, 77, 77, 19, 77, 20, 77, 58, 58, 58,
994  58, 75, 76, 74, 9, 44, 96, 98, 78, 75,
995  78, 75, 95, 65, 92, 72, 3, 42, 28, 63,
996  65, 68, 53, 28, 72, 75, 87, 77, 77, 77,
997  77, 78, 78, 78, 78, 28, 63, 73, 78, 95,
998  42, 43, 63, 78, 75, 11, 78, 84, 75, 53,
999  28, 63, 65, 65, 63, 75, 58, 97, 99, 63,
1000  42, 84, 75, 78, 78, 63, 78, 78, 95, 78,
1001  63, 63, 63
1002 };
1003 
1004  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1005 static const yytype_uint8 yyr1[] =
1006 {
1007  0, 69, 70, 71, 71, 71, 72, 72, 72, 72,
1008  73, 72, 74, 72, 72, 72, 72, 72, 72, 75,
1009  75, 75, 75, 75, 76, 76, 76, 76, 76, 72,
1010  75, 75, 75, 75, 75, 75, 75, 75, 75, 77,
1011  77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
1012  77, 77, 78, 78, 78, 78, 78, 78, 79, 79,
1013  80, 80, 81, 81, 82, 82, 83, 83, 72, 72,
1014  72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
1015  84, 84, 85, 86, 86, 72, 72, 72, 72, 72,
1016  72, 72, 72, 87, 87, 87, 87, 88, 88, 89,
1017  90, 90, 90, 91, 91, 92, 92, 92, 93, 94,
1018  96, 95, 95, 97, 95, 98, 95, 95, 99, 95,
1019  72, 72, 72
1020 };
1021 
1022  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1023 static const yytype_uint8 yyr2[] =
1024 {
1025  0, 2, 1, 1, 3, 3, 2, 2, 4, 4,
1026  0, 7, 0, 6, 6, 3, 1, 1, 1, 1,
1027  2, 2, 2, 2, 0, 1, 3, 3, 5, 4,
1028  3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
1029  3, 3, 3, 5, 5, 3, 6, 6, 4, 3,
1030  3, 3, 1, 1, 1, 1, 1, 1, 3, 3,
1031  4, 4, 3, 3, 4, 4, 3, 3, 2, 2,
1032  3, 3, 3, 2, 2, 7, 7, 5, 5, 2,
1033  0, 3, 1, 1, 0, 1, 1, 1, 1, 1,
1034  1, 1, 2, 1, 2, 2, 3, 2, 3, 3,
1035  1, 2, 2, 2, 3, 1, 1, 3, 3, 1,
1036  0, 4, 3, 0, 6, 0, 4, 3, 0, 6,
1037  2, 2, 4
1038 };
1039 
1040 
1041 #define yyerrok (yyerrstatus = 0)
1042 #define yyclearin (yychar = YYEMPTY)
1043 #define YYEMPTY (-2)
1044 #define YYEOF 0
1045 
1046 #define YYACCEPT goto yyacceptlab
1047 #define YYABORT goto yyabortlab
1048 #define YYERROR goto yyerrorlab
1049 
1050 
1051 #define YYRECOVERING() (!!yyerrstatus)
1052 
1053 #define YYBACKUP(Token, Value) \
1054 do \
1055  if (yychar == YYEMPTY) \
1056  { \
1057  yychar = (Token); \
1058  yylval = (Value); \
1059  YYPOPSTACK (yylen); \
1060  yystate = *yyssp; \
1061  goto yybackup; \
1062  } \
1063  else \
1064  { \
1065  yyerror (YY_("syntax error: cannot back up")); \
1066  YYERROR; \
1067  } \
1068 while (0)
1069 
1070 /* Error token number */
1071 #define YYTERROR 1
1072 #define YYERRCODE 256
1073 
1074 
1075 
1076 /* Enable debugging if requested. */
1077 #if YYDEBUG
1078 
1079 # ifndef YYFPRINTF
1080 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1081 # define YYFPRINTF fprintf
1082 # endif
1083 
1084 # define YYDPRINTF(Args) \
1085 do { \
1086  if (yydebug) \
1087  YYFPRINTF Args; \
1088 } while (0)
1089 
1090 /* This macro is provided for backward compatibility. */
1091 #ifndef YY_LOCATION_PRINT
1092 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1093 #endif
1094 
1095 
1096 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1097 do { \
1098  if (yydebug) \
1099  { \
1100  YYFPRINTF (stderr, "%s ", Title); \
1101  yy_symbol_print (stderr, \
1102  Type, Value); \
1103  YYFPRINTF (stderr, "\n"); \
1104  } \
1105 } while (0)
1106 
1107 
1108 /*----------------------------------------.
1109 | Print this symbol's value on YYOUTPUT. |
1110 `----------------------------------------*/
1111 
1112 static void
1113 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1114 {
1115  FILE *yyo = yyoutput;
1116  YYUSE (yyo);
1117  if (!yyvaluep)
1118  return;
1119 # ifdef YYPRINT
1120  if (yytype < YYNTOKENS)
1121  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1122 # endif
1123  YYUSE (yytype);
1124 }
1125 
1126 
1127 /*--------------------------------.
1128 | Print this symbol on YYOUTPUT. |
1129 `--------------------------------*/
1130 
1131 static void
1132 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1133 {
1134  YYFPRINTF (yyoutput, "%s %s (",
1135  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1136 
1137  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1138  YYFPRINTF (yyoutput, ")");
1139 }
1140 
1141 /*------------------------------------------------------------------.
1142 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1143 | TOP (included). |
1144 `------------------------------------------------------------------*/
1145 
1146 static void
1147 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1148 {
1149  YYFPRINTF (stderr, "Stack now");
1150  for (; yybottom <= yytop; yybottom++)
1151  {
1152  int yybot = *yybottom;
1153  YYFPRINTF (stderr, " %d", yybot);
1154  }
1155  YYFPRINTF (stderr, "\n");
1156 }
1157 
1158 # define YY_STACK_PRINT(Bottom, Top) \
1159 do { \
1160  if (yydebug) \
1161  yy_stack_print ((Bottom), (Top)); \
1162 } while (0)
1163 
1164 
1165 /*------------------------------------------------.
1166 | Report that the YYRULE is going to be reduced. |
1167 `------------------------------------------------*/
1168 
1169 static void
1170 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1171 {
1172  unsigned long int yylno = yyrline[yyrule];
1173  int yynrhs = yyr2[yyrule];
1174  int yyi;
1175  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1176  yyrule - 1, yylno);
1177  /* The symbols being reduced. */
1178  for (yyi = 0; yyi < yynrhs; yyi++)
1179  {
1180  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1181  yy_symbol_print (stderr,
1182  yystos[yyssp[yyi + 1 - yynrhs]],
1183  &(yyvsp[(yyi + 1) - (yynrhs)])
1184  );
1185  YYFPRINTF (stderr, "\n");
1186  }
1187 }
1188 
1189 # define YY_REDUCE_PRINT(Rule) \
1190 do { \
1191  if (yydebug) \
1192  yy_reduce_print (yyssp, yyvsp, Rule); \
1193 } while (0)
1194 
1195 /* Nonzero means print parse trace. It is left uninitialized so that
1196  multiple parsers can coexist. */
1198 #else /* !YYDEBUG */
1199 # define YYDPRINTF(Args)
1200 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1201 # define YY_STACK_PRINT(Bottom, Top)
1202 # define YY_REDUCE_PRINT(Rule)
1203 #endif /* !YYDEBUG */
1204 
1205 
1206 /* YYINITDEPTH -- initial size of the parser's stacks. */
1207 #ifndef YYINITDEPTH
1208 # define YYINITDEPTH 200
1209 #endif
1210 
1211 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1212  if the built-in stack extension method is used).
1213 
1214  Do not make this value too large; the results are undefined if
1215  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1216  evaluated with infinite-precision integer arithmetic. */
1217 
1218 #ifndef YYMAXDEPTH
1219 # define YYMAXDEPTH 10000
1220 #endif
1221 
1222 
1223 #if YYERROR_VERBOSE
1224 
1225 # ifndef yystrlen
1226 # if defined __GLIBC__ && defined _STRING_H
1227 # define yystrlen strlen
1228 # else
1229 /* Return the length of YYSTR. */
1230 static YYSIZE_T
1231 yystrlen (const char *yystr)
1232 {
1233  YYSIZE_T yylen;
1234  for (yylen = 0; yystr[yylen]; yylen++)
1235  continue;
1236  return yylen;
1237 }
1238 # endif
1239 # endif
1240 
1241 # ifndef yystpcpy
1242 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1243 # define yystpcpy stpcpy
1244 # else
1245 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1246  YYDEST. */
1247 static char *
1248 yystpcpy (char *yydest, const char *yysrc)
1249 {
1250  char *yyd = yydest;
1251  const char *yys = yysrc;
1252 
1253  while ((*yyd++ = *yys++) != '\0')
1254  continue;
1255 
1256  return yyd - 1;
1257 }
1258 # endif
1259 # endif
1260 
1261 # ifndef yytnamerr
1262 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1263  quotes and backslashes, so that it's suitable for yyerror. The
1264  heuristic is that double-quoting is unnecessary unless the string
1265  contains an apostrophe, a comma, or backslash (other than
1266  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1267  null, do not copy; instead, return the length of what the result
1268  would have been. */
1269 static YYSIZE_T
1270 yytnamerr (char *yyres, const char *yystr)
1271 {
1272  if (*yystr == '"')
1273  {
1274  YYSIZE_T yyn = 0;
1275  char const *yyp = yystr;
1276 
1277  for (;;)
1278  switch (*++yyp)
1279  {
1280  case '\'':
1281  case ',':
1282  goto do_not_strip_quotes;
1283 
1284  case '\\':
1285  if (*++yyp != '\\')
1286  goto do_not_strip_quotes;
1287  /* Fall through. */
1288  default:
1289  if (yyres)
1290  yyres[yyn] = *yyp;
1291  yyn++;
1292  break;
1293 
1294  case '"':
1295  if (yyres)
1296  yyres[yyn] = '\0';
1297  return yyn;
1298  }
1299  do_not_strip_quotes: ;
1300  }
1301 
1302  if (! yyres)
1303  return yystrlen (yystr);
1304 
1305  return yystpcpy (yyres, yystr) - yyres;
1306 }
1307 # endif
1308 
1309 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1310  about the unexpected token YYTOKEN for the state stack whose top is
1311  YYSSP.
1312 
1313  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1314  not large enough to hold the message. In that case, also set
1315  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1316  required number of bytes is too large to store. */
1317 static int
1318 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1319  yytype_int16 *yyssp, int yytoken)
1320 {
1321  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1322  YYSIZE_T yysize = yysize0;
1323  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1324  /* Internationalized format string. */
1325  const char *yyformat = YY_NULLPTR;
1326  /* Arguments of yyformat. */
1327  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1328  /* Number of reported tokens (one for the "unexpected", one per
1329  "expected"). */
1330  int yycount = 0;
1331 
1332  /* There are many possibilities here to consider:
1333  - If this state is a consistent state with a default action, then
1334  the only way this function was invoked is if the default action
1335  is an error action. In that case, don't check for expected
1336  tokens because there are none.
1337  - The only way there can be no lookahead present (in yychar) is if
1338  this state is a consistent state with a default action. Thus,
1339  detecting the absence of a lookahead is sufficient to determine
1340  that there is no unexpected or expected token to report. In that
1341  case, just report a simple "syntax error".
1342  - Don't assume there isn't a lookahead just because this state is a
1343  consistent state with a default action. There might have been a
1344  previous inconsistent state, consistent state with a non-default
1345  action, or user semantic action that manipulated yychar.
1346  - Of course, the expected token list depends on states to have
1347  correct lookahead information, and it depends on the parser not
1348  to perform extra reductions after fetching a lookahead from the
1349  scanner and before detecting a syntax error. Thus, state merging
1350  (from LALR or IELR) and default reductions corrupt the expected
1351  token list. However, the list is correct for canonical LR with
1352  one exception: it will still contain any token that will not be
1353  accepted due to an error action in a later state.
1354  */
1355  if (yytoken != YYEMPTY)
1356  {
1357  int yyn = yypact[*yyssp];
1358  yyarg[yycount++] = yytname[yytoken];
1359  if (!yypact_value_is_default (yyn))
1360  {
1361  /* Start YYX at -YYN if negative to avoid negative indexes in
1362  YYCHECK. In other words, skip the first -YYN actions for
1363  this state because they are default actions. */
1364  int yyxbegin = yyn < 0 ? -yyn : 0;
1365  /* Stay within bounds of both yycheck and yytname. */
1366  int yychecklim = YYLAST - yyn + 1;
1367  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1368  int yyx;
1369 
1370  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1371  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1372  && !yytable_value_is_error (yytable[yyx + yyn]))
1373  {
1374  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1375  {
1376  yycount = 1;
1377  yysize = yysize0;
1378  break;
1379  }
1380  yyarg[yycount++] = yytname[yyx];
1381  {
1382  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1383  if (! (yysize <= yysize1
1384  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1385  return 2;
1386  yysize = yysize1;
1387  }
1388  }
1389  }
1390  }
1391 
1392  switch (yycount)
1393  {
1394 # define YYCASE_(N, S) \
1395  case N: \
1396  yyformat = S; \
1397  break
1398  YYCASE_(0, YY_("syntax error"));
1399  YYCASE_(1, YY_("syntax error, unexpected %s"));
1400  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1401  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1402  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1403  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1404 # undef YYCASE_
1405  }
1406 
1407  {
1408  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1409  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1410  return 2;
1411  yysize = yysize1;
1412  }
1413 
1414  if (*yymsg_alloc < yysize)
1415  {
1416  *yymsg_alloc = 2 * yysize;
1417  if (! (yysize <= *yymsg_alloc
1418  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1419  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1420  return 1;
1421  }
1422 
1423  /* Avoid sprintf, as that infringes on the user's name space.
1424  Don't have undefined behavior even if the translation
1425  produced a string with the wrong number of "%s"s. */
1426  {
1427  char *yyp = *yymsg;
1428  int yyi = 0;
1429  while ((*yyp = *yyformat) != '\0')
1430  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1431  {
1432  yyp += yytnamerr (yyp, yyarg[yyi++]);
1433  yyformat += 2;
1434  }
1435  else
1436  {
1437  yyp++;
1438  yyformat++;
1439  }
1440  }
1441  return 0;
1442 }
1443 #endif /* YYERROR_VERBOSE */
1444 
1445 /*-----------------------------------------------.
1446 | Release the memory associated to this symbol. |
1447 `-----------------------------------------------*/
1448 
1449 static void
1450 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1451 {
1452  YYUSE (yyvaluep);
1453  if (!yymsg)
1454  yymsg = "Deleting";
1455  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1456 
1458  YYUSE (yytype);
1460 }
1461 
1462 
1463 
1464 
1465 /* The lookahead symbol. */
1467 
1468 /* The semantic value of the lookahead symbol. */
1470 /* Number of syntax errors so far. */
1472 
1473 
1474 /*----------.
1475 | yyparse. |
1476 `----------*/
1477 
1478 int
1479 yyparse (void)
1480 {
1481  int yystate;
1482  /* Number of tokens to shift before error messages enabled. */
1483  int yyerrstatus;
1484 
1485  /* The stacks and their tools:
1486  'yyss': related to states.
1487  'yyvs': related to semantic values.
1488 
1489  Refer to the stacks through separate pointers, to allow yyoverflow
1490  to xreallocate them elsewhere. */
1491 
1492  /* The state stack. */
1493  yytype_int16 yyssa[YYINITDEPTH];
1494  yytype_int16 *yyss;
1495  yytype_int16 *yyssp;
1496 
1497  /* The semantic value stack. */
1498  YYSTYPE yyvsa[YYINITDEPTH];
1499  YYSTYPE *yyvs;
1500  YYSTYPE *yyvsp;
1501 
1503 
1504  int yyn;
1505  int yyresult;
1506  /* Lookahead token as an internal (translated) token number. */
1507  int yytoken = 0;
1508  /* The variables used to return semantic value and location from the
1509  action routines. */
1510  YYSTYPE yyval;
1511 
1512 #if YYERROR_VERBOSE
1513  /* Buffer for error messages, and its allocated size. */
1514  char yymsgbuf[128];
1515  char *yymsg = yymsgbuf;
1516  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1517 #endif
1518 
1519 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1520 
1521  /* The number of symbols on the RHS of the reduced rule.
1522  Keep to zero when no symbol should be popped. */
1523  int yylen = 0;
1524 
1525  yyssp = yyss = yyssa;
1526  yyvsp = yyvs = yyvsa;
1527  yystacksize = YYINITDEPTH;
1528 
1529  YYDPRINTF ((stderr, "Starting parse\n"));
1530 
1531  yystate = 0;
1532  yyerrstatus = 0;
1533  yynerrs = 0;
1534  yychar = YYEMPTY; /* Cause a token to be read. */
1535  goto yysetstate;
1536 
1537 /*------------------------------------------------------------.
1538 | yynewstate -- Push a new state, which is found in yystate. |
1539 `------------------------------------------------------------*/
1540  yynewstate:
1541  /* In all cases, when you get here, the value and location stacks
1542  have just been pushed. So pushing a state here evens the stacks. */
1543  yyssp++;
1544 
1545  yysetstate:
1546  *yyssp = yystate;
1547 
1548  if (yyss + yystacksize - 1 <= yyssp)
1549  {
1550  /* Get the current used size of the three stacks, in elements. */
1551  YYSIZE_T yysize = yyssp - yyss + 1;
1552 
1553 #ifdef yyoverflow
1554  {
1555  /* Give user a chance to xreallocate the stack. Use copies of
1556  these so that the &'s don't force the real ones into
1557  memory. */
1558  YYSTYPE *yyvs1 = yyvs;
1559  yytype_int16 *yyss1 = yyss;
1560 
1561  /* Each stack pointer address is followed by the size of the
1562  data in use in that stack, in bytes. This used to be a
1563  conditional around just the two extra args, but that might
1564  be undefined if yyoverflow is a macro. */
1565  yyoverflow (YY_("memory exhausted"),
1566  &yyss1, yysize * sizeof (*yyssp),
1567  &yyvs1, yysize * sizeof (*yyvsp),
1568  &yystacksize);
1569 
1570  yyss = yyss1;
1571  yyvs = yyvs1;
1572  }
1573 #else /* no yyoverflow */
1574 # ifndef YYSTACK_RELOCATE
1575  goto yyexhaustedlab;
1576 # else
1577  /* Extend the stack our own way. */
1578  if (YYMAXDEPTH <= yystacksize)
1579  goto yyexhaustedlab;
1580  yystacksize *= 2;
1581  if (YYMAXDEPTH < yystacksize)
1582  yystacksize = YYMAXDEPTH;
1583 
1584  {
1585  yytype_int16 *yyss1 = yyss;
1586  union yyalloc *yyptr =
1587  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1588  if (! yyptr)
1589  goto yyexhaustedlab;
1590  YYSTACK_RELOCATE (yyss_alloc, yyss);
1591  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1592 # undef YYSTACK_RELOCATE
1593  if (yyss1 != yyssa)
1594  YYSTACK_FREE (yyss1);
1595  }
1596 # endif
1597 #endif /* no yyoverflow */
1598 
1599  yyssp = yyss + yysize - 1;
1600  yyvsp = yyvs + yysize - 1;
1601 
1602  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1603  (unsigned long int) yystacksize));
1604 
1605  if (yyss + yystacksize - 1 <= yyssp)
1606  YYABORT;
1607  }
1608 
1609  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1610 
1611  if (yystate == YYFINAL)
1612  YYACCEPT;
1613 
1614  goto yybackup;
1615 
1616 /*-----------.
1617 | yybackup. |
1618 `-----------*/
1619 yybackup:
1620 
1621  /* Do appropriate processing given the current state. Read a
1622  lookahead token if we need one and don't already have one. */
1623 
1624  /* First try to decide what to do without reference to lookahead token. */
1625  yyn = yypact[yystate];
1626  if (yypact_value_is_default (yyn))
1627  goto yydefault;
1628 
1629  /* Not known => get a lookahead token if don't already have one. */
1630 
1631  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1632  if (yychar == YYEMPTY)
1633  {
1634  YYDPRINTF ((stderr, "Reading a token: "));
1635  yychar = yylex ();
1636  }
1637 
1638  if (yychar <= YYEOF)
1639  {
1640  yychar = yytoken = YYEOF;
1641  YYDPRINTF ((stderr, "Now at end of input.\n"));
1642  }
1643  else
1644  {
1645  yytoken = YYTRANSLATE (yychar);
1646  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1647  }
1648 
1649  /* If the proper action on seeing token YYTOKEN is to reduce or to
1650  detect an error, take that action. */
1651  yyn += yytoken;
1652  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1653  goto yydefault;
1654  yyn = yytable[yyn];
1655  if (yyn <= 0)
1656  {
1657  if (yytable_value_is_error (yyn))
1658  goto yyerrlab;
1659  yyn = -yyn;
1660  goto yyreduce;
1661  }
1662 
1663  /* Count tokens shifted since error; after three, turn off error
1664  status. */
1665  if (yyerrstatus)
1666  yyerrstatus--;
1667 
1668  /* Shift the lookahead token. */
1669  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1670 
1671  /* Discard the shifted token. */
1672  yychar = YYEMPTY;
1673 
1674  yystate = yyn;
1676  *++yyvsp = yylval;
1678 
1679  goto yynewstate;
1680 
1681 
1682 /*-----------------------------------------------------------.
1683 | yydefault -- do the default action for the current state. |
1684 `-----------------------------------------------------------*/
1685 yydefault:
1686  yyn = yydefact[yystate];
1687  if (yyn == 0)
1688  goto yyerrlab;
1689  goto yyreduce;
1690 
1691 
1692 /*-----------------------------.
1693 | yyreduce -- Do a reduction. |
1694 `-----------------------------*/
1695 yyreduce:
1696  /* yyn is the number of a rule to reduce with. */
1697  yylen = yyr2[yyn];
1698 
1699  /* If YYLEN is nonzero, implement the default value of the action:
1700  '$$ = $1'.
1701 
1702  Otherwise, the following line sets YYVAL to garbage.
1703  This behavior is undocumented and Bison
1704  users should not rely upon it. Assigning to YYVAL
1705  unconditionally makes the parser a bit smaller, and it avoids a
1706  GCC warning that YYVAL may be used uninitialized. */
1707  yyval = yyvsp[1-yylen];
1708 
1709 
1710  YY_REDUCE_PRINT (yyn);
1711  switch (yyn)
1712  {
1713  case 4:
1714 #line 246 "ada-exp.y" /* yacc.c:1646 */
1715  { write_exp_elt_opcode (pstate, BINOP_COMMA); }
1716 #line 1718 "ada-exp.c" /* yacc.c:1646 */
1717  break;
1718 
1719  case 5:
1720 #line 248 "ada-exp.y" /* yacc.c:1646 */
1721  { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
1722 #line 1724 "ada-exp.c" /* yacc.c:1646 */
1723  break;
1724 
1725  case 6:
1726 #line 253 "ada-exp.y" /* yacc.c:1646 */
1727  { write_exp_elt_opcode (pstate, UNOP_IND); }
1728 #line 1730 "ada-exp.c" /* yacc.c:1646 */
1729  break;
1730 
1731  case 7:
1732 #line 257 "ada-exp.y" /* yacc.c:1646 */
1733  { write_exp_op_with_string (pstate, STRUCTOP_STRUCT,
1734  (yyvsp[0].sval)); }
1735 #line 1737 "ada-exp.c" /* yacc.c:1646 */
1736  break;
1737 
1738  case 8:
1739 #line 262 "ada-exp.y" /* yacc.c:1646 */
1740  {
1741  write_exp_elt_opcode (pstate, OP_FUNCALL);
1742  write_exp_elt_longcst (pstate, (yyvsp[-1].lval));
1743  write_exp_elt_opcode (pstate, OP_FUNCALL);
1744  }
1745 #line 1747 "ada-exp.c" /* yacc.c:1646 */
1746  break;
1747 
1748  case 9:
1749 #line 268 "ada-exp.y" /* yacc.c:1646 */
1750  {
1751  if ((yyvsp[-3].tval) != NULL)
1752  {
1753  if ((yyvsp[-1].lval) != 1)
1754  error (_("Invalid conversion"));
1755  write_exp_elt_opcode (pstate, UNOP_CAST);
1756  write_exp_elt_type (pstate, (yyvsp[-3].tval));
1757  write_exp_elt_opcode (pstate, UNOP_CAST);
1758  }
1759  else
1760  {
1761  write_exp_elt_opcode (pstate, OP_FUNCALL);
1762  write_exp_elt_longcst (pstate, (yyvsp[-1].lval));
1763  write_exp_elt_opcode (pstate, OP_FUNCALL);
1764  }
1765  }
1766 #line 1768 "ada-exp.c" /* yacc.c:1646 */
1767  break;
1768 
1769  case 10:
1770 #line 286 "ada-exp.y" /* yacc.c:1646 */
1771  { type_qualifier = (yyvsp[-2].tval); }
1772 #line 1774 "ada-exp.c" /* yacc.c:1646 */
1773  break;
1774 
1775  case 11:
1776 #line 288 "ada-exp.y" /* yacc.c:1646 */
1777  {
1778  if ((yyvsp[-6].tval) == NULL)
1779  error (_("Type required for qualification"));
1780  write_exp_elt_opcode (pstate, UNOP_QUAL);
1781  write_exp_elt_type (pstate, (yyvsp[-6].tval));
1782  write_exp_elt_opcode (pstate, UNOP_QUAL);
1783  type_qualifier = (yyvsp[-4].tval);
1784  }
1785 #line 1787 "ada-exp.c" /* yacc.c:1646 */
1786  break;
1787 
1788  case 12:
1789 #line 298 "ada-exp.y" /* yacc.c:1646 */
1790  { (yyval.tval) = type_qualifier; }
1791 #line 1793 "ada-exp.c" /* yacc.c:1646 */
1792  break;
1793 
1794  case 13:
1795 #line 303 "ada-exp.y" /* yacc.c:1646 */
1796  { write_exp_elt_opcode (pstate, TERNOP_SLICE); }
1797 #line 1799 "ada-exp.c" /* yacc.c:1646 */
1798  break;
1799 
1800  case 14:
1801 #line 305 "ada-exp.y" /* yacc.c:1646 */
1802  { if ((yyvsp[-5].tval) == NULL)
1803  write_exp_elt_opcode (pstate, TERNOP_SLICE);
1804  else
1805  error (_("Cannot slice a type"));
1806  }
1807 #line 1809 "ada-exp.c" /* yacc.c:1646 */
1808  break;
1809 
1810  case 15:
1811 #line 312 "ada-exp.y" /* yacc.c:1646 */
1812  { }
1813 #line 1815 "ada-exp.c" /* yacc.c:1646 */
1814  break;
1815 
1816  case 16:
1817 #line 324 "ada-exp.y" /* yacc.c:1646 */
1818  { if ((yyvsp[0].tval) != NULL)
1819  {
1820  write_exp_elt_opcode (pstate, OP_TYPE);
1821  write_exp_elt_type (pstate, (yyvsp[0].tval));
1822  write_exp_elt_opcode (pstate, OP_TYPE);
1823  }
1824  }
1825 #line 1827 "ada-exp.c" /* yacc.c:1646 */
1826  break;
1827 
1828  case 17:
1829 #line 334 "ada-exp.y" /* yacc.c:1646 */
1830  { write_dollar_variable (pstate, (yyvsp[0].sval)); }
1831 #line 1833 "ada-exp.c" /* yacc.c:1646 */
1832  break;
1833 
1834  case 20:
1835 #line 344 "ada-exp.y" /* yacc.c:1646 */
1836  { write_exp_elt_opcode (pstate, UNOP_NEG); }
1837 #line 1839 "ada-exp.c" /* yacc.c:1646 */
1838  break;
1839 
1840  case 21:
1841 #line 348 "ada-exp.y" /* yacc.c:1646 */
1842  { write_exp_elt_opcode (pstate, UNOP_PLUS); }
1843 #line 1845 "ada-exp.c" /* yacc.c:1646 */
1844  break;
1845 
1846  case 22:
1847 #line 352 "ada-exp.y" /* yacc.c:1646 */
1848  { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
1849 #line 1851 "ada-exp.c" /* yacc.c:1646 */
1850  break;
1851 
1852  case 23:
1853 #line 356 "ada-exp.y" /* yacc.c:1646 */
1854  { write_exp_elt_opcode (pstate, UNOP_ABS); }
1855 #line 1857 "ada-exp.c" /* yacc.c:1646 */
1856  break;
1857 
1858  case 24:
1859 #line 359 "ada-exp.y" /* yacc.c:1646 */
1860  { (yyval.lval) = 0; }
1861 #line 1863 "ada-exp.c" /* yacc.c:1646 */
1862  break;
1863 
1864  case 25:
1865 #line 363 "ada-exp.y" /* yacc.c:1646 */
1866  { (yyval.lval) = 1; }
1867 #line 1869 "ada-exp.c" /* yacc.c:1646 */
1868  break;
1869 
1870  case 26:
1871 #line 365 "ada-exp.y" /* yacc.c:1646 */
1872  { (yyval.lval) = 1; }
1873 #line 1875 "ada-exp.c" /* yacc.c:1646 */
1874  break;
1875 
1876  case 27:
1877 #line 367 "ada-exp.y" /* yacc.c:1646 */
1878  { (yyval.lval) = (yyvsp[-2].lval) + 1; }
1879 #line 1881 "ada-exp.c" /* yacc.c:1646 */
1880  break;
1881 
1882  case 28:
1883 #line 369 "ada-exp.y" /* yacc.c:1646 */
1884  { (yyval.lval) = (yyvsp[-4].lval) + 1; }
1885 #line 1887 "ada-exp.c" /* yacc.c:1646 */
1886  break;
1887 
1888  case 29:
1889 #line 374 "ada-exp.y" /* yacc.c:1646 */
1890  {
1891  if ((yyvsp[-2].tval) == NULL)
1892  error (_("Type required within braces in coercion"));
1893  write_exp_elt_opcode (pstate, UNOP_MEMVAL);
1894  write_exp_elt_type (pstate, (yyvsp[-2].tval));
1895  write_exp_elt_opcode (pstate, UNOP_MEMVAL);
1896  }
1897 #line 1899 "ada-exp.c" /* yacc.c:1646 */
1898  break;
1899 
1900  case 30:
1901 #line 386 "ada-exp.y" /* yacc.c:1646 */
1902  { write_exp_elt_opcode (pstate, BINOP_EXP); }
1903 #line 1905 "ada-exp.c" /* yacc.c:1646 */
1904  break;
1905 
1906  case 31:
1907 #line 390 "ada-exp.y" /* yacc.c:1646 */
1908  { write_exp_elt_opcode (pstate, BINOP_MUL); }
1909 #line 1911 "ada-exp.c" /* yacc.c:1646 */
1910  break;
1911 
1912  case 32:
1913 #line 394 "ada-exp.y" /* yacc.c:1646 */
1914  { write_exp_elt_opcode (pstate, BINOP_DIV); }
1915 #line 1917 "ada-exp.c" /* yacc.c:1646 */
1916  break;
1917 
1918  case 33:
1919 #line 398 "ada-exp.y" /* yacc.c:1646 */
1920  { write_exp_elt_opcode (pstate, BINOP_REM); }
1921 #line 1923 "ada-exp.c" /* yacc.c:1646 */
1922  break;
1923 
1924  case 34:
1925 #line 402 "ada-exp.y" /* yacc.c:1646 */
1926  { write_exp_elt_opcode (pstate, BINOP_MOD); }
1927 #line 1929 "ada-exp.c" /* yacc.c:1646 */
1928  break;
1929 
1930  case 35:
1931 #line 406 "ada-exp.y" /* yacc.c:1646 */
1932  { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
1933 #line 1935 "ada-exp.c" /* yacc.c:1646 */
1934  break;
1935 
1936  case 36:
1937 #line 410 "ada-exp.y" /* yacc.c:1646 */
1938  { write_exp_elt_opcode (pstate, BINOP_ADD); }
1939 #line 1941 "ada-exp.c" /* yacc.c:1646 */
1940  break;
1941 
1942  case 37:
1943 #line 414 "ada-exp.y" /* yacc.c:1646 */
1944  { write_exp_elt_opcode (pstate, BINOP_CONCAT); }
1945 #line 1947 "ada-exp.c" /* yacc.c:1646 */
1946  break;
1947 
1948  case 38:
1949 #line 418 "ada-exp.y" /* yacc.c:1646 */
1950  { write_exp_elt_opcode (pstate, BINOP_SUB); }
1951 #line 1953 "ada-exp.c" /* yacc.c:1646 */
1952  break;
1953 
1954  case 40:
1955 #line 425 "ada-exp.y" /* yacc.c:1646 */
1956  { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
1957 #line 1959 "ada-exp.c" /* yacc.c:1646 */
1958  break;
1959 
1960  case 41:
1961 #line 429 "ada-exp.y" /* yacc.c:1646 */
1962  { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
1963 #line 1965 "ada-exp.c" /* yacc.c:1646 */
1964  break;
1965 
1966  case 42:
1967 #line 433 "ada-exp.y" /* yacc.c:1646 */
1968  { write_exp_elt_opcode (pstate, BINOP_LEQ); }
1969 #line 1971 "ada-exp.c" /* yacc.c:1646 */
1970  break;
1971 
1972  case 43:
1973 #line 437 "ada-exp.y" /* yacc.c:1646 */
1974  { write_exp_elt_opcode (pstate, TERNOP_IN_RANGE); }
1975 #line 1977 "ada-exp.c" /* yacc.c:1646 */
1976  break;
1977 
1978  case 44:
1979 #line 439 "ada-exp.y" /* yacc.c:1646 */
1980  { write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
1981  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[0].lval));
1982  write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
1983  }
1984 #line 1986 "ada-exp.c" /* yacc.c:1646 */
1985  break;
1986 
1987  case 45:
1988 #line 444 "ada-exp.y" /* yacc.c:1646 */
1989  {
1990  if ((yyvsp[0].tval) == NULL)
1991  error (_("Right operand of 'in' must be type"));
1992  write_exp_elt_opcode (pstate, UNOP_IN_RANGE);
1993  write_exp_elt_type (pstate, (yyvsp[0].tval));
1994  write_exp_elt_opcode (pstate, UNOP_IN_RANGE);
1995  }
1996 #line 1998 "ada-exp.c" /* yacc.c:1646 */
1997  break;
1998 
1999  case 46:
2000 #line 452 "ada-exp.y" /* yacc.c:1646 */
2001  { write_exp_elt_opcode (pstate, TERNOP_IN_RANGE);
2002  write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT);
2003  }
2004 #line 2006 "ada-exp.c" /* yacc.c:1646 */
2005  break;
2006 
2007  case 47:
2008 #line 456 "ada-exp.y" /* yacc.c:1646 */
2009  { write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
2010  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[0].lval));
2011  write_exp_elt_opcode (pstate, BINOP_IN_BOUNDS);
2012  write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT);
2013  }
2014 #line 2016 "ada-exp.c" /* yacc.c:1646 */
2015  break;
2016 
2017  case 48:
2018 #line 462 "ada-exp.y" /* yacc.c:1646 */
2019  {
2020  if ((yyvsp[0].tval) == NULL)
2021  error (_("Right operand of 'in' must be type"));
2022  write_exp_elt_opcode (pstate, UNOP_IN_RANGE);
2023  write_exp_elt_type (pstate, (yyvsp[0].tval));
2024  write_exp_elt_opcode (pstate, UNOP_IN_RANGE);
2025  write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT);
2026  }
2027 #line 2029 "ada-exp.c" /* yacc.c:1646 */
2028  break;
2029 
2030  case 49:
2031 #line 473 "ada-exp.y" /* yacc.c:1646 */
2032  { write_exp_elt_opcode (pstate, BINOP_GEQ); }
2033 #line 2035 "ada-exp.c" /* yacc.c:1646 */
2034  break;
2035 
2036  case 50:
2037 #line 477 "ada-exp.y" /* yacc.c:1646 */
2038  { write_exp_elt_opcode (pstate, BINOP_LESS); }
2039 #line 2041 "ada-exp.c" /* yacc.c:1646 */
2040  break;
2041 
2042  case 51:
2043 #line 481 "ada-exp.y" /* yacc.c:1646 */
2044  { write_exp_elt_opcode (pstate, BINOP_GTR); }
2045 #line 2047 "ada-exp.c" /* yacc.c:1646 */
2046  break;
2047 
2048  case 58:
2049 #line 494 "ada-exp.y" /* yacc.c:1646 */
2050  { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
2051 #line 2053 "ada-exp.c" /* yacc.c:1646 */
2052  break;
2053 
2054  case 59:
2055 #line 496 "ada-exp.y" /* yacc.c:1646 */
2056  { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
2057 #line 2059 "ada-exp.c" /* yacc.c:1646 */
2058  break;
2059 
2060  case 60:
2061 #line 501 "ada-exp.y" /* yacc.c:1646 */
2062  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
2063 #line 2065 "ada-exp.c" /* yacc.c:1646 */
2064  break;
2065 
2066  case 61:
2067 #line 503 "ada-exp.y" /* yacc.c:1646 */
2068  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
2069 #line 2071 "ada-exp.c" /* yacc.c:1646 */
2070  break;
2071 
2072  case 62:
2073 #line 508 "ada-exp.y" /* yacc.c:1646 */
2074  { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
2075 #line 2077 "ada-exp.c" /* yacc.c:1646 */
2076  break;
2077 
2078  case 63:
2079 #line 510 "ada-exp.y" /* yacc.c:1646 */
2080  { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
2081 #line 2083 "ada-exp.c" /* yacc.c:1646 */
2082  break;
2083 
2084  case 64:
2085 #line 515 "ada-exp.y" /* yacc.c:1646 */
2086  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
2087 #line 2089 "ada-exp.c" /* yacc.c:1646 */
2088  break;
2089 
2090  case 65:
2091 #line 517 "ada-exp.y" /* yacc.c:1646 */
2092  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
2093 #line 2095 "ada-exp.c" /* yacc.c:1646 */
2094  break;
2095 
2096  case 66:
2097 #line 521 "ada-exp.y" /* yacc.c:1646 */
2098  { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
2099 #line 2101 "ada-exp.c" /* yacc.c:1646 */
2100  break;
2101 
2102  case 67:
2103 #line 523 "ada-exp.y" /* yacc.c:1646 */
2104  { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
2105 #line 2107 "ada-exp.c" /* yacc.c:1646 */
2106  break;
2107 
2108  case 68:
2109 #line 535 "ada-exp.y" /* yacc.c:1646 */
2110  { write_exp_elt_opcode (pstate, UNOP_ADDR); }
2111 #line 2113 "ada-exp.c" /* yacc.c:1646 */
2112  break;
2113 
2114  case 69:
2115 #line 537 "ada-exp.y" /* yacc.c:1646 */
2116  { write_exp_elt_opcode (pstate, UNOP_ADDR);
2117  write_exp_elt_opcode (pstate, UNOP_CAST);
2118  write_exp_elt_type (pstate,
2119  type_system_address (pstate));
2120  write_exp_elt_opcode (pstate, UNOP_CAST);
2121  }
2122 #line 2124 "ada-exp.c" /* yacc.c:1646 */
2123  break;
2124 
2125  case 70:
2126 #line 544 "ada-exp.y" /* yacc.c:1646 */
2127  { write_int (pstate, (yyvsp[0].lval), type_int (pstate));
2128  write_exp_elt_opcode (pstate, OP_ATR_FIRST); }
2129 #line 2131 "ada-exp.c" /* yacc.c:1646 */
2130  break;
2131 
2132  case 71:
2133 #line 547 "ada-exp.y" /* yacc.c:1646 */
2134  { write_int (pstate, (yyvsp[0].lval), type_int (pstate));
2135  write_exp_elt_opcode (pstate, OP_ATR_LAST); }
2136 #line 2138 "ada-exp.c" /* yacc.c:1646 */
2137  break;
2138 
2139  case 72:
2140 #line 550 "ada-exp.y" /* yacc.c:1646 */
2141  { write_int (pstate, (yyvsp[0].lval), type_int (pstate));
2142  write_exp_elt_opcode (pstate, OP_ATR_LENGTH); }
2143 #line 2145 "ada-exp.c" /* yacc.c:1646 */
2144  break;
2145 
2146  case 73:
2147 #line 553 "ada-exp.y" /* yacc.c:1646 */
2148  { write_exp_elt_opcode (pstate, OP_ATR_SIZE); }
2149 #line 2151 "ada-exp.c" /* yacc.c:1646 */
2150  break;
2151 
2152  case 74:
2153 #line 555 "ada-exp.y" /* yacc.c:1646 */
2154  { write_exp_elt_opcode (pstate, OP_ATR_TAG); }
2155 #line 2157 "ada-exp.c" /* yacc.c:1646 */
2156  break;
2157 
2158  case 75:
2159 #line 557 "ada-exp.y" /* yacc.c:1646 */
2160  { write_exp_elt_opcode (pstate, OP_ATR_MIN); }
2161 #line 2163 "ada-exp.c" /* yacc.c:1646 */
2162  break;
2163 
2164  case 76:
2165 #line 559 "ada-exp.y" /* yacc.c:1646 */
2166  { write_exp_elt_opcode (pstate, OP_ATR_MAX); }
2167 #line 2169 "ada-exp.c" /* yacc.c:1646 */
2168  break;
2169 
2170  case 77:
2171 #line 561 "ada-exp.y" /* yacc.c:1646 */
2172  { write_exp_elt_opcode (pstate, OP_ATR_POS); }
2173 #line 2175 "ada-exp.c" /* yacc.c:1646 */
2174  break;
2175 
2176  case 78:
2177 #line 563 "ada-exp.y" /* yacc.c:1646 */
2178  { write_exp_elt_opcode (pstate, OP_ATR_VAL); }
2179 #line 2181 "ada-exp.c" /* yacc.c:1646 */
2180  break;
2181 
2182  case 79:
2183 #line 565 "ada-exp.y" /* yacc.c:1646 */
2184  { write_exp_elt_opcode (pstate, OP_ATR_MODULUS); }
2185 #line 2187 "ada-exp.c" /* yacc.c:1646 */
2186  break;
2187 
2188  case 80:
2189 #line 569 "ada-exp.y" /* yacc.c:1646 */
2190  { (yyval.lval) = 1; }
2191 #line 2193 "ada-exp.c" /* yacc.c:1646 */
2192  break;
2193 
2194  case 81:
2195 #line 571 "ada-exp.y" /* yacc.c:1646 */
2196  { (yyval.lval) = (yyvsp[-1].typed_val).val; }
2197 #line 2199 "ada-exp.c" /* yacc.c:1646 */
2198  break;
2199 
2200  case 82:
2201 #line 576 "ada-exp.y" /* yacc.c:1646 */
2202  {
2203  if ((yyvsp[0].tval) == NULL)
2204  error (_("Prefix must be type"));
2205  write_exp_elt_opcode (pstate, OP_TYPE);
2206  write_exp_elt_type (pstate, (yyvsp[0].tval));
2207  write_exp_elt_opcode (pstate, OP_TYPE); }
2208 #line 2210 "ada-exp.c" /* yacc.c:1646 */
2209  break;
2210 
2211  case 84:
2212 #line 587 "ada-exp.y" /* yacc.c:1646 */
2213  { write_exp_elt_opcode (pstate, OP_TYPE);
2214  write_exp_elt_type (pstate,
2215  parse_type (pstate)->builtin_void);
2216  write_exp_elt_opcode (pstate, OP_TYPE); }
2217 #line 2219 "ada-exp.c" /* yacc.c:1646 */
2218  break;
2219 
2220  case 85:
2221 #line 595 "ada-exp.y" /* yacc.c:1646 */
2222  { write_int (pstate, (LONGEST) (yyvsp[0].typed_val).val, (yyvsp[0].typed_val).type); }
2223 #line 2225 "ada-exp.c" /* yacc.c:1646 */
2224  break;
2225 
2226  case 86:
2227 #line 599 "ada-exp.y" /* yacc.c:1646 */
2228  { write_int (pstate,
2229  convert_char_literal (type_qualifier, (yyvsp[0].typed_val).val),
2230  (type_qualifier == NULL)
2231  ? (yyvsp[0].typed_val).type : type_qualifier);
2232  }
2233 #line 2235 "ada-exp.c" /* yacc.c:1646 */
2234  break;
2235 
2236  case 87:
2237 #line 607 "ada-exp.y" /* yacc.c:1646 */
2238  { write_exp_elt_opcode (pstate, OP_DOUBLE);
2239  write_exp_elt_type (pstate, (yyvsp[0].typed_val_float).type);
2240  write_exp_elt_dblcst (pstate, (yyvsp[0].typed_val_float).dval);
2241  write_exp_elt_opcode (pstate, OP_DOUBLE);
2242  }
2243 #line 2245 "ada-exp.c" /* yacc.c:1646 */
2244  break;
2245 
2246  case 88:
2247 #line 615 "ada-exp.y" /* yacc.c:1646 */
2248  { write_int (pstate, 0, type_int (pstate)); }
2249 #line 2251 "ada-exp.c" /* yacc.c:1646 */
2250  break;
2251 
2252  case 89:
2253 #line 619 "ada-exp.y" /* yacc.c:1646 */
2254  {
2255  write_exp_op_with_string (pstate, OP_STRING, (yyvsp[0].sval));
2256  }
2257 #line 2259 "ada-exp.c" /* yacc.c:1646 */
2258  break;
2259 
2260  case 90:
2261 #line 625 "ada-exp.y" /* yacc.c:1646 */
2262  { write_int (pstate, 1, type_boolean (pstate)); }
2263 #line 2265 "ada-exp.c" /* yacc.c:1646 */
2264  break;
2265 
2266  case 91:
2267 #line 627 "ada-exp.y" /* yacc.c:1646 */
2268  { write_int (pstate, 0, type_boolean (pstate)); }
2269 #line 2271 "ada-exp.c" /* yacc.c:1646 */
2270  break;
2271 
2272  case 92:
2273 #line 631 "ada-exp.y" /* yacc.c:1646 */
2274  { error (_("NEW not implemented.")); }
2275 #line 2277 "ada-exp.c" /* yacc.c:1646 */
2276  break;
2277 
2278  case 93:
2279 #line 635 "ada-exp.y" /* yacc.c:1646 */
2280  { (yyval.tval) = write_var_or_type (pstate, NULL, (yyvsp[0].sval)); }
2281 #line 2283 "ada-exp.c" /* yacc.c:1646 */
2282  break;
2283 
2284  case 94:
2285 #line 637 "ada-exp.y" /* yacc.c:1646 */
2286  { (yyval.tval) = write_var_or_type (pstate, (yyvsp[-1].bval), (yyvsp[0].sval)); }
2287 #line 2289 "ada-exp.c" /* yacc.c:1646 */
2288  break;
2289 
2290  case 95:
2291 #line 639 "ada-exp.y" /* yacc.c:1646 */
2292  {
2293  (yyval.tval) = write_var_or_type (pstate, NULL, (yyvsp[-1].sval));
2294  if ((yyval.tval) == NULL)
2295  write_exp_elt_opcode (pstate, UNOP_ADDR);
2296  else
2297  (yyval.tval) = lookup_pointer_type ((yyval.tval));
2298  }
2299 #line 2301 "ada-exp.c" /* yacc.c:1646 */
2300  break;
2301 
2302  case 96:
2303 #line 647 "ada-exp.y" /* yacc.c:1646 */
2304  {
2305  (yyval.tval) = write_var_or_type (pstate, (yyvsp[-2].bval), (yyvsp[-1].sval));
2306  if ((yyval.tval) == NULL)
2307  write_exp_elt_opcode (pstate, UNOP_ADDR);
2308  else
2309  (yyval.tval) = lookup_pointer_type ((yyval.tval));
2310  }
2311 #line 2313 "ada-exp.c" /* yacc.c:1646 */
2312  break;
2313 
2314  case 97:
2315 #line 658 "ada-exp.y" /* yacc.c:1646 */
2316  { (yyval.bval) = block_lookup (NULL, (yyvsp[-1].sval).ptr); }
2317 #line 2319 "ada-exp.c" /* yacc.c:1646 */
2318  break;
2319 
2320  case 98:
2321 #line 660 "ada-exp.y" /* yacc.c:1646 */
2322  { (yyval.bval) = block_lookup ((yyvsp[-2].bval), (yyvsp[-1].sval).ptr); }
2323 #line 2325 "ada-exp.c" /* yacc.c:1646 */
2324  break;
2325 
2326  case 99:
2327 #line 665 "ada-exp.y" /* yacc.c:1646 */
2328  {
2329  write_exp_elt_opcode (pstate, OP_AGGREGATE);
2330  write_exp_elt_longcst (pstate, (yyvsp[-1].lval));
2331  write_exp_elt_opcode (pstate, OP_AGGREGATE);
2332  }
2333 #line 2335 "ada-exp.c" /* yacc.c:1646 */
2334  break;
2335 
2336  case 100:
2337 #line 673 "ada-exp.y" /* yacc.c:1646 */
2338  { (yyval.lval) = (yyvsp[0].lval); }
2339 #line 2341 "ada-exp.c" /* yacc.c:1646 */
2340  break;
2341 
2342  case 101:
2343 #line 675 "ada-exp.y" /* yacc.c:1646 */
2344  { write_exp_elt_opcode (pstate, OP_POSITIONAL);
2345  write_exp_elt_longcst (pstate, (yyvsp[-1].lval));
2346  write_exp_elt_opcode (pstate, OP_POSITIONAL);
2347  (yyval.lval) = (yyvsp[-1].lval) + 1;
2348  }
2349 #line 2351 "ada-exp.c" /* yacc.c:1646 */
2350  break;
2351 
2352  case 102:
2353 #line 681 "ada-exp.y" /* yacc.c:1646 */
2354  { (yyval.lval) = (yyvsp[-1].lval) + (yyvsp[0].lval); }
2355 #line 2357 "ada-exp.c" /* yacc.c:1646 */
2356  break;
2357 
2358  case 103:
2359 #line 686 "ada-exp.y" /* yacc.c:1646 */
2360  { write_exp_elt_opcode (pstate, OP_POSITIONAL);
2361  write_exp_elt_longcst (pstate, 0);
2362  write_exp_elt_opcode (pstate, OP_POSITIONAL);
2363  (yyval.lval) = 1;
2364  }
2365 #line 2367 "ada-exp.c" /* yacc.c:1646 */
2366  break;
2367 
2368  case 104:
2369 #line 692 "ada-exp.y" /* yacc.c:1646 */
2370  { write_exp_elt_opcode (pstate, OP_POSITIONAL);
2371  write_exp_elt_longcst (pstate, (yyvsp[-2].lval));
2372  write_exp_elt_opcode (pstate, OP_POSITIONAL);
2373  (yyval.lval) = (yyvsp[-2].lval) + 1;
2374  }
2375 #line 2377 "ada-exp.c" /* yacc.c:1646 */
2376  break;
2377 
2378  case 105:
2379 #line 700 "ada-exp.y" /* yacc.c:1646 */
2380  { (yyval.lval) = 1; }
2381 #line 2383 "ada-exp.c" /* yacc.c:1646 */
2382  break;
2383 
2384  case 106:
2385 #line 701 "ada-exp.y" /* yacc.c:1646 */
2386  { (yyval.lval) = 1; }
2387 #line 2389 "ada-exp.c" /* yacc.c:1646 */
2388  break;
2389 
2390  case 107:
2391 #line 703 "ada-exp.y" /* yacc.c:1646 */
2392  { (yyval.lval) = (yyvsp[0].lval) + 1; }
2393 #line 2395 "ada-exp.c" /* yacc.c:1646 */
2394  break;
2395 
2396  case 108:
2397 #line 707 "ada-exp.y" /* yacc.c:1646 */
2398  { write_exp_elt_opcode (pstate, OP_OTHERS); }
2399 #line 2401 "ada-exp.c" /* yacc.c:1646 */
2400  break;
2401 
2402  case 109:
2403 #line 712 "ada-exp.y" /* yacc.c:1646 */
2404  {
2405  write_exp_elt_opcode (pstate, OP_CHOICES);
2406  write_exp_elt_longcst (pstate, (yyvsp[0].lval));
2407  write_exp_elt_opcode (pstate, OP_CHOICES);
2408  }
2409 #line 2411 "ada-exp.c" /* yacc.c:1646 */
2410  break;
2411 
2412  case 110:
2413 #line 726 "ada-exp.y" /* yacc.c:1646 */
2414  { write_name_assoc (pstate, (yyvsp[-1].sval)); }
2415 #line 2417 "ada-exp.c" /* yacc.c:1646 */
2416  break;
2417 
2418  case 111:
2419 #line 727 "ada-exp.y" /* yacc.c:1646 */
2420  { (yyval.lval) = 1; }
2421 #line 2423 "ada-exp.c" /* yacc.c:1646 */
2422  break;
2423 
2424  case 112:
2425 #line 729 "ada-exp.y" /* yacc.c:1646 */
2426  { (yyval.lval) = 1; }
2427 #line 2429 "ada-exp.c" /* yacc.c:1646 */
2428  break;
2429 
2430  case 113:
2431 #line 731 "ada-exp.y" /* yacc.c:1646 */
2432  { write_exp_elt_opcode (pstate, OP_DISCRETE_RANGE);
2433  write_exp_op_with_string (pstate, OP_NAME,
2434  empty_stoken);
2435  }
2436 #line 2438 "ada-exp.c" /* yacc.c:1646 */
2437  break;
2438 
2439  case 114:
2440 #line 735 "ada-exp.y" /* yacc.c:1646 */
2441  { (yyval.lval) = 1; }
2442 #line 2444 "ada-exp.c" /* yacc.c:1646 */
2443  break;
2444 
2445  case 115:
2446 #line 737 "ada-exp.y" /* yacc.c:1646 */
2447  { write_name_assoc (pstate, (yyvsp[-1].sval)); }
2448 #line 2450 "ada-exp.c" /* yacc.c:1646 */
2449  break;
2450 
2451  case 116:
2452 #line 738 "ada-exp.y" /* yacc.c:1646 */
2453  { (yyval.lval) = (yyvsp[0].lval) + 1; }
2454 #line 2456 "ada-exp.c" /* yacc.c:1646 */
2455  break;
2456 
2457  case 117:
2458 #line 740 "ada-exp.y" /* yacc.c:1646 */
2459  { (yyval.lval) = (yyvsp[0].lval) + 1; }
2460 #line 2462 "ada-exp.c" /* yacc.c:1646 */
2461  break;
2462 
2463  case 118:
2464 #line 742 "ada-exp.y" /* yacc.c:1646 */
2465  { write_exp_elt_opcode (pstate, OP_DISCRETE_RANGE); }
2466 #line 2468 "ada-exp.c" /* yacc.c:1646 */
2467  break;
2468 
2469  case 119:
2470 #line 743 "ada-exp.y" /* yacc.c:1646 */
2471  { (yyval.lval) = (yyvsp[0].lval) + 1; }
2472 #line 2474 "ada-exp.c" /* yacc.c:1646 */
2473  break;
2474 
2475  case 120:
2476 #line 750 "ada-exp.y" /* yacc.c:1646 */
2477  { write_exp_elt_opcode (pstate, UNOP_IND); }
2478 #line 2480 "ada-exp.c" /* yacc.c:1646 */
2479  break;
2480 
2481  case 121:
2482 #line 752 "ada-exp.y" /* yacc.c:1646 */
2483  { write_exp_elt_opcode (pstate, UNOP_ADDR); }
2484 #line 2486 "ada-exp.c" /* yacc.c:1646 */
2485  break;
2486 
2487  case 122:
2488 #line 754 "ada-exp.y" /* yacc.c:1646 */
2489  { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
2490 #line 2492 "ada-exp.c" /* yacc.c:1646 */
2491  break;
2492 
2493 
2494 #line 2496 "ada-exp.c" /* yacc.c:1646 */
2495  default: break;
2496  }
2497  /* User semantic actions sometimes alter yychar, and that requires
2498  that yytoken be updated with the new translation. We take the
2499  approach of translating immediately before every use of yytoken.
2500  One alternative is translating here after every semantic action,
2501  but that translation would be missed if the semantic action invokes
2502  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2503  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2504  incorrect destructor might then be invoked immediately. In the
2505  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2506  to an incorrect destructor call or verbose syntax error message
2507  before the lookahead is translated. */
2508  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2509 
2510  YYPOPSTACK (yylen);
2511  yylen = 0;
2512  YY_STACK_PRINT (yyss, yyssp);
2513 
2514  *++yyvsp = yyval;
2515 
2516  /* Now 'shift' the result of the reduction. Determine what state
2517  that goes to, based on the state we popped back to and the rule
2518  number reduced by. */
2519 
2520  yyn = yyr1[yyn];
2521 
2522  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2523  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2524  yystate = yytable[yystate];
2525  else
2526  yystate = yydefgoto[yyn - YYNTOKENS];
2527 
2528  goto yynewstate;
2529 
2530 
2531 /*--------------------------------------.
2532 | yyerrlab -- here on detecting error. |
2533 `--------------------------------------*/
2534 yyerrlab:
2535  /* Make sure we have latest lookahead translation. See comments at
2536  user semantic actions for why this is necessary. */
2537  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2538 
2539  /* If not already recovering from an error, report this error. */
2540  if (!yyerrstatus)
2541  {
2542  ++yynerrs;
2543 #if ! YYERROR_VERBOSE
2544  yyerror (YY_("syntax error"));
2545 #else
2546 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2547  yyssp, yytoken)
2548  {
2549  char const *yymsgp = YY_("syntax error");
2550  int yysyntax_error_status;
2551  yysyntax_error_status = YYSYNTAX_ERROR;
2552  if (yysyntax_error_status == 0)
2553  yymsgp = yymsg;
2554  else if (yysyntax_error_status == 1)
2555  {
2556  if (yymsg != yymsgbuf)
2557  YYSTACK_FREE (yymsg);
2558  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2559  if (!yymsg)
2560  {
2561  yymsg = yymsgbuf;
2562  yymsg_alloc = sizeof yymsgbuf;
2563  yysyntax_error_status = 2;
2564  }
2565  else
2566  {
2567  yysyntax_error_status = YYSYNTAX_ERROR;
2568  yymsgp = yymsg;
2569  }
2570  }
2571  yyerror (yymsgp);
2572  if (yysyntax_error_status == 2)
2573  goto yyexhaustedlab;
2574  }
2575 # undef YYSYNTAX_ERROR
2576 #endif
2577  }
2578 
2579 
2580 
2581  if (yyerrstatus == 3)
2582  {
2583  /* If just tried and failed to reuse lookahead token after an
2584  error, discard it. */
2585 
2586  if (yychar <= YYEOF)
2587  {
2588  /* Return failure if at end of input. */
2589  if (yychar == YYEOF)
2590  YYABORT;
2591  }
2592  else
2593  {
2594  yydestruct ("Error: discarding",
2595  yytoken, &yylval);
2596  yychar = YYEMPTY;
2597  }
2598  }
2599 
2600  /* Else will try to reuse lookahead token after shifting the error
2601  token. */
2602  goto yyerrlab1;
2603 
2604 
2605 /*---------------------------------------------------.
2606 | yyerrorlab -- error raised explicitly by YYERROR. |
2607 `---------------------------------------------------*/
2608 yyerrorlab:
2609 
2610  /* Pacify compilers like GCC when the user code never invokes
2611  YYERROR and the label yyerrorlab therefore never appears in user
2612  code. */
2613  if (/*CONSTCOND*/ 0)
2614  goto yyerrorlab;
2615 
2616  /* Do not reclaim the symbols of the rule whose action triggered
2617  this YYERROR. */
2618  YYPOPSTACK (yylen);
2619  yylen = 0;
2620  YY_STACK_PRINT (yyss, yyssp);
2621  yystate = *yyssp;
2622  goto yyerrlab1;
2623 
2624 
2625 /*-------------------------------------------------------------.
2626 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2627 `-------------------------------------------------------------*/
2628 yyerrlab1:
2629  yyerrstatus = 3; /* Each real token shifted decrements this. */
2630 
2631  for (;;)
2632  {
2633  yyn = yypact[yystate];
2634  if (!yypact_value_is_default (yyn))
2635  {
2636  yyn += YYTERROR;
2637  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2638  {
2639  yyn = yytable[yyn];
2640  if (0 < yyn)
2641  break;
2642  }
2643  }
2644 
2645  /* Pop the current state because it cannot handle the error token. */
2646  if (yyssp == yyss)
2647  YYABORT;
2648 
2649 
2650  yydestruct ("Error: popping",
2651  yystos[yystate], yyvsp);
2652  YYPOPSTACK (1);
2653  yystate = *yyssp;
2654  YY_STACK_PRINT (yyss, yyssp);
2655  }
2656 
2658  *++yyvsp = yylval;
2660 
2661 
2662  /* Shift the error token. */
2663  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2664 
2665  yystate = yyn;
2666  goto yynewstate;
2667 
2668 
2669 /*-------------------------------------.
2670 | yyacceptlab -- YYACCEPT comes here. |
2671 `-------------------------------------*/
2672 yyacceptlab:
2673  yyresult = 0;
2674  goto yyreturn;
2675 
2676 /*-----------------------------------.
2677 | yyabortlab -- YYABORT comes here. |
2678 `-----------------------------------*/
2679 yyabortlab:
2680  yyresult = 1;
2681  goto yyreturn;
2682 
2683 #if !defined yyoverflow || YYERROR_VERBOSE
2684 /*-------------------------------------------------.
2685 | yyexhaustedlab -- memory exhaustion comes here. |
2686 `-------------------------------------------------*/
2687 yyexhaustedlab:
2688  yyerror (YY_("memory exhausted"));
2689  yyresult = 2;
2690  /* Fall through. */
2691 #endif
2692 
2693 yyreturn:
2694  if (yychar != YYEMPTY)
2695  {
2696  /* Make sure we have latest lookahead translation. See comments at
2697  user semantic actions for why this is necessary. */
2698  yytoken = YYTRANSLATE (yychar);
2699  yydestruct ("Cleanup: discarding lookahead",
2700  yytoken, &yylval);
2701  }
2702  /* Do not reclaim the symbols of the rule whose action triggered
2703  this YYABORT or YYACCEPT. */
2704  YYPOPSTACK (yylen);
2705  YY_STACK_PRINT (yyss, yyssp);
2706  while (yyssp != yyss)
2707  {
2708  yydestruct ("Cleanup: popping",
2709  yystos[*yyssp], yyvsp);
2710  YYPOPSTACK (1);
2711  }
2712 #ifndef yyoverflow
2713  if (yyss != yyssa)
2714  YYSTACK_FREE (yyss);
2715 #endif
2716 #if YYERROR_VERBOSE
2717  if (yymsg != yymsgbuf)
2718  YYSTACK_FREE (yymsg);
2719 #endif
2720  return yyresult;
2721 }
2722 #line 757 "ada-exp.y" /* yacc.c:1906 */
2723 
2724 
2725 /* yylex defined in ada-lex.c: Reads one token, getting characters */
2726 /* through lexptr. */
2727 
2728 /* Remap normal flex interface names (yylex) as well as gratuitiously */
2729 /* global symbol names, so we can have multiple flex-generated parsers */
2730 /* in gdb. */
2731 
2732 /* (See note above on previous definitions for YACC.) */
2733 
2734 #define yy_create_buffer ada_yy_create_buffer
2735 #define yy_delete_buffer ada_yy_delete_buffer
2736 #define yy_init_buffer ada_yy_init_buffer
2737 #define yy_load_buffer_state ada_yy_load_buffer_state
2738 #define yy_switch_to_buffer ada_yy_switch_to_buffer
2739 #define yyrestart ada_yyrestart
2740 #define yytext ada_yytext
2741 #define yywrap ada_yywrap
2742 
2743 static struct obstack temp_parse_space;
2744 
2745 /* The following kludge was found necessary to prevent conflicts between */
2746 /* defs.h and non-standard stdlib.h files. */
2747 #define qsort __qsort__dummy
2748 #include "ada-lex.c"
2749 
2750 int
2751 ada_parse (struct parser_state *par_state)
2752 {
2753  int result;
2754  struct cleanup *c = make_cleanup_clear_parser_state (&pstate);
2755 
2756  /* Setting up the parser state. */
2757  gdb_assert (par_state != NULL);
2758  pstate = par_state;
2759 
2760  lexer_init (yyin); /* (Re-)initialize lexer. */
2761  type_qualifier = NULL;
2762  obstack_free (&temp_parse_space, NULL);
2763  obstack_init (&temp_parse_space);
2764 
2765  result = yyparse ();
2766  do_cleanups (c);
2767  return result;
2768 }
2769 
2770 void
2771 yyerror (char *msg)
2772 {
2773  error (_("Error in expression, near `%s'."), lexptr);
2774 }
2775 
2776 /* Emit expression to access an instance of SYM, in block BLOCK (if
2777  * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */
2778 static void
2780  const struct block *orig_left_context,
2781  const struct block *block,
2782  struct symbol *sym)
2783 {
2784  if (orig_left_context == NULL && symbol_read_needs_frame (sym))
2785  {
2786  if (innermost_block == 0
2787  || contained_in (block, innermost_block))
2788  innermost_block = block;
2789  }
2790 
2791  write_exp_elt_opcode (par_state, OP_VAR_VALUE);
2792  write_exp_elt_block (par_state, block);
2793  write_exp_elt_sym (par_state, sym);
2794  write_exp_elt_opcode (par_state, OP_VAR_VALUE);
2795 }
2796 
2797 /* Write integer or boolean constant ARG of type TYPE. */
2798 
2799 static void
2800 write_int (struct parser_state *par_state, LONGEST arg, struct type *type)
2801 {
2802  write_exp_elt_opcode (par_state, OP_LONG);
2803  write_exp_elt_type (par_state, type);
2804  write_exp_elt_longcst (par_state, arg);
2805  write_exp_elt_opcode (par_state, OP_LONG);
2806 }
2807 
2808 /* Write an OPCODE, string, OPCODE sequence to the current expression. */
2809 static void
2811  enum exp_opcode opcode, struct stoken token)
2812 {
2813  write_exp_elt_opcode (par_state, opcode);
2814  write_exp_string (par_state, token);
2815  write_exp_elt_opcode (par_state, opcode);
2816 }
2817 
2818 /* Emit expression corresponding to the renamed object named
2819  * designated by RENAMED_ENTITY[0 .. RENAMED_ENTITY_LEN-1] in the
2820  * context of ORIG_LEFT_CONTEXT, to which is applied the operations
2821  * encoded by RENAMING_EXPR. MAX_DEPTH is the maximum number of
2822  * cascaded renamings to allow. If ORIG_LEFT_CONTEXT is null, it
2823  * defaults to the currently selected block. ORIG_SYMBOL is the
2824  * symbol that originally encoded the renaming. It is needed only
2825  * because its prefix also qualifies any index variables used to index
2826  * or slice an array. It should not be necessary once we go to the
2827  * new encoding entirely (FIXME pnh 7/20/2007). */
2828 
2829 static void
2831  const struct block *orig_left_context,
2832  const char *renamed_entity, int renamed_entity_len,
2833  const char *renaming_expr, int max_depth)
2834 {
2835  char *name;
2836  enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
2837  struct ada_symbol_info sym_info;
2838 
2839  if (max_depth <= 0)
2840  error (_("Could not find renamed symbol"));
2841 
2842  if (orig_left_context == NULL)
2843  orig_left_context = get_selected_block (NULL);
2844 
2845  name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len);
2846  ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
2847  if (sym_info.sym == NULL)
2848  error (_("Could not find renamed variable: %s"), ada_decode (name));
2849  else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF)
2850  /* We have a renaming of an old-style renaming symbol. Don't
2851  trust the block information. */
2852  sym_info.block = orig_left_context;
2853 
2854  {
2855  const char *inner_renamed_entity;
2856  int inner_renamed_entity_len;
2857  const char *inner_renaming_expr;
2858 
2859  switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity,
2860  &inner_renamed_entity_len,
2861  &inner_renaming_expr))
2862  {
2863  case ADA_NOT_RENAMING:
2864  write_var_from_sym (par_state, orig_left_context, sym_info.block,
2865  sym_info.sym);
2866  break;
2867  case ADA_OBJECT_RENAMING:
2868  write_object_renaming (par_state, sym_info.block,
2869  inner_renamed_entity, inner_renamed_entity_len,
2870  inner_renaming_expr, max_depth - 1);
2871  break;
2872  default:
2873  goto BadEncoding;
2874  }
2875  }
2876 
2877  slice_state = SIMPLE_INDEX;
2878  while (*renaming_expr == 'X')
2879  {
2880  renaming_expr += 1;
2881 
2882  switch (*renaming_expr) {
2883  case 'A':
2884  renaming_expr += 1;
2885  write_exp_elt_opcode (par_state, UNOP_IND);
2886  break;
2887  case 'L':
2888  slice_state = LOWER_BOUND;
2889  /* FALLTHROUGH */
2890  case 'S':
2891  renaming_expr += 1;
2892  if (isdigit (*renaming_expr))
2893  {
2894  char *next;
2895  long val = strtol (renaming_expr, &next, 10);
2896  if (next == renaming_expr)
2897  goto BadEncoding;
2898  renaming_expr = next;
2899  write_exp_elt_opcode (par_state, OP_LONG);
2900  write_exp_elt_type (par_state, type_int (par_state));
2901  write_exp_elt_longcst (par_state, (LONGEST) val);
2902  write_exp_elt_opcode (par_state, OP_LONG);
2903  }
2904  else
2905  {
2906  const char *end;
2907  char *index_name;
2908  struct ada_symbol_info index_sym_info;
2909 
2910  end = strchr (renaming_expr, 'X');
2911  if (end == NULL)
2912  end = renaming_expr + strlen (renaming_expr);
2913 
2914  index_name =
2915  obstack_copy0 (&temp_parse_space, renaming_expr,
2916  end - renaming_expr);
2917  renaming_expr = end;
2918 
2919  ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
2920  &index_sym_info);
2921  if (index_sym_info.sym == NULL)
2922  error (_("Could not find %s"), index_name);
2923  else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF)
2924  /* Index is an old-style renaming symbol. */
2925  index_sym_info.block = orig_left_context;
2926  write_var_from_sym (par_state, NULL, index_sym_info.block,
2927  index_sym_info.sym);
2928  }
2929  if (slice_state == SIMPLE_INDEX)
2930  {
2931  write_exp_elt_opcode (par_state, OP_FUNCALL);
2932  write_exp_elt_longcst (par_state, (LONGEST) 1);
2933  write_exp_elt_opcode (par_state, OP_FUNCALL);
2934  }
2935  else if (slice_state == LOWER_BOUND)
2936  slice_state = UPPER_BOUND;
2937  else if (slice_state == UPPER_BOUND)
2938  {
2939  write_exp_elt_opcode (par_state, TERNOP_SLICE);
2940  slice_state = SIMPLE_INDEX;
2941  }
2942  break;
2943 
2944  case 'R':
2945  {
2946  struct stoken field_name;
2947  const char *end;
2948  char *buf;
2949 
2950  renaming_expr += 1;
2951 
2952  if (slice_state != SIMPLE_INDEX)
2953  goto BadEncoding;
2954  end = strchr (renaming_expr, 'X');
2955  if (end == NULL)
2956  end = renaming_expr + strlen (renaming_expr);
2957  field_name.length = end - renaming_expr;
2958  buf = xmalloc (end - renaming_expr + 1);
2959  field_name.ptr = buf;
2960  strncpy (buf, renaming_expr, end - renaming_expr);
2961  buf[end - renaming_expr] = '\000';
2962  renaming_expr = end;
2963  write_exp_op_with_string (par_state, STRUCTOP_STRUCT, field_name);
2964  break;
2965  }
2966 
2967  default:
2968  goto BadEncoding;
2969  }
2970  }
2971  if (slice_state == SIMPLE_INDEX)
2972  return;
2973 
2974  BadEncoding:
2975  error (_("Internal error in encoding of renaming declaration"));
2976 }
2977 
2978 static const struct block*
2979 block_lookup (const struct block *context, const char *raw_name)
2980 {
2981  const char *name;
2982  struct ada_symbol_info *syms;
2983  int nsyms;
2984  struct symtab *symtab;
2985 
2986  if (raw_name[0] == '\'')
2987  {
2988  raw_name += 1;
2989  name = raw_name;
2990  }
2991  else
2992  name = ada_encode (raw_name);
2993 
2994  nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms);
2995  if (context == NULL
2996  && (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
2997  symtab = lookup_symtab (name);
2998  else
2999  symtab = NULL;
3000 
3001  if (symtab != NULL)
3003  else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
3004  {
3005  if (context == NULL)
3006  error (_("No file or function \"%s\"."), raw_name);
3007  else
3008  error (_("No function \"%s\" in specified context."), raw_name);
3009  }
3010  else
3011  {
3012  if (nsyms > 1)
3013  warning (_("Function name \"%s\" ambiguous here"), raw_name);
3014  return SYMBOL_BLOCK_VALUE (syms[0].sym);
3015  }
3016 }
3017 
3018 static struct symbol*
3020 {
3021  int i;
3022  int preferred_index;
3023  struct type *preferred_type;
3024 
3025  preferred_index = -1; preferred_type = NULL;
3026  for (i = 0; i < nsyms; i += 1)
3027  switch (SYMBOL_CLASS (syms[i].sym))
3028  {
3029  case LOC_TYPEDEF:
3030  if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type))
3031  {
3032  preferred_index = i;
3033  preferred_type = SYMBOL_TYPE (syms[i].sym);
3034  }
3035  break;
3036  case LOC_REGISTER:
3037  case LOC_ARG:
3038  case LOC_REF_ARG:
3039  case LOC_REGPARM_ADDR:
3040  case LOC_LOCAL:
3041  case LOC_COMPUTED:
3042  return NULL;
3043  default:
3044  break;
3045  }
3046  if (preferred_type == NULL)
3047  return NULL;
3048  return syms[preferred_index].sym;
3049 }
3050 
3051 static struct type*
3052 find_primitive_type (struct parser_state *par_state, char *name)
3053 {
3054  struct type *type;
3055  type = language_lookup_primitive_type (parse_language (par_state),
3056  parse_gdbarch (par_state),
3057  name);
3058  if (type == NULL && strcmp ("system__address", name) == 0)
3059  type = type_system_address (par_state);
3060 
3061  if (type != NULL)
3062  {
3063  /* Check to see if we have a regular definition of this
3064  type that just didn't happen to have been read yet. */
3065  struct symbol *sym;
3066  char *expanded_name =
3067  (char *) alloca (strlen (name) + sizeof ("standard__"));
3068  strcpy (expanded_name, "standard__");
3069  strcat (expanded_name, name);
3070  sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL);
3071  if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
3072  type = SYMBOL_TYPE (sym);
3073  }
3074 
3075  return type;
3076 }
3077 
3078 static int
3079 chop_selector (char *name, int end)
3080 {
3081  int i;
3082  for (i = end - 1; i > 0; i -= 1)
3083  if (name[i] == '.' || (name[i] == '_' && name[i+1] == '_'))
3084  return i;
3085  return -1;
3086 }
3087 
3088 /* If NAME is a string beginning with a separator (either '__', or
3089  '.'), chop this separator and return the result; else, return
3090  NAME. */
3091 
3092 static char *
3094 {
3095  if (*name == '.')
3096  return name + 1;
3097 
3098  if (name[0] == '_' && name[1] == '_')
3099  return name + 2;
3100 
3101  return name;
3102 }
3103 
3104 /* Given that SELS is a string of the form (<sep><identifier>)*, where
3105  <sep> is '__' or '.', write the indicated sequence of
3106  STRUCTOP_STRUCT expression operators. */
3107 static void
3108 write_selectors (struct parser_state *par_state, char *sels)
3109 {
3110  while (*sels != '\0')
3111  {
3112  struct stoken field_name;
3113  char *p = chop_separator (sels);
3114  sels = p;
3115  while (*sels != '\0' && *sels != '.'
3116  && (sels[0] != '_' || sels[1] != '_'))
3117  sels += 1;
3118  field_name.length = sels - p;
3119  field_name.ptr = p;
3120  write_exp_op_with_string (par_state, STRUCTOP_STRUCT, field_name);
3121  }
3122 }
3123 
3124 /* Write a variable access (OP_VAR_VALUE) to ambiguous encoded name
3125  NAME[0..LEN-1], in block context BLOCK, to be resolved later. Writes
3126  a temporary symbol that is valid until the next call to ada_parse.
3127  */
3128 static void
3130  const struct block *block, char *name, int len)
3131 {
3132  struct symbol *sym =
3133  obstack_alloc (&temp_parse_space, sizeof (struct symbol));
3134  memset (sym, 0, sizeof (struct symbol));
3135  SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
3136  SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len);
3137  SYMBOL_LANGUAGE (sym) = language_ada;
3138 
3139  write_exp_elt_opcode (par_state, OP_VAR_VALUE);
3140  write_exp_elt_block (par_state, block);
3141  write_exp_elt_sym (par_state, sym);
3142  write_exp_elt_opcode (par_state, OP_VAR_VALUE);
3143 }
3144 
3145 /* A convenient wrapper around ada_get_field_index that takes
3146  a non NUL-terminated FIELD_NAME0 and a FIELD_NAME_LEN instead
3147  of a NUL-terminated field name. */
3148 
3149 static int
3150 ada_nget_field_index (const struct type *type, const char *field_name0,
3151  int field_name_len, int maybe_missing)
3152 {
3153  char *field_name = alloca ((field_name_len + 1) * sizeof (char));
3154 
3155  strncpy (field_name, field_name0, field_name_len);
3156  field_name[field_name_len] = '\0';
3157  return ada_get_field_index (type, field_name, maybe_missing);
3158 }
3159 
3160 /* If encoded_field_name is the name of a field inside symbol SYM,
3161  then return the type of that field. Otherwise, return NULL.
3162 
3163  This function is actually recursive, so if ENCODED_FIELD_NAME
3164  doesn't match one of the fields of our symbol, then try to see
3165  if ENCODED_FIELD_NAME could not be a succession of field names
3166  (in other words, the user entered an expression of the form
3167  TYPE_NAME.FIELD1.FIELD2.FIELD3), in which case we evaluate
3168  each field name sequentially to obtain the desired field type.
3169  In case of failure, we return NULL. */
3170 
3171 static struct type *
3172 get_symbol_field_type (struct symbol *sym, char *encoded_field_name)
3173 {
3174  char *field_name = encoded_field_name;
3175  char *subfield_name;
3176  struct type *type = SYMBOL_TYPE (sym);
3177  int fieldno;
3178 
3179  if (type == NULL || field_name == NULL)
3180  return NULL;
3181  type = check_typedef (type);
3182 
3183  while (field_name[0] != '\0')
3184  {
3185  field_name = chop_separator (field_name);
3186 
3187  fieldno = ada_get_field_index (type, field_name, 1);
3188  if (fieldno >= 0)
3189  return TYPE_FIELD_TYPE (type, fieldno);
3190 
3191  subfield_name = field_name;
3192  while (*subfield_name != '\0' && *subfield_name != '.'
3193  && (subfield_name[0] != '_' || subfield_name[1] != '_'))
3194  subfield_name += 1;
3195 
3196  if (subfield_name[0] == '\0')
3197  return NULL;
3198 
3199  fieldno = ada_nget_field_index (type, field_name,
3200  subfield_name - field_name, 1);
3201  if (fieldno < 0)
3202  return NULL;
3203 
3204  type = TYPE_FIELD_TYPE (type, fieldno);
3205  field_name = subfield_name;
3206  }
3207 
3208  return NULL;
3209 }
3210 
3211 /* Look up NAME0 (an unencoded identifier or dotted name) in BLOCK (or
3212  expression_block_context if NULL). If it denotes a type, return
3213  that type. Otherwise, write expression code to evaluate it as an
3214  object and return NULL. In this second case, NAME0 will, in general,
3215  have the form <name>(.<selector_name>)*, where <name> is an object
3216  or renaming encoded in the debugging data. Calls error if no
3217  prefix <name> matches a name in the debugging data (i.e., matches
3218  either a complete name or, as a wild-card match, the final
3219  identifier). */
3220 
3221 static struct type*
3222 write_var_or_type (struct parser_state *par_state,
3223  const struct block *block, struct stoken name0)
3224 {
3225  int depth;
3226  char *encoded_name;
3227  int name_len;
3228 
3229  if (block == NULL)
3230  block = expression_context_block;
3231 
3232  encoded_name = ada_encode (name0.ptr);
3233  name_len = strlen (encoded_name);
3234  encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len);
3235  for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1)
3236  {
3237  int tail_index;
3238 
3239  tail_index = name_len;
3240  while (tail_index > 0)
3241  {
3242  int nsyms;
3243  struct ada_symbol_info *syms;
3244  struct symbol *type_sym;
3245  struct symbol *renaming_sym;
3246  const char* renaming;
3247  int renaming_len;
3248  const char* renaming_expr;
3249  int terminator = encoded_name[tail_index];
3250 
3251  encoded_name[tail_index] = '\0';
3252  nsyms = ada_lookup_symbol_list (encoded_name, block,
3253  VAR_DOMAIN, &syms);
3254  encoded_name[tail_index] = terminator;
3255 
3256  /* A single symbol may rename a package or object. */
3257 
3258  /* This should go away when we move entirely to new version.
3259  FIXME pnh 7/20/2007. */
3260  if (nsyms == 1)
3261  {
3262  struct symbol *ren_sym =
3263  ada_find_renaming_symbol (syms[0].sym, syms[0].block);
3264 
3265  if (ren_sym != NULL)
3266  syms[0].sym = ren_sym;
3267  }
3268 
3269  type_sym = select_possible_type_sym (syms, nsyms);
3270 
3271  if (type_sym != NULL)
3272  renaming_sym = type_sym;
3273  else if (nsyms == 1)
3274  renaming_sym = syms[0].sym;
3275  else
3276  renaming_sym = NULL;
3277 
3278  switch (ada_parse_renaming (renaming_sym, &renaming,
3279  &renaming_len, &renaming_expr))
3280  {
3281  case ADA_NOT_RENAMING:
3282  break;
3283  case ADA_PACKAGE_RENAMING:
3286  {
3287  char *new_name
3288  = obstack_alloc (&temp_parse_space,
3289  renaming_len + name_len - tail_index + 1);
3290  strncpy (new_name, renaming, renaming_len);
3291  strcpy (new_name + renaming_len, encoded_name + tail_index);
3292  encoded_name = new_name;
3293  name_len = renaming_len + name_len - tail_index;
3294  goto TryAfterRenaming;
3295  }
3296  case ADA_OBJECT_RENAMING:
3297  write_object_renaming (par_state, block, renaming, renaming_len,
3298  renaming_expr, MAX_RENAMING_CHAIN_LENGTH);
3299  write_selectors (par_state, encoded_name + tail_index);
3300  return NULL;
3301  default:
3302  internal_error (__FILE__, __LINE__,
3303  _("impossible value from ada_parse_renaming"));
3304  }
3305 
3306  if (type_sym != NULL)
3307  {
3308  struct type *field_type;
3309 
3310  if (tail_index == name_len)
3311  return SYMBOL_TYPE (type_sym);
3312 
3313  /* We have some extraneous characters after the type name.
3314  If this is an expression "TYPE_NAME.FIELD0.[...].FIELDN",
3315  then try to get the type of FIELDN. */
3316  field_type
3317  = get_symbol_field_type (type_sym, encoded_name + tail_index);
3318  if (field_type != NULL)
3319  return field_type;
3320  else
3321  error (_("Invalid attempt to select from type: \"%s\"."),
3322  name0.ptr);
3323  }
3324  else if (tail_index == name_len && nsyms == 0)
3325  {
3326  struct type *type = find_primitive_type (par_state,
3327  encoded_name);
3328 
3329  if (type != NULL)
3330  return type;
3331  }
3332 
3333  if (nsyms == 1)
3334  {
3335  write_var_from_sym (par_state, block, syms[0].block,
3336  syms[0].sym);
3337  write_selectors (par_state, encoded_name + tail_index);
3338  return NULL;
3339  }
3340  else if (nsyms == 0)
3341  {
3342  struct bound_minimal_symbol msym
3343  = ada_lookup_simple_minsym (encoded_name);
3344  if (msym.minsym != NULL)
3345  {
3346  write_exp_msymbol (par_state, msym);
3347  /* Maybe cause error here rather than later? FIXME? */
3348  write_selectors (par_state, encoded_name + tail_index);
3349  return NULL;
3350  }
3351 
3352  if (tail_index == name_len
3353  && strncmp (encoded_name, "standard__",
3354  sizeof ("standard__") - 1) == 0)
3355  error (_("No definition of \"%s\" found."), name0.ptr);
3356 
3357  tail_index = chop_selector (encoded_name, tail_index);
3358  }
3359  else
3360  {
3361  write_ambiguous_var (par_state, block, encoded_name,
3362  tail_index);
3363  write_selectors (par_state, encoded_name + tail_index);
3364  return NULL;
3365  }
3366  }
3367 
3368  if (!have_full_symbols () && !have_partial_symbols () && block == NULL)
3369  error (_("No symbol table is loaded. Use the \"file\" command."));
3370  if (block == expression_context_block)
3371  error (_("No definition of \"%s\" in current context."), name0.ptr);
3372  else
3373  error (_("No definition of \"%s\" in specified context."), name0.ptr);
3374 
3375  TryAfterRenaming: ;
3376  }
3377 
3378  error (_("Could not find renamed symbol \"%s\""), name0.ptr);
3379 
3380 }
3381 
3382 /* Write a left side of a component association (e.g., NAME in NAME =>
3383  exp). If NAME has the form of a selected component, write it as an
3384  ordinary expression. If it is a simple variable that unambiguously
3385  corresponds to exactly one symbol that does not denote a type or an
3386  object renaming, also write it normally as an OP_VAR_VALUE.
3387  Otherwise, write it as an OP_NAME.
3388 
3389  Unfortunately, we don't know at this point whether NAME is supposed
3390  to denote a record component name or the value of an array index.
3391  Therefore, it is not appropriate to disambiguate an ambiguous name
3392  as we normally would, nor to replace a renaming with its referent.
3393  As a result, in the (one hopes) rare case that one writes an
3394  aggregate such as (R => 42) where R renames an object or is an
3395  ambiguous name, one must write instead ((R) => 42). */
3396 
3397 static void
3398 write_name_assoc (struct parser_state *par_state, struct stoken name)
3399 {
3400  if (strchr (name.ptr, '.') == NULL)
3401  {
3402  struct ada_symbol_info *syms;
3404  VAR_DOMAIN, &syms);
3405  if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF)
3406  write_exp_op_with_string (par_state, OP_NAME, name);
3407  else
3408  write_var_from_sym (par_state, NULL, syms[0].block, syms[0].sym);
3409  }
3410  else
3411  if (write_var_or_type (par_state, NULL, name) != NULL)
3412  error (_("Invalid use of type."));
3413 }
3414 
3415 /* Convert the character literal whose ASCII value would be VAL to the
3416  appropriate value of type TYPE, if there is a translation.
3417  Otherwise return VAL. Hence, in an enumeration type ('A', 'B'),
3418  the literal 'A' (VAL == 65), returns 0. */
3419 
3420 static LONGEST
3422 {
3423  char name[7];
3424  int f;
3425 
3426  if (type == NULL)
3427  return val;
3428  type = check_typedef (type);
3429  if (TYPE_CODE (type) != TYPE_CODE_ENUM)
3430  return val;
3431 
3432  xsnprintf (name, sizeof (name), "QU%02x", (int) val);
3433  for (f = 0; f < TYPE_NFIELDS (type); f += 1)
3434  {
3435  if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0)
3436  return TYPE_FIELD_ENUMVAL (type, f);
3437  }
3438  return val;
3439 }
3440 
3441 static struct type *
3442 type_int (struct parser_state *par_state)
3443 {
3444  return parse_type (par_state)->builtin_int;
3445 }
3446 
3447 static struct type *
3448 type_long (struct parser_state *par_state)
3449 {
3450  return parse_type (par_state)->builtin_long;
3451 }
3452 
3453 static struct type *
3454 type_long_long (struct parser_state *par_state)
3455 {
3456  return parse_type (par_state)->builtin_long_long;
3457 }
3458 
3459 static struct type *
3460 type_float (struct parser_state *par_state)
3461 {
3462  return parse_type (par_state)->builtin_float;
3463 }
3464 
3465 static struct type *
3466 type_double (struct parser_state *par_state)
3467 {
3468  return parse_type (par_state)->builtin_double;
3469 }
3470 
3471 static struct type *
3472 type_long_double (struct parser_state *par_state)
3473 {
3474  return parse_type (par_state)->builtin_long_double;
3475 }
3476 
3477 static struct type *
3478 type_char (struct parser_state *par_state)
3479 {
3480  return language_string_char_type (parse_language (par_state),
3481  parse_gdbarch (par_state));
3482 }
3483 
3484 static struct type *
3485 type_boolean (struct parser_state *par_state)
3486 {
3487  return parse_type (par_state)->builtin_bool;
3488 }
3489 
3490 static struct type *
3492 {
3493  struct type *type
3495  parse_gdbarch (par_state),
3496  "system__address");
3497  return type != NULL ? type : parse_type (par_state)->builtin_data_ptr;
3498 }
3499 
3500 /* Provide a prototype to silence -Wmissing-prototypes. */
3502 
3503 void
3505 {
3506  obstack_init (&temp_parse_space);
3507 }
initialize_file_ftype _initialize_ada_exp
static const yytype_uint16 yyrline[]
Definition: ada-exp.c:667
#define yylval
Definition: ada-exp.c:99
struct internalvar * ivar
Definition: ada-exp.c:350
static char * chop_separator(char *name)
Definition: ada-exp.c:3093
static const yytype_int16 yypgoto[]
Definition: ada-exp.c:796
static void write_int(struct parser_state *, LONGEST, struct type *)
Definition: ada-exp.c:2800
#define YYEMPTY
Definition: ada-exp.c:1043
static struct type * write_var_or_type(struct parser_state *, const struct block *, struct stoken)
Definition: ada-exp.c:3222
int ada_get_field_index(const struct type *type, const char *field_name, int maybe_missing)
Definition: ada-lang.c:614
struct symbol * sym
Definition: ada-exp.c:140
#define yypact_value_is_default(Yystate)
Definition: ada-exp.c:726
void write_exp_elt_sym(struct parser_state *ps, struct symbol *expelt)
Definition: parse.c:246
#define parse_language(ps)
Definition: parser-defs.h:37
#define yyval
Definition: ada-exp.c:120
signed char yytype_int8
Definition: ada-exp.c:383
#define YYPOPSTACK(N)
#define parse_gdbarch(ps)
Definition: parser-defs.h:36
#define TRUEKEYWORD
Definition: ada-exp.c:288
#define TYPE_FIELD_NAME(thistype, n)
Definition: gdbtypes.h:1369
#define YYTRANSLATE(YYX)
Definition: ada-exp.c:625
#define UNARY
Definition: ada-exp.c:307
#define YYSTACK_ALLOC
Definition: ada-exp.c:517
#define MAX_RENAMING_CHAIN_LENGTH
Definition: ada-lang.h:65
char * ada_encode(const char *decoded)
Definition: ada-lang.c:979
const char * ptr
Definition: parser-defs.h:79
void xfree(void *)
Definition: common-utils.c:97
#define yyerror
Definition: ada-exp.c:98
void ada_lookup_encoded_symbol(const char *name, const struct block *block, domain_enum domain, struct ada_symbol_info *info)
Definition: ada-lang.c:5640
static void write_name_assoc(struct parser_state *, struct stoken)
Definition: ada-exp.c:3398
void warning(const char *fmt,...)
Definition: errors.c:26
static const yytype_int16 yydefgoto[]
Definition: ada-exp.c:805
#define YYSIZE_T
Definition: ada-exp.c:405
#define YYDPRINTF(Args)
Definition: ada-exp.c:1084
#define yystacksize
Definition: ada-exp.c:129
struct type * language_string_char_type(const struct language_defn *la, struct gdbarch *gdbarch)
Definition: language.c:956
#define YYSTACK_FREE
Definition: ada-exp.c:518
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: ada-exp.c:573
#define YYUSE(E)
Definition: ada-exp.c:454
struct symtab * lookup_symtab(const char *name)
Definition: symtab.c:489
#define FALSEKEYWORD
Definition: ada-exp.c:289
#define SYMBOL_CLASS(symbol)
Definition: symtab.h:793
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
#define TICK_MAX
Definition: ada-exp.c:320
const char * ada_decode(const char *encoded)
Definition: ada-lang.c:1145
#define yyvsp
Definition: ada-exp.c:131
const struct block * innermost_block
Definition: parse.c:69
int have_partial_symbols(void)
Definition: objfiles.c:965
static int ada_nget_field_index(const struct type *type, const char *field_name0, int field_name_len, int maybe_missing)
Definition: ada-exp.c:3150
Definition: c-exp.c:4859
#define BLOCKVECTOR_BLOCK(blocklist, n)
Definition: block.h:136
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: ada-exp.c:1450
#define NOTEQUAL
Definition: ada-exp.c:302
static struct type * type_float(struct parser_state *)
Definition: ada-exp.c:3460
#define _(String)
Definition: gdb_locale.h:40
static const char *const yytname[]
Definition: ada-exp.c:688
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ada-exp.c:1096
static const yytype_int16 yycheck[]
Definition: ada-exp.c:895
#define YYPRINT(FILE, TYPE, VALUE)
Definition: c-exp.c:388
#define YY_STACK_PRINT(Bottom, Top)
Definition: ada-exp.c:1158
#define TYPE_FIELD_ENUMVAL(thistype, n)
Definition: gdbtypes.h:1372
#define TYPE_FIELD_TYPE(thistype, n)
Definition: gdbtypes.h:1368
static struct symbol * select_possible_type_sym(struct ada_symbol_info *syms, int nsyms)
Definition: ada-exp.c:3019
static void write_exp_op_with_string(struct parser_state *, enum exp_opcode, struct stoken)
Definition: ada-exp.c:2810
#define IN
Definition: ada-exp.c:305
#define parse_type(ps)
Definition: ada-exp.c:81
#define YYABORT
Definition: ada-exp.c:1047
#define YYINITDEPTH
Definition: ada-exp.c:1208
const struct block * block
Definition: ada-lang.h:90
static struct type * get_symbol_field_type(struct symbol *sym, char *encoded_field_name)
Definition: ada-exp.c:3172
#define YYSTACK_ALLOC_MAXIMUM
Definition: ada-exp.c:520
#define yyss
Definition: ada-exp.c:126
DOUBLEST dval
Definition: ada-exp.c:344
#define NULL_PTR
Definition: ada-exp.c:285
const char *const name
Definition: aarch64-tdep.c:68
void write_exp_elt_block(struct parser_state *ps, const struct block *b)
Definition: parse.c:256
#define SYMTAB_BLOCKVECTOR(symtab)
Definition: symtab.h:968
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ada-exp.c:472
void write_exp_elt_longcst(struct parser_state *ps, LONGEST expelt)
Definition: parse.c:276
#define TICK_ADDRESS
Definition: ada-exp.c:316
#define STARSTAR
Definition: ada-exp.c:310
#define TICK_LENGTH
Definition: ada-exp.c:319
struct type * check_typedef(struct type *type)
Definition: gdbtypes.c:2217
#define YYMAXDEPTH
Definition: ada-exp.c:1219
#define FLOAT
Definition: ada-exp.c:287
int contained_in(const struct block *a, const struct block *b)
Definition: block.c:73
static struct type * find_primitive_type(struct parser_state *par_state, char *name)
Definition: ada-exp.c:3052
#define YY_REDUCE_PRINT(Rule)
Definition: ada-exp.c:1189
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: ada-exp.c:1113
#define TICK_POS
Definition: ada-exp.c:323
#define SYMBOL_DOMAIN(symbol)
Definition: symtab.h:790
int ada_prefer_type(struct type *type0, struct type *type1)
Definition: ada-lang.c:7759
void initialize_file_ftype(void)
Definition: defs.h:281
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: ada-exp.c:1132
static void write_var_from_sym(struct parser_state *par_state, const struct block *orig_left_context, const struct block *block, struct symbol *sym)
Definition: ada-exp.c:2779
#define YYFINAL
Definition: ada-exp.c:607
struct YYSTYPE::@2 typed_val_float
#define yynerrs
Definition: ada-exp.c:111
struct YYSTYPE::@1 typed_val
#define TICK_RANGE
Definition: ada-exp.c:324
void write_exp_elt_dblcst(struct parser_state *ps, DOUBLEST expelt)
Definition: parse.c:286
int symbol_read_needs_frame(struct symbol *sym)
Definition: findvar.c:343
#define SPECIAL_VARIABLE
Definition: ada-exp.c:295
static const yytype_uint8 yystos[]
Definition: ada-exp.c:976
double DOUBLEST
Definition: doublest.h:24
#define OTHERS
Definition: ada-exp.c:329
yytype_int16 yyss_alloc
Definition: ada-exp.c:553
#define YYNTOKENS
Definition: ada-exp.c:612
#define YYSTACK_BYTES(N)
Definition: ada-exp.c:562
Definition: gdbtypes.h:749
#define yyparse
Definition: ada-exp.c:96
static const yytype_uint8 yydefact[]
Definition: ada-exp.c:767
static struct obstack temp_parse_space
Definition: ada-exp.c:2743
#define NEW
Definition: ada-exp.c:328
LONGEST val
Definition: ada-exp.c:340
yytokentype
Definition: ada-exp.c:233
static const yytype_uint16 yytoknum[]
Definition: c-exp.c:759
FILE * yyin
Definition: ada-lex.c:347
void write_dollar_variable(struct parser_state *ps, struct stoken str)
Definition: parse.c:616
const struct block * block
Definition: ada-exp.c:142
#define yyvs
Definition: ada-exp.c:130
static const char * type
Definition: language.c:103
#define gdb_assert(expr)
Definition: gdb_assert.h:33
#define DOT_ALL
Definition: ada-exp.c:294
struct cleanup * make_cleanup_clear_parser_state(struct parser_state **p)
Definition: utils.c:462
#define SYMBOL_LINKAGE_NAME(symbol)
Definition: symtab.h:241
YYSTYPE yyvs_alloc
Definition: ada-exp.c:554
static struct type * type_boolean(struct parser_state *)
Definition: ada-exp.c:3485
unsigned short int yytype_uint16
Definition: ada-exp.c:389
#define YYEOF
Definition: ada-exp.c:1044
#define yylen
Definition: c-exp.c:128
#define OR
Definition: ada-exp.c:298
LONGEST lval
Definition: ada-exp.c:338
#define TICK_SIZE
Definition: ada-exp.c:325
#define yylloc
Definition: ada-exp.c:121
const struct block * bval
Definition: ada-exp.c:349
#define VAR
Definition: ada-exp.c:313
#define CHARLIT
Definition: ada-exp.c:286
Definition: symtab.h:925
void * xmalloc(YYSIZE_T)
int ada_lookup_symbol_list(const char *name0, const struct block *block0, domain_enum domain, struct ada_symbol_info **results)
Definition: ada-lang.c:5582
struct symbol * sym
Definition: ada-lang.h:87
void write_exp_msymbol(struct parser_state *ps, struct bound_minimal_symbol bound_msym)
Definition: parse.c:474
#define yyrule
Definition: ada-exp.c:125
enum ada_renaming_category ada_parse_renaming(struct symbol *sym, const char **renamed_entity, int *len, const char **renaming_expr)
Definition: ada-lang.c:4143
#define YYFPRINTF
Definition: ada-exp.c:137
Definition: block.h:60
#define yylex
Definition: ada-exp.c:97
#define REM
Definition: ada-exp.c:309
struct symbol * ada_lookup_symbol(const char *name, const struct block *block0, domain_enum domain, int *is_a_field_of_this)
Definition: ada-lang.c:5665
static struct type * type_long_double(struct parser_state *)
Definition: ada-exp.c:3472
void write_exp_elt_opcode(struct parser_state *ps, enum exp_opcode expelt)
Definition: parse.c:236
static void write_ambiguous_var(struct parser_state *, const struct block *, char *, int)
Definition: ada-exp.c:3129
static const char * lexptr
#define yydebug
Definition: ada-exp.c:101
static const yytype_uint8 yytranslate[]
Definition: ada-exp.c:630
#define COLONCOLON
Definition: ada-exp.c:290
#define XOR
Definition: ada-exp.c:299
#define ARROW
Definition: ada-exp.c:314
unsigned char yytype_uint8
Definition: ada-exp.c:377
#define yyr1
Definition: ada-exp.c:103
#define ASSIGN
Definition: ada-exp.c:296
#define TICK_TAG
Definition: ada-exp.c:326
static int chop_selector(char *name, int end)
Definition: ada-exp.c:3079
int xsnprintf(char *str, size_t size, const char *format,...)
Definition: common-utils.c:134
#define SYMBOL_BLOCK_VALUE(symbol)
Definition: symtab.h:185
static const yytype_int16 yytable[]
Definition: ada-exp.c:816
#define TYPE_CODE(thistype)
Definition: gdbtypes.h:1240
#define NAME
Definition: ada-exp.c:292
struct minimal_symbol * minsym
Definition: minsyms.h:32
int ada_parse(struct parser_state *par_state)
Definition: ada-exp.c:2751
#define YY_(Msgid)
Definition: ada-exp.c:421
#define THEN
Definition: ada-exp.c:300
#define TICK_VAL
Definition: ada-exp.c:327
#define ABS
Definition: ada-exp.c:311
struct type * tval
Definition: ada-exp.c:347
#define INT
Definition: ada-exp.c:284
#define TYPE_NFIELDS(thistype)
Definition: gdbtypes.h:1241
static struct type * type_int(struct parser_state *)
Definition: ada-exp.c:3442
#define SYMBOL_LANGUAGE(symbol)
Definition: symtab.h:187
exp_opcode
Definition: expression.h:43
struct minimal_symbol * msym
Definition: ada-exp.c:141
#define TICK_LAST
Definition: ada-exp.c:318
#define yypact
Definition: ada-exp.c:102
#define TICK_ACCESS
Definition: ada-exp.c:315
static struct type * type_long(struct parser_state *)
Definition: ada-exp.c:3448
int have_full_symbols(void)
Definition: objfiles.c:982
static struct type * type_qualifier
Definition: ada-exp.c:155
struct bound_minimal_symbol ada_lookup_simple_minsym(const char *name)
Definition: ada-lang.c:4761
#define YYACCEPT
Definition: ada-exp.c:1046
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
Definition: stack.c:2230
static struct type * type_system_address(struct parser_state *)
Definition: ada-exp.c:3491
const struct block * expression_context_block
Definition: parse.c:67
struct type * type
Definition: ada-exp.c:341
#define LEQ
Definition: ada-exp.c:303
static struct type * type_double(struct parser_state *)
Definition: ada-exp.c:3466
#define ELSE
Definition: ada-exp.c:301
static PyObject * field_name(struct type *type, int field)
Definition: py-type.c:278
#define YY_NULLPTR
Definition: ada-exp.c:209
#define DOTDOT
Definition: ada-exp.c:306
#define NOT
Definition: ada-exp.c:312
#define SYMBOL_TYPE(symbol)
Definition: symtab.h:799
Definition: symtab.h:703
#define TICK_MODULUS
Definition: ada-exp.c:322
struct symbol * ada_find_renaming_symbol(struct symbol *name_sym, const struct block *block)
Definition: ada-lang.c:7678
#define STRING
Definition: ada-exp.c:291
static struct type * type_char(struct parser_state *)
Definition: ada-exp.c:3478
#define yyr2
Definition: ada-exp.c:104
static const struct block * block_lookup(const struct block *, const char *)
Definition: ada-exp.c:2979
short int yytype_int16
Definition: ada-exp.c:395
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
Definition: language.c:1009
void * arg
Definition: cleanups.c:43
#define TICK_MIN
Definition: ada-exp.c:321
#define yychar
Definition: ada-exp.c:100
#define DOT_ID
Definition: ada-exp.c:293
struct stoken sval
Definition: ada-exp.c:348
static LONGEST convert_char_literal(struct type *, LONGEST)
Definition: ada-exp.c:3421
#define GEQ
Definition: ada-exp.c:304
static void write_selectors(struct parser_state *par_state, char *sels)
Definition: ada-exp.c:3108
#define YYTERROR
Definition: ada-exp.c:1071
void write_exp_string(struct parser_state *ps, struct stoken str)
Definition: parse.c:349
void write_exp_elt_type(struct parser_state *ps, struct type *expelt)
Definition: parse.c:308
void error(const char *fmt,...)
Definition: errors.c:38
#define yystate
Definition: ada-exp.c:116
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: ada-exp.c:1147
struct type * lookup_pointer_type(struct type *type)
Definition: gdbtypes.c:368
#define YYLAST
Definition: ada-exp.c:609
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ada-exp.c:471
long long LONGEST
Definition: common-types.h:52
void do_cleanups(struct cleanup *old_chain)
Definition: cleanups.c:175
static struct type * type_long_long(struct parser_state *)
Definition: ada-exp.c:3454
#define yyssp
Definition: ada-exp.c:128
int length
Definition: parser-defs.h:81
#define TICK_FIRST
Definition: ada-exp.c:317
#define yytable_value_is_error(Yytable_value)
Definition: ada-exp.c:731
static void write_object_renaming(struct parser_state *, const struct block *, const char *, int, const char *, int)
Definition: ada-exp.c:2830
#define MOD
Definition: ada-exp.c:308
const ULONGEST const LONGEST len
Definition: target.h:309
#define _AND_
Definition: ada-exp.c:297
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Definition: ada-exp.c:1170