/* A Bison parser, made from ../kimwy.y by GNU Bison version 1.25 */ #define YYBISON 1 /* Identify Bison output. */ #define T_ID 258 #define T_INT 259 #define T_CNEWLINES 260 #define T_CLINE 261 #define T_CEXPRESSION 262 #define T_DOLLARVAR 263 #define T_INCLUDE 264 #define T_INCLUDESTART 265 #define T_INCLUDEEND 266 #define T_LIST 267 #define T_ARROW 268 #define T_STATIC 269 #define T_WITH 270 #define T_FOREACH 271 #define T_FOREACH_AFTER 272 #define T_DEFAULT 273 #define T_UNPBLOCKSTART 274 #define T_UNPBLOCKEND 275 #define T_PERCENTRVIEW 276 #define T_PERCENTUVIEW 277 #define T_PERCENTSTORAGECLASS 278 #define T_AUTO 279 #define T_REGISTER 280 #define T_EXTERN 281 #define T_TYPEDEF 282 #define T_CONST 283 #define T_VOLATILE 284 #define T_DOTDOTDOT 285 #line 1 "../kimwy.y" /* * The Termprocessor Kimwitu * * Copyright (c) 1991 University of Twente, Dept TIOS. * All rights reserved. * */ #line 10 "../kimwy.y" /* * kimwy.y */ #if ! (defined(lint) || defined(SABER) || defined(CODECENTER)) static char kimwy_yAccesSid[] = "@(#)$Id: kimwy.y,v 2.41 1998/01/29 18:04:21 belinfan Rel $"; #endif #line 19 "../kimwy.y" #ifdef BISON_RECOVER /* Note that setting YYDEBUG is required even if you do not want to * set the yydebug variable because we use the symbol strings in * `yytname' for initialising costs and also for error messages. */ #define YYDEBUG 1 #define yyinsertcost(token) (token[0]=='\''?1:strlen(token)) #define yydeletecost(token) (token[0]=='\''?1:strlen(token)) #endif /* BISON_RECOVER */ #line 32 "../kimwy.y" /***************************************************************************/ /* * Name conventions: tokens are in CAPITALS * nonterminals are in lowercase * operators are capitalized * */ #line 41 "../kimwy.y" /* define our own macro if we have a 'standard' (ansi) C(++) compiler */ #ifndef KC_NO_STDC # if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32) # define KC_STDC # endif #endif #ifdef KC_STDC # include /* for malloc and free */ #endif #include /* for strcat */ /* For windows (NT at least) we need to redifine alloca */ #if defined(_WIN32) && ! defined (__GNUC__) # define alloca _alloca # include #endif #include "k.h" #include "parse.h" #include "extocc.h" #include "defocc.h" #include "util.h" /* for the v_add_to routines */ #include "rk.h" /* for the rewrite_patternchains routine */ static ID pl_phylum; /* local kimwy.y var */ static withexpressions pl_withvariables; /* local kimwy.y var */ static withexpressionsstack pl_withvariablesstack; /* local kimwy.y var */ static idCexpressionsstack pl_idCexpressionsstack; /* local kimwy.y var */ static filelinestack pl_filelinestack; /* local kimwy.y var */ static nooperatorsstack pl_nooperatorsstack; /* local kimwy.y var */ static int non_default_outmostpattern = 0; /* local kimwy.y var */ #define dollar_mark_set() (!eq_withexpressions(pl_withvariables, Nilwithexpressions())) #define do_MainC() do { if ( dollar_mark_set() ) do_NORMAL(); else do_C(); } while(kc_zero_constant) extern void do_NORMAL(); extern void do_CEXPR(); extern void do_CEXPRDQ(); extern void do_CEXPRSQ(); extern void do_C(); extern void yyerror KC__P((char*)); extern int yylex(); #define pf_setfileline(x) do { (x)->file = pg_filename; \ (x)->line = pg_lineno; \ } while(kc_zero_constant) #define pf_pushfileline() pl_filelinestack = Consfilelinestack( FileLine( pg_filename, pg_lineno ), pl_filelinestack ) #define pf_setstacktopfileline(x) do { (x)->file = pl_filelinestack->u.Consfilelinestack.fileline_1->u.FileLine.casestring_1; \ (x)->line = pl_filelinestack->u.Consfilelinestack.fileline_1->u.FileLine.int_1; \ } while(kc_zero_constant) #define pf_topfileline() (pl_filelinestack->u.Consfilelinestack.fileline_1) #define pf_popfileline() do { filelinestack tmp_pl_filelinestack = pl_filelinestack; \ pl_filelinestack = pl_filelinestack->u.Consfilelinestack.filelinestack_1; \ free_fileline( tmp_pl_filelinestack->u.Consfilelinestack.fileline_1, True ); \ free_filelinestack( tmp_pl_filelinestack, False ); \ } while(kc_zero_constant) #define pf_setwithvariable(x) pl_withvariables = Conswithexpressions(WEVariable(x), pl_withvariables) #define pf_resetwithvariable() pl_withvariables = Nilwithexpressions() #define pf_push_no_operators() pl_nooperatorsstack = Consnooperatorsstack( non_default_outmostpattern, pl_nooperatorsstack ); #define pf_pop_no_operators() do { nooperatorsstack tmp_pl_nooperatorsstack = pl_nooperatorsstack; \ non_default_outmostpattern = pl_nooperatorsstack->u.Consnooperatorsstack.int_1; \ pl_nooperatorsstack = pl_nooperatorsstack->u.Consnooperatorsstack.nooperatorsstack_1; \ free_nooperatorsstack( tmp_pl_nooperatorsstack, False ); \ } while(kc_zero_constant) #define pf_pushwithvariable() pl_withvariablesstack = Conswithexpressionsstack( pl_withvariables, pl_withvariablesstack ) #define pf_topwithvariable() (pl_withvariablesstack->u.Conswithexpressionsstack.withexpressions_1) #define pf_popwithvariable() do { withexpressionsstack tmp_pl_withvariablesstack = pl_withvariablesstack; \ pl_withvariablesstack = pl_withvariablesstack->u.Conswithexpressionsstack.withexpressionsstack_1; \ free_withexpressionsstack( tmp_pl_withvariablesstack, False ); \ } while(kc_zero_constant) #define pf_pushidCexpressions(x) pl_idCexpressionsstack = ConsidCexpressionsstack( x, pl_idCexpressionsstack ) #define pf_topidCexpressions() (pl_idCexpressionsstack->u.ConsidCexpressionsstack.idCexpressions_1) #define pf_popidCexpressions() do { idCexpressionsstack tmp_pl_idCexpressionsstack = pl_idCexpressionsstack; \ pl_idCexpressionsstack = pl_idCexpressionsstack->u.ConsidCexpressionsstack.idCexpressionsstack_1; \ free_idCexpressionsstack( tmp_pl_idCexpressionsstack, False ); \ } while(kc_zero_constant) #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 405 #define YYFLAG -32768 #define YYNTBASE 51 #define YYTRANSLATE(x) ((unsigned)(x) <= 285 ? yytranslate[x] : 189) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 40, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 35, 41, 2, 49, 2, 48, 42, 37, 38, 50, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 31, 32, 46, 39, 47, 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, 43, 2, 44, 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, 33, 36, 34, 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 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 4, 6, 7, 10, 12, 15, 17, 19, 21, 23, 25, 27, 29, 31, 32, 40, 41, 45, 50, 51, 54, 56, 58, 62, 63, 64, 71, 72, 75, 76, 81, 82, 85, 90, 91, 92, 96, 97, 100, 102, 104, 106, 108, 112, 116, 120, 124, 125, 128, 130, 132, 133, 136, 138, 140, 141, 144, 146, 148, 150, 154, 155, 156, 161, 163, 165, 166, 171, 172, 173, 179, 180, 181, 187, 189, 191, 192, 193, 199, 200, 201, 205, 207, 209, 211, 213, 214, 219, 220, 225, 227, 228, 232, 233, 234, 235, 246, 247, 248, 258, 259, 260, 261, 269, 270, 272, 273, 279, 280, 282, 284, 287, 288, 291, 293, 295, 296, 302, 304, 306, 308, 311, 317, 319, 323, 325, 329, 330, 333, 335, 339, 342, 344, 348, 350, 355, 359, 361, 363, 365, 370, 372, 374, 378, 379, 384, 386, 387, 389, 391, 395, 397, 402, 403, 408, 410, 411, 413, 415, 419, 421, 424, 428, 429, 435, 437, 440, 446, 447, 450, 451, 454, 455, 456, 463, 466, 468, 472, 474, 476, 479, 482, 487, 489, 492, 495, 496, 499, 503, 505, 508, 512, 516, 518, 521, 525, 529, 531, 534, 538, 543, 547, 548, 550, 552, 555, 557, 560, 563, 567, 569, 571, 573, 575, 577, 579, 581, 583, 584, 586, 588, 592, 594, 596, 599, 601, 604, 607, 609, 613, 618, 623, 627, 632, 637, 641, 646, 648, 651, 654, 658, 660, 663, 665, 669, 671, 675, 678, 681, 683, 687, 689, 691, 694, 698, 703, 707, 711, 716, 719, 723, 725, 726, 729, 731, 734 }; static const short yyrhs[] = { 8, 0, 3, 0, 4, 0, 0, 55, 56, 0, 57, 0, 56, 57, 0, 58, 0, 119, 0, 160, 0, 113, 0, 141, 0, 154, 0, 156, 0, 158, 0, 0, 52, 60, 31, 59, 61, 67, 32, 0, 0, 33, 52, 34, 0, 33, 35, 52, 34, 0, 0, 12, 52, 0, 62, 0, 63, 0, 62, 36, 63, 0, 0, 0, 52, 37, 64, 66, 65, 38, 0, 0, 66, 52, 0, 0, 33, 68, 112, 34, 0, 0, 68, 69, 0, 52, 52, 70, 32, 0, 0, 0, 39, 71, 72, 0, 0, 72, 73, 0, 7, 0, 51, 0, 40, 0, 5, 0, 41, 76, 41, 0, 42, 78, 42, 0, 37, 74, 38, 0, 43, 74, 44, 0, 0, 74, 75, 0, 73, 0, 45, 0, 0, 76, 77, 0, 7, 0, 40, 0, 0, 78, 79, 0, 7, 0, 40, 0, 81, 0, 80, 45, 81, 0, 0, 0, 52, 82, 72, 83, 0, 72, 0, 84, 0, 0, 85, 45, 86, 84, 0, 0, 0, 33, 88, 93, 89, 34, 0, 0, 0, 33, 91, 93, 92, 34, 0, 97, 0, 139, 0, 0, 0, 33, 95, 97, 96, 34, 0, 0, 0, 97, 98, 99, 0, 6, 0, 51, 0, 40, 0, 5, 0, 0, 41, 100, 76, 41, 0, 0, 42, 101, 78, 42, 0, 94, 0, 0, 16, 102, 106, 0, 0, 0, 0, 15, 103, 37, 104, 85, 105, 38, 33, 139, 34, 0, 0, 0, 37, 125, 32, 107, 80, 38, 90, 108, 109, 0, 0, 0, 0, 17, 110, 37, 125, 111, 38, 90, 0, 0, 94, 0, 0, 10, 115, 114, 117, 11, 0, 0, 116, 0, 3, 0, 116, 3, 0, 0, 117, 118, 0, 9, 0, 40, 0, 0, 129, 13, 120, 121, 32, 0, 135, 0, 122, 0, 123, 0, 122, 123, 0, 46, 145, 31, 135, 47, 0, 125, 0, 124, 45, 125, 0, 126, 0, 125, 48, 126, 0, 0, 127, 128, 0, 130, 0, 37, 124, 38, 0, 49, 52, 0, 130, 0, 129, 45, 130, 0, 52, 0, 52, 37, 133, 38, 0, 52, 39, 130, 0, 50, 0, 18, 0, 52, 0, 52, 37, 133, 38, 0, 50, 0, 18, 0, 52, 39, 131, 0, 0, 41, 132, 76, 41, 0, 53, 0, 0, 134, 0, 131, 0, 134, 45, 131, 0, 52, 0, 52, 37, 137, 38, 0, 0, 41, 136, 76, 41, 0, 53, 0, 0, 138, 0, 135, 0, 138, 45, 135, 0, 140, 0, 139, 140, 0, 124, 31, 94, 0, 0, 129, 13, 142, 143, 32, 0, 144, 0, 143, 144, 0, 43, 145, 31, 146, 44, 0, 0, 145, 52, 0, 0, 146, 147, 0, 0, 0, 41, 148, 76, 41, 149, 153, 0, 150, 153, 0, 94, 0, 19, 146, 20, 0, 52, 0, 51, 0, 52, 151, 0, 51, 151, 0, 37, 52, 38, 52, 0, 152, 0, 151, 152, 0, 13, 52, 0, 0, 31, 52, 0, 22, 155, 32, 0, 52, 0, 155, 52, 0, 155, 45, 52, 0, 21, 157, 32, 0, 52, 0, 157, 52, 0, 157, 45, 52, 0, 23, 159, 32, 0, 52, 0, 159, 52, 0, 159, 45, 52, 0, 164, 171, 162, 188, 0, 164, 168, 32, 0, 0, 163, 0, 161, 0, 163, 161, 0, 166, 0, 165, 166, 0, 167, 166, 0, 165, 167, 166, 0, 24, 0, 25, 0, 14, 0, 26, 0, 27, 0, 52, 0, 28, 0, 29, 0, 0, 169, 0, 170, 0, 169, 45, 170, 0, 172, 0, 175, 0, 176, 175, 0, 174, 0, 176, 174, 0, 176, 174, 0, 187, 0, 37, 173, 38, 0, 174, 43, 184, 44, 0, 174, 37, 178, 38, 0, 174, 37, 38, 0, 174, 37, 181, 38, 0, 187, 37, 178, 38, 0, 187, 37, 38, 0, 187, 37, 181, 38, 0, 50, 0, 50, 177, 0, 50, 176, 0, 50, 177, 176, 0, 167, 0, 177, 167, 0, 179, 0, 179, 45, 30, 0, 180, 0, 179, 45, 180, 0, 164, 172, 0, 164, 182, 0, 187, 0, 181, 45, 187, 0, 176, 0, 183, 0, 176, 183, 0, 37, 182, 38, 0, 183, 43, 184, 44, 0, 43, 184, 44, 0, 183, 37, 38, 0, 183, 37, 178, 38, 0, 37, 38, 0, 37, 178, 38, 0, 185, 0, 0, 186, 72, 0, 52, 0, 49, 52, 0, 87, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 265, 270, 275, 287, 297, 300, 301, 305, 307, 313, 315, 317, 319, 321, 323, 328, 330, 335, 337, 339, 344, 346, 351, 356, 358, 363, 363, 364, 369, 371, 376, 378, 383, 385, 390, 395, 397, 400, 409, 411, 416, 418, 420, 422, 424, 426, 428, 430, 435, 437, 442, 444, 449, 451, 456, 458, 463, 465, 470, 472, 477, 479, 484, 487, 488, 492, 497, 499, 500, 510, 513, 515, 519, 522, 524, 528, 530, 540, 543, 545, 549, 551, 554, 558, 560, 562, 564, 566, 568, 571, 573, 577, 580, 583, 585, 588, 590, 591, 599, 600, 605, 632, 634, 636, 637, 666, 668, 673, 673, 682, 686, 691, 704, 720, 722, 727, 729, 734, 737, 742, 744, 749, 751, 756, 768, 770, 775, 777, 782, 784, 788, 790, 792, 797, 799, 804, 806, 808, 810, 812, 817, 819, 821, 823, 825, 827, 829, 832, 837, 839, 844, 846, 850, 852, 854, 856, 859, 864, 866, 871, 873, 878, 880, 885, 890, 893, 898, 900, 905, 917, 919, 923, 925, 930, 932, 935, 936, 938, 940, 945, 947, 949, 951, 953, 958, 960, 965, 970, 972, 977, 982, 986, 990, 997, 1002, 1006, 1010, 1017, 1022, 1026, 1030, 1037, 1051, 1056, 1058, 1062, 1064, 1073, 1077, 1083, 1089, 1100, 1102, 1104, 1106, 1108, 1113, 1118, 1120, 1125, 1127, 1131, 1133, 1138, 1146, 1148, 1153, 1155, 1160, 1165, 1167, 1169, 1171, 1173, 1175, 1180, 1182, 1184, 1189, 1191, 1193, 1195, 1200, 1202, 1207, 1209, 1214, 1216, 1221, 1223, 1228, 1230, 1235, 1237, 1239, 1244, 1246, 1248, 1250, 1253, 1256, 1259, 1268, 1272, 1274, 1279, 1281, 1286 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","T_ID","T_INT", "T_CNEWLINES","T_CLINE","T_CEXPRESSION","T_DOLLARVAR","T_INCLUDE","T_INCLUDESTART", "T_INCLUDEEND","T_LIST","T_ARROW","T_STATIC","T_WITH","T_FOREACH","T_FOREACH_AFTER", "T_DEFAULT","T_UNPBLOCKSTART","T_UNPBLOCKEND","T_PERCENTRVIEW","T_PERCENTUVIEW", "T_PERCENTSTORAGECLASS","T_AUTO","T_REGISTER","T_EXTERN","T_TYPEDEF","T_CONST", "T_VOLATILE","T_DOTDOTDOT","':'","';'","'{'","'}'","'!'","'|'","'('","')'","'='", "'\\n'","'\"'","'''","'['","']'","','","'<'","'>'","'&'","'$'","'*'","dollarvar", "id","int","specification","@1","declarations","declaration","phylumdeclaration", "@2","storageoption","productionblock","alternatives","alternative","@3","@4", "arguments","Ccode_option","attributes_option","attribute","attribute_init_option", "@5","Cexpression","Cexpression_elem","Cexpression_inner","Cexpression_elem_inner", "CexpressionDQ","CexpressionDQ_elem","CexpressionSQ","CexpressionSQ_elem","idCexpressions", "idCexpression","@6","@7","withCexpression","withCexpressions","@8","MainCbody", "@9","@10","MainCbodyinC","@11","@12","MainCBodycontinuation","Cbody","@13", "@14","Ctext","@15","Ctext_elem","@16","@17","@18","@19","@20","@21","foreach_continuation", "@22","@23","foreach_end_continuation","@24","@25","init_option","includedeclaration", "@26","includefiles_option","includefiles","includes","include","rwdeclaration", "@27","rwclauses_or_term","rwclauses","rwclause","patternchains","patternchain", "patternchainitem_lineinfo","@28","patternchainitem","outmostpatterns","outmostpattern", "pattern","@29","patternsoption","patterns","term","@30","termsoption","terms", "withcases","withcase","unparsedeclaration","@31","unparseclauses","unparseclause", "useviewnames","unparseitems","unparseitem","@32","@33","unpsubterm","unpattributes", "unpattribute","viewnameoption","uviewdeclaration","defuviewnames","rviewdeclaration", "defrviewnames","storageclassdeclaration","defstorageclasses","ac_function_definition", "ac_declaration","ac_declaration_list_option","ac_declaration_list","ac_declaration_specifiers", "ac_storage_class_specifier","ac_type_specifier","ac_type_qualifier","ac_init_declarator_list_option", "ac_init_declarator_list","ac_init_declarator","ac_fn_declarator","ac_declarator", "ac_pointer_declarator","ac_direct_declarator","ac_direct_fn_declarator","ac_pointer", "ac_type_qualifier_list","ac_parameter_type_list","ac_parameter_list","ac_parameter_declaration", "ac_identifier_list","ac_abstract_declarator","ac_direct_abstract_declarator", "ac_constant_expression_option","ac_constant_expression","@34","ac_identifier", "ac_compound_statement", NULL }; #endif static const short yyr1[] = { 0, 51, 52, 53, 55, 54, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 59, 58, 60, 60, 60, 61, 61, 61, 62, 62, 64, 65, 63, 66, 66, 67, 67, 68, 68, 69, 70, 71, 70, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, 82, 83, 81, 84, 85, 86, 85, 88, 89, 87, 91, 92, 90, 93, 93, 95, 96, 94, 97, 98, 97, 99, 99, 99, 99, 100, 99, 101, 99, 99, 102, 99, 103, 104, 105, 99, 107, 108, 106, 109, 110, 111, 109, 112, 112, 114, 113, 115, 115, 116, 116, 117, 117, 118, 118, 120, 119, 121, 121, 122, 122, 123, 124, 124, 125, 125, 127, 126, 128, 128, 128, 129, 129, 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, 132, 131, 131, 133, 133, 134, 134, 135, 135, 136, 135, 135, 137, 137, 138, 138, 139, 139, 140, 142, 141, 143, 143, 144, 145, 145, 146, 146, 148, 149, 147, 147, 147, 147, 150, 150, 150, 150, 150, 151, 151, 152, 153, 153, 154, 155, 155, 155, 156, 157, 157, 157, 158, 159, 159, 159, 160, 161, 162, 162, 163, 163, 164, 164, 164, 164, 165, 165, 165, 165, 165, 166, 167, 167, 168, 168, 169, 169, 170, 171, 171, 172, 172, 173, 174, 174, 174, 174, 174, 174, 175, 175, 175, 176, 176, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 181, 182, 182, 182, 183, 183, 183, 183, 183, 183, 183, 184, 186, 185, 187, 187, 188 }; static const short yyr2[] = { 0, 1, 1, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 7, 0, 3, 4, 0, 2, 1, 1, 3, 0, 0, 6, 0, 2, 0, 4, 0, 2, 4, 0, 0, 3, 0, 2, 1, 1, 1, 1, 3, 3, 3, 3, 0, 2, 1, 1, 0, 2, 1, 1, 0, 2, 1, 1, 1, 3, 0, 0, 4, 1, 1, 0, 4, 0, 0, 5, 0, 0, 5, 1, 1, 0, 0, 5, 0, 0, 3, 1, 1, 1, 1, 0, 4, 0, 4, 1, 0, 3, 0, 0, 0, 10, 0, 0, 9, 0, 0, 0, 7, 0, 1, 0, 5, 0, 1, 1, 2, 0, 2, 1, 1, 0, 5, 1, 1, 1, 2, 5, 1, 3, 1, 3, 0, 2, 1, 3, 2, 1, 3, 1, 4, 3, 1, 1, 1, 4, 1, 1, 3, 0, 4, 1, 0, 1, 1, 3, 1, 4, 0, 4, 1, 0, 1, 1, 3, 1, 2, 3, 0, 5, 1, 2, 5, 0, 2, 0, 2, 0, 0, 6, 2, 1, 3, 1, 1, 2, 2, 4, 1, 2, 2, 0, 2, 3, 1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 4, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 3, 1, 1, 2, 1, 2, 2, 1, 3, 4, 4, 3, 4, 4, 3, 4, 1, 2, 2, 3, 1, 2, 1, 3, 1, 3, 2, 2, 1, 3, 1, 1, 2, 3, 4, 3, 3, 4, 2, 3, 1, 0, 2, 1, 2, 1 }; static const short yydefact[] = { 4, 0, 2, 110, 214, 140, 0, 0, 0, 212, 213, 215, 216, 218, 219, 139, 217, 5, 6, 8, 11, 9, 0, 134, 12, 13, 14, 15, 10, 0, 0, 208, 0, 112, 108, 111, 195, 0, 191, 0, 199, 0, 0, 149, 0, 0, 7, 118, 0, 0, 239, 266, 204, 225, 0, 0, 217, 209, 0, 210, 114, 113, 194, 0, 196, 190, 0, 192, 198, 0, 200, 0, 0, 3, 144, 146, 143, 141, 148, 151, 0, 150, 136, 138, 16, 0, 0, 135, 267, 243, 241, 240, 206, 0, 205, 220, 226, 0, 211, 0, 197, 193, 201, 0, 19, 53, 149, 0, 137, 0, 21, 155, 170, 153, 157, 0, 121, 122, 120, 170, 0, 167, 244, 242, 70, 268, 202, 207, 0, 0, 221, 222, 224, 227, 0, 230, 237, 217, 0, 0, 245, 247, 0, 251, 116, 109, 117, 115, 20, 0, 0, 145, 152, 0, 0, 31, 23, 24, 53, 0, 158, 119, 123, 0, 166, 168, 81, 0, 0, 203, 0, 0, 264, 228, 0, 264, 249, 253, 250, 254, 236, 0, 238, 0, 55, 56, 147, 54, 142, 22, 26, 33, 0, 0, 0, 0, 171, 160, 0, 159, 172, 71, 82, 0, 125, 127, 0, 129, 162, 231, 229, 223, 234, 0, 0, 0, 263, 39, 0, 261, 253, 0, 0, 0, 255, 0, 264, 246, 248, 252, 29, 106, 17, 25, 156, 0, 154, 0, 0, 0, 0, 0, 129, 129, 129, 0, 130, 131, 163, 233, 235, 232, 265, 253, 262, 256, 258, 259, 0, 0, 27, 78, 0, 34, 107, 0, 124, 161, 1, 172, 0, 174, 169, 181, 180, 178, 173, 188, 72, 87, 84, 95, 93, 86, 88, 90, 85, 92, 83, 164, 126, 128, 0, 133, 44, 41, 49, 43, 53, 57, 49, 42, 40, 260, 257, 30, 0, 81, 36, 32, 0, 0, 53, 0, 183, 185, 182, 0, 177, 0, 0, 53, 57, 132, 0, 0, 0, 0, 28, 82, 37, 0, 179, 0, 0, 187, 186, 189, 96, 129, 94, 0, 0, 47, 52, 51, 50, 45, 59, 60, 46, 58, 48, 0, 39, 35, 184, 175, 39, 0, 89, 91, 80, 38, 188, 66, 67, 97, 99, 176, 68, 0, 0, 39, 0, 63, 0, 61, 69, 129, 39, 0, 0, 129, 64, 73, 100, 62, 98, 65, 81, 102, 74, 103, 101, 0, 0, 75, 129, 104, 0, 0, 105, 0, 0, 0 }; static const short yydefgoto[] = { 301, 51, 78, 403, 1, 17, 18, 19, 110, 45, 155, 156, 157, 230, 306, 260, 192, 231, 263, 331, 354, 365, 302, 324, 346, 149, 187, 326, 351, 376, 377, 380, 389, 366, 367, 373, 125, 166, 239, 386, 390, 395, 201, 275, 307, 353, 202, 240, 288, 321, 322, 320, 319, 358, 371, 340, 372, 391, 394, 396, 400, 265, 20, 60, 34, 35, 99, 147, 21, 85, 115, 116, 117, 203, 204, 205, 206, 246, 22, 23, 79, 105, 80, 81, 118, 158, 198, 199, 207, 208, 24, 86, 120, 121, 159, 238, 276, 312, 364, 277, 314, 315, 318, 25, 39, 26, 37, 27, 41, 28, 92, 93, 94, 138, 30, 31, 32, 129, 130, 131, 52, 132, 167, 133, 53, 134, 91, 221, 140, 141, 142, 222, 179, 215, 216, 217, 135, 126 }; static const short yypact[] = {-32768, 185,-32768, 29,-32768,-32768, 72, 72, 72,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 337, 185,-32768,-32768,-32768, -32768, 86,-32768,-32768,-32768,-32768,-32768,-32768, 27, 312, -32768, 72,-32768,-32768, 111,-32768, 24,-32768, 132,-32768, 137, 126, 31, 98, 124,-32768, 87, 98, 72, 299, -32768, 366,-32768, 30, 139,-32768,-32768, 72,-32768,-32768, -32768,-32768, 72,-32768,-32768, 72,-32768,-32768, 72,-32768, 72, 153,-32768,-32768,-32768,-32768, 244,-32768,-32768, 155, 156, 249,-32768,-32768, 150, 189,-32768,-32768,-32768,-32768, 299,-32768, 195, 366, 84,-32768, 224,-32768, 193,-32768, -32768,-32768, 264,-32768,-32768, 31, 31,-32768, 31, 68, -32768,-32768, 262,-32768, 274, 279,-32768,-32768,-32768, 79, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 288, 281, 284, -32768,-32768, 229, 114,-32768,-32768, 134, 17, 310, 319, -32768, 184,-32768,-32768,-32768,-32768,-32768,-32768, 256, 334, -32768,-32768, 72, 341, 346, 360,-32768,-32768, 21, 91, -32768,-32768, 194,-32768,-32768, 41, 361, 114,-32768, 84, 251,-32768, 229, 99,-32768,-32768, 101,-32768, 293,-32768, 359,-32768, 30,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 365, 72, 261, 91,-32768,-32768, 362, 353,-32768, -32768, 367, 144, 354,-32768, 70, 369,-32768,-32768, 229, -32768,-32768, 368, 196, 363,-32768,-32768, 99,-32768, 101, 370, 371, 372, 293, 328,-32768,-32768,-32768,-32768,-32768, 25,-32768,-32768,-32768, 357,-32768, 91, 223, 376, 318, 378,-32768,-32768,-32768, 72,-32768,-32768,-32768,-32768,-32768, -32768, 277, 324,-32768,-32768,-32768,-32768, 374, 373, 72, -32768, 72,-32768,-32768, 379,-32768,-32768,-32768,-32768, 72, -32768,-32768, 392, 392,-32768,-32768, 383,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 354, -32768, 201,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 377,-32768, 380,-32768, 302, 382,-32768, 72, 392,-32768, 392, 72,-32768, 381, 384, -32768,-32768,-32768, 178, 263, 105, 250,-32768, 388,-32768, 391,-32768, 72, 267,-32768,-32768,-32768,-32768,-32768,-32768, 304, 158,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, 390,-32768,-32768,-32768,-32768,-32768, 5,-32768, -32768,-32768, 277, 383, 277,-32768, 385,-32768,-32768,-32768, 387, 72,-32768, 393,-32768, 202,-32768,-32768,-32768,-32768, 394, 72, 395, 277,-32768,-32768,-32768,-32768,-32768, 41, 411,-32768,-32768,-32768, 397, 396,-32768,-32768, 354, 398, 394,-32768, 432, 434,-32768 }; static const short yypgoto[] = { -221, -1, -77,-32768,-32768,-32768, 418,-32768,-32768,-32768,-32768, -32768, 245,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -213, -143, 140,-32768, -155,-32768, 115,-32768,-32768, 57, -32768,-32768, 69,-32768,-32768,-32768,-32768,-32768, 40,-32768, -32768, 53, 106,-32768,-32768, 138,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 330, 200, -224, 204,-32768,-32768,-32768, -35, 268, -32768, 342,-32768, -145,-32768,-32768,-32768, 71, -205,-32768, -32768,-32768, 329, 332, 183,-32768,-32768,-32768,-32768, 179, 49, 90,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 364, -32768,-32768, 9,-32768, 213, -5,-32768,-32768, 285,-32768, 321,-32768, -122, 402, -28,-32768, -86,-32768, 276, 289, 323, -156, -152,-32768,-32768, -15,-32768 }; #define YYLAST 461 static const short yytable[] = { 16, 54, 248, 194, 252, 36, 38, 40, 114, 83, 29, 139, 173, 87, 55, 197, 16, 273, 290, 286, 2, 224, 90, 223, 2, 58, 29, 2, 2, 56, 2, 56, 33, 2, 2, 73, 64, 368, 67, 55, 70, 72, 77, 82, -129, 89, 210, 82, 88, 74, 235, 56, 195, 243, 174, 173, 62, 56, 261, -129, 175, 95, 100, 123, 224, 101, 49, 50, 102, 63, 103, 2, 75, 2, 259, 2, 49, 50, -129, 49, 153, 76, 143, 114, 113, 213, 122, 2, 5, 273, -129, -129, 267, 56, 2, 73, 137, 224, 210, 47, 168, 2, 2, 95, 2, 77, 77, 244, 77, 154, 177, 164, 348, 4, 61, 359, 5, 2, 114, 245, 15, 128, 119, 9, 10, 11, 12, 13, 14, 2, -165, 48, 111, 49, 50, 2, 218, 219, 174, 258, 2, 363, 175, 325, 175, 349, 220, 350, 15, 50, 49, 128, 189, 2, 73, 84, 143, 334, 196, 113, 114, 71, 196, 49, 65, 348, 341, 384, 229, 68, 137, 247, -266, 56, 399, 241, 97, 66, 248, -266, 56, 345, 69, 294, 345, 295, 268, 104, 2, 242, 253, 111, 154, 108, 113, 3, 112, 2, 349, 4, 361, 109, 144, 5, 145, 82, 6, 7, 8, 9, 10, 11, 12, 13, 14, 296, 343, 56, 297, 298, 299, 300, 182, 344, 56, 200, 2, 2, 124, 183, 262, 268, 119, 146, 250, 15, 113, 274, 4, 323, 381, 183, 269, 57, 293, 59, 242, 382, 9, 10, 11, 12, 13, 14, 2, 294, 261, 295, 268, 305, 270, 308, 136, 184, 271, 4, 171, 272, 184, 311, 184, 98, 172, 49, 184, 9, 10, 11, 12, 13, 14, 106, 294, 107, 295, 268, 43, 296, 44, 212, 297, 298, 299, 300, 352, 344, 185, 186, 148, 160, 49, 185, 234, 185, 347, 2, 161, 185, 357, 274, 268, 184, 335, 169, 296, 2, 337, 297, 298, 299, 300, 269, 332, 279, 280, 112, 268, 13, 14, 170, 225, 2, 356, 281, 282, 261, 226, 264, 50, 270, 13, 14, 4, 271, 185, 360, 287, 289, 180, 50, -136, 261, 9, 10, 11, 12, 13, 14, 283, 284, 285, 218, 2, 336, 181, 336, 257, 175, -18, 2, 42, 375, 188, 4, 43, 151, 44, 152, 190, 191, 4, 375, -136, 9, 10, 11, 12, 13, 14, 227, 9, 10, 11, 12, 13, 14, 193, 232, 237, 209, 236, -76, 243, -77, 266, 313, 249, 251, 254, 255, 278, 261, 303, 309, 317, 328, 256, 304, 338, 330, 333, 339, -79, 355, 362, 374, 379, 385, 393, 388, 370, 397, 404, 398, 405, 46, 401, 342, 233, 387, 327, 402, 378, 392, 292, 329, 162, 291, 150, 165, 383, 163, 310, 316, 369, 211, 96, 228, 127, 176, 214, 178 }; static const short yycheck[] = { 1, 29, 207, 158, 217, 6, 7, 8, 85, 44, 1, 97, 134, 48, 29, 160, 17, 238, 242, 240, 3, 177, 50, 175, 3, 30, 17, 3, 3, 30, 3, 32, 3, 3, 3, 4, 37, 32, 39, 54, 41, 42, 43, 44, 3, 50, 168, 48, 49, 18, 195, 52, 31, 48, 37, 177, 32, 58, 33, 18, 43, 52, 63, 91, 220, 66, 49, 50, 69, 45, 71, 3, 41, 3, 226, 3, 49, 50, 37, 49, 12, 50, 97, 160, 85, 171, 91, 3, 18, 310, 49, 50, 237, 94, 3, 4, 97, 253, 220, 13, 128, 3, 3, 94, 3, 106, 107, 37, 109, 110, 138, 32, 7, 14, 3, 339, 18, 3, 195, 49, 50, 37, 43, 24, 25, 26, 27, 28, 29, 3, 43, 45, 41, 49, 50, 3, 37, 38, 37, 225, 3, 354, 43, 298, 43, 40, 174, 42, 50, 50, 49, 37, 153, 3, 4, 31, 171, 312, 159, 160, 237, 35, 163, 49, 32, 7, 321, 380, 183, 32, 171, 206, 38, 174, 398, 31, 37, 45, 383, 45, 181, 324, 45, 5, 327, 7, 8, 34, 3, 45, 218, 41, 193, 38, 195, 10, 46, 3, 40, 14, 42, 45, 9, 18, 11, 206, 21, 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, 218, 40, 41, 42, 43, 38, 45, 225, 31, 3, 3, 33, 45, 231, 8, 43, 40, 38, 50, 237, 238, 14, 38, 38, 45, 19, 30, 245, 32, 45, 45, 24, 25, 26, 27, 28, 29, 3, 5, 33, 7, 8, 260, 37, 262, 38, 7, 41, 14, 37, 44, 7, 270, 7, 58, 43, 49, 7, 24, 25, 26, 27, 28, 29, 37, 5, 39, 7, 8, 37, 37, 39, 38, 40, 41, 42, 43, 44, 45, 40, 41, 34, 37, 49, 40, 41, 40, 41, 3, 32, 40, 41, 310, 8, 7, 313, 32, 37, 3, 317, 40, 41, 42, 43, 19, 20, 5, 6, 46, 8, 28, 29, 45, 37, 3, 333, 15, 16, 33, 43, 231, 50, 37, 28, 29, 14, 41, 40, 41, 240, 241, 38, 50, 13, 33, 24, 25, 26, 27, 28, 29, 40, 41, 42, 37, 3, 314, 45, 316, 38, 43, 31, 3, 33, 372, 38, 14, 37, 107, 39, 109, 37, 33, 14, 382, 45, 24, 25, 26, 27, 28, 29, 30, 24, 25, 26, 27, 28, 29, 36, 32, 45, 38, 38, 34, 48, 34, 47, 13, 38, 44, 38, 38, 34, 33, 38, 34, 31, 38, 44, 44, 37, 39, 38, 37, 34, 32, 34, 38, 33, 33, 17, 34, 45, 34, 0, 37, 0, 17, 38, 322, 193, 382, 300, 401, 373, 390, 244, 307, 116, 243, 106, 120, 379, 119, 269, 274, 364, 170, 54, 181, 94, 138, 171, 138 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* modified by Ralf Schroeder at 13.05.94 */ /* included as part of the Termprocessor Kimwitu */ /* modified by Axel Belinfante at 09.12.1996 */ #ifdef YYERRMSG_VERBOSE #include "errmsg.h" int yyrecover = 0; /* non verbose error recovery */ #endif /* YYERRMSG_VERBOSE */ #line 3 "/usr/local/lib/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman 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 1, 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. */ #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 #define YYLEX yylex(&yylval, &yylloc) #else #define YYLEX yylex(&yylval) #endif #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 /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yyparse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_bcopy(FROM,TO,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_bcopy (from, to, count) char *from; char *to; 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_bcopy (char *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 184 "/usr/local/lib/bison.simple" int yyparse() { 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_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_bcopy ((char *)yyls1, (char *)yyls, 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 266 "../kimwy.y" { yyval.yt_INT = Int( yyvsp[0].yt_int ); pf_setfileline( yyval.yt_INT ); ; break;} case 2: #line 271 "../kimwy.y" { yyval.yt_ID = Id( Str( yyvsp[0].yt_casestring )); pf_setfileline( yyval.yt_ID ); ; break;} case 3: #line 276 "../kimwy.y" { yyval.yt_INT = Int( yyvsp[0].yt_int ); pf_setfileline( yyval.yt_INT ); ; break;} case 4: #line 287 "../kimwy.y" { /* initialize variables and scanner state */ pl_filelinestack = Nilfilelinestack(); pl_nooperatorsstack = Nilnooperatorsstack(); pl_phylum = 0; pl_withvariables = Nilwithexpressions(); pl_withvariablesstack = Nilwithexpressionsstack(); pl_idCexpressionsstack = NilidCexpressionsstack(); do_NORMAL(); ; break;} case 8: #line 306 "../kimwy.y" { Thephylumdeclarations = mergephylumdeclarations( yyvsp[0].yt_phylumdeclaration, Thephylumdeclarations ); ; break;} case 9: #line 308 "../kimwy.y" { Therwdeclarations = Consrwdeclarations( yyvsp[0].yt_rwdeclaration, Therwdeclarations ); ; break;} case 10: #line 314 "../kimwy.y" { Thefndeclarations = Consfndeclarations( yyvsp[0].yt_fndeclaration, Thefndeclarations ); ; break;} case 11: #line 316 "../kimwy.y" { ; break;} case 12: #line 318 "../kimwy.y" { Theunparsedeclarations = Consunparsedeclarations( yyvsp[0].yt_unparsedeclaration, Theunparsedeclarations ); ; break;} case 13: #line 320 "../kimwy.y" { ; break;} case 14: #line 322 "../kimwy.y" { ; break;} case 15: #line 324 "../kimwy.y" { ; break;} case 16: #line 329 "../kimwy.y" { pl_phylum = yyvsp[-2].yt_ID; ; break;} case 17: #line 331 "../kimwy.y" { yyval.yt_phylumdeclaration = PhylumDeclaration( yyvsp[-6].yt_ID, yyvsp[-5].yt_storageoption, yyvsp[-2].yt_productionblock, yyvsp[-1].yt_Ccode_option ); v_extendoccur( pl_phylum, ITUserPhylum( yyval.yt_phylumdeclaration ) ); ; break;} case 18: #line 336 "../kimwy.y" { yyval.yt_storageoption = NoStorageOption(); ; break;} case 19: #line 338 "../kimwy.y" { yyval.yt_storageoption = PositiveStorageOption( yyvsp[-1].yt_ID ); v_extendoccur( yyvsp[-1].yt_ID, ITStorageClass() ); ; break;} case 20: #line 340 "../kimwy.y" { yyval.yt_storageoption = NegativeStorageOption( yyvsp[-1].yt_ID ); v_extendoccur( yyvsp[-1].yt_ID, ITStorageClass() ); ; break;} case 21: #line 345 "../kimwy.y" { yyval.yt_productionblock = Emptyproductionblock(); ; break;} case 22: #line 347 "../kimwy.y" { yyval.yt_productionblock = ListAlternatives( makeListAlternatives( pl_phylum, yyvsp[0].yt_ID ), yyvsp[0].yt_ID ); Theargsnumbers = insert_in_argsnumbers(0, Theargsnumbers); Theargsnumbers = insert_in_argsnumbers(2, Theargsnumbers); ; break;} case 23: #line 352 "../kimwy.y" { yyval.yt_productionblock = NonlistAlternatives( yyvsp[0].yt_alternatives ); ; break;} case 24: #line 357 "../kimwy.y" { yyval.yt_alternatives = Consalternatives( yyvsp[0].yt_alternative, Nilalternatives() ); ; break;} case 25: #line 359 "../kimwy.y" { yyval.yt_alternatives = Consalternatives( yyvsp[0].yt_alternative, yyvsp[-2].yt_alternatives ); ; break;} case 26: #line 363 "../kimwy.y" { pg_no_of_arguments = 0; ; break;} case 27: #line 363 "../kimwy.y" { Theargsnumbers = insert_in_argsnumbers(pg_no_of_arguments, Theargsnumbers); ; break;} case 28: #line 364 "../kimwy.y" { yyval.yt_alternative = Alternative( yyvsp[-5].yt_ID, yyvsp[-2].yt_arguments ); v_extendoccur( yyvsp[-5].yt_ID, ITUserOperator( yyval.yt_alternative, pl_phylum ) ); ; break;} case 29: #line 370 "../kimwy.y" { yyval.yt_arguments = Nilarguments(); ; break;} case 30: #line 372 "../kimwy.y" { yyval.yt_arguments = Consarguments( yyvsp[0].yt_ID, yyvsp[-1].yt_arguments ); pg_no_of_arguments++; ; break;} case 31: #line 377 "../kimwy.y" { yyval.yt_Ccode_option = CcodeOption( Nilattributes(), NilCtexts() ); ; break;} case 32: #line 379 "../kimwy.y" { yyval.yt_Ccode_option = CcodeOption( yyvsp[-2].yt_attributes, yyvsp[-1].yt_Ctexts ); ; break;} case 33: #line 384 "../kimwy.y" { yyval.yt_attributes = Nilattributes(); ; break;} case 34: #line 386 "../kimwy.y" { yyval.yt_attributes = Consattributes( yyvsp[0].yt_attribute, yyvsp[-1].yt_attributes ); ; break;} case 35: #line 391 "../kimwy.y" { yyval.yt_attribute = Attribute( yyvsp[-3].yt_ID, yyvsp[-2].yt_ID, yyvsp[-1].yt_attribute_initialisation_option ); ; break;} case 36: #line 396 "../kimwy.y" { yyval.yt_attribute_initialisation_option = Noattribute_initialisation(); ; break;} case 37: #line 398 "../kimwy.y" { do_CEXPR(); ; break;} case 38: #line 400 "../kimwy.y" { do_NORMAL(); yyval.yt_attribute_initialisation_option = Yesattribute_initialisation( yyvsp[0].yt_Cexpression ); ; break;} case 39: #line 410 "../kimwy.y" { yyval.yt_Cexpression = NilCexpression(); pf_setfileline( yyval.yt_Cexpression ); ; break;} case 40: #line 412 "../kimwy.y" { yyval.yt_Cexpression = ConsCexpression( yyvsp[0].yt_Cexpression_elem, yyvsp[-1].yt_Cexpression ); yyval.yt_Cexpression->file = yyvsp[-1].yt_Cexpression->file; yyval.yt_Cexpression->line = yyvsp[-1].yt_Cexpression->line; ; break;} case 41: #line 417 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionPart( yyvsp[0].yt_casestring ); ; break;} case 42: #line 419 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionDollarvar( yyvsp[0].yt_INT ); ; break;} case 43: #line 421 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionNl( 1 ); ; break;} case 44: #line 423 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionNl( yyvsp[0].yt_int ); ; break;} case 45: #line 425 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionDQ( yyvsp[-1].yt_CexpressionDQ ); ; break;} case 46: #line 427 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionSQ( yyvsp[-1].yt_CexpressionSQ ); ; break;} case 47: #line 429 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionPack( yyvsp[-1].yt_Cexpression ); ; break;} case 48: #line 431 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionArray( yyvsp[-1].yt_Cexpression ); ; break;} case 49: #line 436 "../kimwy.y" { yyval.yt_Cexpression = NilCexpression(); pf_setfileline( yyval.yt_Cexpression ); ; break;} case 50: #line 438 "../kimwy.y" { yyval.yt_Cexpression = ConsCexpression( yyvsp[0].yt_Cexpression_elem, yyvsp[-1].yt_Cexpression ); yyval.yt_Cexpression->file = yyvsp[-1].yt_Cexpression->file; yyval.yt_Cexpression->line = yyvsp[-1].yt_Cexpression->line; ; break;} case 51: #line 443 "../kimwy.y" { yyval.yt_Cexpression_elem = yyvsp[0].yt_Cexpression_elem; ; break;} case 52: #line 445 "../kimwy.y" { yyval.yt_Cexpression_elem = CExpressionPart( mkcasestring(",") ); ; break;} case 53: #line 450 "../kimwy.y" { yyval.yt_CexpressionDQ = NilCexpressionDQ(); ; break;} case 54: #line 452 "../kimwy.y" { yyval.yt_CexpressionDQ = ConsCexpressionDQ( yyvsp[0].yt_CexpressionDQ_elem, yyvsp[-1].yt_CexpressionDQ ); ; break;} case 55: #line 457 "../kimwy.y" { yyval.yt_CexpressionDQ_elem = CExpressionDQPart( yyvsp[0].yt_casestring ); ; break;} case 56: #line 459 "../kimwy.y" { yyval.yt_CexpressionDQ_elem = CExpressionDQNl( 1 ); ; break;} case 57: #line 464 "../kimwy.y" { yyval.yt_CexpressionSQ = NilCexpressionSQ(); ; break;} case 58: #line 466 "../kimwy.y" { yyval.yt_CexpressionSQ = ConsCexpressionSQ( yyvsp[0].yt_CexpressionSQ_elem, yyvsp[-1].yt_CexpressionSQ ); ; break;} case 59: #line 471 "../kimwy.y" { yyval.yt_CexpressionSQ_elem = CExpressionSQPart( yyvsp[0].yt_casestring ); ; break;} case 60: #line 473 "../kimwy.y" { yyval.yt_CexpressionSQ_elem = CExpressionSQNl( 1 ); ; break;} case 61: #line 478 "../kimwy.y" { yyval.yt_idCexpressions = ConsidCexpressions( yyvsp[0].yt_idCexpression, NilidCexpressions() ); ; break;} case 62: #line 480 "../kimwy.y" { yyval.yt_idCexpressions = ConsidCexpressions( yyvsp[0].yt_idCexpression, yyvsp[-2].yt_idCexpressions ); ; break;} case 63: #line 485 "../kimwy.y" { do_CEXPR(); ; break;} case 64: #line 487 "../kimwy.y" { do_NORMAL(); ; break;} case 65: #line 488 "../kimwy.y" { yyval.yt_idCexpression = IdCexpression( yyvsp[-3].yt_ID, yyvsp[-1].yt_Cexpression ); ; break;} case 66: #line 493 "../kimwy.y" { yyval.yt_withexpression = WECexpression( yyvsp[0].yt_Cexpression ); pf_setstacktopfileline( yyval.yt_withexpression ); ; break;} case 67: #line 498 "../kimwy.y" { yyval.yt_withexpressions = Conswithexpressions( yyvsp[0].yt_withexpression, Nilwithexpressions() ); ; break;} case 68: #line 499 "../kimwy.y" { pf_pushfileline(); ; break;} case 69: #line 500 "../kimwy.y" { yyval.yt_withexpressions = Conswithexpressions( yyvsp[0].yt_withexpression, yyvsp[-3].yt_withexpressions ); pf_popfileline(); ; break;} case 70: #line 511 "../kimwy.y" { do_MainC(); pf_pushfileline(); pf_pushwithvariable(); pf_resetwithvariable(); ; break;} case 71: #line 513 "../kimwy.y" { do_NORMAL(); ; break;} case 72: #line 515 "../kimwy.y" { yyval.yt_Ctext = yyvsp[-2].yt_Ctext; pf_setstacktopfileline( yyval.yt_Ctext ); pf_popfileline(); pf_popwithvariable(); ; break;} case 73: #line 520 "../kimwy.y" { do_MainC(); pf_pushfileline(); pf_pushwithvariable(); pf_resetwithvariable(); ; break;} case 74: #line 522 "../kimwy.y" { do_C(); ; break;} case 75: #line 524 "../kimwy.y" { yyval.yt_Ctext = yyvsp[-2].yt_Ctext; pf_setstacktopfileline( yyval.yt_Ctext ); pf_popfileline(); pf_popwithvariable(); ; break;} case 76: #line 529 "../kimwy.y" { yyval.yt_Ctext = yyvsp[0].yt_Ctext; pf_setstacktopfileline( yyval.yt_Ctext ); ; break;} case 77: #line 531 "../kimwy.y" { Ctext_elem tmp = CTextWithexpression( pf_topwithvariable(), yyvsp[0].yt_withcases, NotInForeachContext() ); pf_setstacktopfileline( tmp ); yyval.yt_Ctext = ConsCtext( tmp, NilCtext() ); pf_setstacktopfileline( yyval.yt_Ctext ); if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from `default' pattern(s)" ))); non_default_outmostpattern = 0; ; break;} case 78: #line 541 "../kimwy.y" { do_C(); pf_pushfileline(); pf_push_no_operators(); ; break;} case 79: #line 543 "../kimwy.y" { do_NORMAL(); ; break;} case 80: #line 545 "../kimwy.y" { yyval.yt_Ctext = yyvsp[-2].yt_Ctext; pf_setstacktopfileline( yyval.yt_Ctext ); pf_popfileline(); pf_pop_no_operators(); ; break;} case 81: #line 550 "../kimwy.y" { yyval.yt_Ctext = NilCtext(); pf_setfileline( yyval.yt_Ctext ); ; break;} case 82: #line 552 "../kimwy.y" { pf_pushfileline(); ; break;} case 83: #line 554 "../kimwy.y" { yyval.yt_Ctext = ConsCtext( yyvsp[0].yt_Ctext_elem, yyvsp[-2].yt_Ctext ); pf_setstacktopfileline( yyvsp[0].yt_Ctext_elem ); pf_popfileline(); yyval.yt_Ctext->file = yyvsp[-2].yt_Ctext->file; yyval.yt_Ctext->line = yyvsp[-2].yt_Ctext->line; ; break;} case 84: #line 559 "../kimwy.y" { yyval.yt_Ctext_elem = CTextLine( yyvsp[0].yt_casestring ); ; break;} case 85: #line 561 "../kimwy.y" { yyval.yt_Ctext_elem = CTextDollarVar( yyvsp[0].yt_INT ); ; break;} case 86: #line 563 "../kimwy.y" { yyval.yt_Ctext_elem = CTextNl( 1 ); ; break;} case 87: #line 565 "../kimwy.y" { yyval.yt_Ctext_elem = CTextNl( yyvsp[0].yt_int ); ; break;} case 88: #line 567 "../kimwy.y" { do_CEXPRDQ(); ; break;} case 89: #line 569 "../kimwy.y" { do_C(); yyval.yt_Ctext_elem = CTextCexpressionDQ( yyvsp[-1].yt_CexpressionDQ ); ; break;} case 90: #line 572 "../kimwy.y" { do_CEXPRSQ(); ; break;} case 91: #line 574 "../kimwy.y" { do_C(); yyval.yt_Ctext_elem = CTextCexpressionSQ( yyvsp[-1].yt_CexpressionSQ ); ; break;} case 92: #line 578 "../kimwy.y" { do_C(); yyval.yt_Ctext_elem = CTextCbody( yyvsp[0].yt_Ctext ); ; break;} case 93: #line 581 "../kimwy.y" { do_NORMAL(); ; break;} case 94: #line 583 "../kimwy.y" { do_C(); yyval.yt_Ctext_elem = yyvsp[0].yt_Ctext_elem; ; break;} case 95: #line 586 "../kimwy.y" { do_NORMAL(); ; break;} case 96: #line 588 "../kimwy.y" { do_CEXPR(); pf_pushfileline(); ; break;} case 97: #line 590 "../kimwy.y" { do_NORMAL(); pf_popfileline(); ; break;} case 98: #line 592 "../kimwy.y" { do_C(); yyval.yt_Ctext_elem = CTextWithexpression( yyvsp[-5].yt_withexpressions, yyvsp[-1].yt_withcases, NotInForeachContext() ); if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from `default' pattern(s)" ))); non_default_outmostpattern = 0; ; break;} case 99: #line 599 "../kimwy.y" { non_default_outmostpattern = 0; ; break;} case 100: #line 601 "../kimwy.y" { pf_pushidCexpressions(yyvsp[-2].yt_idCexpressions); ; break;} case 101: #line 605 "../kimwy.y" { patternchains pc_list = Conspatternchains(yyvsp[-7].yt_patternchain, Nilpatternchains()); patternchains rewritten = rewrite_patternchains(pc_list, base_rview); withexpressions wexpr = pf_gen_foreachwith_vars( yyvsp[-4].yt_idCexpressions ); Ctext_elem ctwe = CTextWithexpression( wexpr, Conswithcases( Withcase( syn_patternchains_fileline( rewritten, pg_filename, pg_lineno ), yyvsp[-2].yt_Ctext ), Nilwithcases() ), InForeachContext(yyvsp[-7].yt_patternchain) ); Ctext ctxts0 = NilCtext(); Ctext ctxts1 = ConsCtext( ctwe, ctxts0 ); pf_setstacktopfileline( ctwe ); pf_setstacktopfileline( ctxts0 ); pf_setstacktopfileline( ctxts1 ); check_no_patternchaingroup_in_patternchain( yyvsp[-7].yt_patternchain->file, yyvsp[-7].yt_patternchain->line, yyvsp[-7].yt_patternchain, "'foreach variable/pattern'" ); yyval.yt_Ctext_elem = CTextForeachexpression( yyvsp[-7].yt_patternchain, yyvsp[-4].yt_idCexpressions, wexpr, ctxts1, yyvsp[0].yt_foreach_after); pf_popidCexpressions(); ; break;} case 102: #line 633 "../kimwy.y" { yyval.yt_foreach_after = NoForeachAfter(); ; break;} case 103: #line 635 "../kimwy.y" { do_NORMAL(); pf_pushfileline(); ; break;} case 104: #line 636 "../kimwy.y" { non_default_outmostpattern = 0; ; break;} case 105: #line 638 "../kimwy.y" { patternchains pc_list = Conspatternchains(yyvsp[-3].yt_patternchain, Nilpatternchains()); patternchains rewritten = rewrite_patternchains(pc_list, base_rview); withexpressions wexpr = pf_gen_foreachwith_listvars( pf_topidCexpressions() ); Ctext_elem ctwe = CTextWithexpression( wexpr, Conswithcases( Withcase( syn_patternchains_fileline( rewritten, pg_filename, pg_lineno ), yyvsp[0].yt_Ctext ), Nilwithcases() ), InForeachContext(yyvsp[-3].yt_patternchain) ); Ctext ctxts0 = NilCtext(); Ctext ctxts1 = ConsCtext( ctwe, ctxts0 ); pf_setstacktopfileline( ctwe ); pf_setstacktopfileline( ctxts0 ); pf_setstacktopfileline( ctxts1 ); check_no_patternchaingroup_or_pattern_in_patternchain( yyvsp[-3].yt_patternchain->file, yyvsp[-3].yt_patternchain->line, yyvsp[-3].yt_patternchain, "'foreach variable/pattern'" ); yyval.yt_foreach_after = ForeachAfter( yyvsp[-3].yt_patternchain, pf_topidCexpressions(), wexpr, ctxts1 ); pf_setstacktopfileline( yyval.yt_foreach_after ); pf_popfileline(); ; break;} case 106: #line 667 "../kimwy.y" { yyval.yt_Ctexts = NilCtexts(); ; break;} case 107: #line 669 "../kimwy.y" { yyval.yt_Ctexts = ConsCtexts( yyvsp[0].yt_Ctext, NilCtexts() ); ; break;} case 108: #line 673 "../kimwy.y" { pf_pushfileline(); ; break;} case 109: #line 674 "../kimwy.y" {{includedeclaration pl_includedeclaration = IncludeDeclaration( yyvsp[-1].yt_includes ); set_includefiles( yyvsp[-3].yt_includefiles, pl_includedeclaration ); pf_setstacktopfileline( pl_includedeclaration ); pf_popfileline(); }; break;} case 110: #line 683 "../kimwy.y" {{ includefile pl_includefile = IncludeFile( mkcasestring(INC_CODE) ); yyval.yt_includefiles = Consincludefiles( pl_includefile, Nilincludefiles() ); }; break;} case 111: #line 687 "../kimwy.y" { yyval.yt_includefiles = yyvsp[0].yt_includefiles; ; break;} case 112: #line 692 "../kimwy.y" {{ includefile pl_includefile = IncludeFile( yyvsp[0].yt_casestring ); if (pl_includefile->newinclude) { v_report(Warning( NoFileLine(), ProblemSC( "old include redirection keyword (please replace the `KIMW_' part by `KC_'):", yyvsp[0].yt_casestring ))); pl_includefile = pl_includefile->newinclude; } if ((pl_includefile->inc_type == include_file) || (pl_includefile->inc_type == include_header)) { yyval.yt_includefiles = Consincludefiles( pl_includefile, Nilincludefiles() ); } else { v_report(NonFatal( NoFileLine(), ProblemSC( "unknown include redirection keyword:", yyvsp[0].yt_casestring ))); yyval.yt_includefiles = Nilincludefiles(); } }; break;} case 113: #line 705 "../kimwy.y" {{ includefile pl_includefile = IncludeFile( yyvsp[0].yt_casestring ); if (pl_includefile->newinclude) { v_report(Warning( NoFileLine(), ProblemSC( "old include redirection keyword (please replace the `KIMW_' part by `KC_'):", yyvsp[0].yt_casestring ))); pl_includefile = pl_includefile->newinclude; } if ((pl_includefile->inc_type == include_file) || (pl_includefile->inc_type == include_header)) { yyval.yt_includefiles = Consincludefiles( pl_includefile, yyvsp[-1].yt_includefiles ); } else { v_report(NonFatal( NoFileLine(), ProblemSC( "unknown include redirection keyword:", yyvsp[0].yt_casestring ))); yyval.yt_includefiles = yyvsp[-1].yt_includefiles; } }; break;} case 114: #line 721 "../kimwy.y" { yyval.yt_includes = Nilincludes(); ; break;} case 115: #line 723 "../kimwy.y" { yyval.yt_includes = Consincludes( yyvsp[0].yt_include, yyvsp[-1].yt_includes ); ; break;} case 116: #line 728 "../kimwy.y" { yyval.yt_include = Include( yyvsp[0].yt_casestring ); ; break;} case 117: #line 730 "../kimwy.y" { yyval.yt_include = IncludeNl( 1 ); ; break;} case 118: #line 735 "../kimwy.y" { if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from `default' pattern(s)" ))); non_default_outmostpattern = 0; ; break;} case 119: #line 738 "../kimwy.y" { yyval.yt_rwdeclaration = RwDeclaration( yyvsp[-4].yt_outmostpatterns, yyvsp[-1].yt_rewriteclauses ); ; break;} case 120: #line 743 "../kimwy.y" { yyval.yt_rewriteclauses = Consrewriteclauses( RewriteClause( Consviewnames( Id( Str( mkcasestring( "base_rview" ))), Nilviewnames() ), yyvsp[0].yt_term ), Nilrewriteclauses() ); ; break;} case 121: #line 745 "../kimwy.y" { yyval.yt_rewriteclauses = yyvsp[0].yt_rewriteclauses; ; break;} case 122: #line 750 "../kimwy.y" { yyval.yt_rewriteclauses = Consrewriteclauses( yyvsp[0].yt_rewriteclause, Nilrewriteclauses() ); ; break;} case 123: #line 752 "../kimwy.y" { yyval.yt_rewriteclauses = Consrewriteclauses( yyvsp[0].yt_rewriteclause, yyvsp[-1].yt_rewriteclauses ); ; break;} case 124: #line 760 "../kimwy.y" { if (eq_viewnames( yyvsp[-3].yt_viewnames, Nilviewnames())) { yyval.yt_rewriteclause = RewriteClause( Consviewnames( Id( Str( mkcasestring( "base_rview" ))), yyvsp[-3].yt_viewnames ), yyvsp[-1].yt_term ); } else { yyval.yt_rewriteclause = RewriteClause( yyvsp[-3].yt_viewnames, yyvsp[-1].yt_term ); } ; break;} case 125: #line 769 "../kimwy.y" { yyval.yt_patternchains = Conspatternchains( yyvsp[0].yt_patternchain, Nilpatternchains() ); ; break;} case 126: #line 771 "../kimwy.y" { yyval.yt_patternchains = Conspatternchains( yyvsp[0].yt_patternchain, yyvsp[-2].yt_patternchains ); ; break;} case 127: #line 776 "../kimwy.y" { yyval.yt_patternchain = Conspatternchain( yyvsp[0].yt_patternchainitem, Nilpatternchain() ); ; break;} case 128: #line 778 "../kimwy.y" { yyval.yt_patternchain = Conspatternchain( yyvsp[0].yt_patternchainitem, yyvsp[-2].yt_patternchain ); ; break;} case 129: #line 782 "../kimwy.y" { pf_pushfileline(); ; break;} case 130: #line 784 "../kimwy.y" { yyval.yt_patternchainitem = yyvsp[0].yt_patternchainitem; pf_setstacktopfileline(yyval.yt_patternchainitem); pf_popfileline(); ; break;} case 131: #line 789 "../kimwy.y" { yyval.yt_patternchainitem = PatternchainitemOutmost( yyvsp[0].yt_outmostpattern ); ; break;} case 132: #line 791 "../kimwy.y" { yyval.yt_patternchainitem = PatternchainitemGroup( yyvsp[-1].yt_patternchains ); ; break;} case 133: #line 793 "../kimwy.y" { yyval.yt_patternchainitem = PatternchainitemDollarid( yyvsp[0].yt_ID ); pf_setwithvariable( yyvsp[0].yt_ID ); ; break;} case 134: #line 798 "../kimwy.y" { yyval.yt_outmostpatterns = Consoutmostpatterns( yyvsp[0].yt_outmostpattern, Niloutmostpatterns() ); ; break;} case 135: #line 800 "../kimwy.y" { yyval.yt_outmostpatterns = Consoutmostpatterns( yyvsp[0].yt_outmostpattern, yyvsp[-2].yt_outmostpatterns ); ; break;} case 136: #line 805 "../kimwy.y" { yyval.yt_outmostpattern = OPOperatorWildcard( yyvsp[0].yt_ID ); non_default_outmostpattern = 1; ; break;} case 137: #line 807 "../kimwy.y" { yyval.yt_outmostpattern = OPOperator( yyvsp[-3].yt_ID, yyvsp[-1].yt_patterns ); non_default_outmostpattern = 1; ; break;} case 138: #line 809 "../kimwy.y" { yyval.yt_outmostpattern = OPNonLeafVariable( yyvsp[-2].yt_ID, yyvsp[0].yt_outmostpattern ); non_default_outmostpattern = 1; ; break;} case 139: #line 811 "../kimwy.y" { yyval.yt_outmostpattern = OPWildcard(); ; break;} case 140: #line 813 "../kimwy.y" { yyval.yt_outmostpattern = OPDefault(); ; break;} case 141: #line 818 "../kimwy.y" { yyval.yt_pattern = PVariable( yyvsp[0].yt_ID ); ; break;} case 142: #line 820 "../kimwy.y" { yyval.yt_pattern = POperator( yyvsp[-3].yt_ID, yyvsp[-1].yt_patterns ); ; break;} case 143: #line 822 "../kimwy.y" { yyval.yt_pattern = PWildcard(); ; break;} case 144: #line 824 "../kimwy.y" { yyval.yt_pattern = PWildcard(); ; break;} case 145: #line 826 "../kimwy.y" { yyval.yt_pattern = PNonLeafVariable( yyvsp[-2].yt_ID, yyvsp[0].yt_pattern ); ; break;} case 146: #line 828 "../kimwy.y" { do_CEXPRDQ(); ; break;} case 147: #line 830 "../kimwy.y" { do_NORMAL(); yyval.yt_pattern = PStringLiteral( yyvsp[-1].yt_CexpressionDQ ); ; break;} case 148: #line 833 "../kimwy.y" { yyval.yt_pattern = PIntLiteral( yyvsp[0].yt_INT ); ; break;} case 149: #line 838 "../kimwy.y" { yyval.yt_patterns = Nilpatterns(); ; break;} case 150: #line 840 "../kimwy.y" { yyval.yt_patterns = yyvsp[0].yt_patterns; ; break;} case 151: #line 845 "../kimwy.y" { yyval.yt_patterns = Conspatterns( yyvsp[0].yt_pattern, Nilpatterns() ); ; break;} case 152: #line 847 "../kimwy.y" { yyval.yt_patterns = Conspatterns( yyvsp[0].yt_pattern, yyvsp[-2].yt_patterns ); ; break;} case 153: #line 851 "../kimwy.y" { yyval.yt_term = TVariable( yyvsp[0].yt_ID ); ; break;} case 154: #line 853 "../kimwy.y" { yyval.yt_term = TOperator( yyvsp[-3].yt_ID, yyvsp[-1].yt_terms ); ; break;} case 155: #line 855 "../kimwy.y" { do_CEXPRDQ(); ; break;} case 156: #line 857 "../kimwy.y" { do_NORMAL(); yyval.yt_term = TStringLiteral( yyvsp[-1].yt_CexpressionDQ ); ; break;} case 157: #line 860 "../kimwy.y" { yyval.yt_term = TIntLiteral( yyvsp[0].yt_INT ); ; break;} case 158: #line 865 "../kimwy.y" { yyval.yt_terms = Nilterms(); ; break;} case 159: #line 867 "../kimwy.y" { yyval.yt_terms = yyvsp[0].yt_terms; ; break;} case 160: #line 872 "../kimwy.y" { yyval.yt_terms = Consterms( yyvsp[0].yt_term, Nilterms() ); ; break;} case 161: #line 874 "../kimwy.y" { yyval.yt_terms = Consterms( yyvsp[0].yt_term, yyvsp[-2].yt_terms ); ; break;} case 162: #line 879 "../kimwy.y" { yyval.yt_withcases = Conswithcases( yyvsp[0].yt_withcase, Nilwithcases() ); ; break;} case 163: #line 881 "../kimwy.y" { yyval.yt_withcases = Conswithcases( yyvsp[0].yt_withcase, yyvsp[-1].yt_withcases ); ; break;} case 164: #line 886 "../kimwy.y" { yyval.yt_withcase = Withcase( syn_patternchains_fileline(rewrite_patternchains(yyvsp[-2].yt_patternchains, base_rview), pg_filename, pg_lineno ), yyvsp[0].yt_Ctext ); ; break;} case 165: #line 891 "../kimwy.y" { if (! non_default_outmostpattern ) v_report(NonFatal( NoFileLine(), Problem1S( "can not infer type from `default' pattern(s)" ))); non_default_outmostpattern = 0; ; break;} case 166: #line 894 "../kimwy.y" { yyval.yt_unparsedeclaration = UnparseDeclaration( yyvsp[-4].yt_outmostpatterns, yyvsp[-1].yt_unparseclauses ); ; break;} case 167: #line 899 "../kimwy.y" { yyval.yt_unparseclauses = Consunparseclauses( yyvsp[0].yt_unparseclause, Nilunparseclauses() ); ; break;} case 168: #line 901 "../kimwy.y" { yyval.yt_unparseclauses = Consunparseclauses( yyvsp[0].yt_unparseclause, yyvsp[-1].yt_unparseclauses ); ; break;} case 169: #line 909 "../kimwy.y" { if (eq_viewnames( yyvsp[-3].yt_viewnames, Nilviewnames())) { yyval.yt_unparseclause = UnparseClause( Consviewnames( Id( Str( mkcasestring( "base_uview" ))), yyvsp[-3].yt_viewnames ), yyvsp[-1].yt_unparseitems ); } else { yyval.yt_unparseclause = UnparseClause( yyvsp[-3].yt_viewnames, yyvsp[-1].yt_unparseitems ); } ; break;} case 170: #line 918 "../kimwy.y" { yyval.yt_viewnames = Nilviewnames(); ; break;} case 171: #line 920 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( subst_name( yyvsp[0].yt_ID, mkcasestring( "base_view" ), mkcasestring( "base_uview" )), yyvsp[-1].yt_viewnames ); ; break;} case 172: #line 924 "../kimwy.y" { yyval.yt_unparseitems = Nilunparseitems(); ; break;} case 173: #line 926 "../kimwy.y" { yyval.yt_unparseitems = Consunparseitems( yyvsp[0].yt_unparseitem, yyvsp[-1].yt_unparseitems ); ; break;} case 174: #line 931 "../kimwy.y" { do_CEXPRDQ(); ; break;} case 175: #line 933 "../kimwy.y" { do_NORMAL(); ; break;} case 176: #line 935 "../kimwy.y" { yyval.yt_unparseitem = UnpStr( yyvsp[-3].yt_CexpressionDQ, yyvsp[0].yt_viewnameoption ); ; break;} case 177: #line 937 "../kimwy.y" { yyval.yt_unparseitem = UnpSubexpr( yyvsp[-1].yt_unpsubterm, yyvsp[0].yt_viewnameoption ); ; break;} case 178: #line 939 "../kimwy.y" { yyval.yt_unparseitem = UnpCtext( yyvsp[0].yt_Ctext ); ; break;} case 179: #line 941 "../kimwy.y" { yyval.yt_unparseitem = UnpBody( yyvsp[-1].yt_unparseitems ); ; break;} case 180: #line 946 "../kimwy.y" { yyval.yt_unpsubterm = UnpSubTerm( yyvsp[0].yt_ID ); ; break;} case 181: #line 948 "../kimwy.y" { yyval.yt_unpsubterm = UnpDollarvarTerm( yyvsp[0].yt_INT ); ; break;} case 182: #line 950 "../kimwy.y" { yyval.yt_unpsubterm = UnpSubAttr( yyvsp[-1].yt_ID, yyvsp[0].yt_unpattributes ); ; break;} case 183: #line 952 "../kimwy.y" { yyval.yt_unpsubterm = UnpDollarvarAttr( yyvsp[-1].yt_INT, yyvsp[0].yt_unpattributes ); ; break;} case 184: #line 954 "../kimwy.y" { yyval.yt_unpsubterm = UnpCastedVariable( yyvsp[-2].yt_ID, yyvsp[0].yt_ID ); ; break;} case 185: #line 959 "../kimwy.y" { yyval.yt_unpattributes = Consunpattributes( yyvsp[0].yt_ID, Nilunpattributes() ); ; break;} case 186: #line 961 "../kimwy.y" { yyval.yt_unpattributes = Consunpattributes( yyvsp[0].yt_ID, yyvsp[-1].yt_unpattributes ); ; break;} case 187: #line 966 "../kimwy.y" { yyval.yt_ID = yyvsp[0].yt_ID; ; break;} case 188: #line 971 "../kimwy.y" { yyval.yt_viewnameoption = NoViewname(); ; break;} case 189: #line 973 "../kimwy.y" { yyval.yt_viewnameoption = YesViewname( yyvsp[0].yt_ID ); ; break;} case 190: #line 978 "../kimwy.y" { yyval.yt_viewnames = yyvsp[-1].yt_viewnames; pg_uviewshavebeendefined = True; ; break;} case 191: #line 983 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, Nilviewnames()); v_add_to_uviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserUView() ); ; break;} case 192: #line 987 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, yyvsp[-1].yt_viewnames ); v_add_to_uviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserUView() ); ; break;} case 193: #line 991 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, yyvsp[-2].yt_viewnames ); v_add_to_uviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserUView() ); ; break;} case 194: #line 998 "../kimwy.y" { yyval.yt_viewnames = yyvsp[-1].yt_viewnames; pg_rviewshavebeendefined = True; ; break;} case 195: #line 1003 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, Nilviewnames()); v_add_to_rviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserRView() ); ; break;} case 196: #line 1007 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, yyvsp[-1].yt_viewnames ); v_add_to_rviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserRView() ); ; break;} case 197: #line 1011 "../kimwy.y" { yyval.yt_viewnames = Consviewnames( yyvsp[0].yt_ID, yyvsp[-2].yt_viewnames ); v_add_to_rviewnames( yyvsp[0].yt_ID ); v_extendoccur( yyvsp[0].yt_ID, ITUserRView() ); ; break;} case 198: #line 1018 "../kimwy.y" { yyval.yt_storageclasses = yyvsp[-1].yt_storageclasses; pg_storageclasseshavebeendefined = True; ; break;} case 199: #line 1023 "../kimwy.y" { yyval.yt_storageclasses = Consstorageclasses( yyvsp[0].yt_ID, Nilstorageclasses()); v_add_to_storageclasses( yyvsp[0].yt_ID, f_emptyId() ); v_extendoccur( yyvsp[0].yt_ID, ITStorageClass() ); ; break;} case 200: #line 1027 "../kimwy.y" { yyval.yt_storageclasses = Consstorageclasses( yyvsp[0].yt_ID, yyvsp[-1].yt_storageclasses ); v_add_to_storageclasses( yyvsp[0].yt_ID, f_emptyId() ); v_extendoccur( yyvsp[0].yt_ID, ITStorageClass() ); ; break;} case 201: #line 1031 "../kimwy.y" { yyval.yt_storageclasses = Consstorageclasses( yyvsp[0].yt_ID, yyvsp[-2].yt_storageclasses ); v_add_to_storageclasses( yyvsp[0].yt_ID, f_emptyId() ); v_extendoccur( yyvsp[0].yt_ID, ITStorageClass() ); ; break;} case 202: #line 1038 "../kimwy.y" { ID tmp_id = f_ID_of_declarator(yyvsp[-2].yt_ac_declarator); fnclass tmp_type = f_fnclass_info(yyvsp[-3].yt_ac_declaration_specifiers, pg_filename); /* first check before making the FnAcDeclaration, to keep the * error message in a nice order */ check_proto_ac_parameter_declaration( tmp_id->file, tmp_id->line, yyvsp[-1].yt_ac_declaration_list, yyvsp[-2].yt_ac_declarator ); yyval.yt_fndeclaration = FnAcDeclaration( yyvsp[-3].yt_ac_declaration_specifiers, yyvsp[-2].yt_ac_declarator, yyvsp[-1].yt_ac_declaration_list, yyvsp[0].yt_Ctext, tmp_id, tmp_type ); pf_resetwithvariable(); v_defoccur( tmp_id, ITUserFunction( tmp_type ) ); yyval.yt_fndeclaration->file = pg_filename; yyval.yt_fndeclaration->last_line = pg_lineno; ; break;} case 203: #line 1052 "../kimwy.y" { yyval.yt_ac_declaration = AcDeclaration( yyvsp[-2].yt_ac_declaration_specifiers, yyvsp[-1].yt_ac_init_declarator_list ); ; break;} case 204: #line 1057 "../kimwy.y" { yyval.yt_ac_declaration_list = Nilac_declaration_list(); ; break;} case 205: #line 1059 "../kimwy.y" { yyval.yt_ac_declaration_list = yyvsp[0].yt_ac_declaration_list; ; break;} case 206: #line 1063 "../kimwy.y" { yyval.yt_ac_declaration_list = Consac_declaration_list( yyvsp[0].yt_ac_declaration, Nilac_declaration_list() ); ; break;} case 207: #line 1065 "../kimwy.y" { yyval.yt_ac_declaration_list = Consac_declaration_list( yyvsp[0].yt_ac_declaration, yyvsp[-1].yt_ac_declaration_list ); ; break;} case 208: #line 1074 "../kimwy.y" { yyval.yt_ac_declaration_specifiers = Consac_declaration_specifiers( AcDeclSpecTypeSpec( yyvsp[0].yt_ac_type_specifier ), Nilac_declaration_specifiers() ); ; break;} case 209: #line 1078 "../kimwy.y" { yyval.yt_ac_declaration_specifiers = Consac_declaration_specifiers( AcDeclSpecTypeSpec( yyvsp[0].yt_ac_type_specifier ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( yyvsp[-1].yt_ac_storage_class_specifier ), Nilac_declaration_specifiers() )); ; break;} case 210: #line 1084 "../kimwy.y" { yyval.yt_ac_declaration_specifiers = Consac_declaration_specifiers( AcDeclSpecTypeSpec( yyvsp[0].yt_ac_type_specifier ), Consac_declaration_specifiers( AcDeclSpecTypeQual( yyvsp[-1].yt_ac_type_qualifier ), Nilac_declaration_specifiers() )); ; break;} case 211: #line 1090 "../kimwy.y" { yyval.yt_ac_declaration_specifiers = Consac_declaration_specifiers( AcDeclSpecTypeSpec( yyvsp[0].yt_ac_type_specifier ), Consac_declaration_specifiers( AcDeclSpecTypeQual( yyvsp[-1].yt_ac_type_qualifier ), Consac_declaration_specifiers( AcDeclSpecStorageSpec( yyvsp[-2].yt_ac_storage_class_specifier ), Nilac_declaration_specifiers() ))); ; break;} case 212: #line 1101 "../kimwy.y" { yyval.yt_ac_storage_class_specifier = AcAuto(); ; break;} case 213: #line 1103 "../kimwy.y" { yyval.yt_ac_storage_class_specifier = AcRegister(); ; break;} case 214: #line 1105 "../kimwy.y" { yyval.yt_ac_storage_class_specifier = AcStatic(); ; break;} case 215: #line 1107 "../kimwy.y" { yyval.yt_ac_storage_class_specifier = AcExtern(); ; break;} case 216: #line 1109 "../kimwy.y" { yyval.yt_ac_storage_class_specifier = AcTypedef(); ; break;} case 217: #line 1114 "../kimwy.y" { yyval.yt_ac_type_specifier = AcTypeSpec( yyvsp[0].yt_ID ); ; break;} case 218: #line 1119 "../kimwy.y" { yyval.yt_ac_type_qualifier = AcConst(); ; break;} case 219: #line 1121 "../kimwy.y" { yyval.yt_ac_type_qualifier = AcVolatile(); ; break;} case 220: #line 1126 "../kimwy.y" { yyval.yt_ac_init_declarator_list = Nilac_init_declarator_list(); ; break;} case 221: #line 1128 "../kimwy.y" { yyval.yt_ac_init_declarator_list = yyvsp[0].yt_ac_init_declarator_list; ; break;} case 222: #line 1132 "../kimwy.y" { yyval.yt_ac_init_declarator_list = Consac_init_declarator_list( yyvsp[0].yt_ac_init_declarator, Nilac_init_declarator_list() ); ; break;} case 223: #line 1134 "../kimwy.y" { yyval.yt_ac_init_declarator_list = Consac_init_declarator_list( yyvsp[0].yt_ac_init_declarator, yyvsp[-2].yt_ac_init_declarator_list ); ; break;} case 224: #line 1139 "../kimwy.y" { yyval.yt_ac_init_declarator = AcInitDecl( yyvsp[0].yt_ac_declarator ); ; break;} case 225: #line 1147 "../kimwy.y" { yyval.yt_ac_declarator = AcDeclarator( Nopointer(), yyvsp[0].yt_ac_direct_declarator ); ; break;} case 226: #line 1149 "../kimwy.y" { yyval.yt_ac_declarator = AcDeclarator( Yespointer( yyvsp[-1].yt_ac_pointer ), yyvsp[0].yt_ac_direct_declarator ); ; break;} case 227: #line 1154 "../kimwy.y" { yyval.yt_ac_declarator = AcDeclarator(Nopointer(), yyvsp[0].yt_ac_direct_declarator ); ; break;} case 228: #line 1156 "../kimwy.y" { yyval.yt_ac_declarator = AcDeclarator( Yespointer( yyvsp[-1].yt_ac_pointer ), yyvsp[0].yt_ac_direct_declarator ); ; break;} case 229: #line 1161 "../kimwy.y" { yyval.yt_ac_declarator = AcDeclarator( Yespointer( yyvsp[-1].yt_ac_pointer ), yyvsp[0].yt_ac_direct_declarator ); ; break;} case 230: #line 1166 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclId( yyvsp[0].yt_ID ); ; break;} case 231: #line 1168 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclPack( yyvsp[-1].yt_ac_declarator ); ; break;} case 232: #line 1170 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclArray( yyvsp[-3].yt_ac_direct_declarator, yyvsp[-1].yt_ac_constant_expression_option ); ; break;} case 233: #line 1172 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclProto( yyvsp[-3].yt_ac_direct_declarator, yyvsp[-1].yt_ac_parameter_type_list ); ; break;} case 234: #line 1174 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclKandR( yyvsp[-2].yt_ac_direct_declarator, Nilac_identifier_list() ); ; break;} case 235: #line 1176 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclKandR( yyvsp[-3].yt_ac_direct_declarator, yyvsp[-1].yt_ac_identifier_list ); ; break;} case 236: #line 1181 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclProto( AcDirectDeclId( yyvsp[-3].yt_ID ), yyvsp[-1].yt_ac_parameter_type_list ); ; break;} case 237: #line 1183 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclKandR( AcDirectDeclId( yyvsp[-2].yt_ID ), Nilac_identifier_list() ); ; break;} case 238: #line 1185 "../kimwy.y" { yyval.yt_ac_direct_declarator = AcDirectDeclKandR( AcDirectDeclId( yyvsp[-3].yt_ID ), yyvsp[-1].yt_ac_identifier_list ); ; break;} case 239: #line 1190 "../kimwy.y" { yyval.yt_ac_pointer = AcPointerNil( Nilac_type_qualifier_list() ); ; break;} case 240: #line 1192 "../kimwy.y" { yyval.yt_ac_pointer = AcPointerNil( yyvsp[0].yt_ac_type_qualifier_list ); ; break;} case 241: #line 1194 "../kimwy.y" { yyval.yt_ac_pointer = AcPointerCons( Nilac_type_qualifier_list(), yyvsp[0].yt_ac_pointer ); ; break;} case 242: #line 1196 "../kimwy.y" { yyval.yt_ac_pointer = AcPointerCons( yyvsp[-1].yt_ac_type_qualifier_list, yyvsp[0].yt_ac_pointer ); ; break;} case 243: #line 1201 "../kimwy.y" { yyval.yt_ac_type_qualifier_list = Consac_type_qualifier_list( yyvsp[0].yt_ac_type_qualifier, Nilac_type_qualifier_list() ); ; break;} case 244: #line 1203 "../kimwy.y" { yyval.yt_ac_type_qualifier_list = Consac_type_qualifier_list( yyvsp[0].yt_ac_type_qualifier, yyvsp[-1].yt_ac_type_qualifier_list ); ; break;} case 245: #line 1208 "../kimwy.y" { yyval.yt_ac_parameter_type_list = AcParList( yyvsp[0].yt_ac_parameter_list ); ; break;} case 246: #line 1210 "../kimwy.y" { yyval.yt_ac_parameter_type_list = AcParList3Dot( yyvsp[-2].yt_ac_parameter_list ); ; break;} case 247: #line 1215 "../kimwy.y" { yyval.yt_ac_parameter_list = Consac_parameter_list( yyvsp[0].yt_ac_parameter_declaration, Nilac_parameter_list() ); ; break;} case 248: #line 1217 "../kimwy.y" { yyval.yt_ac_parameter_list = Consac_parameter_list( yyvsp[0].yt_ac_parameter_declaration, yyvsp[-2].yt_ac_parameter_list ); ; break;} case 249: #line 1222 "../kimwy.y" { yyval.yt_ac_parameter_declaration = AcParDeclDecl( yyvsp[-1].yt_ac_declaration_specifiers, yyvsp[0].yt_ac_declarator ); ; break;} case 250: #line 1224 "../kimwy.y" { yyval.yt_ac_parameter_declaration = AcParDeclAbsdecl( yyvsp[-1].yt_ac_declaration_specifiers, yyvsp[0].yt_ac_abstract_declarator ); ; break;} case 251: #line 1229 "../kimwy.y" { yyval.yt_ac_identifier_list = Consac_identifier_list( yyvsp[0].yt_ID, Nilac_identifier_list() ); ; break;} case 252: #line 1231 "../kimwy.y" { yyval.yt_ac_identifier_list = Consac_identifier_list( yyvsp[0].yt_ID, yyvsp[-2].yt_ac_identifier_list ); ; break;} case 253: #line 1236 "../kimwy.y" { yyval.yt_ac_abstract_declarator = AcAbsdeclPointer( yyvsp[0].yt_ac_pointer ); ; break;} case 254: #line 1238 "../kimwy.y" { yyval.yt_ac_abstract_declarator = AcAbsdeclDirdecl( Nopointer(), yyvsp[0].yt_ac_direct_abstract_declarator ); ; break;} case 255: #line 1240 "../kimwy.y" { yyval.yt_ac_abstract_declarator = AcAbsdeclDirdecl( Yespointer( yyvsp[-1].yt_ac_pointer ), yyvsp[0].yt_ac_direct_abstract_declarator ); ; break;} case 256: #line 1245 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclPack( yyvsp[-1].yt_ac_abstract_declarator ); ; break;} case 257: #line 1247 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclArray( Yesac_direct_abstract_declarator( yyvsp[-3].yt_ac_direct_abstract_declarator ), yyvsp[-1].yt_ac_constant_expression_option ); ; break;} case 258: #line 1249 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclArray( Noac_direct_abstract_declarator(), yyvsp[-1].yt_ac_constant_expression_option ); ; break;} case 259: #line 1251 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclFn( Yesac_direct_abstract_declarator( yyvsp[-2].yt_ac_direct_abstract_declarator ), AcParList( Nilac_parameter_list() )); ; break;} case 260: #line 1254 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclFn( Yesac_direct_abstract_declarator( yyvsp[-3].yt_ac_direct_abstract_declarator ), yyvsp[-1].yt_ac_parameter_type_list ); ; break;} case 261: #line 1257 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclFn( Noac_direct_abstract_declarator(), AcParList( Nilac_parameter_list() )); ; break;} case 262: #line 1260 "../kimwy.y" { yyval.yt_ac_direct_abstract_declarator = AcDirAbsdeclFn( Noac_direct_abstract_declarator(), yyvsp[-1].yt_ac_parameter_type_list ); ; break;} case 263: #line 1269 "../kimwy.y" { yyval.yt_ac_constant_expression_option = Yesac_constant_expression( yyvsp[0].yt_ac_constant_expression ); ; break;} case 264: #line 1272 "../kimwy.y" { do_CEXPR(); ; break;} case 265: #line 1274 "../kimwy.y" { do_NORMAL(); yyval.yt_ac_constant_expression = AcConstExpr( yyvsp[0].yt_Cexpression ); ; break;} case 266: #line 1280 "../kimwy.y" { yyval.yt_ID = yyvsp[0].yt_ID; ; break;} case 267: #line 1282 "../kimwy.y" { yyval.yt_ID = yyvsp[0].yt_ID; pf_setwithvariable( yyvsp[0].yt_ID ); ; break;} case 268: #line 1287 "../kimwy.y" { yyval.yt_Ctext = yyvsp[0].yt_Ctext; ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 457 "/usr/local/lib/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++; # ifdef YYERRMSG_VERBOSE size += strlen(error_message[yystate][2]) + 15; # endif /* YYERRMSG_VERBOSE */ 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++; } } # ifdef YYERRMSG_VERBOSE strcat(msg, error_message[yystate][2]); # endif /* YYERRMSG_VERBOSE */ yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #else # ifdef YYERRMSG_VERBOSE { int size = 0; char *msg; size += strlen(error_message[yystate][2]) + 15; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); strcat(msg, error_message[yystate][2]); yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } } else { if (yyrecover) yyerror("error recovery token ignored"); else # endif /* YYERRMSG_VERBOSE */ #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 1290 "../kimwy.y"