lib Library API Documentation

yacc.cc

00001 /* A Bison parser, made from yacc.yy 00002 by GNU bison 1.35. */ 00003 00004 #define YYBISON 1 /* Identify Bison output. */ 00005 00006 # define T_MATCH_LINE 257 00007 # define T_LINE 258 00008 # define T_INPUT 259 00009 # define T_AMPERSAND 260 00010 # define T_ASTERISK 261 00011 # define T_CASE 262 00012 # define T_CHARACTER_LITERAL 263 00013 # define T_CIRCUMFLEX 264 00014 # define T_COLON 265 00015 # define T_COMMA 266 00016 # define T_CONST 267 00017 # define T_DEFAULT 268 00018 # define T_ENUM 269 00019 # define T_EQUAL 270 00020 # define T_FALSE 271 00021 # define T_FLOATING_PT_LITERAL 272 00022 # define T_GREATER_THAN_SIGN 273 00023 # define T_IDENTIFIER 274 00024 # define T_IN 275 00025 # define T_INOUT 276 00026 # define T_INTEGER_LITERAL 277 00027 # define T_LEFT_CURLY_BRACKET 278 00028 # define T_LEFT_PARANTHESIS 279 00029 # define T_LEFT_SQUARE_BRACKET 280 00030 # define T_LESS_THAN_SIGN 281 00031 # define T_MINUS_SIGN 282 00032 # define T_OUT 283 00033 # define T_PERCENT_SIGN 284 00034 # define T_PLUS_SIGN 285 00035 # define T_RIGHT_CURLY_BRACKET 286 00036 # define T_RIGHT_PARANTHESIS 287 00037 # define T_RIGHT_SQUARE_BRACKET 288 00038 # define T_SCOPE 289 00039 # define T_SEMICOLON 290 00040 # define T_SHIFTLEFT 291 00041 # define T_SHIFTRIGHT 292 00042 # define T_SOLIDUS 293 00043 # define T_STRING_LITERAL 294 00044 # define T_STRUCT 295 00045 # define T_SWITCH 296 00046 # define T_TILDE 297 00047 # define T_TRUE 298 00048 # define T_VERTICAL_LINE 299 00049 # define T_LESS_OR_EQUAL 300 00050 # define T_GREATER_OR_EQUAL 301 00051 # define T_ASSIGN 302 00052 # define T_NOTEQUAL 303 00053 # define T_MEMBER 304 00054 # define T_WHILE 305 00055 # define T_IF 306 00056 # define T_ELSE 307 00057 # define T_FOR 308 00058 # define T_DO 309 00059 # define T_INCR 310 00060 # define T_DECR 311 00061 # define T_MAIN 312 00062 # define T_FOREACH 313 00063 # define T_SUBST 314 00064 # define T_MATCH 315 00065 # define T_NOT 316 00066 # define T_RETURN 317 00067 # define T_IMPORT 318 00068 # define T_VAR 319 00069 # define T_CATCH 320 00070 # define T_TRY 321 00071 # define T_RAISE 322 00072 # define T_RANGE 323 00073 # define T_CELL 324 00074 # define T_FROM 325 00075 # define T_PLUS_ASSIGN 326 00076 # define T_MINUS_ASSIGN 327 00077 # define T_AND 328 00078 # define T_OR 329 00079 # define T_DOLLAR 330 00080 # define T_UNKNOWN 331 00081 00082 #line 20 "yacc.yy" 00083 00084 00085 #include "koscript_parsenode.h" 00086 #include "koscript_parser.h" 00087 #include <stdlib.h> 00088 00089 #ifdef __DECCXX 00090 #include <alloca.h> 00091 #endif 00092 00093 #include <qstring.h> 00094 00095 extern int yylex(); 00096 00097 extern QString idl_lexFile; 00098 extern int idl_line_no; 00099 00100 void kscriptInitFlex( const char *_code, int extension, KLocale* ); 00101 void kscriptInitFlex( int extension, KLocale* ); 00102 void kspread_mode(); 00103 00104 void yyerror( const char *s ) 00105 { 00106 theParser->parse_error( idl_lexFile.local8Bit(), s, idl_line_no ); 00107 } 00108 00109 00110 #line 48 "yacc.yy" 00111 #ifndef YYSTYPE 00112 typedef union 00113 { 00114 QString *ident; 00115 KSParseNode *node; 00116 KScript::Long _int; 00117 QString *_str; 00118 ushort _char; 00119 KScript::Double _float; 00120 } yystype; 00121 # define YYSTYPE yystype 00122 # define YYSTYPE_IS_TRIVIAL 1 00123 #endif 00124 #ifndef YYDEBUG 00125 # define YYDEBUG 1 00126 #endif 00127 00128 00129 00130 #define YYFINAL 303 00131 #define YYFLAG -32768 00132 #define YYNTBASE 78 00133 00134 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ 00135 #define YYTRANSLATE(x) ((unsigned)(x) <= 331 ? yytranslate[x] : 122) 00136 00137 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ 00138 static const char yytranslate[] = 00139 { 00140 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00147 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00149 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00151 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00154 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00155 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00156 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00157 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00160 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00162 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00163 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00164 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00165 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 00166 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 00167 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 00168 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 00169 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 00170 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 00171 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 00172 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 00173 76, 77 00174 }; 00175 00176 #if YYDEBUG 00177 static const short yyprhs[] = 00178 { 00179 0, 0, 1, 2, 6, 8, 10, 13, 16, 19, 00180 22, 26, 32, 38, 40, 42, 46, 51, 59, 61, 00181 64, 68, 72, 76, 78, 82, 84, 88, 90, 94, 00182 98, 102, 106, 110, 114, 116, 118, 122, 124, 128, 00183 130, 134, 136, 140, 144, 146, 150, 154, 156, 160, 00184 164, 168, 171, 174, 177, 180, 182, 187, 192, 196, 00185 201, 203, 207, 209, 213, 215, 218, 221, 224, 227, 00186 229, 232, 235, 237, 239, 241, 243, 245, 249, 253, 00187 255, 257, 259, 261, 263, 265, 267, 269, 272, 276, 00188 279, 283, 285, 288, 292, 294, 302, 308, 314, 316, 00189 319, 322, 326, 329, 331, 335, 341, 348, 350, 354, 00190 357, 362, 365, 368, 369, 371, 373, 376, 379, 385, 00191 388, 392, 394, 400, 404, 406, 409, 419, 429, 434, 00192 437, 447, 452, 459, 467, 477, 478, 486, 489, 494 00193 }; 00194 static const short yyrhs[] = 00195 { 00196 -1, 0, 48, 79, 88, 0, 80, 0, 81, 0, 00197 81, 80, 0, 117, 36, 0, 105, 36, 0, 109, 00198 32, 0, 64, 20, 36, 0, 71, 20, 64, 7, 00199 36, 0, 71, 20, 64, 82, 36, 0, 83, 0, 00200 20, 0, 20, 12, 82, 0, 58, 24, 112, 32, 00201 0, 58, 25, 110, 33, 24, 112, 32, 0, 20, 00202 0, 35, 20, 0, 86, 48, 85, 0, 86, 72, 00203 85, 0, 86, 73, 85, 0, 86, 0, 87, 75, 00204 86, 0, 87, 0, 88, 74, 87, 0, 88, 0, 00205 89, 16, 88, 0, 89, 49, 88, 0, 89, 46, 00206 88, 0, 89, 47, 88, 0, 89, 27, 88, 0, 00207 89, 19, 88, 0, 89, 0, 90, 0, 89, 45, 00208 90, 0, 91, 0, 90, 10, 91, 0, 92, 0, 00209 91, 6, 92, 0, 93, 0, 92, 38, 93, 0, 00210 92, 37, 93, 0, 94, 0, 93, 31, 94, 0, 00211 93, 28, 94, 0, 95, 0, 94, 7, 95, 0, 00212 94, 39, 95, 0, 94, 30, 95, 0, 28, 96, 00213 0, 31, 96, 0, 43, 96, 0, 62, 96, 0, 00214 96, 0, 96, 26, 85, 34, 0, 96, 24, 85, 00215 32, 0, 96, 25, 33, 0, 96, 25, 97, 33, 00216 0, 98, 0, 85, 12, 97, 0, 85, 0, 96, 00217 50, 20, 0, 99, 0, 56, 100, 0, 57, 100, 00218 0, 100, 56, 0, 100, 57, 0, 100, 0, 101, 00219 61, 0, 101, 60, 0, 101, 0, 84, 0, 102, 00220 0, 5, 0, 3, 0, 27, 89, 19, 0, 25, 00221 85, 33, 0, 23, 0, 70, 0, 69, 0, 40, 00222 0, 9, 0, 18, 0, 44, 0, 17, 0, 26, 00223 34, 0, 26, 103, 34, 0, 24, 32, 0, 24, 00224 104, 32, 0, 4, 0, 76, 23, 0, 85, 12, 00225 103, 0, 85, 0, 25, 85, 12, 88, 33, 12, 00226 104, 0, 25, 85, 12, 88, 33, 0, 41, 20, 00227 24, 106, 32, 0, 107, 0, 107, 106, 0, 109, 00228 32, 0, 65, 108, 36, 0, 117, 36, 0, 20, 00229 0, 20, 12, 108, 0, 20, 25, 33, 24, 112, 00230 0, 20, 25, 110, 33, 24, 112, 0, 111, 0, 00231 111, 12, 110, 0, 21, 20, 0, 21, 20, 48, 00232 85, 0, 29, 20, 0, 22, 20, 0, 0, 113, 00233 0, 114, 0, 114, 113, 0, 85, 36, 0, 68, 00234 85, 12, 85, 36, 0, 63, 36, 0, 63, 85, 00235 36, 0, 118, 0, 67, 24, 113, 32, 115, 0, 00236 24, 113, 32, 0, 116, 0, 116, 115, 0, 66, 00237 25, 85, 12, 20, 33, 24, 113, 32, 0, 14, 00238 25, 20, 12, 20, 33, 24, 113, 32, 0, 13, 00239 20, 48, 88, 0, 120, 121, 0, 54, 25, 85, 00240 36, 85, 36, 85, 33, 121, 0, 55, 121, 120, 00241 36, 0, 52, 25, 85, 33, 121, 119, 0, 59, 00242 25, 20, 12, 85, 33, 121, 0, 59, 25, 20, 00243 12, 20, 12, 85, 33, 121, 0, 0, 53, 52, 00244 25, 85, 33, 121, 119, 0, 53, 121, 0, 51, 00245 25, 85, 33, 0, 24, 112, 32, 0 00246 }; 00247 00248 #endif 00249 00250 #if YYDEBUG 00251 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 00252 static const short yyrline[] = 00253 { 00254 0, 181, 185, 185, 189, 196, 203, 227, 231, 235, 00255 239, 244, 250, 256, 263, 267, 276, 282, 291, 296, 00256 308, 312, 316, 320, 327, 331, 338, 342, 349, 353, 00257 357, 361, 365, 369, 373, 381, 385, 393, 397, 405, 00258 409, 417, 421, 425, 433, 437, 441, 449, 453, 457, 00259 461, 469, 473, 477, 481, 485, 492, 496, 500, 504, 00260 508, 515, 520, 527, 532, 539, 543, 547, 552, 557, 00261 564, 569, 574, 582, 586, 590, 594, 599, 600, 609, 00262 614, 619, 624, 629, 634, 639, 644, 649, 653, 657, 00263 661, 665, 669, 677, 681, 688, 692, 702, 711, 718, 00264 741, 745, 749, 756, 761, 769, 775, 783, 787, 794, 00265 799, 804, 809, 817, 821, 828, 832, 840, 844, 848, 00266 852, 856, 860, 864, 871, 875, 883, 889, 900, 908, 00267 912, 916, 920, 924, 929, 939, 943, 947, 954, 961 00268 }; 00269 #endif 00270 00271 00272 #if (YYDEBUG) || defined YYERROR_VERBOSE 00273 00274 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ 00275 static const char *const yytname[] = 00276 { 00277 "$", "error", "$undefined.", "T_MATCH_LINE", "T_LINE", "T_INPUT", 00278 "T_AMPERSAND", "T_ASTERISK", "T_CASE", "T_CHARACTER_LITERAL", 00279 "T_CIRCUMFLEX", "T_COLON", "T_COMMA", "T_CONST", "T_DEFAULT", "T_ENUM", 00280 "T_EQUAL", "T_FALSE", "T_FLOATING_PT_LITERAL", "T_GREATER_THAN_SIGN", 00281 "T_IDENTIFIER", "T_IN", "T_INOUT", "T_INTEGER_LITERAL", 00282 "T_LEFT_CURLY_BRACKET", "T_LEFT_PARANTHESIS", "T_LEFT_SQUARE_BRACKET", 00283 "T_LESS_THAN_SIGN", "T_MINUS_SIGN", "T_OUT", "T_PERCENT_SIGN", 00284 "T_PLUS_SIGN", "T_RIGHT_CURLY_BRACKET", "T_RIGHT_PARANTHESIS", 00285 "T_RIGHT_SQUARE_BRACKET", "T_SCOPE", "T_SEMICOLON", "T_SHIFTLEFT", 00286 "T_SHIFTRIGHT", "T_SOLIDUS", "T_STRING_LITERAL", "T_STRUCT", "T_SWITCH", 00287 "T_TILDE", "T_TRUE", "T_VERTICAL_LINE", "T_LESS_OR_EQUAL", 00288 "T_GREATER_OR_EQUAL", "T_ASSIGN", "T_NOTEQUAL", "T_MEMBER", "T_WHILE", 00289 "T_IF", "T_ELSE", "T_FOR", "T_DO", "T_INCR", "T_DECR", "T_MAIN", 00290 "T_FOREACH", "T_SUBST", "T_MATCH", "T_NOT", "T_RETURN", "T_IMPORT", 00291 "T_VAR", "T_CATCH", "T_TRY", "T_RAISE", "T_RANGE", "T_CELL", "T_FROM", 00292 "T_PLUS_ASSIGN", "T_MINUS_ASSIGN", "T_AND", "T_OR", "T_DOLLAR", 00293 "T_UNKNOWN", "specification", "@1", "definitions", "definition", 00294 "import_list", "main", "scoped_name", "assign_expr", "bool_or", 00295 "bool_and", "equal_expr", "or_expr", "xor_expr", "and_expr", 00296 "shift_expr", "add_expr", "mult_expr", "unary_expr", "index_expr", 00297 "func_call_params", "member_expr", "incr_expr", "match_expr", 00298 "primary_expr", "literal", "array_elements", "dict_elements", 00299 "struct_dcl", "struct_exports", "struct_export", "struct_members", 00300 "func_dcl", "func_params", "func_param", "func_body", "func_lines", 00301 "func_line", "catches", "single_catch", "const_dcl", "loops", "else", 00302 "while", "loop_body", 0 00303 }; 00304 #endif 00305 00306 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 00307 static const short yyr1[] = 00308 { 00309 0, 78, 79, 78, 78, 80, 80, 81, 81, 81, 00310 81, 81, 81, 81, 82, 82, 83, 83, 84, 84, 00311 85, 85, 85, 85, 86, 86, 87, 87, 88, 88, 00312 88, 88, 88, 88, 88, 89, 89, 90, 90, 91, 00313 91, 92, 92, 92, 93, 93, 93, 94, 94, 94, 00314 94, 95, 95, 95, 95, 95, 96, 96, 96, 96, 00315 96, 97, 97, 98, 98, 99, 99, 99, 99, 99, 00316 100, 100, 100, 101, 101, 101, 101, 101, 101, 102, 00317 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 00318 102, 102, 102, 103, 103, 104, 104, 105, 106, 106, 00319 107, 107, 107, 108, 108, 109, 109, 110, 110, 111, 00320 111, 111, 111, 112, 112, 113, 113, 114, 114, 114, 00321 114, 114, 114, 114, 115, 115, 116, 116, 117, 118, 00322 118, 118, 118, 118, 118, 119, 119, 119, 120, 121 00323 }; 00324 00325 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 00326 static const short yyr2[] = 00327 { 00328 0, 0, 0, 3, 1, 1, 2, 2, 2, 2, 00329 3, 5, 5, 1, 1, 3, 4, 7, 1, 2, 00330 3, 3, 3, 1, 3, 1, 3, 1, 3, 3, 00331 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 00332 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 00333 3, 2, 2, 2, 2, 1, 4, 4, 3, 4, 00334 1, 3, 1, 3, 1, 2, 2, 2, 2, 1, 00335 2, 2, 1, 1, 1, 1, 1, 3, 3, 1, 00336 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 00337 3, 1, 2, 3, 1, 7, 5, 5, 1, 2, 00338 2, 3, 2, 1, 3, 5, 6, 1, 3, 2, 00339 4, 2, 2, 0, 1, 1, 2, 2, 5, 2, 00340 3, 1, 5, 3, 1, 2, 9, 9, 4, 2, 00341 9, 4, 6, 7, 9, 0, 7, 2, 4, 3 00342 }; 00343 00344 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 00345 doesn't specify something else to do. Zero means the default is an 00346 error. */ 00347 static const short yydefact[] = 00348 { 00349 1, 0, 0, 0, 2, 0, 0, 0, 4, 5, 00350 13, 0, 0, 0, 0, 0, 0, 0, 113, 0, 00351 0, 0, 6, 8, 9, 7, 0, 0, 0, 0, 00352 0, 0, 107, 0, 76, 91, 75, 83, 86, 84, 00353 18, 79, 0, 0, 0, 0, 0, 0, 0, 82, 00354 0, 85, 0, 0, 0, 81, 80, 0, 73, 3, 00355 34, 35, 37, 39, 41, 44, 47, 55, 60, 64, 00356 69, 72, 74, 0, 0, 0, 0, 0, 0, 0, 00357 0, 0, 0, 23, 25, 27, 0, 114, 115, 121, 00358 0, 0, 10, 0, 128, 109, 112, 111, 113, 0, 00359 0, 0, 0, 98, 0, 0, 0, 89, 0, 0, 00360 87, 94, 0, 0, 51, 52, 19, 53, 65, 66, 00361 54, 92, 0, 0, 0, 0, 0, 0, 0, 0, 00362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00363 0, 0, 67, 68, 71, 70, 0, 0, 0, 0, 00364 0, 113, 0, 0, 119, 0, 0, 0, 117, 0, 00365 0, 0, 0, 0, 16, 116, 129, 0, 0, 14, 00366 0, 0, 105, 113, 108, 103, 0, 97, 99, 100, 00367 102, 0, 90, 78, 0, 88, 77, 28, 33, 32, 00368 36, 30, 31, 29, 38, 40, 43, 42, 46, 45, 00369 48, 50, 49, 0, 58, 62, 0, 0, 63, 0, 00370 123, 0, 0, 0, 0, 0, 0, 120, 0, 0, 00371 20, 21, 22, 24, 26, 113, 11, 0, 12, 110, 00372 106, 0, 101, 0, 93, 57, 0, 59, 56, 138, 00373 0, 0, 139, 131, 0, 0, 0, 0, 15, 104, 00374 0, 61, 135, 0, 18, 0, 0, 0, 122, 124, 00375 118, 17, 96, 0, 132, 0, 0, 0, 0, 0, 00376 125, 0, 0, 137, 0, 0, 133, 0, 0, 95, 00377 0, 0, 0, 0, 0, 0, 130, 134, 0, 0, 00378 0, 0, 0, 135, 0, 0, 136, 0, 0, 127, 00379 126, 0, 0, 0 00380 }; 00381 00382 static const short yydefgoto[] = 00383 { 00384 301, 17, 8, 9, 170, 10, 58, 82, 83, 84, 00385 85, 60, 61, 62, 63, 64, 65, 66, 67, 206, 00386 68, 69, 70, 71, 72, 112, 108, 11, 102, 103, 00387 176, 12, 31, 32, 86, 87, 88, 258, 259, 13, 00388 89, 264, 90, 152 00389 }; 00390 00391 static const short yypact[] = 00392 { 00393 -4, 21, -5, 39,-32768, 47, 41, 65,-32768, 10, 00394 -32768, -3, 55, 53, 46, 141, 78, 470, 292, 103, 00395 68, 44,-32768,-32768,-32768,-32768, 470, 92, 102, 111, 00396 109, 116, 123, -1,-32768,-32768,-32768,-32768,-32768,-32768, 00397 -32768,-32768, -10, 470, 22, 470, 133, 133, 132,-32768, 00398 133,-32768, 580, 580, 133,-32768,-32768, 131,-32768,-32768, 00399 74, 151, 169, -9, 42, 4,-32768, 119,-32768,-32768, 00400 26, 79,-32768, 224, 154, 155, 156, 159, 160, 360, 00401 162, 470, 148, 27, 112, 117, 163,-32768, 292,-32768, 00402 159, 161,-32768, 1,-32768, 140,-32768,-32768, 292, 168, 00403 103, 179, 172, -1, 174, 164, 470,-32768, 175, 177, 00404 -32768, 196, 178, 13, 119, 119,-32768, 119,-32768,-32768, 00405 119,-32768, 470, 470, 470, 470, 470, 470, 470, 470, 00406 470, 470, 470, 470, 470, 470, 470, 470, 470, 415, 00407 470, 191,-32768,-32768,-32768,-32768, 470, 181, 470, 470, 00408 470, 292, 165, 194,-32768, 182, 292, 203,-32768, 470, 00409 470, 470, 470, 470,-32768,-32768,-32768, 193, 183, 209, 00410 195, 470,-32768, 292,-32768, 218, 198,-32768,-32768,-32768, 00411 -32768, 220,-32768,-32768, 470,-32768,-32768,-32768,-32768,-32768, 00412 151,-32768,-32768,-32768, 169, -9, 42, 42, 4, 4, 00413 -32768,-32768,-32768, 204,-32768, 223, 205, 206,-32768, 2, 00414 -32768, 210, 212, 217, 207, 221, 234,-32768, 222, 470, 00415 -32768,-32768,-32768,-32768,-32768, 292,-32768, 238,-32768,-32768, 00416 -32768, 179,-32768, 470,-32768,-32768, 470,-32768,-32768,-32768, 00417 159, 470,-32768,-32768, 525, 3, 225, 228,-32768,-32768, 00418 229,-32768, 213, 227, 253, 236, 245, 246,-32768, 3, 00419 -32768,-32768, 260, 0,-32768, 470, 470, 159, 254, 470, 00420 -32768, 248, 252,-32768, 249, 251,-32768, 273, 276,-32768, 00421 470, 159, 159, 269, 270, 265,-32768,-32768, 266, 271, 00422 159, 278, 279, 213, 292, 292,-32768, 274, 275,-32768, 00423 -32768, 305, 308,-32768 00424 }; 00425 00426 static const short yypgoto[] = 00427 { 00428 -32768,-32768, 302,-32768, 86,-32768,-32768, -43, 152, 158, 00429 -13, 277, 199, 197, 200, 33, 38, 11, 80, 89, 00430 -32768,-32768, 114,-32768,-32768, 144, 58,-32768, 230,-32768, 00431 100, -27, -12,-32768, -96, -70,-32768, 75,-32768, -23, 00432 -32768, 45, 185, -85 00433 }; 00434 00435 00436 #define YYLAST 656 00437 00438 00439 static const short yytable[] = 00440 { 00441 109, 111, 172, 147, 59, 166, 104, 91, 168, 1, 00442 105, 135, 1, 94, 233, 106, 2, 256, 165, 2, 00443 15, 169, 107, 1, 151, 34, 35, 36, 131, 132, 00444 2, 37, 186, 23, 136, 183, 155, 3, 157, 38, 00445 39, 14, 40, 137, 4, 41, 42, 43, 44, 45, 00446 46, 3, 272, 47, 5, 214, 110, 48, 125, 16, 00447 6, 20, 49, 181, 101, 50, 51, 7, 5, 257, 00448 133, 18, 19, 134, 6, 159, 104, 230, 52, 53, 00449 105, 7, 142, 143, 54, 21, 218, 24, 174, 25, 00450 122, 55, 56, 123, 26, 203, 205, 207, 57, 160, 00451 161, 124, 33, 209, 92, 211, 212, 213, 93, 187, 00452 188, 189, 95, 191, 192, 193, 220, 221, 222, 125, 00453 126, 127, 96, 128, 27, 28, 114, 115, 229, 247, 00454 117, 97, 29, 98, 120, 100, 34, 35, 36, 144, 00455 145, 111, 37, 138, 139, 140, 200, 201, 202, 99, 00456 38, 39, 116, 40, 121, 252, 41, 42, 43, 44, 00457 45, 129, 27, 28, 196, 197, 118, 119, 48, 141, 00458 29, 198, 199, 49, 30, 130, 246, 51, 273, 148, 00459 149, 150, 276, 151, 158, 153, 156, 162, 171, 52, 00460 53, 163, 173, 205, 167, 164, 286, 287, 253, 175, 00461 180, 255, 55, 56, 177, 293, 179, 182, 184, 57, 00462 183, 208, 185, 210, 216, 219, 74, 225, 217, 226, 00463 250, 227, 274, 275, 297, 298, 278, 34, 35, 36, 00464 231, 228, 233, 37, 232, 236, 235, 285, 237, 242, 00465 238, 38, 39, 239, 40, 240, 244, 41, 73, 146, 00466 44, 45, 46, 241, 245, 47, 107, 243, 169, 48, 00467 261, 260, 262, 265, 49, 266, 263, 50, 51, 267, 00468 268, 269, 271, 106, 277, 74, 75, 280, 76, 77, 00469 52, 53, 281, 78, 282, 283, 54, 79, 284, 288, 00470 289, 80, 81, 55, 56, 34, 35, 36, 290, 291, 00471 57, 37, 294, 295, 292, 302, 299, 300, 303, 38, 00472 39, 22, 40, 248, 223, 41, 73, 43, 44, 45, 00473 46, 224, 113, 47, 190, 251, 194, 48, 234, 279, 00474 195, 249, 49, 178, 270, 50, 51, 215, 296, 0, 00475 0, 0, 0, 74, 75, 0, 76, 77, 52, 53, 00476 0, 78, 0, 0, 54, 79, 0, 0, 0, 80, 00477 81, 55, 56, 34, 35, 36, 0, 0, 57, 37, 00478 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 00479 40, 0, 0, 41, 42, 43, 44, 45, 46, 0, 00480 0, 47, 0, 0, 0, 48, 154, 0, 0, 0, 00481 49, 0, 0, 50, 51, 0, 0, 0, 0, 0, 00482 0, 0, 0, 0, 0, 0, 52, 53, 34, 35, 00483 36, 0, 54, 0, 37, 0, 0, 0, 0, 55, 00484 56, 0, 38, 39, 0, 40, 57, 0, 41, 42, 00485 43, 44, 45, 46, 0, 0, 47, 0, 204, 0, 00486 48, 0, 0, 0, 0, 49, 0, 0, 50, 51, 00487 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00488 0, 52, 53, 34, 35, 36, 0, 54, 0, 37, 00489 0, 0, 0, 0, 55, 56, 0, 38, 39, 0, 00490 40, 57, 0, 41, 42, 43, 44, 45, 46, 0, 00491 0, 47, 0, 0, 0, 48, 0, 0, 0, 0, 00492 49, 0, 0, 50, 51, 0, 0, 0, 0, 0, 00493 0, 0, 0, 0, 0, 0, 52, 53, 34, 35, 00494 36, 0, 54, 0, 37, 0, 0, 0, 0, 55, 00495 56, 0, 38, 39, 0, 254, 57, 0, 41, 42, 00496 43, 44, 45, 46, 0, 0, 47, 0, 0, 0, 00497 48, 0, 0, 0, 0, 49, 0, 0, 50, 51, 00498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00499 0, 52, 53, 34, 35, 36, 0, 54, 0, 37, 00500 0, 0, 0, 0, 55, 56, 0, 38, 39, 0, 00501 40, 57, 0, 41, 42, 43, 44, 45, 0, 0, 00502 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 00503 49, 0, 0, 0, 51, 0, 0, 0, 0, 0, 00504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00505 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 00506 56, 0, 0, 0, 0, 0, 57 00507 }; 00508 00509 static const short yycheck[] = 00510 { 00511 43, 44, 98, 73, 17, 90, 33, 19, 7, 13, 00512 33, 7, 13, 26, 12, 25, 20, 14, 88, 20, 00513 25, 20, 32, 13, 24, 3, 4, 5, 37, 38, 00514 20, 9, 19, 36, 30, 33, 79, 41, 81, 17, 00515 18, 20, 20, 39, 48, 23, 24, 25, 26, 27, 00516 28, 41, 52, 31, 58, 151, 34, 35, 45, 20, 00517 64, 20, 40, 106, 65, 43, 44, 71, 58, 66, 00518 28, 24, 25, 31, 64, 48, 103, 173, 56, 57, 00519 103, 71, 56, 57, 62, 20, 156, 32, 100, 36, 00520 16, 69, 70, 19, 48, 138, 139, 140, 76, 72, 00521 73, 27, 24, 146, 36, 148, 149, 150, 64, 122, 00522 123, 124, 20, 126, 127, 128, 159, 160, 161, 45, 00523 46, 47, 20, 49, 21, 22, 46, 47, 171, 225, 00524 50, 20, 29, 24, 54, 12, 3, 4, 5, 60, 00525 61, 184, 9, 24, 25, 26, 135, 136, 137, 33, 00526 17, 18, 20, 20, 23, 240, 23, 24, 25, 26, 00527 27, 10, 21, 22, 131, 132, 52, 53, 35, 50, 00528 29, 133, 134, 40, 33, 6, 219, 44, 263, 25, 00529 25, 25, 267, 24, 36, 25, 24, 75, 48, 56, 00530 57, 74, 24, 236, 33, 32, 281, 282, 241, 20, 00531 36, 244, 69, 70, 32, 290, 32, 32, 12, 76, 00532 33, 20, 34, 32, 20, 12, 51, 24, 36, 36, 00533 233, 12, 265, 266, 294, 295, 269, 3, 4, 5, 00534 12, 36, 12, 9, 36, 12, 32, 280, 33, 32, 00535 34, 17, 18, 33, 20, 33, 12, 23, 24, 25, 00536 26, 27, 28, 36, 32, 31, 32, 36, 20, 35, 00537 32, 36, 33, 36, 40, 12, 53, 43, 44, 33, 00538 25, 25, 12, 25, 20, 51, 52, 25, 54, 55, 00539 56, 57, 33, 59, 33, 12, 62, 63, 12, 20, 00540 20, 67, 68, 69, 70, 3, 4, 5, 33, 33, 00541 76, 9, 24, 24, 33, 0, 32, 32, 0, 17, 00542 18, 9, 20, 227, 162, 23, 24, 25, 26, 27, 00543 28, 163, 45, 31, 125, 236, 129, 35, 184, 271, 00544 130, 231, 40, 103, 259, 43, 44, 152, 293, -1, 00545 -1, -1, -1, 51, 52, -1, 54, 55, 56, 57, 00546 -1, 59, -1, -1, 62, 63, -1, -1, -1, 67, 00547 68, 69, 70, 3, 4, 5, -1, -1, 76, 9, 00548 -1, -1, -1, -1, -1, -1, -1, 17, 18, -1, 00549 20, -1, -1, 23, 24, 25, 26, 27, 28, -1, 00550 -1, 31, -1, -1, -1, 35, 36, -1, -1, -1, 00551 40, -1, -1, 43, 44, -1, -1, -1, -1, -1, 00552 -1, -1, -1, -1, -1, -1, 56, 57, 3, 4, 00553 5, -1, 62, -1, 9, -1, -1, -1, -1, 69, 00554 70, -1, 17, 18, -1, 20, 76, -1, 23, 24, 00555 25, 26, 27, 28, -1, -1, 31, -1, 33, -1, 00556 35, -1, -1, -1, -1, 40, -1, -1, 43, 44, 00557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 00558 -1, 56, 57, 3, 4, 5, -1, 62, -1, 9, 00559 -1, -1, -1, -1, 69, 70, -1, 17, 18, -1, 00560 20, 76, -1, 23, 24, 25, 26, 27, 28, -1, 00561 -1, 31, -1, -1, -1, 35, -1, -1, -1, -1, 00562 40, -1, -1, 43, 44, -1, -1, -1, -1, -1, 00563 -1, -1, -1, -1, -1, -1, 56, 57, 3, 4, 00564 5, -1, 62, -1, 9, -1, -1, -1, -1, 69, 00565 70, -1, 17, 18, -1, 20, 76, -1, 23, 24, 00566 25, 26, 27, 28, -1, -1, 31, -1, -1, -1, 00567 35, -1, -1, -1, -1, 40, -1, -1, 43, 44, 00568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 00569 -1, 56, 57, 3, 4, 5, -1, 62, -1, 9, 00570 -1, -1, -1, -1, 69, 70, -1, 17, 18, -1, 00571 20, 76, -1, 23, 24, 25, 26, 27, -1, -1, 00572 -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, 00573 40, -1, -1, -1, 44, -1, -1, -1, -1, -1, 00574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 00575 -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, 00576 70, -1, -1, -1, -1, -1, 76 00577 }; 00578 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 00579 #line 3 "/usr/share/bison/bison.simple" 00580 00581 /* Skeleton output parser for bison, 00582 00583 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software 00584 Foundation, Inc. 00585 00586 This program is free software; you can redistribute it and/or modify 00587 it under the terms of the GNU General Public License as published by 00588 the Free Software Foundation; either version 2, or (at your option) 00589 any later version. 00590 00591 This program is distributed in the hope that it will be useful, 00592 but WITHOUT ANY WARRANTY; without even the implied warranty of 00593 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00594 GNU General Public License for more details. 00595 00596 You should have received a copy of the GNU General Public License 00597 along with this program; if not, write to the Free Software 00598 Foundation, Inc., 59 Temple Place - Suite 330, 00599 Boston, MA 02111-1307, USA. */ 00600 00601 /* As a special exception, when this file is copied by Bison into a 00602 Bison output file, you may use that output file without restriction. 00603 This special exception was added by the Free Software Foundation 00604 in version 1.24 of Bison. */ 00605 00606 /* This is the parser code that is written into each bison parser when 00607 the %semantic_parser declaration is not specified in the grammar. 00608 It was written by Richard Stallman by simplifying the hairy parser 00609 used when %semantic_parser is specified. */ 00610 00611 /* All symbols defined below should begin with yy or YY, to avoid 00612 infringing on user name space. This should be done even for local 00613 variables, as they might otherwise be expanded by user macros. 00614 There are some unavoidable exceptions within include files to 00615 define necessary library symbols; they are noted "INFRINGES ON 00616 USER NAME SPACE" below. */ 00617 00618 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) 00619 00620 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00621 00622 # if YYSTACK_USE_ALLOCA 00623 # define YYSTACK_ALLOC alloca 00624 # else 00625 # ifndef YYSTACK_USE_ALLOCA 00626 # if defined (alloca) || defined (_ALLOCA_H) 00627 # define YYSTACK_ALLOC alloca 00628 # else 00629 # ifdef __GNUC__ 00630 # define YYSTACK_ALLOC __builtin_alloca 00631 # endif 00632 # endif 00633 # endif 00634 # endif 00635 00636 # ifdef YYSTACK_ALLOC 00637 /* Pacify GCC's `empty if-body' warning. */ 00638 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 00639 # else 00640 # if defined (__STDC__) || defined (__cplusplus) 00641 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00642 # define YYSIZE_T size_t 00643 # endif 00644 # define YYSTACK_ALLOC malloc 00645 # define YYSTACK_FREE free 00646 # endif 00647 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ 00648 00649 00650 #if (! defined (yyoverflow) \ 00651 && (! defined (__cplusplus) \ 00652 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 00653 00654 /* A type that is properly aligned for any stack member. */ 00655 union yyalloc 00656 { 00657 short yyss; 00658 YYSTYPE yyvs; 00659 # if YYLSP_NEEDED 00660 YYLTYPE yyls; 00661 # endif 00662 }; 00663 00664 /* The size of the maximum gap between one aligned stack and the next. */ 00665 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) 00666 00667 /* The size of an array large to enough to hold all stacks, each with 00668 N elements. */ 00669 # if YYLSP_NEEDED 00670 # define YYSTACK_BYTES(N) \ 00671 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 00672 + 2 * YYSTACK_GAP_MAX) 00673 # else 00674 # define YYSTACK_BYTES(N) \ 00675 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ 00676 + YYSTACK_GAP_MAX) 00677 # endif 00678 00679 /* Copy COUNT objects from FROM to TO. The source and destination do 00680 not overlap. */ 00681 # ifndef YYCOPY 00682 # if 1 < __GNUC__ 00683 # define YYCOPY(To, From, Count) \ 00684 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 00685 # else 00686 # define YYCOPY(To, From, Count) \ 00687 do \ 00688 { \ 00689 register YYSIZE_T yyi; \ 00690 for (yyi = 0; yyi < (Count); yyi++) \ 00691 (To)[yyi] = (From)[yyi]; \ 00692 } \ 00693 while (0) 00694 # endif 00695 # endif 00696 00697 /* Relocate STACK from its old location to the new one. The 00698 local variables YYSIZE and YYSTACKSIZE give the old and new number of 00699 elements in the stack, and YYPTR gives the new location of the 00700 stack. Advance YYPTR to a properly aligned location for the next 00701 stack. */ 00702 # define YYSTACK_RELOCATE(Stack) \ 00703 do \ 00704 { \ 00705 YYSIZE_T yynewbytes; \ 00706 YYCOPY (&yyptr->Stack, Stack, yysize); \ 00707 Stack = &yyptr->Stack; \ 00708 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ 00709 yyptr += yynewbytes / sizeof (*yyptr); \ 00710 } \ 00711 while (0) 00712 00713 #endif 00714 00715 00716 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 00717 # define YYSIZE_T __SIZE_TYPE__ 00718 #endif 00719 #if ! defined (YYSIZE_T) && defined (size_t) 00720 # define YYSIZE_T size_t 00721 #endif 00722 #if ! defined (YYSIZE_T) 00723 # if defined (__STDC__) || defined (__cplusplus) 00724 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00725 # define YYSIZE_T size_t 00726 # endif 00727 #endif 00728 #if ! defined (YYSIZE_T) 00729 # define YYSIZE_T unsigned int 00730 #endif 00731 00732 #define yyerrok (yyerrstatus = 0) 00733 #define yyclearin (yychar = YYEMPTY) 00734 #define YYEMPTY -2 00735 #define YYEOF 0 00736 #define YYACCEPT goto yyacceptlab 00737 #define YYABORT goto yyabortlab 00738 #define YYERROR goto yyerrlab1 00739 /* Like YYERROR except do call yyerror. This remains here temporarily 00740 to ease the transition to the new meaning of YYERROR, for GCC. 00741 Once GCC version 2 has supplanted version 1, this can go. */ 00742 #define YYFAIL goto yyerrlab 00743 #define YYRECOVERING() (!!yyerrstatus) 00744 #define YYBACKUP(Token, Value) \ 00745 do \ 00746 if (yychar == YYEMPTY && yylen == 1) \ 00747 { \ 00748 yychar = (Token); \ 00749 yylval = (Value); \ 00750 yychar1 = YYTRANSLATE (yychar); \ 00751 YYPOPSTACK; \ 00752 goto yybackup; \ 00753 } \ 00754 else \ 00755 { \ 00756 yyerror ("syntax error: cannot back up"); \ 00757 YYERROR; \ 00758 } \ 00759 while (0) 00760 00761 #define YYTERROR 1 00762 #define YYERRCODE 256 00763 00764 00765 /* YYLLOC_DEFAULT -- Compute the default location (before the actions 00766 are run). 00767 00768 When YYLLOC_DEFAULT is run, CURRENT is set the location of the 00769 first token. By default, to implement support for ranges, extend 00770 its range to the last symbol. */ 00771 00772 #ifndef YYLLOC_DEFAULT 00773 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 00774 Current.last_line = Rhs[N].last_line; \ 00775 Current.last_column = Rhs[N].last_column; 00776 #endif 00777 00778 00779 /* YYLEX -- calling `yylex' with the right arguments. */ 00780 00781 #if YYPURE 00782 # if YYLSP_NEEDED 00783 # ifdef YYLEX_PARAM 00784 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 00785 # else 00786 # define YYLEX yylex (&yylval, &yylloc) 00787 # endif 00788 # else /* !YYLSP_NEEDED */ 00789 # ifdef YYLEX_PARAM 00790 # define YYLEX yylex (&yylval, YYLEX_PARAM) 00791 # else 00792 # define YYLEX yylex (&yylval) 00793 # endif 00794 # endif /* !YYLSP_NEEDED */ 00795 #else /* !YYPURE */ 00796 # define YYLEX yylex () 00797 #endif /* !YYPURE */ 00798 00799 00800 /* Enable debugging if requested. */ 00801 #if YYDEBUG 00802 00803 # ifndef YYFPRINTF 00804 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 00805 # define YYFPRINTF fprintf 00806 # endif 00807 00808 # define YYDPRINTF(Args) \ 00809 do { \ 00810 if (yydebug) \ 00811 YYFPRINTF Args; \ 00812 } while (0) 00813 /* Nonzero means print parse trace. It is left uninitialized so that 00814 multiple parsers can coexist. */ 00815 int yydebug; 00816 #else /* !YYDEBUG */ 00817 # define YYDPRINTF(Args) 00818 #endif /* !YYDEBUG */ 00819 00820 /* YYINITDEPTH -- initial size of the parser's stacks. */ 00821 #ifndef YYINITDEPTH 00822 # define YYINITDEPTH 200 00823 #endif 00824 00825 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 00826 if the built-in stack extension method is used). 00827 00828 Do not make this value too large; the results are undefined if 00829 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 00830 evaluated with infinite-precision integer arithmetic. */ 00831 00832 #if YYMAXDEPTH == 0 00833 # undef YYMAXDEPTH 00834 #endif 00835 00836 #ifndef YYMAXDEPTH 00837 # define YYMAXDEPTH 10000 00838 #endif 00839 00840 #ifdef YYERROR_VERBOSE 00841 00842 # ifndef yystrlen 00843 # if defined (__GLIBC__) && defined (_STRING_H) 00844 # define yystrlen strlen 00845 # else 00846 /* Return the length of YYSTR. */ 00847 static YYSIZE_T 00848 # if defined (__STDC__) || defined (__cplusplus) 00849 yystrlen (const char *yystr) 00850 # else 00851 yystrlen (yystr) 00852 const char *yystr; 00853 # endif 00854 { 00855 register const char *yys = yystr; 00856 00857 while (*yys++ != '\0') 00858 continue; 00859 00860 return yys - yystr - 1; 00861 } 00862 # endif 00863 # endif 00864 00865 # ifndef yystpcpy 00866 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 00867 # define yystpcpy stpcpy 00868 # else 00869 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 00870 YYDEST. */ 00871 static char * 00872 # if defined (__STDC__) || defined (__cplusplus) 00873 yystpcpy (char *yydest, const char *yysrc) 00874 # else 00875 yystpcpy (yydest, yysrc) 00876 char *yydest; 00877 const char *yysrc; 00878 # endif 00879 { 00880 register char *yyd = yydest; 00881 register const char *yys = yysrc; 00882 00883 while ((*yyd++ = *yys++) != '\0') 00884 continue; 00885 00886 return yyd - 1; 00887 } 00888 # endif 00889 # endif 00890 #endif 00891 00892 #line 315 "/usr/share/bison/bison.simple" 00893 00894 00895 /* The user can define YYPARSE_PARAM as the name of an argument to be passed 00896 into yyparse. The argument should have type void *. 00897 It should actually point to an object. 00898 Grammar actions can access the variable by casting it 00899 to the proper pointer type. */ 00900 00901 #ifdef YYPARSE_PARAM 00902 # if defined (__STDC__) || defined (__cplusplus) 00903 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 00904 # define YYPARSE_PARAM_DECL 00905 # else 00906 # define YYPARSE_PARAM_ARG YYPARSE_PARAM 00907 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 00908 # endif 00909 #else /* !YYPARSE_PARAM */ 00910 # define YYPARSE_PARAM_ARG 00911 # define YYPARSE_PARAM_DECL 00912 #endif /* !YYPARSE_PARAM */ 00913 00914 /* Prevent warning if -Wstrict-prototypes. */ 00915 #ifdef __GNUC__ 00916 # ifdef YYPARSE_PARAM 00917 int yyparse (void *); 00918 # else 00919 int yyparse (void); 00920 # endif 00921 #endif 00922 00923 /* YY_DECL_VARIABLES -- depending whether we use a pure parser, 00924 variables are global, or local to YYPARSE. */ 00925 00926 #define YY_DECL_NON_LSP_VARIABLES \ 00927 /* The lookahead symbol. */ \ 00928 int yychar; \ 00929 \ 00930 /* The semantic value of the lookahead symbol. */ \ 00931 YYSTYPE yylval; \ 00932 \ 00933 /* Number of parse errors so far. */ \ 00934 int yynerrs; 00935 00936 #if YYLSP_NEEDED 00937 # define YY_DECL_VARIABLES \ 00938 YY_DECL_NON_LSP_VARIABLES \ 00939 \ 00940 /* Location data for the lookahead symbol. */ \ 00941 YYLTYPE yylloc; 00942 #else 00943 # define YY_DECL_VARIABLES \ 00944 YY_DECL_NON_LSP_VARIABLES 00945 #endif 00946 00947 00948 /* If nonreentrant, generate the variables here. */ 00949 00950 #if !YYPURE 00951 YY_DECL_VARIABLES 00952 #endif /* !YYPURE */ 00953 00954 int 00955 yyparse (YYPARSE_PARAM_ARG) 00956 YYPARSE_PARAM_DECL 00957 { 00958 /* If reentrant, generate the variables here. */ 00959 #if YYPURE 00960 YY_DECL_VARIABLES 00961 #endif /* !YYPURE */ 00962 00963 register int yystate; 00964 register int yyn; 00965 int yyresult; 00966 /* Number of tokens to shift before error messages enabled. */ 00967 int yyerrstatus; 00968 /* Lookahead token as an internal (translated) token number. */ 00969 int yychar1 = 0; 00970 00971 /* Three stacks and their tools: 00972 `yyss': related to states, 00973 `yyvs': related to semantic values, 00974 `yyls': related to locations. 00975 00976 Refer to the stacks thru separate pointers, to allow yyoverflow 00977 to reallocate them elsewhere. */ 00978 00979 /* The state stack. */ 00980 short yyssa[YYINITDEPTH]; 00981 short *yyss = yyssa; 00982 register short *yyssp; 00983 00984 /* The semantic value stack. */ 00985 YYSTYPE yyvsa[YYINITDEPTH]; 00986 YYSTYPE *yyvs = yyvsa; 00987 register YYSTYPE *yyvsp; 00988 00989 #if YYLSP_NEEDED 00990 /* The location stack. */ 00991 YYLTYPE yylsa[YYINITDEPTH]; 00992 YYLTYPE *yyls = yylsa; 00993 YYLTYPE *yylsp; 00994 #endif 00995 00996 #if YYLSP_NEEDED 00997 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 00998 #else 00999 # define YYPOPSTACK (yyvsp--, yyssp--) 01000 #endif 01001 01002 YYSIZE_T yystacksize = YYINITDEPTH; 01003 01004 01005 /* The variables used to return semantic value and location from the 01006 action routines. */ 01007 YYSTYPE yyval; 01008 #if YYLSP_NEEDED 01009 YYLTYPE yyloc; 01010 #endif 01011 01012 /* When reducing, the number of symbols on the RHS of the reduced 01013 rule. */ 01014 int yylen; 01015 01016 YYDPRINTF ((stderr, "Starting parse\n")); 01017 01018 yystate = 0; 01019 yyerrstatus = 0; 01020 yynerrs = 0; 01021 yychar = YYEMPTY; /* Cause a token to be read. */ 01022 01023 /* Initialize stack pointers. 01024 Waste one element of value and location stack 01025 so that they stay on the same level as the state stack. 01026 The wasted elements are never initialized. */ 01027 01028 yyssp = yyss; 01029 yyvsp = yyvs; 01030 #if YYLSP_NEEDED 01031 yylsp = yyls; 01032 #endif 01033 goto yysetstate; 01034 01035 /*------------------------------------------------------------. 01036 | yynewstate -- Push a new state, which is found in yystate. | 01037 `------------------------------------------------------------*/ 01038 yynewstate: 01039 /* In all cases, when you get here, the value and location stacks 01040 have just been pushed. so pushing a state here evens the stacks. 01041 */ 01042 yyssp++; 01043 01044 yysetstate: 01045 *yyssp = yystate; 01046 01047 if (yyssp >= yyss + yystacksize - 1) 01048 { 01049 /* Get the current used size of the three stacks, in elements. */ 01050 YYSIZE_T yysize = yyssp - yyss + 1; 01051 01052 #ifdef yyoverflow 01053 { 01054 /* Give user a chance to reallocate the stack. Use copies of 01055 these so that the &'s don't force the real ones into 01056 memory. */ 01057 YYSTYPE *yyvs1 = yyvs; 01058 short *yyss1 = yyss; 01059 01060 /* Each stack pointer address is followed by the size of the 01061 data in use in that stack, in bytes. */ 01062 # if YYLSP_NEEDED 01063 YYLTYPE *yyls1 = yyls; 01064 /* This used to be a conditional around just the two extra args, 01065 but that might be undefined if yyoverflow is a macro. */ 01066 yyoverflow ("parser stack overflow", 01067 &yyss1, yysize * sizeof (*yyssp), 01068 &yyvs1, yysize * sizeof (*yyvsp), 01069 &yyls1, yysize * sizeof (*yylsp), 01070 &yystacksize); 01071 yyls = yyls1; 01072 # else 01073 yyoverflow ("parser stack overflow", 01074 &yyss1, yysize * sizeof (*yyssp), 01075 &yyvs1, yysize * sizeof (*yyvsp), 01076 &yystacksize); 01077 # endif 01078 yyss = yyss1; 01079 yyvs = yyvs1; 01080 } 01081 #else /* no yyoverflow */ 01082 # ifndef YYSTACK_RELOCATE 01083 goto yyoverflowlab; 01084 # else 01085 /* Extend the stack our own way. */ 01086 if (yystacksize >= YYMAXDEPTH) 01087 goto yyoverflowlab; 01088 yystacksize *= 2; 01089 if (yystacksize > YYMAXDEPTH) 01090 yystacksize = YYMAXDEPTH; 01091 01092 { 01093 short *yyss1 = yyss; 01094 union yyalloc *yyptr = 01095 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01096 if (! yyptr) 01097 goto yyoverflowlab; 01098 YYSTACK_RELOCATE (yyss); 01099 YYSTACK_RELOCATE (yyvs); 01100 # if YYLSP_NEEDED 01101 YYSTACK_RELOCATE (yyls); 01102 # endif 01103 # undef YYSTACK_RELOCATE 01104 if (yyss1 != yyssa) 01105 YYSTACK_FREE (yyss1); 01106 } 01107 # endif 01108 #endif /* no yyoverflow */ 01109 01110 yyssp = yyss + yysize - 1; 01111 yyvsp = yyvs + yysize - 1; 01112 #if YYLSP_NEEDED 01113 yylsp = yyls + yysize - 1; 01114 #endif 01115 01116 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01117 (unsigned long int) yystacksize)); 01118 01119 if (yyssp >= yyss + yystacksize - 1) 01120 YYABORT; 01121 } 01122 01123 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01124 01125 goto yybackup; 01126 01127 01128 /*-----------. 01129 | yybackup. | 01130 `-----------*/ 01131 yybackup: 01132 01133 /* Do appropriate processing given the current state. */ 01134 /* Read a lookahead token if we need one and don't already have one. */ 01135 /* yyresume: */ 01136 01137 /* First try to decide what to do without reference to lookahead token. */ 01138 01139 yyn = yypact[yystate]; 01140 if (yyn == YYFLAG) 01141 goto yydefault; 01142 01143 /* Not known => get a lookahead token if don't already have one. */ 01144 01145 /* yychar is either YYEMPTY or YYEOF 01146 or a valid token in external form. */ 01147 01148 if (yychar == YYEMPTY) 01149 { 01150 YYDPRINTF ((stderr, "Reading a token: ")); 01151 yychar = YYLEX; 01152 } 01153 01154 /* Convert token to internal form (in yychar1) for indexing tables with */ 01155 01156 if (yychar <= 0) /* This means end of input. */ 01157 { 01158 yychar1 = 0; 01159 yychar = YYEOF; /* Don't call YYLEX any more */ 01160 01161 YYDPRINTF ((stderr, "Now at end of input.\n")); 01162 } 01163 else 01164 { 01165 yychar1 = YYTRANSLATE (yychar); 01166 01167 #if YYDEBUG 01168 /* We have to keep this `#if YYDEBUG', since we use variables 01169 which are defined only if `YYDEBUG' is set. */ 01170 if (yydebug) 01171 { 01172 YYFPRINTF (stderr, "Next token is %d (%s", 01173 yychar, yytname[yychar1]); 01174 /* Give the individual parser a way to print the precise 01175 meaning of a token, for further debugging info. */ 01176 # ifdef YYPRINT 01177 YYPRINT (stderr, yychar, yylval); 01178 # endif 01179 YYFPRINTF (stderr, ")\n"); 01180 } 01181 #endif 01182 } 01183 01184 yyn += yychar1; 01185 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) 01186 goto yydefault; 01187 01188 yyn = yytable[yyn]; 01189 01190 /* yyn is what to do for this token type in this state. 01191 Negative => reduce, -yyn is rule number. 01192 Positive => shift, yyn is new state. 01193 New state is final state => don't bother to shift, 01194 just return success. 01195 0, or most negative number => error. */ 01196 01197 if (yyn < 0) 01198 { 01199 if (yyn == YYFLAG) 01200 goto yyerrlab; 01201 yyn = -yyn; 01202 goto yyreduce; 01203 } 01204 else if (yyn == 0) 01205 goto yyerrlab; 01206 01207 if (yyn == YYFINAL) 01208 YYACCEPT; 01209 01210 /* Shift the lookahead token. */ 01211 YYDPRINTF ((stderr, "Shifting token %d (%s), ", 01212 yychar, yytname[yychar1])); 01213 01214 /* Discard the token being shifted unless it is eof. */ 01215 if (yychar != YYEOF) 01216 yychar = YYEMPTY; 01217 01218 *++yyvsp = yylval; 01219 #if YYLSP_NEEDED 01220 *++yylsp = yylloc; 01221 #endif 01222 01223 /* Count tokens shifted since error; after three, turn off error 01224 status. */ 01225 if (yyerrstatus) 01226 yyerrstatus--; 01227 01228 yystate = yyn; 01229 goto yynewstate; 01230 01231 01232 /*-----------------------------------------------------------. 01233 | yydefault -- do the default action for the current state. | 01234 `-----------------------------------------------------------*/ 01235 yydefault: 01236 yyn = yydefact[yystate]; 01237 if (yyn == 0) 01238 goto yyerrlab; 01239 goto yyreduce; 01240 01241 01242 /*-----------------------------. 01243 | yyreduce -- Do a reduction. | 01244 `-----------------------------*/ 01245 yyreduce: 01246 /* yyn is the number of a rule to reduce with. */ 01247 yylen = yyr2[yyn]; 01248 01249 /* If YYLEN is nonzero, implement the default value of the action: 01250 `$$ = $1'. 01251 01252 Otherwise, the following line sets YYVAL to the semantic value of 01253 the lookahead token. This behavior is undocumented and Bison 01254 users should not rely upon it. Assigning to YYVAL 01255 unconditionally makes the parser a bit smaller, and it avoids a 01256 GCC warning that YYVAL may be used uninitialized. */ 01257 yyval = yyvsp[1-yylen]; 01258 01259 #if YYLSP_NEEDED 01260 /* Similarly for the default location. Let the user run additional 01261 commands if for instance locations are ranges. */ 01262 yyloc = yylsp[1-yylen]; 01263 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 01264 #endif 01265 01266 #if YYDEBUG 01267 /* We have to keep this `#if YYDEBUG', since we use variables which 01268 are defined only if `YYDEBUG' is set. */ 01269 if (yydebug) 01270 { 01271 int yyi; 01272 01273 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", 01274 yyn, yyrline[yyn]); 01275 01276 /* Print the symbols being reduced, and their result. */ 01277 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) 01278 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 01279 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); 01280 } 01281 #endif 01282 01283 switch (yyn) { 01284 01285 case 1: 01286 #line 182 "yacc.yy" 01287 { 01288 theParser->setRootNode( NULL ); 01289 ; 01290 break;} 01291 case 2: 01292 #line 185 "yacc.yy" 01293 { kspread_mode(); ; 01294 break;} 01295 case 3: 01296 #line 186 "yacc.yy" 01297 { 01298 theParser->setRootNode( yyvsp[0].node ); 01299 ; 01300 break;} 01301 case 4: 01302 #line 190 "yacc.yy" 01303 { 01304 theParser->setRootNode( new KSParseNode( definitions, yyvsp[0].node ) ); 01305 ; 01306 break;} 01307 case 5: 01308 #line 197 "yacc.yy" 01309 { 01310 if ( yyvsp[0].node != 0 ) 01311 { 01312 yyval.node = new KSParseNode( definitions, yyvsp[0].node ); 01313 } 01314 ; 01315 break;} 01316 case 6: 01317 #line 204 "yacc.yy" 01318 { 01319 if ( yyvsp[-1].node != 0 && yyvsp[0].node != 0 ) 01320 { 01321 yyval.node = new KSParseNode( definitions, yyvsp[-1].node ); 01322 yyval.node->setBranch( 2, yyvsp[0].node ); 01323 } 01324 else if ( yyvsp[-1].node != 0 ) 01325 { 01326 yyval.node = new KSParseNode( definitions, yyvsp[-1].node ); 01327 } 01328 else if ( yyvsp[0].node != 0 ) 01329 { 01330 yyval.node = new KSParseNode( definitions, yyvsp[0].node ); 01331 } 01332 else 01333 { 01334 yyval.node = 0; 01335 } 01336 ; 01337 break;} 01338 case 7: 01339 #line 228 "yacc.yy" 01340 { 01341 yyval.node = yyvsp[-1].node; 01342 ; 01343 break;} 01344 case 8: 01345 #line 232 "yacc.yy" 01346 { 01347 yyval.node = yyvsp[-1].node; 01348 ; 01349 break;} 01350 case 9: 01351 #line 236 "yacc.yy" 01352 { 01353 yyval.node = yyvsp[-1].node; 01354 ; 01355 break;} 01356 case 10: 01357 #line 240 "yacc.yy" 01358 { 01359 yyval.node = new KSParseNode( import ); 01360 yyval.node->setIdent( yyvsp[-1].ident ); 01361 ; 01362 break;} 01363 case 11: 01364 #line 245 "yacc.yy" 01365 { 01366 yyval.node = new KSParseNode( from ); 01367 yyval.node->setIdent( yyvsp[-3].ident ); 01368 yyval.node->setStringLiteral( QString( "" ) ); 01369 ; 01370 break;} 01371 case 12: 01372 #line 251 "yacc.yy" 01373 { 01374 yyval.node = new KSParseNode( from ); 01375 yyval.node->setIdent( yyvsp[-3].ident ); 01376 yyval.node->setStringLiteral( yyvsp[-1]._str ); 01377 ; 01378 break;} 01379 case 13: 01380 #line 257 "yacc.yy" 01381 { 01382 yyval.node = yyvsp[0].node; 01383 ; 01384 break;} 01385 case 14: 01386 #line 264 "yacc.yy" 01387 { 01388 yyval._str = yyvsp[0].ident; 01389 ; 01390 break;} 01391 case 15: 01392 #line 268 "yacc.yy" 01393 { 01394 (*yyvsp[-2].ident) += "/"; 01395 (*yyvsp[-2].ident) += (*yyvsp[0]._str); 01396 yyval._str = yyvsp[-2].ident; 01397 ; 01398 break;} 01399 case 16: 01400 #line 277 "yacc.yy" 01401 { 01402 yyval.node = new KSParseNode( func_dcl ); 01403 yyval.node->setBranch( 2, yyvsp[-1].node ); 01404 yyval.node->setIdent( "main" ); 01405 ; 01406 break;} 01407 case 17: 01408 #line 283 "yacc.yy" 01409 { 01410 yyval.node = new KSParseNode( func_dcl, yyvsp[-4].node, yyvsp[-1].node ); 01411 yyval.node->setIdent( "main" ); 01412 ; 01413 break;} 01414 case 18: 01415 #line 292 "yacc.yy" 01416 { 01417 yyval.node = new KSParseNode( scoped_name ); 01418 yyval.node->setIdent( yyvsp[0].ident ); 01419 ; 01420 break;} 01421 case 19: 01422 #line 297 "yacc.yy" 01423 { 01424 yyval.node = new KSParseNode( scoped_name ); 01425 QString name = "::"; 01426 name += *(yyvsp[0].ident); 01427 delete yyvsp[0].ident; 01428 yyval.node->setIdent( name ); 01429 ; 01430 break;} 01431 case 20: 01432 #line 309 "yacc.yy" 01433 { 01434 yyval.node = new KSParseNode( assign_expr, yyvsp[-2].node, yyvsp[0].node ); 01435 ; 01436 break;} 01437 case 21: 01438 #line 313 "yacc.yy" 01439 { 01440 yyval.node = new KSParseNode( plus_assign, yyvsp[-2].node, yyvsp[0].node ); 01441 ; 01442 break;} 01443 case 22: 01444 #line 317 "yacc.yy" 01445 { 01446 yyval.node = new KSParseNode( minus_assign, yyvsp[-2].node, yyvsp[0].node ); 01447 ; 01448 break;} 01449 case 23: 01450 #line 321 "yacc.yy" 01451 { 01452 yyval.node = yyvsp[0].node; 01453 ; 01454 break;} 01455 case 24: 01456 #line 328 "yacc.yy" 01457 { 01458 yyval.node = new KSParseNode( bool_or, yyvsp[-2].node, yyvsp[0].node ); 01459 ; 01460 break;} 01461 case 25: 01462 #line 332 "yacc.yy" 01463 { 01464 yyval.node = yyvsp[0].node; 01465 ; 01466 break;} 01467 case 26: 01468 #line 339 "yacc.yy" 01469 { 01470 yyval.node = new KSParseNode( bool_and, yyvsp[-2].node, yyvsp[0].node ); 01471 ; 01472 break;} 01473 case 27: 01474 #line 343 "yacc.yy" 01475 { 01476 yyval.node = yyvsp[0].node; 01477 ; 01478 break;} 01479 case 28: 01480 #line 350 "yacc.yy" 01481 { 01482 yyval.node = new KSParseNode( t_equal, yyvsp[-2].node, yyvsp[0].node ); 01483 ; 01484 break;} 01485 case 29: 01486 #line 354 "yacc.yy" 01487 { 01488 yyval.node = new KSParseNode( t_notequal, yyvsp[-2].node, yyvsp[0].node ); 01489 ; 01490 break;} 01491 case 30: 01492 #line 358 "yacc.yy" 01493 { 01494 yyval.node = new KSParseNode( t_less_or_equal, yyvsp[-2].node, yyvsp[0].node ); 01495 ; 01496 break;} 01497 case 31: 01498 #line 362 "yacc.yy" 01499 { 01500 yyval.node = new KSParseNode( t_greater_or_equal, yyvsp[-2].node, yyvsp[0].node ); 01501 ; 01502 break;} 01503 case 32: 01504 #line 366 "yacc.yy" 01505 { 01506 yyval.node = new KSParseNode( t_less, yyvsp[-2].node, yyvsp[0].node ); 01507 ; 01508 break;} 01509 case 33: 01510 #line 370 "yacc.yy" 01511 { 01512 yyval.node = new KSParseNode( t_greater, yyvsp[-2].node, yyvsp[0].node ); 01513 ; 01514 break;} 01515 case 34: 01516 #line 374 "yacc.yy" 01517 { 01518 yyval.node = yyvsp[0].node; 01519 ; 01520 break;} 01521 case 35: 01522 #line 382 "yacc.yy" 01523 { 01524 yyval.node = yyvsp[0].node; 01525 ; 01526 break;} 01527 case 36: 01528 #line 386 "yacc.yy" 01529 { 01530 yyval.node = new KSParseNode( t_vertical_line, yyvsp[-2].node, yyvsp[0].node ); 01531 ; 01532 break;} 01533 case 37: 01534 #line 394 "yacc.yy" 01535 { 01536 yyval.node = yyvsp[0].node; 01537 ; 01538 break;} 01539 case 38: 01540 #line 398 "yacc.yy" 01541 { 01542 yyval.node = new KSParseNode( t_circumflex, yyvsp[-2].node, yyvsp[0].node ); 01543 ; 01544 break;} 01545 case 39: 01546 #line 406 "yacc.yy" 01547 { 01548 yyval.node = yyvsp[0].node; 01549 ; 01550 break;} 01551 case 40: 01552 #line 410 "yacc.yy" 01553 { 01554 yyval.node = new KSParseNode( t_ampersand, yyvsp[-2].node, yyvsp[0].node ); 01555 ; 01556 break;} 01557 case 41: 01558 #line 418 "yacc.yy" 01559 { 01560 yyval.node = yyvsp[0].node; 01561 ; 01562 break;} 01563 case 42: 01564 #line 422 "yacc.yy" 01565 { 01566 yyval.node = new KSParseNode( t_shiftright, yyvsp[-2].node, yyvsp[0].node ); 01567 ; 01568 break;} 01569 case 43: 01570 #line 426 "yacc.yy" 01571 { 01572 yyval.node = new KSParseNode( t_shiftleft, yyvsp[-2].node, yyvsp[0].node ); 01573 ; 01574 break;} 01575 case 44: 01576 #line 434 "yacc.yy" 01577 { 01578 yyval.node = yyvsp[0].node; 01579 ; 01580 break;} 01581 case 45: 01582 #line 438 "yacc.yy" 01583 { 01584 yyval.node = new KSParseNode( t_plus_sign, yyvsp[-2].node, yyvsp[0].node ); 01585 ; 01586 break;} 01587 case 46: 01588 #line 442 "yacc.yy" 01589 { 01590 yyval.node = new KSParseNode( t_minus_sign, yyvsp[-2].node, yyvsp[0].node ); 01591 ; 01592 break;} 01593 case 47: 01594 #line 450 "yacc.yy" 01595 { 01596 yyval.node = yyvsp[0].node; 01597 ; 01598 break;} 01599 case 48: 01600 #line 454 "yacc.yy" 01601 { 01602 yyval.node = new KSParseNode( t_asterik, yyvsp[-2].node, yyvsp[0].node ); 01603 ; 01604 break;} 01605 case 49: 01606 #line 458 "yacc.yy" 01607 { 01608 yyval.node = new KSParseNode( t_solidus, yyvsp[-2].node, yyvsp[0].node ); 01609 ; 01610 break;} 01611 case 50: 01612 #line 462 "yacc.yy" 01613 { 01614 yyval.node = new KSParseNode( t_percent_sign, yyvsp[-2].node, yyvsp[0].node ); 01615 ; 01616 break;} 01617 case 51: 01618 #line 470 "yacc.yy" 01619 { 01620 yyval.node = new KSParseNode( t_minus_sign, yyvsp[0].node ); 01621 ; 01622 break;} 01623 case 52: 01624 #line 474 "yacc.yy" 01625 { 01626 yyval.node = new KSParseNode( t_plus_sign, yyvsp[0].node ); 01627 ; 01628 break;} 01629 case 53: 01630 #line 478 "yacc.yy" 01631 { 01632 yyval.node = new KSParseNode( t_tilde, yyvsp[0].node ); 01633 ; 01634 break;} 01635 case 54: 01636 #line 482 "yacc.yy" 01637 { 01638 yyval.node = new KSParseNode( t_not, yyvsp[0].node ); 01639 ; 01640 break;} 01641 case 55: 01642 #line 486 "yacc.yy" 01643 { 01644 yyval.node = yyvsp[0].node; 01645 ; 01646 break;} 01647 case 56: 01648 #line 493 "yacc.yy" 01649 { 01650 yyval.node = new KSParseNode( t_array, yyvsp[-3].node, yyvsp[-1].node ); 01651 ; 01652 break;} 01653 case 57: 01654 #line 497 "yacc.yy" 01655 { 01656 yyval.node = new KSParseNode( t_dict, yyvsp[-3].node, yyvsp[-1].node ); 01657 ; 01658 break;} 01659 case 58: 01660 #line 501 "yacc.yy" 01661 { 01662 yyval.node = new KSParseNode( t_func_call, yyvsp[-2].node ); 01663 ; 01664 break;} 01665 case 59: 01666 #line 505 "yacc.yy" 01667 { 01668 yyval.node = new KSParseNode( t_func_call, yyvsp[-3].node, yyvsp[-1].node ); 01669 ; 01670 break;} 01671 case 60: 01672 #line 509 "yacc.yy" 01673 { 01674 yyval.node = yyvsp[0].node; 01675 ; 01676 break;} 01677 case 61: 01678 #line 516 "yacc.yy" 01679 { 01680 yyval.node = new KSParseNode( func_call_params, yyvsp[-2].node, yyvsp[0].node ); 01681 ; 01682 break;} 01683 case 62: 01684 #line 521 "yacc.yy" 01685 { 01686 yyval.node = new KSParseNode( func_call_params, yyvsp[0].node ); 01687 ; 01688 break;} 01689 case 63: 01690 #line 528 "yacc.yy" 01691 { 01692 yyval.node = new KSParseNode( member_expr, yyvsp[-2].node ); 01693 yyval.node->setIdent( yyvsp[0].ident ); 01694 ; 01695 break;} 01696 case 64: 01697 #line 533 "yacc.yy" 01698 { 01699 yyval.node = yyvsp[0].node; 01700 ; 01701 break;} 01702 case 65: 01703 #line 540 "yacc.yy" 01704 { 01705 yyval.node = new KSParseNode( t_incr, yyvsp[0].node ); 01706 ; 01707 break;} 01708 case 66: 01709 #line 544 "yacc.yy" 01710 { 01711 yyval.node = new KSParseNode( t_decr, yyvsp[0].node ); 01712 ; 01713 break;} 01714 case 67: 01715 #line 548 "yacc.yy" 01716 { 01717 /* Setting $1 twice indicates that this is a postfix operator */ 01718 yyval.node = new KSParseNode( t_incr, yyvsp[-1].node, yyvsp[-1].node ); 01719 ; 01720 break;} 01721 case 68: 01722 #line 553 "yacc.yy" 01723 { 01724 /* Setting $1 twice indicates that this is a postfix operator */ 01725 yyval.node = new KSParseNode( t_decr, yyvsp[-1].node, yyvsp[-1].node ); 01726 ; 01727 break;} 01728 case 69: 01729 #line 558 "yacc.yy" 01730 { 01731 yyval.node = yyvsp[0].node; 01732 ; 01733 break;} 01734 case 70: 01735 #line 565 "yacc.yy" 01736 { 01737 yyval.node = new KSParseNode( t_match, yyvsp[-1].node ); 01738 yyval.node->setIdent( yyvsp[0]._str ); 01739 ; 01740 break;} 01741 case 71: 01742 #line 570 "yacc.yy" 01743 { 01744 yyval.node = new KSParseNode( t_subst, yyvsp[-1].node ); 01745 yyval.node->setIdent( yyvsp[0].ident ); 01746 ; 01747 break;} 01748 case 72: 01749 #line 575 "yacc.yy" 01750 { 01751 yyval.node = yyvsp[0].node; 01752 ; 01753 break;} 01754 case 73: 01755 #line 583 "yacc.yy" 01756 { 01757 yyval.node = yyvsp[0].node; 01758 ; 01759 break;} 01760 case 74: 01761 #line 587 "yacc.yy" 01762 { 01763 yyval.node = yyvsp[0].node; 01764 ; 01765 break;} 01766 case 75: 01767 #line 591 "yacc.yy" 01768 { 01769 yyval.node = new KSParseNode( t_input ); 01770 ; 01771 break;} 01772 case 76: 01773 #line 595 "yacc.yy" 01774 { 01775 yyval.node = new KSParseNode( t_match_line ); 01776 yyval.node->setIdent( yyvsp[0]._str ); 01777 ; 01778 break;} 01779 case 77: 01780 #line 599 "yacc.yy" 01781 { ; 01782 break;} 01783 case 78: 01784 #line 601 "yacc.yy" 01785 { 01786 yyval.node = yyvsp[-1].node; 01787 ; 01788 break;} 01789 case 79: 01790 #line 610 "yacc.yy" 01791 { 01792 yyval.node = new KSParseNode( t_integer_literal ); 01793 yyval.node->setIntegerLiteral( yyvsp[0]._int ); 01794 ; 01795 break;} 01796 case 80: 01797 #line 615 "yacc.yy" 01798 { 01799 yyval.node = new KSParseNode( t_cell ); 01800 yyval.node->setStringLiteral( yyvsp[0]._str ); 01801 ; 01802 break;} 01803 case 81: 01804 #line 620 "yacc.yy" 01805 { 01806 yyval.node = new KSParseNode( t_range ); 01807 yyval.node->setStringLiteral( yyvsp[0]._str ); 01808 ; 01809 break;} 01810 case 82: 01811 #line 625 "yacc.yy" 01812 { 01813 yyval.node = new KSParseNode( t_string_literal ); 01814 yyval.node->setStringLiteral( yyvsp[0]._str ); 01815 ; 01816 break;} 01817 case 83: 01818 #line 630 "yacc.yy" 01819 { 01820 yyval.node = new KSParseNode( t_character_literal ); 01821 yyval.node->setCharacterLiteral( yyvsp[0]._char ); 01822 ; 01823 break;} 01824 case 84: 01825 #line 635 "yacc.yy" 01826 { 01827 yyval.node = new KSParseNode( t_floating_pt_literal ); 01828 yyval.node->setFloatingPtLiteral( yyvsp[0]._float ); 01829 ; 01830 break;} 01831 case 85: 01832 #line 640 "yacc.yy" 01833 { 01834 yyval.node = new KSParseNode( t_boolean_literal ); 01835 yyval.node->setBooleanLiteral( true ); 01836 ; 01837 break;} 01838 case 86: 01839 #line 645 "yacc.yy" 01840 { 01841 yyval.node = new KSParseNode( t_boolean_literal ); 01842 yyval.node->setBooleanLiteral( false ); 01843 ; 01844 break;} 01845 case 87: 01846 #line 650 "yacc.yy" 01847 { 01848 yyval.node = new KSParseNode( t_array_const ); 01849 ; 01850 break;} 01851 case 88: 01852 #line 654 "yacc.yy" 01853 { 01854 yyval.node = new KSParseNode( t_array_const, yyvsp[-1].node ); 01855 ; 01856 break;} 01857 case 89: 01858 #line 658 "yacc.yy" 01859 { 01860 yyval.node = new KSParseNode( t_dict_const ); 01861 ; 01862 break;} 01863 case 90: 01864 #line 662 "yacc.yy" 01865 { 01866 yyval.node = new KSParseNode( t_dict_const, yyvsp[-1].node ); 01867 ; 01868 break;} 01869 case 91: 01870 #line 666 "yacc.yy" 01871 { 01872 yyval.node = new KSParseNode( t_line ); 01873 ; 01874 break;} 01875 case 92: 01876 #line 670 "yacc.yy" 01877 { 01878 yyval.node = new KSParseNode( t_regexp_group ); 01879 yyval.node->setIntegerLiteral( yyvsp[0]._int ); 01880 ; 01881 break;} 01882 case 93: 01883 #line 678 "yacc.yy" 01884 { 01885 yyval.node = new KSParseNode( t_array_element, yyvsp[-2].node, yyvsp[0].node ); 01886 ; 01887 break;} 01888 case 94: 01889 #line 682 "yacc.yy" 01890 { 01891 yyval.node = new KSParseNode( t_array_element, yyvsp[0].node ); 01892 ; 01893 break;} 01894 case 95: 01895 #line 689 "yacc.yy" 01896 { 01897 yyval.node = new KSParseNode( t_dict_element, yyvsp[-5].node, yyvsp[-3].node, yyvsp[0].node ); 01898 ; 01899 break;} 01900 case 96: 01901 #line 693 "yacc.yy" 01902 { 01903 yyval.node = new KSParseNode( t_dict_element, yyvsp[-3].node, yyvsp[-1].node ); 01904 ; 01905 break;} 01906 case 97: 01907 #line 703 "yacc.yy" 01908 { 01909 yyval.node = new KSParseNode( t_struct, yyvsp[-1].node ); 01910 yyval.node->setIdent( yyvsp[-3].ident ); 01911 ; 01912 break;} 01913 case 98: 01914 #line 712 "yacc.yy" 01915 { 01916 if ( yyvsp[0].node != 0 ) 01917 { 01918 yyval.node = new KSParseNode( exports, yyvsp[0].node ); 01919 } 01920 ; 01921 break;} 01922 case 99: 01923 #line 719 "yacc.yy" 01924 { 01925 if ( yyvsp[-1].node != 0 && yyvsp[0].node != 0 ) 01926 { 01927 yyval.node = new KSParseNode( exports, yyvsp[-1].node ); 01928 yyval.node->setBranch( 2, yyvsp[0].node ); 01929 } 01930 else if ( yyvsp[-1].node != 0 ) 01931 { 01932 yyval.node = new KSParseNode( exports, yyvsp[-1].node ); 01933 } 01934 else if ( yyvsp[0].node != 0 ) 01935 { 01936 yyval.node = new KSParseNode( exports, yyvsp[0].node ); 01937 } 01938 else 01939 { 01940 yyval.node = 0; 01941 } 01942 ; 01943 break;} 01944 case 100: 01945 #line 742 "yacc.yy" 01946 { 01947 yyval.node = yyvsp[-1].node; 01948 ; 01949 break;} 01950 case 101: 01951 #line 746 "yacc.yy" 01952 { 01953 yyval.node = yyvsp[-1].node; 01954 ; 01955 break;} 01956 case 102: 01957 #line 750 "yacc.yy" 01958 { 01959 yyval.node = yyvsp[-1].node; 01960 ; 01961 break;} 01962 case 103: 01963 #line 757 "yacc.yy" 01964 { 01965 yyval.node = new KSParseNode( t_struct_members ); 01966 yyval.node->setIdent( yyvsp[0].ident ); 01967 ; 01968 break;} 01969 case 104: 01970 #line 762 "yacc.yy" 01971 { 01972 yyval.node = new KSParseNode( t_struct_members, yyvsp[0].node ); 01973 yyval.node->setIdent( yyvsp[-2].ident ); 01974 ; 01975 break;} 01976 case 105: 01977 #line 770 "yacc.yy" 01978 { 01979 yyval.node = new KSParseNode( func_dcl ); 01980 yyval.node->setBranch( 2, yyvsp[0].node ); 01981 yyval.node->setIdent( yyvsp[-4].ident ); 01982 ; 01983 break;} 01984 case 106: 01985 #line 776 "yacc.yy" 01986 { 01987 yyval.node = new KSParseNode( func_dcl, yyvsp[-3].node, yyvsp[0].node ); 01988 yyval.node->setIdent( yyvsp[-5].ident ); 01989 ; 01990 break;} 01991 case 107: 01992 #line 784 "yacc.yy" 01993 { 01994 yyval.node = new KSParseNode( func_params, yyvsp[0].node ); 01995 ; 01996 break;} 01997 case 108: 01998 #line 788 "yacc.yy" 01999 { 02000 yyval.node = new KSParseNode( func_params, yyvsp[-2].node, yyvsp[0].node ); 02001 ; 02002 break;} 02003 case 109: 02004 #line 795 "yacc.yy" 02005 { 02006 yyval.node = new KSParseNode( func_param_in ); 02007 yyval.node->setIdent( yyvsp[0].ident ); 02008 ; 02009 break;} 02010 case 110: 02011 #line 800 "yacc.yy" 02012 { 02013 yyval.node = new KSParseNode( func_param_in, yyvsp[0].node ); 02014 yyval.node->setIdent( yyvsp[-2].ident ); 02015 ; 02016 break;} 02017 case 111: 02018 #line 805 "yacc.yy" 02019 { 02020 yyval.node = new KSParseNode( func_param_out ); 02021 yyval.node->setIdent( yyvsp[0].ident ); 02022 ; 02023 break;} 02024 case 112: 02025 #line 810 "yacc.yy" 02026 { 02027 yyval.node = new KSParseNode( func_param_inout ); 02028 yyval.node->setIdent( yyvsp[0].ident ); 02029 ; 02030 break;} 02031 case 113: 02032 #line 818 "yacc.yy" 02033 { 02034 yyval.node = NULL; 02035 ; 02036 break;} 02037 case 114: 02038 #line 822 "yacc.yy" 02039 { 02040 yyval.node = yyvsp[0].node; 02041 ; 02042 break;} 02043 case 115: 02044 #line 829 "yacc.yy" 02045 { 02046 yyval.node = new KSParseNode( func_lines, yyvsp[0].node ); 02047 ; 02048 break;} 02049 case 116: 02050 #line 833 "yacc.yy" 02051 { 02052 yyval.node = new KSParseNode( func_lines, yyvsp[-1].node ); 02053 yyval.node->setBranch( 2, yyvsp[0].node ); 02054 ; 02055 break;} 02056 case 117: 02057 #line 841 "yacc.yy" 02058 { 02059 yyval.node = yyvsp[-1].node; 02060 ; 02061 break;} 02062 case 118: 02063 #line 845 "yacc.yy" 02064 { 02065 yyval.node = new KSParseNode( t_raise, yyvsp[-3].node, yyvsp[-1].node ); 02066 ; 02067 break;} 02068 case 119: 02069 #line 849 "yacc.yy" 02070 { 02071 yyval.node = new KSParseNode( t_return ); 02072 ; 02073 break;} 02074 case 120: 02075 #line 853 "yacc.yy" 02076 { 02077 yyval.node = new KSParseNode( t_return, yyvsp[-1].node ); 02078 ; 02079 break;} 02080 case 121: 02081 #line 857 "yacc.yy" 02082 { 02083 yyval.node = yyvsp[0].node; 02084 ; 02085 break;} 02086 case 122: 02087 #line 861 "yacc.yy" 02088 { 02089 yyval.node = new KSParseNode( t_try, yyvsp[-2].node, yyvsp[0].node ); 02090 ; 02091 break;} 02092 case 123: 02093 #line 865 "yacc.yy" 02094 { 02095 yyval.node = new KSParseNode( t_scope, yyvsp[-1].node ); 02096 ; 02097 break;} 02098 case 124: 02099 #line 872 "yacc.yy" 02100 { 02101 yyval.node = yyvsp[0].node; 02102 ; 02103 break;} 02104 case 125: 02105 #line 876 "yacc.yy" 02106 { 02107 yyval.node = yyvsp[-1].node; 02108 yyval.node->setBranch( 4, yyvsp[0].node ); 02109 ; 02110 break;} 02111 case 126: 02112 #line 885 "yacc.yy" 02113 { 02114 yyval.node = new KSParseNode( t_catch, yyvsp[-6].node, yyvsp[-1].node ); 02115 yyval.node->setIdent( yyvsp[-4].ident ); 02116 ; 02117 break;} 02118 case 127: 02119 #line 891 "yacc.yy" 02120 { 02121 KSParseNode* x = new KSParseNode( scoped_name ); 02122 x->setIdent( yyvsp[-6].ident ); 02123 yyval.node = new KSParseNode( t_catch_default, x, yyvsp[-1].node ); 02124 yyval.node->setIdent( yyvsp[-4].ident ); 02125 ; 02126 break;} 02127 case 128: 02128 #line 901 "yacc.yy" 02129 { 02130 yyval.node = new KSParseNode( const_dcl, yyvsp[0].node ); 02131 yyval.node->setIdent( yyvsp[-2].ident ); 02132 ; 02133 break;} 02134 case 129: 02135 #line 909 "yacc.yy" 02136 { 02137 yyval.node = new KSParseNode( t_while, yyvsp[-1].node, yyvsp[0].node ); 02138 ; 02139 break;} 02140 case 130: 02141 #line 913 "yacc.yy" 02142 { 02143 yyval.node = new KSParseNode( t_for, yyvsp[-6].node, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node ); 02144 ; 02145 break;} 02146 case 131: 02147 #line 917 "yacc.yy" 02148 { 02149 yyval.node = new KSParseNode( t_do, yyvsp[-2].node, yyvsp[-1].node ); 02150 ; 02151 break;} 02152 case 132: 02153 #line 921 "yacc.yy" 02154 { 02155 yyval.node = new KSParseNode( t_if, yyvsp[-3].node, yyvsp[-1].node, yyvsp[0].node ); 02156 ; 02157 break;} 02158 case 133: 02159 #line 925 "yacc.yy" 02160 { 02161 yyval.node = new KSParseNode( t_foreach, yyvsp[-2].node, yyvsp[0].node ); 02162 yyval.node->setIdent( yyvsp[-4].ident ); 02163 ; 02164 break;} 02165 case 134: 02166 #line 930 "yacc.yy" 02167 { 02168 /* We set $9 twice to indicate thet this is the foreach for maps */ 02169 yyval.node = new KSParseNode( t_foreach, yyvsp[-2].node, yyvsp[0].node, yyvsp[0].node ); 02170 yyval.node->setIdent( yyvsp[-6].ident ); 02171 yyval.node->setStringLiteral( yyvsp[-4].ident ); 02172 ; 02173 break;} 02174 case 135: 02175 #line 940 "yacc.yy" 02176 { 02177 yyval.node = NULL; 02178 ; 02179 break;} 02180 case 136: 02181 #line 944 "yacc.yy" 02182 { 02183 yyval.node = new KSParseNode( t_if, yyvsp[-3].node, yyvsp[-1].node, yyvsp[0].node ); 02184 ; 02185 break;} 02186 case 137: 02187 #line 948 "yacc.yy" 02188 { 02189 yyval.node = yyvsp[0].node; 02190 ; 02191 break;} 02192 case 138: 02193 #line 955 "yacc.yy" 02194 { 02195 yyval.node = yyvsp[-1].node; 02196 ; 02197 break;} 02198 case 139: 02199 #line 962 "yacc.yy" 02200 { 02201 yyval.node = new KSParseNode( t_scope, yyvsp[-1].node ); 02202 ; 02203 break;} 02204 } 02205 02206 #line 705 "/usr/share/bison/bison.simple" 02207 02208 02209 yyvsp -= yylen; 02210 yyssp -= yylen; 02211 #if YYLSP_NEEDED 02212 yylsp -= yylen; 02213 #endif 02214 02215 #if YYDEBUG 02216 if (yydebug) 02217 { 02218 short *yyssp1 = yyss - 1; 02219 YYFPRINTF (stderr, "state stack now"); 02220 while (yyssp1 != yyssp) 02221 YYFPRINTF (stderr, " %d", *++yyssp1); 02222 YYFPRINTF (stderr, "\n"); 02223 } 02224 #endif 02225 02226 *++yyvsp = yyval; 02227 #if YYLSP_NEEDED 02228 *++yylsp = yyloc; 02229 #endif 02230 02231 /* Now `shift' the result of the reduction. Determine what state 02232 that goes to, based on the state we popped back to and the rule 02233 number reduced by. */ 02234 02235 yyn = yyr1[yyn]; 02236 02237 yystate = yypgoto[yyn - YYNTBASE] + *yyssp; 02238 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) 02239 yystate = yytable[yystate]; 02240 else 02241 yystate = yydefgoto[yyn - YYNTBASE]; 02242 02243 goto yynewstate; 02244 02245 02246 /*------------------------------------. 02247 | yyerrlab -- here on detecting error | 02248 `------------------------------------*/ 02249 yyerrlab: 02250 /* If not already recovering from an error, report this error. */ 02251 if (!yyerrstatus) 02252 { 02253 ++yynerrs; 02254 02255 #ifdef YYERROR_VERBOSE 02256 yyn = yypact[yystate]; 02257 02258 if (yyn > YYFLAG && yyn < YYLAST) 02259 { 02260 YYSIZE_T yysize = 0; 02261 char *yymsg; 02262 int yyx, yycount; 02263 02264 yycount = 0; 02265 /* Start YYX at -YYN if negative to avoid negative indexes in 02266 YYCHECK. */ 02267 for (yyx = yyn < 0 ? -yyn : 0; 02268 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) 02269 if (yycheck[yyx + yyn] == yyx) 02270 yysize += yystrlen (yytname[yyx]) + 15, yycount++; 02271 yysize += yystrlen ("parse error, unexpected ") + 1; 02272 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); 02273 yymsg = (char *) YYSTACK_ALLOC (yysize); 02274 if (yymsg != 0) 02275 { 02276 char *yyp = yystpcpy (yymsg, "parse error, unexpected "); 02277 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); 02278 02279 if (yycount < 5) 02280 { 02281 yycount = 0; 02282 for (yyx = yyn < 0 ? -yyn : 0; 02283 yyx < (int) (sizeof (yytname) / sizeof (char *)); 02284 yyx++) 02285 if (yycheck[yyx + yyn] == yyx) 02286 { 02287 const char *yyq = ! yycount ? ", expecting " : " or "; 02288 yyp = yystpcpy (yyp, yyq); 02289 yyp = yystpcpy (yyp, yytname[yyx]); 02290 yycount++; 02291 } 02292 } 02293 yyerror (yymsg); 02294 YYSTACK_FREE (yymsg); 02295 } 02296 else 02297 yyerror ("parse error; also virtual memory exhausted"); 02298 } 02299 else 02300 #endif /* defined (YYERROR_VERBOSE) */ 02301 yyerror ("parse error"); 02302 } 02303 goto yyerrlab1; 02304 02305 02306 /*--------------------------------------------------. 02307 | yyerrlab1 -- error raised explicitly by an action | 02308 `--------------------------------------------------*/ 02309 yyerrlab1: 02310 if (yyerrstatus == 3) 02311 { 02312 /* If just tried and failed to reuse lookahead token after an 02313 error, discard it. */ 02314 02315 /* return failure if at end of input */ 02316 if (yychar == YYEOF) 02317 YYABORT; 02318 YYDPRINTF ((stderr, "Discarding token %d (%s).\n", 02319 yychar, yytname[yychar1])); 02320 yychar = YYEMPTY; 02321 } 02322 02323 /* Else will try to reuse lookahead token after shifting the error 02324 token. */ 02325 02326 yyerrstatus = 3; /* Each real token shifted decrements this */ 02327 02328 goto yyerrhandle; 02329 02330 02331 /*-------------------------------------------------------------------. 02332 | yyerrdefault -- current state does not do anything special for the | 02333 | error token. | 02334 `-------------------------------------------------------------------*/ 02335 yyerrdefault: 02336 #if 0 02337 /* This is wrong; only states that explicitly want error tokens 02338 should shift them. */ 02339 02340 /* If its default is to accept any token, ok. Otherwise pop it. */ 02341 yyn = yydefact[yystate]; 02342 if (yyn) 02343 goto yydefault; 02344 #endif 02345 02346 02347 /*---------------------------------------------------------------. 02348 | yyerrpop -- pop the current state because it cannot handle the | 02349 | error token | 02350 `---------------------------------------------------------------*/ 02351 yyerrpop: 02352 if (yyssp == yyss) 02353 YYABORT; 02354 yyvsp--; 02355 yystate = *--yyssp; 02356 #if YYLSP_NEEDED 02357 yylsp--; 02358 #endif 02359 02360 #if YYDEBUG 02361 if (yydebug) 02362 { 02363 short *yyssp1 = yyss - 1; 02364 YYFPRINTF (stderr, "Error: state stack now"); 02365 while (yyssp1 != yyssp) 02366 YYFPRINTF (stderr, " %d", *++yyssp1); 02367 YYFPRINTF (stderr, "\n"); 02368 } 02369 #endif 02370 02371 /*--------------. 02372 | yyerrhandle. | 02373 `--------------*/ 02374 yyerrhandle: 02375 yyn = yypact[yystate]; 02376 if (yyn == YYFLAG) 02377 goto yyerrdefault; 02378 02379 yyn += YYTERROR; 02380 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) 02381 goto yyerrdefault; 02382 02383 yyn = yytable[yyn]; 02384 if (yyn < 0) 02385 { 02386 if (yyn == YYFLAG) 02387 goto yyerrpop; 02388 yyn = -yyn; 02389 goto yyreduce; 02390 } 02391 else if (yyn == 0) 02392 goto yyerrpop; 02393 02394 if (yyn == YYFINAL) 02395 YYACCEPT; 02396 02397 YYDPRINTF ((stderr, "Shifting error token, ")); 02398 02399 *++yyvsp = yylval; 02400 #if YYLSP_NEEDED 02401 *++yylsp = yylloc; 02402 #endif 02403 02404 yystate = yyn; 02405 goto yynewstate; 02406 02407 02408 /*-------------------------------------. 02409 | yyacceptlab -- YYACCEPT comes here. | 02410 `-------------------------------------*/ 02411 yyacceptlab: 02412 yyresult = 0; 02413 goto yyreturn; 02414 02415 /*-----------------------------------. 02416 | yyabortlab -- YYABORT comes here. | 02417 `-----------------------------------*/ 02418 yyabortlab: 02419 yyresult = 1; 02420 goto yyreturn; 02421 02422 /*---------------------------------------------. 02423 | yyoverflowab -- parser overflow comes here. | 02424 `---------------------------------------------*/ 02425 yyoverflowlab: 02426 yyerror ("parser stack overflow"); 02427 yyresult = 2; 02428 /* Fall through. */ 02429 02430 yyreturn: 02431 #ifndef yyoverflow 02432 if (yyss != yyssa) 02433 YYSTACK_FREE (yyss); 02434 #endif 02435 return yyresult; 02436 } 02437 #line 966 "yacc.yy" 02438 02439 02440 void kscriptParse( const char *_code, int extension, KLocale* locale ) 02441 { 02442 kscriptInitFlex( _code, extension, locale ); 02443 yyparse(); 02444 } 02445 02446 void kscriptParse( int extension, KLocale* locale ) 02447 { 02448 kscriptInitFlex( extension, locale ); 02449 yyparse(); 02450 }
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:29 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003