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