/* A Bison parser, made from parser.y by GNU Bison version 1.25 */ #define YYBISON 1 /* Identify Bison output. */ #define HACTIVATE 258 #define HAFTER 259 #define HARRAY 260 #define HAT 261 #define HBEFORE 262 #define HBEGIN 263 #define HBOOLEAN 264 #define HCHARACTER 265 #define HCLASS 266 #define HCONC 267 #define HDELAY 268 #define HDO 269 #define HELSE 270 #define HEND 271 #define HEQ 272 #define HEXTERNAL 273 #define HFOR 274 #define HGE 275 #define HGO 276 #define HGOTO 277 #define HGT 278 #define HHIDDEN 279 #define HIF 280 #define HIN 281 #define HINNER 282 #define HINSPECT 283 #define HINTEGER 284 #define HIS 285 #define HLABEL 286 #define HLE 287 #define HLONG 288 #define HLT 289 #define HNAME 290 #define HNE 291 #define HNEW 292 #define HNONE 293 #define HNOTEXT 294 #define HOTHERWISE 295 #define HPRIOR 296 #define HPROCEDURE 297 #define HPROTECTED 298 #define HQUA 299 #define HREACTIVATE 300 #define HREAL 301 #define HREF 302 #define HSHORT 303 #define HSTEP 304 #define HSWITCH 305 #define HTEXT 306 #define HTHEN 307 #define HTHIS 308 #define HTO 309 #define HUNTIL 310 #define HVALUE 311 #define HVAR 312 #define HVIRTUAL 313 #define HWHEN 314 #define HWHILE 315 #define HASSIGNVALUE 316 #define HASSIGNREF 317 #define HPAREXPSEPARATOR 318 #define HLABELSEPARATOR 319 #define HSTATEMENTSEPARATOR 320 #define HBEGPAR 321 #define HENDPAR 322 #define HEQR 323 #define HNER 324 #define HADD 325 #define HSUB 326 #define HMUL 327 #define HDIV 328 #define HINTDIV 329 #define HEXP 330 #define HDOTDOTDOT 331 #define HIDENTIFIER 332 #define HBOOLEANKONST 333 #define HINTEGERKONST 334 #define HCHARACTERKONST 335 #define HREALKONST 336 #define HTEXTKONST 337 #define HASSIGN 338 #define HORELSE 339 #define HANDTHEN 340 #define HEQV 341 #define HIMP 342 #define HOR 343 #define HAND 344 #define HNOT 345 #define HVALRELOPERATOR 346 #define HREFRELOPERATOR 347 #define HOBJRELOPERATOR 348 #define HTERMOPERATOR 349 #define UNEAR 350 #define HFACTOROPERATOR 351 #define HPRIMARYOPERATOR 352 #define HDOT 353 #line 1 "parser.y" /* $Id: cparser.y,v 1.9 1994/10/15 13:30:36 cim Exp $ */ /* Copyright (C) 1994, 1998 Sverre Hvammen Johansen, * Department of Informatics, University of Oslo. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Beskrivelse til YACC som genererer en parser. */ /* Konstanter til bruk */ #include "const.h" #include "dekl.h" #include "cimcomp.h" #include "lex.h" #include "name.h" #include "mellbuilder.h" #include #include char *xmalloc(); void free(); #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free static struct obstack osBlock; #define EXTDECLARATION 0 #define DECLARATION 1 #define STATEMENT 2 #define EMPTYSTATEMENT 3 static char type, kind, categ; char *Ckind; char *varargsid; char *activateid; char *simsetident,*simulationident,*fileident,*imagefileident, *outfileident,*infileident,*directfileident,*printfileident, *bytefileident,*inbytefileident,*outbytefileident,*directbytefileident; extern char sensitive; char ysensitive; /* DEBUGING KAN KANSKJE \NSKES */ /* DA MAA YYDEBUG SETTES LIK 1 */ #ifdef DEBUB #define YYDEBUG #endif #if YACC_YYOVERFLOW #define yyoverflow #endif /* Mulighet for utskrift av symboler fra lex */ #define yylex ylex /* Kontakt med lex */ /* Makroer for registrering av blokker */ struct blockstack { char rem; struct blockstack *prev; } *blockp; #define OBSBLOCK() { struct blockstack *prev= blockp;\ blockp= (struct blockstack *) \ obstack_alloc (&osBlock,sizeof (struct blockstack));\ blockp->prev= prev;\ blockp->rem=TRUE;} #define MBEENEWBLOCK() if (blockp->rem == TRUE) {\ mout(MBLOCK);\ blockp->rem= FALSE;beginBlock(KBLOKK);} #define MBEEENDBLOCK() { struct blockstack *prev= blockp->prev;\ if(blockp->rem==FALSE)\ {mout(MENDBLOCK);endBlock(NULL,CCNO);}\ obstack_free (&osBlock, blockp);\ blockp= prev;} #define STOPOBSBLOCK() if(blockp->rem==TRUE)blockp->rem=MAYBEE /* Spesifikasjonene til YACC */ #line 100 "parser.y" typedef union { long token; long ival; long arrdim; double rval; char *ident; char *tval; char stat_decl; } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 443 #define YYFLAG -32768 #define YYNTBASE 99 #define YYTRANSLATE(x) ((unsigned)(x) <= 353 ? yytranslate[x] : 222) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 4, 8, 9, 15, 16, 17, 25, 26, 31, 32, 33, 43, 44, 47, 49, 53, 56, 57, 58, 62, 63, 65, 67, 68, 74, 76, 78, 80, 83, 85, 87, 90, 91, 92, 96, 98, 102, 105, 106, 109, 114, 117, 119, 121, 122, 126, 127, 133, 134, 141, 142, 143, 147, 149, 151, 152, 153, 158, 159, 163, 165, 167, 169, 171, 172, 174, 175, 181, 182, 183, 191, 192, 193, 202, 205, 206, 207, 214, 216, 217, 222, 223, 224, 232, 239, 244, 246, 250, 251, 256, 257, 264, 265, 266, 276, 277, 284, 286, 287, 288, 290, 291, 298, 302, 303, 308, 309, 315, 317, 321, 327, 331, 333, 335, 339, 341, 345, 347, 351, 356, 358, 362, 364, 366, 370, 374, 376, 380, 381, 382, 383, 384, 395, 396, 398, 403, 404, 406, 408, 411, 412, 417, 419, 423, 428, 429, 431, 434, 436, 440, 444, 447, 450, 453, 456, 457, 458, 459, 466, 468, 470, 471, 476, 477, 479, 481, 483, 485, 488, 491, 494, 497, 500, 503, 507, 511, 515, 519, 523, 527, 528, 533, 534, 539, 540, 545, 546, 548, 550, 553, 557, 558, 566, 569, 574, 581, 583, 586, 588, 590, 591, 592, 600, 601, 604, 605, 607, 611, 616, 618, 620, 623, 626, 627, 629, 633, 635, 639, 642, 647, 648, 649, 653, 655, 662, 666, 670, 675, 680, 684, 688, 692, 696, 699, 703, 707, 711, 714, 718, 722, 726, 730, 732, 734, 736, 738, 740, 742, 743, 747, 750, 754, 758, 762, 763, 767, 768, 772, 774 }; static const short yyrhs[] = { -1, 100, 162, 0, 1, 65, 160, 0, 0, 18, 115, 42, 102, 110, 0, 0, 0, 18, 77, 42, 103, 77, 104, 106, 0, 0, 18, 11, 105, 110, 0, 0, 0, 112, 93, 107, 115, 42, 77, 108, 170, 109, 0, 0, 8, 16, 0, 111, 0, 110, 63, 111, 0, 77, 112, 0, 0, 0, 91, 113, 82, 0, 0, 114, 0, 116, 0, 0, 47, 66, 77, 117, 67, 0, 51, 0, 9, 0, 10, 0, 48, 29, 0, 29, 0, 46, 0, 33, 46, 0, 0, 0, 15, 119, 159, 0, 121, 0, 121, 63, 120, 0, 216, 122, 0, 0, 60, 216, 0, 49, 216, 55, 216, 0, 21, 54, 0, 22, 0, 126, 0, 0, 14, 125, 159, 0, 0, 59, 77, 14, 127, 159, 0, 0, 126, 59, 77, 14, 128, 159, 0, 0, 0, 40, 130, 159, 0, 3, 0, 45, 0, 0, 0, 135, 216, 133, 137, 0, 0, 136, 134, 216, 0, 6, 0, 13, 0, 7, 0, 4, 0, 0, 41, 0, 0, 60, 216, 14, 139, 159, 0, 0, 0, 25, 216, 52, 140, 159, 141, 118, 0, 0, 0, 19, 77, 83, 142, 120, 14, 143, 159, 0, 123, 216, 0, 0, 0, 28, 216, 144, 124, 145, 129, 0, 27, 0, 0, 77, 64, 146, 155, 0, 0, 0, 217, 8, 147, 154, 148, 160, 16, 0, 217, 8, 1, 65, 160, 16, 0, 217, 8, 1, 16, 0, 217, 0, 131, 216, 132, 0, 0, 8, 149, 160, 16, 0, 0, 115, 42, 77, 150, 170, 159, 0, 0, 0, 77, 11, 114, 151, 154, 77, 152, 170, 159, 0, 0, 11, 114, 77, 153, 170, 159, 0, 101, 0, 0, 0, 138, 0, 0, 116, 77, 214, 63, 156, 213, 0, 116, 77, 214, 0, 0, 115, 5, 157, 163, 0, 0, 50, 77, 83, 158, 169, 0, 155, 0, 8, 160, 16, 0, 8, 1, 65, 160, 16, 0, 8, 1, 16, 0, 161, 0, 155, 0, 161, 65, 155, 0, 138, 0, 162, 65, 138, 0, 164, 0, 163, 63, 164, 0, 165, 66, 167, 67, 0, 166, 0, 166, 63, 165, 0, 77, 0, 168, 0, 168, 63, 167, 0, 216, 64, 216, 0, 216, 0, 216, 63, 169, 0, 0, 0, 0, 0, 175, 65, 171, 190, 172, 198, 173, 207, 174, 210, 0, 0, 176, 0, 66, 114, 177, 67, 0, 0, 178, 0, 77, 0, 184, 76, 0, 0, 77, 179, 63, 178, 0, 183, 0, 183, 63, 178, 0, 66, 114, 181, 67, 0, 0, 182, 0, 184, 76, 0, 183, 0, 183, 63, 178, 0, 184, 202, 77, 0, 184, 185, 0, 35, 64, 0, 56, 64, 0, 57, 64, 0, 0, 0, 0, 115, 42, 77, 186, 180, 187, 0, 77, 0, 76, 0, 0, 77, 189, 63, 188, 0, 0, 191, 0, 192, 0, 196, 0, 194, 0, 192, 196, 0, 196, 192, 0, 192, 194, 0, 194, 192, 0, 196, 194, 0, 194, 196, 0, 194, 192, 196, 0, 192, 194, 196, 0, 192, 196, 194, 0, 194, 196, 192, 0, 196, 194, 192, 0, 196, 192, 194, 0, 0, 35, 193, 188, 65, 0, 0, 57, 195, 188, 65, 0, 0, 56, 197, 188, 65, 0, 0, 199, 0, 200, 0, 199, 200, 0, 202, 212, 65, 0, 0, 114, 42, 77, 93, 201, 203, 65, 0, 185, 65, 0, 115, 42, 77, 65, 0, 115, 42, 77, 63, 212, 65, 0, 116, 0, 115, 5, 0, 31, 0, 50, 0, 0, 0, 115, 42, 77, 204, 170, 205, 206, 0, 0, 8, 16, 0, 0, 208, 0, 209, 212, 65, 0, 208, 209, 212, 65, 0, 24, 0, 43, 0, 24, 43, 0, 43, 24, 0, 0, 211, 0, 58, 64, 198, 0, 77, 0, 212, 63, 77, 0, 77, 214, 0, 213, 63, 77, 214, 0, 0, 0, 91, 215, 216, 0, 217, 0, 25, 216, 52, 216, 15, 216, 0, 217, 83, 216, 0, 217, 12, 217, 0, 217, 88, 15, 217, 0, 217, 89, 52, 217, 0, 217, 86, 217, 0, 217, 87, 217, 0, 217, 88, 217, 0, 217, 89, 217, 0, 90, 217, 0, 217, 91, 217, 0, 217, 92, 217, 0, 217, 93, 217, 0, 94, 217, 0, 217, 94, 217, 0, 217, 96, 217, 0, 217, 97, 217, 0, 66, 216, 67, 0, 82, 0, 80, 0, 81, 0, 79, 0, 78, 0, 38, 0, 0, 77, 218, 220, 0, 53, 77, 0, 37, 77, 219, 0, 217, 98, 217, 0, 217, 44, 77, 0, 0, 66, 221, 67, 0, 0, 66, 221, 67, 0, 216, 0, 216, 63, 221, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 176, 178, 179, 181, 187, 187, 198, 201, 202, 208, 209, 212, 216, 237, 238, 240, 241, 243, 247, 248, 250, 253, 255, 256, 258, 263, 263, 264, 265, 266, 267, 268, 269, 273, 282, 283, 285, 287, 291, 294, 295, 297, 303, 305, 307, 308, 310, 313, 318, 320, 326, 329, 330, 332, 334, 336, 339, 346, 348, 348, 350, 353, 355, 358, 360, 363, 365, 369, 373, 375, 379, 380, 382, 387, 391, 394, 397, 402, 403, 405, 407, 413, 417, 421, 425, 427, 430, 434, 437, 449, 453, 454, 459, 461, 466, 472, 474, 482, 484, 485, 487, 518, 519, 527, 528, 534, 537, 538, 543, 547, 548, 549, 550, 552, 555, 556, 562, 565, 577, 578, 582, 588, 591, 595, 601, 604, 609, 613, 615, 619, 620, 621, 622, 624, 626, 627, 629, 632, 633, 635, 636, 637, 638, 639, 640, 643, 646, 647, 649, 650, 651, 654, 656, 658, 660, 662, 664, 666, 672, 673, 675, 676, 677, 678, 680, 681, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 699, 701, 703, 705, 707, 708, 710, 711, 713, 714, 716, 717, 719, 720, 721, 723, 727, 728, 730, 732, 735, 741, 743, 745, 746, 748, 749, 751, 753, 756, 757, 758, 760, 763, 764, 766, 770, 771, 774, 777, 782, 783, 790, 795, 796, 804, 808, 813, 817, 821, 823, 825, 827, 829, 830, 841, 846, 851, 855, 860, 866, 869, 871, 873, 875, 877, 879, 881, 882, 885, 885, 887, 891, 894, 898, 899, 902, 905, 909, 911 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","HACTIVATE", "HAFTER","HARRAY","HAT","HBEFORE","HBEGIN","HBOOLEAN","HCHARACTER","HCLASS", "HCONC","HDELAY","HDO","HELSE","HEND","HEQ","HEXTERNAL","HFOR","HGE","HGO","HGOTO", "HGT","HHIDDEN","HIF","HIN","HINNER","HINSPECT","HINTEGER","HIS","HLABEL","HLE", "HLONG","HLT","HNAME","HNE","HNEW","HNONE","HNOTEXT","HOTHERWISE","HPRIOR","HPROCEDURE", "HPROTECTED","HQUA","HREACTIVATE","HREAL","HREF","HSHORT","HSTEP","HSWITCH", "HTEXT","HTHEN","HTHIS","HTO","HUNTIL","HVALUE","HVAR","HVIRTUAL","HWHEN","HWHILE", "HASSIGNVALUE","HASSIGNREF","HPAREXPSEPARATOR","HLABELSEPARATOR","HSTATEMENTSEPARATOR", "HBEGPAR","HENDPAR","HEQR","HNER","HADD","HSUB","HMUL","HDIV","HINTDIV","HEXP", "HDOTDOTDOT","HIDENTIFIER","HBOOLEANKONST","HINTEGERKONST","HCHARACTERKONST", "HREALKONST","HTEXTKONST","HASSIGN","HORELSE","HANDTHEN","HEQV","HIMP","HOR", "HAND","HNOT","HVALRELOPERATOR","HREFRELOPERATOR","HOBJRELOPERATOR","HTERMOPERATOR", "UNEAR","HFACTOROPERATOR","HPRIMARYOPERATOR","HDOT","MAIN_MODULE","@1","EXT_DECLARATION", "@2","@3","@4","@5","EXTERNAL_KIND_ITEM","@6","@7","EMPTY_BLOCK","EXT_LIST", "EXT_ITEM","EXT_IDENT","@8","NO_TYPE","MBEE_TYPE","TYPE","@9","MBEE_ELSE_PART", "@10","FOR_LIST","FOR_LIST_ELEMENT","MBEE_F_L_EL_R_PT","GOTO","CONN_STATE_R_PT", "@11","WHEN_CLAUSE_LIST","@12","@13","MBEE_OTWI_CLAUS","@14","ACTIVATOR","SCHEDULE", "@15","@16","ATDELAY","BEFOREAFTER","PRIOR","MODULSTATEMENT","@17","@18","@19", "@20","@21","@22","@23","@24","@25","@26","@27","@28","@29","@30","@31","IMPORT_SPEC_MODULE", "DECLSTATEMENT","@32","@33","@34","BLOCK","MBEE_DECLSTMS","MBEE_DECLSTMSU","MODULS", "ARR_SEGMENT_LIST","ARR_SEGMENT","ARRAY_SEGMENT","ARRAY_SEGMENT_EL","BAUND_PAIR_LIST", "BAUND_PAIR","SWITCH_LIST","HEADING","@35","@36","@37","@38","MBEE_FMAL_PAR_P", "FMAL_PAR_PART","MBEE_LISTV","LISTV","@39","FPP_HEADING","FPP_MBEE_LISTV","FPP_LISTV", "FPP_SPEC","FPP_CATEG","FPP_PROC_DECL_IN_SPEC","@40","@41","IDENTIFIER_LISTV", "@42","MBEE_MODE_PART","MODE_PART","NAME_PART","@43","VAR_PART","@44","VALUE_PART", "@45","MBEE_SPEC_PART","SPEC_PART","ONE_SPEC","@46","SPECIFIER","PROC_DECL_IN_SPEC", "@47","@48","MBEE_BEGIN_END","MBEE_PROT_PART","PROTECTION_PART","PROT_SPECIFIER", "MBEE_VIRT_PART","VIRTUAL_PART","IDENTIFIER_LIST","IDENTIFIER_LISTC","MBEE_CONSTANT", "@49","EXPRESSION","EXPRESSION_SIMP","@50","ARG_R_PT","MBEE_ARG_R_PT","ARGUMENT_LIST", NULL }; #endif static const short yyr1[] = { 0, 100, 99, 99, 102, 101, 103, 104, 101, 105, 101, 107, 108, 106, 109, 109, 110, 110, 111, 112, 113, 112, 114, 115, 115, 117, 116, 116, 116, 116, 116, 116, 116, 116, 118, 119, 118, 120, 120, 121, 122, 122, 122, 123, 123, 124, 125, 124, 127, 126, 128, 126, 129, 130, 129, 131, 131, 132, 133, 132, 134, 132, 135, 135, 136, 136, 137, 137, 139, 138, 140, 141, 138, 142, 143, 138, 138, 144, 145, 138, 138, 146, 138, 147, 148, 138, 138, 138, 138, 138, 149, 138, 150, 138, 151, 152, 138, 153, 138, 138, 138, 154, 155, 156, 155, 155, 157, 155, 158, 155, 159, 159, 159, 159, 160, 161, 161, 162, 162, 163, 163, 164, 165, 165, 166, 167, 167, 168, 169, 169, 171, 172, 173, 174, 170, 175, 175, 176, 177, 177, 178, 178, 179, 178, 178, 178, 180, 181, 181, 182, 182, 182, 183, 183, 184, 184, 184, 184, 186, 187, 185, 188, 188, 189, 188, 190, 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 193, 192, 195, 194, 197, 196, 198, 198, 199, 199, 200, 201, 200, 200, 200, 200, 202, 202, 202, 202, 204, 205, 203, 206, 206, 207, 207, 208, 208, 209, 209, 209, 209, 210, 210, 211, 212, 212, 213, 213, 214, 215, 214, 216, 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 218, 217, 217, 217, 217, 217, 219, 219, 220, 220, 221, 221 }; static const short yyr2[] = { 0, 0, 2, 3, 0, 5, 0, 0, 7, 0, 4, 0, 0, 9, 0, 2, 1, 3, 2, 0, 0, 3, 0, 1, 1, 0, 5, 1, 1, 1, 2, 1, 1, 2, 0, 0, 3, 1, 3, 2, 0, 2, 4, 2, 1, 1, 0, 3, 0, 5, 0, 6, 0, 0, 3, 1, 1, 0, 0, 4, 0, 3, 1, 1, 1, 1, 0, 1, 0, 5, 0, 0, 7, 0, 0, 8, 2, 0, 0, 6, 1, 0, 4, 0, 0, 7, 6, 4, 1, 3, 0, 4, 0, 6, 0, 0, 9, 0, 6, 1, 0, 0, 1, 0, 6, 3, 0, 4, 0, 5, 1, 3, 5, 3, 1, 1, 3, 1, 3, 1, 3, 4, 1, 3, 1, 1, 3, 3, 1, 3, 0, 0, 0, 0, 10, 0, 1, 4, 0, 1, 1, 2, 0, 4, 1, 3, 4, 0, 1, 2, 1, 3, 3, 2, 2, 2, 2, 0, 0, 0, 6, 1, 1, 0, 4, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 0, 4, 0, 4, 0, 4, 0, 1, 1, 2, 3, 0, 7, 2, 4, 6, 1, 2, 1, 1, 0, 0, 7, 0, 2, 0, 1, 3, 4, 1, 1, 2, 2, 0, 1, 3, 1, 3, 2, 4, 0, 0, 3, 1, 6, 3, 3, 4, 4, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, 3, 2, 3, 3, 3, 0, 3, 0, 3, 1, 3 }; static const short yydefact[] = { 0, 0, 100, 22, 55, 90, 28, 29, 22, 22, 0, 0, 44, 0, 80, 0, 31, 0, 0, 249, 56, 32, 0, 0, 27, 0, 0, 0, 250, 248, 247, 245, 246, 244, 0, 0, 99, 23, 0, 24, 0, 0, 117, 2, 88, 0, 0, 24, 102, 115, 3, 114, 22, 0, 9, 0, 0, 0, 43, 0, 250, 0, 225, 77, 33, 256, 0, 30, 252, 0, 0, 22, 81, 258, 235, 239, 0, 76, 57, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 222, 100, 0, 97, 0, 6, 4, 73, 0, 70, 0, 0, 253, 25, 68, 243, 94, 100, 0, 251, 92, 65, 62, 64, 63, 89, 0, 60, 118, 0, 101, 228, 255, 227, 231, 232, 0, 233, 0, 234, 236, 237, 238, 240, 241, 242, 254, 108, 0, 223, 105, 116, 91, 135, 19, 10, 16, 0, 0, 0, 0, 100, 46, 0, 78, 45, 260, 0, 0, 100, 101, 82, 0, 135, 58, 0, 87, 22, 84, 229, 230, 0, 124, 107, 119, 0, 122, 0, 103, 22, 100, 0, 136, 20, 18, 0, 7, 5, 0, 37, 40, 0, 0, 110, 71, 100, 0, 52, 0, 0, 257, 26, 69, 0, 259, 100, 66, 61, 0, 22, 109, 128, 0, 0, 0, 224, 0, 157, 98, 130, 0, 17, 19, 74, 0, 0, 0, 39, 0, 0, 0, 34, 47, 48, 53, 79, 0, 261, 95, 93, 67, 59, 86, 0, 0, 120, 0, 125, 0, 123, 222, 104, 0, 0, 0, 140, 0, 139, 144, 22, 165, 21, 8, 0, 100, 38, 0, 41, 226, 113, 22, 111, 35, 72, 100, 100, 50, 135, 85, 129, 121, 0, 0, 220, 0, 154, 155, 156, 0, 137, 157, 200, 201, 141, 0, 24, 153, 0, 182, 186, 184, 131, 166, 167, 169, 168, 11, 75, 0, 0, 100, 49, 54, 100, 100, 126, 127, 222, 157, 145, 199, 0, 152, 0, 0, 0, 188, 172, 170, 173, 175, 171, 174, 22, 42, 112, 36, 51, 96, 221, 143, 158, 162, 161, 0, 0, 0, 23, 0, 0, 132, 189, 190, 0, 177, 178, 176, 179, 181, 180, 0, 0, 0, 183, 187, 185, 0, 0, 195, 207, 191, 218, 0, 0, 22, 159, 0, 0, 158, 211, 212, 133, 208, 0, 0, 192, 12, 157, 160, 164, 193, 0, 196, 213, 214, 215, 0, 0, 219, 135, 0, 148, 150, 22, 22, 0, 0, 134, 216, 0, 209, 14, 146, 157, 149, 0, 0, 197, 188, 210, 0, 13, 151, 0, 194, 217, 15, 202, 135, 203, 205, 0, 204, 206, 0, 0, 0 }; static const short yydefgoto[] = { 441, 2, 36, 155, 154, 229, 101, 269, 340, 406, 428, 152, 153, 191, 227, 37, 46, 47, 165, 280, 317, 195, 196, 234, 40, 161, 202, 162, 281, 320, 242, 282, 41, 122, 213, 172, 123, 124, 248, 48, 166, 158, 238, 156, 271, 107, 204, 114, 127, 216, 52, 170, 167, 284, 150, 175, 200, 223, 145, 178, 201, 50, 51, 43, 180, 181, 182, 183, 253, 254, 217, 187, 267, 333, 376, 402, 188, 189, 263, 264, 295, 382, 407, 408, 265, 266, 356, 368, 395, 351, 369, 308, 309, 310, 330, 311, 332, 312, 331, 357, 358, 359, 411, 360, 423, 435, 437, 439, 388, 389, 390, 414, 415, 379, 258, 147, 184, 163, 62, 73, 109, 116, 164 }; static const short yypact[] = { 354, -28, 970, 442,-32768,-32768,-32768,-32768,-32768, 264, -35, -9,-32768, 1034,-32768, 1034,-32768, 3, 29,-32768,-32768, -32768, -15, 49,-32768, 55, 1034, 1034, 39,-32768,-32768, -32768,-32768,-32768, 595, 595,-32768,-32768, 81,-32768, 1034, 1034,-32768, 93, 133, 71, 19, 91,-32768,-32768,-32768, 117, 706, 106,-32768, 148, 149, 111,-32768, 1034,-32768, 152, 770,-32768,-32768, 135, 137,-32768,-32768, 204, 161, -32768,-32768, 166, 16, -22, 158,-32768, 189, 970, 530, 595, 159, 1034, 595, 595, 1016, 1052, 595, 595, 595, 595, 595, 595, 595, 154,-32768, 147, 794, 223,-32768, 163,-32768,-32768,-32768, 191,-32768, 9, 1034,-32768,-32768, -32768,-32768,-32768, 794, 1034,-32768,-32768,-32768,-32768,-32768, -32768,-32768, 1034,-32768,-32768, 46,-32768, -27,-32768,-32768, 198, 858, 595, 946, 595, 16, 4, 4, 4, -22, -14, -26,-32768,-32768, 167,-32768, 185,-32768,-32768, 188, 168, 200,-32768, 190, 163, 1034, 1034, 882,-32768, 192, -32768, 209, 208, 210, 212, 882,-32768,-32768, 213, 188, -32768, 1034,-32768, 706,-32768, 164, 164, 1034,-32768, 218, -32768, 222, 235, 1034,-32768,-32768, 882, 211,-32768,-32768, -32768, 163,-32768, 200, 285, 237, 82, 286, 618,-32768, -32768, 882, 290, 265, 229, 1034,-32768,-32768,-32768, 230, -32768, 882, 267,-32768, 293, 706,-32768, 250, 167, 1034, 167,-32768, 239, 87,-32768,-32768, 232,-32768, 168,-32768, 1034, 1034, 1034,-32768, 1034, 104, 301, 304,-32768,-32768, -32768,-32768, 306,-32768,-32768,-32768,-32768,-32768,-32768, 307, 1034,-32768, 257, 262, 263,-32768, 147, 269, 266, 270, 271, 273, 261,-32768, 274, 467, 128,-32768,-32768, 246, 882,-32768, 287,-32768,-32768,-32768, 706,-32768,-32768,-32768, 882, 882,-32768, 188,-32768,-32768,-32768, 1034, 1034,-32768, 268,-32768,-32768,-32768, 281,-32768, 83,-32768,-32768,-32768, 21, 272,-32768, 275,-32768,-32768,-32768,-32768,-32768, 72, -4, -1,-32768,-32768, 1034, 330, 882,-32768,-32768, 882, 882,-32768,-32768, 147, 83,-32768,-32768, 276,-32768, 97, 97, 97, 338, 294, 302, 294, 325, 302, 325, 672, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 298, 303, 305, 312, 324, 119, 313,-32768, 338,-32768, 316, -32768,-32768,-32768,-32768,-32768,-32768, 348, 328, 332,-32768, -32768,-32768, 320, 321,-32768, 15,-32768,-32768, 70, 326, -32768,-32768, 97, 311, 86, 363, 388,-32768, 15, 316, 336,-32768,-32768, 90,-32768,-32768,-32768, 316,-32768,-32768, -32768, 357, 316, 134,-32768, 188, 349,-32768, 358, 555, 672, 142, 353,-32768,-32768, 146,-32768, 414,-32768, 83, -32768, 382, 361,-32768, 338,-32768, 411,-32768,-32768, 351, -32768,-32768,-32768,-32768, 188,-32768, 421, 422,-32768,-32768, 430, 437,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 284, 248, 214,-32768, -7, -2, 0,-32768,-32768,-32768, 215,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 17,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 280, 7,-32768,-32768,-32768, -155, -44,-32768,-32768,-32768, 236, 220,-32768, 169,-32768, 203, -165,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -282,-32768, -32768,-32768,-32768, 62, 64, -260,-32768,-32768, -266,-32768, -32768,-32768, -159,-32768, -123,-32768, -290,-32768, 24,-32768, 101,-32768, -254,-32768,-32768,-32768,-32768,-32768,-32768, 73, -32768,-32768, -365,-32768, -243,-32768, 14, 1,-32768,-32768, -32768, -102 }; #define YYLAST 1146 static const short yytable[] = { 38, 53, 39, 44, 44, 212, 303, 56, 99, 39, 49, 209, 304, 169, 290, 326, 81, 82, 82, 42, 335, 337, 82, 159, 96, 404, 327, 61, 81, 63, 82, 305, 225, 412, 305, 74, 75, 3, 416, 386, 69, 70, 57, 347, 361, 58, 363, 239, 82, 64, 71, 66, 306, 44, 77, 78, 307, 246, 387, 49, 82, 76, 173, 328, 113, 352, 353, 91, 160, 92, 93, 94, 94, 105, 92, 93, 94, 38, 67, 39, 44, 346, 128, 93, 94, 131, 132, 134, 136, 137, 138, 139, 140, 141, 142, 143, 125, 130, 91, 44, 92, 93, 94, 72, 244, 148, 65, 88, 89, 90, 91, 174, 92, 93, 94, 44, 314, 396, 259, 321, 276, 168, 259, 76, 327, 259, 318, 319, 306, 307, 215, 232, 68, 391, 176, 392, 177, 171, 429, 260, 261, 80, 233, 260, 261, 81, 260, 261, 95, 398, 303, 399, 336, 338, -138, 237, 304, -147, 79, 44, 262, 374, 343, 305, 262, 344, 345, 44, 97, 277, 197, 198, 250, 349, 350, 44, 81, 82, 364, 224, 366, 49, 98, 100, 306, 307, 214, 334, 44, 339, 102, 103, 218, 118, 104, 119, 120, 391, 222, 417, 44, 108, 121, 44, 106, 391, 49, 424, 82, 391, 81, 426, 362, 44, 110, 365, 83, 44, 111, 84, 85, 86, 87, 49, 88, 89, 90, 91, 112, 92, 93, 94, 115, 316, 255, 117, 129, 144, 146, 149, 151, 418, 82, 157, 179, 197, 273, 274, 185, 275, 84, 85, 86, 87, 186, 88, 89, 90, 91, 190, 92, 93, 94, 192, 301, 218, 302, 193, 205, 203, 436, 206, 44, 6, 7, 54, 226, 207, 44, 208, 211, 219, 44, 44, 49, 85, 86, 87, 220, 88, 89, 90, 91, 16, 92, 93, 94, 17, 221, 230, 231, 235, 255, 323, 240, 241, 243, 245, 247, 249, 21, 22, 23, 251, 268, 24, 257, 278, 44, 279, 283, 44, 44, 285, 287, 288, 354, 289, 296, 341, 292, 355, 291, 302, 293, 294, -142, 297, 367, 313, 39, 55, 315, -22, 325, 324, 342, 6, 7, -198, 306, 354, 329, 348, -1, 1, 355, -1, 302, 307, 305, -163, -1, -1, -1, -1, 373, 16, 370, 298, 371, 17, -1, -1, 394, -1, -1, 372, 375, -1, -22, -1, -1, -1, 21, 22, 23, -1, 299, 24, 380, -1, -1, 378, 381, 383, -1, 384, 385, -1, -1, -1, -1, 393, 397, -1, 400, -1, 301, 422, 302, 39, 401, 405, -1, 413, 419, 425, 354, -1, -1, 420, 427, 355, 430, 302, 431, 433, 434, 438, 442, -1, -1, -1, -1, -1, -1, 443, 440, 194, 228, 256, -100, 270, -1, 4, 272, 210, -1, 432, 5, 6, 7, 8, 286, 252, 409, 322, 410, 377, 9, 10, 403, 11, 12, 0, 0, 13, 0, 14, 15, 16, 0, 0, 0, 17, 6, 7, 0, 18, 19, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 0, 45, 24, 0, 25, 16, 0, 298, 0, 17, 0, 26, 0, 0, 0, 0, -100, 27, 0, 0, 0, 0, 21, 22, 23, 0, 299, 24, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 126, 34, -83, 0, -83, 35, 0, -83, -83, -83, -83, 0, 300, 0, 0, -83, 0, -83, -83, 0, -83, -83, 0, 0, -83, 0, -83, -83, -83, 0, 0, 0, -83, 6, 7, 0, -83, -83, 0, 0, 0, -83, 0, 0, -83, -83, -83, -83, 0, -83, -83, 0, -83, 16, 0, 298, 0, 17, 0, -83, 0, 0, 0, 0, -83, -83, 0, 0, 0, 0, 21, 22, 23, 0, 299, 24, -83, -83, -83, -83, -83, -83, 0, 0, 0, 0, 0, 0, 236, -83, 4, 0, -22, -83, 0, 5, 6, 7, 8, 0, 421, 18, 19, -90, 0, 9, 10, 0, 11, 12, 0, 0, 13, 0, 14, 15, 16, 25, 0, 0, 17, 0, 0, 0, 18, 19, 0, 0, 0, -22, 27, 0, 20, 21, 22, 23, 0, 45, 24, 0, 25, 60, 29, 30, 31, 32, 33, 26, 0, 0, 6, 7, -90, 27, 34, 0, 0, 0, 35, 0, 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 16, 0, 0, 0, 17, 0, 0, 34, 4, 0, 0, 35, 0, 5, 6, 7, 8, 21, 22, 23, 0, -100, 24, 9, 10, 0, 11, 12, 0, 0, 13, 0, 14, 15, 16, 0, 0, 0, 17, 0, 0, 0, 18, 19, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 0, 45, 24, 0, 25, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, -100, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 34, 4, 0, -22, 35, 0, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 9, 10, 82, 11, 12, 0, 0, 13, 0, 14, 15, 16, 0, 0, 0, 17, 0, 0, 0, 18, 19, 0, 0, 0, -22, 0, 0, 20, 21, 22, 23, 0, 45, 24, 0, 25, 0, 0, 0, 0, 0, 83, 26, 0, 84, 85, 86, 87, 27, 88, 89, 90, 91, 0, 92, 93, 94, 0, 81, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 34, 4, 0, -22, 35, 0, 199, 6, 7, 8, 0, 0, 0, 0, 0, 0, 9, 10, 82, 11, 12, 0, 0, 13, 0, 14, 15, 16, 0, 0, 0, 17, 0, 0, 0, 18, 19, 0, 0, 0, -22, 0, 0, 20, 21, 22, 23, 0, 45, 24, 0, 25, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 86, 87, 27, 88, 89, 90, 91, 0, 92, 93, 94, 0, 81, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 34, 4, 0, 0, 35, 0, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 9, 10, 82, 11, 12, 0, 0, 13, 0, 14, 15, 16, 0, 0, 0, 17, 0, 0, 0, 18, 19, 0, 0, 0, -22, 0, 0, 20, 21, 22, 23, 0, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, 26, 133, 0, 0, 0, 87, 27, 88, 89, 90, 91, 0, 92, 93, 94, 0, 0, 28, 29, 30, 31, 32, 33, 18, 19, 0, 0, 0, 0, 59, 34, 0, 0, 0, 35, 0, 0, 0, 0, 25, 0, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 25, 0, 18, 19, 0, 0, 60, 29, 30, 31, 32, 33, 0, 27, 0, 0, 0, 135, 25, 34, 0, 0, 0, 35, 60, 29, 30, 31, 32, 33, 0, 27, 0, 0, 0, 0, 0, 34, 0, 0, 0, 35, 60, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 35 }; static const short yycheck[] = { 2, 8, 2, 2, 3, 170, 266, 9, 52, 9, 3, 166, 266, 115, 257, 297, 12, 44, 44, 2, 310, 311, 44, 14, 5, 390, 5, 13, 12, 15, 44, 35, 187, 398, 35, 34, 35, 65, 403, 24, 26, 27, 77, 325, 334, 54, 336, 202, 44, 46, 11, 66, 56, 52, 40, 41, 57, 212, 43, 52, 44, 42, 16, 42, 71, 331, 332, 94, 59, 96, 97, 98, 98, 59, 96, 97, 98, 79, 29, 79, 79, 324, 81, 97, 98, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 79, 83, 94, 98, 96, 97, 98, 64, 206, 98, 77, 91, 92, 93, 94, 65, 96, 97, 98, 114, 271, 383, 35, 284, 16, 114, 35, 42, 5, 35, 281, 282, 56, 57, 174, 49, 77, 63, 133, 65, 135, 123, 420, 56, 57, 8, 60, 56, 57, 12, 56, 57, 77, 63, 410, 65, 311, 312, 67, 199, 410, 67, 65, 158, 77, 42, 317, 35, 77, 320, 321, 166, 77, 65, 156, 157, 216, 76, 77, 174, 12, 44, 337, 186, 339, 174, 65, 77, 56, 57, 172, 310, 187, 312, 42, 42, 178, 4, 83, 6, 7, 63, 184, 65, 199, 66, 13, 202, 52, 63, 199, 65, 44, 63, 12, 65, 335, 212, 77, 338, 83, 216, 14, 86, 87, 88, 89, 216, 91, 92, 93, 94, 67, 96, 97, 98, 66, 277, 220, 77, 77, 83, 91, 16, 77, 406, 44, 52, 77, 231, 232, 233, 63, 235, 86, 87, 88, 89, 66, 91, 92, 93, 94, 91, 96, 97, 98, 63, 266, 251, 266, 77, 59, 77, 435, 63, 271, 9, 10, 11, 65, 67, 277, 67, 67, 63, 281, 282, 277, 87, 88, 89, 66, 91, 92, 93, 94, 29, 96, 97, 98, 33, 63, 14, 63, 15, 288, 289, 14, 40, 77, 77, 41, 16, 46, 47, 48, 63, 82, 51, 77, 16, 317, 15, 14, 320, 321, 16, 67, 63, 333, 64, 67, 315, 64, 333, 63, 333, 64, 64, 63, 63, 340, 93, 340, 77, 55, 5, 63, 77, 16, 9, 10, 77, 56, 358, 77, 77, 0, 1, 358, 3, 358, 57, 35, 63, 8, 9, 10, 11, 42, 29, 65, 31, 65, 33, 18, 19, 381, 21, 22, 65, 65, 25, 42, 27, 28, 29, 46, 47, 48, 33, 50, 51, 42, 37, 38, 77, 66, 63, 42, 77, 77, 45, 46, 47, 48, 77, 93, 51, 43, 53, 410, 411, 410, 411, 24, 77, 60, 58, 67, 64, 425, 65, 66, 63, 8, 425, 42, 425, 65, 16, 77, 8, 0, 77, 78, 79, 80, 81, 82, 0, 16, 155, 192, 221, 0, 229, 90, 3, 231, 167, 94, 425, 8, 9, 10, 11, 251, 219, 394, 288, 394, 358, 18, 19, 389, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, 9, 10, -1, 37, 38, -1, -1, -1, -1, -1, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, 29, -1, 31, -1, 33, -1, 60, -1, -1, -1, -1, 65, 66, -1, -1, -1, -1, 46, 47, 48, -1, 50, 51, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, 1, 90, 3, -1, 5, 94, -1, 8, 9, 10, 11, -1, 76, -1, -1, 16, -1, 18, 19, -1, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, 9, 10, -1, 37, 38, -1, -1, -1, 42, -1, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, 29, -1, 31, -1, 33, -1, 60, -1, -1, -1, -1, 65, 66, -1, -1, -1, -1, 46, 47, 48, -1, 50, 51, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, 1, 90, 3, -1, 5, 94, -1, 8, 9, 10, 11, -1, 76, 37, 38, 16, -1, 18, 19, -1, 21, 22, -1, -1, 25, -1, 27, 28, 29, 53, -1, -1, 33, -1, -1, -1, 37, 38, -1, -1, -1, 42, 66, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, 77, 78, 79, 80, 81, 82, 60, -1, -1, 9, 10, 65, 66, 90, -1, -1, -1, 94, -1, -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, 29, -1, -1, -1, 33, -1, -1, 90, 3, -1, -1, 94, -1, 8, 9, 10, 11, 46, 47, 48, -1, 16, 51, 18, 19, -1, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, -1, -1, -1, 37, 38, -1, -1, -1, -1, -1, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, 90, 3, -1, 5, 94, -1, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, 18, 19, 44, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, -1, -1, -1, 37, 38, -1, -1, -1, 42, -1, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, -1, -1, -1, -1, -1, 83, 60, -1, 86, 87, 88, 89, 66, 91, 92, 93, 94, -1, 96, 97, 98, -1, 12, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, 90, 3, -1, 5, 94, -1, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, 18, 19, 44, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, -1, -1, -1, 37, 38, -1, -1, -1, 42, -1, -1, 45, 46, 47, 48, -1, 50, 51, -1, 53, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, 88, 89, 66, 91, 92, 93, 94, -1, 96, 97, 98, -1, 12, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, 90, 3, -1, -1, 94, -1, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, 18, 19, 44, 21, 22, -1, -1, 25, -1, 27, 28, 29, -1, -1, -1, 33, -1, -1, -1, 37, 38, -1, -1, -1, 42, -1, -1, 45, 46, 47, 48, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, 60, 15, -1, -1, -1, 89, 66, 91, 92, 93, 94, -1, 96, 97, 98, -1, -1, 77, 78, 79, 80, 81, 82, 37, 38, -1, -1, -1, -1, 25, 90, -1, -1, -1, 94, -1, -1, -1, -1, 53, -1, 37, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, 53, -1, 37, 38, -1, -1, 77, 78, 79, 80, 81, 82, -1, 66, -1, -1, -1, 52, 53, 90, -1, -1, -1, 94, 77, 78, 79, 80, 81, 82, -1, 66, -1, -1, -1, -1, -1, 90, -1, -1, -1, 94, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, 90, -1, -1, -1, 94 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT return(0) #define YYABORT return(1) #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif #ifndef YYPARSE_RETURN_TYPE #define YYPARSE_RETURN_TYPE int #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ YYPARSE_RETURN_TYPE yyparse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 196 "/usr/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ YYPARSE_RETURN_TYPE yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 176 "parser.y" { categ=CLOCAL; mout(MBLOCK); beginBlock(KBLOKK);separat_comp=FALSE;; break;} case 2: #line 178 "parser.y" { endBlock(NULL,CCNO); mout(MENDBLOCK);; break;} case 4: #line 184 "parser.y" { MBEENEWBLOCK(); kind=KPROC;; break;} case 6: #line 191 "parser.y" { MBEENEWBLOCK(); type=TNOTY; kind=KPROC; if(yyvsp[-1].ident==Ckind)categ=CCPROC;else yerror (1); ysensitive=sensitive; sensitive=ON;; break;} case 7: #line 198 "parser.y" { yyval.ident=yyvsp[0].ident; sensitive=ysensitive;; break;} case 8: #line 201 "parser.y" { categ=CLOCAL;; break;} case 9: #line 204 "parser.y" { MBEENEWBLOCK(); kind=KCLASS;; break;} case 11: #line 211 "parser.y" { if(yyvsp[0].token!=HIS)yerror (2);; break;} case 12: #line 214 "parser.y" { regDecl(yyvsp[0].ident, type, KPROC, CCPROC); beginBlock(kind);; break;} case 13: #line 217 "parser.y" { categ=CLOCAL; endBlock(yyvsp[-8].tval==NULL?yyvsp[-9].ident:tag(yyvsp[-8].tval),CCCPROC);; break;} case 18: #line 245 "parser.y" { lesinn_external_spec(yyvsp[-1].ident,yyvsp[0].tval, kind);; break;} case 19: #line 247 "parser.y" { yyval.tval=NULL;; break;} case 20: #line 248 "parser.y" { if(yyvsp[0].token!=HEQ)yerror (9); external=TRUE;; break;} case 21: #line 250 "parser.y" { yyval.tval=yyvsp[0].tval;external=FALSE;; break;} case 22: #line 253 "parser.y" { type=TNOTY;; break;} case 25: #line 260 "parser.y" { prefquantident=yyvsp[0].ident; type=TREF;; break;} case 27: #line 263 "parser.y" { type=TTEXT;; break;} case 28: #line 264 "parser.y" { type=TBOOL;; break;} case 29: #line 265 "parser.y" { type=TCHAR;; break;} case 30: #line 266 "parser.y" { type=TSHORT;; break;} case 31: #line 267 "parser.y" { type=TINTG;; break;} case 32: #line 268 "parser.y" { type=TREAL;; break;} case 33: #line 269 "parser.y" { type=TLONG;; break;} case 35: #line 282 "parser.y" { OBSBLOCK(); mout(MELSE);; break;} case 36: #line 283 "parser.y" { MBEEENDBLOCK();; break;} case 37: #line 285 "parser.y" { mout(MENDSEP); mout(MLISTSEP);; break;} case 38: #line 289 "parser.y" { mout(MLISTSEP);; break;} case 41: #line 296 "parser.y" { mout(MFORWHILE);; break;} case 42: #line 300 "parser.y" { mout(MUNTIL); mout(MSTEP);; break;} case 46: #line 308 "parser.y" { beginBlock(KCON); mout(MDO); OBSBLOCK(); ; break;} case 47: #line 310 "parser.y" { endBlock(NULL,CCNO); MBEEENDBLOCK(); mout(MENDDO);; break;} case 48: #line 315 "parser.y" { beginBlock(KCON); mout(MIDENTIFIER); OBSBLOCK(); moutId(yyvsp[-1].ident); mout(MWHEN);; break;} case 49: #line 318 "parser.y" { endBlock(NULL,CCNO); MBEEENDBLOCK(); mout(MENDWHEN);; break;} case 50: #line 323 "parser.y" { beginBlock(KCON); mout(MIDENTIFIER); OBSBLOCK(); moutId(yyvsp[-1].ident); mout(MWHEN);; break;} case 51: #line 326 "parser.y" { endBlock(NULL,CCNO); MBEEENDBLOCK(); mout(MENDWHEN);; break;} case 53: #line 330 "parser.y" {OBSBLOCK(); mout(MOTHERWISE);; break;} case 54: #line 332 "parser.y" {MBEEENDBLOCK();mout(MENDOTHERWISE);; break;} case 55: #line 334 "parser.y" { mout(MBOOLEANKONST); moutIval(FALSE);; break;} case 56: #line 336 "parser.y" { mout(MBOOLEANKONST); moutIval(TRUE);; break;} case 57: #line 339 "parser.y" { mout(MCHARACTERKONST); moutIval(DIRECT); mout(MINTEGERKONST); moutIval(0); mout(MNONE); mout(MBOOLEANKONST); moutIval(FALSE);; break;} case 58: #line 346 "parser.y" { mout(MNONE);; break;} case 60: #line 348 "parser.y" { mout(MINTEGERKONST); moutIval(0);; break;} case 61: #line 350 "parser.y" { mout(MBOOLEANKONST); moutIval(FALSE);; break;} case 62: #line 353 "parser.y" { mout(MCHARACTERKONST); moutIval(AT);; break;} case 63: #line 355 "parser.y" { mout(MCHARACTERKONST); moutIval(DELAYS);; break;} case 64: #line 358 "parser.y" { mout(MCHARACTERKONST); moutIval(BEFORE);; break;} case 65: #line 360 "parser.y" { mout(MCHARACTERKONST); moutIval(AFTER);; break;} case 66: #line 363 "parser.y" { mout(MBOOLEANKONST); moutIval(FALSE);; break;} case 67: #line 365 "parser.y" { mout(MBOOLEANKONST); moutIval(TRUE);; break;} case 68: #line 371 "parser.y" { STOPOBSBLOCK(); mout(MWHILE); OBSBLOCK();; break;} case 69: #line 373 "parser.y" { MBEEENDBLOCK(); mout(MENDWHILE); yyval.stat_decl=STATEMENT;; break;} case 70: #line 377 "parser.y" { STOPOBSBLOCK(); mout(MIF); OBSBLOCK();; break;} case 71: #line 379 "parser.y" { MBEEENDBLOCK();; break;} case 72: #line 380 "parser.y" { mout(MENDIF); yyval.stat_decl=STATEMENT;; break;} case 73: #line 384 "parser.y" { STOPOBSBLOCK(); mout(MIDENTIFIER); moutId(yyvsp[-1].ident);; break;} case 74: #line 387 "parser.y" { beginBlock(KFOR); if(yyvsp[-3].token==HASSIGNVALUE) mout(MFOR); else mout(MFORR); OBSBLOCK(); mout(MFORDO);; break;} case 75: #line 391 "parser.y" { MBEEENDBLOCK(); endBlock(NULL,CCNO); mout(MENDFOR); yyval.stat_decl=STATEMENT;; break;} case 76: #line 395 "parser.y" { mout(MGOTO); STOPOBSBLOCK(); yyval.stat_decl=STATEMENT;; break;} case 77: #line 398 "parser.y" { mout(MINSPECT); STOPOBSBLOCK(); beginBlock(KINSP);; break;} case 78: #line 402 "parser.y" { endBlock(NULL,CCNO);; break;} case 79: #line 403 "parser.y" { mout(MENDINSPECT); yyval.stat_decl=STATEMENT;; break;} case 80: #line 405 "parser.y" { STOPOBSBLOCK(); mout(MINNER); regInner(); yyval.stat_decl=STATEMENT;; break;} case 81: #line 409 "parser.y" { STOPOBSBLOCK(); regDecl(yyvsp[-1].ident, TLABEL, KSIMPLE, categ); mout(MLABEL); moutId(yyvsp[-1].ident); mout(MENDLABEL);; break;} case 82: #line 413 "parser.y" { if(yyvsp[0].stat_decl<=DECLARATION) { yerror (27); yyval.stat_decl=DECLARATION;} else yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 83: #line 419 "parser.y" { yyval.ident=yyvsp[-1].ident; ; break;} case 84: #line 421 "parser.y" { mout(MPRBLOCK); prefquantident=yyvsp[-3].ident; beginBlock(KPRBLK);; break;} case 85: #line 425 "parser.y" { endBlock(NULL,CCNO); mout(MENDPRBLOCK); yyval.stat_decl=STATEMENT;; break;} case 86: #line 428 "parser.y" { yyval.stat_decl=STATEMENT; endBlock(NULL,CCNO); mout(MENDPRBLOCK);; break;} case 87: #line 431 "parser.y" { yyval.stat_decl=STATEMENT; endBlock(NULL,CCNO); mout(MENDPRBLOCK);; break;} case 88: #line 435 "parser.y" { STOPOBSBLOCK(); yyval.stat_decl=STATEMENT; mout(MENDASSIGN);; break;} case 89: #line 438 "parser.y" { yyval.stat_decl=STATEMENT; mout(MENDSEP); mout(MARGUMENTSEP); mout(MARGUMENTSEP); mout(MARGUMENTSEP); mout(MARGUMENTSEP); mout(MARGUMENTSEP); mout(MARGUMENTSEP); mout(MARGUMENT); moutId(activateid); mout(MENDASSIGN);; break;} case 90: #line 450 "parser.y" { STOPOBSBLOCK(); OBSBLOCK();; break;} case 91: #line 453 "parser.y" { MBEEENDBLOCK(); yyval.stat_decl=STATEMENT;; break;} case 92: #line 456 "parser.y" { MBEENEWBLOCK(); mout(MPROCEDURE); regDecl(yyvsp[0].ident, type, KPROC, categ); beginBlock(KPROC);; break;} case 93: #line 459 "parser.y" { endBlock(NULL,CCNO); yyval.stat_decl=DECLARATION; mout(MENDPROCEDURE);; break;} case 94: #line 464 "parser.y" { yyval.ident=yyvsp[-2].ident; ; break;} case 95: #line 467 "parser.y" { prefquantident=yyvsp[-5].ident; mout(MCLASS); regDecl(yyvsp[0].ident, TNOTY, KCLASS, categ); beginBlock(KCLASS);; break;} case 96: #line 472 "parser.y" { endBlock(NULL,CCNO); yyval.stat_decl=DECLARATION; mout(MENDCLASS);; break;} case 97: #line 477 "parser.y" { prefquantident=0; MBEENEWBLOCK(); mout(MCLASS); regDecl(yyvsp[0].ident, TNOTY, KCLASS, categ); beginBlock(KCLASS);; break;} case 98: #line 482 "parser.y" { endBlock(NULL,CCNO); yyval.stat_decl=DECLARATION; mout(MENDCLASS);; break;} case 99: #line 484 "parser.y" { yyval.stat_decl=EXTDECLARATION;; break;} case 100: #line 485 "parser.y" { STOPOBSBLOCK(); yyval.stat_decl=EMPTYSTATEMENT;; break;} case 101: #line 487 "parser.y" { MBEENEWBLOCK(); kind=KCLASS; if(yyvsp[0].ident==simsetident && findDecl(simsetident,cblock,FALSE)==NULL) lesinn_external_spec(simsetident, SIMSETATRFILE, kind); if(yyvsp[0].ident==simulationident && findDecl( simulationident,cblock,FALSE)==NULL) lesinn_external_spec(simulationident, SIMULATIONATRFILE, kind); if((yyvsp[0].ident==fileident && findDecl( fileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==outfileident && findDecl( outfileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==infileident && findDecl( infileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==directfileident && findDecl( directfileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==printfileident && findDecl( printfileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==bytefileident && findDecl( bytefileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==inbytefileident && findDecl( inbytefileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==outbytefileident && findDecl( outbytefileident,cblock,FALSE)==NULL) || (yyvsp[0].ident==directbytefileident && findDecl( directbytefileident,cblock,FALSE)==NULL)) lesinn_external_spec(fileident, FILEATRFILE, kind);; break;} case 103: #line 523 "parser.y" { MBEENEWBLOCK(); kind=KSIMPLE; regDecl(yyvsp[-2].ident, type, KSIMPLE, categ); categ=CLOCAL;; break;} case 104: #line 527 "parser.y" { yyval.stat_decl=DECLARATION;; break;} case 105: #line 531 "parser.y" { MBEENEWBLOCK(); regDecl(yyvsp[-1].ident, type, KSIMPLE, categ); categ=CLOCAL; yyval.stat_decl=DECLARATION;; break;} case 106: #line 535 "parser.y" { MBEENEWBLOCK(); kind=KARRAY;; break;} case 107: #line 537 "parser.y" { yyval.stat_decl=DECLARATION;; break;} case 108: #line 540 "parser.y" { MBEENEWBLOCK(); mout(MIDENTIFIER); moutId(yyvsp[-1].ident); regDecl(yyvsp[-1].ident, TLABEL, KARRAY, categ);; break;} case 109: #line 543 "parser.y" { yyval.stat_decl=DECLARATION; mout(MSWITCH); mout(MENDSWITCH);; break;} case 110: #line 547 "parser.y" { if(yyvsp[0].stat_decl<=DECLARATION)yerror (29);; break;} case 114: #line 552 "parser.y" { if(yyvsp[0].stat_decl<=DECLARATION)yerror (28); yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 115: #line 555 "parser.y" { yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 116: #line 558 "parser.y" { if(yyvsp[-2].stat_decl>=STATEMENT && yyvsp[0].stat_decl<=DECLARATION) yerror (26); yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 117: #line 562 "parser.y" { if(yyvsp[0].stat_decl==DECLARATION) {separat_comp=TRUE;gettimestamp();} yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 118: #line 566 "parser.y" { if(yyvsp[-2].stat_decl>=STATEMENT && yyvsp[0].stat_decl<=DECLARATION) yerror (26);else if(yyvsp[-2].stat_decl>=STATEMENT && yyvsp[0].stat_decl!=EMPTYSTATEMENT)yerror (25); if(separat_comp && yyvsp[0].stat_decl==STATEMENT) yerror (25); if(yyvsp[0].stat_decl==DECLARATION && !separat_comp) {separat_comp=TRUE;gettimestamp();} yyval.stat_decl=yyvsp[0].stat_decl;; break;} case 121: #line 584 "parser.y" { mout(MARRAY); mout(MENDARRAY); setArrayDim(yyvsp[-1].arrdim);; break;} case 122: #line 588 "parser.y" { mout(MENDSEP); mout(MARRAYSEP);; break;} case 123: #line 593 "parser.y" { mout(MARRAYSEP);; break;} case 124: #line 595 "parser.y" { mout(MIDENTIFIER); moutId(yyvsp[0].ident); regDecl(yyvsp[0].ident, type, kind, categ); if(lastArray==NULL) lastArray=cblock->lastparloc;; break;} case 125: #line 601 "parser.y" { mout(MENDSEP); mout(MBOUNDSEP); yyval.arrdim=1;; break;} case 126: #line 606 "parser.y" { mout(MBOUNDSEP); yyval.arrdim=yyvsp[0].arrdim+1;; break;} case 127: #line 611 "parser.y" { mout(MBOUNDPARSEP);; break;} case 128: #line 613 "parser.y" { mout(MENDSEP); mout(MSWITCHSEP);; break;} case 129: #line 617 "parser.y" { mout(MSWITCHSEP);; break;} case 130: #line 619 "parser.y" { kind=KNOKD;; break;} case 131: #line 620 "parser.y" { categ=CSPEC;; break;} case 132: #line 621 "parser.y" { kind=KNOKD;; break;} case 133: #line 622 "parser.y" { categ=CVIRT;; break;} case 134: #line 624 "parser.y" { categ=CLOCAL;; break;} case 140: #line 635 "parser.y" { regDecl(yyvsp[0].ident, type, KNOKD, CDEFLT);; break;} case 141: #line 636 "parser.y" { regDecl(varargsid, TVARARGS, KNOKD, categ);; break;} case 142: #line 637 "parser.y" { regDecl(yyvsp[0].ident, type, KNOKD, CDEFLT);; break;} case 149: #line 649 "parser.y" { regDecl(varargsid, TVARARGS, KNOKD, categ);; break;} case 152: #line 655 "parser.y" { regDecl(yyvsp[0].ident, type, kind, categ);; break;} case 154: #line 659 "parser.y" { categ=CNAME;; break;} case 155: #line 661 "parser.y" { categ=CVALUE;; break;} case 156: #line 663 "parser.y" { categ=CVAR;; break;} case 157: #line 664 "parser.y" { categ=CDEFLT;; break;} case 158: #line 668 "parser.y" { yyval.ival=categ; regDecl(yyvsp[0].ident, type, KPROC, categ); beginBlock(KPROC);; break;} case 159: #line 672 "parser.y" { categ=yyvsp[-1].ival; /* M} settes tilbake*/; break;} case 160: #line 673 "parser.y" { endBlock(NULL,CCNO);; break;} case 161: #line 675 "parser.y" { regDecl(yyvsp[0].ident, type, kind, categ);; break;} case 162: #line 676 "parser.y" { regDecl(varargsid, TVARARGS, kind, categ);; break;} case 163: #line 677 "parser.y" { regDecl(yyvsp[0].ident, type, kind, categ);; break;} case 182: #line 699 "parser.y" { categ=CNAME;; break;} case 184: #line 703 "parser.y" { categ=CVAR;; break;} case 186: #line 707 "parser.y" { categ=CVALUE;; break;} case 193: #line 718 "parser.y" { if(yyvsp[0].token!=HIS) yerror (8);; break;} case 196: #line 722 "parser.y" { yerror (45);; break;} case 197: #line 725 "parser.y" { yerror (45);; break;} case 198: #line 727 "parser.y" { kind=KSIMPLE;; break;} case 199: #line 729 "parser.y" { kind=KARRAY;; break;} case 200: #line 730 "parser.y" { type=TLABEL; kind=KSIMPLE;; break;} case 201: #line 732 "parser.y" { type=TLABEL; kind=KARRAY;; break;} case 202: #line 737 "parser.y" { yyval.ival=categ; regDecl(yyvsp[0].ident, type, KPROC, categ); beginBlock(KPROC);; break;} case 203: #line 741 "parser.y" { categ=yyvsp[-1].ival; /* M} settes tilbake*/; break;} case 204: #line 743 "parser.y" { endBlock(NULL,CCNO);; break;} case 211: #line 756 "parser.y" { categ=CHIDEN;; break;} case 212: #line 757 "parser.y" { categ=CPROT;; break;} case 213: #line 759 "parser.y" { categ=CHIPRO;; break;} case 214: #line 761 "parser.y" { categ=CHIPRO;; break;} case 218: #line 770 "parser.y" { regDecl(yyvsp[0].ident, type, kind, categ);; break;} case 219: #line 772 "parser.y" { regDecl(yyvsp[0].ident, type, kind, categ);; break;} case 220: #line 775 "parser.y" { regDecl(yyvsp[-1].ident, type, kind, categ); categ=CLOCAL;; break;} case 221: #line 779 "parser.y" { regDecl(yyvsp[-1].ident, type, kind, categ); categ=CLOCAL;; break;} case 223: #line 784 "parser.y" { MBEENEWBLOCK(); if(yyvsp[0].token!=HEQ) yerror (8); if(type==TREF)yerror (7); categ=CCONSTU; mout(MIDENTIFIER); moutId(yyvsp[-1].token);; break;} case 224: #line 790 "parser.y" { mout(MASSIGN); mout(MCONST);; break;} case 225: #line 795 "parser.y" {; break;} case 226: #line 801 "parser.y" { mout(MELSEE); mout(MIFE);; break;} case 227: #line 806 "parser.y" { if(yyvsp[-1].token==HASSIGNREF)mout(MASSIGNR); else mout(MASSIGN);yyval.ident=NULL;; break;} case 228: #line 812 "parser.y" { mout(MCONC);yyval.ident=NULL;; break;} case 229: #line 816 "parser.y" { mout(MORELSEE);yyval.ident=NULL;; break;} case 230: #line 820 "parser.y" { mout(MANDTHENE);yyval.ident=NULL;; break;} case 231: #line 822 "parser.y" { mout(MEQV);yyval.ident=NULL;; break;} case 232: #line 824 "parser.y" { mout(MIMP);yyval.ident=NULL;; break;} case 233: #line 826 "parser.y" { mout(MOR);yyval.ident=NULL;; break;} case 234: #line 828 "parser.y" { mout(MAND);yyval.ident=NULL;; break;} case 235: #line 829 "parser.y" { mout(MNOT);yyval.ident=NULL;; break;} case 236: #line 833 "parser.y" { switch(yyvsp[-1].token) { case HEQ: mout(MEQ);break; case HNE: mout(MNE);break; case HLT: mout(MLT);break; case HLE: mout(MLE);break; case HGT: mout(MGT);break; case HGE: mout(MGE);break; }yyval.ident=NULL;; break;} case 237: #line 844 "parser.y" { if(yyvsp[-1].token==HNER) mout(MNER); else mout(MEQR);yyval.ident=NULL;; break;} case 238: #line 849 "parser.y" { if(yyvsp[-1].token==HIS) mout(MIS); else mout(MINS);yyval.ident=NULL;; break;} case 239: #line 853 "parser.y" { if(yyvsp[-1].token==HADD) mout(MUADD); else mout(MUSUB);yyval.ident=NULL;; break;} case 240: #line 858 "parser.y" { if(yyvsp[-1].token==HADD) mout(MADD); else mout(MSUB);yyval.ident=NULL;; break;} case 241: #line 863 "parser.y" { if(yyvsp[-1].token==HMUL) mout(MMUL); else if(yyvsp[-1].token==HDIV) mout(MDIV); else mout(MINTDIV);yyval.ident=NULL;; break;} case 242: #line 868 "parser.y" { mout(MPRIMARY);yyval.ident=NULL;; break;} case 243: #line 870 "parser.y" { mout(MNOOP);yyval.ident=NULL;; break;} case 244: #line 871 "parser.y" { mout(MTEXTKONST); moutTval(yyvsp[0].tval);yyval.ident=NULL;; break;} case 245: #line 873 "parser.y" { mout(MCHARACTERKONST); moutIval(yyvsp[0].ival);yyval.ident=NULL;; break;} case 246: #line 875 "parser.y" { mout(MREALKONST); moutRval(yyvsp[0].rval);yyval.ident=NULL;; break;} case 247: #line 877 "parser.y" { mout(MINTEGERKONST); moutIval(yyvsp[0].ival);yyval.ident=NULL;; break;} case 248: #line 879 "parser.y" { mout(MBOOLEANKONST); moutIval(yyvsp[0].ival);yyval.ident=NULL;; break;} case 249: #line 881 "parser.y" { mout(MNONE);yyval.ident=NULL;; break;} case 250: #line 883 "parser.y" { yyval.ident=yyvsp[0].ident;; break;} case 252: #line 885 "parser.y" { mout(MTHIS); moutId(yyvsp[0].ident);yyval.ident=NULL;; break;} case 253: #line 889 "parser.y" { mout(MNEWARG); moutId(yyvsp[-1].ident);yyval.ident=NULL;; break;} case 254: #line 893 "parser.y" { mout(MDOT);yyval.ident=NULL;; break;} case 255: #line 895 "parser.y" { mout(MQUA); moutId(yyvsp[0].ident);yyval.ident=NULL;; break;} case 256: #line 898 "parser.y" { mout(MENDSEP);; break;} case 258: #line 902 "parser.y" { mout(MIDENTIFIER); moutId(yyvsp[0].ident); yyval.ident=yyvsp[0].ident;; break;} case 259: #line 906 "parser.y" { mout(MARGUMENT); moutId(yyvsp[-3].ident);; break;} case 260: #line 909 "parser.y" { mout(MENDSEP); mout(MARGUMENTSEP);; break;} case 261: #line 913 "parser.y" { mout(MARGUMENTSEP);; break;} } /* the action file gets copied in in place of this dollarsign */ #line 498 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; } #line 915 "parser.y" /****************************************************************************** YYERROR */ /* Oppdages feil så blir denne procedyren kalt */ yyerror (s)char s[]; { yaccerror=TRUE; #if 0 if(s[0]=='s')yerror (13);else if(s[0]=='y')yerror (14);else yerror (16); #else yerror (21,s); #endif mout(MERROR); } /****************************************************************************** YLEX */ #ifdef yylex #undef yylex ylex() { long i; i=yylex(); #ifdef DEBUG if(option_lex) { printf("line: %ld yylex:",lineno); print_lexsymbol(i,&yylval); printf("\n"); } #endif return(i); } #define yylex ylex #endif /****************************************************************************** INIT_PARSER */ init_parser() { activateid=tag("activat"); varargsid=tag("..."); Ckind=tag("C"); simsetident=tag("SIMSET"); simulationident=tag("SIMULATION"); fileident=tag("FILE"); imagefileident=tag("IMAGEFILE"); outfileident=tag("OUTFILE"); infileident=tag("INFILE"); directfileident=tag("DIRECTFILE"); printfileident=tag("PRINTFILE"); bytefileident=tag("BYTEFILE"); inbytefileident=tag("INBYTEFILE"); outbytefileident=tag("OUTBYTEFILE"); directbytefileident=tag("DIRECTBYTEFILE"); obstack_init (&osBlock); blockp= (struct blockstack *) obstack_alloc (&osBlock,sizeof (struct blockstack)); blockp->prev= NULL; blockp->rem=FALSE; }