2 ** Inserted at beginning of c files generated by bison
3 ** REMEMBER: Change bison.reset too.
42 /*@-unqualifiedtrans@*/
49 /*drl added 11/27/2001*/
52 /*drl added 12/11/2002*/
55 /* < end of bison.head > */
57 /* A Bison parser, made by GNU Bison 1.875a. */
59 /* Skeleton parser for Yacc-like parsing with Bison,
60 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
62 This program is free software; you can redistribute it and/or modify
63 it under the terms of the GNU General Public License as published by
64 the Free Software Foundation; either version 2, or (at your option)
67 This program is distributed in the hope that it will be useful,
68 but WITHOUT ANY WARRANTY; without even the implied warranty of
69 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70 GNU General Public License for more details.
72 You should have received a copy of the GNU General Public License
73 along with this program; if not, write to the Free Software
74 Foundation, Inc., 59 Temple Place - Suite 330,
75 Boston, MA 02111-1307, USA. */
77 /* As a special exception, when this file is copied by Bison into a
78 Bison output file, you may use that output file without restriction.
79 This special exception was added by the Free Software Foundation
80 in version 1.24 of Bison. */
82 /* Written by Richard Stallman by simplifying the original so called
83 ``semantic'' parser. */
85 /* All symbols defined below should begin with yy or YY, to avoid
86 infringing on user name space. This should be done even for local
87 variables, as they might otherwise be expanded by user macros.
88 There are some unavoidable exceptions within include files to
89 define necessary library symbols; they are noted "INFRINGES ON
90 USER NAME SPACE" below. */
92 /* Identify Bison output. */
96 #define YYSKELETON_NAME "yacc.c"
101 /* Using locations. */
102 #define YYLSP_NEEDED 0
104 /* If NAME_PREFIX is specified substitute the variables and functions
106 #define yyparse mtparse
108 #define yyerror mterror
109 #define yylval mtlval
110 #define yychar mtchar
111 #define yydebug mtdebug
112 #define yynerrs mtnerrs
118 /* Put the tokens into the symbol table, so that GDB and other debuggers
135 MT_ANNOTATIONS = 272,
139 MT_PRECONDITIONS = 276,
140 MT_POSTCONDITIONS = 277,
141 MT_LOSEREFERENCE = 278,
160 MT_INTEGRALTYPE = 297,
161 MT_UNSIGNEDINTEGRALTYPE = 298,
162 MT_SIGNEDINTEGRALTYPE = 299,
170 #define MT_BADTOK 258
173 #define MT_GLOBAL 261
174 #define MT_CONTEXT 262
176 #define MT_DEFAULTS 264
177 #define MT_DEFAULT 265
178 #define MT_REFERENCE 266
179 #define MT_PARAMETER 267
180 #define MT_RESULT 268
181 #define MT_CLAUSE 269
182 #define MT_LITERAL 270
184 #define MT_ANNOTATIONS 272
187 #define MT_TRANSFERS 275
188 #define MT_PRECONDITIONS 276
189 #define MT_POSTCONDITIONS 277
190 #define MT_LOSEREFERENCE 278
196 #define MT_LPAREN 284
197 #define MT_RPAREN 285
198 #define MT_LBRACKET 286
199 #define MT_RBRACKET 287
200 #define MT_LBRACE 288
201 #define MT_RBRACE 289
206 #define MT_DOUBLE 294
208 #define MT_ANYTYPE 296
209 #define MT_INTEGRALTYPE 297
210 #define MT_UNSIGNEDINTEGRALTYPE 298
211 #define MT_SIGNEDINTEGRALTYPE 299
213 #define MT_VOLATILE 301
214 #define MT_RESTRICT 302
215 #define MT_STRINGLIT 303
221 /* Copy the first part of user declarations. */
225 # include "bison.reset"
226 # include "splintMacros.nf"
230 extern ctype mtscanner_lookupType (mttok p_tok) /*@modifies p_tok@*/ ;
233 /*@i523@*/ /* can't include these here
234 # include "mtgrammar.h"
235 # include "mtscanner.h"
238 static /*@noreturn@*/ void mterror (char *);
240 /*@-noparams@*/ /* Can't list params since YYSTYPE isn't defined yet. */
241 extern int mtlex () ;
242 static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
245 # define YYPRINT(file, type, value) yyprint (file, type, value)
249 # include "bison.head"
253 /* Enabling traces. */
258 /* Enabling verbose error messages. */
259 #ifdef YYERROR_VERBOSE
260 # undef YYERROR_VERBOSE
261 # define YYERROR_VERBOSE 1
263 # define YYERROR_VERBOSE 0
266 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
268 typedef union YYSTYPE {
270 mtDeclarationNode mtdecl;
271 mtDeclarationPiece mtpiece;
272 mtDeclarationPieces mtpieces;
273 mtContextNode mtcontext;
274 mtValuesNode mtvalues;
275 mtDefaultsNode mtdefaults;
276 mtDefaultsDeclList mtdeflist;
277 mtAnnotationsNode mtannotations;
278 mtAnnotationList mtannotlist;
279 mtAnnotationDecl mtannotdecl;
281 mtMergeItem mtmergeitem;
282 mtMergeClauseList mtmergeclauselist;
283 mtMergeClause mtmergeclause;
284 mtTransferClauseList mttransferclauselist;
285 mtTransferClause mttransferclause;
286 mtTransferAction mttransferaction;
287 mtLoseReferenceList mtlosereferencelist;
288 mtLoseReference mtlosereference;
290 /*@only@*/ cstringList cstringlist;
292 /*@only@*/ qtype qtyp;
296 /* Line 191 of yacc.c. */
298 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
299 # define YYSTYPE_IS_DECLARED 1
300 # define YYSTYPE_IS_TRIVIAL 1
305 /* Copy the second part of user declarations. */
308 /* Line 214 of yacc.c. */
311 #if ! defined (yyoverflow) || YYERROR_VERBOSE
313 /* The parser invokes alloca or malloc; define the necessary symbols. */
315 # if YYSTACK_USE_ALLOCA
316 # define YYSTACK_ALLOC alloca
318 # ifndef YYSTACK_USE_ALLOCA
319 # if defined (alloca) || defined (_ALLOCA_H)
320 # define YYSTACK_ALLOC alloca
323 # define YYSTACK_ALLOC __builtin_alloca
329 # ifdef YYSTACK_ALLOC
330 /* Pacify GCC's `empty if-body' warning. */
331 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
333 # if defined (__STDC__) || defined (__cplusplus)
334 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
335 # define YYSIZE_T size_t
337 # define YYSTACK_ALLOC malloc
338 # define YYSTACK_FREE free
340 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
343 #if (! defined (yyoverflow) \
344 && (! defined (__cplusplus) \
345 || (YYSTYPE_IS_TRIVIAL)))
347 /* A type that is properly aligned for any stack member. */
354 /* The size of the maximum gap between one aligned stack and the next. */
355 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
357 /* The size of an array large to enough to hold all stacks, each with
359 # define YYSTACK_BYTES(N) \
360 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
361 + YYSTACK_GAP_MAXIMUM)
363 /* Copy COUNT objects from FROM to TO. The source and destination do
367 # define YYCOPY(To, From, Count) \
368 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
370 # define YYCOPY(To, From, Count) \
373 register YYSIZE_T yyi; \
374 for (yyi = 0; yyi < (Count); yyi++) \
375 (To)[yyi] = (From)[yyi]; \
381 /* Relocate STACK from its old location to the new one. The
382 local variables YYSIZE and YYSTACKSIZE give the old and new number of
383 elements in the stack, and YYPTR gives the new location of the
384 stack. Advance YYPTR to a properly aligned location for the next
386 # define YYSTACK_RELOCATE(Stack) \
389 YYSIZE_T yynewbytes; \
390 YYCOPY (&yyptr->Stack, Stack, yysize); \
391 Stack = &yyptr->Stack; \
392 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
393 yyptr += yynewbytes / sizeof (*yyptr); \
399 #if defined (__STDC__) || defined (__cplusplus)
400 typedef signed char yysigned_char;
402 typedef short yysigned_char;
405 /* YYFINAL -- State number of the termination state. */
407 /* YYLAST -- Last index in YYTABLE. */
410 /* YYNTOKENS -- Number of terminals. */
412 /* YYNNTS -- Number of nonterminals. */
414 /* YYNRULES -- Number of rules. */
416 /* YYNRULES -- Number of states. */
417 #define YYNSTATES 136
419 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
421 #define YYMAXUTOK 304
423 #define YYTRANSLATE(YYX) \
424 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
426 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
427 static const unsigned char yytranslate[] =
429 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
455 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
456 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
457 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
458 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
463 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
465 static const unsigned char yyprhs[] =
467 0, 0, 3, 4, 6, 10, 15, 18, 19, 22,
468 24, 26, 28, 30, 32, 34, 36, 38, 40, 42,
469 45, 46, 48, 51, 54, 57, 60, 63, 66, 67,
470 69, 71, 74, 76, 80, 83, 84, 86, 88, 90,
471 93, 95, 98, 101, 105, 107, 109, 111, 113, 116,
472 120, 123, 127, 129, 131, 133, 135, 137, 139, 141,
473 143, 145, 147, 149, 152, 154, 158, 161, 164, 168,
474 173, 176, 178, 181, 186, 189, 191, 194, 200, 202,
475 204, 207, 210, 213, 216, 218, 221, 225, 227, 230,
476 236, 238, 240, 242, 245
479 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
480 static const yysigned_char yyrhs[] =
482 51, 0, -1, -1, 52, -1, 5, 53, 4, -1,
483 6, 5, 53, 4, -1, 49, 54, -1, -1, 55,
484 54, -1, 56, -1, 71, -1, 74, -1, 73, -1,
485 76, -1, 79, -1, 85, -1, 83, -1, 84, -1,
486 86, -1, 7, 58, -1, -1, 58, -1, 12, 59,
487 -1, 11, 59, -1, 13, 59, -1, 14, 59, -1,
488 15, 59, -1, 16, 59, -1, -1, 60, -1, 61,
489 -1, 61, 64, -1, 62, -1, 61, 28, 60, -1,
490 69, 63, -1, -1, 61, -1, 65, -1, 68, -1,
491 65, 68, -1, 27, -1, 27, 67, -1, 27, 65,
492 -1, 27, 67, 65, -1, 45, -1, 46, -1, 47,
493 -1, 66, -1, 67, 66, -1, 29, 64, 30, -1,
494 31, 32, -1, 68, 31, 32, -1, 36, -1, 37,
495 -1, 38, -1, 39, -1, 40, -1, 41, -1, 42,
496 -1, 43, -1, 44, -1, 70, -1, 49, -1, 8,
497 72, -1, 49, -1, 49, 35, 72, -1, 10, 93,
498 -1, 9, 75, -1, 58, 18, 93, -1, 58, 18,
499 93, 75, -1, 17, 77, -1, 78, -1, 78, 77,
500 -1, 49, 57, 18, 93, -1, 19, 80, -1, 81,
501 -1, 81, 80, -1, 82, 26, 82, 18, 91, -1,
502 93, -1, 27, -1, 21, 89, -1, 22, 89, -1,
503 20, 89, -1, 23, 87, -1, 88, -1, 88, 87,
504 -1, 93, 18, 92, -1, 90, -1, 90, 89, -1,
505 93, 24, 93, 18, 91, -1, 93, -1, 92, -1,
506 25, -1, 25, 48, -1, 49, -1
509 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
510 static const unsigned short yyrline[] =
512 0, 160, 160, 161, 165, 167, 172, 177, 178, 183,
513 184, 185, 186, 187, 188, 189, 190, 191, 192, 196,
514 201, 202, 206, 207, 208, 209, 210, 211, 219, 220,
515 224, 225, 229, 230, 235, 239, 240, 244, 245, 246,
516 250, 251, 252, 253, 257, 258, 259, 263, 264, 268,
517 269, 270, 278, 279, 280, 281, 282, 283, 284, 285,
518 286, 287, 294, 298, 302, 303, 308, 312, 316, 318,
519 323, 327, 328, 333, 338, 342, 343, 347, 352, 353,
520 357, 361, 365, 369, 373, 374, 378, 382, 383, 387,
521 392, 393, 397, 398, 402
525 #if YYDEBUG || YYERROR_VERBOSE
526 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
527 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
528 static const char *const yytname[] =
530 "$end", "error", "$undefined", "MT_BADTOK", "MT_END", "MT_STATE",
531 "MT_GLOBAL", "MT_CONTEXT", "MT_ONEOF", "MT_DEFAULTS", "MT_DEFAULT",
532 "MT_REFERENCE", "MT_PARAMETER", "MT_RESULT", "MT_CLAUSE", "MT_LITERAL",
533 "MT_NULL", "MT_ANNOTATIONS", "MT_ARROW", "MT_MERGE", "MT_TRANSFERS",
534 "MT_PRECONDITIONS", "MT_POSTCONDITIONS", "MT_LOSEREFERENCE", "MT_AS",
535 "MT_ERROR", "MT_PLUS", "MT_STAR", "MT_BAR", "MT_LPAREN", "MT_RPAREN",
536 "MT_LBRACKET", "MT_RBRACKET", "MT_LBRACE", "MT_RBRACE", "MT_COMMA",
537 "MT_CHAR", "MT_INT", "MT_FLOAT", "MT_DOUBLE", "MT_VOID", "MT_ANYTYPE",
538 "MT_INTEGRALTYPE", "MT_UNSIGNEDINTEGRALTYPE", "MT_SIGNEDINTEGRALTYPE",
539 "MT_CONST", "MT_VOLATILE", "MT_RESTRICT", "MT_STRINGLIT", "MT_IDENT",
540 "$accept", "file", "mtsDeclaration", "declarationNode",
541 "declarationPieces", "declarationPiece", "contextDeclaration",
542 "optContextSelection", "contextSelection", "optType", "typeExpression",
543 "completeType", "completeTypeAux", "optCompleteType", "abstractDecl",
544 "pointers", "innerMods", "innerModsList", "abstractDeclBase",
545 "typeSpecifier", "typeName", "valuesDeclaration", "valuesList",
546 "defaultNode", "defaultsDeclaration", "defaultDeclarationList",
547 "annotationsDeclaration", "annotationsDeclarationList",
548 "annotationDeclaration", "mergeDeclaration", "mergeClauses",
549 "mergeClause", "mergeItem", "preconditionsDeclaration",
550 "postconditionsDeclaration", "transfersDeclaration",
551 "loseReferenceDeclaration", "lostClauses", "lostClause",
552 "transferClauses", "transferClause", "transferAction", "errorAction",
558 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
560 static const unsigned short yytoknum[] =
562 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
563 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
564 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
565 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
566 295, 296, 297, 298, 299, 300, 301, 302, 303, 304
570 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
571 static const unsigned char yyr1[] =
573 0, 50, 51, 51, 52, 52, 53, 54, 54, 55,
574 55, 55, 55, 55, 55, 55, 55, 55, 55, 56,
575 57, 57, 58, 58, 58, 58, 58, 58, 59, 59,
576 60, 60, 61, 61, 62, 63, 63, 64, 64, 64,
577 65, 65, 65, 65, 66, 66, 66, 67, 67, 68,
578 68, 68, 69, 69, 69, 69, 69, 69, 69, 69,
579 69, 69, 70, 71, 72, 72, 73, 74, 75, 75,
580 76, 77, 77, 78, 79, 80, 80, 81, 82, 82,
581 83, 84, 85, 86, 87, 87, 88, 89, 89, 90,
585 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
586 static const unsigned char yyr2[] =
588 0, 2, 0, 1, 3, 4, 2, 0, 2, 1,
589 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
590 0, 1, 2, 2, 2, 2, 2, 2, 0, 1,
591 1, 2, 1, 3, 2, 0, 1, 1, 1, 2,
592 1, 2, 2, 3, 1, 1, 1, 1, 2, 3,
593 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
594 1, 1, 1, 2, 1, 3, 2, 2, 3, 4,
595 2, 1, 2, 4, 2, 1, 2, 5, 1, 1,
596 2, 2, 2, 2, 1, 2, 3, 1, 2, 5,
600 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
601 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
602 means the default is an error. */
603 static const unsigned char yydefact[] =
605 2, 0, 0, 0, 3, 7, 0, 0, 1, 0,
606 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
607 7, 9, 10, 12, 11, 13, 14, 16, 17, 15,
608 18, 4, 0, 28, 28, 28, 28, 28, 28, 19,
609 64, 63, 0, 67, 94, 66, 20, 70, 71, 79,
610 74, 75, 0, 78, 82, 87, 0, 80, 81, 83,
611 84, 0, 8, 5, 52, 53, 54, 55, 56, 57,
612 58, 59, 60, 62, 23, 29, 30, 32, 35, 61,
613 22, 24, 25, 26, 27, 0, 0, 0, 21, 72,
614 76, 0, 88, 0, 85, 0, 40, 0, 0, 0,
615 31, 37, 38, 36, 34, 65, 68, 0, 0, 0,
616 92, 86, 44, 45, 46, 42, 47, 41, 33, 0,
617 50, 39, 0, 69, 73, 0, 0, 93, 43, 48,
618 49, 51, 77, 91, 90, 89
621 /* YYDEFGOTO[NTERM-NUM]. */
622 static const short yydefgoto[] =
624 -1, 3, 4, 6, 19, 20, 21, 87, 42, 74,
625 75, 76, 77, 104, 100, 101, 116, 117, 102, 78,
626 79, 22, 41, 23, 24, 43, 25, 47, 48, 26,
627 50, 51, 52, 27, 28, 29, 30, 59, 60, 54,
631 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
633 #define YYPACT_NINF -90
634 static const yysigned_char yypact[] =
636 21, -35, 10, 35, -90, 2, 33, -35, -90, 52,
637 -9, 52, 11, 12, -19, 11, 11, 11, 11, -90,
638 2, -90, -90, -90, -90, -90, -90, -90, -90, -90,
639 -90, -90, 37, 13, 13, 13, 13, 13, 13, -90,
640 23, -90, 41, -90, -90, -90, 52, -90, 12, -90,
641 -90, -19, 44, -90, -90, 11, 48, -90, -90, -90,
642 11, 57, -90, -90, -90, -90, -90, -90, -90, -90,
643 -90, -90, -90, -90, -90, -90, -11, -90, 13, -90,
644 -90, -90, -90, -90, -90, -9, 11, 58, -90, -90,
645 -90, -19, -90, 11, -90, 53, -14, 13, 42, 45,
646 -90, 5, 49, 54, -90, -90, 52, 11, 65, 66,
647 38, -90, -90, -90, -90, -90, -90, -14, -90, 55,
648 -90, 49, 56, -90, -90, -20, -20, -90, -90, -90,
649 -90, -90, -90, -90, -90, -90
652 /* YYPGOTO[NTERM-NUM]. */
653 static const yysigned_char yypgoto[] =
655 -90, -90, -90, 80, 69, -90, -90, -90, -8, 9,
656 -7, 14, -90, -90, -5, -89, -26, -90, -4, -90,
657 -90, -90, 15, -90, -90, -10, -90, 46, -90, -90,
658 47, -90, 8, -90, -90, -90, -90, 43, -90, -13,
662 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
663 positive, shift that token. If negative, reduce the rule which
664 number is the opposite. If zero, do what YYDEFACT says.
665 If YYTABLE_NINF, syntax error. */
666 #define YYTABLE_NINF -1
667 static const unsigned char yytable[] =
669 45, 39, 53, 57, 58, 110, 61, 115, 49, 9,
670 10, 11, 12, 96, 5, 7, 96, 97, 98, 13,
671 99, 14, 15, 16, 17, 18, 1, 2, 128, 44,
672 44, 112, 113, 114, 98, 8, 99, 31, 88, 53,
673 40, 63, 92, 80, 81, 82, 83, 84, 61, 64,
674 65, 66, 67, 68, 69, 70, 71, 72, 85, 86,
675 44, 46, 73, 33, 34, 35, 36, 37, 38, 96,
676 91, 98, 93, 99, 106, 95, 107, 120, 110, 53,
677 122, 109, 97, 125, 126, 130, 127, 32, 131, 62,
678 118, 129, 103, 119, 89, 124, 123, 121, 90, 108,
679 105, 135, 111, 94, 0, 0, 0, 0, 0, 0,
683 static const yysigned_char yycheck[] =
685 12, 9, 14, 16, 17, 25, 18, 96, 27, 7,
686 8, 9, 10, 27, 49, 5, 27, 28, 29, 17,
687 31, 19, 20, 21, 22, 23, 5, 6, 117, 49,
688 49, 45, 46, 47, 29, 0, 31, 4, 46, 51,
689 49, 4, 55, 34, 35, 36, 37, 38, 60, 36,
690 37, 38, 39, 40, 41, 42, 43, 44, 35, 18,
691 49, 49, 49, 11, 12, 13, 14, 15, 16, 27,
692 26, 29, 24, 31, 86, 18, 18, 32, 25, 91,
693 31, 93, 28, 18, 18, 30, 48, 7, 32, 20,
694 97, 117, 78, 98, 48, 107, 106, 101, 51, 91,
695 85, 126, 95, 60, -1, -1, -1, -1, -1, -1,
699 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
700 symbol of state STATE-NUM. */
701 static const unsigned char yystos[] =
703 0, 5, 6, 51, 52, 49, 53, 5, 0, 7,
704 8, 9, 10, 17, 19, 20, 21, 22, 23, 54,
705 55, 56, 71, 73, 74, 76, 79, 83, 84, 85,
706 86, 4, 53, 11, 12, 13, 14, 15, 16, 58,
707 49, 72, 58, 75, 49, 93, 49, 77, 78, 27,
708 80, 81, 82, 93, 89, 90, 93, 89, 89, 87,
709 88, 93, 54, 4, 36, 37, 38, 39, 40, 41,
710 42, 43, 44, 49, 59, 60, 61, 62, 69, 70,
711 59, 59, 59, 59, 59, 35, 18, 57, 58, 77,
712 80, 26, 89, 24, 87, 18, 27, 28, 29, 31,
713 64, 65, 68, 61, 63, 72, 93, 18, 82, 93,
714 25, 92, 45, 46, 47, 65, 66, 67, 60, 64,
715 32, 68, 31, 75, 93, 18, 18, 48, 65, 66,
716 30, 32, 91, 92, 93, 91
719 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
720 # define YYSIZE_T __SIZE_TYPE__
722 #if ! defined (YYSIZE_T) && defined (size_t)
723 # define YYSIZE_T size_t
725 #if ! defined (YYSIZE_T)
726 # if defined (__STDC__) || defined (__cplusplus)
727 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
728 # define YYSIZE_T size_t
731 #if ! defined (YYSIZE_T)
732 # define YYSIZE_T unsigned int
735 #define yyerrok (yyerrstatus = 0)
736 #define yyclearin (yychar = YYEMPTY)
740 #define YYACCEPT goto yyacceptlab
741 #define YYABORT goto yyabortlab
742 #define YYERROR goto yyerrlab1
745 /* Like YYERROR except do call yyerror. This remains here temporarily
746 to ease the transition to the new meaning of YYERROR, for GCC.
747 Once GCC version 2 has supplanted version 1, this can go. */
749 #define YYFAIL goto yyerrlab
751 #define YYRECOVERING() (!!yyerrstatus)
753 #define YYBACKUP(Token, Value) \
755 if (yychar == YYEMPTY && yylen == 1) \
759 yytoken = YYTRANSLATE (yychar); \
765 yyerror ("syntax error: cannot back up");\
771 #define YYERRCODE 256
773 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
776 #ifndef YYLLOC_DEFAULT
777 # define YYLLOC_DEFAULT(Current, Rhs, N) \
778 Current.first_line = Rhs[1].first_line; \
779 Current.first_column = Rhs[1].first_column; \
780 Current.last_line = Rhs[N].last_line; \
781 Current.last_column = Rhs[N].last_column;
784 /* YYLEX -- calling `yylex' with the right arguments. */
787 # define YYLEX yylex (&yylval, YYLEX_PARAM)
789 # define YYLEX yylex (&yylval)
792 /* Enable debugging if requested. */
796 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
797 # define YYFPRINTF fprintf
800 # define YYDPRINTF(Args) \
806 # define YYDSYMPRINT(Args) \
812 # define YYDSYMPRINTF(Title, Token, Value, Location) \
816 YYFPRINTF (stderr, "%s ", Title); \
817 yysymprint (stderr, \
819 YYFPRINTF (stderr, "\n"); \
823 /*------------------------------------------------------------------.
824 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
826 `------------------------------------------------------------------*/
828 #if defined (__STDC__) || defined (__cplusplus)
830 yy_stack_print (short *bottom, short *top)
833 yy_stack_print (bottom, top)
838 YYFPRINTF (stderr, "Stack now");
839 for (/* Nothing. */; bottom <= top; ++bottom)
840 YYFPRINTF (stderr, " %d", *bottom);
841 YYFPRINTF (stderr, "\n");
844 # define YY_STACK_PRINT(Bottom, Top) \
847 yy_stack_print ((Bottom), (Top)); \
851 /*------------------------------------------------.
852 | Report that the YYRULE is going to be reduced. |
853 `------------------------------------------------*/
855 #if defined (__STDC__) || defined (__cplusplus)
857 yy_reduce_print (int yyrule)
860 yy_reduce_print (yyrule)
865 unsigned int yylineno = yyrline[yyrule];
866 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
867 yyrule - 1, yylineno);
868 /* Print the symbols being reduced, and their result. */
869 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
870 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
871 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
874 # define YY_REDUCE_PRINT(Rule) \
877 yy_reduce_print (Rule); \
880 /* Nonzero means print parse trace. It is left uninitialized so that
881 multiple parsers can coexist. */
884 # define YYDPRINTF(Args)
885 # define YYDSYMPRINT(Args)
886 # define YYDSYMPRINTF(Title, Token, Value, Location)
887 # define YY_STACK_PRINT(Bottom, Top)
888 # define YY_REDUCE_PRINT(Rule)
889 #endif /* !YYDEBUG */
892 /* YYINITDEPTH -- initial size of the parser's stacks. */
894 # define YYINITDEPTH 200
897 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
898 if the built-in stack extension method is used).
900 Do not make this value too large; the results are undefined if
901 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
902 evaluated with infinite-precision integer arithmetic. */
909 # define YYMAXDEPTH 10000
917 # if defined (__GLIBC__) && defined (_STRING_H)
918 # define yystrlen strlen
920 /* Return the length of YYSTR. */
922 # if defined (__STDC__) || defined (__cplusplus)
923 yystrlen (const char *yystr)
929 register const char *yys = yystr;
931 while (*yys++ != '\0')
934 return yys - yystr - 1;
940 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
941 # define yystpcpy stpcpy
943 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
946 # if defined (__STDC__) || defined (__cplusplus)
947 yystpcpy (char *yydest, const char *yysrc)
949 yystpcpy (yydest, yysrc)
954 register char *yyd = yydest;
955 register const char *yys = yysrc;
957 while ((*yyd++ = *yys++) != '\0')
965 #endif /* !YYERROR_VERBOSE */
970 /*--------------------------------.
971 | Print this symbol on YYOUTPUT. |
972 `--------------------------------*/
974 #if defined (__STDC__) || defined (__cplusplus)
976 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
979 yysymprint (yyoutput, yytype, yyvaluep)
985 /* Pacify ``unused variable'' warnings. */
988 if (yytype < YYNTOKENS)
990 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
992 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
996 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1003 YYFPRINTF (yyoutput, ")");
1006 #endif /* ! YYDEBUG */
1007 /*-----------------------------------------------.
1008 | Release the memory associated to this symbol. |
1009 `-----------------------------------------------*/
1011 #if defined (__STDC__) || defined (__cplusplus)
1013 yydestruct (int yytype, YYSTYPE *yyvaluep)
1016 yydestruct (yytype, yyvaluep)
1021 /* Pacify ``unused variable'' warnings. */
1033 /* Prevent warnings from -Wmissing-prototypes. */
1035 #ifdef YYPARSE_PARAM
1036 # if defined (__STDC__) || defined (__cplusplus)
1037 int yyparse (void *YYPARSE_PARAM);
1041 #else /* ! YYPARSE_PARAM */
1042 #if defined (__STDC__) || defined (__cplusplus)
1047 #endif /* ! YYPARSE_PARAM */
1058 #ifdef YYPARSE_PARAM
1059 # if defined (__STDC__) || defined (__cplusplus)
1060 int yyparse (void *YYPARSE_PARAM)
1062 int yyparse (YYPARSE_PARAM)
1063 void *YYPARSE_PARAM;
1065 #else /* ! YYPARSE_PARAM */
1066 #if defined (__STDC__) || defined (__cplusplus)
1076 /* The lookahead symbol. */
1079 /* The semantic value of the lookahead symbol. */
1082 /* Number of syntax errors so far. */
1085 register int yystate;
1088 /* Number of tokens to shift before error messages enabled. */
1090 /* Lookahead token as an internal (translated) token number. */
1093 /* Three stacks and their tools:
1094 `yyss': related to states,
1095 `yyvs': related to semantic values,
1096 `yyls': related to locations.
1098 Refer to the stacks thru separate pointers, to allow yyoverflow
1099 to reallocate them elsewhere. */
1101 /* The state stack. */
1102 short yyssa[YYINITDEPTH];
1103 short *yyss = yyssa;
1104 register short *yyssp;
1106 /* The semantic value stack. */
1107 YYSTYPE yyvsa[YYINITDEPTH];
1108 YYSTYPE *yyvs = yyvsa;
1109 register YYSTYPE *yyvsp;
1113 #define YYPOPSTACK (yyvsp--, yyssp--)
1115 YYSIZE_T yystacksize = YYINITDEPTH;
1117 /* The variables used to return semantic value and location from the
1122 /* When reducing, the number of symbols on the RHS of the reduced
1126 YYDPRINTF ((stderr, "Starting parse\n"));
1131 yychar = YYEMPTY; /* Cause a token to be read. */
1133 /* Initialize stack pointers.
1134 Waste one element of value and location stack
1135 so that they stay on the same level as the state stack.
1136 The wasted elements are never initialized. */
1143 /*------------------------------------------------------------.
1144 | yynewstate -- Push a new state, which is found in yystate. |
1145 `------------------------------------------------------------*/
1147 /* In all cases, when you get here, the value and location stacks
1148 have just been pushed. so pushing a state here evens the stacks.
1155 if (yyss + yystacksize - 1 <= yyssp)
1157 /* Get the current used size of the three stacks, in elements. */
1158 YYSIZE_T yysize = yyssp - yyss + 1;
1162 /* Give user a chance to reallocate the stack. Use copies of
1163 these so that the &'s don't force the real ones into
1165 YYSTYPE *yyvs1 = yyvs;
1166 short *yyss1 = yyss;
1169 /* Each stack pointer address is followed by the size of the
1170 data in use in that stack, in bytes. This used to be a
1171 conditional around just the two extra args, but that might
1172 be undefined if yyoverflow is a macro. */
1173 yyoverflow ("parser stack overflow",
1174 &yyss1, yysize * sizeof (*yyssp),
1175 &yyvs1, yysize * sizeof (*yyvsp),
1182 #else /* no yyoverflow */
1183 # ifndef YYSTACK_RELOCATE
1186 /* Extend the stack our own way. */
1187 if (YYMAXDEPTH <= yystacksize)
1190 if (YYMAXDEPTH < yystacksize)
1191 yystacksize = YYMAXDEPTH;
1194 short *yyss1 = yyss;
1195 union yyalloc *yyptr =
1196 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1199 YYSTACK_RELOCATE (yyss);
1200 YYSTACK_RELOCATE (yyvs);
1202 # undef YYSTACK_RELOCATE
1204 YYSTACK_FREE (yyss1);
1207 #endif /* no yyoverflow */
1209 yyssp = yyss + yysize - 1;
1210 yyvsp = yyvs + yysize - 1;
1213 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1214 (unsigned long int) yystacksize));
1216 if (yyss + yystacksize - 1 <= yyssp)
1220 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1229 /* Do appropriate processing given the current state. */
1230 /* Read a lookahead token if we need one and don't already have one. */
1233 /* First try to decide what to do without reference to lookahead token. */
1235 yyn = yypact[yystate];
1236 if (yyn == YYPACT_NINF)
1239 /* Not known => get a lookahead token if don't already have one. */
1241 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1242 if (yychar == YYEMPTY)
1244 YYDPRINTF ((stderr, "Reading a token: "));
1248 if (yychar <= YYEOF)
1250 yychar = yytoken = YYEOF;
1251 YYDPRINTF ((stderr, "Now at end of input.\n"));
1255 yytoken = YYTRANSLATE (yychar);
1256 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1259 /* If the proper action on seeing token YYTOKEN is to reduce or to
1260 detect an error, take that action. */
1262 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1267 if (yyn == 0 || yyn == YYTABLE_NINF)
1276 /* Shift the lookahead token. */
1277 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1279 /* Discard the token being shifted unless it is eof. */
1280 if (yychar != YYEOF)
1286 /* Count tokens shifted since error; after three, turn off error
1295 /*-----------------------------------------------------------.
1296 | yydefault -- do the default action for the current state. |
1297 `-----------------------------------------------------------*/
1299 yyn = yydefact[yystate];
1305 /*-----------------------------.
1306 | yyreduce -- Do a reduction. |
1307 `-----------------------------*/
1309 /* yyn is the number of a rule to reduce with. */
1312 /* If YYLEN is nonzero, implement the default value of the action:
1315 Otherwise, the following line sets YYVAL to garbage.
1316 This behavior is undocumented and Bison
1317 users should not rely upon it. Assigning to YYVAL
1318 unconditionally makes the parser a bit smaller, and it avoids a
1319 GCC warning that YYVAL may be used uninitialized. */
1320 yyval = yyvsp[1-yylen];
1323 YY_REDUCE_PRINT (yyn);
1338 { mtreader_processDeclaration (yyvsp[-1].mtdecl); ;}
1343 { mtreader_processGlobalDeclaration (yyvsp[-1].mtdecl); ;}
1348 { yyval.mtdecl = mtDeclarationNode_create (yyvsp[-1].tok, yyvsp[0].mtpieces); ;}
1353 { yyval.mtpieces = mtDeclarationPieces_create (); ;}
1358 { yyval.mtpieces = mtDeclarationPieces_append (yyvsp[0].mtpieces, yyvsp[-1].mtpiece); ;}
1363 { yyval.mtpiece = mtDeclarationPiece_createContext (yyvsp[0].mtcontext); ;}
1368 { yyval.mtpiece = mtDeclarationPiece_createValues (yyvsp[0].mtvalues); ;}
1373 { yyval.mtpiece = mtDeclarationPiece_createDefaults (yyvsp[0].mtdefaults); ;}
1378 { yyval.mtpiece = mtDeclarationPiece_createValueDefault (yyvsp[0].tok); ;}
1383 { yyval.mtpiece = mtDeclarationPiece_createAnnotations (yyvsp[0].mtannotations); ;}
1388 { yyval.mtpiece = mtDeclarationPiece_createMerge (yyvsp[0].mtmerge); ;}
1393 { yyval.mtpiece = mtDeclarationPiece_createTransfers (yyvsp[0].mttransferclauselist); ;}
1398 { yyval.mtpiece = mtDeclarationPiece_createPreconditions (yyvsp[0].mttransferclauselist); ;}
1403 { yyval.mtpiece = mtDeclarationPiece_createPostconditions (yyvsp[0].mttransferclauselist); ;}
1408 { yyval.mtpiece = mtDeclarationPiece_createLosers (yyvsp[0].mtlosereferencelist); ;}
1413 { yyval.mtcontext = yyvsp[0].mtcontext; ;}
1418 { yyval.mtcontext = mtContextNode_createAny (); ;}
1423 { yyval.mtcontext = mtContextNode_createParameter (yyvsp[0].ctyp); ;}
1428 { yyval.mtcontext = mtContextNode_createReference (yyvsp[0].ctyp); ;}
1433 { yyval.mtcontext = mtContextNode_createResult (yyvsp[0].ctyp); ;}
1438 { yyval.mtcontext = mtContextNode_createClause (yyvsp[0].ctyp); ;}
1443 { yyval.mtcontext = mtContextNode_createLiteral (yyvsp[0].ctyp); ;}
1448 { yyval.mtcontext = mtContextNode_createNull (yyvsp[0].ctyp); ;}
1453 { yyval.ctyp = ctype_unknown; ;}
1458 { DPRINTF (("Type: %s", qtype_unparse (yyvsp[0].qtyp))); yyval.ctyp = qtype_getType (yyvsp[0].qtyp); ;}
1463 { yyval.qtyp = qtype_newBase (yyvsp[-1].qtyp, yyvsp[0].ctyp); ;}
1468 { yyval.qtyp = yyvsp[0].qtyp; ;}
1473 { yyval.qtyp = qtype_mergeAlt (yyvsp[-2].qtyp, yyvsp[0].qtyp); ;}
1478 { yyval.qtyp = qtype_combine (yyvsp[0].qtyp, yyvsp[-1].ctyp); ;}
1483 { yyval.qtyp = qtype_unknown (); ;}
1488 { yyval.qtyp = yyvsp[0].qtyp; ;}
1493 { yyval.ctyp = ctype_adjustPointers (yyvsp[0].pointers, ctype_unknown); ;}
1498 { yyval.ctyp = ctype_adjustPointers (yyvsp[-1].pointers, yyvsp[0].ctyp); ;}
1503 { yyval.pointers = pointers_createMt (yyvsp[0].tok); ;}
1508 { yyval.pointers = pointers_createModsMt (yyvsp[-1].tok, yyvsp[0].quals); ;}
1513 { yyval.pointers = pointers_extend (pointers_createMt (yyvsp[-1].tok), yyvsp[0].pointers); ;}
1518 { yyval.pointers = pointers_extend (pointers_createModsMt (yyvsp[-2].tok, yyvsp[-1].quals), yyvsp[0].pointers); ;}
1523 { yyval.qual = qual_createConst (); ;}
1528 { yyval.qual = qual_createVolatile (); ;}
1533 { yyval.qual = qual_createRestrict (); ;}
1538 { yyval.quals = qualList_single (yyvsp[0].qual); ;}
1543 { yyval.quals = qualList_add (yyvsp[-1].quals, yyvsp[0].qual); ;}
1548 { yyval.ctyp = ctype_expectFunction (yyvsp[-1].ctyp); ;}
1553 { yyval.ctyp = ctype_makeArray (ctype_unknown); ;}
1558 { yyval.ctyp = ctype_makeArray (yyvsp[-2].ctyp); ;}
1563 { yyval.ctyp = ctype_char; ;}
1568 { yyval.ctyp = ctype_int; ;}
1573 { yyval.ctyp = ctype_float; ;}
1578 { yyval.ctyp = ctype_double; ;}
1583 { yyval.ctyp = ctype_void; ;}
1588 { yyval.ctyp = ctype_unknown; ;}
1593 { yyval.ctyp = ctype_anyintegral; ;}
1598 { yyval.ctyp = ctype_unsignedintegral; ;}
1603 { yyval.ctyp = ctype_signedintegral; ;}
1608 { yyval.ctyp = mtscanner_lookupType (yyvsp[0].tok); ;}
1613 { yyval.mtvalues = mtValuesNode_create (yyvsp[0].cstringlist); ;}
1618 { yyval.cstringlist = cstringList_single (mttok_getText (yyvsp[0].tok)); ;}
1623 { yyval.cstringlist = cstringList_prepend (yyvsp[0].cstringlist, mttok_getText (yyvsp[-2].tok)); ;}
1628 { yyval.tok = yyvsp[0].tok; ;}
1633 { yyval.mtdefaults = mtDefaultsNode_create (yyvsp[-1].tok, yyvsp[0].mtdeflist); ;}
1638 { yyval.mtdeflist = mtDefaultsDeclList_single (mtDefaultsDecl_create (yyvsp[-2].mtcontext, yyvsp[0].tok)); ;}
1643 { yyval.mtdeflist = mtDefaultsDeclList_prepend (yyvsp[0].mtdeflist, mtDefaultsDecl_create (yyvsp[-3].mtcontext, yyvsp[-1].tok)); ;}
1648 { yyval.mtannotations = mtAnnotationsNode_create (yyvsp[0].mtannotlist); ;}
1653 { yyval.mtannotlist = mtAnnotationList_single (yyvsp[0].mtannotdecl); ;}
1658 { yyval.mtannotlist = mtAnnotationList_prepend (yyvsp[0].mtannotlist, yyvsp[-1].mtannotdecl); ;}
1663 { yyval.mtannotdecl = mtAnnotationDecl_create (yyvsp[-3].tok, yyvsp[-2].mtcontext, yyvsp[0].tok); ;}
1668 { yyval.mtmerge = mtMergeNode_create (yyvsp[0].mtmergeclauselist); ;}
1673 { yyval.mtmergeclauselist = mtMergeClauseList_single (yyvsp[0].mtmergeclause); ;}
1678 { yyval.mtmergeclauselist = mtMergeClauseList_prepend (yyvsp[0].mtmergeclauselist, yyvsp[-1].mtmergeclause); ;}
1683 { yyval.mtmergeclause = mtMergeClause_create (yyvsp[-4].mtmergeitem, yyvsp[-2].mtmergeitem, yyvsp[0].mttransferaction); ;}
1688 { yyval.mtmergeitem = mtMergeItem_createValue (yyvsp[0].tok); ;}
1693 { yyval.mtmergeitem = mtMergeItem_createStar (yyvsp[0].tok); ;}
1698 { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ;}
1703 { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ;}
1708 { yyval.mttransferclauselist = yyvsp[0].mttransferclauselist; ;}
1713 { yyval.mtlosereferencelist = yyvsp[0].mtlosereferencelist; ;}
1718 { yyval.mtlosereferencelist = mtLoseReferenceList_single (yyvsp[0].mtlosereference); ;}
1723 { yyval.mtlosereferencelist = mtLoseReferenceList_prepend (yyvsp[0].mtlosereferencelist, yyvsp[-1].mtlosereference); ;}
1728 { yyval.mtlosereference = mtLoseReference_create (yyvsp[-2].tok, yyvsp[0].mttransferaction); ;}
1733 { yyval.mttransferclauselist = mtTransferClauseList_single (yyvsp[0].mttransferclause); ;}
1738 { yyval.mttransferclauselist = mtTransferClauseList_prepend (yyvsp[0].mttransferclauselist, yyvsp[-1].mttransferclause); ;}
1743 { yyval.mttransferclause = mtTransferClause_create (yyvsp[-4].tok, yyvsp[-2].tok, yyvsp[0].mttransferaction); ;}
1748 { yyval.mttransferaction = mtTransferAction_createValue (yyvsp[0].tok); ;}
1753 { yyval.mttransferaction = yyvsp[0].mttransferaction; ;}
1758 { yyval.mttransferaction = mtTransferAction_createError (yyvsp[0].tok); ;}
1763 { yyval.mttransferaction = mtTransferAction_createErrorMessage (yyvsp[0].tok); ;}
1769 /* Line 999 of yacc.c. */
1776 YY_STACK_PRINT (yyss, yyssp);
1781 /* Now `shift' the result of the reduction. Determine what state
1782 that goes to, based on the state we popped back to and the rule
1783 number reduced by. */
1787 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1788 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1789 yystate = yytable[yystate];
1791 yystate = yydefgoto[yyn - YYNTOKENS];
1796 /*------------------------------------.
1797 | yyerrlab -- here on detecting error |
1798 `------------------------------------*/
1800 /* If not already recovering from an error, report this error. */
1805 yyn = yypact[yystate];
1807 if (YYPACT_NINF < yyn && yyn < YYLAST)
1809 YYSIZE_T yysize = 0;
1810 int yytype = YYTRANSLATE (yychar);
1815 /* Start YYX at -YYN if negative to avoid negative indexes in
1817 for (yyx = yyn < 0 ? -yyn : 0;
1818 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1819 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1820 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1821 yysize += yystrlen ("syntax error, unexpected ") + 1;
1822 yysize += yystrlen (yytname[yytype]);
1823 yymsg = (char *) YYSTACK_ALLOC (yysize);
1826 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1827 yyp = yystpcpy (yyp, yytname[yytype]);
1832 for (yyx = yyn < 0 ? -yyn : 0;
1833 yyx < (int) (sizeof (yytname) / sizeof (char *));
1835 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1837 const char *yyq = ! yycount ? ", expecting " : " or ";
1838 yyp = yystpcpy (yyp, yyq);
1839 yyp = yystpcpy (yyp, yytname[yyx]);
1844 YYSTACK_FREE (yymsg);
1847 yyerror ("syntax error; also virtual memory exhausted");
1850 #endif /* YYERROR_VERBOSE */
1851 yyerror ("syntax error");
1856 if (yyerrstatus == 3)
1858 /* If just tried and failed to reuse lookahead token after an
1859 error, discard it. */
1861 /* Return failure if at end of input. */
1862 if (yychar == YYEOF)
1864 /* Pop the error token. */
1866 /* Pop the rest of the stack. */
1867 while (yyss < yyssp)
1869 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1870 yydestruct (yystos[*yyssp], yyvsp);
1876 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1877 yydestruct (yytoken, &yylval);
1882 /* Else will try to reuse lookahead token after shifting the error
1887 /*----------------------------------------------------.
1888 | yyerrlab1 -- error raised explicitly by an action. |
1889 `----------------------------------------------------*/
1891 yyerrstatus = 3; /* Each real token shifted decrements this. */
1895 yyn = yypact[yystate];
1896 if (yyn != YYPACT_NINF)
1899 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1907 /* Pop the current state because it cannot handle the error token. */
1911 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1912 yydestruct (yystos[yystate], yyvsp);
1916 YY_STACK_PRINT (yyss, yyssp);
1922 YYDPRINTF ((stderr, "Shifting error token, "));
1931 /*-------------------------------------.
1932 | yyacceptlab -- YYACCEPT comes here. |
1933 `-------------------------------------*/
1938 /*-----------------------------------.
1939 | yyabortlab -- YYABORT comes here. |
1940 `-----------------------------------*/
1946 /*----------------------------------------------.
1947 | yyoverflowlab -- parser overflow comes here. |
1948 `----------------------------------------------*/
1950 yyerror ("parser stack overflow");
1958 YYSTACK_FREE (yyss);
1967 # include "bison.reset"
1969 extern char *yytext;
1971 static void mterror (char *s)
1977 (message ("Parse error in meta-state file: %s", cstring_fromChars (s)));
1982 (message ("Parse error in meta-state file"));
1987 static void yyprint (FILE *file, int type, YYSTYPE value)
1989 cstring tname = mttok_unparse (value.tok);
1990 fprintf (file, " (%s)", cstring_toCharsSafe (tname));
1991 cstring_free (tname);
1999 ** Resets all flags in bison.head
2021 /*@=evalorderuncon@*/
2030 /*@=elseifcomplete@*/
2034 /*@=readonlytrans@*/
2037 /*@=systemunrecog@*/
2038 /*@=dependenttrans@*/
2039 /*@=unqualifiedtrans@*/
2043 /*drl added 11/27/2001*/
2046 /*drl added 12/11/2002*/