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