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