GDB (xrefs)
/tmp/gdb-7.10/gdb/c-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 "c-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 "c-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 "charset.h"
79 #include "block.h"
80 #include "cp-support.h"
81 #include "dfp.h"
82 #include "macroscope.h"
83 #include "objc-lang.h"
84 #include "typeprint.h"
85 #include "cp-abi.h"
86 
87 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
88 
89 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
90  as well as gratuitiously global symbol names, so we can have multiple
91  yacc generated parsers in gdb. Note that these are only the variables
92  produced by yacc. If other parser generators (bison, byacc, etc) produce
93  additional global names that conflict at link time, then those parser
94  generators need to be fixed instead of adding those names to this list. */
95 
96 #define yymaxdepth c_maxdepth
97 #define yyparse c_parse_internal
98 #define yylex c_lex
99 #define yyerror c_error
100 #define yylval c_lval
101 #define yychar c_char
102 #define yydebug c_debug
103 #define yypact c_pact
104 #define yyr1 c_r1
105 #define yyr2 c_r2
106 #define yydef c_def
107 #define yychk c_chk
108 #define yypgo c_pgo
109 #define yyact c_act
110 #define yyexca c_exca
111 #define yyerrflag c_errflag
112 #define yynerrs c_nerrs
113 #define yyps c_ps
114 #define yypv c_pv
115 #define yys c_s
116 #define yy_yys c_yys
117 #define yystate c_state
118 #define yytmp c_tmp
119 #define yyv c_v
120 #define yy_yyv c_yyv
121 #define yyval c_val
122 #define yylloc c_lloc
123 #define yyreds c_reds /* With YYDEBUG defined */
124 #define yytoks c_toks /* With YYDEBUG defined */
125 #define yyname c_name /* With YYDEBUG defined */
126 #define yyrule c_rule /* With YYDEBUG defined */
127 #define yylhs c_yylhs
128 #define yylen c_yylen
129 #define yydefred c_yydefred
130 #define yydgoto c_yydgoto
131 #define yysindex c_yysindex
132 #define yyrindex c_yyrindex
133 #define yygindex c_yygindex
134 #define yytable c_yytable
135 #define yycheck c_yycheck
136 #define yyss c_yyss
137 #define yysslim c_yysslim
138 #define yyssp c_yyssp
139 #define yystacksize c_yystacksize
140 #define yyvs c_yyvs
141 #define yyvsp c_yyvsp
142 
143 #ifndef YYDEBUG
144 #define YYDEBUG 1 /* Default to yydebug support */
145 #endif
146 
147 #define YYFPRINTF parser_fprintf
148 
149 /* The state of the parser, used internally when we are parsing the
150  expression. */
151 
152 static struct parser_state *pstate = NULL;
153 
154 int yyparse (void);
155 
156 static int yylex (void);
157 
158 void yyerror (char *);
159 
160 static int type_aggregate_p (struct type *);
161 
162 
163 #line 164 "c-exp.c" /* yacc.c:339 */
164 
165 # ifndef YY_NULLPTR
166 # if defined __cplusplus && 201103L <= __cplusplus
167 # define YY_NULLPTR nullptr
168 # else
169 # define YY_NULLPTR 0
170 # endif
171 # endif
172 
173 /* Enabling verbose error messages. */
174 #ifdef YYERROR_VERBOSE
175 # undef YYERROR_VERBOSE
176 # define YYERROR_VERBOSE 1
177 #else
178 # define YYERROR_VERBOSE 0
179 #endif
180 
181 
182 /* Debug traces. */
183 #ifndef YYDEBUG
184 # define YYDEBUG 0
185 #endif
186 #if YYDEBUG
187 extern int yydebug;
188 #endif
189 
190 /* Token type. */
191 #ifndef YYTOKENTYPE
192 # define YYTOKENTYPE
194  {
195  INT = 258,
196  FLOAT = 259,
197  DECFLOAT = 260,
198  STRING = 261,
199  NSSTRING = 262,
200  SELECTOR = 263,
201  CHAR = 264,
202  NAME = 265,
204  COMPLETE = 267,
205  TYPENAME = 268,
206  CLASSNAME = 269,
207  OBJC_LBRAC = 270,
208  NAME_OR_INT = 271,
209  OPERATOR = 272,
210  STRUCT = 273,
211  CLASS = 274,
212  UNION = 275,
213  ENUM = 276,
214  SIZEOF = 277,
215  UNSIGNED = 278,
216  COLONCOLON = 279,
217  TEMPLATE = 280,
218  ERROR = 281,
219  NEW = 282,
220  DELETE = 283,
223  STATIC_CAST = 286,
224  CONST_CAST = 287,
225  ENTRY = 288,
226  TYPEOF = 289,
227  DECLTYPE = 290,
228  TYPEID = 291,
230  LONG = 293,
231  SHORT = 294,
232  INT_KEYWORD = 295,
236  VARIABLE = 299,
238  TRUEKEYWORD = 301,
240  ABOVE_COMMA = 303,
241  OROR = 304,
242  ANDAND = 305,
243  EQUAL = 306,
244  NOTEQUAL = 307,
245  LEQ = 308,
246  GEQ = 309,
247  LSH = 310,
248  RSH = 311,
249  UNARY = 312,
250  INCREMENT = 313,
251  DECREMENT = 314,
252  ARROW = 315,
253  ARROW_STAR = 316,
254  DOT_STAR = 317,
255  BLOCKNAME = 318,
256  FILENAME = 319,
257  DOTDOTDOT = 320
258  };
259 #endif
260 /* Tokens. */
261 #define INT 258
262 #define FLOAT 259
263 #define DECFLOAT 260
264 #define STRING 261
265 #define NSSTRING 262
266 #define SELECTOR 263
267 #define CHAR 264
268 #define NAME 265
269 #define UNKNOWN_CPP_NAME 266
270 #define COMPLETE 267
271 #define TYPENAME 268
272 #define CLASSNAME 269
273 #define OBJC_LBRAC 270
274 #define NAME_OR_INT 271
275 #define OPERATOR 272
276 #define STRUCT 273
277 #define CLASS 274
278 #define UNION 275
279 #define ENUM 276
280 #define SIZEOF 277
281 #define UNSIGNED 278
282 #define COLONCOLON 279
283 #define TEMPLATE 280
284 #define ERROR 281
285 #define NEW 282
286 #define DELETE 283
287 #define REINTERPRET_CAST 284
288 #define DYNAMIC_CAST 285
289 #define STATIC_CAST 286
290 #define CONST_CAST 287
291 #define ENTRY 288
292 #define TYPEOF 289
293 #define DECLTYPE 290
294 #define TYPEID 291
295 #define SIGNED_KEYWORD 292
296 #define LONG 293
297 #define SHORT 294
298 #define INT_KEYWORD 295
299 #define CONST_KEYWORD 296
300 #define VOLATILE_KEYWORD 297
301 #define DOUBLE_KEYWORD 298
302 #define VARIABLE 299
303 #define ASSIGN_MODIFY 300
304 #define TRUEKEYWORD 301
305 #define FALSEKEYWORD 302
306 #define ABOVE_COMMA 303
307 #define OROR 304
308 #define ANDAND 305
309 #define EQUAL 306
310 #define NOTEQUAL 307
311 #define LEQ 308
312 #define GEQ 309
313 #define LSH 310
314 #define RSH 311
315 #define UNARY 312
316 #define INCREMENT 313
317 #define DECREMENT 314
318 #define ARROW 315
319 #define ARROW_STAR 316
320 #define DOT_STAR 317
321 #define BLOCKNAME 318
322 #define FILENAME 319
323 #define DOTDOTDOT 320
324 
325 /* Value type. */
326 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
327 typedef union YYSTYPE YYSTYPE;
328 union YYSTYPE
329 {
330 #line 139 "c-exp.y" /* yacc.c:355 */
331 
332  LONGEST lval;
333  struct {
334  LONGEST val;
335  struct type *type;
336  } typed_val_int;
337  struct {
338  DOUBLEST dval;
339  struct type *type;
340  } typed_val_float;
341  struct {
343  struct type *type;
345  struct type *tval;
346  struct stoken sval;
348  struct ttype tsym;
349  struct symtoken ssym;
350  int voidval;
351  const struct block *bval;
353 
355  VEC (type_ptr) *tvec;
356 
357  struct type_stack *type_stack;
358 
359  struct objc_class_str theclass;
360 
361 
362 #line 363 "c-exp.c" /* yacc.c:355 */
363 };
364 # define YYSTYPE_IS_TRIVIAL 1
365 # define YYSTYPE_IS_DECLARED 1
366 #endif
367 
368 
369 extern YYSTYPE yylval;
370 
371 int yyparse (void);
372 
373 
374 
375 /* Copy the second part of user declarations. */
376 #line 170 "c-exp.y" /* yacc.c:358 */
377 
378 /* YYSTYPE gets defined by %union */
379 static int parse_number (struct parser_state *par_state,
380  const char *, int, int, YYSTYPE *);
381 static struct stoken operator_stoken (const char *);
382 static void check_parameter_typelist (VEC (type_ptr) *);
383 static void write_destructor_name (struct parser_state *par_state,
384  struct stoken);
385 
386 #ifdef YYBISON
387 static void c_print_token (FILE *file, int type, YYSTYPE value);
388 #define YYPRINT(FILE, TYPE, VALUE) c_print_token (FILE, TYPE, VALUE)
389 #endif
390 
391 #line 392 "c-exp.c" /* yacc.c:358 */
392 
393 #ifdef short
394 # undef short
395 #endif
396 
397 #ifdef YYTYPE_UINT8
398 typedef YYTYPE_UINT8 yytype_uint8;
399 #else
400 typedef unsigned char yytype_uint8;
401 #endif
402 
403 #ifdef YYTYPE_INT8
404 typedef YYTYPE_INT8 yytype_int8;
405 #else
406 typedef signed char yytype_int8;
407 #endif
408 
409 #ifdef YYTYPE_UINT16
410 typedef YYTYPE_UINT16 yytype_uint16;
411 #else
412 typedef unsigned short int yytype_uint16;
413 #endif
414 
415 #ifdef YYTYPE_INT16
416 typedef YYTYPE_INT16 yytype_int16;
417 #else
418 typedef short int yytype_int16;
419 #endif
420 
421 #ifndef YYSIZE_T
422 # ifdef __SIZE_TYPE__
423 # define YYSIZE_T __SIZE_TYPE__
424 # elif defined size_t
425 # define YYSIZE_T size_t
426 # elif ! defined YYSIZE_T
427 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
428 # define YYSIZE_T size_t
429 # else
430 # define YYSIZE_T unsigned int
431 # endif
432 #endif
433 
434 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
435 
436 #ifndef YY_
437 # if defined YYENABLE_NLS && YYENABLE_NLS
438 # if ENABLE_NLS
439 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
440 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
441 # endif
442 # endif
443 # ifndef YY_
444 # define YY_(Msgid) Msgid
445 # endif
446 #endif
447 
448 #ifndef YY_ATTRIBUTE
449 # if (defined __GNUC__ \
450  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
451  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
452 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
453 # else
454 # define YY_ATTRIBUTE(Spec) /* empty */
455 # endif
456 #endif
457 
458 #ifndef YY_ATTRIBUTE_PURE
459 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
460 #endif
461 
462 #ifndef YY_ATTRIBUTE_UNUSED
463 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
464 #endif
465 
466 #if !defined _Noreturn \
467  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
468 # if defined _MSC_VER && 1200 <= _MSC_VER
469 # define _Noreturn __declspec (noreturn)
470 # else
471 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
472 # endif
473 #endif
474 
475 /* Suppress unused-variable warnings by "using" E. */
476 #if ! defined lint || defined __GNUC__
477 # define YYUSE(E) ((void) (E))
478 #else
479 # define YYUSE(E) /* empty */
480 #endif
481 
482 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
483 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
484 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
485  _Pragma ("GCC diagnostic push") \
486  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
487  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
488 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
489  _Pragma ("GCC diagnostic pop")
490 #else
491 # define YY_INITIAL_VALUE(Value) Value
492 #endif
493 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
494 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
495 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
496 #endif
497 #ifndef YY_INITIAL_VALUE
498 # define YY_INITIAL_VALUE(Value) /* Nothing. */
499 #endif
500 
501 
502 #if ! defined yyoverflow || YYERROR_VERBOSE
503 
504 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
505 
506 # ifdef YYSTACK_USE_ALLOCA
507 # if YYSTACK_USE_ALLOCA
508 # ifdef __GNUC__
509 # define YYSTACK_ALLOC __builtin_alloca
510 # elif defined __BUILTIN_VA_ARG_INCR
511 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
512 # elif defined _AIX
513 # define YYSTACK_ALLOC __alloca
514 # elif defined _MSC_VER
515 # define alloca _alloca
516 # else
517 # define YYSTACK_ALLOC alloca
518 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
519 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
520  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
521 # ifndef EXIT_SUCCESS
522 # define EXIT_SUCCESS 0
523 # endif
524 # endif
525 # endif
526 # endif
527 # endif
528 
529 # ifdef YYSTACK_ALLOC
530  /* Pacify GCC's 'empty if-body' warning. */
531 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
532 # ifndef YYSTACK_ALLOC_MAXIMUM
533  /* The OS might guarantee only one guard page at the bottom of the stack,
534  and a page size can be as small as 4096 bytes. So we cannot safely
535  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
536  to allow for a few compiler-allocated temporary stack slots. */
537 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
538 # endif
539 # else
540 # define YYSTACK_ALLOC YYMALLOC
541 # define YYSTACK_FREE YYFREE
542 # ifndef YYSTACK_ALLOC_MAXIMUM
543 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
544 # endif
545 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
546  && ! ((defined YYMALLOC || defined xmalloc) \
547  && (defined YYFREE || defined xfree)))
548 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
549 # ifndef EXIT_SUCCESS
550 # define EXIT_SUCCESS 0
551 # endif
552 # endif
553 # ifndef YYMALLOC
554 # define YYMALLOC xmalloc
555 # if ! defined xmalloc && ! defined EXIT_SUCCESS
556 void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
557 # endif
558 # endif
559 # ifndef YYFREE
560 # define YYFREE xfree
561 # if ! defined xfree && ! defined EXIT_SUCCESS
562 void xfree (void *); /* INFRINGES ON USER NAME SPACE */
563 # endif
564 # endif
565 # endif
566 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
567 
568 
569 #if (! defined yyoverflow \
570  && (! defined __cplusplus \
571  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
572 
573 /* A type that is properly aligned for any stack member. */
574 union yyalloc
575 {
576  yytype_int16 yyss_alloc;
578 };
579 
580 /* The size of the maximum gap between one aligned stack and the next. */
581 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
582 
583 /* The size of an array large to enough to hold all stacks, each with
584  N elements. */
585 # define YYSTACK_BYTES(N) \
586  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
587  + YYSTACK_GAP_MAXIMUM)
588 
589 # define YYCOPY_NEEDED 1
590 
591 /* Relocate STACK from its old location to the new one. The
592  local variables YYSIZE and YYSTACKSIZE give the old and new number of
593  elements in the stack, and YYPTR gives the new location of the
594  stack. Advance YYPTR to a properly aligned location for the next
595  stack. */
596 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
597  do \
598  { \
599  YYSIZE_T yynewbytes; \
600  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
601  Stack = &yyptr->Stack_alloc; \
602  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
603  yyptr += yynewbytes / sizeof (*yyptr); \
604  } \
605  while (0)
606 
607 #endif
608 
609 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
610 /* Copy COUNT objects from SRC to DST. The source and destination do
611  not overlap. */
612 # ifndef YYCOPY
613 # if defined __GNUC__ && 1 < __GNUC__
614 # define YYCOPY(Dst, Src, Count) \
615  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
616 # else
617 # define YYCOPY(Dst, Src, Count) \
618  do \
619  { \
620  YYSIZE_T yyi; \
621  for (yyi = 0; yyi < (Count); yyi++) \
622  (Dst)[yyi] = (Src)[yyi]; \
623  } \
624  while (0)
625 # endif
626 # endif
627 #endif /* !YYCOPY_NEEDED */
628 
629 /* YYFINAL -- State number of the termination state. */
630 #define YYFINAL 167
631 /* YYLAST -- Last index in YYTABLE. */
632 #define YYLAST 1690
633 
634 /* YYNTOKENS -- Number of terminals. */
635 #define YYNTOKENS 90
636 /* YYNNTS -- Number of nonterminals. */
637 #define YYNNTS 46
638 /* YYNRULES -- Number of rules. */
639 #define YYNRULES 260
640 /* YYNSTATES -- Number of states. */
641 #define YYNSTATES 413
642 
643 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
644  by yylex, with out-of-bounds checking. */
645 #define YYUNDEFTOK 2
646 #define YYMAXUTOK 320
647 
648 #define YYTRANSLATE(YYX) \
649  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
650 
651 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
652  as returned by yylex, without out-of-bounds checking. */
653 static const yytype_uint8 yytranslate[] =
654 {
655  0, 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, 2, 2, 2, 2,
658  2, 2, 2, 84, 2, 2, 2, 70, 56, 2,
659  79, 83, 68, 66, 48, 67, 76, 69, 2, 2,
660  2, 2, 2, 2, 2, 2, 2, 2, 87, 2,
661  59, 50, 60, 51, 65, 2, 2, 2, 2, 2,
662  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
663  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
664  2, 78, 2, 86, 55, 2, 2, 2, 2, 2,
665  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
667  2, 2, 2, 88, 54, 89, 85, 2, 2, 2,
668  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
669  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
670  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
671  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
672  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
673  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
674  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
676  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
677  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
678  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
679  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
680  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
681  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
682  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
683  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
684  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
685  45, 46, 47, 49, 52, 53, 57, 58, 61, 62,
686  63, 64, 71, 72, 73, 74, 75, 77, 80, 81,
687  82
688 };
689 
690 #if YYDEBUG
691  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
692 static const yytype_uint16 yyrline[] =
693 {
694  0, 288, 288, 289, 292, 296, 300, 306, 313, 314,
695  319, 323, 327, 331, 335, 339, 343, 347, 351, 355,
696  359, 363, 367, 371, 377, 384, 394, 400, 407, 415,
697  419, 425, 432, 442, 448, 455, 463, 467, 471, 481,
698  480, 504, 503, 520, 519, 528, 530, 533, 534, 537,
699  539, 541, 548, 545, 557, 556, 582, 586, 589, 593,
700  597, 615, 618, 625, 629, 633, 639, 643, 647, 651,
701  655, 659, 663, 667, 671, 675, 679, 683, 687, 691,
702  695, 699, 703, 707, 711, 715, 719, 723, 730, 737,
703  746, 759, 766, 773, 776, 782, 789, 809, 814, 818,
704  822, 829, 846, 864, 897, 906, 914, 924, 932, 938,
705  948, 963, 985, 998, 1022, 1031, 1032, 1060, 1114, 1118,
706  1119, 1122, 1125, 1126, 1130, 1131, 1136, 1135, 1139, 1138,
707  1141, 1143, 1147, 1156, 1158, 1159, 1162, 1164, 1171, 1178,
708  1184, 1191, 1193, 1195, 1197, 1201, 1203, 1215, 1219, 1221,
709  1225, 1229, 1233, 1237, 1241, 1245, 1249, 1253, 1257, 1261,
710  1265, 1269, 1273, 1277, 1281, 1285, 1289, 1293, 1297, 1301,
711  1305, 1309, 1313, 1317, 1321, 1325, 1331, 1337, 1340, 1345,
712  1351, 1354, 1359, 1365, 1368, 1373, 1379, 1382, 1387, 1393,
713  1397, 1401, 1405, 1412, 1416, 1418, 1422, 1423, 1431, 1439,
714  1450, 1452, 1461, 1467, 1474, 1475, 1482, 1486, 1487, 1490,
715  1491, 1494, 1498, 1500, 1504, 1506, 1508, 1510, 1512, 1514,
716  1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534,
717  1536, 1538, 1540, 1542, 1582, 1584, 1586, 1588, 1590, 1592,
718  1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612,
719  1614, 1630, 1631, 1632, 1633, 1634, 1635, 1638, 1639, 1647,
720  1659
721 };
722 #endif
723 
724 #if YYDEBUG || YYERROR_VERBOSE || 0
725 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
726  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
727 static const char *const yytname[] =
728 {
729  "$end", "error", "$undefined", "INT", "FLOAT", "DECFLOAT", "STRING",
730  "NSSTRING", "SELECTOR", "CHAR", "NAME", "UNKNOWN_CPP_NAME", "COMPLETE",
731  "TYPENAME", "CLASSNAME", "OBJC_LBRAC", "NAME_OR_INT", "OPERATOR",
732  "STRUCT", "CLASS", "UNION", "ENUM", "SIZEOF", "UNSIGNED", "COLONCOLON",
733  "TEMPLATE", "ERROR", "NEW", "DELETE", "REINTERPRET_CAST", "DYNAMIC_CAST",
734  "STATIC_CAST", "CONST_CAST", "ENTRY", "TYPEOF", "DECLTYPE", "TYPEID",
735  "SIGNED_KEYWORD", "LONG", "SHORT", "INT_KEYWORD", "CONST_KEYWORD",
736  "VOLATILE_KEYWORD", "DOUBLE_KEYWORD", "VARIABLE", "ASSIGN_MODIFY",
737  "TRUEKEYWORD", "FALSEKEYWORD", "','", "ABOVE_COMMA", "'='", "'?'",
738  "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQUAL", "NOTEQUAL", "'<'", "'>'",
739  "LEQ", "GEQ", "LSH", "RSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'",
740  "UNARY", "INCREMENT", "DECREMENT", "ARROW", "ARROW_STAR", "'.'",
741  "DOT_STAR", "'['", "'('", "BLOCKNAME", "FILENAME", "DOTDOTDOT", "')'",
742  "'!'", "'~'", "']'", "':'", "'{'", "'}'", "$accept", "start", "type_exp",
743  "exp1", "exp", "$@1", "$@2", "$@3", "msglist", "msgarglist", "msgarg",
744  "$@4", "$@5", "lcurly", "arglist", "rcurly", "string_exp", "block",
745  "variable", "qualified_name", "space_identifier", "const_or_volatile",
746  "cv_with_space_id", "const_or_volatile_or_space_identifier_noopt",
747  "const_or_volatile_or_space_identifier", "ptr_operator", "$@6", "$@7",
748  "ptr_operator_ts", "abs_decl", "direct_abs_decl", "array_mod",
749  "func_mod", "type", "typebase", "type_name", "parameter_typelist",
750  "nonempty_typelist", "ptype", "conversion_type_id",
751  "conversion_declarator", "const_and_volatile", "const_or_volatile_noopt",
752  "oper", "name", "name_not_typename", YY_NULLPTR
753 };
754 #endif
755 
756 # ifdef YYPRINT
757 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
758  (internal) symbol number NUM (which must be that of a token). */
759 static const yytype_uint16 yytoknum[] =
760 {
761  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
762  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
763  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
764  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
765  295, 296, 297, 298, 299, 300, 301, 302, 44, 303,
766  61, 63, 304, 305, 124, 94, 38, 306, 307, 60,
767  62, 308, 309, 310, 311, 64, 43, 45, 42, 47,
768  37, 312, 313, 314, 315, 316, 46, 317, 91, 40,
769  318, 319, 320, 41, 33, 126, 93, 58, 123, 125
770 };
771 # endif
772 
773 #define YYPACT_NINF -217
774 
775 #define yypact_value_is_default(Yystate) \
776  (!!((Yystate) == (-217)))
777 
778 #define YYTABLE_NINF -121
779 
780 #define yytable_value_is_error(Yytable_value) \
781  0
782 
783  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
784  STATE-NUM. */
785 static const yytype_int16 yypact[] =
786 {
787  468, -217, -217, -217, -217, -217, -54, -217, -217, -36,
788  35, 227, -217, 800, 137, 347, 355, 363, 640, 185,
789  24, 112, 20, 36, 48, 51, -17, -8, 40, 226,
790  291, 57, -217, 26, 72, -217, -217, -217, -217, 726,
791  726, 726, 726, 726, 726, 468, 103, -217, 726, 726,
792  -217, 135, -217, 104, 1340, 382, 149, 134, -217, -217,
793  116, -217, 1647, -217, 74, 58, -217, 120, -217, 154,
794  112, -217, 53, 35, -217, 1340, -217, 111, 25, 30,
795  -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
796  -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
797  -217, -217, -217, -217, -217, 117, 107, -217, -217, 204,
798  -217, -217, -217, -217, -217, -217, -217, -217, 201, -217,
799  202, -217, 203, -217, 207, 35, 468, 702, -217, 11,
800  176, -217, -217, -217, -217, -217, 167, 1615, 1615, 1615,
801  1615, 554, 726, 468, 80, -217, -217, 187, 188, 279,
802  -217, -217, 208, 210, -217, -217, -217, 702, 702, 702,
803  702, 702, 702, 169, -22, 702, 702, -217, 726, 726,
804  726, 726, 726, 726, 726, 726, 726, 726, 726, 726,
805  726, 726, 726, 726, 726, 726, 726, 726, 726, 726,
806  726, 726, -217, -217, 71, 726, 265, 726, 726, 1604,
807  166, 1340, -29, -217, 112, 251, 152, 74, -217, 10,
808  194, -217, 12, 906, 199, 21, -217, 27, -217, -217,
809  -217, 196, 726, 112, 244, 37, 37, 37, -217, 184,
810  198, 200, 215, -217, -217, 34, -217, -217, -217, -217,
811  -217, 197, 245, -217, -217, 1647, 228, 229, 230, 249,
812  948, 221, 1004, 222, 1060, 270, -217, -217, -217, 273,
813  278, -217, -217, -217, 726, -217, 1340, -9, 1340, 1340,
814  836, 1396, 1425, 1452, 1481, 1508, 1537, 1537, 453, 453,
815  453, 453, 539, 539, 625, 903, 903, 702, 702, 702,
816  -217, 35, 112, -217, 308, 130, -217, 112, -217, 311,
817  130, 7, 726, -217, 241, 277, -217, 726, 726, -217,
818  303, -217, -217, -217, 246, -217, 199, 74, 247, -217,
819  -217, 252, 253, -217, 27, 746, -217, -217, -217, 8,
820  -217, 112, 726, 726, 254, 37, -217, 255, 257, 258,
821  -217, -217, -217, -217, -217, -217, -217, -217, 286, 259,
822  260, 268, 269, -217, -217, -217, -217, -217, -217, -217,
823  -217, 702, -217, 726, 337, -217, 339, -217, -217, 9,
824  152, 915, 702, 1340, -217, -217, -217, -217, -217, -217,
825  74, -217, -217, 1340, 1340, -217, -217, 255, 726, -217,
826  -217, -217, 726, 726, 726, 726, 1369, -217, -217, -217,
827  -217, -217, -217, -217, 1340, 1116, 1172, 1228, 1284, -217,
828  -217, -217, -217
829 };
830 
831  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
832  Performed when YYTABLE does not specify something else to do. Zero
833  means the default is an error. */
834 static const yytype_uint16 yydefact[] =
835 {
836  120, 88, 91, 92, 101, 104, 0, 89, 257, 260,
837  148, 0, 90, 120, 0, 0, 0, 0, 0, 190,
838  0, 0, 0, 0, 0, 0, 0, 0, 0, 192,
839  150, 151, 149, 212, 213, 175, 94, 105, 106, 0,
840  0, 0, 0, 0, 0, 120, 258, 108, 0, 0,
841  56, 0, 3, 2, 8, 57, 103, 0, 93, 115,
842  0, 122, 120, 4, 204, 147, 211, 123, 259, 117,
843  0, 54, 0, 39, 41, 43, 148, 0, 214, 215,
844  233, 244, 230, 241, 240, 227, 225, 226, 236, 237,
845  231, 232, 238, 239, 234, 235, 220, 221, 222, 223,
846  224, 242, 243, 246, 245, 0, 0, 229, 228, 207,
847  250, 251, 255, 178, 253, 254, 252, 256, 177, 181,
848  180, 184, 183, 187, 186, 0, 120, 22, 196, 198,
849  199, 197, 189, 260, 258, 116, 0, 120, 120, 120,
850  120, 120, 0, 120, 198, 199, 191, 158, 154, 159,
851  152, 176, 173, 171, 169, 209, 210, 11, 13, 12,
852  10, 16, 17, 0, 0, 14, 15, 1, 0, 0,
853  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
854  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
855  0, 0, 18, 19, 0, 0, 0, 0, 0, 52,
856  0, 58, 0, 102, 0, 0, 120, 194, 195, 0,
857  130, 128, 0, 120, 132, 134, 205, 135, 138, 140,
858  110, 0, 57, 0, 112, 0, 0, 0, 249, 0,
859  0, 0, 0, 248, 247, 207, 206, 179, 182, 185,
860  188, 0, 165, 156, 172, 120, 0, 0, 0, 0,
861  0, 0, 0, 0, 0, 163, 155, 157, 153, 167,
862  162, 160, 174, 170, 0, 65, 9, 0, 87, 86,
863  0, 84, 83, 82, 81, 80, 74, 75, 78, 79,
864  76, 77, 72, 73, 66, 70, 71, 67, 68, 69,
865  25, 253, 0, 28, 23, 29, 32, 0, 35, 30,
866  36, 0, 57, 202, 0, 200, 61, 0, 0, 62,
867  111, 118, 121, 119, 0, 142, 131, 125, 0, 141,
868  145, 0, 0, 126, 133, 120, 137, 139, 95, 0,
869  113, 0, 0, 0, 0, 46, 47, 45, 0, 0,
870  218, 216, 219, 217, 126, 208, 96, 166, 0, 0,
871  0, 0, 0, 5, 6, 7, 21, 20, 164, 168,
872  161, 64, 38, 0, 26, 24, 33, 31, 37, 0,
873  120, 120, 63, 59, 144, 124, 129, 143, 136, 146,
874  125, 55, 114, 51, 50, 40, 48, 0, 0, 42,
875  44, 193, 0, 0, 0, 0, 85, 27, 34, 53,
876  60, 201, 203, 127, 49, 0, 0, 0, 0, 97,
877  99, 98, 100
878 };
879 
880  /* YYPGOTO[NTERM-NUM]. */
881 static const yytype_int16 yypgoto[] =
882 {
883  -217, -217, 3, 14, -11, -217, -217, -217, -31, -217,
884  18, -217, -217, -217, -216, 153, -217, -217, -217, -122,
885  -217, -188, -217, -63, -26, -101, -217, -217, -217, 143,
886  146, -213, -212, -124, 39, 333, 170, -217, -217, -217,
887  159, -217, -182, -5, 6, 350
888 };
889 
890  /* YYDEFGOTO[NTERM-NUM]. */
891 static const yytype_int16 yydefgoto[] =
892 {
893  -1, 51, 163, 164, 54, 225, 226, 227, 334, 335,
894  336, 302, 222, 55, 202, 307, 56, 57, 58, 59,
895  206, 60, 61, 62, 376, 214, 380, 317, 215, 216,
896  217, 218, 219, 63, 64, 132, 322, 305, 65, 110,
897  236, 66, 67, 68, 337, 69
898 };
899 
900  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
901  positive, shift that token. If negative, reduce the rule whose
902  number is the opposite. If YYTABLE_NINF, syntax error. */
903 static const yytype_int16 yytable[] =
904 {
905  75, 208, 241, 52, 326, 327, 329, 127, 235, 117,
906  117, 117, 117, 314, 53, 318, 117, 251, 312, 308,
907  118, 120, 122, 124, 313, 70, 168, 136, 157, 158,
908  159, 160, 161, 162, 8, 133, 209, 165, 166, 168,
909  229, 13, 209, 71, 201, 231, 208, 111, 112, 242,
910  114, 243, 109, 115, 13, 168, 308, 308, 200, 72,
911  306, 265, 141, 111, 112, 117, 114, 117, 155, 115,
912  13, 142, 293, 209, 298, 303, 221, 362, 224, 137,
913  152, 111, 112, 290, 291, 332, 369, 115, 13, 303,
914  210, 381, 399, 368, 153, 138, 315, 154, 319, 212,
915  213, 207, 344, 230, 134, 212, 325, 139, 232, 316,
916  140, 326, 327, 156, 210, 33, 34, 116, 255, 143,
917  256, 348, 111, 112, 333, 114, 211, -107, 115, 13,
918  250, 252, 254, 116, 235, 167, 212, 213, 223, -120,
919  246, 247, 248, 249, 208, 169, 253, 111, 112, 113,
920  114, 116, 168, 115, 13, 203, 292, 266, 204, 268,
921  269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
922  279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
923  289, 205, 400, 267, 295, -119, 300, 220, 313, 117,
924  234, 117, 116, 33, 34, 338, 339, 228, 128, 117,
925  294, 303, 299, 233, 194, 195, 196, 197, 198, 199,
926  310, 201, 301, 237, 238, 239, 244, 116, 117, 240,
927  117, 117, 117, 129, 130, 131, 245, 257, 258, 330,
928  1, 2, 3, 4, 5, 6, 7, 8, 9, 128,
929  73, 74, 11, 12, 13, 33, 34, 402, 262, 18,
930  263, 20, 264, 361, 375, 306, 22, 23, 24, 25,
931  210, 311, 211, 28, 144, 145, 131, 323, 331, -120,
932  340, 36, 211, 37, 38, 111, 112, 296, 291, 328,
933  346, 115, 13, 39, 341, 347, 342, 117, 349, 350,
934  351, 201, 117, 40, 41, 42, 372, 373, 364, 43,
935  44, 343, 259, 366, 354, 356, 45, 46, 47, 352,
936  358, 48, 49, 359, 147, 50, 260, 375, 360, 261,
937  365, 383, 384, 367, 370, 371, 117, -109, 148, 149,
938  117, 150, 374, 377, 151, 378, 379, 382, 392, 393,
939  385, 387, 388, 389, 390, 116, 391, 394, 395, 397,
940  297, 398, 396, 386, 403, 309, 321, 111, 112, 119,
941  114, 324, 146, 115, 13, 111, 112, 121, 114, 304,
942  135, 115, 13, 111, 112, 123, 114, 404, 0, 115,
943  13, 405, 406, 407, 408, 1, 2, 3, 4, 5,
944  6, 7, 8, 9, 345, 10, 0, 11, 12, 13,
945  14, 15, 16, 17, 18, 19, 20, 21, 0, 0,
946  0, 22, 23, 24, 25, 0, 26, 27, 28, 29,
947  30, 31, 32, 33, 34, 35, 36, 116, 37, 38,
948  0, 0, 0, 0, 0, 116, 0, 0, 39, 0,
949  0, 0, 0, 116, 0, 0, 0, -120, 40, 41,
950  42, 0, 0, 0, 43, 44, 0, 0, 0, 0,
951  0, 45, 46, 47, 0, 0, 48, 49, 169, 0,
952  50, 1, 2, 3, 4, 5, 6, 7, 8, 9,
953  0, 10, 0, 11, 12, 13, 14, 15, 16, 17,
954  18, 19, 20, 21, 0, 0, 0, 22, 23, 24,
955  25, 0, 26, 27, 28, 29, 30, 31, 32, 33,
956  34, 35, 36, 0, 37, 38, 184, 185, 186, 187,
957  188, 189, 190, 191, 39, 192, 193, 194, 195, 196,
958  197, 198, 199, 0, 40, 41, 42, 0, 0, 0,
959  43, 44, 0, 0, 0, 0, 0, 45, 46, 47,
960  0, 0, 48, 49, 169, 0, 50, 1, 2, 3,
961  4, 5, 6, 7, 8, 9, 0, 10, 0, 11,
962  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
963  0, 0, 0, 22, 23, 24, 25, 0, 0, 0,
964  28, 29, 30, 31, 32, 33, 34, 35, 36, 0,
965  37, 38, 0, 0, 186, 187, 188, 189, 190, 191,
966  39, 192, 193, 194, 195, 196, 197, 198, 199, 0,
967  40, 41, 42, 0, 0, 0, 43, 44, 0, 0,
968  0, 0, 0, 45, 46, 47, 0, 0, 48, 49,
969  169, 0, 50, 1, 2, 3, 4, 5, 6, 7,
970  8, 9, 0, 125, 0, 11, 12, 13, 0, 0,
971  0, 0, 18, 0, 20, 0, 0, 0, 0, 22,
972  23, 24, 25, 0, 0, 0, 28, 0, 0, 0,
973  0, 0, 0, 0, 36, 0, 37, 38, 0, 0,
974  0, 187, 188, 189, 190, 191, 39, 192, 193, 194,
975  195, 196, 197, 198, 199, 0, 40, 41, 42, 0,
976  0, 0, 43, 44, 0, 0, 0, 169, 0, 126,
977  46, 47, 0, 0, 48, 49, 0, 0, 50, 1,
978  2, 3, 4, 5, 6, 7, 8, 9, 0, 125,
979  0, 11, 12, 13, 0, 0, 0, 0, 18, 0,
980  20, 0, 0, 0, 0, 22, 23, 24, 25, 76,
981  0, 0, 28, 0, 14, 15, 16, 17, 0, 19,
982  36, 21, 37, 38, 192, 193, 194, 195, 196, 197,
983  198, 199, 39, 29, 30, 31, 32, 33, 34, 35,
984  0, 0, 40, 41, 42, 0, 0, 0, 43, 44,
985  0, 0, 0, 0, 0, 45, 46, 47, 0, 0,
986  48, 49, 0, 76, 50, 77, 0, 0, 14, 15,
987  16, 17, 0, 19, 0, 21, 0, 78, 79, 320,
988  0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
989  32, 33, 34, 35, 0, 80, 0, 0, 81, 0,
990  82, 169, 83, 84, 85, 86, 87, 88, 89, 90,
991  91, 92, 93, 94, 95, 0, 96, 97, 98, 99,
992  100, 0, 101, 102, 103, 104, 0, 0, 105, 106,
993  0, 170, 0, 0, 107, 108, 171, 172, 173, 174,
994  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
995  185, 186, 187, 188, 189, 190, 191, 0, 192, 193,
996  194, 195, 196, 197, 198, 199, 0, 0, 169, 76,
997  0, 209, 0, 363, 14, 15, 16, 17, 76, 19,
998  0, 21, 0, 14, 15, 16, 17, 0, 19, 0,
999  21, 0, 0, 29, 30, 31, 32, 33, 34, 35,
1000  0, 0, 29, 30, 31, 32, 33, 34, 35, 0,
1001  0, 0, 210, 169, 0, 0, 0, 0, 0, 0,
1002  0, 189, 190, 191, 211, 192, 193, 194, 195, 196,
1003  197, 198, 199, 0, 212, 213, 0, 0, 0, 320,
1004  0, 0, 0, 170, 0, 0, 0, 401, 171, 172,
1005  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
1006  183, 184, 185, 186, 187, 188, 189, 190, 191, 169,
1007  192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
1008  0, 353, 0, 0, 0, 0, 0, 0, 0, 0,
1009  0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
1010  0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
1011  177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
1012  187, 188, 189, 190, 191, 169, 192, 193, 194, 195,
1013  196, 197, 198, 199, 0, 0, 0, 355, 0, 0,
1014  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1015  0, 0, 0, 0, 0, 170, 0, 0, 0, 0,
1016  171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
1017  181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
1018  191, 169, 192, 193, 194, 195, 196, 197, 198, 199,
1019  0, 0, 0, 357, 0, 0, 0, 0, 0, 0,
1020  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1021  0, 170, 0, 0, 0, 0, 171, 172, 173, 174,
1022  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1023  185, 186, 187, 188, 189, 190, 191, 169, 192, 193,
1024  194, 195, 196, 197, 198, 199, 0, 0, 0, 409,
1025  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1026  0, 0, 0, 0, 0, 0, 0, 170, 0, 0,
1027  0, 0, 171, 172, 173, 174, 175, 176, 177, 178,
1028  179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
1029  189, 190, 191, 169, 192, 193, 194, 195, 196, 197,
1030  198, 199, 0, 0, 0, 410, 0, 0, 0, 0,
1031  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1032  0, 0, 0, 170, 0, 0, 0, 0, 171, 172,
1033  173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
1034  183, 184, 185, 186, 187, 188, 189, 190, 191, 169,
1035  192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
1036  0, 411, 0, 0, 0, 0, 0, 0, 0, 0,
1037  0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
1038  0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
1039  177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
1040  187, 188, 189, 190, 191, 169, 192, 193, 194, 195,
1041  196, 197, 198, 199, 0, 0, 0, 412, 0, 0,
1042  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1043  0, 0, 0, 0, 169, 170, 0, 0, 0, 0,
1044  171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
1045  181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
1046  191, 169, 192, 193, 194, 195, 196, 197, 198, 199,
1047  172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
1048  182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1049  169, 192, 193, 194, 195, 196, 197, 198, 199, 174,
1050  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1051  185, 186, 187, 188, 189, 190, 191, 169, 192, 193,
1052  194, 195, 196, 197, 198, 199, 0, 0, 0, 175,
1053  176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
1054  186, 187, 188, 189, 190, 191, 169, 192, 193, 194,
1055  195, 196, 197, 198, 199, 0, 0, 176, 177, 178,
1056  179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
1057  189, 190, 191, 169, 192, 193, 194, 195, 196, 197,
1058  198, 199, 0, 0, 0, 0, 0, 177, 178, 179,
1059  180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
1060  190, 191, 169, 192, 193, 194, 195, 196, 197, 198,
1061  199, 0, 0, 0, 0, 178, 179, 180, 181, 182,
1062  183, 184, 185, 186, 187, 188, 189, 190, 191, 0,
1063  192, 193, 194, 195, 196, 197, 198, 199, 0, 0,
1064  0, 0, 0, 0, 0, 0, 180, 181, 182, 183,
1065  184, 185, 186, 187, 188, 189, 190, 191, 0, 192,
1066  193, 194, 195, 196, 197, 198, 199, 76, 0, 0,
1067  0, 0, 14, 15, 16, 17, 0, 19, 76, 21,
1068  0, 0, 0, 14, 15, 16, 17, 0, 19, 0,
1069  21, 29, 30, 31, 32, 33, 34, 35, 0, 26,
1070  27, 0, 29, 30, 31, 32, 33, 34, 35, 0,
1071  76, 0, 0, 0, 0, 14, 15, 16, 17, -120,
1072  19, 0, 21, 0, 0, 0, 0, 0, 0, 0,
1073  0, 0, 0, 0, 29, 30, 31, 32, 33, 34,
1074  35
1075 };
1076 
1077 static const yytype_int16 yycheck[] =
1078 {
1079  11, 64, 126, 0, 217, 217, 222, 18, 109, 14,
1080  15, 16, 17, 3, 0, 3, 21, 141, 206, 48,
1081  14, 15, 16, 17, 206, 79, 48, 21, 39, 40,
1082  41, 42, 43, 44, 10, 11, 15, 48, 49, 48,
1083  15, 17, 15, 79, 55, 15, 109, 10, 11, 38,
1084  13, 40, 13, 16, 17, 48, 48, 48, 55, 24,
1085  89, 83, 79, 10, 11, 70, 13, 72, 42, 16,
1086  17, 79, 194, 15, 196, 199, 70, 86, 72, 59,
1087  23, 10, 11, 12, 13, 48, 302, 16, 17, 213,
1088  56, 83, 83, 86, 37, 59, 86, 40, 86, 78,
1089  79, 62, 68, 78, 80, 78, 79, 59, 78, 210,
1090  59, 324, 324, 41, 56, 41, 42, 80, 38, 79,
1091  40, 245, 10, 11, 87, 13, 68, 24, 16, 17,
1092  141, 142, 143, 80, 235, 0, 78, 79, 85, 65,
1093  137, 138, 139, 140, 207, 15, 143, 10, 11, 12,
1094  13, 80, 48, 16, 17, 6, 85, 168, 24, 170,
1095  171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
1096  181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
1097  191, 65, 370, 169, 195, 65, 197, 33, 370, 194,
1098  83, 196, 80, 41, 42, 226, 227, 86, 13, 204,
1099  194, 325, 196, 86, 74, 75, 76, 77, 78, 79,
1100  204, 222, 198, 12, 12, 12, 40, 80, 223, 12,
1101  225, 226, 227, 38, 39, 40, 59, 40, 40, 223,
1102  3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
1103  13, 14, 15, 16, 17, 41, 42, 371, 40, 22,
1104  40, 24, 83, 264, 317, 89, 29, 30, 31, 32,
1105  56, 10, 68, 36, 38, 39, 40, 68, 24, 65,
1106  86, 44, 68, 46, 47, 10, 11, 12, 13, 83,
1107  83, 16, 17, 56, 86, 40, 86, 292, 60, 60,
1108  60, 302, 297, 66, 67, 68, 307, 308, 292, 72,
1109  73, 86, 23, 297, 83, 83, 79, 80, 81, 60,
1110  40, 84, 85, 40, 23, 88, 37, 380, 40, 40,
1111  12, 332, 333, 12, 83, 48, 331, 24, 37, 38,
1112  335, 40, 86, 86, 43, 83, 83, 331, 79, 79,
1113  86, 335, 87, 86, 86, 80, 60, 79, 79, 12,
1114  85, 12, 363, 335, 380, 202, 213, 10, 11, 12,
1115  13, 215, 29, 16, 17, 10, 11, 12, 13, 199,
1116  20, 16, 17, 10, 11, 12, 13, 388, -1, 16,
1117  17, 392, 393, 394, 395, 3, 4, 5, 6, 7,
1118  8, 9, 10, 11, 235, 13, -1, 15, 16, 17,
1119  18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
1120  -1, 29, 30, 31, 32, -1, 34, 35, 36, 37,
1121  38, 39, 40, 41, 42, 43, 44, 80, 46, 47,
1122  -1, -1, -1, -1, -1, 80, -1, -1, 56, -1,
1123  -1, -1, -1, 80, -1, -1, -1, 65, 66, 67,
1124  68, -1, -1, -1, 72, 73, -1, -1, -1, -1,
1125  -1, 79, 80, 81, -1, -1, 84, 85, 15, -1,
1126  88, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1127  -1, 13, -1, 15, 16, 17, 18, 19, 20, 21,
1128  22, 23, 24, 25, -1, -1, -1, 29, 30, 31,
1129  32, -1, 34, 35, 36, 37, 38, 39, 40, 41,
1130  42, 43, 44, -1, 46, 47, 63, 64, 65, 66,
1131  67, 68, 69, 70, 56, 72, 73, 74, 75, 76,
1132  77, 78, 79, -1, 66, 67, 68, -1, -1, -1,
1133  72, 73, -1, -1, -1, -1, -1, 79, 80, 81,
1134  -1, -1, 84, 85, 15, -1, 88, 3, 4, 5,
1135  6, 7, 8, 9, 10, 11, -1, 13, -1, 15,
1136  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1137  -1, -1, -1, 29, 30, 31, 32, -1, -1, -1,
1138  36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
1139  46, 47, -1, -1, 65, 66, 67, 68, 69, 70,
1140  56, 72, 73, 74, 75, 76, 77, 78, 79, -1,
1141  66, 67, 68, -1, -1, -1, 72, 73, -1, -1,
1142  -1, -1, -1, 79, 80, 81, -1, -1, 84, 85,
1143  15, -1, 88, 3, 4, 5, 6, 7, 8, 9,
1144  10, 11, -1, 13, -1, 15, 16, 17, -1, -1,
1145  -1, -1, 22, -1, 24, -1, -1, -1, -1, 29,
1146  30, 31, 32, -1, -1, -1, 36, -1, -1, -1,
1147  -1, -1, -1, -1, 44, -1, 46, 47, -1, -1,
1148  -1, 66, 67, 68, 69, 70, 56, 72, 73, 74,
1149  75, 76, 77, 78, 79, -1, 66, 67, 68, -1,
1150  -1, -1, 72, 73, -1, -1, -1, 15, -1, 79,
1151  80, 81, -1, -1, 84, 85, -1, -1, 88, 3,
1152  4, 5, 6, 7, 8, 9, 10, 11, -1, 13,
1153  -1, 15, 16, 17, -1, -1, -1, -1, 22, -1,
1154  24, -1, -1, -1, -1, 29, 30, 31, 32, 13,
1155  -1, -1, 36, -1, 18, 19, 20, 21, -1, 23,
1156  44, 25, 46, 47, 72, 73, 74, 75, 76, 77,
1157  78, 79, 56, 37, 38, 39, 40, 41, 42, 43,
1158  -1, -1, 66, 67, 68, -1, -1, -1, 72, 73,
1159  -1, -1, -1, -1, -1, 79, 80, 81, -1, -1,
1160  84, 85, -1, 13, 88, 15, -1, -1, 18, 19,
1161  20, 21, -1, 23, -1, 25, -1, 27, 28, 83,
1162  -1, -1, -1, -1, -1, -1, -1, 37, 38, 39,
1163  40, 41, 42, 43, -1, 45, -1, -1, 48, -1,
1164  50, 15, 52, 53, 54, 55, 56, 57, 58, 59,
1165  60, 61, 62, 63, 64, -1, 66, 67, 68, 69,
1166  70, -1, 72, 73, 74, 75, -1, -1, 78, 79,
1167  -1, 45, -1, -1, 84, 85, 50, 51, 52, 53,
1168  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1169  64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1170  74, 75, 76, 77, 78, 79, -1, -1, 15, 13,
1171  -1, 15, -1, 87, 18, 19, 20, 21, 13, 23,
1172  -1, 25, -1, 18, 19, 20, 21, -1, 23, -1,
1173  25, -1, -1, 37, 38, 39, 40, 41, 42, 43,
1174  -1, -1, 37, 38, 39, 40, 41, 42, 43, -1,
1175  -1, -1, 56, 15, -1, -1, -1, -1, -1, -1,
1176  -1, 68, 69, 70, 68, 72, 73, 74, 75, 76,
1177  77, 78, 79, -1, 78, 79, -1, -1, -1, 83,
1178  -1, -1, -1, 45, -1, -1, -1, 82, 50, 51,
1179  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1180  62, 63, 64, 65, 66, 67, 68, 69, 70, 15,
1181  72, 73, 74, 75, 76, 77, 78, 79, -1, -1,
1182  -1, 83, -1, -1, -1, -1, -1, -1, -1, -1,
1183  -1, -1, -1, -1, -1, -1, -1, -1, -1, 45,
1184  -1, -1, -1, -1, 50, 51, 52, 53, 54, 55,
1185  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1186  66, 67, 68, 69, 70, 15, 72, 73, 74, 75,
1187  76, 77, 78, 79, -1, -1, -1, 83, -1, -1,
1188  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1189  -1, -1, -1, -1, -1, 45, -1, -1, -1, -1,
1190  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1191  60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1192  70, 15, 72, 73, 74, 75, 76, 77, 78, 79,
1193  -1, -1, -1, 83, -1, -1, -1, -1, -1, -1,
1194  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1195  -1, 45, -1, -1, -1, -1, 50, 51, 52, 53,
1196  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1197  64, 65, 66, 67, 68, 69, 70, 15, 72, 73,
1198  74, 75, 76, 77, 78, 79, -1, -1, -1, 83,
1199  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1200  -1, -1, -1, -1, -1, -1, -1, 45, -1, -1,
1201  -1, -1, 50, 51, 52, 53, 54, 55, 56, 57,
1202  58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1203  68, 69, 70, 15, 72, 73, 74, 75, 76, 77,
1204  78, 79, -1, -1, -1, 83, -1, -1, -1, -1,
1205  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1206  -1, -1, -1, 45, -1, -1, -1, -1, 50, 51,
1207  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1208  62, 63, 64, 65, 66, 67, 68, 69, 70, 15,
1209  72, 73, 74, 75, 76, 77, 78, 79, -1, -1,
1210  -1, 83, -1, -1, -1, -1, -1, -1, -1, -1,
1211  -1, -1, -1, -1, -1, -1, -1, -1, -1, 45,
1212  -1, -1, -1, -1, 50, 51, 52, 53, 54, 55,
1213  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1214  66, 67, 68, 69, 70, 15, 72, 73, 74, 75,
1215  76, 77, 78, 79, -1, -1, -1, 83, -1, -1,
1216  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1217  -1, -1, -1, -1, 15, 45, -1, -1, -1, -1,
1218  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1219  60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1220  70, 15, 72, 73, 74, 75, 76, 77, 78, 79,
1221  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1222  61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1223  15, 72, 73, 74, 75, 76, 77, 78, 79, 53,
1224  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1225  64, 65, 66, 67, 68, 69, 70, 15, 72, 73,
1226  74, 75, 76, 77, 78, 79, -1, -1, -1, 54,
1227  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1228  65, 66, 67, 68, 69, 70, 15, 72, 73, 74,
1229  75, 76, 77, 78, 79, -1, -1, 55, 56, 57,
1230  58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1231  68, 69, 70, 15, 72, 73, 74, 75, 76, 77,
1232  78, 79, -1, -1, -1, -1, -1, 56, 57, 58,
1233  59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1234  69, 70, 15, 72, 73, 74, 75, 76, 77, 78,
1235  79, -1, -1, -1, -1, 57, 58, 59, 60, 61,
1236  62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1237  72, 73, 74, 75, 76, 77, 78, 79, -1, -1,
1238  -1, -1, -1, -1, -1, -1, 59, 60, 61, 62,
1239  63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1240  73, 74, 75, 76, 77, 78, 79, 13, -1, -1,
1241  -1, -1, 18, 19, 20, 21, -1, 23, 13, 25,
1242  -1, -1, -1, 18, 19, 20, 21, -1, 23, -1,
1243  25, 37, 38, 39, 40, 41, 42, 43, -1, 34,
1244  35, -1, 37, 38, 39, 40, 41, 42, 43, -1,
1245  13, -1, -1, -1, -1, 18, 19, 20, 21, 65,
1246  23, -1, 25, -1, -1, -1, -1, -1, -1, -1,
1247  -1, -1, -1, -1, 37, 38, 39, 40, 41, 42,
1248  43
1249 };
1250 
1251  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1252  symbol of state STATE-NUM. */
1253 static const yytype_uint8 yystos[] =
1254 {
1255  0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1256  13, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1257  24, 25, 29, 30, 31, 32, 34, 35, 36, 37,
1258  38, 39, 40, 41, 42, 43, 44, 46, 47, 56,
1259  66, 67, 68, 72, 73, 79, 80, 81, 84, 85,
1260  88, 91, 92, 93, 94, 103, 106, 107, 108, 109,
1261  111, 112, 113, 123, 124, 128, 131, 132, 133, 135,
1262  79, 79, 24, 13, 14, 94, 13, 15, 27, 28,
1263  45, 48, 50, 52, 53, 54, 55, 56, 57, 58,
1264  59, 60, 61, 62, 63, 64, 66, 67, 68, 69,
1265  70, 72, 73, 74, 75, 78, 79, 84, 85, 124,
1266  129, 10, 11, 12, 13, 16, 80, 133, 134, 12,
1267  134, 12, 134, 12, 134, 13, 79, 94, 13, 38,
1268  39, 40, 125, 11, 80, 135, 134, 59, 59, 59,
1269  59, 79, 79, 79, 38, 39, 125, 23, 37, 38,
1270  40, 43, 23, 37, 40, 42, 41, 94, 94, 94,
1271  94, 94, 94, 92, 93, 94, 94, 0, 48, 15,
1272  45, 50, 51, 52, 53, 54, 55, 56, 57, 58,
1273  59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1274  69, 70, 72, 73, 74, 75, 76, 77, 78, 79,
1275  92, 94, 104, 6, 24, 65, 110, 124, 113, 15,
1276  56, 68, 78, 79, 115, 118, 119, 120, 121, 122,
1277  33, 134, 102, 85, 134, 95, 96, 97, 86, 15,
1278  78, 15, 78, 86, 83, 115, 130, 12, 12, 12,
1279  12, 123, 38, 40, 40, 59, 92, 92, 92, 92,
1280  94, 123, 94, 92, 94, 38, 40, 40, 40, 23,
1281  37, 40, 40, 40, 83, 83, 94, 93, 94, 94,
1282  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1283  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1284  12, 13, 85, 109, 134, 94, 12, 85, 109, 134,
1285  94, 93, 101, 123, 126, 127, 89, 105, 48, 105,
1286  134, 10, 111, 132, 3, 86, 115, 117, 3, 86,
1287  83, 119, 126, 68, 120, 79, 121, 122, 83, 104,
1288  134, 24, 48, 87, 98, 99, 100, 134, 98, 98,
1289  86, 86, 86, 86, 68, 130, 83, 40, 123, 60,
1290  60, 60, 60, 83, 83, 83, 83, 83, 40, 40,
1291  40, 94, 86, 87, 134, 12, 134, 12, 86, 104,
1292  83, 48, 94, 94, 86, 113, 114, 86, 83, 83,
1293  116, 83, 134, 94, 94, 86, 100, 134, 87, 86,
1294  86, 60, 79, 79, 79, 79, 94, 12, 12, 83,
1295  111, 82, 123, 114, 94, 94, 94, 94, 94, 83,
1296  83, 83, 83
1297 };
1298 
1299  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1300 static const yytype_uint8 yyr1[] =
1301 {
1302  0, 90, 91, 91, 92, 92, 92, 92, 93, 93,
1303  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1304  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1305  94, 94, 94, 94, 94, 94, 94, 94, 94, 95,
1306  94, 96, 94, 97, 94, 98, 98, 99, 99, 100,
1307  100, 100, 101, 94, 102, 94, 103, 104, 104, 104,
1308  94, 105, 94, 94, 94, 94, 94, 94, 94, 94,
1309  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1310  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1311  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1312  94, 106, 106, 94, 94, 94, 94, 107, 107, 107,
1313  108, 108, 109, 109, 109, 108, 108, 108, 110, 111,
1314  111, 112, 113, 113, 114, 114, 116, 115, 117, 115,
1315  115, 115, 118, 119, 119, 119, 120, 120, 120, 120,
1316  120, 121, 121, 121, 121, 122, 122, 123, 124, 124,
1317  124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
1318  124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
1319  124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
1320  124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
1321  124, 124, 124, 124, 124, 124, 125, 125, 125, 125,
1322  126, 126, 127, 127, 128, 128, 129, 130, 130, 131,
1323  131, 132, 132, 132, 133, 133, 133, 133, 133, 133,
1324  133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1325  133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1326  133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1327  133, 134, 134, 134, 134, 134, 134, 135, 135, 135,
1328  135
1329 };
1330 
1331  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1332 static const yytype_uint8 yyr2[] =
1333 {
1334  0, 2, 1, 1, 1, 4, 4, 4, 1, 3,
1335  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1336  4, 4, 2, 3, 4, 3, 4, 5, 3, 3,
1337  3, 4, 3, 4, 5, 3, 3, 4, 4, 0,
1338  5, 0, 5, 0, 5, 1, 1, 1, 2, 3,
1339  2, 2, 0, 5, 0, 5, 1, 0, 1, 3,
1340  5, 1, 3, 4, 4, 3, 3, 3, 3, 3,
1341  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1342  3, 3, 3, 3, 3, 5, 3, 3, 1, 1,
1343  1, 1, 1, 1, 1, 4, 4, 7, 7, 7,
1344  7, 1, 2, 1, 1, 1, 1, 1, 1, 3,
1345  2, 3, 3, 4, 5, 1, 2, 1, 2, 1,
1346  0, 3, 1, 1, 1, 0, 0, 4, 0, 3,
1347  1, 2, 1, 2, 1, 1, 3, 2, 1, 2,
1348  1, 2, 2, 3, 3, 2, 3, 1, 1, 1,
1349  1, 1, 2, 3, 2, 3, 3, 3, 2, 2,
1350  3, 4, 3, 3, 4, 3, 4, 3, 4, 2,
1351  3, 2, 3, 2, 3, 1, 2, 2, 2, 3,
1352  2, 2, 3, 2, 2, 3, 2, 2, 3, 2,
1353  1, 2, 1, 5, 2, 2, 1, 1, 1, 1,
1354  1, 3, 1, 3, 1, 2, 2, 0, 2, 2,
1355  2, 1, 1, 1, 2, 2, 4, 4, 4, 4,
1356  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1357  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1358  2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
1359  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1360  1
1361 };
1362 
1363 
1364 #define yyerrok (yyerrstatus = 0)
1365 #define yyclearin (yychar = YYEMPTY)
1366 #define YYEMPTY (-2)
1367 #define YYEOF 0
1368 
1369 #define YYACCEPT goto yyacceptlab
1370 #define YYABORT goto yyabortlab
1371 #define YYERROR goto yyerrorlab
1372 
1373 
1374 #define YYRECOVERING() (!!yyerrstatus)
1375 
1376 #define YYBACKUP(Token, Value) \
1377 do \
1378  if (yychar == YYEMPTY) \
1379  { \
1380  yychar = (Token); \
1381  yylval = (Value); \
1382  YYPOPSTACK (yylen); \
1383  yystate = *yyssp; \
1384  goto yybackup; \
1385  } \
1386  else \
1387  { \
1388  yyerror (YY_("syntax error: cannot back up")); \
1389  YYERROR; \
1390  } \
1391 while (0)
1392 
1393 /* Error token number */
1394 #define YYTERROR 1
1395 #define YYERRCODE 256
1396 
1397 
1398 
1399 /* Enable debugging if requested. */
1400 #if YYDEBUG
1401 
1402 # ifndef YYFPRINTF
1403 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1404 # define YYFPRINTF fprintf
1405 # endif
1406 
1407 # define YYDPRINTF(Args) \
1408 do { \
1409  if (yydebug) \
1410  YYFPRINTF Args; \
1411 } while (0)
1412 
1413 /* This macro is provided for backward compatibility. */
1414 #ifndef YY_LOCATION_PRINT
1415 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1416 #endif
1417 
1418 
1419 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1420 do { \
1421  if (yydebug) \
1422  { \
1423  YYFPRINTF (stderr, "%s ", Title); \
1424  yy_symbol_print (stderr, \
1425  Type, Value); \
1426  YYFPRINTF (stderr, "\n"); \
1427  } \
1428 } while (0)
1429 
1430 
1431 /*----------------------------------------.
1432 | Print this symbol's value on YYOUTPUT. |
1433 `----------------------------------------*/
1434 
1435 static void
1436 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1437 {
1438  FILE *yyo = yyoutput;
1439  YYUSE (yyo);
1440  if (!yyvaluep)
1441  return;
1442 # ifdef YYPRINT
1443  if (yytype < YYNTOKENS)
1444  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1445 # endif
1446  YYUSE (yytype);
1447 }
1448 
1449 
1450 /*--------------------------------.
1451 | Print this symbol on YYOUTPUT. |
1452 `--------------------------------*/
1453 
1454 static void
1455 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1456 {
1457  YYFPRINTF (yyoutput, "%s %s (",
1458  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1459 
1460  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1461  YYFPRINTF (yyoutput, ")");
1462 }
1463 
1464 /*------------------------------------------------------------------.
1465 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1466 | TOP (included). |
1467 `------------------------------------------------------------------*/
1468 
1469 static void
1470 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1471 {
1472  YYFPRINTF (stderr, "Stack now");
1473  for (; yybottom <= yytop; yybottom++)
1474  {
1475  int yybot = *yybottom;
1476  YYFPRINTF (stderr, " %d", yybot);
1477  }
1478  YYFPRINTF (stderr, "\n");
1479 }
1480 
1481 # define YY_STACK_PRINT(Bottom, Top) \
1482 do { \
1483  if (yydebug) \
1484  yy_stack_print ((Bottom), (Top)); \
1485 } while (0)
1486 
1487 
1488 /*------------------------------------------------.
1489 | Report that the YYRULE is going to be reduced. |
1490 `------------------------------------------------*/
1491 
1492 static void
1493 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1494 {
1495  unsigned long int yylno = yyrline[yyrule];
1496  int yynrhs = yyr2[yyrule];
1497  int yyi;
1498  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1499  yyrule - 1, yylno);
1500  /* The symbols being reduced. */
1501  for (yyi = 0; yyi < yynrhs; yyi++)
1502  {
1503  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1504  yy_symbol_print (stderr,
1505  yystos[yyssp[yyi + 1 - yynrhs]],
1506  &(yyvsp[(yyi + 1) - (yynrhs)])
1507  );
1508  YYFPRINTF (stderr, "\n");
1509  }
1510 }
1511 
1512 # define YY_REDUCE_PRINT(Rule) \
1513 do { \
1514  if (yydebug) \
1515  yy_reduce_print (yyssp, yyvsp, Rule); \
1516 } while (0)
1517 
1518 /* Nonzero means print parse trace. It is left uninitialized so that
1519  multiple parsers can coexist. */
1521 #else /* !YYDEBUG */
1522 # define YYDPRINTF(Args)
1523 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1524 # define YY_STACK_PRINT(Bottom, Top)
1525 # define YY_REDUCE_PRINT(Rule)
1526 #endif /* !YYDEBUG */
1527 
1528 
1529 /* YYINITDEPTH -- initial size of the parser's stacks. */
1530 #ifndef YYINITDEPTH
1531 # define YYINITDEPTH 200
1532 #endif
1533 
1534 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1535  if the built-in stack extension method is used).
1536 
1537  Do not make this value too large; the results are undefined if
1538  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1539  evaluated with infinite-precision integer arithmetic. */
1540 
1541 #ifndef YYMAXDEPTH
1542 # define YYMAXDEPTH 10000
1543 #endif
1544 
1545 
1546 #if YYERROR_VERBOSE
1547 
1548 # ifndef yystrlen
1549 # if defined __GLIBC__ && defined _STRING_H
1550 # define yystrlen strlen
1551 # else
1552 /* Return the length of YYSTR. */
1553 static YYSIZE_T
1554 yystrlen (const char *yystr)
1555 {
1556  YYSIZE_T yylen;
1557  for (yylen = 0; yystr[yylen]; yylen++)
1558  continue;
1559  return yylen;
1560 }
1561 # endif
1562 # endif
1563 
1564 # ifndef yystpcpy
1565 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1566 # define yystpcpy stpcpy
1567 # else
1568 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1569  YYDEST. */
1570 static char *
1571 yystpcpy (char *yydest, const char *yysrc)
1572 {
1573  char *yyd = yydest;
1574  const char *yys = yysrc;
1575 
1576  while ((*yyd++ = *yys++) != '\0')
1577  continue;
1578 
1579  return yyd - 1;
1580 }
1581 # endif
1582 # endif
1583 
1584 # ifndef yytnamerr
1585 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1586  quotes and backslashes, so that it's suitable for yyerror. The
1587  heuristic is that double-quoting is unnecessary unless the string
1588  contains an apostrophe, a comma, or backslash (other than
1589  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1590  null, do not copy; instead, return the length of what the result
1591  would have been. */
1592 static YYSIZE_T
1593 yytnamerr (char *yyres, const char *yystr)
1594 {
1595  if (*yystr == '"')
1596  {
1597  YYSIZE_T yyn = 0;
1598  char const *yyp = yystr;
1599 
1600  for (;;)
1601  switch (*++yyp)
1602  {
1603  case '\'':
1604  case ',':
1605  goto do_not_strip_quotes;
1606 
1607  case '\\':
1608  if (*++yyp != '\\')
1609  goto do_not_strip_quotes;
1610  /* Fall through. */
1611  default:
1612  if (yyres)
1613  yyres[yyn] = *yyp;
1614  yyn++;
1615  break;
1616 
1617  case '"':
1618  if (yyres)
1619  yyres[yyn] = '\0';
1620  return yyn;
1621  }
1622  do_not_strip_quotes: ;
1623  }
1624 
1625  if (! yyres)
1626  return yystrlen (yystr);
1627 
1628  return yystpcpy (yyres, yystr) - yyres;
1629 }
1630 # endif
1631 
1632 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1633  about the unexpected token YYTOKEN for the state stack whose top is
1634  YYSSP.
1635 
1636  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1637  not large enough to hold the message. In that case, also set
1638  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1639  required number of bytes is too large to store. */
1640 static int
1641 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1642  yytype_int16 *yyssp, int yytoken)
1643 {
1644  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1645  YYSIZE_T yysize = yysize0;
1646  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1647  /* Internationalized format string. */
1648  const char *yyformat = YY_NULLPTR;
1649  /* Arguments of yyformat. */
1650  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1651  /* Number of reported tokens (one for the "unexpected", one per
1652  "expected"). */
1653  int yycount = 0;
1654 
1655  /* There are many possibilities here to consider:
1656  - If this state is a consistent state with a default action, then
1657  the only way this function was invoked is if the default action
1658  is an error action. In that case, don't check for expected
1659  tokens because there are none.
1660  - The only way there can be no lookahead present (in yychar) is if
1661  this state is a consistent state with a default action. Thus,
1662  detecting the absence of a lookahead is sufficient to determine
1663  that there is no unexpected or expected token to report. In that
1664  case, just report a simple "syntax error".
1665  - Don't assume there isn't a lookahead just because this state is a
1666  consistent state with a default action. There might have been a
1667  previous inconsistent state, consistent state with a non-default
1668  action, or user semantic action that manipulated yychar.
1669  - Of course, the expected token list depends on states to have
1670  correct lookahead information, and it depends on the parser not
1671  to perform extra reductions after fetching a lookahead from the
1672  scanner and before detecting a syntax error. Thus, state merging
1673  (from LALR or IELR) and default reductions corrupt the expected
1674  token list. However, the list is correct for canonical LR with
1675  one exception: it will still contain any token that will not be
1676  accepted due to an error action in a later state.
1677  */
1678  if (yytoken != YYEMPTY)
1679  {
1680  int yyn = yypact[*yyssp];
1681  yyarg[yycount++] = yytname[yytoken];
1682  if (!yypact_value_is_default (yyn))
1683  {
1684  /* Start YYX at -YYN if negative to avoid negative indexes in
1685  YYCHECK. In other words, skip the first -YYN actions for
1686  this state because they are default actions. */
1687  int yyxbegin = yyn < 0 ? -yyn : 0;
1688  /* Stay within bounds of both yycheck and yytname. */
1689  int yychecklim = YYLAST - yyn + 1;
1690  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1691  int yyx;
1692 
1693  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1694  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1695  && !yytable_value_is_error (yytable[yyx + yyn]))
1696  {
1697  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1698  {
1699  yycount = 1;
1700  yysize = yysize0;
1701  break;
1702  }
1703  yyarg[yycount++] = yytname[yyx];
1704  {
1705  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1706  if (! (yysize <= yysize1
1707  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1708  return 2;
1709  yysize = yysize1;
1710  }
1711  }
1712  }
1713  }
1714 
1715  switch (yycount)
1716  {
1717 # define YYCASE_(N, S) \
1718  case N: \
1719  yyformat = S; \
1720  break
1721  YYCASE_(0, YY_("syntax error"));
1722  YYCASE_(1, YY_("syntax error, unexpected %s"));
1723  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1724  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1725  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1726  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1727 # undef YYCASE_
1728  }
1729 
1730  {
1731  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1732  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1733  return 2;
1734  yysize = yysize1;
1735  }
1736 
1737  if (*yymsg_alloc < yysize)
1738  {
1739  *yymsg_alloc = 2 * yysize;
1740  if (! (yysize <= *yymsg_alloc
1741  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1742  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1743  return 1;
1744  }
1745 
1746  /* Avoid sprintf, as that infringes on the user's name space.
1747  Don't have undefined behavior even if the translation
1748  produced a string with the wrong number of "%s"s. */
1749  {
1750  char *yyp = *yymsg;
1751  int yyi = 0;
1752  while ((*yyp = *yyformat) != '\0')
1753  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1754  {
1755  yyp += yytnamerr (yyp, yyarg[yyi++]);
1756  yyformat += 2;
1757  }
1758  else
1759  {
1760  yyp++;
1761  yyformat++;
1762  }
1763  }
1764  return 0;
1765 }
1766 #endif /* YYERROR_VERBOSE */
1767 
1768 /*-----------------------------------------------.
1769 | Release the memory associated to this symbol. |
1770 `-----------------------------------------------*/
1771 
1772 static void
1773 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1774 {
1775  YYUSE (yyvaluep);
1776  if (!yymsg)
1777  yymsg = "Deleting";
1778  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1779 
1781  YYUSE (yytype);
1783 }
1784 
1785 
1786 
1787 
1788 /* The lookahead symbol. */
1790 
1791 /* The semantic value of the lookahead symbol. */
1793 /* Number of syntax errors so far. */
1795 
1796 
1797 /*----------.
1798 | yyparse. |
1799 `----------*/
1800 
1801 int
1802 yyparse (void)
1803 {
1804  int yystate;
1805  /* Number of tokens to shift before error messages enabled. */
1806  int yyerrstatus;
1807 
1808  /* The stacks and their tools:
1809  'yyss': related to states.
1810  'yyvs': related to semantic values.
1811 
1812  Refer to the stacks through separate pointers, to allow yyoverflow
1813  to xreallocate them elsewhere. */
1814 
1815  /* The state stack. */
1816  yytype_int16 yyssa[YYINITDEPTH];
1817  yytype_int16 *yyss;
1818  yytype_int16 *yyssp;
1819 
1820  /* The semantic value stack. */
1821  YYSTYPE yyvsa[YYINITDEPTH];
1822  YYSTYPE *yyvs;
1823  YYSTYPE *yyvsp;
1824 
1826 
1827  int yyn;
1828  int yyresult;
1829  /* Lookahead token as an internal (translated) token number. */
1830  int yytoken = 0;
1831  /* The variables used to return semantic value and location from the
1832  action routines. */
1833  YYSTYPE yyval;
1834 
1835 #if YYERROR_VERBOSE
1836  /* Buffer for error messages, and its allocated size. */
1837  char yymsgbuf[128];
1838  char *yymsg = yymsgbuf;
1839  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1840 #endif
1841 
1842 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1843 
1844  /* The number of symbols on the RHS of the reduced rule.
1845  Keep to zero when no symbol should be popped. */
1846  int yylen = 0;
1847 
1848  yyssp = yyss = yyssa;
1849  yyvsp = yyvs = yyvsa;
1850  yystacksize = YYINITDEPTH;
1851 
1852  YYDPRINTF ((stderr, "Starting parse\n"));
1853 
1854  yystate = 0;
1855  yyerrstatus = 0;
1856  yynerrs = 0;
1857  yychar = YYEMPTY; /* Cause a token to be read. */
1858  goto yysetstate;
1859 
1860 /*------------------------------------------------------------.
1861 | yynewstate -- Push a new state, which is found in yystate. |
1862 `------------------------------------------------------------*/
1863  yynewstate:
1864  /* In all cases, when you get here, the value and location stacks
1865  have just been pushed. So pushing a state here evens the stacks. */
1866  yyssp++;
1867 
1868  yysetstate:
1869  *yyssp = yystate;
1870 
1871  if (yyss + yystacksize - 1 <= yyssp)
1872  {
1873  /* Get the current used size of the three stacks, in elements. */
1874  YYSIZE_T yysize = yyssp - yyss + 1;
1875 
1876 #ifdef yyoverflow
1877  {
1878  /* Give user a chance to xreallocate the stack. Use copies of
1879  these so that the &'s don't force the real ones into
1880  memory. */
1881  YYSTYPE *yyvs1 = yyvs;
1882  yytype_int16 *yyss1 = yyss;
1883 
1884  /* Each stack pointer address is followed by the size of the
1885  data in use in that stack, in bytes. This used to be a
1886  conditional around just the two extra args, but that might
1887  be undefined if yyoverflow is a macro. */
1888  yyoverflow (YY_("memory exhausted"),
1889  &yyss1, yysize * sizeof (*yyssp),
1890  &yyvs1, yysize * sizeof (*yyvsp),
1891  &yystacksize);
1892 
1893  yyss = yyss1;
1894  yyvs = yyvs1;
1895  }
1896 #else /* no yyoverflow */
1897 # ifndef YYSTACK_RELOCATE
1898  goto yyexhaustedlab;
1899 # else
1900  /* Extend the stack our own way. */
1901  if (YYMAXDEPTH <= yystacksize)
1902  goto yyexhaustedlab;
1903  yystacksize *= 2;
1904  if (YYMAXDEPTH < yystacksize)
1905  yystacksize = YYMAXDEPTH;
1906 
1907  {
1908  yytype_int16 *yyss1 = yyss;
1909  union yyalloc *yyptr =
1910  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1911  if (! yyptr)
1912  goto yyexhaustedlab;
1913  YYSTACK_RELOCATE (yyss_alloc, yyss);
1914  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1915 # undef YYSTACK_RELOCATE
1916  if (yyss1 != yyssa)
1917  YYSTACK_FREE (yyss1);
1918  }
1919 # endif
1920 #endif /* no yyoverflow */
1921 
1922  yyssp = yyss + yysize - 1;
1923  yyvsp = yyvs + yysize - 1;
1924 
1925  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1926  (unsigned long int) yystacksize));
1927 
1928  if (yyss + yystacksize - 1 <= yyssp)
1929  YYABORT;
1930  }
1931 
1932  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1933 
1934  if (yystate == YYFINAL)
1935  YYACCEPT;
1936 
1937  goto yybackup;
1938 
1939 /*-----------.
1940 | yybackup. |
1941 `-----------*/
1942 yybackup:
1943 
1944  /* Do appropriate processing given the current state. Read a
1945  lookahead token if we need one and don't already have one. */
1946 
1947  /* First try to decide what to do without reference to lookahead token. */
1948  yyn = yypact[yystate];
1949  if (yypact_value_is_default (yyn))
1950  goto yydefault;
1951 
1952  /* Not known => get a lookahead token if don't already have one. */
1953 
1954  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1955  if (yychar == YYEMPTY)
1956  {
1957  YYDPRINTF ((stderr, "Reading a token: "));
1958  yychar = yylex ();
1959  }
1960 
1961  if (yychar <= YYEOF)
1962  {
1963  yychar = yytoken = YYEOF;
1964  YYDPRINTF ((stderr, "Now at end of input.\n"));
1965  }
1966  else
1967  {
1968  yytoken = YYTRANSLATE (yychar);
1969  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1970  }
1971 
1972  /* If the proper action on seeing token YYTOKEN is to reduce or to
1973  detect an error, take that action. */
1974  yyn += yytoken;
1975  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1976  goto yydefault;
1977  yyn = yytable[yyn];
1978  if (yyn <= 0)
1979  {
1980  if (yytable_value_is_error (yyn))
1981  goto yyerrlab;
1982  yyn = -yyn;
1983  goto yyreduce;
1984  }
1985 
1986  /* Count tokens shifted since error; after three, turn off error
1987  status. */
1988  if (yyerrstatus)
1989  yyerrstatus--;
1990 
1991  /* Shift the lookahead token. */
1992  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1993 
1994  /* Discard the shifted token. */
1995  yychar = YYEMPTY;
1996 
1997  yystate = yyn;
1999  *++yyvsp = yylval;
2001 
2002  goto yynewstate;
2003 
2004 
2005 /*-----------------------------------------------------------.
2006 | yydefault -- do the default action for the current state. |
2007 `-----------------------------------------------------------*/
2008 yydefault:
2009  yyn = yydefact[yystate];
2010  if (yyn == 0)
2011  goto yyerrlab;
2012  goto yyreduce;
2013 
2014 
2015 /*-----------------------------.
2016 | yyreduce -- Do a reduction. |
2017 `-----------------------------*/
2018 yyreduce:
2019  /* yyn is the number of a rule to reduce with. */
2020  yylen = yyr2[yyn];
2021 
2022  /* If YYLEN is nonzero, implement the default value of the action:
2023  '$$ = $1'.
2024 
2025  Otherwise, the following line sets YYVAL to garbage.
2026  This behavior is undocumented and Bison
2027  users should not rely upon it. Assigning to YYVAL
2028  unconditionally makes the parser a bit smaller, and it avoids a
2029  GCC warning that YYVAL may be used uninitialized. */
2030  yyval = yyvsp[1-yylen];
2031 
2032 
2033  YY_REDUCE_PRINT (yyn);
2034  switch (yyn)
2035  {
2036  case 4:
2037 #line 293 "c-exp.y" /* yacc.c:1646 */
2038  { write_exp_elt_opcode(pstate, OP_TYPE);
2039  write_exp_elt_type(pstate, (yyvsp[0].tval));
2040  write_exp_elt_opcode(pstate, OP_TYPE);}
2041 #line 2043 "c-exp.c" /* yacc.c:1646 */
2042  break;
2043 
2044  case 5:
2045 #line 297 "c-exp.y" /* yacc.c:1646 */
2046  {
2047  write_exp_elt_opcode (pstate, OP_TYPEOF);
2048  }
2049 #line 2051 "c-exp.c" /* yacc.c:1646 */
2050  break;
2051 
2052  case 6:
2053 #line 301 "c-exp.y" /* yacc.c:1646 */
2054  {
2055  write_exp_elt_opcode (pstate, OP_TYPE);
2056  write_exp_elt_type (pstate, (yyvsp[-1].tval));
2057  write_exp_elt_opcode (pstate, OP_TYPE);
2058  }
2059 #line 2061 "c-exp.c" /* yacc.c:1646 */
2060  break;
2061 
2062  case 7:
2063 #line 307 "c-exp.y" /* yacc.c:1646 */
2064  {
2065  write_exp_elt_opcode (pstate, OP_DECLTYPE);
2066  }
2067 #line 2069 "c-exp.c" /* yacc.c:1646 */
2068  break;
2069 
2070  case 9:
2071 #line 315 "c-exp.y" /* yacc.c:1646 */
2072  { write_exp_elt_opcode (pstate, BINOP_COMMA); }
2073 #line 2075 "c-exp.c" /* yacc.c:1646 */
2074  break;
2075 
2076  case 10:
2077 #line 320 "c-exp.y" /* yacc.c:1646 */
2078  { write_exp_elt_opcode (pstate, UNOP_IND); }
2079 #line 2081 "c-exp.c" /* yacc.c:1646 */
2080  break;
2081 
2082  case 11:
2083 #line 324 "c-exp.y" /* yacc.c:1646 */
2084  { write_exp_elt_opcode (pstate, UNOP_ADDR); }
2085 #line 2087 "c-exp.c" /* yacc.c:1646 */
2086  break;
2087 
2088  case 12:
2089 #line 328 "c-exp.y" /* yacc.c:1646 */
2090  { write_exp_elt_opcode (pstate, UNOP_NEG); }
2091 #line 2093 "c-exp.c" /* yacc.c:1646 */
2092  break;
2093 
2094  case 13:
2095 #line 332 "c-exp.y" /* yacc.c:1646 */
2096  { write_exp_elt_opcode (pstate, UNOP_PLUS); }
2097 #line 2099 "c-exp.c" /* yacc.c:1646 */
2098  break;
2099 
2100  case 14:
2101 #line 336 "c-exp.y" /* yacc.c:1646 */
2102  { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
2103 #line 2105 "c-exp.c" /* yacc.c:1646 */
2104  break;
2105 
2106  case 15:
2107 #line 340 "c-exp.y" /* yacc.c:1646 */
2108  { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
2109 #line 2111 "c-exp.c" /* yacc.c:1646 */
2110  break;
2111 
2112  case 16:
2113 #line 344 "c-exp.y" /* yacc.c:1646 */
2114  { write_exp_elt_opcode (pstate, UNOP_PREINCREMENT); }
2115 #line 2117 "c-exp.c" /* yacc.c:1646 */
2116  break;
2117 
2118  case 17:
2119 #line 348 "c-exp.y" /* yacc.c:1646 */
2120  { write_exp_elt_opcode (pstate, UNOP_PREDECREMENT); }
2121 #line 2123 "c-exp.c" /* yacc.c:1646 */
2122  break;
2123 
2124  case 18:
2125 #line 352 "c-exp.y" /* yacc.c:1646 */
2126  { write_exp_elt_opcode (pstate, UNOP_POSTINCREMENT); }
2127 #line 2129 "c-exp.c" /* yacc.c:1646 */
2128  break;
2129 
2130  case 19:
2131 #line 356 "c-exp.y" /* yacc.c:1646 */
2132  { write_exp_elt_opcode (pstate, UNOP_POSTDECREMENT); }
2133 #line 2135 "c-exp.c" /* yacc.c:1646 */
2134  break;
2135 
2136  case 20:
2137 #line 360 "c-exp.y" /* yacc.c:1646 */
2138  { write_exp_elt_opcode (pstate, OP_TYPEID); }
2139 #line 2141 "c-exp.c" /* yacc.c:1646 */
2140  break;
2141 
2142  case 21:
2143 #line 364 "c-exp.y" /* yacc.c:1646 */
2144  { write_exp_elt_opcode (pstate, OP_TYPEID); }
2145 #line 2147 "c-exp.c" /* yacc.c:1646 */
2146  break;
2147 
2148  case 22:
2149 #line 368 "c-exp.y" /* yacc.c:1646 */
2150  { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
2151 #line 2153 "c-exp.c" /* yacc.c:1646 */
2152  break;
2153 
2154  case 23:
2155 #line 372 "c-exp.y" /* yacc.c:1646 */
2156  { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
2157  write_exp_string (pstate, (yyvsp[0].sval));
2158  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
2159 #line 2161 "c-exp.c" /* yacc.c:1646 */
2160  break;
2161 
2162  case 24:
2163 #line 378 "c-exp.y" /* yacc.c:1646 */
2164  { mark_struct_expression (pstate);
2165  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
2166  write_exp_string (pstate, (yyvsp[-1].sval));
2167  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
2168 #line 2170 "c-exp.c" /* yacc.c:1646 */
2169  break;
2170 
2171  case 25:
2172 #line 385 "c-exp.y" /* yacc.c:1646 */
2173  { struct stoken s;
2174  mark_struct_expression (pstate);
2175  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
2176  s.ptr = "";
2177  s.length = 0;
2178  write_exp_string (pstate, s);
2179  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
2180 #line 2182 "c-exp.c" /* yacc.c:1646 */
2181  break;
2182 
2183  case 26:
2184 #line 395 "c-exp.y" /* yacc.c:1646 */
2185  { write_exp_elt_opcode (pstate, STRUCTOP_PTR);
2186  write_destructor_name (pstate, (yyvsp[0].sval));
2187  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
2188 #line 2190 "c-exp.c" /* yacc.c:1646 */
2189  break;
2190 
2191  case 27:
2192 #line 401 "c-exp.y" /* yacc.c:1646 */
2193  { mark_struct_expression (pstate);
2194  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
2195  write_destructor_name (pstate, (yyvsp[-1].sval));
2196  write_exp_elt_opcode (pstate, STRUCTOP_PTR); }
2197 #line 2199 "c-exp.c" /* yacc.c:1646 */
2198  break;
2199 
2200  case 28:
2201 #line 408 "c-exp.y" /* yacc.c:1646 */
2202  { /* exp->type::name becomes exp->*(&type::name) */
2203  /* Note: this doesn't work if name is a
2204  static member! FIXME */
2205  write_exp_elt_opcode (pstate, UNOP_ADDR);
2206  write_exp_elt_opcode (pstate, STRUCTOP_MPTR); }
2207 #line 2209 "c-exp.c" /* yacc.c:1646 */
2208  break;
2209 
2210  case 29:
2211 #line 416 "c-exp.y" /* yacc.c:1646 */
2212  { write_exp_elt_opcode (pstate, STRUCTOP_MPTR); }
2213 #line 2215 "c-exp.c" /* yacc.c:1646 */
2214  break;
2215 
2216  case 30:
2217 #line 420 "c-exp.y" /* yacc.c:1646 */
2218  { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
2219  write_exp_string (pstate, (yyvsp[0].sval));
2220  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
2221 #line 2223 "c-exp.c" /* yacc.c:1646 */
2222  break;
2223 
2224  case 31:
2225 #line 426 "c-exp.y" /* yacc.c:1646 */
2226  { mark_struct_expression (pstate);
2227  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
2228  write_exp_string (pstate, (yyvsp[-1].sval));
2229  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
2230 #line 2232 "c-exp.c" /* yacc.c:1646 */
2231  break;
2232 
2233  case 32:
2234 #line 433 "c-exp.y" /* yacc.c:1646 */
2235  { struct stoken s;
2236  mark_struct_expression (pstate);
2237  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
2238  s.ptr = "";
2239  s.length = 0;
2240  write_exp_string (pstate, s);
2241  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
2242 #line 2244 "c-exp.c" /* yacc.c:1646 */
2243  break;
2244 
2245  case 33:
2246 #line 443 "c-exp.y" /* yacc.c:1646 */
2247  { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
2248  write_destructor_name (pstate, (yyvsp[0].sval));
2249  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
2250 #line 2252 "c-exp.c" /* yacc.c:1646 */
2251  break;
2252 
2253  case 34:
2254 #line 449 "c-exp.y" /* yacc.c:1646 */
2255  { mark_struct_expression (pstate);
2256  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
2257  write_destructor_name (pstate, (yyvsp[-1].sval));
2258  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
2259 #line 2261 "c-exp.c" /* yacc.c:1646 */
2260  break;
2261 
2262  case 35:
2263 #line 456 "c-exp.y" /* yacc.c:1646 */
2264  { /* exp.type::name becomes exp.*(&type::name) */
2265  /* Note: this doesn't work if name is a
2266  static member! FIXME */
2267  write_exp_elt_opcode (pstate, UNOP_ADDR);
2268  write_exp_elt_opcode (pstate, STRUCTOP_MEMBER); }
2269 #line 2271 "c-exp.c" /* yacc.c:1646 */
2270  break;
2271 
2272  case 36:
2273 #line 464 "c-exp.y" /* yacc.c:1646 */
2274  { write_exp_elt_opcode (pstate, STRUCTOP_MEMBER); }
2275 #line 2277 "c-exp.c" /* yacc.c:1646 */
2276  break;
2277 
2278  case 37:
2279 #line 468 "c-exp.y" /* yacc.c:1646 */
2280  { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
2281 #line 2283 "c-exp.c" /* yacc.c:1646 */
2282  break;
2283 
2284  case 38:
2285 #line 472 "c-exp.y" /* yacc.c:1646 */
2286  { write_exp_elt_opcode (pstate, BINOP_SUBSCRIPT); }
2287 #line 2289 "c-exp.c" /* yacc.c:1646 */
2288  break;
2289 
2290  case 39:
2291 #line 481 "c-exp.y" /* yacc.c:1646 */
2292  {
2293  CORE_ADDR theclass;
2294 
2295  theclass = lookup_objc_class (parse_gdbarch (pstate),
2296  copy_name ((yyvsp[0].tsym).stoken));
2297  if (theclass == 0)
2298  error (_("%s is not an ObjC Class"),
2299  copy_name ((yyvsp[0].tsym).stoken));
2300  write_exp_elt_opcode (pstate, OP_LONG);
2301  write_exp_elt_type (pstate,
2302  parse_type (pstate)->builtin_int);
2303  write_exp_elt_longcst (pstate, (LONGEST) theclass);
2304  write_exp_elt_opcode (pstate, OP_LONG);
2305  start_msglist();
2306  }
2307 #line 2309 "c-exp.c" /* yacc.c:1646 */
2308  break;
2309 
2310  case 40:
2311 #line 497 "c-exp.y" /* yacc.c:1646 */
2312  { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2313  end_msglist (pstate);
2314  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2315  }
2316 #line 2318 "c-exp.c" /* yacc.c:1646 */
2317  break;
2318 
2319  case 41:
2320 #line 504 "c-exp.y" /* yacc.c:1646 */
2321  {
2322  write_exp_elt_opcode (pstate, OP_LONG);
2323  write_exp_elt_type (pstate,
2324  parse_type (pstate)->builtin_int);
2325  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[0].theclass).theclass);
2326  write_exp_elt_opcode (pstate, OP_LONG);
2327  start_msglist();
2328  }
2329 #line 2331 "c-exp.c" /* yacc.c:1646 */
2330  break;
2331 
2332  case 42:
2333 #line 513 "c-exp.y" /* yacc.c:1646 */
2334  { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2335  end_msglist (pstate);
2336  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2337  }
2338 #line 2340 "c-exp.c" /* yacc.c:1646 */
2339  break;
2340 
2341  case 43:
2342 #line 520 "c-exp.y" /* yacc.c:1646 */
2343  { start_msglist(); }
2344 #line 2346 "c-exp.c" /* yacc.c:1646 */
2345  break;
2346 
2347  case 44:
2348 #line 522 "c-exp.y" /* yacc.c:1646 */
2349  { write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2350  end_msglist (pstate);
2351  write_exp_elt_opcode (pstate, OP_OBJC_MSGCALL);
2352  }
2353 #line 2355 "c-exp.c" /* yacc.c:1646 */
2354  break;
2355 
2356  case 45:
2357 #line 529 "c-exp.y" /* yacc.c:1646 */
2358  { add_msglist(&(yyvsp[0].sval), 0); }
2359 #line 2361 "c-exp.c" /* yacc.c:1646 */
2360  break;
2361 
2362  case 49:
2363 #line 538 "c-exp.y" /* yacc.c:1646 */
2364  { add_msglist(&(yyvsp[-2].sval), 1); }
2365 #line 2367 "c-exp.c" /* yacc.c:1646 */
2366  break;
2367 
2368  case 50:
2369 #line 540 "c-exp.y" /* yacc.c:1646 */
2370  { add_msglist(0, 1); }
2371 #line 2373 "c-exp.c" /* yacc.c:1646 */
2372  break;
2373 
2374  case 51:
2375 #line 542 "c-exp.y" /* yacc.c:1646 */
2376  { add_msglist(0, 0); }
2377 #line 2379 "c-exp.c" /* yacc.c:1646 */
2378  break;
2379 
2380  case 52:
2381 #line 548 "c-exp.y" /* yacc.c:1646 */
2382  { start_arglist (); }
2383 #line 2385 "c-exp.c" /* yacc.c:1646 */
2384  break;
2385 
2386  case 53:
2387 #line 550 "c-exp.y" /* yacc.c:1646 */
2388  { write_exp_elt_opcode (pstate, OP_FUNCALL);
2389  write_exp_elt_longcst (pstate,
2390  (LONGEST) end_arglist ());
2391  write_exp_elt_opcode (pstate, OP_FUNCALL); }
2392 #line 2394 "c-exp.c" /* yacc.c:1646 */
2393  break;
2394 
2395  case 54:
2396 #line 557 "c-exp.y" /* yacc.c:1646 */
2397  {
2398  /* This could potentially be a an argument defined
2399  lookup function (Koenig). */
2400  write_exp_elt_opcode (pstate, OP_ADL_FUNC);
2401  write_exp_elt_block (pstate,
2403  write_exp_elt_sym (pstate,
2404  NULL); /* Placeholder. */
2405  write_exp_string (pstate, (yyvsp[-1].ssym).stoken);
2406  write_exp_elt_opcode (pstate, OP_ADL_FUNC);
2407 
2408  /* This is to save the value of arglist_len
2409  being accumulated by an outer function call. */
2410 
2411  start_arglist ();
2412  }
2413 #line 2415 "c-exp.c" /* yacc.c:1646 */
2414  break;
2415 
2416  case 55:
2417 #line 574 "c-exp.y" /* yacc.c:1646 */
2418  {
2419  write_exp_elt_opcode (pstate, OP_FUNCALL);
2420  write_exp_elt_longcst (pstate,
2421  (LONGEST) end_arglist ());
2422  write_exp_elt_opcode (pstate, OP_FUNCALL);
2423  }
2424 #line 2426 "c-exp.c" /* yacc.c:1646 */
2425  break;
2426 
2427  case 56:
2428 #line 583 "c-exp.y" /* yacc.c:1646 */
2429  { start_arglist (); }
2430 #line 2432 "c-exp.c" /* yacc.c:1646 */
2431  break;
2432 
2433  case 58:
2434 #line 590 "c-exp.y" /* yacc.c:1646 */
2435  { arglist_len = 1; }
2436 #line 2438 "c-exp.c" /* yacc.c:1646 */
2437  break;
2438 
2439  case 59:
2440 #line 594 "c-exp.y" /* yacc.c:1646 */
2441  { arglist_len++; }
2442 #line 2444 "c-exp.c" /* yacc.c:1646 */
2443  break;
2444 
2445  case 60:
2446 #line 598 "c-exp.y" /* yacc.c:1646 */
2447  { int i;
2448  VEC (type_ptr) *type_list = (yyvsp[-2].tvec);
2449  struct type *type_elt;
2450  LONGEST len = VEC_length (type_ptr, type_list);
2451 
2452  write_exp_elt_opcode (pstate, TYPE_INSTANCE);
2453  write_exp_elt_longcst (pstate, len);
2454  for (i = 0;
2455  VEC_iterate (type_ptr, type_list, i, type_elt);
2456  ++i)
2457  write_exp_elt_type (pstate, type_elt);
2458  write_exp_elt_longcst(pstate, len);
2459  write_exp_elt_opcode (pstate, TYPE_INSTANCE);
2460  VEC_free (type_ptr, type_list);
2461  }
2462 #line 2464 "c-exp.c" /* yacc.c:1646 */
2463  break;
2464 
2465  case 61:
2466 #line 616 "c-exp.y" /* yacc.c:1646 */
2467  { (yyval.lval) = end_arglist () - 1; }
2468 #line 2470 "c-exp.c" /* yacc.c:1646 */
2469  break;
2470 
2471  case 62:
2472 #line 619 "c-exp.y" /* yacc.c:1646 */
2473  { write_exp_elt_opcode (pstate, OP_ARRAY);
2474  write_exp_elt_longcst (pstate, (LONGEST) 0);
2475  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[0].lval));
2476  write_exp_elt_opcode (pstate, OP_ARRAY); }
2477 #line 2479 "c-exp.c" /* yacc.c:1646 */
2478  break;
2479 
2480  case 63:
2481 #line 626 "c-exp.y" /* yacc.c:1646 */
2482  { write_exp_elt_opcode (pstate, UNOP_MEMVAL_TYPE); }
2483 #line 2485 "c-exp.c" /* yacc.c:1646 */
2484  break;
2485 
2486  case 64:
2487 #line 630 "c-exp.y" /* yacc.c:1646 */
2488  { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
2489 #line 2491 "c-exp.c" /* yacc.c:1646 */
2490  break;
2491 
2492  case 65:
2493 #line 634 "c-exp.y" /* yacc.c:1646 */
2494  { }
2495 #line 2497 "c-exp.c" /* yacc.c:1646 */
2496  break;
2497 
2498  case 66:
2499 #line 640 "c-exp.y" /* yacc.c:1646 */
2500  { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
2501 #line 2503 "c-exp.c" /* yacc.c:1646 */
2502  break;
2503 
2504  case 67:
2505 #line 644 "c-exp.y" /* yacc.c:1646 */
2506  { write_exp_elt_opcode (pstate, BINOP_MUL); }
2507 #line 2509 "c-exp.c" /* yacc.c:1646 */
2508  break;
2509 
2510  case 68:
2511 #line 648 "c-exp.y" /* yacc.c:1646 */
2512  { write_exp_elt_opcode (pstate, BINOP_DIV); }
2513 #line 2515 "c-exp.c" /* yacc.c:1646 */
2514  break;
2515 
2516  case 69:
2517 #line 652 "c-exp.y" /* yacc.c:1646 */
2518  { write_exp_elt_opcode (pstate, BINOP_REM); }
2519 #line 2521 "c-exp.c" /* yacc.c:1646 */
2520  break;
2521 
2522  case 70:
2523 #line 656 "c-exp.y" /* yacc.c:1646 */
2524  { write_exp_elt_opcode (pstate, BINOP_ADD); }
2525 #line 2527 "c-exp.c" /* yacc.c:1646 */
2526  break;
2527 
2528  case 71:
2529 #line 660 "c-exp.y" /* yacc.c:1646 */
2530  { write_exp_elt_opcode (pstate, BINOP_SUB); }
2531 #line 2533 "c-exp.c" /* yacc.c:1646 */
2532  break;
2533 
2534  case 72:
2535 #line 664 "c-exp.y" /* yacc.c:1646 */
2536  { write_exp_elt_opcode (pstate, BINOP_LSH); }
2537 #line 2539 "c-exp.c" /* yacc.c:1646 */
2538  break;
2539 
2540  case 73:
2541 #line 668 "c-exp.y" /* yacc.c:1646 */
2542  { write_exp_elt_opcode (pstate, BINOP_RSH); }
2543 #line 2545 "c-exp.c" /* yacc.c:1646 */
2544  break;
2545 
2546  case 74:
2547 #line 672 "c-exp.y" /* yacc.c:1646 */
2548  { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
2549 #line 2551 "c-exp.c" /* yacc.c:1646 */
2550  break;
2551 
2552  case 75:
2553 #line 676 "c-exp.y" /* yacc.c:1646 */
2554  { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
2555 #line 2557 "c-exp.c" /* yacc.c:1646 */
2556  break;
2557 
2558  case 76:
2559 #line 680 "c-exp.y" /* yacc.c:1646 */
2560  { write_exp_elt_opcode (pstate, BINOP_LEQ); }
2561 #line 2563 "c-exp.c" /* yacc.c:1646 */
2562  break;
2563 
2564  case 77:
2565 #line 684 "c-exp.y" /* yacc.c:1646 */
2566  { write_exp_elt_opcode (pstate, BINOP_GEQ); }
2567 #line 2569 "c-exp.c" /* yacc.c:1646 */
2568  break;
2569 
2570  case 78:
2571 #line 688 "c-exp.y" /* yacc.c:1646 */
2572  { write_exp_elt_opcode (pstate, BINOP_LESS); }
2573 #line 2575 "c-exp.c" /* yacc.c:1646 */
2574  break;
2575 
2576  case 79:
2577 #line 692 "c-exp.y" /* yacc.c:1646 */
2578  { write_exp_elt_opcode (pstate, BINOP_GTR); }
2579 #line 2581 "c-exp.c" /* yacc.c:1646 */
2580  break;
2581 
2582  case 80:
2583 #line 696 "c-exp.y" /* yacc.c:1646 */
2584  { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
2585 #line 2587 "c-exp.c" /* yacc.c:1646 */
2586  break;
2587 
2588  case 81:
2589 #line 700 "c-exp.y" /* yacc.c:1646 */
2590  { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
2591 #line 2593 "c-exp.c" /* yacc.c:1646 */
2592  break;
2593 
2594  case 82:
2595 #line 704 "c-exp.y" /* yacc.c:1646 */
2596  { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
2597 #line 2599 "c-exp.c" /* yacc.c:1646 */
2598  break;
2599 
2600  case 83:
2601 #line 708 "c-exp.y" /* yacc.c:1646 */
2602  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
2603 #line 2605 "c-exp.c" /* yacc.c:1646 */
2604  break;
2605 
2606  case 84:
2607 #line 712 "c-exp.y" /* yacc.c:1646 */
2608  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
2609 #line 2611 "c-exp.c" /* yacc.c:1646 */
2610  break;
2611 
2612  case 85:
2613 #line 716 "c-exp.y" /* yacc.c:1646 */
2614  { write_exp_elt_opcode (pstate, TERNOP_COND); }
2615 #line 2617 "c-exp.c" /* yacc.c:1646 */
2616  break;
2617 
2618  case 86:
2619 #line 720 "c-exp.y" /* yacc.c:1646 */
2620  { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
2621 #line 2623 "c-exp.c" /* yacc.c:1646 */
2622  break;
2623 
2624  case 87:
2625 #line 724 "c-exp.y" /* yacc.c:1646 */
2626  { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
2627  write_exp_elt_opcode (pstate, (yyvsp[-1].opcode));
2628  write_exp_elt_opcode (pstate,
2629  BINOP_ASSIGN_MODIFY); }
2630 #line 2632 "c-exp.c" /* yacc.c:1646 */
2631  break;
2632 
2633  case 88:
2634 #line 731 "c-exp.y" /* yacc.c:1646 */
2635  { write_exp_elt_opcode (pstate, OP_LONG);
2636  write_exp_elt_type (pstate, (yyvsp[0].typed_val_int).type);
2637  write_exp_elt_longcst (pstate, (LONGEST) ((yyvsp[0].typed_val_int).val));
2638  write_exp_elt_opcode (pstate, OP_LONG); }
2639 #line 2641 "c-exp.c" /* yacc.c:1646 */
2640  break;
2641 
2642  case 89:
2643 #line 738 "c-exp.y" /* yacc.c:1646 */
2644  {
2645  struct stoken_vector vec;
2646  vec.len = 1;
2647  vec.tokens = &(yyvsp[0].tsval);
2648  write_exp_string_vector (pstate, (yyvsp[0].tsval).type, &vec);
2649  }
2650 #line 2652 "c-exp.c" /* yacc.c:1646 */
2651  break;
2652 
2653  case 90:
2654 #line 747 "c-exp.y" /* yacc.c:1646 */
2655  { YYSTYPE val;
2656  parse_number (pstate, (yyvsp[0].ssym).stoken.ptr,
2657  (yyvsp[0].ssym).stoken.length, 0, &val);
2658  write_exp_elt_opcode (pstate, OP_LONG);
2659  write_exp_elt_type (pstate, val.typed_val_int.type);
2660  write_exp_elt_longcst (pstate,
2661  (LONGEST) val.typed_val_int.val);
2662  write_exp_elt_opcode (pstate, OP_LONG);
2663  }
2664 #line 2666 "c-exp.c" /* yacc.c:1646 */
2665  break;
2666 
2667  case 91:
2668 #line 760 "c-exp.y" /* yacc.c:1646 */
2669  { write_exp_elt_opcode (pstate, OP_DOUBLE);
2670  write_exp_elt_type (pstate, (yyvsp[0].typed_val_float).type);
2671  write_exp_elt_dblcst (pstate, (yyvsp[0].typed_val_float).dval);
2672  write_exp_elt_opcode (pstate, OP_DOUBLE); }
2673 #line 2675 "c-exp.c" /* yacc.c:1646 */
2674  break;
2675 
2676  case 92:
2677 #line 767 "c-exp.y" /* yacc.c:1646 */
2678  { write_exp_elt_opcode (pstate, OP_DECFLOAT);
2679  write_exp_elt_type (pstate, (yyvsp[0].typed_val_decfloat).type);
2680  write_exp_elt_decfloatcst (pstate, (yyvsp[0].typed_val_decfloat).val);
2681  write_exp_elt_opcode (pstate, OP_DECFLOAT); }
2682 #line 2684 "c-exp.c" /* yacc.c:1646 */
2683  break;
2684 
2685  case 94:
2686 #line 777 "c-exp.y" /* yacc.c:1646 */
2687  {
2688  write_dollar_variable (pstate, (yyvsp[0].sval));
2689  }
2690 #line 2692 "c-exp.c" /* yacc.c:1646 */
2691  break;
2692 
2693  case 95:
2694 #line 783 "c-exp.y" /* yacc.c:1646 */
2695  {
2696  write_exp_elt_opcode (pstate, OP_OBJC_SELECTOR);
2697  write_exp_string (pstate, (yyvsp[-1].sval));
2698  write_exp_elt_opcode (pstate, OP_OBJC_SELECTOR); }
2699 #line 2701 "c-exp.c" /* yacc.c:1646 */
2700  break;
2701 
2702  case 96:
2703 #line 790 "c-exp.y" /* yacc.c:1646 */
2704  { struct type *type = (yyvsp[-1].tval);
2705  write_exp_elt_opcode (pstate, OP_LONG);
2707  (parse_language (pstate),
2708  parse_gdbarch (pstate),
2709  "int"));
2710  CHECK_TYPEDEF (type);
2711 
2712  /* $5.3.3/2 of the C++ Standard (n3290 draft)
2713  says of sizeof: "When applied to a reference
2714  or a reference type, the result is the size of
2715  the referenced type." */
2716  if (TYPE_CODE (type) == TYPE_CODE_REF)
2717  type = check_typedef (TYPE_TARGET_TYPE (type));
2718  write_exp_elt_longcst (pstate,
2719  (LONGEST) TYPE_LENGTH (type));
2720  write_exp_elt_opcode (pstate, OP_LONG); }
2721 #line 2723 "c-exp.c" /* yacc.c:1646 */
2722  break;
2723 
2724  case 97:
2725 #line 810 "c-exp.y" /* yacc.c:1646 */
2726  { write_exp_elt_opcode (pstate,
2727  UNOP_REINTERPRET_CAST); }
2728 #line 2730 "c-exp.c" /* yacc.c:1646 */
2729  break;
2730 
2731  case 98:
2732 #line 815 "c-exp.y" /* yacc.c:1646 */
2733  { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
2734 #line 2736 "c-exp.c" /* yacc.c:1646 */
2735  break;
2736 
2737  case 99:
2738 #line 819 "c-exp.y" /* yacc.c:1646 */
2739  { write_exp_elt_opcode (pstate, UNOP_DYNAMIC_CAST); }
2740 #line 2742 "c-exp.c" /* yacc.c:1646 */
2741  break;
2742 
2743  case 100:
2744 #line 823 "c-exp.y" /* yacc.c:1646 */
2745  { /* We could do more error checking here, but
2746  it doesn't seem worthwhile. */
2747  write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
2748 #line 2750 "c-exp.c" /* yacc.c:1646 */
2749  break;
2750 
2751  case 101:
2752 #line 830 "c-exp.y" /* yacc.c:1646 */
2753  {
2754  /* We copy the string here, and not in the
2755  lexer, to guarantee that we do not leak a
2756  string. Note that we follow the
2757  NUL-termination convention of the
2758  lexer. */
2759  struct typed_stoken *vec = XNEW (struct typed_stoken);
2760  (yyval.svec).len = 1;
2761  (yyval.svec).tokens = vec;
2762 
2763  vec->type = (yyvsp[0].tsval).type;
2764  vec->length = (yyvsp[0].tsval).length;
2765  vec->ptr = xmalloc ((yyvsp[0].tsval).length + 1);
2766  memcpy (vec->ptr, (yyvsp[0].tsval).ptr, (yyvsp[0].tsval).length + 1);
2767  }
2768 #line 2770 "c-exp.c" /* yacc.c:1646 */
2769  break;
2770 
2771  case 102:
2772 #line 847 "c-exp.y" /* yacc.c:1646 */
2773  {
2774  /* Note that we NUL-terminate here, but just
2775  for convenience. */
2776  char *p;
2777  ++(yyval.svec).len;
2778  (yyval.svec).tokens = xrealloc ((yyval.svec).tokens,
2779  (yyval.svec).len * sizeof (struct typed_stoken));
2780 
2781  p = xmalloc ((yyvsp[0].tsval).length + 1);
2782  memcpy (p, (yyvsp[0].tsval).ptr, (yyvsp[0].tsval).length + 1);
2783 
2784  (yyval.svec).tokens[(yyval.svec).len - 1].type = (yyvsp[0].tsval).type;
2785  (yyval.svec).tokens[(yyval.svec).len - 1].length = (yyvsp[0].tsval).length;
2786  (yyval.svec).tokens[(yyval.svec).len - 1].ptr = p;
2787  }
2788 #line 2790 "c-exp.c" /* yacc.c:1646 */
2789  break;
2790 
2791  case 103:
2792 #line 865 "c-exp.y" /* yacc.c:1646 */
2793  {
2794  int i;
2795  enum c_string_type type = C_STRING;
2796 
2797  for (i = 0; i < (yyvsp[0].svec).len; ++i)
2798  {
2799  switch ((yyvsp[0].svec).tokens[i].type)
2800  {
2801  case C_STRING:
2802  break;
2803  case C_WIDE_STRING:
2804  case C_STRING_16:
2805  case C_STRING_32:
2806  if (type != C_STRING
2807  && type != (yyvsp[0].svec).tokens[i].type)
2808  error (_("Undefined string concatenation."));
2809  type = (yyvsp[0].svec).tokens[i].type;
2810  break;
2811  default:
2812  /* internal error */
2813  internal_error (__FILE__, __LINE__,
2814  "unrecognized type in string concatenation");
2815  }
2816  }
2817 
2818  write_exp_string_vector (pstate, type, &(yyvsp[0].svec));
2819  for (i = 0; i < (yyvsp[0].svec).len; ++i)
2820  xfree ((yyvsp[0].svec).tokens[i].ptr);
2821  xfree ((yyvsp[0].svec).tokens);
2822  }
2823 #line 2825 "c-exp.c" /* yacc.c:1646 */
2824  break;
2825 
2826  case 104:
2827 #line 900 "c-exp.y" /* yacc.c:1646 */
2828  { write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING);
2829  write_exp_string (pstate, (yyvsp[0].sval));
2830  write_exp_elt_opcode (pstate, OP_OBJC_NSSTRING); }
2831 #line 2833 "c-exp.c" /* yacc.c:1646 */
2832  break;
2833 
2834  case 105:
2835 #line 907 "c-exp.y" /* yacc.c:1646 */
2836  { write_exp_elt_opcode (pstate, OP_LONG);
2837  write_exp_elt_type (pstate,
2838  parse_type (pstate)->builtin_bool);
2839  write_exp_elt_longcst (pstate, (LONGEST) 1);
2840  write_exp_elt_opcode (pstate, OP_LONG); }
2841 #line 2843 "c-exp.c" /* yacc.c:1646 */
2842  break;
2843 
2844  case 106:
2845 #line 915 "c-exp.y" /* yacc.c:1646 */
2846  { write_exp_elt_opcode (pstate, OP_LONG);
2847  write_exp_elt_type (pstate,
2848  parse_type (pstate)->builtin_bool);
2849  write_exp_elt_longcst (pstate, (LONGEST) 0);
2850  write_exp_elt_opcode (pstate, OP_LONG); }
2851 #line 2853 "c-exp.c" /* yacc.c:1646 */
2852  break;
2853 
2854  case 107:
2855 #line 925 "c-exp.y" /* yacc.c:1646 */
2856  {
2857  if ((yyvsp[0].ssym).sym)
2858  (yyval.bval) = SYMBOL_BLOCK_VALUE ((yyvsp[0].ssym).sym);
2859  else
2860  error (_("No file or function \"%s\"."),
2861  copy_name ((yyvsp[0].ssym).stoken));
2862  }
2863 #line 2865 "c-exp.c" /* yacc.c:1646 */
2864  break;
2865 
2866  case 108:
2867 #line 933 "c-exp.y" /* yacc.c:1646 */
2868  {
2869  (yyval.bval) = (yyvsp[0].bval);
2870  }
2871 #line 2873 "c-exp.c" /* yacc.c:1646 */
2872  break;
2873 
2874  case 109:
2875 #line 939 "c-exp.y" /* yacc.c:1646 */
2876  { struct symbol *tem
2877  = lookup_symbol (copy_name ((yyvsp[0].sval)), (yyvsp[-2].bval),
2878  VAR_DOMAIN, NULL);
2879  if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
2880  error (_("No function \"%s\" in specified context."),
2881  copy_name ((yyvsp[0].sval)));
2882  (yyval.bval) = SYMBOL_BLOCK_VALUE (tem); }
2883 #line 2885 "c-exp.c" /* yacc.c:1646 */
2884  break;
2885 
2886  case 110:
2887 #line 949 "c-exp.y" /* yacc.c:1646 */
2888  { struct symbol *sym = (yyvsp[-1].ssym).sym;
2889 
2890  if (sym == NULL || !SYMBOL_IS_ARGUMENT (sym)
2891  || !symbol_read_needs_frame (sym))
2892  error (_("@entry can be used only for function "
2893  "parameters, not for \"%s\""),
2894  copy_name ((yyvsp[-1].ssym).stoken));
2895 
2896  write_exp_elt_opcode (pstate, OP_VAR_ENTRY_VALUE);
2897  write_exp_elt_sym (pstate, sym);
2898  write_exp_elt_opcode (pstate, OP_VAR_ENTRY_VALUE);
2899  }
2900 #line 2902 "c-exp.c" /* yacc.c:1646 */
2901  break;
2902 
2903  case 111:
2904 #line 964 "c-exp.y" /* yacc.c:1646 */
2905  { struct symbol *sym;
2906  sym = lookup_symbol (copy_name ((yyvsp[0].sval)), (yyvsp[-2].bval),
2907  VAR_DOMAIN, NULL);
2908  if (sym == 0)
2909  error (_("No symbol \"%s\" in specified context."),
2910  copy_name ((yyvsp[0].sval)));
2911  if (symbol_read_needs_frame (sym))
2912  {
2913  if (innermost_block == 0
2915  innermost_block))
2917  }
2918 
2919  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
2920  /* block_found is set by lookup_symbol. */
2921  write_exp_elt_block (pstate, block_found);
2922  write_exp_elt_sym (pstate, sym);
2923  write_exp_elt_opcode (pstate, OP_VAR_VALUE); }
2924 #line 2926 "c-exp.c" /* yacc.c:1646 */
2925  break;
2926 
2927  case 112:
2928 #line 986 "c-exp.y" /* yacc.c:1646 */
2929  {
2930  struct type *type = (yyvsp[-2].tsym).type;
2931  CHECK_TYPEDEF (type);
2932  if (!type_aggregate_p (type))
2933  error (_("`%s' is not defined as an aggregate type."),
2934  TYPE_SAFE_NAME (type));
2935 
2936  write_exp_elt_opcode (pstate, OP_SCOPE);
2937  write_exp_elt_type (pstate, type);
2938  write_exp_string (pstate, (yyvsp[0].sval));
2939  write_exp_elt_opcode (pstate, OP_SCOPE);
2940  }
2941 #line 2943 "c-exp.c" /* yacc.c:1646 */
2942  break;
2943 
2944  case 113:
2945 #line 999 "c-exp.y" /* yacc.c:1646 */
2946  {
2947  struct type *type = (yyvsp[-3].tsym).type;
2948  struct stoken tmp_token;
2949  char *buf;
2950 
2951  CHECK_TYPEDEF (type);
2952  if (!type_aggregate_p (type))
2953  error (_("`%s' is not defined as an aggregate type."),
2954  TYPE_SAFE_NAME (type));
2955  buf = alloca ((yyvsp[0].sval).length + 2);
2956  tmp_token.ptr = buf;
2957  tmp_token.length = (yyvsp[0].sval).length + 1;
2958  buf[0] = '~';
2959  memcpy (buf+1, (yyvsp[0].sval).ptr, (yyvsp[0].sval).length);
2960  buf[tmp_token.length] = 0;
2961 
2962  /* Check for valid destructor name. */
2963  destructor_name_p (tmp_token.ptr, (yyvsp[-3].tsym).type);
2964  write_exp_elt_opcode (pstate, OP_SCOPE);
2965  write_exp_elt_type (pstate, type);
2966  write_exp_string (pstate, tmp_token);
2967  write_exp_elt_opcode (pstate, OP_SCOPE);
2968  }
2969 #line 2971 "c-exp.c" /* yacc.c:1646 */
2970  break;
2971 
2972  case 114:
2973 #line 1023 "c-exp.y" /* yacc.c:1646 */
2974  {
2975  char *copy = copy_name ((yyvsp[-2].sval));
2976  error (_("No type \"%s\" within class "
2977  "or namespace \"%s\"."),
2978  copy, TYPE_SAFE_NAME ((yyvsp[-4].tsym).type));
2979  }
2980 #line 2982 "c-exp.c" /* yacc.c:1646 */
2981  break;
2982 
2983  case 116:
2984 #line 1033 "c-exp.y" /* yacc.c:1646 */
2985  {
2986  char *name = copy_name ((yyvsp[0].ssym).stoken);
2987  struct symbol *sym;
2988  struct bound_minimal_symbol msymbol;
2989 
2990  sym =
2991  lookup_symbol (name, (const struct block *) NULL,
2992  VAR_DOMAIN, NULL);
2993  if (sym)
2994  {
2995  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
2996  write_exp_elt_block (pstate, NULL);
2997  write_exp_elt_sym (pstate, sym);
2998  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
2999  break;
3000  }
3001 
3002  msymbol = lookup_bound_minimal_symbol (name);
3003  if (msymbol.minsym != NULL)
3004  write_exp_msymbol (pstate, msymbol);
3005  else if (!have_full_symbols () && !have_partial_symbols ())
3006  error (_("No symbol table is loaded. Use the \"file\" command."));
3007  else
3008  error (_("No symbol \"%s\" in current context."), name);
3009  }
3010 #line 3012 "c-exp.c" /* yacc.c:1646 */
3011  break;
3012 
3013  case 117:
3014 #line 1061 "c-exp.y" /* yacc.c:1646 */
3015  { struct symbol *sym = (yyvsp[0].ssym).sym;
3016 
3017  if (sym)
3018  {
3019  if (symbol_read_needs_frame (sym))
3020  {
3021  if (innermost_block == 0
3023  innermost_block))
3025  }
3026 
3027  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
3028  /* We want to use the selected frame, not
3029  another more inner frame which happens to
3030  be in the same block. */
3031  write_exp_elt_block (pstate, NULL);
3032  write_exp_elt_sym (pstate, sym);
3033  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
3034  }
3035  else if ((yyvsp[0].ssym).is_a_field_of_this)
3036  {
3037  /* C++: it hangs off of `this'. Must
3038  not inadvertently convert from a method call
3039  to data ref. */
3040  if (innermost_block == 0
3042  innermost_block))
3044  write_exp_elt_opcode (pstate, OP_THIS);
3045  write_exp_elt_opcode (pstate, OP_THIS);
3046  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
3047  write_exp_string (pstate, (yyvsp[0].ssym).stoken);
3048  write_exp_elt_opcode (pstate, STRUCTOP_PTR);
3049  }
3050  else
3051  {
3052  struct bound_minimal_symbol msymbol;
3053  char *arg = copy_name ((yyvsp[0].ssym).stoken);
3054 
3055  msymbol =
3057  if (msymbol.minsym != NULL)
3058  write_exp_msymbol (pstate, msymbol);
3059  else if (!have_full_symbols () && !have_partial_symbols ())
3060  error (_("No symbol table is loaded. Use the \"file\" command."));
3061  else
3062  error (_("No symbol \"%s\" in current context."),
3063  copy_name ((yyvsp[0].ssym).stoken));
3064  }
3065  }
3066 #line 3068 "c-exp.c" /* yacc.c:1646 */
3067  break;
3068 
3069  case 118:
3070 #line 1115 "c-exp.y" /* yacc.c:1646 */
3071  { insert_type_address_space (pstate, copy_name ((yyvsp[0].ssym).stoken)); }
3072 #line 3074 "c-exp.c" /* yacc.c:1646 */
3073  break;
3074 
3075  case 126:
3076 #line 1136 "c-exp.y" /* yacc.c:1646 */
3077  { insert_type (tp_pointer); }
3078 #line 3080 "c-exp.c" /* yacc.c:1646 */
3079  break;
3080 
3081  case 128:
3082 #line 1139 "c-exp.y" /* yacc.c:1646 */
3083  { insert_type (tp_pointer); }
3084 #line 3086 "c-exp.c" /* yacc.c:1646 */
3085  break;
3086 
3087  case 130:
3088 #line 1142 "c-exp.y" /* yacc.c:1646 */
3089  { insert_type (tp_reference); }
3090 #line 3092 "c-exp.c" /* yacc.c:1646 */
3091  break;
3092 
3093  case 131:
3094 #line 1144 "c-exp.y" /* yacc.c:1646 */
3095  { insert_type (tp_reference); }
3096 #line 3098 "c-exp.c" /* yacc.c:1646 */
3097  break;
3098 
3099  case 132:
3100 #line 1148 "c-exp.y" /* yacc.c:1646 */
3101  {
3102  (yyval.type_stack) = get_type_stack ();
3103  /* This cleanup is eventually run by
3104  c_parse. */
3105  make_cleanup (type_stack_cleanup, (yyval.type_stack));
3106  }
3107 #line 3109 "c-exp.c" /* yacc.c:1646 */
3108  break;
3109 
3110  case 133:
3111 #line 1157 "c-exp.y" /* yacc.c:1646 */
3112  { (yyval.type_stack) = append_type_stack ((yyvsp[0].type_stack), (yyvsp[-1].type_stack)); }
3113 #line 3115 "c-exp.c" /* yacc.c:1646 */
3114  break;
3115 
3116  case 136:
3117 #line 1163 "c-exp.y" /* yacc.c:1646 */
3118  { (yyval.type_stack) = (yyvsp[-1].type_stack); }
3119 #line 3121 "c-exp.c" /* yacc.c:1646 */
3120  break;
3121 
3122  case 137:
3123 #line 1165 "c-exp.y" /* yacc.c:1646 */
3124  {
3125  push_type_stack ((yyvsp[-1].type_stack));
3126  push_type_int ((yyvsp[0].lval));
3127  push_type (tp_array);
3128  (yyval.type_stack) = get_type_stack ();
3129  }
3130 #line 3132 "c-exp.c" /* yacc.c:1646 */
3131  break;
3132 
3133  case 138:
3134 #line 1172 "c-exp.y" /* yacc.c:1646 */
3135  {
3136  push_type_int ((yyvsp[0].lval));
3137  push_type (tp_array);
3138  (yyval.type_stack) = get_type_stack ();
3139  }
3140 #line 3142 "c-exp.c" /* yacc.c:1646 */
3141  break;
3142 
3143  case 139:
3144 #line 1179 "c-exp.y" /* yacc.c:1646 */
3145  {
3146  push_type_stack ((yyvsp[-1].type_stack));
3147  push_typelist ((yyvsp[0].tvec));
3148  (yyval.type_stack) = get_type_stack ();
3149  }
3150 #line 3152 "c-exp.c" /* yacc.c:1646 */
3151  break;
3152 
3153  case 140:
3154 #line 1185 "c-exp.y" /* yacc.c:1646 */
3155  {
3156  push_typelist ((yyvsp[0].tvec));
3157  (yyval.type_stack) = get_type_stack ();
3158  }
3159 #line 3161 "c-exp.c" /* yacc.c:1646 */
3160  break;
3161 
3162  case 141:
3163 #line 1192 "c-exp.y" /* yacc.c:1646 */
3164  { (yyval.lval) = -1; }
3165 #line 3167 "c-exp.c" /* yacc.c:1646 */
3166  break;
3167 
3168  case 142:
3169 #line 1194 "c-exp.y" /* yacc.c:1646 */
3170  { (yyval.lval) = -1; }
3171 #line 3173 "c-exp.c" /* yacc.c:1646 */
3172  break;
3173 
3174  case 143:
3175 #line 1196 "c-exp.y" /* yacc.c:1646 */
3176  { (yyval.lval) = (yyvsp[-1].typed_val_int).val; }
3177 #line 3179 "c-exp.c" /* yacc.c:1646 */
3178  break;
3179 
3180  case 144:
3181 #line 1198 "c-exp.y" /* yacc.c:1646 */
3182  { (yyval.lval) = (yyvsp[-1].typed_val_int).val; }
3183 #line 3185 "c-exp.c" /* yacc.c:1646 */
3184  break;
3185 
3186  case 145:
3187 #line 1202 "c-exp.y" /* yacc.c:1646 */
3188  { (yyval.tvec) = NULL; }
3189 #line 3191 "c-exp.c" /* yacc.c:1646 */
3190  break;
3191 
3192  case 146:
3193 #line 1204 "c-exp.y" /* yacc.c:1646 */
3194  { (yyval.tvec) = (yyvsp[-1].tvec); }
3195 #line 3197 "c-exp.c" /* yacc.c:1646 */
3196  break;
3197 
3198  case 148:
3199 #line 1220 "c-exp.y" /* yacc.c:1646 */
3200  { (yyval.tval) = (yyvsp[0].tsym).type; }
3201 #line 3203 "c-exp.c" /* yacc.c:1646 */
3202  break;
3203 
3204  case 149:
3205 #line 1222 "c-exp.y" /* yacc.c:1646 */
3206  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3207  parse_gdbarch (pstate),
3208  "int"); }
3209 #line 3211 "c-exp.c" /* yacc.c:1646 */
3210  break;
3211 
3212  case 150:
3213 #line 1226 "c-exp.y" /* yacc.c:1646 */
3214  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3215  parse_gdbarch (pstate),
3216  "long"); }
3217 #line 3219 "c-exp.c" /* yacc.c:1646 */
3218  break;
3219 
3220  case 151:
3221 #line 1230 "c-exp.y" /* yacc.c:1646 */
3222  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3223  parse_gdbarch (pstate),
3224  "short"); }
3225 #line 3227 "c-exp.c" /* yacc.c:1646 */
3226  break;
3227 
3228  case 152:
3229 #line 1234 "c-exp.y" /* yacc.c:1646 */
3230  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3231  parse_gdbarch (pstate),
3232  "long"); }
3233 #line 3235 "c-exp.c" /* yacc.c:1646 */
3234  break;
3235 
3236  case 153:
3237 #line 1238 "c-exp.y" /* yacc.c:1646 */
3238  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3239  parse_gdbarch (pstate),
3240  "long"); }
3241 #line 3243 "c-exp.c" /* yacc.c:1646 */
3242  break;
3243 
3244  case 154:
3245 #line 1242 "c-exp.y" /* yacc.c:1646 */
3246  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3247  parse_gdbarch (pstate),
3248  "long"); }
3249 #line 3251 "c-exp.c" /* yacc.c:1646 */
3250  break;
3251 
3252  case 155:
3253 #line 1246 "c-exp.y" /* yacc.c:1646 */
3254  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3255  parse_gdbarch (pstate),
3256  "long"); }
3257 #line 3259 "c-exp.c" /* yacc.c:1646 */
3258  break;
3259 
3260  case 156:
3261 #line 1250 "c-exp.y" /* yacc.c:1646 */
3262  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3263  parse_gdbarch (pstate),
3264  "long"); }
3265 #line 3267 "c-exp.c" /* yacc.c:1646 */
3266  break;
3267 
3268  case 157:
3269 #line 1254 "c-exp.y" /* yacc.c:1646 */
3270  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3271  parse_gdbarch (pstate),
3272  "long"); }
3273 #line 3275 "c-exp.c" /* yacc.c:1646 */
3274  break;
3275 
3276  case 158:
3277 #line 1258 "c-exp.y" /* yacc.c:1646 */
3278  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3279  parse_gdbarch (pstate),
3280  "long"); }
3281 #line 3283 "c-exp.c" /* yacc.c:1646 */
3282  break;
3283 
3284  case 159:
3285 #line 1262 "c-exp.y" /* yacc.c:1646 */
3286  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3287  parse_gdbarch (pstate),
3288  "long long"); }
3289 #line 3291 "c-exp.c" /* yacc.c:1646 */
3290  break;
3291 
3292  case 160:
3293 #line 1266 "c-exp.y" /* yacc.c:1646 */
3294  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3295  parse_gdbarch (pstate),
3296  "long long"); }
3297 #line 3299 "c-exp.c" /* yacc.c:1646 */
3298  break;
3299 
3300  case 161:
3301 #line 1270 "c-exp.y" /* yacc.c:1646 */
3302  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3303  parse_gdbarch (pstate),
3304  "long long"); }
3305 #line 3307 "c-exp.c" /* yacc.c:1646 */
3306  break;
3307 
3308  case 162:
3309 #line 1274 "c-exp.y" /* yacc.c:1646 */
3310  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3311  parse_gdbarch (pstate),
3312  "long long"); }
3313 #line 3315 "c-exp.c" /* yacc.c:1646 */
3314  break;
3315 
3316  case 163:
3317 #line 1278 "c-exp.y" /* yacc.c:1646 */
3318  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3319  parse_gdbarch (pstate),
3320  "long long"); }
3321 #line 3323 "c-exp.c" /* yacc.c:1646 */
3322  break;
3323 
3324  case 164:
3325 #line 1282 "c-exp.y" /* yacc.c:1646 */
3326  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3327  parse_gdbarch (pstate),
3328  "long long"); }
3329 #line 3331 "c-exp.c" /* yacc.c:1646 */
3330  break;
3331 
3332  case 165:
3333 #line 1286 "c-exp.y" /* yacc.c:1646 */
3334  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3335  parse_gdbarch (pstate),
3336  "long long"); }
3337 #line 3339 "c-exp.c" /* yacc.c:1646 */
3338  break;
3339 
3340  case 166:
3341 #line 1290 "c-exp.y" /* yacc.c:1646 */
3342  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3343  parse_gdbarch (pstate),
3344  "long long"); }
3345 #line 3347 "c-exp.c" /* yacc.c:1646 */
3346  break;
3347 
3348  case 167:
3349 #line 1294 "c-exp.y" /* yacc.c:1646 */
3350  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3351  parse_gdbarch (pstate),
3352  "long long"); }
3353 #line 3355 "c-exp.c" /* yacc.c:1646 */
3354  break;
3355 
3356  case 168:
3357 #line 1298 "c-exp.y" /* yacc.c:1646 */
3358  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3359  parse_gdbarch (pstate),
3360  "long long"); }
3361 #line 3363 "c-exp.c" /* yacc.c:1646 */
3362  break;
3363 
3364  case 169:
3365 #line 1302 "c-exp.y" /* yacc.c:1646 */
3366  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3367  parse_gdbarch (pstate),
3368  "short"); }
3369 #line 3371 "c-exp.c" /* yacc.c:1646 */
3370  break;
3371 
3372  case 170:
3373 #line 1306 "c-exp.y" /* yacc.c:1646 */
3374  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3375  parse_gdbarch (pstate),
3376  "short"); }
3377 #line 3379 "c-exp.c" /* yacc.c:1646 */
3378  break;
3379 
3380  case 171:
3381 #line 1310 "c-exp.y" /* yacc.c:1646 */
3382  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3383  parse_gdbarch (pstate),
3384  "short"); }
3385 #line 3387 "c-exp.c" /* yacc.c:1646 */
3386  break;
3387 
3388  case 172:
3389 #line 1314 "c-exp.y" /* yacc.c:1646 */
3390  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3391  parse_gdbarch (pstate),
3392  "short"); }
3393 #line 3395 "c-exp.c" /* yacc.c:1646 */
3394  break;
3395 
3396  case 173:
3397 #line 1318 "c-exp.y" /* yacc.c:1646 */
3398  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3399  parse_gdbarch (pstate),
3400  "short"); }
3401 #line 3403 "c-exp.c" /* yacc.c:1646 */
3402  break;
3403 
3404  case 174:
3405 #line 1322 "c-exp.y" /* yacc.c:1646 */
3406  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3407  parse_gdbarch (pstate),
3408  "short"); }
3409 #line 3411 "c-exp.c" /* yacc.c:1646 */
3410  break;
3411 
3412  case 175:
3413 #line 1326 "c-exp.y" /* yacc.c:1646 */
3414  { (yyval.tval) = lookup_typename (parse_language (pstate),
3415  parse_gdbarch (pstate),
3416  "double",
3417  (struct block *) NULL,
3418  0); }
3419 #line 3421 "c-exp.c" /* yacc.c:1646 */
3420  break;
3421 
3422  case 176:
3423 #line 1332 "c-exp.y" /* yacc.c:1646 */
3424  { (yyval.tval) = lookup_typename (parse_language (pstate),
3425  parse_gdbarch (pstate),
3426  "long double",
3427  (struct block *) NULL,
3428  0); }
3429 #line 3431 "c-exp.c" /* yacc.c:1646 */
3430  break;
3431 
3432  case 177:
3433 #line 1338 "c-exp.y" /* yacc.c:1646 */
3434  { (yyval.tval) = lookup_struct (copy_name ((yyvsp[0].sval)),
3436 #line 3438 "c-exp.c" /* yacc.c:1646 */
3437  break;
3438 
3439  case 178:
3440 #line 1341 "c-exp.y" /* yacc.c:1646 */
3441  {
3443  (yyval.tval) = NULL;
3444  }
3445 #line 3447 "c-exp.c" /* yacc.c:1646 */
3446  break;
3447 
3448  case 179:
3449 #line 1346 "c-exp.y" /* yacc.c:1646 */
3450  {
3451  mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[-1].sval).ptr,
3452  (yyvsp[-1].sval).length);
3453  (yyval.tval) = NULL;
3454  }
3455 #line 3457 "c-exp.c" /* yacc.c:1646 */
3456  break;
3457 
3458  case 180:
3459 #line 1352 "c-exp.y" /* yacc.c:1646 */
3460  { (yyval.tval) = lookup_struct (copy_name ((yyvsp[0].sval)),
3462 #line 3464 "c-exp.c" /* yacc.c:1646 */
3463  break;
3464 
3465  case 181:
3466 #line 1355 "c-exp.y" /* yacc.c:1646 */
3467  {
3469  (yyval.tval) = NULL;
3470  }
3471 #line 3473 "c-exp.c" /* yacc.c:1646 */
3472  break;
3473 
3474  case 182:
3475 #line 1360 "c-exp.y" /* yacc.c:1646 */
3476  {
3477  mark_completion_tag (TYPE_CODE_STRUCT, (yyvsp[-1].sval).ptr,
3478  (yyvsp[-1].sval).length);
3479  (yyval.tval) = NULL;
3480  }
3481 #line 3483 "c-exp.c" /* yacc.c:1646 */
3482  break;
3483 
3484  case 183:
3485 #line 1366 "c-exp.y" /* yacc.c:1646 */
3486  { (yyval.tval) = lookup_union (copy_name ((yyvsp[0].sval)),
3488 #line 3490 "c-exp.c" /* yacc.c:1646 */
3489  break;
3490 
3491  case 184:
3492 #line 1369 "c-exp.y" /* yacc.c:1646 */
3493  {
3495  (yyval.tval) = NULL;
3496  }
3497 #line 3499 "c-exp.c" /* yacc.c:1646 */
3498  break;
3499 
3500  case 185:
3501 #line 1374 "c-exp.y" /* yacc.c:1646 */
3502  {
3503  mark_completion_tag (TYPE_CODE_UNION, (yyvsp[-1].sval).ptr,
3504  (yyvsp[-1].sval).length);
3505  (yyval.tval) = NULL;
3506  }
3507 #line 3509 "c-exp.c" /* yacc.c:1646 */
3508  break;
3509 
3510  case 186:
3511 #line 1380 "c-exp.y" /* yacc.c:1646 */
3512  { (yyval.tval) = lookup_enum (copy_name ((yyvsp[0].sval)),
3514 #line 3516 "c-exp.c" /* yacc.c:1646 */
3515  break;
3516 
3517  case 187:
3518 #line 1383 "c-exp.y" /* yacc.c:1646 */
3519  {
3521  (yyval.tval) = NULL;
3522  }
3523 #line 3525 "c-exp.c" /* yacc.c:1646 */
3524  break;
3525 
3526  case 188:
3527 #line 1388 "c-exp.y" /* yacc.c:1646 */
3528  {
3529  mark_completion_tag (TYPE_CODE_ENUM, (yyvsp[-1].sval).ptr,
3530  (yyvsp[-1].sval).length);
3531  (yyval.tval) = NULL;
3532  }
3533 #line 3535 "c-exp.c" /* yacc.c:1646 */
3534  break;
3535 
3536  case 189:
3537 #line 1394 "c-exp.y" /* yacc.c:1646 */
3538  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3539  parse_gdbarch (pstate),
3540  TYPE_NAME((yyvsp[0].tsym).type)); }
3541 #line 3543 "c-exp.c" /* yacc.c:1646 */
3542  break;
3543 
3544  case 190:
3545 #line 1398 "c-exp.y" /* yacc.c:1646 */
3546  { (yyval.tval) = lookup_unsigned_typename (parse_language (pstate),
3547  parse_gdbarch (pstate),
3548  "int"); }
3549 #line 3551 "c-exp.c" /* yacc.c:1646 */
3550  break;
3551 
3552  case 191:
3553 #line 1402 "c-exp.y" /* yacc.c:1646 */
3554  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3555  parse_gdbarch (pstate),
3556  TYPE_NAME((yyvsp[0].tsym).type)); }
3557 #line 3559 "c-exp.c" /* yacc.c:1646 */
3558  break;
3559 
3560  case 192:
3561 #line 1406 "c-exp.y" /* yacc.c:1646 */
3562  { (yyval.tval) = lookup_signed_typename (parse_language (pstate),
3563  parse_gdbarch (pstate),
3564  "int"); }
3565 #line 3567 "c-exp.c" /* yacc.c:1646 */
3566  break;
3567 
3568  case 193:
3569 #line 1413 "c-exp.y" /* yacc.c:1646 */
3570  { (yyval.tval) = lookup_template_type(copy_name((yyvsp[-3].sval)), (yyvsp[-1].tval),
3572  }
3573 #line 3575 "c-exp.c" /* yacc.c:1646 */
3574  break;
3575 
3576  case 194:
3577 #line 1417 "c-exp.y" /* yacc.c:1646 */
3578  { (yyval.tval) = follow_types ((yyvsp[0].tval)); }
3579 #line 3581 "c-exp.c" /* yacc.c:1646 */
3580  break;
3581 
3582  case 195:
3583 #line 1419 "c-exp.y" /* yacc.c:1646 */
3584  { (yyval.tval) = follow_types ((yyvsp[-1].tval)); }
3585 #line 3587 "c-exp.c" /* yacc.c:1646 */
3586  break;
3587 
3588  case 197:
3589 #line 1424 "c-exp.y" /* yacc.c:1646 */
3590  {
3591  (yyval.tsym).stoken.ptr = "int";
3592  (yyval.tsym).stoken.length = 3;
3593  (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
3594  parse_gdbarch (pstate),
3595  "int");
3596  }
3597 #line 3599 "c-exp.c" /* yacc.c:1646 */
3598  break;
3599 
3600  case 198:
3601 #line 1432 "c-exp.y" /* yacc.c:1646 */
3602  {
3603  (yyval.tsym).stoken.ptr = "long";
3604  (yyval.tsym).stoken.length = 4;
3605  (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
3606  parse_gdbarch (pstate),
3607  "long");
3608  }
3609 #line 3611 "c-exp.c" /* yacc.c:1646 */
3610  break;
3611 
3612  case 199:
3613 #line 1440 "c-exp.y" /* yacc.c:1646 */
3614  {
3615  (yyval.tsym).stoken.ptr = "short";
3616  (yyval.tsym).stoken.length = 5;
3617  (yyval.tsym).type = lookup_signed_typename (parse_language (pstate),
3618  parse_gdbarch (pstate),
3619  "short");
3620  }
3621 #line 3623 "c-exp.c" /* yacc.c:1646 */
3622  break;
3623 
3624  case 200:
3625 #line 1451 "c-exp.y" /* yacc.c:1646 */
3626  { check_parameter_typelist ((yyvsp[0].tvec)); }
3627 #line 3629 "c-exp.c" /* yacc.c:1646 */
3628  break;
3629 
3630  case 201:
3631 #line 1453 "c-exp.y" /* yacc.c:1646 */
3632  {
3633  VEC_safe_push (type_ptr, (yyvsp[-2].tvec), NULL);
3634  check_parameter_typelist ((yyvsp[-2].tvec));
3635  (yyval.tvec) = (yyvsp[-2].tvec);
3636  }
3637 #line 3639 "c-exp.c" /* yacc.c:1646 */
3638  break;
3639 
3640  case 202:
3641 #line 1462 "c-exp.y" /* yacc.c:1646 */
3642  {
3643  VEC (type_ptr) *typelist = NULL;
3644  VEC_safe_push (type_ptr, typelist, (yyvsp[0].tval));
3645  (yyval.tvec) = typelist;
3646  }
3647 #line 3649 "c-exp.c" /* yacc.c:1646 */
3648  break;
3649 
3650  case 203:
3651 #line 1468 "c-exp.y" /* yacc.c:1646 */
3652  {
3653  VEC_safe_push (type_ptr, (yyvsp[-2].tvec), (yyvsp[0].tval));
3654  (yyval.tvec) = (yyvsp[-2].tvec);
3655  }
3656 #line 3658 "c-exp.c" /* yacc.c:1646 */
3657  break;
3658 
3659  case 205:
3660 #line 1476 "c-exp.y" /* yacc.c:1646 */
3661  {
3662  push_type_stack ((yyvsp[0].type_stack));
3663  (yyval.tval) = follow_types ((yyvsp[-1].tval));
3664  }
3665 #line 3667 "c-exp.c" /* yacc.c:1646 */
3666  break;
3667 
3668  case 206:
3669 #line 1483 "c-exp.y" /* yacc.c:1646 */
3670  { (yyval.tval) = follow_types ((yyvsp[-1].tval)); }
3671 #line 3673 "c-exp.c" /* yacc.c:1646 */
3672  break;
3673 
3674  case 211:
3675 #line 1495 "c-exp.y" /* yacc.c:1646 */
3676  { insert_type (tp_const);
3678  }
3679 #line 3681 "c-exp.c" /* yacc.c:1646 */
3680  break;
3681 
3682  case 212:
3683 #line 1499 "c-exp.y" /* yacc.c:1646 */
3684  { insert_type (tp_const); }
3685 #line 3687 "c-exp.c" /* yacc.c:1646 */
3686  break;
3687 
3688  case 213:
3689 #line 1501 "c-exp.y" /* yacc.c:1646 */
3690  { insert_type (tp_volatile); }
3691 #line 3693 "c-exp.c" /* yacc.c:1646 */
3692  break;
3693 
3694  case 214:
3695 #line 1505 "c-exp.y" /* yacc.c:1646 */
3696  { (yyval.sval) = operator_stoken (" new"); }
3697 #line 3699 "c-exp.c" /* yacc.c:1646 */
3698  break;
3699 
3700  case 215:
3701 #line 1507 "c-exp.y" /* yacc.c:1646 */
3702  { (yyval.sval) = operator_stoken (" delete"); }
3703 #line 3705 "c-exp.c" /* yacc.c:1646 */
3704  break;
3705 
3706  case 216:
3707 #line 1509 "c-exp.y" /* yacc.c:1646 */
3708  { (yyval.sval) = operator_stoken (" new[]"); }
3709 #line 3711 "c-exp.c" /* yacc.c:1646 */
3710  break;
3711 
3712  case 217:
3713 #line 1511 "c-exp.y" /* yacc.c:1646 */
3714  { (yyval.sval) = operator_stoken (" delete[]"); }
3715 #line 3717 "c-exp.c" /* yacc.c:1646 */
3716  break;
3717 
3718  case 218:
3719 #line 1513 "c-exp.y" /* yacc.c:1646 */
3720  { (yyval.sval) = operator_stoken (" new[]"); }
3721 #line 3723 "c-exp.c" /* yacc.c:1646 */
3722  break;
3723 
3724  case 219:
3725 #line 1515 "c-exp.y" /* yacc.c:1646 */
3726  { (yyval.sval) = operator_stoken (" delete[]"); }
3727 #line 3729 "c-exp.c" /* yacc.c:1646 */
3728  break;
3729 
3730  case 220:
3731 #line 1517 "c-exp.y" /* yacc.c:1646 */
3732  { (yyval.sval) = operator_stoken ("+"); }
3733 #line 3735 "c-exp.c" /* yacc.c:1646 */
3734  break;
3735 
3736  case 221:
3737 #line 1519 "c-exp.y" /* yacc.c:1646 */
3738  { (yyval.sval) = operator_stoken ("-"); }
3739 #line 3741 "c-exp.c" /* yacc.c:1646 */
3740  break;
3741 
3742  case 222:
3743 #line 1521 "c-exp.y" /* yacc.c:1646 */
3744  { (yyval.sval) = operator_stoken ("*"); }
3745 #line 3747 "c-exp.c" /* yacc.c:1646 */
3746  break;
3747 
3748  case 223:
3749 #line 1523 "c-exp.y" /* yacc.c:1646 */
3750  { (yyval.sval) = operator_stoken ("/"); }
3751 #line 3753 "c-exp.c" /* yacc.c:1646 */
3752  break;
3753 
3754  case 224:
3755 #line 1525 "c-exp.y" /* yacc.c:1646 */
3756  { (yyval.sval) = operator_stoken ("%"); }
3757 #line 3759 "c-exp.c" /* yacc.c:1646 */
3758  break;
3759 
3760  case 225:
3761 #line 1527 "c-exp.y" /* yacc.c:1646 */
3762  { (yyval.sval) = operator_stoken ("^"); }
3763 #line 3765 "c-exp.c" /* yacc.c:1646 */
3764  break;
3765 
3766  case 226:
3767 #line 1529 "c-exp.y" /* yacc.c:1646 */
3768  { (yyval.sval) = operator_stoken ("&"); }
3769 #line 3771 "c-exp.c" /* yacc.c:1646 */
3770  break;
3771 
3772  case 227:
3773 #line 1531 "c-exp.y" /* yacc.c:1646 */
3774  { (yyval.sval) = operator_stoken ("|"); }
3775 #line 3777 "c-exp.c" /* yacc.c:1646 */
3776  break;
3777 
3778  case 228:
3779 #line 1533 "c-exp.y" /* yacc.c:1646 */
3780  { (yyval.sval) = operator_stoken ("~"); }
3781 #line 3783 "c-exp.c" /* yacc.c:1646 */
3782  break;
3783 
3784  case 229:
3785 #line 1535 "c-exp.y" /* yacc.c:1646 */
3786  { (yyval.sval) = operator_stoken ("!"); }
3787 #line 3789 "c-exp.c" /* yacc.c:1646 */
3788  break;
3789 
3790  case 230:
3791 #line 1537 "c-exp.y" /* yacc.c:1646 */
3792  { (yyval.sval) = operator_stoken ("="); }
3793 #line 3795 "c-exp.c" /* yacc.c:1646 */
3794  break;
3795 
3796  case 231:
3797 #line 1539 "c-exp.y" /* yacc.c:1646 */
3798  { (yyval.sval) = operator_stoken ("<"); }
3799 #line 3801 "c-exp.c" /* yacc.c:1646 */
3800  break;
3801 
3802  case 232:
3803 #line 1541 "c-exp.y" /* yacc.c:1646 */
3804  { (yyval.sval) = operator_stoken (">"); }
3805 #line 3807 "c-exp.c" /* yacc.c:1646 */
3806  break;
3807 
3808  case 233:
3809 #line 1543 "c-exp.y" /* yacc.c:1646 */
3810  { const char *op = "unknown";
3811  switch ((yyvsp[0].opcode))
3812  {
3813  case BINOP_RSH:
3814  op = ">>=";
3815  break;
3816  case BINOP_LSH:
3817  op = "<<=";
3818  break;
3819  case BINOP_ADD:
3820  op = "+=";
3821  break;
3822  case BINOP_SUB:
3823  op = "-=";
3824  break;
3825  case BINOP_MUL:
3826  op = "*=";
3827  break;
3828  case BINOP_DIV:
3829  op = "/=";
3830  break;
3831  case BINOP_REM:
3832  op = "%=";
3833  break;
3834  case BINOP_BITWISE_IOR:
3835  op = "|=";
3836  break;
3837  case BINOP_BITWISE_AND:
3838  op = "&=";
3839  break;
3840  case BINOP_BITWISE_XOR:
3841  op = "^=";
3842  break;
3843  default:
3844  break;
3845  }
3846 
3847  (yyval.sval) = operator_stoken (op);
3848  }
3849 #line 3851 "c-exp.c" /* yacc.c:1646 */
3850  break;
3851 
3852  case 234:
3853 #line 1583 "c-exp.y" /* yacc.c:1646 */
3854  { (yyval.sval) = operator_stoken ("<<"); }
3855 #line 3857 "c-exp.c" /* yacc.c:1646 */
3856  break;
3857 
3858  case 235:
3859 #line 1585 "c-exp.y" /* yacc.c:1646 */
3860  { (yyval.sval) = operator_stoken (">>"); }
3861 #line 3863 "c-exp.c" /* yacc.c:1646 */
3862  break;
3863 
3864  case 236:
3865 #line 1587 "c-exp.y" /* yacc.c:1646 */
3866  { (yyval.sval) = operator_stoken ("=="); }
3867 #line 3869 "c-exp.c" /* yacc.c:1646 */
3868  break;
3869 
3870  case 237:
3871 #line 1589 "c-exp.y" /* yacc.c:1646 */
3872  { (yyval.sval) = operator_stoken ("!="); }
3873 #line 3875 "c-exp.c" /* yacc.c:1646 */
3874  break;
3875 
3876  case 238:
3877 #line 1591 "c-exp.y" /* yacc.c:1646 */
3878  { (yyval.sval) = operator_stoken ("<="); }
3879 #line 3881 "c-exp.c" /* yacc.c:1646 */
3880  break;
3881 
3882  case 239:
3883 #line 1593 "c-exp.y" /* yacc.c:1646 */
3884  { (yyval.sval) = operator_stoken (">="); }
3885 #line 3887 "c-exp.c" /* yacc.c:1646 */
3886  break;
3887 
3888  case 240:
3889 #line 1595 "c-exp.y" /* yacc.c:1646 */
3890  { (yyval.sval) = operator_stoken ("&&"); }
3891 #line 3893 "c-exp.c" /* yacc.c:1646 */
3892  break;
3893 
3894  case 241:
3895 #line 1597 "c-exp.y" /* yacc.c:1646 */
3896  { (yyval.sval) = operator_stoken ("||"); }
3897 #line 3899 "c-exp.c" /* yacc.c:1646 */
3898  break;
3899 
3900  case 242:
3901 #line 1599 "c-exp.y" /* yacc.c:1646 */
3902  { (yyval.sval) = operator_stoken ("++"); }
3903 #line 3905 "c-exp.c" /* yacc.c:1646 */
3904  break;
3905 
3906  case 243:
3907 #line 1601 "c-exp.y" /* yacc.c:1646 */
3908  { (yyval.sval) = operator_stoken ("--"); }
3909 #line 3911 "c-exp.c" /* yacc.c:1646 */
3910  break;
3911 
3912  case 244:
3913 #line 1603 "c-exp.y" /* yacc.c:1646 */
3914  { (yyval.sval) = operator_stoken (","); }
3915 #line 3917 "c-exp.c" /* yacc.c:1646 */
3916  break;
3917 
3918  case 245:
3919 #line 1605 "c-exp.y" /* yacc.c:1646 */
3920  { (yyval.sval) = operator_stoken ("->*"); }
3921 #line 3923 "c-exp.c" /* yacc.c:1646 */
3922  break;
3923 
3924  case 246:
3925 #line 1607 "c-exp.y" /* yacc.c:1646 */
3926  { (yyval.sval) = operator_stoken ("->"); }
3927 #line 3929 "c-exp.c" /* yacc.c:1646 */
3928  break;
3929 
3930  case 247:
3931 #line 1609 "c-exp.y" /* yacc.c:1646 */
3932  { (yyval.sval) = operator_stoken ("()"); }
3933 #line 3935 "c-exp.c" /* yacc.c:1646 */
3934  break;
3935 
3936  case 248:
3937 #line 1611 "c-exp.y" /* yacc.c:1646 */
3938  { (yyval.sval) = operator_stoken ("[]"); }
3939 #line 3941 "c-exp.c" /* yacc.c:1646 */
3940  break;
3941 
3942  case 249:
3943 #line 1613 "c-exp.y" /* yacc.c:1646 */
3944  { (yyval.sval) = operator_stoken ("[]"); }
3945 #line 3947 "c-exp.c" /* yacc.c:1646 */
3946  break;
3947 
3948  case 250:
3949 #line 1615 "c-exp.y" /* yacc.c:1646 */
3950  { char *name;
3951  long length;
3952  struct ui_file *buf = mem_fileopen ();
3953 
3954  c_print_type ((yyvsp[0].tval), NULL, buf, -1, 0,
3956  name = ui_file_xstrdup (buf, &length);
3957  ui_file_delete (buf);
3958  (yyval.sval) = operator_stoken (name);
3959  xfree (name);
3960  }
3961 #line 3963 "c-exp.c" /* yacc.c:1646 */
3962  break;
3963 
3964  case 251:
3965 #line 1630 "c-exp.y" /* yacc.c:1646 */
3966  { (yyval.sval) = (yyvsp[0].ssym).stoken; }
3967 #line 3969 "c-exp.c" /* yacc.c:1646 */
3968  break;
3969 
3970  case 252:
3971 #line 1631 "c-exp.y" /* yacc.c:1646 */
3972  { (yyval.sval) = (yyvsp[0].ssym).stoken; }
3973 #line 3975 "c-exp.c" /* yacc.c:1646 */
3974  break;
3975 
3976  case 253:
3977 #line 1632 "c-exp.y" /* yacc.c:1646 */
3978  { (yyval.sval) = (yyvsp[0].tsym).stoken; }
3979 #line 3981 "c-exp.c" /* yacc.c:1646 */
3980  break;
3981 
3982  case 254:
3983 #line 1633 "c-exp.y" /* yacc.c:1646 */
3984  { (yyval.sval) = (yyvsp[0].ssym).stoken; }
3985 #line 3987 "c-exp.c" /* yacc.c:1646 */
3986  break;
3987 
3988  case 255:
3989 #line 1634 "c-exp.y" /* yacc.c:1646 */
3990  { (yyval.sval) = (yyvsp[0].ssym).stoken; }
3991 #line 3993 "c-exp.c" /* yacc.c:1646 */
3992  break;
3993 
3994  case 256:
3995 #line 1635 "c-exp.y" /* yacc.c:1646 */
3996  { (yyval.sval) = (yyvsp[0].sval); }
3997 #line 3999 "c-exp.c" /* yacc.c:1646 */
3998  break;
3999 
4000  case 259:
4001 #line 1648 "c-exp.y" /* yacc.c:1646 */
4002  {
4003  struct field_of_this_result is_a_field_of_this;
4004 
4005  (yyval.ssym).stoken = (yyvsp[0].sval);
4006  (yyval.ssym).sym = lookup_symbol ((yyvsp[0].sval).ptr,
4008  VAR_DOMAIN,
4009  &is_a_field_of_this);
4010  (yyval.ssym).is_a_field_of_this
4011  = is_a_field_of_this.type != NULL;
4012  }
4013 #line 4015 "c-exp.c" /* yacc.c:1646 */
4014  break;
4015 
4016 
4017 #line 4019 "c-exp.c" /* yacc.c:1646 */
4018  default: break;
4019  }
4020  /* User semantic actions sometimes alter yychar, and that requires
4021  that yytoken be updated with the new translation. We take the
4022  approach of translating immediately before every use of yytoken.
4023  One alternative is translating here after every semantic action,
4024  but that translation would be missed if the semantic action invokes
4025  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4026  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4027  incorrect destructor might then be invoked immediately. In the
4028  case of YYERROR or YYBACKUP, subsequent parser actions might lead
4029  to an incorrect destructor call or verbose syntax error message
4030  before the lookahead is translated. */
4031  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4032 
4033  YYPOPSTACK (yylen);
4034  yylen = 0;
4035  YY_STACK_PRINT (yyss, yyssp);
4036 
4037  *++yyvsp = yyval;
4038 
4039  /* Now 'shift' the result of the reduction. Determine what state
4040  that goes to, based on the state we popped back to and the rule
4041  number reduced by. */
4042 
4043  yyn = yyr1[yyn];
4044 
4045  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4046  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4047  yystate = yytable[yystate];
4048  else
4049  yystate = yydefgoto[yyn - YYNTOKENS];
4050 
4051  goto yynewstate;
4052 
4053 
4054 /*--------------------------------------.
4055 | yyerrlab -- here on detecting error. |
4056 `--------------------------------------*/
4057 yyerrlab:
4058  /* Make sure we have latest lookahead translation. See comments at
4059  user semantic actions for why this is necessary. */
4060  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4061 
4062  /* If not already recovering from an error, report this error. */
4063  if (!yyerrstatus)
4064  {
4065  ++yynerrs;
4066 #if ! YYERROR_VERBOSE
4067  yyerror (YY_("syntax error"));
4068 #else
4069 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4070  yyssp, yytoken)
4071  {
4072  char const *yymsgp = YY_("syntax error");
4073  int yysyntax_error_status;
4074  yysyntax_error_status = YYSYNTAX_ERROR;
4075  if (yysyntax_error_status == 0)
4076  yymsgp = yymsg;
4077  else if (yysyntax_error_status == 1)
4078  {
4079  if (yymsg != yymsgbuf)
4080  YYSTACK_FREE (yymsg);
4081  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4082  if (!yymsg)
4083  {
4084  yymsg = yymsgbuf;
4085  yymsg_alloc = sizeof yymsgbuf;
4086  yysyntax_error_status = 2;
4087  }
4088  else
4089  {
4090  yysyntax_error_status = YYSYNTAX_ERROR;
4091  yymsgp = yymsg;
4092  }
4093  }
4094  yyerror (yymsgp);
4095  if (yysyntax_error_status == 2)
4096  goto yyexhaustedlab;
4097  }
4098 # undef YYSYNTAX_ERROR
4099 #endif
4100  }
4101 
4102 
4103 
4104  if (yyerrstatus == 3)
4105  {
4106  /* If just tried and failed to reuse lookahead token after an
4107  error, discard it. */
4108 
4109  if (yychar <= YYEOF)
4110  {
4111  /* Return failure if at end of input. */
4112  if (yychar == YYEOF)
4113  YYABORT;
4114  }
4115  else
4116  {
4117  yydestruct ("Error: discarding",
4118  yytoken, &yylval);
4119  yychar = YYEMPTY;
4120  }
4121  }
4122 
4123  /* Else will try to reuse lookahead token after shifting the error
4124  token. */
4125  goto yyerrlab1;
4126 
4127 
4128 /*---------------------------------------------------.
4129 | yyerrorlab -- error raised explicitly by YYERROR. |
4130 `---------------------------------------------------*/
4131 yyerrorlab:
4132 
4133  /* Pacify compilers like GCC when the user code never invokes
4134  YYERROR and the label yyerrorlab therefore never appears in user
4135  code. */
4136  if (/*CONSTCOND*/ 0)
4137  goto yyerrorlab;
4138 
4139  /* Do not reclaim the symbols of the rule whose action triggered
4140  this YYERROR. */
4141  YYPOPSTACK (yylen);
4142  yylen = 0;
4143  YY_STACK_PRINT (yyss, yyssp);
4144  yystate = *yyssp;
4145  goto yyerrlab1;
4146 
4147 
4148 /*-------------------------------------------------------------.
4149 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4150 `-------------------------------------------------------------*/
4151 yyerrlab1:
4152  yyerrstatus = 3; /* Each real token shifted decrements this. */
4153 
4154  for (;;)
4155  {
4156  yyn = yypact[yystate];
4157  if (!yypact_value_is_default (yyn))
4158  {
4159  yyn += YYTERROR;
4160  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4161  {
4162  yyn = yytable[yyn];
4163  if (0 < yyn)
4164  break;
4165  }
4166  }
4167 
4168  /* Pop the current state because it cannot handle the error token. */
4169  if (yyssp == yyss)
4170  YYABORT;
4171 
4172 
4173  yydestruct ("Error: popping",
4174  yystos[yystate], yyvsp);
4175  YYPOPSTACK (1);
4176  yystate = *yyssp;
4177  YY_STACK_PRINT (yyss, yyssp);
4178  }
4179 
4181  *++yyvsp = yylval;
4183 
4184 
4185  /* Shift the error token. */
4186  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4187 
4188  yystate = yyn;
4189  goto yynewstate;
4190 
4191 
4192 /*-------------------------------------.
4193 | yyacceptlab -- YYACCEPT comes here. |
4194 `-------------------------------------*/
4195 yyacceptlab:
4196  yyresult = 0;
4197  goto yyreturn;
4198 
4199 /*-----------------------------------.
4200 | yyabortlab -- YYABORT comes here. |
4201 `-----------------------------------*/
4202 yyabortlab:
4203  yyresult = 1;
4204  goto yyreturn;
4205 
4206 #if !defined yyoverflow || YYERROR_VERBOSE
4207 /*-------------------------------------------------.
4208 | yyexhaustedlab -- memory exhaustion comes here. |
4209 `-------------------------------------------------*/
4210 yyexhaustedlab:
4211  yyerror (YY_("memory exhausted"));
4212  yyresult = 2;
4213  /* Fall through. */
4214 #endif
4215 
4216 yyreturn:
4217  if (yychar != YYEMPTY)
4218  {
4219  /* Make sure we have latest lookahead translation. See comments at
4220  user semantic actions for why this is necessary. */
4221  yytoken = YYTRANSLATE (yychar);
4222  yydestruct ("Cleanup: discarding lookahead",
4223  yytoken, &yylval);
4224  }
4225  /* Do not reclaim the symbols of the rule whose action triggered
4226  this YYABORT or YYACCEPT. */
4227  YYPOPSTACK (yylen);
4228  YY_STACK_PRINT (yyss, yyssp);
4229  while (yyssp != yyss)
4230  {
4231  yydestruct ("Cleanup: popping",
4232  yystos[*yyssp], yyvsp);
4233  YYPOPSTACK (1);
4234  }
4235 #ifndef yyoverflow
4236  if (yyss != yyssa)
4237  YYSTACK_FREE (yyss);
4238 #endif
4239 #if YYERROR_VERBOSE
4240  if (yymsg != yymsgbuf)
4241  YYSTACK_FREE (yymsg);
4242 #endif
4243  return yyresult;
4244 }
4245 #line 1662 "c-exp.y" /* yacc.c:1906 */
4246 
4247 
4248 /* Like write_exp_string, but prepends a '~'. */
4249 
4250 static void
4251 write_destructor_name (struct parser_state *par_state, struct stoken token)
4252 {
4253  char *copy = alloca (token.length + 1);
4254 
4255  copy[0] = '~';
4256  memcpy (&copy[1], token.ptr, token.length);
4257 
4258  token.ptr = copy;
4259  ++token.length;
4260 
4261  write_exp_string (par_state, token);
4262 }
4263 
4264 /* Returns a stoken of the operator name given by OP (which does not
4265  include the string "operator"). */
4266 
4267 static struct stoken
4269 {
4270  static const char *operator_string = "operator";
4271  struct stoken st = { NULL, 0 };
4272  char *buf;
4273 
4274  st.length = strlen (operator_string) + strlen (op);
4275  buf = xmalloc (st.length + 1);
4276  strcpy (buf, operator_string);
4277  strcat (buf, op);
4278  st.ptr = buf;
4279 
4280  /* The toplevel (c_parse) will free the memory allocated here. */
4281  make_cleanup (xfree, buf);
4282  return st;
4283 };
4284 
4285 /* Return true if the type is aggregate-like. */
4286 
4287 static int
4289 {
4290  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
4291  || TYPE_CODE (type) == TYPE_CODE_UNION
4292  || TYPE_CODE (type) == TYPE_CODE_NAMESPACE
4293  || (TYPE_CODE (type) == TYPE_CODE_ENUM
4294  && TYPE_DECLARED_CLASS (type)));
4295 }
4296 
4297 /* Validate a parameter typelist. */
4298 
4299 static void
4301 {
4302  struct type *type;
4303  int ix;
4304 
4305  for (ix = 0; VEC_iterate (type_ptr, params, ix, type); ++ix)
4306  {
4307  if (type != NULL && TYPE_CODE (check_typedef (type)) == TYPE_CODE_VOID)
4308  {
4309  if (ix == 0)
4310  {
4311  if (VEC_length (type_ptr, params) == 1)
4312  {
4313  /* Ok. */
4314  break;
4315  }
4316  VEC_free (type_ptr, params);
4317  error (_("parameter types following 'void'"));
4318  }
4319  else
4320  {
4321  VEC_free (type_ptr, params);
4322  error (_("'void' invalid as parameter type"));
4323  }
4324  }
4325  }
4326 }
4327 
4328 /* Take care of parsing a number (anything that starts with a digit).
4329  Set yylval and return the token type; update lexptr.
4330  LEN is the number of characters in it. */
4331 
4332 /*** Needs some error checking for the float case ***/
4333 
4334 static int
4335 parse_number (struct parser_state *par_state,
4336  const char *buf, int len, int parsed_float, YYSTYPE *putithere)
4337 {
4338  /* FIXME: Shouldn't these be unsigned? We don't deal with negative values
4339  here, and we do kind of silly things like cast to unsigned. */
4340  LONGEST n = 0;
4341  LONGEST prevn = 0;
4342  ULONGEST un;
4343 
4344  int i = 0;
4345  int c;
4346  int base = input_radix;
4347  int unsigned_p = 0;
4348 
4349  /* Number of "L" suffixes encountered. */
4350  int long_p = 0;
4351 
4352  /* We have found a "L" or "U" suffix. */
4353  int found_suffix = 0;
4354 
4355  ULONGEST high_bit;
4356  struct type *signed_type;
4357  struct type *unsigned_type;
4358  char *p;
4359 
4360  p = alloca (len);
4361  memcpy (p, buf, len);
4362 
4363  if (parsed_float)
4364  {
4365  /* If it ends at "df", "dd" or "dl", take it as type of decimal floating
4366  point. Return DECFLOAT. */
4367 
4368  if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'f')
4369  {
4370  p[len - 2] = '\0';
4371  putithere->typed_val_decfloat.type
4372  = parse_type (par_state)->builtin_decfloat;
4374  gdbarch_byte_order (parse_gdbarch (par_state)),
4375  p);
4376  p[len - 2] = 'd';
4377  return DECFLOAT;
4378  }
4379 
4380  if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'd')
4381  {
4382  p[len - 2] = '\0';
4383  putithere->typed_val_decfloat.type
4384  = parse_type (par_state)->builtin_decdouble;
4386  gdbarch_byte_order (parse_gdbarch (par_state)),
4387  p);
4388  p[len - 2] = 'd';
4389  return DECFLOAT;
4390  }
4391 
4392  if (len >= 2 && p[len - 2] == 'd' && p[len - 1] == 'l')
4393  {
4394  p[len - 2] = '\0';
4395  putithere->typed_val_decfloat.type
4396  = parse_type (par_state)->builtin_declong;
4397  decimal_from_string (putithere->typed_val_decfloat.val, 16,
4398  gdbarch_byte_order (parse_gdbarch (par_state)),
4399  p);
4400  p[len - 2] = 'd';
4401  return DECFLOAT;
4402  }
4403 
4404  if (! parse_c_float (parse_gdbarch (par_state), p, len,
4405  &putithere->typed_val_float.dval,
4406  &putithere->typed_val_float.type))
4407  return ERROR;
4408  return FLOAT;
4409  }
4410 
4411  /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
4412  if (p[0] == '0' && len > 1)
4413  switch (p[1])
4414  {
4415  case 'x':
4416  case 'X':
4417  if (len >= 3)
4418  {
4419  p += 2;
4420  base = 16;
4421  len -= 2;
4422  }
4423  break;
4424 
4425  case 'b':
4426  case 'B':
4427  if (len >= 3)
4428  {
4429  p += 2;
4430  base = 2;
4431  len -= 2;
4432  }
4433  break;
4434 
4435  case 't':
4436  case 'T':
4437  case 'd':
4438  case 'D':
4439  if (len >= 3)
4440  {
4441  p += 2;
4442  base = 10;
4443  len -= 2;
4444  }
4445  break;
4446 
4447  default:
4448  base = 8;
4449  break;
4450  }
4451 
4452  while (len-- > 0)
4453  {
4454  c = *p++;
4455  if (c >= 'A' && c <= 'Z')
4456  c += 'a' - 'A';
4457  if (c != 'l' && c != 'u')
4458  n *= base;
4459  if (c >= '0' && c <= '9')
4460  {
4461  if (found_suffix)
4462  return ERROR;
4463  n += i = c - '0';
4464  }
4465  else
4466  {
4467  if (base > 10 && c >= 'a' && c <= 'f')
4468  {
4469  if (found_suffix)
4470  return ERROR;
4471  n += i = c - 'a' + 10;
4472  }
4473  else if (c == 'l')
4474  {
4475  ++long_p;
4476  found_suffix = 1;
4477  }
4478  else if (c == 'u')
4479  {
4480  unsigned_p = 1;
4481  found_suffix = 1;
4482  }
4483  else
4484  return ERROR; /* Char not a digit */
4485  }
4486  if (i >= base)
4487  return ERROR; /* Invalid digit in this base */
4488 
4489  /* Portably test for overflow (only works for nonzero values, so make
4490  a second check for zero). FIXME: Can't we just make n and prevn
4491  unsigned and avoid this? */
4492  if (c != 'l' && c != 'u' && (prevn >= n) && n != 0)
4493  unsigned_p = 1; /* Try something unsigned */
4494 
4495  /* Portably test for unsigned overflow.
4496  FIXME: This check is wrong; for example it doesn't find overflow
4497  on 0x123456789 when LONGEST is 32 bits. */
4498  if (c != 'l' && c != 'u' && n != 0)
4499  {
4500  if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
4501  error (_("Numeric constant too large."));
4502  }
4503  prevn = n;
4504  }
4505 
4506  /* An integer constant is an int, a long, or a long long. An L
4507  suffix forces it to be long; an LL suffix forces it to be long
4508  long. If not forced to a larger size, it gets the first type of
4509  the above that it fits in. To figure out whether it fits, we
4510  shift it right and see whether anything remains. Note that we
4511  can't shift sizeof (LONGEST) * HOST_CHAR_BIT bits or more in one
4512  operation, because many compilers will warn about such a shift
4513  (which always produces a zero result). Sometimes gdbarch_int_bit
4514  or gdbarch_long_bit will be that big, sometimes not. To deal with
4515  the case where it is we just always shift the value more than
4516  once, with fewer bits each time. */
4517 
4518  un = (ULONGEST)n >> 2;
4519  if (long_p == 0
4520  && (un >> (gdbarch_int_bit (parse_gdbarch (par_state)) - 2)) == 0)
4521  {
4522  high_bit
4523  = ((ULONGEST)1) << (gdbarch_int_bit (parse_gdbarch (par_state)) - 1);
4524 
4525  /* A large decimal (not hex or octal) constant (between INT_MAX
4526  and UINT_MAX) is a long or unsigned long, according to ANSI,
4527  never an unsigned int, but this code treats it as unsigned
4528  int. This probably should be fixed. GCC gives a warning on
4529  such constants. */
4530 
4531  unsigned_type = parse_type (par_state)->builtin_unsigned_int;
4532  signed_type = parse_type (par_state)->builtin_int;
4533  }
4534  else if (long_p <= 1
4535  && (un >> (gdbarch_long_bit (parse_gdbarch (par_state)) - 2)) == 0)
4536  {
4537  high_bit
4538  = ((ULONGEST)1) << (gdbarch_long_bit (parse_gdbarch (par_state)) - 1);
4539  unsigned_type = parse_type (par_state)->builtin_unsigned_long;
4540  signed_type = parse_type (par_state)->builtin_long;
4541  }
4542  else
4543  {
4544  int shift;
4545  if (sizeof (ULONGEST) * HOST_CHAR_BIT
4546  < gdbarch_long_long_bit (parse_gdbarch (par_state)))
4547  /* A long long does not fit in a LONGEST. */
4548  shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
4549  else
4550  shift = (gdbarch_long_long_bit (parse_gdbarch (par_state)) - 1);
4551  high_bit = (ULONGEST) 1 << shift;
4552  unsigned_type = parse_type (par_state)->builtin_unsigned_long_long;
4553  signed_type = parse_type (par_state)->builtin_long_long;
4554  }
4555 
4556  putithere->typed_val_int.val = n;
4557 
4558  /* If the high bit of the worked out type is set then this number
4559  has to be unsigned. */
4560 
4561  if (unsigned_p || (n & high_bit))
4562  {
4563  putithere->typed_val_int.type = unsigned_type;
4564  }
4565  else
4566  {
4567  putithere->typed_val_int.type = signed_type;
4568  }
4569 
4570  return INT;
4571 }
4572 
4573 /* Temporary obstack used for holding strings. */
4574 static struct obstack tempbuf;
4575 static int tempbuf_init;
4576 
4577 /* Parse a C escape sequence. The initial backslash of the sequence
4578  is at (*PTR)[-1]. *PTR will be updated to point to just after the
4579  last character of the sequence. If OUTPUT is not NULL, the
4580  translated form of the escape sequence will be written there. If
4581  OUTPUT is NULL, no output is written and the call will only affect
4582  *PTR. If an escape sequence is expressed in target bytes, then the
4583  entire sequence will simply be copied to OUTPUT. Return 1 if any
4584  character was emitted, 0 otherwise. */
4585 
4586 int
4587 c_parse_escape (const char **ptr, struct obstack *output)
4588 {
4589  const char *tokptr = *ptr;
4590  int result = 1;
4591 
4592  /* Some escape sequences undergo character set conversion. Those we
4593  translate here. */
4594  switch (*tokptr)
4595  {
4596  /* Hex escapes do not undergo character set conversion, so keep
4597  the escape sequence for later. */
4598  case 'x':
4599  if (output)
4600  obstack_grow_str (output, "\\x");
4601  ++tokptr;
4602  if (!isxdigit (*tokptr))
4603  error (_("\\x escape without a following hex digit"));
4604  while (isxdigit (*tokptr))
4605  {
4606  if (output)
4607  obstack_1grow (output, *tokptr);
4608  ++tokptr;
4609  }
4610  break;
4611 
4612  /* Octal escapes do not undergo character set conversion, so
4613  keep the escape sequence for later. */
4614  case '0':
4615  case '1':
4616  case '2':
4617  case '3':
4618  case '4':
4619  case '5':
4620  case '6':
4621  case '7':
4622  {
4623  int i;
4624  if (output)
4625  obstack_grow_str (output, "\\");
4626  for (i = 0;
4627  i < 3 && isdigit (*tokptr) && *tokptr != '8' && *tokptr != '9';
4628  ++i)
4629  {
4630  if (output)
4631  obstack_1grow (output, *tokptr);
4632  ++tokptr;
4633  }
4634  }
4635  break;
4636 
4637  /* We handle UCNs later. We could handle them here, but that
4638  would mean a spurious error in the case where the UCN could
4639  be converted to the target charset but not the host
4640  charset. */
4641  case 'u':
4642  case 'U':
4643  {
4644  char c = *tokptr;
4645  int i, len = c == 'U' ? 8 : 4;
4646  if (output)
4647  {
4648  obstack_1grow (output, '\\');
4649  obstack_1grow (output, *tokptr);
4650  }
4651  ++tokptr;
4652  if (!isxdigit (*tokptr))
4653  error (_("\\%c escape without a following hex digit"), c);
4654  for (i = 0; i < len && isxdigit (*tokptr); ++i)
4655  {
4656  if (output)
4657  obstack_1grow (output, *tokptr);
4658  ++tokptr;
4659  }
4660  }
4661  break;
4662 
4663  /* We must pass backslash through so that it does not
4664  cause quoting during the second expansion. */
4665  case '\\':
4666  if (output)
4667  obstack_grow_str (output, "\\\\");
4668  ++tokptr;
4669  break;
4670 
4671  /* Escapes which undergo conversion. */
4672  case 'a':
4673  if (output)
4674  obstack_1grow (output, '\a');
4675  ++tokptr;
4676  break;
4677  case 'b':
4678  if (output)
4679  obstack_1grow (output, '\b');
4680  ++tokptr;
4681  break;
4682  case 'f':
4683  if (output)
4684  obstack_1grow (output, '\f');
4685  ++tokptr;
4686  break;
4687  case 'n':
4688  if (output)
4689  obstack_1grow (output, '\n');
4690  ++tokptr;
4691  break;
4692  case 'r':
4693  if (output)
4694  obstack_1grow (output, '\r');
4695  ++tokptr;
4696  break;
4697  case 't':
4698  if (output)
4699  obstack_1grow (output, '\t');
4700  ++tokptr;
4701  break;
4702  case 'v':
4703  if (output)
4704  obstack_1grow (output, '\v');
4705  ++tokptr;
4706  break;
4707 
4708  /* GCC extension. */
4709  case 'e':
4710  if (output)
4711  obstack_1grow (output, HOST_ESCAPE_CHAR);
4712  ++tokptr;
4713  break;
4714 
4715  /* Backslash-newline expands to nothing at all. */
4716  case '\n':
4717  ++tokptr;
4718  result = 0;
4719  break;
4720 
4721  /* A few escapes just expand to the character itself. */
4722  case '\'':
4723  case '\"':
4724  case '?':
4725  /* GCC extensions. */
4726  case '(':
4727  case '{':
4728  case '[':
4729  case '%':
4730  /* Unrecognized escapes turn into the character itself. */
4731  default:
4732  if (output)
4733  obstack_1grow (output, *tokptr);
4734  ++tokptr;
4735  break;
4736  }
4737  *ptr = tokptr;
4738  return result;
4739 }
4740 
4741 /* Parse a string or character literal from TOKPTR. The string or
4742  character may be wide or unicode. *OUTPTR is set to just after the
4743  end of the literal in the input string. The resulting token is
4744  stored in VALUE. This returns a token value, either STRING or
4745  CHAR, depending on what was parsed. *HOST_CHARS is set to the
4746  number of host characters in the literal. */
4747 
4748 static int
4749 parse_string_or_char (const char *tokptr, const char **outptr,
4750  struct typed_stoken *value, int *host_chars)
4751 {
4752  int quote;
4753  enum c_string_type type;
4754  int is_objc = 0;
4755 
4756  /* Build the gdb internal form of the input string in tempbuf. Note
4757  that the buffer is null byte terminated *only* for the
4758  convenience of debugging gdb itself and printing the buffer
4759  contents when the buffer contains no embedded nulls. Gdb does
4760  not depend upon the buffer being null byte terminated, it uses
4761  the length string instead. This allows gdb to handle C strings
4762  (as well as strings in other languages) with embedded null
4763  bytes */
4764 
4765  if (!tempbuf_init)
4766  tempbuf_init = 1;
4767  else
4768  obstack_free (&tempbuf, NULL);
4769  obstack_init (&tempbuf);
4770 
4771  /* Record the string type. */
4772  if (*tokptr == 'L')
4773  {
4774  type = C_WIDE_STRING;
4775  ++tokptr;
4776  }
4777  else if (*tokptr == 'u')
4778  {
4779  type = C_STRING_16;
4780  ++tokptr;
4781  }
4782  else if (*tokptr == 'U')
4783  {
4784  type = C_STRING_32;
4785  ++tokptr;
4786  }
4787  else if (*tokptr == '@')
4788  {
4789  /* An Objective C string. */
4790  is_objc = 1;
4791  type = C_STRING;
4792  ++tokptr;
4793  }
4794  else
4795  type = C_STRING;
4796 
4797  /* Skip the quote. */
4798  quote = *tokptr;
4799  if (quote == '\'')
4800  type |= C_CHAR;
4801  ++tokptr;
4802 
4803  *host_chars = 0;
4804 
4805  while (*tokptr)
4806  {
4807  char c = *tokptr;
4808  if (c == '\\')
4809  {
4810  ++tokptr;
4811  *host_chars += c_parse_escape (&tokptr, &tempbuf);
4812  }
4813  else if (c == quote)
4814  break;
4815  else
4816  {
4817  obstack_1grow (&tempbuf, c);
4818  ++tokptr;
4819  /* FIXME: this does the wrong thing with multi-byte host
4820  characters. We could use mbrlen here, but that would
4821  make "set host-charset" a bit less useful. */
4822  ++*host_chars;
4823  }
4824  }
4825 
4826  if (*tokptr != quote)
4827  {
4828  if (quote == '"')
4829  error (_("Unterminated string in expression."));
4830  else
4831  error (_("Unmatched single quote."));
4832  }
4833  ++tokptr;
4834 
4835  value->type = type;
4836  value->ptr = obstack_base (&tempbuf);
4837  value->length = obstack_object_size (&tempbuf);
4838 
4839  *outptr = tokptr;
4840 
4841  return quote == '"' ? (is_objc ? NSSTRING : STRING) : CHAR;
4842 }
4843 
4844 /* This is used to associate some attributes with a token. */
4845 
4847 {
4848  /* If this bit is set, the token is C++-only. */
4849 
4851 
4852  /* If this bit is set, the token is conditional: if there is a
4853  symbol of the same name, then the token is a symbol; otherwise,
4854  the token is a keyword. */
4855 
4857 };
4858 
4859 struct token
4860 {
4861  char *oper;
4862  int token;
4865 };
4866 
4867 static const struct token tokentab3[] =
4868  {
4869  {">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
4870  {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
4871  {"->*", ARROW_STAR, BINOP_END, FLAG_CXX},
4872  {"...", DOTDOTDOT, BINOP_END, 0}
4873  };
4874 
4875 static const struct token tokentab2[] =
4876  {
4877  {"+=", ASSIGN_MODIFY, BINOP_ADD, 0},
4878  {"-=", ASSIGN_MODIFY, BINOP_SUB, 0},
4879  {"*=", ASSIGN_MODIFY, BINOP_MUL, 0},
4880  {"/=", ASSIGN_MODIFY, BINOP_DIV, 0},
4881  {"%=", ASSIGN_MODIFY, BINOP_REM, 0},
4882  {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR, 0},
4883  {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND, 0},
4884  {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR, 0},
4885  {"++", INCREMENT, BINOP_END, 0},
4886  {"--", DECREMENT, BINOP_END, 0},
4887  {"->", ARROW, BINOP_END, 0},
4888  {"&&", ANDAND, BINOP_END, 0},
4889  {"||", OROR, BINOP_END, 0},
4890  /* "::" is *not* only C++: gdb overrides its meaning in several
4891  different ways, e.g., 'filename'::func, function::variable. */
4892  {"::", COLONCOLON, BINOP_END, 0},
4893  {"<<", LSH, BINOP_END, 0},
4894  {">>", RSH, BINOP_END, 0},
4895  {"==", EQUAL, BINOP_END, 0},
4896  {"!=", NOTEQUAL, BINOP_END, 0},
4897  {"<=", LEQ, BINOP_END, 0},
4898  {">=", GEQ, BINOP_END, 0},
4899  {".*", DOT_STAR, BINOP_END, FLAG_CXX}
4900  };
4901 
4902 /* Identifier-like tokens. */
4903 static const struct token ident_tokens[] =
4904  {
4905  {"unsigned", UNSIGNED, OP_NULL, 0},
4906  {"template", TEMPLATE, OP_NULL, FLAG_CXX},
4907  {"volatile", VOLATILE_KEYWORD, OP_NULL, 0},
4908  {"struct", STRUCT, OP_NULL, 0},
4909  {"signed", SIGNED_KEYWORD, OP_NULL, 0},
4910  {"sizeof", SIZEOF, OP_NULL, 0},
4911  {"double", DOUBLE_KEYWORD, OP_NULL, 0},
4912  {"false", FALSEKEYWORD, OP_NULL, FLAG_CXX},
4913  {"class", CLASS, OP_NULL, FLAG_CXX},
4914  {"union", UNION, OP_NULL, 0},
4915  {"short", SHORT, OP_NULL, 0},
4916  {"const", CONST_KEYWORD, OP_NULL, 0},
4917  {"enum", ENUM, OP_NULL, 0},
4918  {"long", LONG, OP_NULL, 0},
4919  {"true", TRUEKEYWORD, OP_NULL, FLAG_CXX},
4920  {"int", INT_KEYWORD, OP_NULL, 0},
4921  {"new", NEW, OP_NULL, FLAG_CXX},
4922  {"delete", DELETE, OP_NULL, FLAG_CXX},
4923  {"operator", OPERATOR, OP_NULL, FLAG_CXX},
4924 
4925  {"and", ANDAND, BINOP_END, FLAG_CXX},
4926  {"and_eq", ASSIGN_MODIFY, BINOP_BITWISE_AND, FLAG_CXX},
4927  {"bitand", '&', OP_NULL, FLAG_CXX},
4928  {"bitor", '|', OP_NULL, FLAG_CXX},
4929  {"compl", '~', OP_NULL, FLAG_CXX},
4930  {"not", '!', OP_NULL, FLAG_CXX},
4931  {"not_eq", NOTEQUAL, BINOP_END, FLAG_CXX},
4932  {"or", OROR, BINOP_END, FLAG_CXX},
4933  {"or_eq", ASSIGN_MODIFY, BINOP_BITWISE_IOR, FLAG_CXX},
4934  {"xor", '^', OP_NULL, FLAG_CXX},
4935  {"xor_eq", ASSIGN_MODIFY, BINOP_BITWISE_XOR, FLAG_CXX},
4936 
4937  {"const_cast", CONST_CAST, OP_NULL, FLAG_CXX },
4938  {"dynamic_cast", DYNAMIC_CAST, OP_NULL, FLAG_CXX },
4939  {"static_cast", STATIC_CAST, OP_NULL, FLAG_CXX },
4940  {"reinterpret_cast", REINTERPRET_CAST, OP_NULL, FLAG_CXX },
4941 
4942  {"__typeof__", TYPEOF, OP_TYPEOF, 0 },
4943  {"__typeof", TYPEOF, OP_TYPEOF, 0 },
4944  {"typeof", TYPEOF, OP_TYPEOF, FLAG_SHADOW },
4945  {"__decltype", DECLTYPE, OP_DECLTYPE, FLAG_CXX },
4946  {"decltype", DECLTYPE, OP_DECLTYPE, FLAG_CXX | FLAG_SHADOW },
4947 
4948  {"typeid", TYPEID, OP_TYPEID, FLAG_CXX}
4949  };
4950 
4951 /* When we find that lexptr (the global var defined in parse.c) is
4952  pointing at a macro invocation, we expand the invocation, and call
4953  scan_macro_expansion to save the old lexptr here and point lexptr
4954  into the expanded text. When we reach the end of that, we call
4955  end_macro_expansion to pop back to the value we saved here. The
4956  macro expansion code promises to return only fully-expanded text,
4957  so we don't need to "push" more than one level.
4958 
4959  This is disgusting, of course. It would be cleaner to do all macro
4960  expansion beforehand, and then hand that to lexptr. But we don't
4961  really know where the expression ends. Remember, in a command like
4962 
4963  (gdb) break *ADDRESS if CONDITION
4964 
4965  we evaluate ADDRESS in the scope of the current frame, but we
4966  evaluate CONDITION in the scope of the breakpoint's location. So
4967  it's simply wrong to try to macro-expand the whole thing at once. */
4968 static const char *macro_original_text;
4969 
4970 /* We save all intermediate macro expansions on this obstack for the
4971  duration of a single parse. The expansion text may sometimes have
4972  to live past the end of the expansion, due to yacc lookahead.
4973  Rather than try to be clever about saving the data for a single
4974  token, we simply keep it all and delete it after parsing has
4975  completed. */
4976 static struct obstack expansion_obstack;
4977 
4978 static void
4979 scan_macro_expansion (char *expansion)
4980 {
4981  char *copy;
4982 
4983  /* We'd better not be trying to push the stack twice. */
4984  gdb_assert (! macro_original_text);
4985 
4986  /* Copy to the obstack, and then free the intermediate
4987  expansion. */
4988  copy = obstack_copy0 (&expansion_obstack, expansion, strlen (expansion));
4989  xfree (expansion);
4990 
4991  /* Save the old lexptr value, so we can return to it when we're done
4992  parsing the expanded text. */
4993  macro_original_text = lexptr;
4994  lexptr = copy;
4995 }
4996 
4997 static int
4999 {
5000  return macro_original_text != 0;
5001 }
5002 
5003 static void
5005 {
5006  /* There'd better be something to pop back to. */
5007  gdb_assert (macro_original_text);
5008 
5009  /* Pop back to the original text. */
5011  macro_original_text = 0;
5012 }
5013 
5014 static void
5016 {
5017  if (macro_original_text)
5019 
5020  obstack_free (&expansion_obstack, NULL);
5021 }
5022 
5023 /* Return true iff the token represents a C++ cast operator. */
5024 
5025 static int
5026 is_cast_operator (const char *token, int len)
5027 {
5028  return (! strncmp (token, "dynamic_cast", len)
5029  || ! strncmp (token, "static_cast", len)
5030  || ! strncmp (token, "reinterpret_cast", len)
5031  || ! strncmp (token, "const_cast", len));
5032 }
5033 
5034 /* The scope used for macro expansion. */
5036 
5037 /* This is set if a NAME token appeared at the very end of the input
5038  string, with no whitespace separating the name from the EOF. This
5039  is used only when parsing to do field name completion. */
5040 static int saw_name_at_eof;
5041 
5042 /* This is set if the previously-returned token was a structure
5043  operator -- either '.' or ARROW. This is used only when parsing to
5044  do field name completion. */
5046 
5047 /* Read one token, getting characters through lexptr. */
5048 
5049 static int
5050 lex_one_token (struct parser_state *par_state, int *is_quoted_name)
5051 {
5052  int c;
5053  int namelen;
5054  unsigned int i;
5055  const char *tokstart;
5056  int saw_structop = last_was_structop;
5057  char *copy;
5058 
5059  last_was_structop = 0;
5060  *is_quoted_name = 0;
5061 
5062  retry:
5063 
5064  /* Check if this is a macro invocation that we need to expand. */
5065  if (! scanning_macro_expansion ())
5066  {
5067  char *expanded = macro_expand_next (&lexptr,
5069  expression_macro_scope);
5070 
5071  if (expanded)
5072  scan_macro_expansion (expanded);
5073  }
5074 
5075  prev_lexptr = lexptr;
5076 
5077  tokstart = lexptr;
5078  /* See if it is a special token of length 3. */
5079  for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
5080  if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
5081  {
5082  if ((tokentab3[i].flags & FLAG_CXX) != 0
5083  && parse_language (par_state)->la_language != language_cplus)
5084  break;
5085 
5086  lexptr += 3;
5087  yylval.opcode = tokentab3[i].opcode;
5088  return tokentab3[i].token;
5089  }
5090 
5091  /* See if it is a special token of length 2. */
5092  for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
5093  if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
5094  {
5095  if ((tokentab2[i].flags & FLAG_CXX) != 0
5096  && parse_language (par_state)->la_language != language_cplus)
5097  break;
5098 
5099  lexptr += 2;
5100  yylval.opcode = tokentab2[i].opcode;
5101  if (parse_completion && tokentab2[i].token == ARROW)
5102  last_was_structop = 1;
5103  return tokentab2[i].token;
5104  }
5105 
5106  switch (c = *tokstart)
5107  {
5108  case 0:
5109  /* If we were just scanning the result of a macro expansion,
5110  then we need to resume scanning the original text.
5111  If we're parsing for field name completion, and the previous
5112  token allows such completion, return a COMPLETE token.
5113  Otherwise, we were already scanning the original text, and
5114  we're really done. */
5115  if (scanning_macro_expansion ())
5116  {
5118  goto retry;
5119  }
5120  else if (saw_name_at_eof)
5121  {
5122  saw_name_at_eof = 0;
5123  return COMPLETE;
5124  }
5125  else if (saw_structop)
5126  return COMPLETE;
5127  else
5128  return 0;
5129 
5130  case ' ':
5131  case '\t':
5132  case '\n':
5133  lexptr++;
5134  goto retry;
5135 
5136  case '[':
5137  case '(':
5138  paren_depth++;
5139  lexptr++;
5140  if (parse_language (par_state)->la_language == language_objc
5141  && c == '[')
5142  return OBJC_LBRAC;
5143  return c;
5144 
5145  case ']':
5146  case ')':
5147  if (paren_depth == 0)
5148  return 0;
5149  paren_depth--;
5150  lexptr++;
5151  return c;
5152 
5153  case ',':
5154  if (comma_terminates
5155  && paren_depth == 0
5156  && ! scanning_macro_expansion ())
5157  return 0;
5158  lexptr++;
5159  return c;
5160 
5161  case '.':
5162  /* Might be a floating point number. */
5163  if (lexptr[1] < '0' || lexptr[1] > '9')
5164  {
5165  if (parse_completion)
5166  last_was_structop = 1;
5167  goto symbol; /* Nope, must be a symbol. */
5168  }
5169  /* FALL THRU into number case. */
5170 
5171  case '0':
5172  case '1':
5173  case '2':
5174  case '3':
5175  case '4':
5176  case '5':
5177  case '6':
5178  case '7':
5179  case '8':
5180  case '9':
5181  {
5182  /* It's a number. */
5183  int got_dot = 0, got_e = 0, toktype;
5184  const char *p = tokstart;
5185  int hex = input_radix > 10;
5186 
5187  if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
5188  {
5189  p += 2;
5190  hex = 1;
5191  }
5192  else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
5193  {
5194  p += 2;
5195  hex = 0;
5196  }
5197 
5198  for (;; ++p)
5199  {
5200  /* This test includes !hex because 'e' is a valid hex digit
5201  and thus does not indicate a floating point number when
5202  the radix is hex. */
5203  if (!hex && !got_e && (*p == 'e' || *p == 'E'))
5204  got_dot = got_e = 1;
5205  /* This test does not include !hex, because a '.' always indicates
5206  a decimal floating point number regardless of the radix. */
5207  else if (!got_dot && *p == '.')
5208  got_dot = 1;
5209  else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
5210  && (*p == '-' || *p == '+'))
5211  /* This is the sign of the exponent, not the end of the
5212  number. */
5213  continue;
5214  /* We will take any letters or digits. parse_number will
5215  complain if past the radix, or if L or U are not final. */
5216  else if ((*p < '0' || *p > '9')
5217  && ((*p < 'a' || *p > 'z')
5218  && (*p < 'A' || *p > 'Z')))
5219  break;
5220  }
5221  toktype = parse_number (par_state, tokstart, p - tokstart,
5222  got_dot|got_e, &yylval);
5223  if (toktype == ERROR)
5224  {
5225  char *err_copy = (char *) alloca (p - tokstart + 1);
5226 
5227  memcpy (err_copy, tokstart, p - tokstart);
5228  err_copy[p - tokstart] = 0;
5229  error (_("Invalid number \"%s\"."), err_copy);
5230  }
5231  lexptr = p;
5232  return toktype;
5233  }
5234 
5235  case '@':
5236  {
5237  const char *p = &tokstart[1];
5238  size_t len = strlen ("entry");
5239 
5240  if (parse_language (par_state)->la_language == language_objc)
5241  {
5242  size_t len = strlen ("selector");
5243 
5244  if (strncmp (p, "selector", len) == 0
5245  && (p[len] == '\0' || isspace (p[len])))
5246  {
5247  lexptr = p + len;
5248  return SELECTOR;
5249  }
5250  else if (*p == '"')
5251  goto parse_string;
5252  }
5253 
5254  while (isspace (*p))
5255  p++;
5256  if (strncmp (p, "entry", len) == 0 && !isalnum (p[len])
5257  && p[len] != '_')
5258  {
5259  lexptr = &p[len];
5260  return ENTRY;
5261  }
5262  }
5263  /* FALLTHRU */
5264  case '+':
5265  case '-':
5266  case '*':
5267  case '/':
5268  case '%':
5269  case '|':
5270  case '&':
5271  case '^':
5272  case '~':
5273  case '!':
5274  case '<':
5275  case '>':
5276  case '?':
5277  case ':':
5278  case '=':
5279  case '{':
5280  case '}':
5281  symbol:
5282  lexptr++;
5283  return c;
5284 
5285  case 'L':
5286  case 'u':
5287  case 'U':
5288  if (tokstart[1] != '"' && tokstart[1] != '\'')
5289  break;
5290  /* Fall through. */
5291  case '\'':
5292  case '"':
5293 
5294  parse_string:
5295  {
5296  int host_len;
5297  int result = parse_string_or_char (tokstart, &lexptr, &yylval.tsval,
5298  &host_len);
5299  if (result == CHAR)
5300  {
5301  if (host_len == 0)
5302  error (_("Empty character constant."));
5303  else if (host_len > 2 && c == '\'')
5304  {
5305  ++tokstart;
5306  namelen = lexptr - tokstart - 1;
5307  *is_quoted_name = 1;
5308 
5309  goto tryname;
5310  }
5311  else if (host_len > 1)
5312  error (_("Invalid character constant."));
5313  }
5314  return result;
5315  }
5316  }
5317 
5318  if (!(c == '_' || c == '$'
5319  || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
5320  /* We must have come across a bad character (e.g. ';'). */
5321  error (_("Invalid character '%c' in expression."), c);
5322 
5323  /* It's a name. See how long it is. */
5324  namelen = 0;
5325  for (c = tokstart[namelen];
5326  (c == '_' || c == '$' || (c >= '0' && c <= '9')
5327  || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');)
5328  {
5329  /* Template parameter lists are part of the name.
5330  FIXME: This mishandles `print $a<4&&$a>3'. */
5331 
5332  if (c == '<')
5333  {
5334  if (! is_cast_operator (tokstart, namelen))
5335  {
5336  /* Scan ahead to get rest of the template specification. Note
5337  that we look ahead only when the '<' adjoins non-whitespace
5338  characters; for comparison expressions, e.g. "a < b > c",
5339  there must be spaces before the '<', etc. */
5340  const char *p = find_template_name_end (tokstart + namelen);
5341 
5342  if (p)
5343  namelen = p - tokstart;
5344  }
5345  break;
5346  }
5347  c = tokstart[++namelen];
5348  }
5349 
5350  /* The token "if" terminates the expression and is NOT removed from
5351  the input stream. It doesn't count if it appears in the
5352  expansion of a macro. */
5353  if (namelen == 2
5354  && tokstart[0] == 'i'
5355  && tokstart[1] == 'f'
5356  && ! scanning_macro_expansion ())
5357  {
5358  return 0;
5359  }
5360 
5361  /* For the same reason (breakpoint conditions), "thread N"
5362  terminates the expression. "thread" could be an identifier, but
5363  an identifier is never followed by a number without intervening
5364  punctuation. "task" is similar. Handle abbreviations of these,
5365  similarly to breakpoint.c:find_condition_and_thread. */
5366  if (namelen >= 1
5367  && (strncmp (tokstart, "thread", namelen) == 0
5368  || strncmp (tokstart, "task", namelen) == 0)
5369  && (tokstart[namelen] == ' ' || tokstart[namelen] == '\t')
5370  && ! scanning_macro_expansion ())
5371  {
5372  const char *p = tokstart + namelen + 1;
5373 
5374  while (*p == ' ' || *p == '\t')
5375  p++;
5376  if (*p >= '0' && *p <= '9')
5377  return 0;
5378  }
5379 
5380  lexptr += namelen;
5381 
5382  tryname:
5383 
5384  yylval.sval.ptr = tokstart;
5385  yylval.sval.length = namelen;
5386 
5387  /* Catch specific keywords. */
5388  copy = copy_name (yylval.sval);
5389  for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
5390  if (strcmp (copy, ident_tokens[i].oper) == 0)
5391  {
5392  if ((ident_tokens[i].flags & FLAG_CXX) != 0
5393  && parse_language (par_state)->la_language != language_cplus)
5394  break;
5395 
5396  if ((ident_tokens[i].flags & FLAG_SHADOW) != 0)
5397  {
5398  struct field_of_this_result is_a_field_of_this;
5399 
5401  VAR_DOMAIN,
5402  (parse_language (par_state)->la_language
5403  == language_cplus ? &is_a_field_of_this
5404  : NULL))
5405  != NULL)
5406  {
5407  /* The keyword is shadowed. */
5408  break;
5409  }
5410  }
5411 
5412  /* It is ok to always set this, even though we don't always
5413  strictly need to. */
5414  yylval.opcode = ident_tokens[i].opcode;
5415  return ident_tokens[i].token;
5416  }
5417 
5418  if (*tokstart == '$')
5419  return VARIABLE;
5420 
5421  if (parse_completion && *lexptr == '\0')
5422  saw_name_at_eof = 1;
5423 
5424  yylval.ssym.stoken = yylval.sval;
5425  yylval.ssym.sym = NULL;
5426  yylval.ssym.is_a_field_of_this = 0;
5427  return NAME;
5428 }
5429 
5430 /* An object of this type is pushed on a FIFO by the "outer" lexer. */
5431 typedef struct
5432 {
5433  int token;
5435 } token_and_value;
5436 
5438 
5439 /* A FIFO of tokens that have been read but not yet returned to the
5440  parser. */
5441 static VEC (token_and_value) *token_fifo;
5442 
5443 /* Non-zero if the lexer should return tokens from the FIFO. */
5444 static int popping;
5445 
5446 /* Temporary storage for c_lex; this holds symbol names as they are
5447  built up. */
5448 static struct obstack name_obstack;
5449 
5450 /* Classify a NAME token. The contents of the token are in `yylval'.
5451  Updates yylval and returns the new token type. BLOCK is the block
5452  in which lookups start; this can be NULL to mean the global scope.
5453  IS_QUOTED_NAME is non-zero if the name token was originally quoted
5454  in single quotes. */
5455 
5456 static int
5457 classify_name (struct parser_state *par_state, const struct block *block,
5458  int is_quoted_name)
5459 {
5460  struct symbol *sym;
5461  char *copy;
5462  struct field_of_this_result is_a_field_of_this;
5463 
5464  copy = copy_name (yylval.sval);
5465 
5466  /* Initialize this in case we *don't* use it in this call; that way
5467  we can refer to it unconditionally below. */
5468  memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
5469 
5470  sym = lookup_symbol (copy, block, VAR_DOMAIN,
5471  parse_language (par_state)->la_name_of_this
5472  ? &is_a_field_of_this : NULL);
5473 
5474  if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
5475  {
5476  yylval.ssym.sym = sym;
5477  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
5478  return BLOCKNAME;
5479  }
5480  else if (!sym)
5481  {
5482  /* If we found a field of 'this', we might have erroneously
5483  found a constructor where we wanted a type name. Handle this
5484  case by noticing that we found a constructor and then look up
5485  the type tag instead. */
5486  if (is_a_field_of_this.type != NULL
5487  && is_a_field_of_this.fn_field != NULL
5488  && TYPE_FN_FIELD_CONSTRUCTOR (is_a_field_of_this.fn_field->fn_fields,
5489  0))
5490  {
5491  struct field_of_this_result inner_is_a_field_of_this;
5492 
5493  sym = lookup_symbol (copy, block, STRUCT_DOMAIN,
5494  &inner_is_a_field_of_this);
5495  if (sym != NULL)
5496  {
5497  yylval.tsym.type = SYMBOL_TYPE (sym);
5498  return TYPENAME;
5499  }
5500  }
5501 
5502  /* If we found a field, then we want to prefer it over a
5503  filename. However, if the name was quoted, then it is better
5504  to check for a filename or a block, since this is the only
5505  way the user has of requiring the extension to be used. */
5506  if (is_a_field_of_this.type == NULL || is_quoted_name)
5507  {
5508  /* See if it's a file name. */
5509  struct symtab *symtab;
5510 
5511  symtab = lookup_symtab (copy);
5512  if (symtab)
5513  {
5514  yylval.bval = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab),
5515  STATIC_BLOCK);
5516  return FILENAME;
5517  }
5518  }
5519  }
5520 
5521  if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
5522  {
5523  yylval.tsym.type = SYMBOL_TYPE (sym);
5524  return TYPENAME;
5525  }
5526 
5527  /* See if it's an ObjC classname. */
5528  if (parse_language (par_state)->la_language == language_objc && !sym)
5529  {
5530  CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
5531  if (Class)
5532  {
5533  yylval.theclass.theclass = Class;
5535  if (sym)
5536  yylval.theclass.type = SYMBOL_TYPE (sym);
5537  return CLASSNAME;
5538  }
5539  }
5540 
5541  /* Input names that aren't symbols but ARE valid hex numbers, when
5542  the input radix permits them, can be names or numbers depending
5543  on the parse. Note we support radixes > 16 here. */
5544  if (!sym
5545  && ((copy[0] >= 'a' && copy[0] < 'a' + input_radix - 10)
5546  || (copy[0] >= 'A' && copy[0] < 'A' + input_radix - 10)))
5547  {
5548  YYSTYPE newlval; /* Its value is ignored. */
5549  int hextype = parse_number (par_state, copy, yylval.sval.length,
5550  0, &newlval);
5551  if (hextype == INT)
5552  {
5553  yylval.ssym.sym = sym;
5554  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
5555  return NAME_OR_INT;
5556  }
5557  }
5558 
5559  /* Any other kind of symbol */
5560  yylval.ssym.sym = sym;
5561  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
5562 
5563  if (sym == NULL
5564  && parse_language (par_state)->la_language == language_cplus
5565  && is_a_field_of_this.type == NULL
5566  && lookup_minimal_symbol (copy, NULL, NULL).minsym == NULL)
5567  return UNKNOWN_CPP_NAME;
5568 
5569  return NAME;
5570 }
5571 
5572 /* Like classify_name, but used by the inner loop of the lexer, when a
5573  name might have already been seen. CONTEXT is the context type, or
5574  NULL if this is the first component of a name. */
5575 
5576 static int
5578  const struct block *block, struct type *context)
5579 {
5580  struct type *type;
5581  char *copy;
5582 
5583  if (context == NULL)
5584  return classify_name (par_state, block, 0);
5585 
5586  type = check_typedef (context);
5587  if (!type_aggregate_p (type))
5588  return ERROR;
5589 
5590  copy = copy_name (yylval.ssym.stoken);
5591  /* N.B. We assume the symbol can only be in VAR_DOMAIN. */
5592  yylval.ssym.sym = cp_lookup_nested_symbol (type, copy, block, VAR_DOMAIN);
5593 
5594  /* If no symbol was found, search for a matching base class named
5595  COPY. This will allow users to enter qualified names of class members
5596  relative to the `this' pointer. */
5597  if (yylval.ssym.sym == NULL)
5598  {
5599  struct type *base_type = cp_find_type_baseclass_by_name (type, copy);
5600 
5601  if (base_type != NULL)
5602  {
5603  yylval.tsym.type = base_type;
5604  return TYPENAME;
5605  }
5606 
5607  return ERROR;
5608  }
5609 
5610  switch (SYMBOL_CLASS (yylval.ssym.sym))
5611  {
5612  case LOC_BLOCK:
5613  case LOC_LABEL:
5614  /* cp_lookup_nested_symbol might have accidentally found a constructor
5615  named COPY when we really wanted a base class of the same name.
5616  Double-check this case by looking for a base class. */
5617  {
5618  struct type *base_type = cp_find_type_baseclass_by_name (type, copy);
5619 
5620  if (base_type != NULL)
5621  {
5622  yylval.tsym.type = base_type;
5623  return TYPENAME;
5624  }
5625  }
5626  return ERROR;
5627 
5628  case LOC_TYPEDEF:
5629  yylval.tsym.type = SYMBOL_TYPE (yylval.ssym.sym);
5630  return TYPENAME;
5631 
5632  default:
5633  return NAME;
5634  }
5635  internal_error (__FILE__, __LINE__, _("not reached"));
5636 }
5637 
5638 /* The outer level of a two-level lexer. This calls the inner lexer
5639  to return tokens. It then either returns these tokens, or
5640  aggregates them into a larger token. This lets us work around a
5641  problem in our parsing approach, where the parser could not
5642  distinguish between qualified names and qualified types at the
5643  right point.
5644 
5645  This approach is still not ideal, because it mishandles template
5646  types. See the comment in lex_one_token for an example. However,
5647  this is still an improvement over the earlier approach, and will
5648  suffice until we move to better parsing technology. */
5649 
5650 static int
5651 yylex (void)
5652 {
5653  token_and_value current;
5654  int first_was_coloncolon, last_was_coloncolon;
5655  struct type *context_type = NULL;
5656  int last_to_examine, next_to_examine, checkpoint;
5657  const struct block *search_block;
5658  int is_quoted_name;
5659 
5660  if (popping && !VEC_empty (token_and_value, token_fifo))
5661  goto do_pop;
5662  popping = 0;
5663 
5664  /* Read the first token and decide what to do. Most of the
5665  subsequent code is C++-only; but also depends on seeing a "::" or
5666  name-like token. */
5667  current.token = lex_one_token (pstate, &is_quoted_name);
5668  if (current.token == NAME)
5669  current.token = classify_name (pstate, expression_context_block,
5670  is_quoted_name);
5671  if (parse_language (pstate)->la_language != language_cplus
5672  || (current.token != TYPENAME && current.token != COLONCOLON
5673  && current.token != FILENAME))
5674  return current.token;
5675 
5676  /* Read any sequence of alternating "::" and name-like tokens into
5677  the token FIFO. */
5678  current.value = yylval;
5679  VEC_safe_push (token_and_value, token_fifo, &current);
5680  last_was_coloncolon = current.token == COLONCOLON;
5681  while (1)
5682  {
5683  int ignore;
5684 
5685  /* We ignore quoted names other than the very first one.
5686  Subsequent ones do not have any special meaning. */
5687  current.token = lex_one_token (pstate, &ignore);
5688  current.value = yylval;
5689  VEC_safe_push (token_and_value, token_fifo, &current);
5690 
5691  if ((last_was_coloncolon && current.token != NAME)
5692  || (!last_was_coloncolon && current.token != COLONCOLON))
5693  break;
5694  last_was_coloncolon = !last_was_coloncolon;
5695  }
5696  popping = 1;
5697 
5698  /* We always read one extra token, so compute the number of tokens
5699  to examine accordingly. */
5700  last_to_examine = VEC_length (token_and_value, token_fifo) - 2;
5701  next_to_examine = 0;
5702 
5703  current = *VEC_index (token_and_value, token_fifo, next_to_examine);
5704  ++next_to_examine;
5705 
5706  obstack_free (&name_obstack, obstack_base (&name_obstack));
5707  checkpoint = 0;
5708  if (current.token == FILENAME)
5709  search_block = current.value.bval;
5710  else if (current.token == COLONCOLON)
5711  search_block = NULL;
5712  else
5713  {
5714  gdb_assert (current.token == TYPENAME);
5715  search_block = expression_context_block;
5716  obstack_grow (&name_obstack, current.value.sval.ptr,
5717  current.value.sval.length);
5718  context_type = current.value.tsym.type;
5719  checkpoint = 1;
5720  }
5721 
5722  first_was_coloncolon = current.token == COLONCOLON;
5723  last_was_coloncolon = first_was_coloncolon;
5724 
5725  while (next_to_examine <= last_to_examine)
5726  {
5727  token_and_value *next;
5728 
5729  next = VEC_index (token_and_value, token_fifo, next_to_examine);
5730  ++next_to_examine;
5731 
5732  if (next->token == NAME && last_was_coloncolon)
5733  {
5734  int classification;
5735 
5736  yylval = next->value;
5737  classification = classify_inner_name (pstate, search_block,
5738  context_type);
5739  /* We keep going until we either run out of names, or until
5740  we have a qualified name which is not a type. */
5741  if (classification != TYPENAME && classification != NAME)
5742  break;
5743 
5744  /* Accept up to this token. */
5745  checkpoint = next_to_examine;
5746 
5747  /* Update the partial name we are constructing. */
5748  if (context_type != NULL)
5749  {
5750  /* We don't want to put a leading "::" into the name. */
5751  obstack_grow_str (&name_obstack, "::");
5752  }
5753  obstack_grow (&name_obstack, next->value.sval.ptr,
5754  next->value.sval.length);
5755 
5756  yylval.sval.ptr = obstack_base (&name_obstack);
5757  yylval.sval.length = obstack_object_size (&name_obstack);
5758  current.value = yylval;
5759  current.token = classification;
5760 
5761  last_was_coloncolon = 0;
5762 
5763  if (classification == NAME)
5764  break;
5765 
5766  context_type = yylval.tsym.type;
5767  }
5768  else if (next->token == COLONCOLON && !last_was_coloncolon)
5769  last_was_coloncolon = 1;
5770  else
5771  {
5772  /* We've reached the end of the name. */
5773  break;
5774  }
5775  }
5776 
5777  /* If we have a replacement token, install it as the first token in
5778  the FIFO, and delete the other constituent tokens. */
5779  if (checkpoint > 0)
5780  {
5781  current.value.sval.ptr = obstack_copy0 (&expansion_obstack,
5782  current.value.sval.ptr,
5783  current.value.sval.length);
5784 
5785  VEC_replace (token_and_value, token_fifo, 0, &current);
5786  if (checkpoint > 1)
5787  VEC_block_remove (token_and_value, token_fifo, 1, checkpoint - 1);
5788  }
5789 
5790  do_pop:
5791  current = *VEC_index (token_and_value, token_fifo, 0);
5792  VEC_ordered_remove (token_and_value, token_fifo, 0);
5793  yylval = current.value;
5794  return current.token;
5795 }
5796 
5797 int
5798 c_parse (struct parser_state *par_state)
5799 {
5800  int result;
5801  struct cleanup *back_to;
5802 
5803  /* Setting up the parser state. */
5804  gdb_assert (par_state != NULL);
5805  pstate = par_state;
5806 
5807  back_to = make_cleanup (free_current_contents, &expression_macro_scope);
5809 
5810  /* Set up the scope for macro expansion. */
5811  expression_macro_scope = NULL;
5812 
5814  expression_macro_scope
5816  else
5817  expression_macro_scope = default_macro_scope ();
5818  if (! expression_macro_scope)
5819  expression_macro_scope = user_macro_scope ();
5820 
5821  /* Initialize macro expansion code. */
5822  obstack_init (&expansion_obstack);
5823  gdb_assert (! macro_original_text);
5825 
5826  make_cleanup_restore_integer (&yydebug);
5827  yydebug = parser_debug;
5828 
5829  /* Initialize some state used by the lexer. */
5830  last_was_structop = 0;
5831  saw_name_at_eof = 0;
5832 
5833  VEC_free (token_and_value, token_fifo);
5834  popping = 0;
5835  obstack_init (&name_obstack);
5836  make_cleanup_obstack_free (&name_obstack);
5837 
5838  result = yyparse ();
5839  do_cleanups (back_to);
5840 
5841  return result;
5842 }
5843 
5844 #ifdef YYBISON
5845 
5846 /* This is called via the YYPRINT macro when parser debugging is
5847  enabled. It prints a token's value. */
5848 
5849 static void
5850 c_print_token (FILE *file, int type, YYSTYPE value)
5851 {
5852  switch (type)
5853  {
5854  case INT:
5855  fprintf (file, "typed_val_int<%s, %s>",
5857  pulongest (value.typed_val_int.val));
5858  break;
5859 
5860  case CHAR:
5861  case STRING:
5862  {
5863  char *copy = alloca (value.tsval.length + 1);
5864 
5865  memcpy (copy, value.tsval.ptr, value.tsval.length);
5866  copy[value.tsval.length] = '\0';
5867 
5868  fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
5869  }
5870  break;
5871 
5872  case NSSTRING:
5873  case VARIABLE:
5874  fprintf (file, "sval<%s>", copy_name (value.sval));
5875  break;
5876 
5877  case TYPENAME:
5878  fprintf (file, "tsym<type=%s, name=%s>",
5879  TYPE_SAFE_NAME (value.tsym.type),
5880  copy_name (value.tsym.stoken));
5881  break;
5882 
5883  case NAME:
5884  case UNKNOWN_CPP_NAME:
5885  case NAME_OR_INT:
5886  case BLOCKNAME:
5887  fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
5888  copy_name (value.ssym.stoken),
5889  (value.ssym.sym == NULL
5890  ? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym)),
5891  value.ssym.is_a_field_of_this);
5892  break;
5893 
5894  case FILENAME:
5895  fprintf (file, "bval<%s>", host_address_to_string (value.bval));
5896  break;
5897  }
5898 }
5899 
5900 #endif
5901 
5902 void
5903 yyerror (char *msg)
5904 {
5905  if (prev_lexptr)
5906  lexptr = prev_lexptr;
5907 
5908  error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
5909 }
struct symbol * cp_lookup_nested_symbol(struct type *parent_type, const char *nested_name, const struct block *block, const domain_enum domain)
#define YYTRANSLATE(YYX)
Definition: c-exp.c:648
struct type * type
Definition: parser-defs.h:103
#define yystacksize
Definition: c-exp.c:139
#define ABOVE_COMMA
Definition: c-exp.c:306
int decimal_from_string(gdb_byte *decbytes, int len, enum bfd_endian byte_order, const char *string)
Definition: dfp.c:174
unsigned short int yytype_uint16
Definition: c-exp.c:412
void write_exp_elt_decfloatcst(struct parser_state *ps, gdb_byte expelt[16])
Definition: parse.c:296
#define DOUBLE_KEYWORD
Definition: c-exp.c:301
#define NOTEQUAL
Definition: c-exp.c:310
int end_msglist(struct parser_state *ps)
Definition: objc-lang.c:467
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 VEC_replace(T, V, I, O)
Definition: vec.h:302
#define COLONCOLON
Definition: c-exp.c:282
#define SYMBOL_PRINT_NAME(symbol)
Definition: symtab.h:260
struct YYSTYPE::@36 typed_val_decfloat
void push_type_stack(struct type_stack *stack)
Definition: parse.c:1593
struct type * lookup_signed_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
Definition: gdbtypes.c:1433
bfd_vma CORE_ADDR
Definition: common-types.h:41
#define YYNTOKENS
Definition: c-exp.c:635
#define parse_gdbarch(ps)
Definition: parser-defs.h:36
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: c-exp.c:495
void type_stack_cleanup(void *arg)
Definition: parse.c:1620
#define VOLATILE_KEYWORD
Definition: c-exp.c:300
const char * ptr
Definition: parser-defs.h:79
#define yychar
Definition: c-exp.c:101
Definition: c-lang.h:50
CORE_ADDR expression_context_pc
Definition: parse.c:68
static int classify_inner_name(struct parser_state *par_state, const struct block *block, struct type *context)
Definition: c-exp.c:5577
static const char * macro_original_text
Definition: c-exp.c:4968
int comma_terminates
Definition: parse.c:75
int gdbarch_int_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1490
int parse_completion
Definition: parse.c:78
#define yylval
Definition: c-exp.c:100
struct type ** const(pascal_builtin_types[])
#define YYEMPTY
Definition: c-exp.c:1366
#define TYPE_NAME(thistype)
Definition: gdbtypes.h:1227
static struct macro_scope * expression_macro_scope
Definition: c-exp.c:5035
#define YYMAXDEPTH
Definition: c-exp.c:1542
char * ui_file_xstrdup(struct ui_file *file, long *length)
Definition: ui-file.c:345
#define YYLAST
Definition: c-exp.c:632
void ui_file_delete(struct ui_file *file)
Definition: ui-file.c:76
#define LSH
Definition: c-exp.c:313
c_string_type
Definition: c-lang.h:37
#define YY_STACK_PRINT(Bottom, Top)
Definition: c-exp.c:1481
int end_arglist(void)
Definition: parse.c:156
const struct type_print_options type_print_raw_options
Definition: typeprint.c:48
#define STRING
Definition: c-exp.c:264
int arglist_len
Definition: parse.c:70
#define parse_type(ps)
Definition: c-exp.c:87
#define HOST_ESCAPE_CHAR
Definition: charset.h:139
struct symtab * lookup_symtab(const char *name)
Definition: symtab.c:489
#define yyparse
Definition: c-exp.c:97
#define SYMBOL_CLASS(symbol)
Definition: symtab.h:793
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
#define YYABORT
Definition: c-exp.c:1370
struct macro_definition * standard_macro_lookup(const char *name, void *baton)
Definition: macroscope.c:147
#define VEC_block_remove(T, V, I, L)
Definition: vec.h:360
struct symtoken ssym
Definition: c-exp.c:349
#define DECREMENT
Definition: c-exp.c:317
static struct stoken operator_stoken(const char *)
Definition: c-exp.c:4268
#define SHORT
Definition: c-exp.c:297
int gdbarch_long_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1507
const struct block * innermost_block
Definition: parse.c:69
int have_partial_symbols(void)
Definition: objfiles.c:965
Definition: c-exp.c:4859
#define VEC_safe_push(T, V, O)
Definition: vec.h:260
#define BLOCKVECTOR_BLOCK(blocklist, n)
Definition: block.h:136
#define ARROW_STAR
Definition: c-exp.c:319
int token
Definition: c-exp.c:4862
void push_type(enum type_pieces tp)
Definition: parse.c:1498
static void insert_type(struct compile_c_instance *context, struct type *type, gcc_type gcc_type)
int c_parse_escape(const char **ptr, struct obstack *output)
Definition: c-exp.c:4587
#define _(String)
Definition: gdb_locale.h:40
struct macro_scope * sal_macro_scope(struct symtab_and_line sal)
Definition: macroscope.c:39
#define SELECTOR
Definition: c-exp.c:266
#define INT
Definition: c-exp.c:261
#define YYPRINT(FILE, TYPE, VALUE)
Definition: c-exp.c:388
#define NSSTRING
Definition: c-exp.c:265
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: c-exp.c:1436
short int yytype_int16
Definition: c-exp.c:418
int parse_c_float(struct gdbarch *gdbarch, const char *p, int len, DOUBLEST *d, struct type **t)
Definition: parse.c:1398
struct macro_scope * default_macro_scope(void)
Definition: macroscope.c:102
struct symbol * lookup_struct_typedef(char *name, const struct block *block, int noerr)
Definition: objc-lang.c:84
#define INT_KEYWORD
Definition: c-exp.c:298
#define yytable_value_is_error(Yytable_value)
Definition: c-exp.c:780
#define FILENAME
Definition: c-exp.c:322
#define CONST_KEYWORD
Definition: c-exp.c:299
unsigned input_radix
Definition: valprint.c:166
static int tempbuf_init
Definition: c-exp.c:4575
void push_type_int(int n)
Definition: parse.c:1505
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
Definition: gnu-nat.c:1885
#define STATIC_CAST
Definition: c-exp.c:289
#define YYDPRINTF(Args)
Definition: c-exp.c:1407
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: c-exp.c:1773
struct typed_stoken tsval
Definition: c-exp.c:347
#define INCREMENT
Definition: c-exp.c:316
DOUBLEST dval
Definition: ada-exp.c:344
#define UNKNOWN_CPP_NAME
Definition: c-exp.c:269
struct type * lookup_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name, const struct block *block, int noerr)
Definition: gdbtypes.c:1404
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
static int parse_string_or_char(const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars)
Definition: c-exp.c:4749
void write_exp_elt_longcst(struct parser_state *ps, LONGEST expelt)
Definition: parse.c:276
#define ERROR
Definition: c-exp.c:284
#define VEC_iterate(T, V, I, P)
Definition: vec.h:165
struct type * check_typedef(struct type *type)
Definition: gdbtypes.c:2217
#define UNARY
Definition: c-exp.c:315
#define yydebug
Definition: c-exp.c:102
#define UNSIGNED
Definition: c-exp.c:281
int contained_in(const struct block *a, const struct block *b)
Definition: block.c:73
#define RSH
Definition: c-exp.c:314
struct cleanup * make_cleanup_restore_integer(int *variable)
Definition: utils.c:292
#define NAME_OR_INT
Definition: c-exp.c:274
#define DECLTYPE
Definition: c-exp.c:293
static int type_aggregate_p(struct type *)
Definition: c-exp.c:4288
#define ANDAND
Definition: c-exp.c:308
struct type * follow_types(struct type *follow_type)
Definition: parse.c:1643
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
Definition: symtab.c:3315
#define YYACCEPT
Definition: c-exp.c:1369
#define yyvs
Definition: c-exp.c:140
void start_msglist(void)
Definition: objc-lang.c:414
struct stoken_vector svec
Definition: c-exp.c:354
static struct obstack tempbuf
Definition: c-exp.c:4574
static VEC(token_and_value)
Definition: c-exp.c:5441
struct type * lookup_struct(const char *name, const struct block *block)
Definition: gdbtypes.c:1452
#define ENTRY
Definition: c-exp.c:291
struct YYSTYPE::@2 typed_val_float
#define ASSIGN_MODIFY
Definition: c-exp.c:303
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 YYSTACK_ALLOC_MAXIMUM
Definition: c-exp.c:543
#define yypact_value_is_default(Yystate)
Definition: c-exp.c:775
double DOUBLEST
Definition: doublest.h:24
void free_current_contents(void *ptr)
Definition: utils.c:476
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1420
#define CLASS
Definition: c-exp.c:277
#define VEC_length(T, V)
Definition: vec.h:124
struct type * lookup_enum(const char *name, const struct block *block)
Definition: gdbtypes.c:1498
#define CONST_CAST
Definition: c-exp.c:290
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Definition: c-exp.c:1493
static struct obstack expansion_obstack
Definition: c-exp.c:4976
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
Definition: cleanups.c:117
#define BLOCKNAME
Definition: c-exp.c:321
void add_msglist(struct stoken *str, int addcolon)
Definition: objc-lang.c:429
yytype_int16 yyss_alloc
Definition: ada-exp.c:553
unsigned char yytype_uint8
Definition: c-exp.c:400
#define yyrule
Definition: c-exp.c:126
Definition: gdbtypes.h:749
char * ptr
Definition: parser-defs.h:89
LONGEST val
Definition: ada-exp.c:340
#define VEC_index(T, V, I)
Definition: vec.h:151
const struct block * block_found
Definition: symtab.c:250
int voidval
Definition: c-exp.c:350
yytokentype
Definition: ada-exp.c:233
token_flags
Definition: c-exp.c:4846
char * macro_expand_next(const char **lexptr, macro_lookup_ftype *lookup_func, void *lookup_baton)
Definition: macroexp.c:1442
void write_dollar_variable(struct parser_state *ps, struct stoken str)
Definition: parse.c:616
#define GEQ
Definition: c-exp.c:312
const char * find_template_name_end(const char *p)
Definition: parse.c:712
static const char * type
Definition: language.c:103
#define yylex
Definition: c-exp.c:98
void push_typelist(VEC(type_ptr)*list)
Definition: parse.c:1633
#define gdb_assert(expr)
Definition: gdb_assert.h:33
void mark_struct_expression(struct parser_state *ps)
Definition: parse.c:566
YYSTYPE value
Definition: c-exp.c:5434
struct type_stack * get_type_stack(void)
Definition: parse.c:1605
unsigned dummy
Definition: go32-nat.c:1071
struct cleanup * make_cleanup_clear_parser_state(struct parser_state **p)
Definition: utils.c:462
#define LEQ
Definition: c-exp.c:311
YYSTYPE yyvs_alloc
Definition: ada-exp.c:554
struct type * lookup_union(const char *name, const struct block *block)
Definition: gdbtypes.c:1474
#define yylloc
Definition: c-exp.c:122
#define yylen
Definition: c-exp.c:128
LONGEST lval
Definition: ada-exp.c:338
DEF_VEC_O(token_and_value)
#define YY_REDUCE_PRINT(Rule)
Definition: c-exp.c:1512
#define yynerrs
Definition: c-exp.c:112
signed char yytype_int8
Definition: c-exp.c:406
static int classify_name(struct parser_state *par_state, const struct block *block)
Definition: go-exp.c:3063
#define STRUCT
Definition: c-exp.c:276
const struct block * bval
Definition: ada-exp.c:349
#define LONG
Definition: c-exp.c:296
#define YYEOF
Definition: c-exp.c:1367
#define FALSEKEYWORD
Definition: c-exp.c:305
#define UNION
Definition: c-exp.c:278
#define REINTERPRET_CAST
Definition: c-exp.c:287
int parser_debug
Definition: parse.c:102
#define YYPOPSTACK(N)
#define TYPENAME
Definition: c-exp.c:271
struct ui_file * mem_fileopen(void)
Definition: ui-file.c:427
int is_a_field_of_this
Definition: parser-defs.h:110
void write_exp_msymbol(struct parser_state *ps, struct bound_minimal_symbol bound_msym)
Definition: parse.c:474
int paren_depth
Definition: parse.c:74
int c_parse(struct parser_state *par_state)
Definition: c-exp.c:5798
static struct type_stack type_stack
Definition: parse.c:71
static int parse_number(struct parser_state *par_state, const char *, int, int, YYSTYPE *)
Definition: c-exp.c:4335
int destructor_name_p(const char *name, struct type *type)
Definition: valops.c:3161
static void finished_macro_expansion(void)
Definition: c-exp.c:5004
struct type * type
Definition: symtab.h:1173
#define VEC_empty(T, V)
Definition: vec.h:132
Definition: value.c:172
static void write_destructor_name(struct parser_state *par_state, struct stoken)
Definition: c-exp.c:4251
#define yyvsp
Definition: c-exp.c:141
#define yystate
Definition: c-exp.c:117
#define DECFLOAT
Definition: c-exp.c:263
static int scanning_macro_expansion(void)
Definition: c-exp.c:4998
#define SIZEOF
Definition: c-exp.c:280
#define YYTERROR
Definition: c-exp.c:1394
PTR xrealloc(PTR ptr, size_t size)
Definition: common-utils.c:51
void write_exp_elt_opcode(struct parser_state *ps, enum exp_opcode expelt)
Definition: parse.c:236
#define CLASSNAME
Definition: c-exp.c:272
static const char * lexptr
struct YYSTYPE::@34 typed_val_int
bfd_byte gdb_byte
Definition: common-types.h:38
void insert_type_address_space(struct parser_state *pstate, char *string)
Definition: parse.c:1520
#define YY_(Msgid)
Definition: c-exp.c:444
unsigned length
Definition: gdbtypes.h:807
static void scan_macro_expansion(char *expansion)
Definition: c-exp.c:4979
#define TYPE_TARGET_TYPE(thistype)
Definition: gdbtypes.h:1229
char * oper
Definition: c-exp.c:4861
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: c-exp.c:1470
static void c_print_token(FILE *file, int type, YYSTYPE value)
Definition: c-exp.c:5850
struct type * lookup_template_type(char *name, struct type *type, const struct block *block)
Definition: gdbtypes.c:1519
struct ttype tsym
Definition: c-exp.c:348
#define SIGNED_KEYWORD
Definition: c-exp.c:295
enum token_flags flags
Definition: c-exp.c:4864
#define SYMBOL_BLOCK_VALUE(symbol)
Definition: symtab.h:185
#define TYPE_CODE(thistype)
Definition: gdbtypes.h:1240
#define YY_NULLPTR
Definition: c-exp.c:169
#define DOTDOTDOT
Definition: c-exp.c:323
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: c-exp.c:494
#define YYFPRINTF
Definition: c-exp.c:147
#define yyss
Definition: c-exp.c:136
struct minimal_symbol * minsym
Definition: minsyms.h:32
struct symbol * sym
Definition: parser-defs.h:109
void c_print_type(struct type *, const char *, struct ui_file *, int, int, const struct type_print_options *)
Definition: c-typeprint.c:80
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1524
#define ENUM
Definition: c-exp.c:279
const char * symbol
Definition: signals.c:48
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
Definition: symtab.c:1967
struct type * tval
Definition: ada-exp.c:347
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
Definition: minsyms.c:335
#define OBJC_LBRAC
Definition: c-exp.c:273
#define VEC_free(T, V)
Definition: vec.h:180
#define CHAR
Definition: c-exp.c:267
exp_opcode
Definition: expression.h:43
enum exp_opcode opcode
Definition: c-exp.c:352
#define TRUEKEYWORD
Definition: c-exp.c:304
#define obstack_grow_str(OBSTACK, STRING)
Definition: gdb_obstack.h:46
struct type * lookup_unsigned_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
Definition: gdbtypes.c:1422
struct type_stack * append_type_stack(struct type_stack *to, struct type_stack *from)
Definition: parse.c:1579
#define CHECK_TYPEDEF(TYPE)
Definition: gdbtypes.h:1817
#define VARIABLE
Definition: c-exp.c:302
void xfree(void *)
Definition: common-utils.c:97
static int is_cast_operator(const char *token, int len)
Definition: c-exp.c:5026
static void scan_macro_cleanup(void *dummy)
Definition: c-exp.c:5015
int have_full_symbols(void)
Definition: objfiles.c:982
#define TYPEID
Definition: c-exp.c:294
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: c-exp.c:1455
const struct block * expression_context_block
Definition: parse.c:67
struct type * type
Definition: ada-exp.c:341
#define YYSTACK_ALLOC
Definition: c-exp.c:540
unsigned long long ULONGEST
Definition: common-types.h:53
struct typed_stoken * tokens
Definition: parser-defs.h:97
#define YYSIZE_T
Definition: c-exp.c:428
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
Definition: corelow.c:917
static void check_parameter_typelist(VEC(type_ptr)*)
Definition: c-exp.c:4300
#define SYMBOL_TYPE(symbol)
Definition: symtab.h:799
Definition: symtab.h:703
struct type ** tvec
Definition: f-exp.c:294
#define NAME
Definition: c-exp.c:268
void mark_completion_tag(enum type_code tag, const char *ptr, int length)
Definition: parse.c:578
#define YYUSE(E)
Definition: c-exp.c:477
#define yyval
Definition: c-exp.c:121
CORE_ADDR lookup_objc_class(struct gdbarch *gdbarch, char *classname)
Definition: objc-lang.c:109
void start_arglist(void)
Definition: parse.c:141
#define COMPLETE
Definition: c-exp.c:270
struct stoken stoken
Definition: parser-defs.h:102
#define TYPE_LENGTH(thistype)
Definition: gdbtypes.h:1237
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: c-exp.c:596
#define TYPEOF
Definition: c-exp.c:292
static int saw_name_at_eof
Definition: c-exp.c:5040
#define DYNAMIC_CAST
Definition: c-exp.c:288
#define HOST_CHAR_BIT
Definition: host-defs.h:40
static int last_was_structop
Definition: c-exp.c:5045
#define YYSTACK_BYTES(N)
Definition: c-exp.c:585
void * xmalloc(YYSIZE_T)
#define yyssp
Definition: c-exp.c:138
#define TYPE_FN_FIELD_CONSTRUCTOR(thisfn, n)
Definition: gdbtypes.h:1438
#define YYINITDEPTH
Definition: c-exp.c:1531
struct cleanup * make_cleanup_obstack_free(struct obstack *obstack)
Definition: utils.c:225
#define DELETE
Definition: c-exp.c:286
#define OROR
Definition: c-exp.c:307
struct stoken sval
Definition: ada-exp.c:348
#define TYPE_DECLARED_CLASS(t)
Definition: gdbtypes.h:334
#define TEMPLATE
Definition: c-exp.c:283
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
Definition: minsyms.c:163
static int lex_one_token(struct parser_state *par_state, int *is_quoted_name)
Definition: c-exp.c:5050
static const char * prev_lexptr
#define YYFINAL
Definition: c-exp.c:630
void write_exp_string(struct parser_state *ps, struct stoken str)
Definition: parse.c:349
struct type * cp_find_type_baseclass_by_name(struct type *parent_type, const char *name)
Definition: cp-namespace.c:881
void write_exp_elt_type(struct parser_state *ps, struct type *expelt)
Definition: parse.c:308
#define OPERATOR
Definition: c-exp.c:275
#define EQUAL
Definition: c-exp.c:309
void error(const char *fmt,...)
Definition: errors.c:38
#define DOT_STAR
Definition: c-exp.c:320
void write_exp_string_vector(struct parser_state *ps, int type, struct stoken_vector *vec)
Definition: parse.c:391
struct stoken stoken
Definition: parser-defs.h:108
long long LONGEST
Definition: common-types.h:52
void do_cleanups(struct cleanup *old_chain)
Definition: cleanups.c:175
#define SYMBOL_IS_ARGUMENT(symbol)
Definition: symtab.h:795
#define TYPE_SAFE_NAME(type)
Definition: gdbtypes.h:1466
int length
Definition: parser-defs.h:81
#define NEW
Definition: c-exp.c:285
#define yyerror
Definition: c-exp.c:99
char * copy_name(struct stoken token)
Definition: parse.c:783
#define YYSTACK_FREE
Definition: c-exp.c:541
#define ARROW
Definition: c-exp.c:318
struct macro_scope * user_macro_scope(void)
Definition: macroscope.c:91
#define VEC_ordered_remove(T, V, I)
Definition: vec.h:339
enum exp_opcode opcode
Definition: c-exp.c:4863
const ULONGEST const LONGEST len
Definition: target.h:309
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: c-exp.c:1419
#define FLOAT
Definition: c-exp.c:262