GDB (xrefs)
/tmp/gdb-8.1/gdb/f-exp.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 0
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations. */
65 #line 43 "f-exp.y" /* yacc.c:339 */
66 
67 
68 #include "defs.h"
69 #include "expression.h"
70 #include "value.h"
71 #include "parser-defs.h"
72 #include "language.h"
73 #include "f-lang.h"
74 #include "bfd.h" /* Required by objfiles.h. */
75 #include "symfile.h" /* Required by objfiles.h. */
76 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
77 #include "block.h"
78 #include <ctype.h>
79 #include <algorithm>
80 
81 #define parse_type(ps) builtin_type (parse_gdbarch (ps))
82 #define parse_f_type(ps) builtin_f_type (parse_gdbarch (ps))
83 
84 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror,
85  etc). */
86 #define GDB_YY_REMAP_PREFIX f_
87 #include "yy-remap.h"
88 
89 /* The state of the parser, used internally when we are parsing the
90  expression. */
91 
92 static struct parser_state *pstate = NULL;
93 
94 int yyparse (void);
95 
96 static int yylex (void);
97 
98 void yyerror (const char *);
99 
100 static void growbuf_by_size (int);
101 
102 static int match_string_literal (void);
103 
104 
105 #line 106 "f-exp.c" /* yacc.c:339 */
106 
107 # ifndef YY_NULLPTRPTR
108 # if defined __cplusplus && 201103L <= __cplusplus
109 # define YY_NULLPTRPTR nullptr
110 # else
111 # define YY_NULLPTRPTR 0
112 # endif
113 # endif
114 
115 /* Enabling verbose error messages. */
116 #ifdef YYERROR_VERBOSE
117 # undef YYERROR_VERBOSE
118 # define YYERROR_VERBOSE 1
119 #else
120 # define YYERROR_VERBOSE 0
121 #endif
122 
123 
124 /* Debug traces. */
125 #ifndef YYDEBUG
126 # define YYDEBUG 0
127 #endif
128 #if YYDEBUG
129 extern int yydebug;
130 #endif
131 
132 /* Token type. */
133 #ifndef YYTOKENTYPE
134 # define YYTOKENTYPE
136  {
137  INT = 258,
138  FLOAT = 259,
141  NAME = 262,
142  TYPENAME = 263,
143  NAME_OR_INT = 264,
144  SIZEOF = 265,
145  ERROR = 266,
146  INT_KEYWORD = 267,
158  BOOL_AND = 279,
159  BOOL_OR = 280,
160  BOOL_NOT = 281,
161  CHARACTER = 282,
162  VARIABLE = 283,
164  ABOVE_COMMA = 285,
165  EQUAL = 286,
166  NOTEQUAL = 287,
167  LESSTHAN = 288,
168  GREATERTHAN = 289,
169  LEQ = 290,
170  GEQ = 291,
171  LSH = 292,
172  RSH = 293,
173  STARSTAR = 294,
174  UNARY = 295
175  };
176 #endif
177 /* Tokens. */
178 #define INT 258
179 #define FLOAT 259
180 #define STRING_LITERAL 260
181 #define BOOLEAN_LITERAL 261
182 #define NAME 262
183 #define TYPENAME 263
184 #define NAME_OR_INT 264
185 #define SIZEOF 265
186 #define ERROR 266
187 #define INT_KEYWORD 267
188 #define INT_S2_KEYWORD 268
189 #define LOGICAL_S1_KEYWORD 269
190 #define LOGICAL_S2_KEYWORD 270
191 #define LOGICAL_S8_KEYWORD 271
192 #define LOGICAL_KEYWORD 272
193 #define REAL_KEYWORD 273
194 #define REAL_S8_KEYWORD 274
195 #define REAL_S16_KEYWORD 275
196 #define COMPLEX_S8_KEYWORD 276
197 #define COMPLEX_S16_KEYWORD 277
198 #define COMPLEX_S32_KEYWORD 278
199 #define BOOL_AND 279
200 #define BOOL_OR 280
201 #define BOOL_NOT 281
202 #define CHARACTER 282
203 #define VARIABLE 283
204 #define ASSIGN_MODIFY 284
205 #define ABOVE_COMMA 285
206 #define EQUAL 286
207 #define NOTEQUAL 287
208 #define LESSTHAN 288
209 #define GREATERTHAN 289
210 #define LEQ 290
211 #define GEQ 291
212 #define LSH 292
213 #define RSH 293
214 #define STARSTAR 294
215 #define UNARY 295
216 
217 /* Value type. */
218 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
219 
220 union YYSTYPE
221 {
222 #line 88 "f-exp.y" /* yacc.c:355 */
223 
224  LONGEST lval;
225  struct {
226  LONGEST val;
227  struct type *type;
228  } typed_val;
229  struct {
230  gdb_byte val[16];
231  struct type *type;
232  } typed_val_float;
233  struct symbol *sym;
234  struct type *tval;
235  struct stoken sval;
236  struct ttype tsym;
237  struct symtoken ssym;
238  int voidval;
239  struct block *bval;
240  enum exp_opcode opcode;
241  struct internalvar *ivar;
242 
243  struct type **tvec;
244  int *ivec;
245 
246 
247 #line 248 "f-exp.c" /* yacc.c:355 */
248 };
249 
250 typedef union YYSTYPE YYSTYPE;
251 # define YYSTYPE_IS_TRIVIAL 1
252 # define YYSTYPE_IS_DECLARED 1
253 #endif
254 
255 
256 extern YYSTYPE yylval;
257 
258 int yyparse (void);
259 
260 
261 
262 /* Copy the second part of user declarations. */
263 #line 112 "f-exp.y" /* yacc.c:358 */
264 
265 /* YYSTYPE gets defined by %union */
266 static int parse_number (struct parser_state *, const char *, int,
267  int, YYSTYPE *);
268 
269 #line 270 "f-exp.c" /* yacc.c:358 */
270 
271 #ifdef short
272 # undef short
273 #endif
274 
275 #ifdef YYTYPE_UINT8
276 typedef YYTYPE_UINT8 yytype_uint8;
277 #else
278 typedef unsigned char yytype_uint8;
279 #endif
280 
281 #ifdef YYTYPE_INT8
282 typedef YYTYPE_INT8 yytype_int8;
283 #else
284 typedef signed char yytype_int8;
285 #endif
286 
287 #ifdef YYTYPE_UINT16
288 typedef YYTYPE_UINT16 yytype_uint16;
289 #else
290 typedef unsigned short int yytype_uint16;
291 #endif
292 
293 #ifdef YYTYPE_INT16
294 typedef YYTYPE_INT16 yytype_int16;
295 #else
296 typedef short int yytype_int16;
297 #endif
298 
299 #ifndef YYSIZE_T
300 # ifdef __SIZE_TYPE__
301 # define YYSIZE_T __SIZE_TYPE__
302 # elif defined size_t
303 # define YYSIZE_T size_t
304 # elif ! defined YYSIZE_T
305 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
306 # define YYSIZE_T size_t
307 # else
308 # define YYSIZE_T unsigned int
309 # endif
310 #endif
311 
312 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
313 
314 #ifndef YY_
315 # if defined YYENABLE_NLS && YYENABLE_NLS
316 # if ENABLE_NLS
317 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
318 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
319 # endif
320 # endif
321 # ifndef YY_
322 # define YY_(Msgid) Msgid
323 # endif
324 #endif
325 
326 #ifndef YY_ATTRIBUTE
327 # if (defined __GNUC__ \
328  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
329  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
330 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
331 # else
332 # define YY_ATTRIBUTE(Spec) /* empty */
333 # endif
334 #endif
335 
336 #ifndef YY_ATTRIBUTE_PURE
337 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
338 #endif
339 
340 #ifndef YY_ATTRIBUTE_UNUSED
341 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
342 #endif
343 
344 #if !defined _Noreturn \
345  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
346 # if defined _MSC_VER && 1200 <= _MSC_VER
347 # define _Noreturn __declspec (noreturn)
348 # else
349 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
350 # endif
351 #endif
352 
353 /* Suppress unused-variable warnings by "using" E. */
354 #if ! defined lint || defined __GNUC__
355 # define YYUSE(E) ((void) (E))
356 #else
357 # define YYUSE(E) /* empty */
358 #endif
359 
360 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
361 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
362 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
363  _Pragma ("GCC diagnostic push") \
364  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
365  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
366 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
367  _Pragma ("GCC diagnostic pop")
368 #else
369 # define YY_INITIAL_VALUE(Value) Value
370 #endif
371 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
372 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
373 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
374 #endif
375 #ifndef YY_INITIAL_VALUE
376 # define YY_INITIAL_VALUE(Value) /* Nothing. */
377 #endif
378 
379 
380 #if ! defined yyoverflow || YYERROR_VERBOSE
381 
382 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
383 
384 # ifdef YYSTACK_USE_ALLOCA
385 # if YYSTACK_USE_ALLOCA
386 # ifdef __GNUC__
387 # define YYSTACK_ALLOC __builtin_alloca
388 # elif defined __BUILTIN_VA_ARG_INCR
389 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
390 # elif defined _AIX
391 # define YYSTACK_ALLOC __alloca
392 # elif defined _MSC_VER
393 # define alloca _alloca
394 # else
395 # define YYSTACK_ALLOC alloca
396 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
397 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
398  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
399 # ifndef EXIT_SUCCESS
400 # define EXIT_SUCCESS 0
401 # endif
402 # endif
403 # endif
404 # endif
405 # endif
406 
407 # ifdef YYSTACK_ALLOC
408  /* Pacify GCC's 'empty if-body' warning. */
409 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
410 # ifndef YYSTACK_ALLOC_MAXIMUM
411  /* The OS might guarantee only one guard page at the bottom of the stack,
412  and a page size can be as small as 4096 bytes. So we cannot safely
413  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
414  to allow for a few compiler-allocated temporary stack slots. */
415 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
416 # endif
417 # else
418 # define YYSTACK_ALLOC YYMALLOC
419 # define YYSTACK_FREE YYFREE
420 # ifndef YYSTACK_ALLOC_MAXIMUM
421 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
422 # endif
423 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
424  && ! ((defined YYMALLOC || defined xmalloc) \
425  && (defined YYFREE || defined xfree)))
426 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
427 # ifndef EXIT_SUCCESS
428 # define EXIT_SUCCESS 0
429 # endif
430 # endif
431 # ifndef YYMALLOC
432 # define YYMALLOC xmalloc
433 # if ! defined xmalloc && ! defined EXIT_SUCCESS
434 void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
435 # endif
436 # endif
437 # ifndef YYFREE
438 # define YYFREE xfree
439 # if ! defined xfree && ! defined EXIT_SUCCESS
440 void xfree (void *); /* INFRINGES ON USER NAME SPACE */
441 # endif
442 # endif
443 # endif
444 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
445 
446 
447 #if (! defined yyoverflow \
448  && (! defined __cplusplus \
449  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
450 
451 /* A type that is properly aligned for any stack member. */
452 union yyalloc
453 {
456 };
457 
458 /* The size of the maximum gap between one aligned stack and the next. */
459 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
460 
461 /* The size of an array large to enough to hold all stacks, each with
462  N elements. */
463 # define YYSTACK_BYTES(N) \
464  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
465  + YYSTACK_GAP_MAXIMUM)
466 
467 # define YYCOPY_NEEDED 1
468 
469 /* Relocate STACK from its old location to the new one. The
470  local variables YYSIZE and YYSTACKSIZE give the old and new number of
471  elements in the stack, and YYPTR gives the new location of the
472  stack. Advance YYPTR to a properly aligned location for the next
473  stack. */
474 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
475  do \
476  { \
477  YYSIZE_T yynewbytes; \
478  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
479  Stack = &yyptr->Stack_alloc; \
480  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
481  yyptr += yynewbytes / sizeof (*yyptr); \
482  } \
483  while (0)
484 
485 #endif
486 
487 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
488 /* Copy COUNT objects from SRC to DST. The source and destination do
489  not overlap. */
490 # ifndef YYCOPY
491 # if defined __GNUC__ && 1 < __GNUC__
492 # define YYCOPY(Dst, Src, Count) \
493  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
494 # else
495 # define YYCOPY(Dst, Src, Count) \
496  do \
497  { \
498  YYSIZE_T yyi; \
499  for (yyi = 0; yyi < (Count); yyi++) \
500  (Dst)[yyi] = (Src)[yyi]; \
501  } \
502  while (0)
503 # endif
504 # endif
505 #endif /* !YYCOPY_NEEDED */
506 
507 /* YYFINAL -- State number of the termination state. */
508 #define YYFINAL 47
509 /* YYLAST -- Last index in YYTABLE. */
510 #define YYLAST 529
511 
512 /* YYNTOKENS -- Number of terminals. */
513 #define YYNTOKENS 57
514 /* YYNNTS -- Number of nonterminals. */
515 #define YYNNTS 18
516 /* YYNRULES -- Number of rules. */
517 #define YYNRULES 86
518 /* YYNSTATES -- Number of states. */
519 #define YYNSTATES 131
520 
521 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
522  by yylex, with out-of-bounds checking. */
523 #define YYUNDEFTOK 2
524 #define YYMAXUTOK 295
525 
526 #define YYTRANSLATE(YYX) \
527  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
528 
529 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
530  as returned by yylex, without out-of-bounds checking. */
531 static const yytype_uint8 yytranslate[] =
532 {
533  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536  2, 2, 2, 2, 2, 2, 2, 51, 36, 2,
537  53, 54, 48, 46, 30, 47, 2, 49, 2, 2,
538  2, 2, 2, 2, 2, 2, 2, 2, 56, 2,
539  2, 32, 2, 33, 45, 2, 2, 2, 2, 2,
540  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542  2, 2, 2, 2, 35, 2, 2, 2, 2, 2,
543  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545  2, 2, 2, 2, 34, 2, 55, 2, 2, 2,
546  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
559  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
560  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
561  25, 26, 27, 28, 29, 31, 37, 38, 39, 40,
562  41, 42, 43, 44, 50, 52
563 };
564 
565 #if YYDEBUG
566  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
567 static const yytype_uint16 yyrline[] =
568 {
569  0, 192, 192, 193, 196, 202, 207, 211, 215, 219,
570  223, 227, 237, 236, 247, 250, 254, 258, 264, 270,
571  276, 282, 288, 292, 300, 306, 314, 318, 322, 326,
572  330, 334, 338, 342, 346, 350, 354, 358, 362, 366,
573  370, 374, 378, 382, 387, 391, 395, 401, 408, 419,
574  426, 429, 432, 443, 450, 458, 495, 498, 499, 543,
575  545, 547, 549, 551, 554, 556, 558, 562, 564, 569,
576  571, 573, 575, 577, 579, 581, 583, 585, 587, 589,
577  591, 593, 595, 600, 605, 612, 616
578 };
579 #endif
580 
581 #if YYDEBUG || YYERROR_VERBOSE || 0
582 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
583  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
584 static const char *const yytname[] =
585 {
586  "$end", "error", "$undefined", "INT", "FLOAT", "STRING_LITERAL",
587  "BOOLEAN_LITERAL", "NAME", "TYPENAME", "NAME_OR_INT", "SIZEOF", "ERROR",
588  "INT_KEYWORD", "INT_S2_KEYWORD", "LOGICAL_S1_KEYWORD",
589  "LOGICAL_S2_KEYWORD", "LOGICAL_S8_KEYWORD", "LOGICAL_KEYWORD",
590  "REAL_KEYWORD", "REAL_S8_KEYWORD", "REAL_S16_KEYWORD",
591  "COMPLEX_S8_KEYWORD", "COMPLEX_S16_KEYWORD", "COMPLEX_S32_KEYWORD",
592  "BOOL_AND", "BOOL_OR", "BOOL_NOT", "CHARACTER", "VARIABLE",
593  "ASSIGN_MODIFY", "','", "ABOVE_COMMA", "'='", "'?'", "'|'", "'^'", "'&'",
594  "EQUAL", "NOTEQUAL", "LESSTHAN", "GREATERTHAN", "LEQ", "GEQ", "LSH",
595  "RSH", "'@'", "'+'", "'-'", "'*'", "'/'", "STARSTAR", "'%'", "UNARY",
596  "'('", "')'", "'~'", "':'", "$accept", "start", "type_exp", "exp", "$@1",
597  "arglist", "subrange", "complexnum", "variable", "type", "ptype",
598  "abs_decl", "direct_abs_decl", "func_mod", "typebase",
599  "nonempty_typelist", "name", "name_not_typename", YY_NULLPTRPTR
600 };
601 #endif
602 
603 # ifdef YYPRINT
604 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
605  (internal) symbol number NUM (which must be that of a token). */
606 static const yytype_uint16 yytoknum[] =
607 {
608  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
609  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
610  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
611  44, 285, 61, 63, 124, 94, 38, 286, 287, 288,
612  289, 290, 291, 292, 293, 64, 43, 45, 42, 47,
613  294, 37, 295, 40, 41, 126, 58
614 };
615 # endif
616 
617 #define YYPACT_NINF -57
618 
619 #define yypact_value_is_default(Yystate) \
620  (!!((Yystate) == (-57)))
621 
622 #define YYTABLE_NINF -1
623 
624 #define yytable_value_is_error(Yytable_value) \
625  0
626 
627  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
628  STATE-NUM. */
629 static const yytype_int16 yypact[] =
630 {
631  134, -57, -57, -57, -57, -57, -57, -57, 162, -57,
632  -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
633  -57, 190, -57, -57, 190, 190, 190, 134, 190, 19,
634  -57, 359, -57, -57, -57, -35, -57, 134, -33, -33,
635  -33, -33, -33, 328, -32, -31, -33, -57, 190, 190,
636  190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
637  190, 190, 190, 190, 190, 190, 190, 190, 190, 24,
638  -57, -35, -35, 234, -57, -12, -57, -11, 190, -57,
639  -57, 190, 407, 387, 359, 359, 426, 444, 461, 476,
640  476, 228, 228, 228, 228, -13, -13, 49, -39, -39,
641  -46, -46, -46, -57, -57, 80, -57, -57, -57, -57,
642  -10, -27, 277, -57, 66, 359, -33, 190, 298, -24,
643  -57, -57, 293, -57, 359, 190, 190, -57, -57, 359,
644  359
645 };
646 
647  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
648  Performed when YYTABLE does not specify something else to do. Zero
649  means the default is an error. */
650 static const yytype_uint8 yydefact[] =
651 {
652  0, 47, 49, 54, 53, 86, 69, 48, 0, 70,
653  71, 76, 75, 73, 74, 77, 78, 79, 80, 81,
654  82, 0, 72, 51, 0, 0, 0, 0, 0, 0,
655  3, 2, 50, 4, 56, 57, 55, 0, 11, 9,
656  7, 8, 6, 0, 0, 0, 10, 1, 0, 0,
657  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
658  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
659  12, 61, 59, 0, 58, 63, 66, 0, 0, 5,
660  23, 0, 43, 44, 46, 45, 42, 41, 40, 34,
661  35, 38, 39, 36, 37, 32, 33, 26, 30, 31,
662  28, 29, 27, 85, 25, 14, 62, 60, 67, 83,
663  0, 0, 0, 65, 52, 22, 24, 21, 15, 0,
664  16, 64, 0, 68, 20, 19, 0, 13, 84, 18,
665  17
666 };
667 
668  /* YYPGOTO[NTERM-NUM]. */
669 static const yytype_int8 yypgoto[] =
670 {
671  -57, -57, -57, 0, -57, -57, -57, -57, -57, 2,
672  -57, -56, -57, -30, -57, -57, -57, -57
673 };
674 
675  /* YYDEFGOTO[NTERM-NUM]. */
676 static const yytype_int8 yydefgoto[] =
677 {
678  -1, 29, 30, 43, 105, 119, 120, 44, 32, 109,
679  34, 74, 75, 76, 35, 111, 104, 36
680 };
681 
682  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
683  positive, shift that token. If negative, reduce the rule whose
684  number is the opposite. If YYTABLE_NINF, syntax error. */
685 static const yytype_uint8 yytable[] =
686 {
687  31, 71, 33, 122, 68, 69, 126, 70, 38, 66,
688  67, 68, 69, 72, 70, 106, 107, 110, 73, 47,
689  70, 39, 80, 81, 40, 41, 42, 123, 46, 45,
690  127, 103, 63, 64, 65, 66, 67, 68, 69, 77,
691  70, 112, 0, 114, 121, 113, 0, 0, 82, 83,
692  84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
693  94, 95, 96, 97, 98, 99, 100, 101, 102, 1,
694  2, 3, 4, 5, 0, 7, 8, 0, 115, 0,
695  0, 116, 0, 1, 2, 3, 4, 5, 0, 7,
696  8, 0, 21, 0, 23, 64, 65, 66, 67, 68,
697  69, 0, 70, 0, 0, 118, 21, 0, 23, 0,
698  0, 0, 0, 0, 116, 0, 24, 124, 0, 27,
699  0, 28, 0, 0, 128, 129, 130, 25, 26, 0,
700  0, 0, 0, 27, 0, 28, 117, 1, 2, 3,
701  4, 5, 6, 7, 8, 0, 9, 10, 11, 12,
702  13, 14, 15, 16, 17, 18, 19, 20, 0, 0,
703  21, 22, 23, 0, 0, 1, 2, 3, 4, 5,
704  24, 7, 8, 0, 0, 0, 0, 0, 0, 0,
705  0, 25, 26, 0, 0, 0, 0, 27, 21, 28,
706  23, 0, 0, 1, 2, 3, 4, 5, 24, 7,
707  8, 0, 0, 0, 0, 0, 0, 0, 0, 25,
708  26, 0, 0, 0, 0, 37, 21, 28, 23, 0,
709  0, 0, 0, 0, 0, 0, 24, 0, 0, 0,
710  0, 0, 0, 0, 0, 0, 0, 25, 26, 0,
711  0, 0, 6, 27, 0, 28, 9, 10, 11, 12,
712  13, 14, 15, 16, 17, 18, 19, 20, 0, 0,
713  0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
714  71, 61, 62, 63, 64, 65, 66, 67, 68, 69,
715  0, 70, 72, 0, 0, 6, 0, 73, 108, 9,
716  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
717  20, 6, 0, 0, 22, 9, 10, 11, 12, 13,
718  14, 15, 16, 17, 18, 19, 20, 0, 0, 0,
719  22, 0, 48, 49, 0, 0, 0, 50, 0, 0,
720  51, 108, 52, 53, 54, 55, 56, 57, 58, 59,
721  60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
722  0, 70, 48, 49, 125, 0, 0, 50, 78, 0,
723  51, 0, 52, 53, 54, 55, 56, 57, 58, 59,
724  60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
725  0, 70, 79, 48, 49, 0, 0, 0, 50, 0,
726  0, 51, 0, 52, 53, 54, 55, 56, 57, 58,
727  59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
728  69, 48, 70, 0, 0, 0, 0, 0, 0, 0,
729  0, 52, 53, 54, 55, 56, 57, 58, 59, 60,
730  61, 62, 63, 64, 65, 66, 67, 68, 69, 0,
731  70, 52, 53, 54, 55, 56, 57, 58, 59, 60,
732  61, 62, 63, 64, 65, 66, 67, 68, 69, 0,
733  70, 53, 54, 55, 56, 57, 58, 59, 60, 61,
734  62, 63, 64, 65, 66, 67, 68, 69, 0, 70,
735  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
736  64, 65, 66, 67, 68, 69, 0, 70, 55, 56,
737  57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
738  67, 68, 69, 0, 70, 57, 58, 59, 60, 61,
739  62, 63, 64, 65, 66, 67, 68, 69, 0, 70
740 };
741 
742 static const yytype_int8 yycheck[] =
743 {
744  0, 36, 0, 30, 50, 51, 30, 53, 8, 48,
745  49, 50, 51, 48, 53, 71, 72, 73, 53, 0,
746  53, 21, 54, 54, 24, 25, 26, 54, 28, 27,
747  54, 7, 45, 46, 47, 48, 49, 50, 51, 37,
748  53, 53, -1, 54, 54, 75, -1, -1, 48, 49,
749  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
750  60, 61, 62, 63, 64, 65, 66, 67, 68, 3,
751  4, 5, 6, 7, -1, 9, 10, -1, 78, -1,
752  -1, 81, -1, 3, 4, 5, 6, 7, -1, 9,
753  10, -1, 26, -1, 28, 46, 47, 48, 49, 50,
754  51, -1, 53, -1, -1, 105, 26, -1, 28, -1,
755  -1, -1, -1, -1, 114, -1, 36, 117, -1, 53,
756  -1, 55, -1, -1, 122, 125, 126, 47, 48, -1,
757  -1, -1, -1, 53, -1, 55, 56, 3, 4, 5,
758  6, 7, 8, 9, 10, -1, 12, 13, 14, 15,
759  16, 17, 18, 19, 20, 21, 22, 23, -1, -1,
760  26, 27, 28, -1, -1, 3, 4, 5, 6, 7,
761  36, 9, 10, -1, -1, -1, -1, -1, -1, -1,
762  -1, 47, 48, -1, -1, -1, -1, 53, 26, 55,
763  28, -1, -1, 3, 4, 5, 6, 7, 36, 9,
764  10, -1, -1, -1, -1, -1, -1, -1, -1, 47,
765  48, -1, -1, -1, -1, 53, 26, 55, 28, -1,
766  -1, -1, -1, -1, -1, -1, 36, -1, -1, -1,
767  -1, -1, -1, -1, -1, -1, -1, 47, 48, -1,
768  -1, -1, 8, 53, -1, 55, 12, 13, 14, 15,
769  16, 17, 18, 19, 20, 21, 22, 23, -1, -1,
770  -1, 27, -1, -1, -1, -1, -1, -1, -1, -1,
771  36, 43, 44, 45, 46, 47, 48, 49, 50, 51,
772  -1, 53, 48, -1, -1, 8, -1, 53, 54, 12,
773  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
774  23, 8, -1, -1, 27, 12, 13, 14, 15, 16,
775  17, 18, 19, 20, 21, 22, 23, -1, -1, -1,
776  27, -1, 24, 25, -1, -1, -1, 29, -1, -1,
777  32, 54, 34, 35, 36, 37, 38, 39, 40, 41,
778  42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
779  -1, 53, 24, 25, 56, -1, -1, 29, 30, -1,
780  32, -1, 34, 35, 36, 37, 38, 39, 40, 41,
781  42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
782  -1, 53, 54, 24, 25, -1, -1, -1, 29, -1,
783  -1, 32, -1, 34, 35, 36, 37, 38, 39, 40,
784  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
785  51, 24, 53, -1, -1, -1, -1, -1, -1, -1,
786  -1, 34, 35, 36, 37, 38, 39, 40, 41, 42,
787  43, 44, 45, 46, 47, 48, 49, 50, 51, -1,
788  53, 34, 35, 36, 37, 38, 39, 40, 41, 42,
789  43, 44, 45, 46, 47, 48, 49, 50, 51, -1,
790  53, 35, 36, 37, 38, 39, 40, 41, 42, 43,
791  44, 45, 46, 47, 48, 49, 50, 51, -1, 53,
792  36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
793  46, 47, 48, 49, 50, 51, -1, 53, 37, 38,
794  39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
795  49, 50, 51, -1, 53, 39, 40, 41, 42, 43,
796  44, 45, 46, 47, 48, 49, 50, 51, -1, 53
797 };
798 
799  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
800  symbol of state STATE-NUM. */
801 static const yytype_uint8 yystos[] =
802 {
803  0, 3, 4, 5, 6, 7, 8, 9, 10, 12,
804  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
805  23, 26, 27, 28, 36, 47, 48, 53, 55, 58,
806  59, 60, 65, 66, 67, 71, 74, 53, 60, 60,
807  60, 60, 60, 60, 64, 66, 60, 0, 24, 25,
808  29, 32, 34, 35, 36, 37, 38, 39, 40, 41,
809  42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
810  53, 36, 48, 53, 68, 69, 70, 66, 30, 54,
811  54, 54, 60, 60, 60, 60, 60, 60, 60, 60,
812  60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
813  60, 60, 60, 7, 73, 61, 68, 68, 54, 66,
814  68, 72, 53, 70, 54, 60, 60, 56, 60, 62,
815  63, 54, 30, 54, 60, 56, 30, 54, 66, 60,
816  60
817 };
818 
819  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
820 static const yytype_uint8 yyr1[] =
821 {
822  0, 57, 58, 58, 59, 60, 60, 60, 60, 60,
823  60, 60, 61, 60, 62, 62, 62, 62, 63, 63,
824  63, 63, 64, 60, 60, 60, 60, 60, 60, 60,
825  60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
826  60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
827  60, 60, 60, 60, 60, 65, 66, 67, 67, 68,
828  68, 68, 68, 68, 69, 69, 69, 70, 70, 71,
829  71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
830  71, 71, 71, 72, 72, 73, 74
831 };
832 
833  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
834 static const yytype_uint8 yyr2[] =
835 {
836  0, 2, 1, 1, 1, 3, 2, 2, 2, 2,
837  2, 2, 0, 5, 0, 1, 1, 3, 3, 2,
838  2, 1, 3, 3, 4, 3, 3, 3, 3, 3,
839  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
840  3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
841  1, 1, 4, 1, 1, 1, 1, 1, 2, 1,
842  2, 1, 2, 1, 3, 2, 1, 2, 3, 1,
843  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
844  1, 1, 1, 1, 3, 1, 1
845 };
846 
847 
848 #define yyerrok (yyerrstatus = 0)
849 #define yyclearin (yychar = YYEMPTY)
850 #define YYEMPTY (-2)
851 #define YYEOF 0
852 
853 #define YYACCEPT goto yyacceptlab
854 #define YYABORT goto yyabortlab
855 #define YYERROR goto yyerrorlab
856 
857 
858 #define YYRECOVERING() (!!yyerrstatus)
859 
860 #define YYBACKUP(Token, Value) \
861 do \
862  if (yychar == YYEMPTY) \
863  { \
864  yychar = (Token); \
865  yylval = (Value); \
866  YYPOPSTACK (yylen); \
867  yystate = *yyssp; \
868  goto yybackup; \
869  } \
870  else \
871  { \
872  yyerror (YY_("syntax error: cannot back up")); \
873  YYERROR; \
874  } \
875 while (0)
876 
877 /* Error token number */
878 #define YYTERROR 1
879 #define YYERRCODE 256
880 
881 
882 
883 /* Enable debugging if requested. */
884 #if YYDEBUG
885 
886 # ifndef YYFPRINTF
887 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
888 # define YYFPRINTF fprintf
889 # endif
890 
891 # define YYDPRINTF(Args) \
892 do { \
893  if (yydebug) \
894  YYFPRINTF Args; \
895 } while (0)
896 
897 /* This macro is provided for backward compatibility. */
898 #ifndef YY_LOCATION_PRINT
899 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
900 #endif
901 
902 
903 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
904 do { \
905  if (yydebug) \
906  { \
907  YYFPRINTF (stderr, "%s ", Title); \
908  yy_symbol_print (stderr, \
909  Type, Value); \
910  YYFPRINTF (stderr, "\n"); \
911  } \
912 } while (0)
913 
914 
915 /*----------------------------------------.
916 | Print this symbol's value on YYOUTPUT. |
917 `----------------------------------------*/
918 
919 static void
920 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
921 {
922  FILE *yyo = yyoutput;
923  YYUSE (yyo);
924  if (!yyvaluep)
925  return;
926 # ifdef YYPRINT
927  if (yytype < YYNTOKENS)
928  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
929 # endif
930  YYUSE (yytype);
931 }
932 
933 
934 /*--------------------------------.
935 | Print this symbol on YYOUTPUT. |
936 `--------------------------------*/
937 
938 static void
939 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
940 {
941  YYFPRINTF (yyoutput, "%s %s (",
942  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
943 
944  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
945  YYFPRINTF (yyoutput, ")");
946 }
947 
948 /*------------------------------------------------------------------.
949 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
950 | TOP (included). |
951 `------------------------------------------------------------------*/
952 
953 static void
955 {
956  YYFPRINTF (stderr, "Stack now");
957  for (; yybottom <= yytop; yybottom++)
958  {
959  int yybot = *yybottom;
960  YYFPRINTF (stderr, " %d", yybot);
961  }
962  YYFPRINTF (stderr, "\n");
963 }
964 
965 # define YY_STACK_PRINT(Bottom, Top) \
966 do { \
967  if (yydebug) \
968  yy_stack_print ((Bottom), (Top)); \
969 } while (0)
970 
971 
972 /*------------------------------------------------.
973 | Report that the YYRULE is going to be reduced. |
974 `------------------------------------------------*/
975 
976 static void
978 {
979  unsigned long int yylno = yyrline[yyrule];
980  int yynrhs = yyr2[yyrule];
981  int yyi;
982  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
983  yyrule - 1, yylno);
984  /* The symbols being reduced. */
985  for (yyi = 0; yyi < yynrhs; yyi++)
986  {
987  YYFPRINTF (stderr, " $%d = ", yyi + 1);
988  yy_symbol_print (stderr,
989  yystos[yyssp[yyi + 1 - yynrhs]],
990  &(yyvsp[(yyi + 1) - (yynrhs)])
991  );
992  YYFPRINTF (stderr, "\n");
993  }
994 }
995 
996 # define YY_REDUCE_PRINT(Rule) \
997 do { \
998  if (yydebug) \
999  yy_reduce_print (yyssp, yyvsp, Rule); \
1000 } while (0)
1001 
1002 /* Nonzero means print parse trace. It is left uninitialized so that
1003  multiple parsers can coexist. */
1005 #else /* !YYDEBUG */
1006 # define YYDPRINTF(Args)
1007 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1008 # define YY_STACK_PRINT(Bottom, Top)
1009 # define YY_REDUCE_PRINT(Rule)
1010 #endif /* !YYDEBUG */
1011 
1012 
1013 /* YYINITDEPTH -- initial size of the parser's stacks. */
1014 #ifndef YYINITDEPTH
1015 # define YYINITDEPTH 200
1016 #endif
1017 
1018 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1019  if the built-in stack extension method is used).
1020 
1021  Do not make this value too large; the results are undefined if
1022  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1023  evaluated with infinite-precision integer arithmetic. */
1024 
1025 #ifndef YYMAXDEPTH
1026 # define YYMAXDEPTH 10000
1027 #endif
1028 
1029 
1030 #if YYERROR_VERBOSE
1031 
1032 # ifndef yystrlen
1033 # if defined __GLIBC__ && defined _STRING_H
1034 # define yystrlen strlen
1035 # else
1036 /* Return the length of YYSTR. */
1037 static YYSIZE_T
1038 yystrlen (const char *yystr)
1039 {
1040  YYSIZE_T yylen;
1041  for (yylen = 0; yystr[yylen]; yylen++)
1042  continue;
1043  return yylen;
1044 }
1045 # endif
1046 # endif
1047 
1048 # ifndef yystpcpy
1049 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1050 # define yystpcpy stpcpy
1051 # else
1052 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1053  YYDEST. */
1054 static char *
1055 yystpcpy (char *yydest, const char *yysrc)
1056 {
1057  char *yyd = yydest;
1058  const char *yys = yysrc;
1059 
1060  while ((*yyd++ = *yys++) != '\0')
1061  continue;
1062 
1063  return yyd - 1;
1064 }
1065 # endif
1066 # endif
1067 
1068 # ifndef yytnamerr
1069 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1070  quotes and backslashes, so that it's suitable for yyerror. The
1071  heuristic is that double-quoting is unnecessary unless the string
1072  contains an apostrophe, a comma, or backslash (other than
1073  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1074  null, do not copy; instead, return the length of what the result
1075  would have been. */
1076 static YYSIZE_T
1077 yytnamerr (char *yyres, const char *yystr)
1078 {
1079  if (*yystr == '"')
1080  {
1081  YYSIZE_T yyn = 0;
1082  char const *yyp = yystr;
1083 
1084  for (;;)
1085  switch (*++yyp)
1086  {
1087  case '\'':
1088  case ',':
1089  goto do_not_strip_quotes;
1090 
1091  case '\\':
1092  if (*++yyp != '\\')
1093  goto do_not_strip_quotes;
1094  /* Fall through. */
1095  default:
1096  if (yyres)
1097  yyres[yyn] = *yyp;
1098  yyn++;
1099  break;
1100 
1101  case '"':
1102  if (yyres)
1103  yyres[yyn] = '\0';
1104  return yyn;
1105  }
1106  do_not_strip_quotes: ;
1107  }
1108 
1109  if (! yyres)
1110  return yystrlen (yystr);
1111 
1112  return yystpcpy (yyres, yystr) - yyres;
1113 }
1114 # endif
1115 
1116 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1117  about the unexpected token YYTOKEN for the state stack whose top is
1118  YYSSP.
1119 
1120  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1121  not large enough to hold the message. In that case, also set
1122  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1123  required number of bytes is too large to store. */
1124 static int
1125 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1126  yytype_int16 *yyssp, int yytoken)
1127 {
1128  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTRPTR, yytname[yytoken]);
1129  YYSIZE_T yysize = yysize0;
1130  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1131  /* Internationalized format string. */
1132  const char *yyformat = YY_NULLPTRPTR;
1133  /* Arguments of yyformat. */
1134  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1135  /* Number of reported tokens (one for the "unexpected", one per
1136  "expected"). */
1137  int yycount = 0;
1138 
1139  /* There are many possibilities here to consider:
1140  - If this state is a consistent state with a default action, then
1141  the only way this function was invoked is if the default action
1142  is an error action. In that case, don't check for expected
1143  tokens because there are none.
1144  - The only way there can be no lookahead present (in yychar) is if
1145  this state is a consistent state with a default action. Thus,
1146  detecting the absence of a lookahead is sufficient to determine
1147  that there is no unexpected or expected token to report. In that
1148  case, just report a simple "syntax error".
1149  - Don't assume there isn't a lookahead just because this state is a
1150  consistent state with a default action. There might have been a
1151  previous inconsistent state, consistent state with a non-default
1152  action, or user semantic action that manipulated yychar.
1153  - Of course, the expected token list depends on states to have
1154  correct lookahead information, and it depends on the parser not
1155  to perform extra reductions after fetching a lookahead from the
1156  scanner and before detecting a syntax error. Thus, state merging
1157  (from LALR or IELR) and default reductions corrupt the expected
1158  token list. However, the list is correct for canonical LR with
1159  one exception: it will still contain any token that will not be
1160  accepted due to an error action in a later state.
1161  */
1162  if (yytoken != YYEMPTY)
1163  {
1164  int yyn = yypact[*yyssp];
1165  yyarg[yycount++] = yytname[yytoken];
1166  if (!yypact_value_is_default (yyn))
1167  {
1168  /* Start YYX at -YYN if negative to avoid negative indexes in
1169  YYCHECK. In other words, skip the first -YYN actions for
1170  this state because they are default actions. */
1171  int yyxbegin = yyn < 0 ? -yyn : 0;
1172  /* Stay within bounds of both yycheck and yytname. */
1173  int yychecklim = YYLAST - yyn + 1;
1174  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1175  int yyx;
1176 
1177  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1178  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1179  && !yytable_value_is_error (yytable[yyx + yyn]))
1180  {
1181  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1182  {
1183  yycount = 1;
1184  yysize = yysize0;
1185  break;
1186  }
1187  yyarg[yycount++] = yytname[yyx];
1188  {
1189  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTRPTR, yytname[yyx]);
1190  if (! (yysize <= yysize1
1191  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1192  return 2;
1193  yysize = yysize1;
1194  }
1195  }
1196  }
1197  }
1198 
1199  switch (yycount)
1200  {
1201 # define YYCASE_(N, S) \
1202  case N: \
1203  yyformat = S; \
1204  break
1205  YYCASE_(0, YY_("syntax error"));
1206  YYCASE_(1, YY_("syntax error, unexpected %s"));
1207  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1208  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1209  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1210  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1211 # undef YYCASE_
1212  }
1213 
1214  {
1215  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1216  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1217  return 2;
1218  yysize = yysize1;
1219  }
1220 
1221  if (*yymsg_alloc < yysize)
1222  {
1223  *yymsg_alloc = 2 * yysize;
1224  if (! (yysize <= *yymsg_alloc
1225  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1226  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1227  return 1;
1228  }
1229 
1230  /* Avoid sprintf, as that infringes on the user's name space.
1231  Don't have undefined behavior even if the translation
1232  produced a string with the wrong number of "%s"s. */
1233  {
1234  char *yyp = *yymsg;
1235  int yyi = 0;
1236  while ((*yyp = *yyformat) != '\0')
1237  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1238  {
1239  yyp += yytnamerr (yyp, yyarg[yyi++]);
1240  yyformat += 2;
1241  }
1242  else
1243  {
1244  yyp++;
1245  yyformat++;
1246  }
1247  }
1248  return 0;
1249 }
1250 #endif /* YYERROR_VERBOSE */
1251 
1252 /*-----------------------------------------------.
1253 | Release the memory associated to this symbol. |
1254 `-----------------------------------------------*/
1255 
1256 static void
1257 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1258 {
1259  YYUSE (yyvaluep);
1260  if (!yymsg)
1261  yymsg = "Deleting";
1262  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1263 
1265  YYUSE (yytype);
1267 }
1268 
1269 
1270 
1271 
1272 /* The lookahead symbol. */
1274 
1275 /* The semantic value of the lookahead symbol. */
1277 /* Number of syntax errors so far. */
1279 
1280 
1281 /*----------.
1282 | yyparse. |
1283 `----------*/
1284 
1285 int
1286 yyparse (void)
1287 {
1288  int yystate;
1289  /* Number of tokens to shift before error messages enabled. */
1290  int yyerrstatus;
1291 
1292  /* The stacks and their tools:
1293  'yyss': related to states.
1294  'yyvs': related to semantic values.
1295 
1296  Refer to the stacks through separate pointers, to allow yyoverflow
1297  to xreallocate them elsewhere. */
1298 
1299  /* The state stack. */
1300  yytype_int16 yyssa[YYINITDEPTH];
1301  yytype_int16 *yyss;
1303 
1304  /* The semantic value stack. */
1305  YYSTYPE yyvsa[YYINITDEPTH];
1306  YYSTYPE *yyvs;
1307  YYSTYPE *yyvsp;
1308 
1310 
1311  int yyn;
1312  int yyresult;
1313  /* Lookahead token as an internal (translated) token number. */
1314  int yytoken = 0;
1315  /* The variables used to return semantic value and location from the
1316  action routines. */
1317  YYSTYPE yyval;
1318 
1319 #if YYERROR_VERBOSE
1320  /* Buffer for error messages, and its allocated size. */
1321  char yymsgbuf[128];
1322  char *yymsg = yymsgbuf;
1323  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1324 #endif
1325 
1326 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1327 
1328  /* The number of symbols on the RHS of the reduced rule.
1329  Keep to zero when no symbol should be popped. */
1330  int yylen = 0;
1331 
1332  yyssp = yyss = yyssa;
1333  yyvsp = yyvs = yyvsa;
1335 
1336  YYDPRINTF ((stderr, "Starting parse\n"));
1337 
1338  yystate = 0;
1339  yyerrstatus = 0;
1340  yynerrs = 0;
1341  yychar = YYEMPTY; /* Cause a token to be read. */
1342  goto yysetstate;
1343 
1344 /*------------------------------------------------------------.
1345 | yynewstate -- Push a new state, which is found in yystate. |
1346 `------------------------------------------------------------*/
1347  yynewstate:
1348  /* In all cases, when you get here, the value and location stacks
1349  have just been pushed. So pushing a state here evens the stacks. */
1350  yyssp++;
1351 
1352  yysetstate:
1353  *yyssp = yystate;
1354 
1355  if (yyss + yystacksize - 1 <= yyssp)
1356  {
1357  /* Get the current used size of the three stacks, in elements. */
1358  YYSIZE_T yysize = yyssp - yyss + 1;
1359 
1360 #ifdef yyoverflow
1361  {
1362  /* Give user a chance to xreallocate the stack. Use copies of
1363  these so that the &'s don't force the real ones into
1364  memory. */
1365  YYSTYPE *yyvs1 = yyvs;
1366  yytype_int16 *yyss1 = yyss;
1367 
1368  /* Each stack pointer address is followed by the size of the
1369  data in use in that stack, in bytes. This used to be a
1370  conditional around just the two extra args, but that might
1371  be undefined if yyoverflow is a macro. */
1372  yyoverflow (YY_("memory exhausted"),
1373  &yyss1, yysize * sizeof (*yyssp),
1374  &yyvs1, yysize * sizeof (*yyvsp),
1375  &yystacksize);
1376 
1377  yyss = yyss1;
1378  yyvs = yyvs1;
1379  }
1380 #else /* no yyoverflow */
1381 # ifndef YYSTACK_RELOCATE
1382  goto yyexhaustedlab;
1383 # else
1384  /* Extend the stack our own way. */
1385  if (YYMAXDEPTH <= yystacksize)
1386  goto yyexhaustedlab;
1387  yystacksize *= 2;
1388  if (YYMAXDEPTH < yystacksize)
1390 
1391  {
1392  yytype_int16 *yyss1 = yyss;
1393  union yyalloc *yyptr =
1395  if (! yyptr)
1396  goto yyexhaustedlab;
1399 # undef YYSTACK_RELOCATE
1400  if (yyss1 != yyssa)
1401  YYSTACK_FREE (yyss1);
1402  }
1403 # endif
1404 #endif /* no yyoverflow */
1405 
1406  yyssp = yyss + yysize - 1;
1407  yyvsp = yyvs + yysize - 1;
1408 
1409  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1410  (unsigned long int) yystacksize));
1411 
1412  if (yyss + yystacksize - 1 <= yyssp)
1413  YYABORT;
1414  }
1415 
1416  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1417 
1418  if (yystate == YYFINAL)
1419  YYACCEPT;
1420 
1421  goto yybackup;
1422 
1423 /*-----------.
1424 | yybackup. |
1425 `-----------*/
1426 yybackup:
1427 
1428  /* Do appropriate processing given the current state. Read a
1429  lookahead token if we need one and don't already have one. */
1430 
1431  /* First try to decide what to do without reference to lookahead token. */
1432  yyn = yypact[yystate];
1433  if (yypact_value_is_default (yyn))
1434  goto yydefault;
1435 
1436  /* Not known => get a lookahead token if don't already have one. */
1437 
1438  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1439  if (yychar == YYEMPTY)
1440  {
1441  YYDPRINTF ((stderr, "Reading a token: "));
1442  yychar = yylex ();
1443  }
1444 
1445  if (yychar <= YYEOF)
1446  {
1447  yychar = yytoken = YYEOF;
1448  YYDPRINTF ((stderr, "Now at end of input.\n"));
1449  }
1450  else
1451  {
1452  yytoken = YYTRANSLATE (yychar);
1453  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1454  }
1455 
1456  /* If the proper action on seeing token YYTOKEN is to reduce or to
1457  detect an error, take that action. */
1458  yyn += yytoken;
1459  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1460  goto yydefault;
1461  yyn = yytable[yyn];
1462  if (yyn <= 0)
1463  {
1464  if (yytable_value_is_error (yyn))
1465  goto yyerrlab;
1466  yyn = -yyn;
1467  goto yyreduce;
1468  }
1469 
1470  /* Count tokens shifted since error; after three, turn off error
1471  status. */
1472  if (yyerrstatus)
1473  yyerrstatus--;
1474 
1475  /* Shift the lookahead token. */
1476  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1477 
1478  /* Discard the shifted token. */
1479  yychar = YYEMPTY;
1480 
1481  yystate = yyn;
1483  *++yyvsp = yylval;
1485 
1486  goto yynewstate;
1487 
1488 
1489 /*-----------------------------------------------------------.
1490 | yydefault -- do the default action for the current state. |
1491 `-----------------------------------------------------------*/
1492 yydefault:
1493  yyn = yydefact[yystate];
1494  if (yyn == 0)
1495  goto yyerrlab;
1496  goto yyreduce;
1497 
1498 
1499 /*-----------------------------.
1500 | yyreduce -- Do a reduction. |
1501 `-----------------------------*/
1502 yyreduce:
1503  /* yyn is the number of a rule to reduce with. */
1504  yylen = yyr2[yyn];
1505 
1506  /* If YYLEN is nonzero, implement the default value of the action:
1507  '$$ = $1'.
1508 
1509  Otherwise, the following line sets YYVAL to garbage.
1510  This behavior is undocumented and Bison
1511  users should not rely upon it. Assigning to YYVAL
1512  unconditionally makes the parser a bit smaller, and it avoids a
1513  GCC warning that YYVAL may be used uninitialized. */
1514  yyval = yyvsp[1-yylen];
1515 
1516 
1517  YY_REDUCE_PRINT (yyn);
1518  switch (yyn)
1519  {
1520  case 4:
1521 #line 197 "f-exp.y" /* yacc.c:1646 */
1522  { write_exp_elt_opcode (pstate, OP_TYPE);
1523  write_exp_elt_type (pstate, (yyvsp[0].tval));
1524  write_exp_elt_opcode (pstate, OP_TYPE); }
1525 #line 1527 "f-exp.c" /* yacc.c:1646 */
1526  break;
1527 
1528  case 5:
1529 #line 203 "f-exp.y" /* yacc.c:1646 */
1530  { }
1531 #line 1533 "f-exp.c" /* yacc.c:1646 */
1532  break;
1533 
1534  case 6:
1535 #line 208 "f-exp.y" /* yacc.c:1646 */
1536  { write_exp_elt_opcode (pstate, UNOP_IND); }
1537 #line 1539 "f-exp.c" /* yacc.c:1646 */
1538  break;
1539 
1540  case 7:
1541 #line 212 "f-exp.y" /* yacc.c:1646 */
1542  { write_exp_elt_opcode (pstate, UNOP_ADDR); }
1543 #line 1545 "f-exp.c" /* yacc.c:1646 */
1544  break;
1545 
1546  case 8:
1547 #line 216 "f-exp.y" /* yacc.c:1646 */
1548  { write_exp_elt_opcode (pstate, UNOP_NEG); }
1549 #line 1551 "f-exp.c" /* yacc.c:1646 */
1550  break;
1551 
1552  case 9:
1553 #line 220 "f-exp.y" /* yacc.c:1646 */
1554  { write_exp_elt_opcode (pstate, UNOP_LOGICAL_NOT); }
1555 #line 1557 "f-exp.c" /* yacc.c:1646 */
1556  break;
1557 
1558  case 10:
1559 #line 224 "f-exp.y" /* yacc.c:1646 */
1560  { write_exp_elt_opcode (pstate, UNOP_COMPLEMENT); }
1561 #line 1563 "f-exp.c" /* yacc.c:1646 */
1562  break;
1563 
1564  case 11:
1565 #line 228 "f-exp.y" /* yacc.c:1646 */
1566  { write_exp_elt_opcode (pstate, UNOP_SIZEOF); }
1567 #line 1569 "f-exp.c" /* yacc.c:1646 */
1568  break;
1569 
1570  case 12:
1571 #line 237 "f-exp.y" /* yacc.c:1646 */
1572  { start_arglist (); }
1573 #line 1575 "f-exp.c" /* yacc.c:1646 */
1574  break;
1575 
1576  case 13:
1577 #line 239 "f-exp.y" /* yacc.c:1646 */
1579  OP_F77_UNDETERMINED_ARGLIST);
1581  (LONGEST) end_arglist ());
1583  OP_F77_UNDETERMINED_ARGLIST); }
1584 #line 1586 "f-exp.c" /* yacc.c:1646 */
1585  break;
1586 
1587  case 15:
1588 #line 251 "f-exp.y" /* yacc.c:1646 */
1589  { arglist_len = 1; }
1590 #line 1592 "f-exp.c" /* yacc.c:1646 */
1591  break;
1592 
1593  case 16:
1594 #line 255 "f-exp.y" /* yacc.c:1646 */
1595  { arglist_len = 1; }
1596 #line 1598 "f-exp.c" /* yacc.c:1646 */
1597  break;
1598 
1599  case 17:
1600 #line 259 "f-exp.y" /* yacc.c:1646 */
1601  { arglist_len++; }
1602 #line 1604 "f-exp.c" /* yacc.c:1646 */
1603  break;
1604 
1605  case 18:
1606 #line 265 "f-exp.y" /* yacc.c:1646 */
1607  { write_exp_elt_opcode (pstate, OP_RANGE);
1609  write_exp_elt_opcode (pstate, OP_RANGE); }
1610 #line 1612 "f-exp.c" /* yacc.c:1646 */
1611  break;
1612 
1613  case 19:
1614 #line 271 "f-exp.y" /* yacc.c:1646 */
1615  { write_exp_elt_opcode (pstate, OP_RANGE);
1617  write_exp_elt_opcode (pstate, OP_RANGE); }
1618 #line 1620 "f-exp.c" /* yacc.c:1646 */
1619  break;
1620 
1621  case 20:
1622 #line 277 "f-exp.y" /* yacc.c:1646 */
1623  { write_exp_elt_opcode (pstate, OP_RANGE);
1625  write_exp_elt_opcode (pstate, OP_RANGE); }
1626 #line 1628 "f-exp.c" /* yacc.c:1646 */
1627  break;
1628 
1629  case 21:
1630 #line 283 "f-exp.y" /* yacc.c:1646 */
1631  { write_exp_elt_opcode (pstate, OP_RANGE);
1633  write_exp_elt_opcode (pstate, OP_RANGE); }
1634 #line 1636 "f-exp.c" /* yacc.c:1646 */
1635  break;
1636 
1637  case 22:
1638 #line 289 "f-exp.y" /* yacc.c:1646 */
1639  { }
1640 #line 1642 "f-exp.c" /* yacc.c:1646 */
1641  break;
1642 
1643  case 23:
1644 #line 293 "f-exp.y" /* yacc.c:1646 */
1645  { write_exp_elt_opcode (pstate, OP_COMPLEX);
1648  ->builtin_complex_s16);
1649  write_exp_elt_opcode (pstate, OP_COMPLEX); }
1650 #line 1652 "f-exp.c" /* yacc.c:1646 */
1651  break;
1652 
1653  case 24:
1654 #line 301 "f-exp.y" /* yacc.c:1646 */
1655  { write_exp_elt_opcode (pstate, UNOP_CAST);
1656  write_exp_elt_type (pstate, (yyvsp[-2].tval));
1657  write_exp_elt_opcode (pstate, UNOP_CAST); }
1658 #line 1660 "f-exp.c" /* yacc.c:1646 */
1659  break;
1660 
1661  case 25:
1662 #line 307 "f-exp.y" /* yacc.c:1646 */
1663  { write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);
1664  write_exp_string (pstate, (yyvsp[0].sval));
1665  write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); }
1666 #line 1668 "f-exp.c" /* yacc.c:1646 */
1667  break;
1668 
1669  case 26:
1670 #line 315 "f-exp.y" /* yacc.c:1646 */
1671  { write_exp_elt_opcode (pstate, BINOP_REPEAT); }
1672 #line 1674 "f-exp.c" /* yacc.c:1646 */
1673  break;
1674 
1675  case 27:
1676 #line 319 "f-exp.y" /* yacc.c:1646 */
1677  { write_exp_elt_opcode (pstate, BINOP_EXP); }
1678 #line 1680 "f-exp.c" /* yacc.c:1646 */
1679  break;
1680 
1681  case 28:
1682 #line 323 "f-exp.y" /* yacc.c:1646 */
1683  { write_exp_elt_opcode (pstate, BINOP_MUL); }
1684 #line 1686 "f-exp.c" /* yacc.c:1646 */
1685  break;
1686 
1687  case 29:
1688 #line 327 "f-exp.y" /* yacc.c:1646 */
1689  { write_exp_elt_opcode (pstate, BINOP_DIV); }
1690 #line 1692 "f-exp.c" /* yacc.c:1646 */
1691  break;
1692 
1693  case 30:
1694 #line 331 "f-exp.y" /* yacc.c:1646 */
1695  { write_exp_elt_opcode (pstate, BINOP_ADD); }
1696 #line 1698 "f-exp.c" /* yacc.c:1646 */
1697  break;
1698 
1699  case 31:
1700 #line 335 "f-exp.y" /* yacc.c:1646 */
1701  { write_exp_elt_opcode (pstate, BINOP_SUB); }
1702 #line 1704 "f-exp.c" /* yacc.c:1646 */
1703  break;
1704 
1705  case 32:
1706 #line 339 "f-exp.y" /* yacc.c:1646 */
1707  { write_exp_elt_opcode (pstate, BINOP_LSH); }
1708 #line 1710 "f-exp.c" /* yacc.c:1646 */
1709  break;
1710 
1711  case 33:
1712 #line 343 "f-exp.y" /* yacc.c:1646 */
1713  { write_exp_elt_opcode (pstate, BINOP_RSH); }
1714 #line 1716 "f-exp.c" /* yacc.c:1646 */
1715  break;
1716 
1717  case 34:
1718 #line 347 "f-exp.y" /* yacc.c:1646 */
1719  { write_exp_elt_opcode (pstate, BINOP_EQUAL); }
1720 #line 1722 "f-exp.c" /* yacc.c:1646 */
1721  break;
1722 
1723  case 35:
1724 #line 351 "f-exp.y" /* yacc.c:1646 */
1725  { write_exp_elt_opcode (pstate, BINOP_NOTEQUAL); }
1726 #line 1728 "f-exp.c" /* yacc.c:1646 */
1727  break;
1728 
1729  case 36:
1730 #line 355 "f-exp.y" /* yacc.c:1646 */
1731  { write_exp_elt_opcode (pstate, BINOP_LEQ); }
1732 #line 1734 "f-exp.c" /* yacc.c:1646 */
1733  break;
1734 
1735  case 37:
1736 #line 359 "f-exp.y" /* yacc.c:1646 */
1737  { write_exp_elt_opcode (pstate, BINOP_GEQ); }
1738 #line 1740 "f-exp.c" /* yacc.c:1646 */
1739  break;
1740 
1741  case 38:
1742 #line 363 "f-exp.y" /* yacc.c:1646 */
1743  { write_exp_elt_opcode (pstate, BINOP_LESS); }
1744 #line 1746 "f-exp.c" /* yacc.c:1646 */
1745  break;
1746 
1747  case 39:
1748 #line 367 "f-exp.y" /* yacc.c:1646 */
1749  { write_exp_elt_opcode (pstate, BINOP_GTR); }
1750 #line 1752 "f-exp.c" /* yacc.c:1646 */
1751  break;
1752 
1753  case 40:
1754 #line 371 "f-exp.y" /* yacc.c:1646 */
1755  { write_exp_elt_opcode (pstate, BINOP_BITWISE_AND); }
1756 #line 1758 "f-exp.c" /* yacc.c:1646 */
1757  break;
1758 
1759  case 41:
1760 #line 375 "f-exp.y" /* yacc.c:1646 */
1761  { write_exp_elt_opcode (pstate, BINOP_BITWISE_XOR); }
1762 #line 1764 "f-exp.c" /* yacc.c:1646 */
1763  break;
1764 
1765  case 42:
1766 #line 379 "f-exp.y" /* yacc.c:1646 */
1767  { write_exp_elt_opcode (pstate, BINOP_BITWISE_IOR); }
1768 #line 1770 "f-exp.c" /* yacc.c:1646 */
1769  break;
1770 
1771  case 43:
1772 #line 383 "f-exp.y" /* yacc.c:1646 */
1773  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_AND); }
1774 #line 1776 "f-exp.c" /* yacc.c:1646 */
1775  break;
1776 
1777  case 44:
1778 #line 388 "f-exp.y" /* yacc.c:1646 */
1779  { write_exp_elt_opcode (pstate, BINOP_LOGICAL_OR); }
1780 #line 1782 "f-exp.c" /* yacc.c:1646 */
1781  break;
1782 
1783  case 45:
1784 #line 392 "f-exp.y" /* yacc.c:1646 */
1785  { write_exp_elt_opcode (pstate, BINOP_ASSIGN); }
1786 #line 1788 "f-exp.c" /* yacc.c:1646 */
1787  break;
1788 
1789  case 46:
1790 #line 396 "f-exp.y" /* yacc.c:1646 */
1791  { write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY);
1792  write_exp_elt_opcode (pstate, (yyvsp[-1].opcode));
1793  write_exp_elt_opcode (pstate, BINOP_ASSIGN_MODIFY); }
1794 #line 1796 "f-exp.c" /* yacc.c:1646 */
1795  break;
1796 
1797  case 47:
1798 #line 402 "f-exp.y" /* yacc.c:1646 */
1799  { write_exp_elt_opcode (pstate, OP_LONG);
1800  write_exp_elt_type (pstate, (yyvsp[0].typed_val).type);
1801  write_exp_elt_longcst (pstate, (LONGEST) ((yyvsp[0].typed_val).val));
1802  write_exp_elt_opcode (pstate, OP_LONG); }
1803 #line 1805 "f-exp.c" /* yacc.c:1646 */
1804  break;
1805 
1806  case 48:
1807 #line 409 "f-exp.y" /* yacc.c:1646 */
1808  { YYSTYPE val;
1809  parse_number (pstate, (yyvsp[0].ssym).stoken.ptr,
1810  (yyvsp[0].ssym).stoken.length, 0, &val);
1811  write_exp_elt_opcode (pstate, OP_LONG);
1814  (LONGEST)val.typed_val.val);
1815  write_exp_elt_opcode (pstate, OP_LONG); }
1816 #line 1818 "f-exp.c" /* yacc.c:1646 */
1817  break;
1818 
1819  case 49:
1820 #line 420 "f-exp.y" /* yacc.c:1646 */
1821  { write_exp_elt_opcode (pstate, OP_FLOAT);
1824  write_exp_elt_opcode (pstate, OP_FLOAT); }
1825 #line 1827 "f-exp.c" /* yacc.c:1646 */
1826  break;
1827 
1828  case 52:
1829 #line 433 "f-exp.y" /* yacc.c:1646 */
1830  { write_exp_elt_opcode (pstate, OP_LONG);
1833  ->builtin_integer);
1834  (yyvsp[-1].tval) = check_typedef ((yyvsp[-1].tval));
1836  (LONGEST) TYPE_LENGTH ((yyvsp[-1].tval)));
1837  write_exp_elt_opcode (pstate, OP_LONG); }
1838 #line 1840 "f-exp.c" /* yacc.c:1646 */
1839  break;
1840 
1841  case 53:
1842 #line 444 "f-exp.y" /* yacc.c:1646 */
1843  { write_exp_elt_opcode (pstate, OP_BOOL);
1844  write_exp_elt_longcst (pstate, (LONGEST) (yyvsp[0].lval));
1845  write_exp_elt_opcode (pstate, OP_BOOL);
1846  }
1847 #line 1849 "f-exp.c" /* yacc.c:1646 */
1848  break;
1849 
1850  case 54:
1851 #line 451 "f-exp.y" /* yacc.c:1646 */
1852  {
1853  write_exp_elt_opcode (pstate, OP_STRING);
1854  write_exp_string (pstate, (yyvsp[0].sval));
1855  write_exp_elt_opcode (pstate, OP_STRING);
1856  }
1857 #line 1859 "f-exp.c" /* yacc.c:1646 */
1858  break;
1859 
1860  case 55:
1861 #line 459 "f-exp.y" /* yacc.c:1646 */
1862  { struct block_symbol sym = (yyvsp[0].ssym).sym;
1863 
1864  if (sym.symbol)
1865  {
1866  if (symbol_read_needs_frame (sym.symbol))
1867  {
1868  if (innermost_block == 0
1869  || contained_in (sym.block,
1870  innermost_block))
1871  innermost_block = sym.block;
1872  }
1873  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
1876  write_exp_elt_opcode (pstate, OP_VAR_VALUE);
1877  break;
1878  }
1879  else
1880  {
1881  struct bound_minimal_symbol msymbol;
1882  char *arg = copy_name ((yyvsp[0].ssym).stoken);
1883 
1884  msymbol =
1886  if (msymbol.minsym != NULL)
1887  write_exp_msymbol (pstate, msymbol);
1888  else if (!have_full_symbols () && !have_partial_symbols ())
1889  error (_("No symbol table is loaded. Use the \"file\" command."));
1890  else
1891  error (_("No symbol \"%s\" in current context."),
1892  copy_name ((yyvsp[0].ssym).stoken));
1893  }
1894  }
1895 #line 1897 "f-exp.c" /* yacc.c:1646 */
1896  break;
1897 
1898  case 58:
1899 #line 500 "f-exp.y" /* yacc.c:1646 */
1900  {
1901  /* This is where the interesting stuff happens. */
1902  int done = 0;
1903  int array_size;
1904  struct type *follow_type = (yyvsp[-1].tval);
1905  struct type *range_type;
1906 
1907  while (!done)
1908  switch (pop_type ())
1909  {
1910  case tp_end:
1911  done = 1;
1912  break;
1913  case tp_pointer:
1914  follow_type = lookup_pointer_type (follow_type);
1915  break;
1916  case tp_reference:
1917  follow_type = lookup_lvalue_reference_type (follow_type);
1918  break;
1919  case tp_array:
1920  array_size = pop_type_int ();
1921  if (array_size != -1)
1922  {
1923  range_type =
1924  create_static_range_type ((struct type *) NULL,
1926  ->builtin_integer,
1927  0, array_size - 1);
1928  follow_type =
1929  create_array_type ((struct type *) NULL,
1930  follow_type, range_type);
1931  }
1932  else
1933  follow_type = lookup_pointer_type (follow_type);
1934  break;
1935  case tp_function:
1936  follow_type = lookup_function_type (follow_type);
1937  break;
1938  }
1939  (yyval.tval) = follow_type;
1940  }
1941 #line 1943 "f-exp.c" /* yacc.c:1646 */
1942  break;
1943 
1944  case 59:
1945 #line 544 "f-exp.y" /* yacc.c:1646 */
1946  { push_type (tp_pointer); (yyval.voidval) = 0; }
1947 #line 1949 "f-exp.c" /* yacc.c:1646 */
1948  break;
1949 
1950  case 60:
1951 #line 546 "f-exp.y" /* yacc.c:1646 */
1952  { push_type (tp_pointer); (yyval.voidval) = (yyvsp[0].voidval); }
1953 #line 1955 "f-exp.c" /* yacc.c:1646 */
1954  break;
1955 
1956  case 61:
1957 #line 548 "f-exp.y" /* yacc.c:1646 */
1958  { push_type (tp_reference); (yyval.voidval) = 0; }
1959 #line 1961 "f-exp.c" /* yacc.c:1646 */
1960  break;
1961 
1962  case 62:
1963 #line 550 "f-exp.y" /* yacc.c:1646 */
1964  { push_type (tp_reference); (yyval.voidval) = (yyvsp[0].voidval); }
1965 #line 1967 "f-exp.c" /* yacc.c:1646 */
1966  break;
1967 
1968  case 64:
1969 #line 555 "f-exp.y" /* yacc.c:1646 */
1970  { (yyval.voidval) = (yyvsp[-1].voidval); }
1971 #line 1973 "f-exp.c" /* yacc.c:1646 */
1972  break;
1973 
1974  case 65:
1975 #line 557 "f-exp.y" /* yacc.c:1646 */
1976  { push_type (tp_function); }
1977 #line 1979 "f-exp.c" /* yacc.c:1646 */
1978  break;
1979 
1980  case 66:
1981 #line 559 "f-exp.y" /* yacc.c:1646 */
1982  { push_type (tp_function); }
1983 #line 1985 "f-exp.c" /* yacc.c:1646 */
1984  break;
1985 
1986  case 67:
1987 #line 563 "f-exp.y" /* yacc.c:1646 */
1988  { (yyval.voidval) = 0; }
1989 #line 1991 "f-exp.c" /* yacc.c:1646 */
1990  break;
1991 
1992  case 68:
1993 #line 565 "f-exp.y" /* yacc.c:1646 */
1994  { xfree ((yyvsp[-1].tvec)); (yyval.voidval) = 0; }
1995 #line 1997 "f-exp.c" /* yacc.c:1646 */
1996  break;
1997 
1998  case 69:
1999 #line 570 "f-exp.y" /* yacc.c:1646 */
2000  { (yyval.tval) = (yyvsp[0].tsym).type; }
2001 #line 2003 "f-exp.c" /* yacc.c:1646 */
2002  break;
2003 
2004  case 70:
2005 #line 572 "f-exp.y" /* yacc.c:1646 */
2006  { (yyval.tval) = parse_f_type (pstate)->builtin_integer; }
2007 #line 2009 "f-exp.c" /* yacc.c:1646 */
2008  break;
2009 
2010  case 71:
2011 #line 574 "f-exp.y" /* yacc.c:1646 */
2012  { (yyval.tval) = parse_f_type (pstate)->builtin_integer_s2; }
2013 #line 2015 "f-exp.c" /* yacc.c:1646 */
2014  break;
2015 
2016  case 72:
2017 #line 576 "f-exp.y" /* yacc.c:1646 */
2018  { (yyval.tval) = parse_f_type (pstate)->builtin_character; }
2019 #line 2021 "f-exp.c" /* yacc.c:1646 */
2020  break;
2021 
2022  case 73:
2023 #line 578 "f-exp.y" /* yacc.c:1646 */
2024  { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s8; }
2025 #line 2027 "f-exp.c" /* yacc.c:1646 */
2026  break;
2027 
2028  case 74:
2029 #line 580 "f-exp.y" /* yacc.c:1646 */
2030  { (yyval.tval) = parse_f_type (pstate)->builtin_logical; }
2031 #line 2033 "f-exp.c" /* yacc.c:1646 */
2032  break;
2033 
2034  case 75:
2035 #line 582 "f-exp.y" /* yacc.c:1646 */
2036  { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s2; }
2037 #line 2039 "f-exp.c" /* yacc.c:1646 */
2038  break;
2039 
2040  case 76:
2041 #line 584 "f-exp.y" /* yacc.c:1646 */
2042  { (yyval.tval) = parse_f_type (pstate)->builtin_logical_s1; }
2043 #line 2045 "f-exp.c" /* yacc.c:1646 */
2044  break;
2045 
2046  case 77:
2047 #line 586 "f-exp.y" /* yacc.c:1646 */
2048  { (yyval.tval) = parse_f_type (pstate)->builtin_real; }
2049 #line 2051 "f-exp.c" /* yacc.c:1646 */
2050  break;
2051 
2052  case 78:
2053 #line 588 "f-exp.y" /* yacc.c:1646 */
2054  { (yyval.tval) = parse_f_type (pstate)->builtin_real_s8; }
2055 #line 2057 "f-exp.c" /* yacc.c:1646 */
2056  break;
2057 
2058  case 79:
2059 #line 590 "f-exp.y" /* yacc.c:1646 */
2060  { (yyval.tval) = parse_f_type (pstate)->builtin_real_s16; }
2061 #line 2063 "f-exp.c" /* yacc.c:1646 */
2062  break;
2063 
2064  case 80:
2065 #line 592 "f-exp.y" /* yacc.c:1646 */
2066  { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s8; }
2067 #line 2069 "f-exp.c" /* yacc.c:1646 */
2068  break;
2069 
2070  case 81:
2071 #line 594 "f-exp.y" /* yacc.c:1646 */
2072  { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s16; }
2073 #line 2075 "f-exp.c" /* yacc.c:1646 */
2074  break;
2075 
2076  case 82:
2077 #line 596 "f-exp.y" /* yacc.c:1646 */
2078  { (yyval.tval) = parse_f_type (pstate)->builtin_complex_s32; }
2079 #line 2081 "f-exp.c" /* yacc.c:1646 */
2080  break;
2081 
2082  case 83:
2083 #line 601 "f-exp.y" /* yacc.c:1646 */
2084  { (yyval.tvec) = (struct type **) xmalloc (sizeof (struct type *) * 2);
2085  (yyval.ivec)[0] = 1; /* Number of types in vector */
2086  (yyval.tvec)[1] = (yyvsp[0].tval);
2087  }
2088 #line 2090 "f-exp.c" /* yacc.c:1646 */
2089  break;
2090 
2091  case 84:
2092 #line 606 "f-exp.y" /* yacc.c:1646 */
2093  { int len = sizeof (struct type *) * (++((yyvsp[-2].ivec)[0]) + 1);
2094  (yyval.tvec) = (struct type **) xrealloc ((char *) (yyvsp[-2].tvec), len);
2095  (yyval.tvec)[(yyval.ivec)[0]] = (yyvsp[0].tval);
2096  }
2097 #line 2099 "f-exp.c" /* yacc.c:1646 */
2098  break;
2099 
2100  case 85:
2101 #line 613 "f-exp.y" /* yacc.c:1646 */
2102  { (yyval.sval) = (yyvsp[0].ssym).stoken; }
2103 #line 2105 "f-exp.c" /* yacc.c:1646 */
2104  break;
2105 
2106 
2107 #line 2109 "f-exp.c" /* yacc.c:1646 */
2108  default: break;
2109  }
2110  /* User semantic actions sometimes alter yychar, and that requires
2111  that yytoken be updated with the new translation. We take the
2112  approach of translating immediately before every use of yytoken.
2113  One alternative is translating here after every semantic action,
2114  but that translation would be missed if the semantic action invokes
2115  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2116  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2117  incorrect destructor might then be invoked immediately. In the
2118  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2119  to an incorrect destructor call or verbose syntax error message
2120  before the lookahead is translated. */
2121  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2122 
2123  YYPOPSTACK (yylen);
2124  yylen = 0;
2126 
2127  *++yyvsp = yyval;
2128 
2129  /* Now 'shift' the result of the reduction. Determine what state
2130  that goes to, based on the state we popped back to and the rule
2131  number reduced by. */
2132 
2133  yyn = yyr1[yyn];
2134 
2135  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2136  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2137  yystate = yytable[yystate];
2138  else
2139  yystate = yydefgoto[yyn - YYNTOKENS];
2140 
2141  goto yynewstate;
2142 
2143 
2144 /*--------------------------------------.
2145 | yyerrlab -- here on detecting error. |
2146 `--------------------------------------*/
2147 yyerrlab:
2148  /* Make sure we have latest lookahead translation. See comments at
2149  user semantic actions for why this is necessary. */
2150  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2151 
2152  /* If not already recovering from an error, report this error. */
2153  if (!yyerrstatus)
2154  {
2155  ++yynerrs;
2156 #if ! YYERROR_VERBOSE
2157  yyerror (YY_("syntax error"));
2158 #else
2159 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2160  yyssp, yytoken)
2161  {
2162  char const *yymsgp = YY_("syntax error");
2163  int yysyntax_error_status;
2164  yysyntax_error_status = YYSYNTAX_ERROR;
2165  if (yysyntax_error_status == 0)
2166  yymsgp = yymsg;
2167  else if (yysyntax_error_status == 1)
2168  {
2169  if (yymsg != yymsgbuf)
2170  YYSTACK_FREE (yymsg);
2171  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2172  if (!yymsg)
2173  {
2174  yymsg = yymsgbuf;
2175  yymsg_alloc = sizeof yymsgbuf;
2176  yysyntax_error_status = 2;
2177  }
2178  else
2179  {
2180  yysyntax_error_status = YYSYNTAX_ERROR;
2181  yymsgp = yymsg;
2182  }
2183  }
2184  yyerror (yymsgp);
2185  if (yysyntax_error_status == 2)
2186  goto yyexhaustedlab;
2187  }
2188 # undef YYSYNTAX_ERROR
2189 #endif
2190  }
2191 
2192 
2193 
2194  if (yyerrstatus == 3)
2195  {
2196  /* If just tried and failed to reuse lookahead token after an
2197  error, discard it. */
2198 
2199  if (yychar <= YYEOF)
2200  {
2201  /* Return failure if at end of input. */
2202  if (yychar == YYEOF)
2203  YYABORT;
2204  }
2205  else
2206  {
2207  yydestruct ("Error: discarding",
2208  yytoken, &yylval);
2209  yychar = YYEMPTY;
2210  }
2211  }
2212 
2213  /* Else will try to reuse lookahead token after shifting the error
2214  token. */
2215  goto yyerrlab1;
2216 
2217 
2218 /*---------------------------------------------------.
2219 | yyerrorlab -- error raised explicitly by YYERROR. |
2220 `---------------------------------------------------*/
2221 yyerrorlab:
2222 
2223  /* Pacify compilers like GCC when the user code never invokes
2224  YYERROR and the label yyerrorlab therefore never appears in user
2225  code. */
2226  if (/*CONSTCOND*/ 0)
2227  goto yyerrorlab;
2228 
2229  /* Do not reclaim the symbols of the rule whose action triggered
2230  this YYERROR. */
2231  YYPOPSTACK (yylen);
2232  yylen = 0;
2234  yystate = *yyssp;
2235  goto yyerrlab1;
2236 
2237 
2238 /*-------------------------------------------------------------.
2239 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2240 `-------------------------------------------------------------*/
2241 yyerrlab1:
2242  yyerrstatus = 3; /* Each real token shifted decrements this. */
2243 
2244  for (;;)
2245  {
2246  yyn = yypact[yystate];
2247  if (!yypact_value_is_default (yyn))
2248  {
2249  yyn += YYTERROR;
2250  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2251  {
2252  yyn = yytable[yyn];
2253  if (0 < yyn)
2254  break;
2255  }
2256  }
2257 
2258  /* Pop the current state because it cannot handle the error token. */
2259  if (yyssp == yyss)
2260  YYABORT;
2261 
2262 
2263  yydestruct ("Error: popping",
2264  yystos[yystate], yyvsp);
2265  YYPOPSTACK (1);
2266  yystate = *yyssp;
2268  }
2269 
2271  *++yyvsp = yylval;
2273 
2274 
2275  /* Shift the error token. */
2276  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2277 
2278  yystate = yyn;
2279  goto yynewstate;
2280 
2281 
2282 /*-------------------------------------.
2283 | yyacceptlab -- YYACCEPT comes here. |
2284 `-------------------------------------*/
2285 yyacceptlab:
2286  yyresult = 0;
2287  goto yyreturn;
2288 
2289 /*-----------------------------------.
2290 | yyabortlab -- YYABORT comes here. |
2291 `-----------------------------------*/
2292 yyabortlab:
2293  yyresult = 1;
2294  goto yyreturn;
2295 
2296 #if !defined yyoverflow || YYERROR_VERBOSE
2297 /*-------------------------------------------------.
2298 | yyexhaustedlab -- memory exhaustion comes here. |
2299 `-------------------------------------------------*/
2300 yyexhaustedlab:
2301  yyerror (YY_("memory exhausted"));
2302  yyresult = 2;
2303  /* Fall through. */
2304 #endif
2305 
2306 yyreturn:
2307  if (yychar != YYEMPTY)
2308  {
2309  /* Make sure we have latest lookahead translation. See comments at
2310  user semantic actions for why this is necessary. */
2311  yytoken = YYTRANSLATE (yychar);
2312  yydestruct ("Cleanup: discarding lookahead",
2313  yytoken, &yylval);
2314  }
2315  /* Do not reclaim the symbols of the rule whose action triggered
2316  this YYABORT or YYACCEPT. */
2317  YYPOPSTACK (yylen);
2319  while (yyssp != yyss)
2320  {
2321  yydestruct ("Cleanup: popping",
2322  yystos[*yyssp], yyvsp);
2323  YYPOPSTACK (1);
2324  }
2325 #ifndef yyoverflow
2326  if (yyss != yyssa)
2327  YYSTACK_FREE (yyss);
2328 #endif
2329 #if YYERROR_VERBOSE
2330  if (yymsg != yymsgbuf)
2331  YYSTACK_FREE (yymsg);
2332 #endif
2333  return yyresult;
2334 }
2335 #line 626 "f-exp.y" /* yacc.c:1906 */
2336 
2337 
2338 /* Take care of parsing a number (anything that starts with a digit).
2339  Set yylval and return the token type; update lexptr.
2340  LEN is the number of characters in it. */
2341 
2342 /*** Needs some error checking for the float case ***/
2343 
2344 static int
2345 parse_number (struct parser_state *par_state,
2346  const char *p, int len, int parsed_float, YYSTYPE *putithere)
2347 {
2348  LONGEST n = 0;
2349  LONGEST prevn = 0;
2350  int c;
2351  int base = input_radix;
2352  int unsigned_p = 0;
2353  int long_p = 0;
2354  ULONGEST high_bit;
2355  struct type *signed_type;
2356  struct type *unsigned_type;
2357 
2358  if (parsed_float)
2359  {
2360  /* It's a float since it contains a point or an exponent. */
2361  /* [dD] is not understood as an exponent by parse_float,
2362  change it to 'e'. */
2363  char *tmp, *tmp2;
2364 
2365  tmp = xstrdup (p);
2366  for (tmp2 = tmp; *tmp2; ++tmp2)
2367  if (*tmp2 == 'd' || *tmp2 == 'D')
2368  *tmp2 = 'e';
2369 
2370  /* FIXME: Should this use different types? */
2371  putithere->typed_val_float.type = parse_f_type (pstate)->builtin_real_s8;
2372  bool parsed = parse_float (tmp, len,
2373  putithere->typed_val_float.type,
2374  putithere->typed_val_float.val);
2375  xfree (tmp);
2376  return parsed? FLOAT : ERROR;
2377  }
2378 
2379  /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
2380  if (p[0] == '0')
2381  switch (p[1])
2382  {
2383  case 'x':
2384  case 'X':
2385  if (len >= 3)
2386  {
2387  p += 2;
2388  base = 16;
2389  len -= 2;
2390  }
2391  break;
2392 
2393  case 't':
2394  case 'T':
2395  case 'd':
2396  case 'D':
2397  if (len >= 3)
2398  {
2399  p += 2;
2400  base = 10;
2401  len -= 2;
2402  }
2403  break;
2404 
2405  default:
2406  base = 8;
2407  break;
2408  }
2409 
2410  while (len-- > 0)
2411  {
2412  c = *p++;
2413  if (isupper (c))
2414  c = tolower (c);
2415  if (len == 0 && c == 'l')
2416  long_p = 1;
2417  else if (len == 0 && c == 'u')
2418  unsigned_p = 1;
2419  else
2420  {
2421  int i;
2422  if (c >= '0' && c <= '9')
2423  i = c - '0';
2424  else if (c >= 'a' && c <= 'f')
2425  i = c - 'a' + 10;
2426  else
2427  return ERROR; /* Char not a digit */
2428  if (i >= base)
2429  return ERROR; /* Invalid digit in this base */
2430  n *= base;
2431  n += i;
2432  }
2433  /* Portably test for overflow (only works for nonzero values, so make
2434  a second check for zero). */
2435  if ((prevn >= n) && n != 0)
2436  unsigned_p=1; /* Try something unsigned */
2437  /* If range checking enabled, portably test for unsigned overflow. */
2438  if (RANGE_CHECK && n != 0)
2439  {
2440  if ((unsigned_p && (unsigned)prevn >= (unsigned)n))
2441  range_error (_("Overflow on numeric constant."));
2442  }
2443  prevn = n;
2444  }
2445 
2446  /* If the number is too big to be an int, or it's got an l suffix
2447  then it's a long. Work out if this has to be a long by
2448  shifting right and seeing if anything remains, and the
2449  target int size is different to the target long size.
2450 
2451  In the expression below, we could have tested
2452  (n >> gdbarch_int_bit (parse_gdbarch))
2453  to see if it was zero,
2454  but too many compilers warn about that, when ints and longs
2455  are the same size. So we shift it twice, with fewer bits
2456  each time, for the same result. */
2457 
2458  if ((gdbarch_int_bit (parse_gdbarch (par_state))
2459  != gdbarch_long_bit (parse_gdbarch (par_state))
2460  && ((n >> 2)
2461  >> (gdbarch_int_bit (parse_gdbarch (par_state))-2))) /* Avoid
2462  shift warning */
2463  || long_p)
2464  {
2465  high_bit = ((ULONGEST)1)
2466  << (gdbarch_long_bit (parse_gdbarch (par_state))-1);
2467  unsigned_type = parse_type (par_state)->builtin_unsigned_long;
2468  signed_type = parse_type (par_state)->builtin_long;
2469  }
2470  else
2471  {
2472  high_bit =
2473  ((ULONGEST)1) << (gdbarch_int_bit (parse_gdbarch (par_state)) - 1);
2474  unsigned_type = parse_type (par_state)->builtin_unsigned_int;
2475  signed_type = parse_type (par_state)->builtin_int;
2476  }
2477 
2478  putithere->typed_val.val = n;
2479 
2480  /* If the high bit of the worked out type is set then this number
2481  has to be unsigned. */
2482 
2483  if (unsigned_p || (n & high_bit))
2484  putithere->typed_val.type = unsigned_type;
2485  else
2486  putithere->typed_val.type = signed_type;
2487 
2488  return INT;
2489 }
2490 
2491 struct token
2492 {
2493  const char *oper;
2494  int token;
2495  enum exp_opcode opcode;
2496 };
2497 
2498 static const struct token dot_ops[] =
2499 {
2500  { ".and.", BOOL_AND, BINOP_END },
2501  { ".AND.", BOOL_AND, BINOP_END },
2502  { ".or.", BOOL_OR, BINOP_END },
2503  { ".OR.", BOOL_OR, BINOP_END },
2504  { ".not.", BOOL_NOT, BINOP_END },
2505  { ".NOT.", BOOL_NOT, BINOP_END },
2506  { ".eq.", EQUAL, BINOP_END },
2507  { ".EQ.", EQUAL, BINOP_END },
2508  { ".eqv.", EQUAL, BINOP_END },
2509  { ".NEQV.", NOTEQUAL, BINOP_END },
2510  { ".neqv.", NOTEQUAL, BINOP_END },
2511  { ".EQV.", EQUAL, BINOP_END },
2512  { ".ne.", NOTEQUAL, BINOP_END },
2513  { ".NE.", NOTEQUAL, BINOP_END },
2514  { ".le.", LEQ, BINOP_END },
2515  { ".LE.", LEQ, BINOP_END },
2516  { ".ge.", GEQ, BINOP_END },
2517  { ".GE.", GEQ, BINOP_END },
2518  { ".gt.", GREATERTHAN, BINOP_END },
2519  { ".GT.", GREATERTHAN, BINOP_END },
2520  { ".lt.", LESSTHAN, BINOP_END },
2521  { ".LT.", LESSTHAN, BINOP_END },
2522  { NULL, 0, BINOP_END }
2523 };
2524 
2526 {
2527  const char *name;
2528  int value;
2529 };
2530 
2531 static const struct f77_boolean_val boolean_values[] =
2532 {
2533  { ".true.", 1 },
2534  { ".TRUE.", 1 },
2535  { ".false.", 0 },
2536  { ".FALSE.", 0 },
2537  { NULL, 0 }
2538 };
2539 
2540 static const struct token f77_keywords[] =
2541 {
2542  { "complex_16", COMPLEX_S16_KEYWORD, BINOP_END },
2543  { "complex_32", COMPLEX_S32_KEYWORD, BINOP_END },
2544  { "character", CHARACTER, BINOP_END },
2545  { "integer_2", INT_S2_KEYWORD, BINOP_END },
2546  { "logical_1", LOGICAL_S1_KEYWORD, BINOP_END },
2547  { "logical_2", LOGICAL_S2_KEYWORD, BINOP_END },
2548  { "logical_8", LOGICAL_S8_KEYWORD, BINOP_END },
2549  { "complex_8", COMPLEX_S8_KEYWORD, BINOP_END },
2550  { "integer", INT_KEYWORD, BINOP_END },
2551  { "logical", LOGICAL_KEYWORD, BINOP_END },
2552  { "real_16", REAL_S16_KEYWORD, BINOP_END },
2553  { "complex", COMPLEX_S8_KEYWORD, BINOP_END },
2554  { "sizeof", SIZEOF, BINOP_END },
2555  { "real_8", REAL_S8_KEYWORD, BINOP_END },
2556  { "real", REAL_KEYWORD, BINOP_END },
2557  { NULL, 0, BINOP_END }
2558 };
2559 
2560 /* Implementation of a dynamically expandable buffer for processing input
2561  characters acquired through lexptr and building a value to return in
2562  yylval. Ripped off from ch-exp.y */
2563 
2564 static char *tempbuf; /* Current buffer contents */
2565 static int tempbufsize; /* Size of allocated buffer */
2566 static int tempbufindex; /* Current index into buffer */
2567 
2568 #define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
2569 
2570 #define CHECKBUF(size) \
2571  do { \
2572  if (tempbufindex + (size) >= tempbufsize) \
2573  { \
2574  growbuf_by_size (size); \
2575  } \
2576  } while (0);
2577 
2578 
2579 /* Grow the static temp buffer if necessary, including allocating the
2580  first one on demand. */
2581 
2582 static void
2583 growbuf_by_size (int count)
2584 {
2585  int growby;
2586 
2587  growby = std::max (count, GROWBY_MIN_SIZE);
2588  tempbufsize += growby;
2589  if (tempbuf == NULL)
2590  tempbuf = (char *) xmalloc (tempbufsize);
2591  else
2592  tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
2593 }
2594 
2595 /* Blatantly ripped off from ch-exp.y. This routine recognizes F77
2596  string-literals.
2597 
2598  Recognize a string literal. A string literal is a nonzero sequence
2599  of characters enclosed in matching single quotes, except that
2600  a single character inside single quotes is a character literal, which
2601  we reject as a string literal. To embed the terminator character inside
2602  a string, it is simply doubled (I.E. 'this''is''one''string') */
2603 
2604 static int
2606 {
2607  const char *tokptr = lexptr;
2608 
2609  for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
2610  {
2611  CHECKBUF (1);
2612  if (*tokptr == *lexptr)
2613  {
2614  if (*(tokptr + 1) == *lexptr)
2615  tokptr++;
2616  else
2617  break;
2618  }
2619  tempbuf[tempbufindex++] = *tokptr;
2620  }
2621  if (*tokptr == '\0' /* no terminator */
2622  || tempbufindex == 0) /* no string */
2623  return 0;
2624  else
2625  {
2626  tempbuf[tempbufindex] = '\0';
2627  yylval.sval.ptr = tempbuf;
2629  lexptr = ++tokptr;
2630  return STRING_LITERAL;
2631  }
2632 }
2633 
2634 /* Read one token, getting characters through lexptr. */
2635 
2636 static int
2637 yylex (void)
2638 {
2639  int c;
2640  int namelen;
2641  unsigned int i,token;
2642  const char *tokstart;
2643 
2644  retry:
2645 
2646  prev_lexptr = lexptr;
2647 
2648  tokstart = lexptr;
2649 
2650  /* First of all, let us make sure we are not dealing with the
2651  special tokens .true. and .false. which evaluate to 1 and 0. */
2652 
2653  if (*lexptr == '.')
2654  {
2655  for (i = 0; boolean_values[i].name != NULL; i++)
2656  {
2657  if (strncmp (tokstart, boolean_values[i].name,
2658  strlen (boolean_values[i].name)) == 0)
2659  {
2660  lexptr += strlen (boolean_values[i].name);
2662  return BOOLEAN_LITERAL;
2663  }
2664  }
2665  }
2666 
2667  /* See if it is a special .foo. operator. */
2668 
2669  for (i = 0; dot_ops[i].oper != NULL; i++)
2670  if (strncmp (tokstart, dot_ops[i].oper,
2671  strlen (dot_ops[i].oper)) == 0)
2672  {
2673  lexptr += strlen (dot_ops[i].oper);
2674  yylval.opcode = dot_ops[i].opcode;
2675  return dot_ops[i].token;
2676  }
2677 
2678  /* See if it is an exponentiation operator. */
2679 
2680  if (strncmp (tokstart, "**", 2) == 0)
2681  {
2682  lexptr += 2;
2683  yylval.opcode = BINOP_EXP;
2684  return STARSTAR;
2685  }
2686 
2687  switch (c = *tokstart)
2688  {
2689  case 0:
2690  return 0;
2691 
2692  case ' ':
2693  case '\t':
2694  case '\n':
2695  lexptr++;
2696  goto retry;
2697 
2698  case '\'':
2700  if (token != 0)
2701  return (token);
2702  break;
2703 
2704  case '(':
2705  paren_depth++;
2706  lexptr++;
2707  return c;
2708 
2709  case ')':
2710  if (paren_depth == 0)
2711  return 0;
2712  paren_depth--;
2713  lexptr++;
2714  return c;
2715 
2716  case ',':
2717  if (comma_terminates && paren_depth == 0)
2718  return 0;
2719  lexptr++;
2720  return c;
2721 
2722  case '.':
2723  /* Might be a floating point number. */
2724  if (lexptr[1] < '0' || lexptr[1] > '9')
2725  goto symbol; /* Nope, must be a symbol. */
2726  /* FALL THRU into number case. */
2727 
2728  case '0':
2729  case '1':
2730  case '2':
2731  case '3':
2732  case '4':
2733  case '5':
2734  case '6':
2735  case '7':
2736  case '8':
2737  case '9':
2738  {
2739  /* It's a number. */
2740  int got_dot = 0, got_e = 0, got_d = 0, toktype;
2741  const char *p = tokstart;
2742  int hex = input_radix > 10;
2743 
2744  if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
2745  {
2746  p += 2;
2747  hex = 1;
2748  }
2749  else if (c == '0' && (p[1]=='t' || p[1]=='T'
2750  || p[1]=='d' || p[1]=='D'))
2751  {
2752  p += 2;
2753  hex = 0;
2754  }
2755 
2756  for (;; ++p)
2757  {
2758  if (!hex && !got_e && (*p == 'e' || *p == 'E'))
2759  got_dot = got_e = 1;
2760  else if (!hex && !got_d && (*p == 'd' || *p == 'D'))
2761  got_dot = got_d = 1;
2762  else if (!hex && !got_dot && *p == '.')
2763  got_dot = 1;
2764  else if (((got_e && (p[-1] == 'e' || p[-1] == 'E'))
2765  || (got_d && (p[-1] == 'd' || p[-1] == 'D')))
2766  && (*p == '-' || *p == '+'))
2767  /* This is the sign of the exponent, not the end of the
2768  number. */
2769  continue;
2770  /* We will take any letters or digits. parse_number will
2771  complain if past the radix, or if L or U are not final. */
2772  else if ((*p < '0' || *p > '9')
2773  && ((*p < 'a' || *p > 'z')
2774  && (*p < 'A' || *p > 'Z')))
2775  break;
2776  }
2777  toktype = parse_number (pstate, tokstart, p - tokstart,
2778  got_dot|got_e|got_d,
2779  &yylval);
2780  if (toktype == ERROR)
2781  {
2782  char *err_copy = (char *) alloca (p - tokstart + 1);
2783 
2784  memcpy (err_copy, tokstart, p - tokstart);
2785  err_copy[p - tokstart] = 0;
2786  error (_("Invalid number \"%s\"."), err_copy);
2787  }
2788  lexptr = p;
2789  return toktype;
2790  }
2791 
2792  case '+':
2793  case '-':
2794  case '*':
2795  case '/':
2796  case '%':
2797  case '|':
2798  case '&':
2799  case '^':
2800  case '~':
2801  case '!':
2802  case '@':
2803  case '<':
2804  case '>':
2805  case '[':
2806  case ']':
2807  case '?':
2808  case ':':
2809  case '=':
2810  case '{':
2811  case '}':
2812  symbol:
2813  lexptr++;
2814  return c;
2815  }
2816 
2817  if (!(c == '_' || c == '$' || c ==':'
2818  || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
2819  /* We must have come across a bad character (e.g. ';'). */
2820  error (_("Invalid character '%c' in expression."), c);
2821 
2822  namelen = 0;
2823  for (c = tokstart[namelen];
2824  (c == '_' || c == '$' || c == ':' || (c >= '0' && c <= '9')
2825  || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
2826  c = tokstart[++namelen]);
2827 
2828  /* The token "if" terminates the expression and is NOT
2829  removed from the input stream. */
2830 
2831  if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
2832  return 0;
2833 
2834  lexptr += namelen;
2835 
2836  /* Catch specific keywords. */
2837 
2838  for (i = 0; f77_keywords[i].oper != NULL; i++)
2839  if (strlen (f77_keywords[i].oper) == namelen
2840  && strncmp (tokstart, f77_keywords[i].oper, namelen) == 0)
2841  {
2842  /* lexptr += strlen(f77_keywords[i].operator); */
2844  return f77_keywords[i].token;
2845  }
2846 
2847  yylval.sval.ptr = tokstart;
2848  yylval.sval.length = namelen;
2849 
2850  if (*tokstart == '$')
2851  {
2853  return VARIABLE;
2854  }
2855 
2856  /* Use token-type TYPENAME for symbols that happen to be defined
2857  currently as names of types; NAME for other symbols.
2858  The caller is not constrained to care about the distinction. */
2859  {
2860  char *tmp = copy_name (yylval.sval);
2861  struct block_symbol result;
2862  struct field_of_this_result is_a_field_of_this;
2863  enum domain_enum_tag lookup_domains[] =
2864  {
2865  STRUCT_DOMAIN,
2866  VAR_DOMAIN,
2868  };
2869  int i;
2870  int hextype;
2871 
2872  for (i = 0; i < ARRAY_SIZE (lookup_domains); ++i)
2873  {
2874  /* Initialize this in case we *don't* use it in this call; that
2875  way we can refer to it unconditionally below. */
2876  memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this));
2877 
2878  result = lookup_symbol (tmp, expression_context_block,
2879  lookup_domains[i],
2880  parse_language (pstate)->la_language
2881  == language_cplus
2882  ? &is_a_field_of_this : NULL);
2883  if (result.symbol && SYMBOL_CLASS (result.symbol) == LOC_TYPEDEF)
2884  {
2885  yylval.tsym.type = SYMBOL_TYPE (result.symbol);
2886  return TYPENAME;
2887  }
2888 
2889  if (result.symbol)
2890  break;
2891  }
2892 
2893  yylval.tsym.type
2895  parse_gdbarch (pstate), tmp);
2896  if (yylval.tsym.type != NULL)
2897  return TYPENAME;
2898 
2899  /* Input names that aren't symbols but ARE valid hex numbers,
2900  when the input radix permits them, can be names or numbers
2901  depending on the parse. Note we support radixes > 16 here. */
2902  if (!result.symbol
2903  && ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
2904  || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
2905  {
2906  YYSTYPE newlval; /* Its value is ignored. */
2907  hextype = parse_number (pstate, tokstart, namelen, 0, &newlval);
2908  if (hextype == INT)
2909  {
2910  yylval.ssym.sym = result;
2911  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
2912  return NAME_OR_INT;
2913  }
2914  }
2915 
2916  /* Any other kind of symbol */
2917  yylval.ssym.sym = result;
2918  yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL;
2919  return NAME;
2920  }
2921 }
2922 
2923 int
2924 f_parse (struct parser_state *par_state)
2925 {
2926  /* Setting up the parser state. */
2927  scoped_restore pstate_restore = make_scoped_restore (&pstate);
2928  gdb_assert (par_state != NULL);
2929  pstate = par_state;
2930 
2931  return yyparse ();
2932 }
2933 
2934 void
2935 yyerror (const char *msg)
2936 {
2937  if (prev_lexptr)
2938  lexptr = prev_lexptr;
2939 
2940  error (_("A %s in expression, near `%s'."), (msg ? msg : "error"), lexptr);
2941 }
domain_enum_tag
Definition: symtab.h:728
struct internalvar * ivar
Definition: ada-exp.c:295
struct type * type
Definition: parser-defs.h:115
#define YYFPRINTF
Definition: yy-remap.h:92
#define RANGE_CHECK
Definition: language.h:500
void * xmalloc(YYSIZE_T)
#define yylen
#define RSH
Definition: f-exp.c:213
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: f-exp.c:954
void write_exp_elt_sym(struct parser_state *ps, struct symbol *expelt)
Definition: parse.c:215
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
Definition: gdbtypes.c:945
#define parse_language(ps)
Definition: parser-defs.h:36
int yyparse(void)
Definition: f-exp.c:1286
signed char yytype_int8
Definition: ada-exp.c:330
int f_parse(struct parser_state *par_state)
Definition: f-exp.c:2924
#define BOOL_AND
Definition: f-exp.c:199
#define STARSTAR
Definition: f-exp.c:214
#define YYSIZE_T
Definition: f-exp.c:306
static const yytype_uint8 yystos[]
Definition: f-exp.c:801
static const yytype_int8 yypgoto[]
Definition: f-exp.c:669
#define parse_gdbarch(ps)
Definition: parser-defs.h:35
#define EQUAL
Definition: f-exp.c:206
#define LOGICAL_S8_KEYWORD
Definition: f-exp.c:191
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: f-exp.c:372
bool parse_float(const char *p, int len, const struct type *type, gdb_byte *data)
Definition: parse.c:1331
#define yyvs
static void growbuf_by_size(int)
Definition: f-exp.c:2583
struct symbol * sym
Definition: d-exp.c:249
enum type_pieces pop_type(void)
Definition: parse.c:1451
#define yylloc
const char * ptr
Definition: parser-defs.h:91
#define yyssp
int comma_terminates
Definition: parse.c:77
#define LSH
Definition: f-exp.c:212
int gdbarch_int_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1579
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
Definition: gdbtypes.c:1223
#define YYACCEPT
Definition: f-exp.c:853
#define INT_KEYWORD
Definition: f-exp.c:187
#define yyvsp
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: f-exp.c:939
int end_arglist(void)
Definition: parse.c:143
int arglist_len
Definition: parse.c:72
#define SYMBOL_CLASS(symbol)
Definition: symtab.h:1155
void * memset(T *s, int c, size_t n)=delete
#define YYFINAL
Definition: f-exp.c:508
static const struct f77_boolean_val boolean_values[]
Definition: f-exp.c:2531
signed char yytype_int8
Definition: f-exp.c:284
struct symtoken ssym
Definition: c-exp.c:287
int gdbarch_long_bit(struct gdbarch *gdbarch)
Definition: gdbarch.c:1596
const struct block * innermost_block
Definition: parse.c:71
int have_partial_symbols(void)
Definition: objfiles.c:1023
static const yytype_uint8 yydefact[]
Definition: f-exp.c:650
#define CHECKBUF(size)
Definition: f-exp.c:2570
Definition: c-exp.c:4864
static const char *const yytname[]
Definition: f-exp.c:584
short int yytype_int16
Definition: f-exp.c:296
static const yytype_int8 yydefgoto[]
Definition: f-exp.c:676
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:1893
int token
Definition: c-exp.c:4867
#define TYPENAME
Definition: f-exp.c:183
void push_type(enum type_pieces tp)
Definition: parse.c:1408
#define BOOL_OR
Definition: f-exp.c:200
#define _(String)
Definition: gdb_locale.h:35
#define YYDPRINTF(Args)
Definition: f-exp.c:891
#define YYPRINT(FILE, TYPE, VALUE)
Definition: c-exp.c:328
#define INT
Definition: f-exp.c:178
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: f-exp.c:474
unsigned short int yytype_uint16
Definition: f-exp.c:290
unsigned input_radix
Definition: valprint.c:157
#define REAL_KEYWORD
Definition: f-exp.c:193
scoped_restore_tmpl< T > make_scoped_restore(T *var)
#define LESSTHAN
Definition: f-exp.c:208
unsigned char yytype_uint8
Definition: f-exp.c:278
static const yytype_int8 yycheck[]
Definition: f-exp.c:742
#define INT_S2_KEYWORD
Definition: f-exp.c:188
const char *const name
Definition: aarch64-tdep.c:76
void write_exp_elt_block(struct parser_state *ps, const struct block *b)
Definition: parse.c:235
const char * name
Definition: f-exp.c:2527
void write_exp_elt_longcst(struct parser_state *ps, LONGEST expelt)
Definition: parse.c:255
struct type * check_typedef(struct type *type)
Definition: gdbtypes.c:2421
#define YYPOPSTACK(N)
static int parse_number(struct parser_state *, const char *, int, int, YYSTYPE *)
Definition: f-exp.c:2345
int contained_in(const struct block *a, const struct block *b)
Definition: block.c:73
#define YYEMPTY
Definition: f-exp.c:850
void range_error(const char *string,...)
Definition: language.c:448
struct block_symbol sym
Definition: parser-defs.h:121
#define yyss
#define UNARY
Definition: f-exp.c:215
const char * oper
Definition: c-exp.c:4866
#define parse_type(ps)
Definition: f-exp.c:81
int yydebug
Definition: f-exp.c:1004
const struct block * block
Definition: symtab.h:1140
struct YYSTYPE::@2 typed_val_float
#define yytable_value_is_error(Yytable_value)
Definition: f-exp.c:624
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: f-exp.c:373
#define YYABORT
Definition: f-exp.c:854
int yynerrs
Definition: f-exp.c:1278
struct YYSTYPE::@1 typed_val
YYSTYPE yylval
Definition: f-exp.c:1276
int pop_type_int(void)
Definition: parse.c:1459
int symbol_read_needs_frame(struct symbol *sym)
Definition: findvar.c:392
#define COMPLEX_S16_KEYWORD
Definition: f-exp.c:197
static const yytype_uint8 yyr2[]
Definition: f-exp.c:834
void yyerror(const char *)
Definition: f-exp.c:2935
static const struct token dot_ops[]
Definition: f-exp.c:2498
#define COMPLEX_S8_KEYWORD
Definition: f-exp.c:196
yytype_int16 yyss_alloc
Definition: ada-exp.c:500
static const yytype_uint8 yytable[]
Definition: f-exp.c:685
#define YYSTACK_ALLOC_MAXIMUM
Definition: f-exp.c:421
#define LEQ
Definition: f-exp.c:210
Definition: gdbtypes.h:749
#define YYMAXDEPTH
Definition: f-exp.c:1026
#define YYLAST
Definition: f-exp.c:510
int voidval
Definition: c-exp.c:288
yytokentype
Definition: ada-exp.c:178
static const yytype_uint16 yytoknum[]
Definition: c-exp.c:699
#define REAL_S8_KEYWORD
Definition: f-exp.c:194
void write_dollar_variable(struct parser_state *ps, struct stoken str)
Definition: parse.c:594
int yychar
Definition: f-exp.c:1273
#define YYTRANSLATE(YYX)
Definition: f-exp.c:526
#define VARIABLE
Definition: f-exp.c:203
YYSTYPE yyvs_alloc
Definition: ada-exp.c:501
#define yyrule
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: f-exp.c:903
unsigned short int yytype_uint16
Definition: ada-exp.c:336
int token
Definition: m2-exp.c:2527
#define YY_REDUCE_PRINT(Rule)
Definition: f-exp.c:996
#define BOOLEAN_LITERAL
Definition: f-exp.c:181
#define YYINITDEPTH
Definition: f-exp.c:1015
LONGEST lval
Definition: ada-exp.c:283
#define REAL_S16_KEYWORD
Definition: f-exp.c:195
const struct block * bval
Definition: ada-exp.c:294
static const yytype_uint16 yyrline[]
Definition: f-exp.c:567
#define ASSIGN_MODIFY
Definition: f-exp.c:204
static int match_string_literal(void)
Definition: f-exp.c:2605
int is_a_field_of_this
Definition: parser-defs.h:122
void write_exp_msymbol(struct parser_state *ps, struct bound_minimal_symbol bound_msym)
Definition: parse.c:531
int paren_depth
Definition: parse.c:76
#define YYTERROR
Definition: f-exp.c:878
#define COMPLEX_S32_KEYWORD
Definition: f-exp.c:198
struct symbol * symbol
Definition: symtab.h:1136
#define LOGICAL_S1_KEYWORD
Definition: f-exp.c:189
#define YYEOF
Definition: f-exp.c:851
#define ERROR
Definition: f-exp.c:186
#define gdb_assert(expr)
Definition: gdb_assert.h:32
Definition: block.h:60
struct type * type
Definition: symtab.h:1535
#define YYSTACK_BYTES(N)
Definition: f-exp.c:463
#define NAME_OR_INT
Definition: f-exp.c:184
PTR xrealloc(PTR ptr, size_t size)
Definition: common-utils.c:52
LONGEST val
Definition: ada-exp.c:285
void write_exp_elt_opcode(struct parser_state *ps, enum exp_opcode expelt)
Definition: parse.c:205
static const char * lexptr
bfd_byte gdb_byte
Definition: common-types.h:38
static struct parser_state * pstate
Definition: f-exp.c:92
#define SIZEOF
Definition: f-exp.c:185
static const struct token f77_keywords[]
Definition: f-exp.c:2540
unsigned char yytype_uint8
Definition: ada-exp.c:324
static int tempbufindex
Definition: f-exp.c:2566
#define NOTEQUAL
Definition: f-exp.c:207
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: f-exp.c:1257
#define GREATERTHAN
Definition: f-exp.c:209
#define CHARACTER
Definition: f-exp.c:202
#define YY_NULLPTRPTR
Definition: f-exp.c:111
struct ttype tsym
Definition: c-exp.c:286
#define yys
static const yytype_uint8 yytranslate[]
Definition: f-exp.c:531
#define YYUSE(E)
Definition: f-exp.c:355
int * ivec
Definition: f-exp.c:244
struct minimal_symbol * minsym
Definition: minsyms.h:34
#define YY_STACK_PRINT(Bottom, Top)
Definition: f-exp.c:965
const char * symbol
Definition: signals.c:48
static int tempbufsize
Definition: f-exp.c:2565
struct type * tval
Definition: ada-exp.c:292
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
Definition: minsyms.c:430
#define yystate
static const yytype_uint8 yyr1[]
Definition: f-exp.c:820
exp_opcode
Definition: expression.h:42
#define GEQ
Definition: f-exp.c:211
enum exp_opcode opcode
Definition: c-exp.c:290
#define ABOVE_COMMA
Definition: f-exp.c:205
int have_full_symbols(void)
Definition: objfiles.c:1040
#define yypact_value_is_default(Yystate)
Definition: f-exp.c:619
const struct block * expression_context_block
Definition: parse.c:69
#define STRING_LITERAL
Definition: f-exp.c:180
static int yylex(void)
Definition: f-exp.c:2637
struct type * type
Definition: ada-exp.c:286
unsigned long long ULONGEST
Definition: common-types.h:53
#define GROWBY_MIN_SIZE
Definition: f-exp.c:2568
#define YYNTOKENS
Definition: f-exp.c:513
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Definition: f-exp.c:977
#define parse_f_type(ps)
Definition: f-exp.c:82
range_type
Definition: expression.h:161
#define SYMBOL_TYPE(symbol)
Definition: symtab.h:1161
#define yyval
struct type ** tvec
Definition: f-exp.c:243
#define BOOL_NOT
Definition: f-exp.c:201
#define YYSTACK_ALLOC
Definition: f-exp.c:418
#define FLOAT
Definition: f-exp.c:179
void start_arglist(void)
Definition: parse.c:133
#define TYPE_LENGTH(thistype)
Definition: gdbtypes.h:1235
short int yytype_int16
Definition: ada-exp.c:342
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
Definition: language.c:1025
static char * tempbuf
Definition: f-exp.c:2564
struct stoken sval
Definition: ada-exp.c:293
#define LOGICAL_S2_KEYWORD
Definition: f-exp.c:190
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: f-exp.c:920
static const char * prev_lexptr
void write_exp_elt_floatcst(struct parser_state *ps, const gdb_byte expelt[16])
Definition: parse.c:265
void xfree(void *)
#define YY_(Msgid)
Definition: f-exp.c:322
void write_exp_string(struct parser_state *ps, struct stoken str)
Definition: parse.c:318
void write_exp_elt_type(struct parser_state *ps, struct type *expelt)
Definition: parse.c:277
#define YYSTACK_FREE
Definition: f-exp.c:419
struct type * lookup_lvalue_reference_type(struct type *type)
Definition: gdbtypes.c:470
#define yystacksize
void error(const char *fmt,...)
Definition: errors.c:38
#define LOGICAL_KEYWORD
Definition: f-exp.c:192
struct type * lookup_pointer_type(struct type *type)
Definition: gdbtypes.c:381
long long LONGEST
Definition: common-types.h:52
struct type * lookup_function_type(struct type *type)
Definition: gdbtypes.c:519
int length
Definition: parser-defs.h:93
char * copy_name(struct stoken token)
Definition: parse.c:761
enum exp_opcode opcode
Definition: c-exp.c:4868
#define NAME
Definition: f-exp.c:182
static const yytype_int16 yypact[]
Definition: f-exp.c:629