GDB (xrefs)

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