00001
00002
00003
00004 #define YYBISON 1
00005
00006 # define IF 257
00007 # define ELSE 258
00008 # define RETURN 259
00009 # define WHILE 260
00010 # define FOR 261
00011 # define UCC_IN 262
00012 # define WITH 263
00013 # define TO 264
00014 # define EXTERN 265
00015 # define BREAK 266
00016 # define GOTO 267
00017 # define CASE 268
00018 # define VAR 269
00019 # define UCC_INT 270
00020 # define UCC_CONST 271
00021 # define STRING 272
00022 # define ENUM 273
00023 # define CONVERSE 274
00024 # define SAY 275
00025 # define MESSAGE 276
00026 # define RESPONSE 277
00027 # define EVENT 278
00028 # define FLAG 279
00029 # define ITEM 280
00030 # define UCTRUE 281
00031 # define UCFALSE 282
00032 # define REMOVE 283
00033 # define ADD 284
00034 # define HIDE 285
00035 # define SCRIPT 286
00036 # define AFTER 287
00037 # define TICKS 288
00038 # define STATIC_ 289
00039 # define ORIGINAL 290
00040 # define CONTINUE 291
00041 # define REPEAT 292
00042 # define NOP 293
00043 # define NOHALT 294
00044 # define WAIT 295
00045 # define RISE 296
00046 # define DESCEND 297
00047 # define FRAME 298
00048 # define HATCH 299
00049 # define NEXT 300
00050 # define PREVIOUS 301
00051 # define CYCLE 302
00052 # define STEP 303
00053 # define MUSIC 304
00054 # define CALL 305
00055 # define SPEECH 306
00056 # define SFX 307
00057 # define FACE 308
00058 # define HIT 309
00059 # define HOURS 310
00060 # define ACTOR 311
00061 # define NORTH 312
00062 # define SOUTH 313
00063 # define EAST 314
00064 # define WEST 315
00065 # define NE 316
00066 # define NW 317
00067 # define SE 318
00068 # define SW 319
00069 # define STRING_LITERAL 320
00070 # define STRING_PREFIX 321
00071 # define IDENTIFIER 322
00072 # define INT_LITERAL 323
00073 # define AND 324
00074 # define OR 325
00075 # define EQUALS 326
00076 # define NEQUALS 327
00077 # define LTEQUALS 328
00078 # define GTEQUALS 329
00079 # define NOT 330
00080 # define UCC_POINTS 331
00081
00082 #line 1 "ucparse.yy"
00083
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 #ifdef HAVE_CONFIG_H
00109 # include <config.h>
00110 #endif
00111 #include <iostream>
00112 #include <stdio.h>
00113 #include <stdlib.h>
00114 #include <string.h>
00115 #include <vector>
00116
00117 #include "ucfun.h"
00118 #include "ucexpr.h"
00119 #include "ucstmt.h"
00120 #include "opcodes.h"
00121 #include "ucscriptop.h"
00122
00123 using std::strcpy;
00124 using std::strcat;
00125 using std::strlen;
00126
00127 void yyerror(char *);
00128 extern int yylex();
00129 static Uc_array_expression *Create_array(int, Uc_expression *);
00130 static Uc_array_expression *Create_array(int, Uc_expression *,
00131 Uc_expression *);
00132
00133
00134 #define YYERROR_VERBOSE 1
00135
00136 std::vector<Uc_function *> functions;
00137
00138 static Uc_function *function = 0;
00139 static int enum_val = -1;
00140
00141
00142 #line 61 "ucparse.yy"
00143 #ifndef YYSTYPE
00144 typedef union
00145 {
00146 class Uc_symbol *sym;
00147 class Uc_var_symbol *var;
00148 class Uc_expression *expr;
00149 class Uc_call_expression *funcall;
00150 class Uc_function_symbol *funsym;
00151 class Uc_statement *stmt;
00152 class std::vector<char *> *strvec;
00153 class Uc_block_statement *block;
00154 class Uc_arrayloop_statement *arrayloop;
00155 class Uc_array_expression *exprlist;
00156 int intval;
00157 char *strval;
00158 } yystype;
00159 # define YYSTYPE yystype
00160 # define YYSTYPE_IS_TRIVIAL 1
00161 #endif
00162 #ifndef YYDEBUG
00163 # define YYDEBUG 0
00164 #endif
00165
00166
00167
00168 #define YYFINAL 374
00169 #define YYFLAG -32768
00170 #define YYNTBASE 97
00171
00172
00173 #define YYTRANSLATE(x) ((unsigned)(x) <= 331 ? yytranslate[x] : 167)
00174
00175
00176 static const char yytranslate[] =
00177 {
00178 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00181 2, 2, 2, 2, 2, 2, 2, 83, 80, 2,
00182 86, 87, 81, 79, 91, 78, 96, 82, 2, 2,
00183 2, 2, 2, 2, 2, 2, 2, 2, 93, 90,
00184 76, 92, 77, 2, 2, 2, 2, 2, 2, 2,
00185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00187 2, 94, 2, 95, 2, 2, 2, 2, 2, 2,
00188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00190 2, 2, 2, 88, 2, 89, 2, 2, 2, 2,
00191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00196 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00197 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00198 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00199 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00203 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
00204 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
00205 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
00206 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
00207 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
00208 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
00209 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
00210 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
00211 84, 85
00212 };
00213
00214 #if YYDEBUG
00215 static const short yyprhs[] =
00216 {
00217 0, 0, 3, 5, 7, 9, 11, 13, 15, 16,
00218 20, 27, 29, 30, 31, 36, 39, 40, 42, 44,
00219 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
00220 66, 68, 70, 76, 82, 84, 86, 90, 94, 96,
00221 98, 100, 102, 106, 108, 109, 117, 121, 123, 125,
00222 127, 132, 136, 138, 142, 144, 148, 153, 155, 159,
00223 161, 165, 167, 171, 175, 180, 186, 194, 200, 204,
00224 205, 212, 213, 214, 224, 229, 232, 235, 243, 250,
00225 254, 257, 260, 268, 271, 272, 278, 282, 283, 288,
00226 290, 293, 295, 298, 303, 306, 309, 313, 318, 321,
00227 324, 327, 331, 336, 339, 343, 348, 352, 357, 361,
00228 365, 369, 373, 377, 383, 387, 391, 395, 399, 403,
00229 405, 407, 409, 411, 413, 415, 417, 419, 421, 425,
00230 426, 429, 432, 435, 441, 447, 449, 453, 457, 461,
00231 465, 469, 473, 477, 481, 485, 489, 493, 497, 501,
00232 505, 509, 513, 516, 519, 523, 525, 527, 529, 530,
00233 534, 536, 538, 540, 545, 550, 552, 554, 556, 558,
00234 560, 564, 566, 568, 572, 574, 576, 582, 584, 585,
00235 587, 588, 593, 596, 598, 600, 602, 603, 605, 607
00236 };
00237 static const short yyrhs[] =
00238 {
00239 97, 98, 0, 98, 0, 99, 0, 122, 0, 113,
00240 0, 109, 0, 117, 0, 0, 101, 100, 103, 0,
00241 163, 68, 102, 86, 160, 87, 0, 162, 0, 0,
00242 0, 88, 104, 105, 89, 0, 105, 106, 0, 0,
00243 107, 0, 123, 0, 124, 0, 125, 0, 126, 0,
00244 132, 0, 133, 0, 134, 0, 103, 0, 135, 0,
00245 136, 0, 140, 0, 147, 0, 148, 0, 149, 0,
00246 21, 86, 152, 87, 90, 0, 22, 86, 152, 87,
00247 90, 0, 150, 0, 90, 0, 15, 108, 90, 0,
00248 18, 120, 90, 0, 113, 0, 109, 0, 122, 0,
00249 117, 0, 108, 91, 116, 0, 116, 0, 0, 19,
00250 68, 110, 88, 111, 89, 90, 0, 111, 91, 112,
00251 0, 112, 0, 115, 0, 68, 0, 17, 16, 114,
00252 90, 0, 114, 91, 115, 0, 115, 0, 68, 92,
00253 151, 0, 68, 0, 68, 92, 151, 0, 35, 15,
00254 118, 90, 0, 119, 0, 118, 91, 119, 0, 68,
00255 0, 120, 91, 121, 0, 121, 0, 68, 92, 66,
00256 0, 11, 101, 90, 0, 151, 92, 151, 90, 0,
00257 3, 86, 151, 87, 106, 0, 3, 86, 151, 87,
00258 106, 4, 106, 0, 6, 86, 151, 87, 106, 0,
00259 130, 87, 106, 0, 0, 130, 9, 68, 127, 87,
00260 106, 0, 0, 0, 130, 9, 68, 128, 10, 68,
00261 129, 87, 106, 0, 131, 68, 8, 165, 0, 7,
00262 86, 0, 155, 90, 0, 154, 157, 21, 86, 152,
00263 87, 90, 0, 154, 157, 31, 86, 87, 90, 0,
00264 5, 151, 90, 0, 5, 90, 0, 20, 106, 0,
00265 20, 86, 151, 87, 88, 137, 89, 0, 137, 138,
00266 0, 0, 14, 66, 139, 93, 105, 0, 86, 29,
00267 87, 0, 0, 32, 141, 146, 143, 0, 151, 0,
00268 142, 143, 0, 143, 0, 37, 90, 0, 38, 151,
00269 143, 90, 0, 39, 90, 0, 40, 90, 0, 41,
00270 151, 90, 0, 41, 151, 56, 90, 0, 29, 90,
00271 0, 42, 90, 0, 43, 90, 0, 44, 151, 90,
00272 0, 57, 44, 162, 90, 0, 45, 90, 0, 46,
00273 44, 90, 0, 46, 44, 48, 90, 0, 47, 44,
00274 90, 0, 47, 44, 48, 90, 0, 21, 151, 90,
00275 0, 49, 151, 90, 0, 49, 144, 90, 0, 50,
00276 151, 90, 0, 51, 151, 90, 0, 51, 151, 91,
00277 145, 90, 0, 52, 151, 90, 0, 53, 151, 90,
00278 0, 54, 151, 90, 0, 55, 151, 90, 0, 88,
00279 142, 89, 0, 58, 0, 62, 0, 60, 0, 64,
00280 0, 59, 0, 65, 0, 61, 0, 63, 0, 162,
00281 0, 33, 151, 34, 0, 0, 12, 90, 0, 68,
00282 93, 0, 13, 68, 0, 30, 86, 153, 87, 90,
00283 0, 29, 86, 153, 87, 90, 0, 154, 0, 151,
00284 79, 151, 0, 151, 78, 151, 0, 151, 81, 151,
00285 0, 151, 82, 151, 0, 151, 83, 151, 0, 151,
00286 72, 151, 0, 23, 72, 151, 0, 151, 73, 151,
00287 0, 151, 76, 151, 0, 151, 74, 151, 0, 151,
00288 77, 151, 0, 151, 75, 151, 0, 151, 70, 151,
00289 0, 151, 71, 151, 0, 151, 8, 151, 0, 151,
00290 80, 151, 0, 78, 154, 0, 84, 154, 0, 94,
00291 153, 95, 0, 66, 0, 67, 0, 153, 0, 0,
00292 153, 91, 151, 0, 151, 0, 69, 0, 164, 0,
00293 165, 94, 151, 95, 0, 25, 94, 162, 95, 0,
00294 155, 0, 27, 0, 28, 0, 24, 0, 26, 0,
00295 86, 151, 87, 0, 158, 0, 156, 0, 154, 157,
00296 158, 0, 85, 0, 96, 0, 68, 159, 86, 152,
00297 87, 0, 36, 0, 0, 161, 0, 0, 161, 91,
00298 163, 68, 0, 163, 68, 0, 69, 0, 166, 0,
00299 15, 0, 0, 166, 0, 166, 0, 68, 0
00300 };
00301
00302 #endif
00303
00304 #if YYDEBUG
00305
00306 static const short yyrline[] =
00307 {
00308 0, 140, 142, 145, 147, 152, 153, 154, 157, 157,
00309 169, 177, 179, 183, 183, 193, 199, 203, 205, 206,
00310 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
00311 217, 218, 219, 221, 223, 224, 228, 231, 233, 235,
00312 237, 243, 247, 267, 271, 271, 275, 277, 280, 282,
00313 292, 296, 298, 301, 317, 323, 331, 335, 337, 340,
00314 350, 352, 355, 362, 367, 372, 375, 379, 384, 391,
00315 391, 399, 399, 399, 410, 418, 423, 428, 441, 449,
00316 452, 456, 461, 466, 472, 476, 484, 487, 491, 507,
00317 511, 514, 521, 524, 536, 538, 540, 542, 544, 546,
00318 548, 550, 552, 554, 556, 558, 560, 562, 564, 566,
00319 568, 570, 572, 574, 577, 579, 581, 583, 585, 589,
00320 592, 594, 596, 598, 600, 602, 604, 608, 612, 615,
00321 619, 624, 642, 647, 654, 662, 665, 667, 669, 671,
00322 673, 675, 677, 679, 681, 683, 685, 687, 689, 691,
00323 693, 695, 697, 700, 702, 704, 706, 710, 712, 716,
00324 719, 726, 729, 731, 733, 735, 737, 739, 741, 743,
00325 745, 749, 751, 754, 762, 764, 767, 784, 787, 791,
00326 793, 797, 800, 807, 809, 825, 827, 830, 844, 860
00327 };
00328 #endif
00329
00330
00331 #if (YYDEBUG) || defined YYERROR_VERBOSE
00332
00333
00334 static const char *const yytname[] =
00335 {
00336 "$", "error", "$undefined.", "IF", "ELSE", "RETURN", "WHILE", "FOR",
00337 "UCC_IN", "WITH", "TO", "EXTERN", "BREAK", "GOTO", "CASE", "VAR",
00338 "UCC_INT", "UCC_CONST", "STRING", "ENUM", "CONVERSE", "SAY", "MESSAGE",
00339 "RESPONSE", "EVENT", "FLAG", "ITEM", "UCTRUE", "UCFALSE", "REMOVE",
00340 "ADD", "HIDE", "SCRIPT", "AFTER", "TICKS", "STATIC_", "ORIGINAL",
00341 "CONTINUE", "REPEAT", "NOP", "NOHALT", "WAIT", "RISE", "DESCEND",
00342 "FRAME", "HATCH", "NEXT", "PREVIOUS", "CYCLE", "STEP", "MUSIC", "CALL",
00343 "SPEECH", "SFX", "FACE", "HIT", "HOURS", "ACTOR", "NORTH", "SOUTH",
00344 "EAST", "WEST", "NE", "NW", "SE", "SW", "STRING_LITERAL",
00345 "STRING_PREFIX", "IDENTIFIER", "INT_LITERAL", "AND", "OR", "EQUALS",
00346 "NEQUALS", "LTEQUALS", "GTEQUALS", "'<'", "'>'", "'-'", "'+'", "'&'",
00347 "'*'", "'/'", "'%'", "NOT", "UCC_POINTS", "'('", "')'", "'{'", "'}'",
00348 "';'", "','", "'='", "':'", "'['", "']'", "'.'", "design",
00349 "global_decl", "function", "@1", "function_proto", "opt_int",
00350 "statement_block", "@2", "statement_list", "statement", "declaration",
00351 "var_decl_list", "enum_decl", "@3", "enum_item_list", "enum_item",
00352 "const_int_decl", "const_int_decl_list", "const_int", "var_decl",
00353 "static_decl", "static_var_decl_list", "static_var", "string_decl_list",
00354 "string_decl", "function_decl", "assignment_statement", "if_statement",
00355 "while_statement", "array_loop_statement", "@4", "@5", "@6",
00356 "start_array_loop", "start_for", "function_call_statement",
00357 "special_method_call_statement", "return_statement",
00358 "converse_statement", "converse2_statement", "converse_case_list",
00359 "converse_case", "converse_options", "script_statement", "item",
00360 "script_command_list", "script_command", "direction", "eventid",
00361 "opt_script_delay", "break_statement", "label_statement",
00362 "goto_statement", "answer_statement", "expression",
00363 "opt_expression_list", "expression_list", "primary", "function_call",
00364 "method_call", "hierarchy_tok", "routine_call", "opt_original",
00365 "opt_identifier_list", "identifier_list", "int_literal", "opt_var",
00366 "declared_var_value", "declared_var", "declared_sym", 0
00367 };
00368 #endif
00369
00370
00371 static const short yyr1[] =
00372 {
00373 0, 97, 97, 98, 98, 98, 98, 98, 100, 99,
00374 101, 102, 102, 104, 103, 105, 105, 106, 106, 106,
00375 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
00376 106, 106, 106, 106, 106, 106, 107, 107, 107, 107,
00377 107, 107, 108, 108, 110, 109, 111, 111, 112, 112,
00378 113, 114, 114, 115, 116, 116, 117, 118, 118, 119,
00379 120, 120, 121, 122, 123, 124, 124, 125, 126, 127,
00380 126, 128, 129, 126, 130, 131, 132, 133, 133, 134,
00381 134, 135, 136, 137, 137, 138, 139, 139, 140, 141,
00382 142, 142, 143, 143, 143, 143, 143, 143, 143, 143,
00383 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
00384 143, 143, 143, 143, 143, 143, 143, 143, 143, 144,
00385 144, 144, 144, 144, 144, 144, 144, 145, 146, 146,
00386 147, 148, 149, 150, 150, 151, 151, 151, 151, 151,
00387 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
00388 151, 151, 151, 151, 151, 151, 151, 152, 152, 153,
00389 153, 154, 154, 154, 154, 154, 154, 154, 154, 154,
00390 154, 155, 155, 156, 157, 157, 158, 159, 159, 160,
00391 160, 161, 161, 162, 162, 163, 163, 164, 165, 166
00392 };
00393
00394
00395 static const short yyr2[] =
00396 {
00397 0, 2, 1, 1, 1, 1, 1, 1, 0, 3,
00398 6, 1, 0, 0, 4, 2, 0, 1, 1, 1,
00399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00400 1, 1, 5, 5, 1, 1, 3, 3, 1, 1,
00401 1, 1, 3, 1, 0, 7, 3, 1, 1, 1,
00402 4, 3, 1, 3, 1, 3, 4, 1, 3, 1,
00403 3, 1, 3, 3, 4, 5, 7, 5, 3, 0,
00404 6, 0, 0, 9, 4, 2, 2, 7, 6, 3,
00405 2, 2, 7, 2, 0, 5, 3, 0, 4, 1,
00406 2, 1, 2, 4, 2, 2, 3, 4, 2, 2,
00407 2, 3, 4, 2, 3, 4, 3, 4, 3, 3,
00408 3, 3, 3, 5, 3, 3, 3, 3, 3, 1,
00409 1, 1, 1, 1, 1, 1, 1, 1, 3, 0,
00410 2, 2, 2, 5, 5, 1, 3, 3, 3, 3,
00411 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00412 3, 3, 2, 2, 3, 1, 1, 1, 0, 3,
00413 1, 1, 1, 4, 4, 1, 1, 1, 1, 1,
00414 3, 1, 1, 3, 1, 1, 5, 1, 0, 1,
00415 0, 4, 2, 1, 1, 1, 0, 1, 1, 1
00416 };
00417
00418
00419
00420
00421 static const short yydefact[] =
00422 {
00423 186, 186, 185, 0, 0, 0, 186, 2, 3, 8,
00424 6, 5, 7, 4, 0, 0, 0, 44, 0, 1,
00425 0, 12, 63, 0, 0, 52, 0, 59, 0, 57,
00426 13, 9, 189, 183, 0, 11, 184, 0, 50, 0,
00427 0, 56, 0, 16, 180, 0, 168, 0, 169, 166,
00428 167, 155, 156, 189, 161, 0, 0, 0, 0, 53,
00429 135, 165, 172, 171, 162, 0, 187, 51, 49, 0,
00430 47, 48, 58, 0, 0, 179, 0, 0, 0, 177,
00431 0, 152, 153, 0, 160, 0, 0, 0, 0, 0,
00432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00433 0, 174, 175, 0, 0, 0, 0, 0, 0, 0,
00434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00435 0, 189, 14, 35, 25, 15, 17, 39, 38, 41,
00436 40, 18, 19, 20, 21, 0, 0, 22, 23, 24,
00437 26, 27, 28, 29, 30, 31, 34, 0, 135, 165,
00438 10, 186, 182, 142, 0, 158, 170, 0, 154, 150,
00439 148, 149, 141, 143, 145, 147, 144, 146, 137, 136,
00440 151, 138, 139, 140, 178, 173, 0, 45, 46, 0,
00441 80, 0, 0, 75, 130, 132, 54, 0, 43, 0,
00442 0, 61, 0, 81, 158, 158, 0, 0, 129, 89,
00443 131, 0, 0, 0, 0, 0, 76, 0, 164, 0,
00444 157, 159, 163, 0, 79, 0, 0, 36, 0, 0,
00445 37, 0, 0, 0, 0, 0, 0, 0, 0, 69,
00446 68, 0, 0, 0, 0, 181, 176, 0, 0, 55,
00447 42, 62, 60, 170, 0, 0, 0, 0, 0, 0,
00448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00450 0, 88, 0, 0, 74, 188, 64, 158, 0, 65,
00451 67, 84, 32, 33, 134, 133, 128, 0, 98, 92,
00452 0, 94, 95, 0, 99, 100, 0, 103, 0, 0,
00453 119, 123, 121, 125, 120, 126, 122, 124, 0, 0,
00454 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
00455 0, 0, 0, 0, 0, 108, 0, 0, 96, 101,
00456 0, 104, 0, 106, 110, 109, 111, 112, 0, 114,
00457 115, 116, 117, 0, 118, 90, 70, 72, 0, 78,
00458 66, 0, 82, 83, 93, 97, 105, 107, 0, 127,
00459 102, 0, 77, 87, 113, 0, 0, 0, 73, 0,
00460 16, 86, 85, 0, 0
00461 };
00462
00463 static const short yydefgoto[] =
00464 {
00465 6, 7, 8, 20, 9, 34, 124, 43, 73, 125,
00466 126, 187, 127, 26, 69, 70, 128, 24, 71, 188,
00467 129, 28, 29, 190, 191, 130, 131, 132, 133, 134,
00468 272, 273, 361, 135, 136, 137, 138, 139, 140, 141,
00469 324, 353, 367, 142, 198, 317, 271, 308, 358, 228,
00470 143, 144, 145, 146, 147, 209, 210, 60, 61, 62,
00471 103, 63, 80, 74, 75, 35, 14, 64, 65, 66
00472 };
00473
00474 static const short yypact[] =
00475 {
00476 98, 53,-32768, 91, 14, 99, 101,-32768,-32768,-32768,
00477 -32768,-32768,-32768,-32768, 51, 32, 76,-32768, 103,-32768,
00478 81, -3,-32768, 35, 40,-32768, 84,-32768, 44,-32768,
00479 -32768,-32768,-32768,-32768, 87,-32768,-32768, 936,-32768, 76,
00480 107,-32768, 103,-32768, 27, 104,-32768, 85,-32768,-32768,
00481 -32768,-32768,-32768, -14,-32768, 22, 22, 936, 936, 868,
00482 -33,-32768,-32768,-32768,-32768, 86, 90,-32768, 35, -35,
00483 -32768,-32768,-32768, 8, 94, 96, 109, 936, -3,-32768,
00484 92, -33, -33, 788, 868, -38, 936, 936, 936, 936,
00485 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
00486 936,-32768,-32768, 117, 936, 112, 107, 119, 206, 120,
00487 121, 113, 136, 140, 141, 333, 125, 129, 130, 131,
00488 936, -24,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00489 -32768,-32768,-32768,-32768,-32768, 0, 150,-32768,-32768,-32768,
00490 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 299, -33, 132,
00491 -32768, 53,-32768, 59, 124, 936,-32768, 936,-32768, 59,
00492 581, 581, 59, 59, 59, 59, 59, 59, 23, 23,
00493 23,-32768,-32768,-32768, 184,-32768, 118,-32768,-32768, 936,
00494 -32768, 465, 936,-32768,-32768,-32768, 133, 58,-32768, 134,
00495 60,-32768, 936,-32768, 936, 936, 936, 936, 191, 868,
00496 -32768, 159, 419, 220, 936, 20,-32768, 167,-32768, 149,
00497 146, 868,-32768, 809,-32768, 827, 936,-32768, 140, 172,
00498 -32768, 141, 845, 152, 153, -7, 34, 936, 1022, 231,
00499 -32768, 174, 486, 158, 160,-32768,-32768, 419, 419, 868,
00500 -32768,-32768,-32768, 162, 157, 161, 164, 165, 903, 936,
00501 169, 176, 936, 177, 179, 936, 181, 186, 936, 187,
00502 208, 213, 929, 936, 936, 936, 936, 936, 936, 234,
00503 1022,-32768, 192, 270,-32768,-32768,-32768, 936, 194, 279,
00504 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 520,-32768,-32768,
00505 769,-32768,-32768, 444,-32768,-32768, 541,-32768, -9, 10,
00506 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 195, 562,
00507 596, 385, 617, 638, 672, 693, -3, 995,-32768, 419,
00508 218, 200, 198, 419, -4,-32768, 199, 201,-32768,-32768,
00509 204,-32768, 209,-32768,-32768,-32768,-32768,-32768, -3,-32768,
00510 -32768,-32768,-32768, 211,-32768,-32768,-32768,-32768, 214,-32768,
00511 -32768, 232,-32768,-32768,-32768,-32768,-32768,-32768, 215,-32768,
00512 -32768, 216,-32768, 222,-32768, 419, 277, 219,-32768, 224,
00513 -32768,-32768, 419, 309,-32768
00514 };
00515
00516 static const short yypgoto[] =
00517 {
00518 -32768, 307,-32768,-32768, 313,-32768, 296,-32768, -50, -109,
00519 -32768,-32768, 61,-32768,-32768, 217, 64,-32768, 39, 108,
00520 73,-32768, 280,-32768, 106, 83,-32768,-32768,-32768,-32768,
00521 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00522 -32768,-32768,-32768,-32768,-32768,-32768, -246,-32768,-32768,-32768,
00523 -32768,-32768,-32768,-32768, 66, -178, -51, -55, -70,-32768,
00524 189, -95,-32768,-32768,-32768, -73, -40,-32768, 110, -19
00525 };
00526
00527
00528 #define YYLAST 1110
00529
00530
00531 static const short yytable[] =
00532 {
00533 81, 82, 36, 149, 76, 154, 193, 85, 175, 201,
00534 351, 107, 79, 108, 109, 110, 223, 224, 148, 1,
00535 111, 112, 79, 113, 318, 3, 114, 4, 115, 116,
00536 117, 45, 46, 47, 48, 49, 50, 118, 119, 330,
00537 120, 233, 2, 5, 326, 149, 46, 47, 48, 49,
00538 50, 234, 101, 157, 105, 25, 106, 158, 332, 36,
00539 148, 10, -178, 102, 11, 32, 33, 10, 2, 200,
00540 11, 345, -178, 12, 51, 52, 121, 54, 67, 12,
00541 246, 331, 17, 13, 157, 352, 55, 202, 174, 13,
00542 53, 54, 56, 230, 57, -186, 30, 122, 123, 321,
00543 333, 373, 58, 59, 98, 99, 100, 16, 57, 1,
00544 175, 207, 1, 2, 18, 3, 2, 4, 3, 21,
00545 4, 247, 22, 83, 84, 157, 86, 37, 279, 280,
00546 38, 39, 149, 5, 41, 42, 5, 95, 96, 97,
00547 98, 99, 100, 153, 23, 225, 226, 148, 217, 218,
00548 220, 221, 159, 160, 161, 162, 163, 164, 165, 166,
00549 167, 168, 169, 170, 171, 172, 173, 149, 149, 30,
00550 176, 27, 40, 44, 181, 68, 77, 152, 155, 78,
00551 104, 150, 148, 148, -188, 174, 199, 151, 87, 88,
00552 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
00553 99, 100, 177, 184, 185, 179, 182, 183, 186, 189,
00554 346, 194, 275, 212, 350, 195, 196, 197, 203, 208,
00555 79, 84, 206, 211, 227, 216, 219, 229, 231, 45,
00556 46, 47, 48, 49, 50, 235, 236, 157, 241, 244,
00557 245, -71, 32, 343, 277, 213, 278, 282, 215, 149,
00558 281, 283, 298, 149, 284, 285, 368, 299, 222, 288,
00559 84, 84, 84, 84, 148, 359, 289, 291, 148, 292,
00560 232, 294, 51, 52, 53, 54, 295, 297, 316, 319,
00561 320, 322, 239, 323, 55, 334, 347, 348, 349, 354,
00562 56, 355, 57, 248, 356, 149, 180, 36, 363, 357,
00563 58, 360, 149, 365, 362, 364, 369, 86, 366, 374,
00564 148, 371, 370, 19, 15, 287, 31, 148, 290, 36,
00565 372, 293, 72, 178, 296, 0, 240, 242, 309, 310,
00566 311, 312, 313, 314, 315, 0, 107, 205, 108, 109,
00567 110, 274, 0, 84, 1, 111, 112, 0, 113, 0,
00568 3, 114, 4, 115, 116, 117, 45, 46, 47, 48,
00569 49, 50, 118, 119, 0, 120, 0, 0, 5, 87,
00570 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
00571 98, 99, 100, 0, 0, 0, 0, 0, 0, 0,
00572 0, 204, 0, 86, 0, 0, 0, 0, 0, 51,
00573 52, 121, 54, 0, 0, 0, 0, 0, 0, 0,
00574 0, 55, 0, 0, 0, 0, 0, 56, 0, 192,
00575 0, 30, 107, 123, 108, 109, 110, 58, 0, 0,
00576 1, 111, 112, 0, 113, 0, 3, 114, 4, 115,
00577 116, 117, 45, 46, 47, 48, 49, 50, 118, 119,
00578 0, 120, 86, 0, 5, 87, 88, 89, 90, 91,
00579 92, 93, 94, 95, 96, 97, 98, 99, 100, 0,
00580 0, 0, 0, 86, 0, 337, 338, 0, 0, 0,
00581 0, 0, 0, 0, 0, 51, 52, 121, 54, 0,
00582 0, 0, 0, 0, 86, 0, 0, 55, 0, 0,
00583 327, 0, 0, 56, 0, 57, 0, 30, 0, 123,
00584 0, 0, 0, 58, 87, 88, 89, 90, 91, 92,
00585 93, 94, 95, 96, 97, 98, 99, 100, 86, 0,
00586 0, 0, 0, 0, 328, 87, 88, 89, 90, 91,
00587 92, 93, 94, 95, 96, 97, 98, 99, 100, 86,
00588 0, 0, 0, 0, 0, 214, 87, 88, 89, 90,
00589 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
00590 86, 0, 0, 0, 0, 0, 276, 0, 0, 0,
00591 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
00592 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
00593 97, 98, 99, 100, 86, 0, 0, 0, 0, 0,
00594 325, 87, 88, 89, 90, 91, 92, 93, 94, 95,
00595 96, 97, 98, 99, 100, 86, 0, 0, 0, 0,
00596 0, 329, 87, 88, 89, 90, 91, 92, 93, 94,
00597 95, 96, 97, 98, 99, 100, 86, 0, 0, 0,
00598 0, 0, 335, 89, 90, 91, 92, 93, 94, 95,
00599 96, 97, 98, 99, 100, 0, 87, 88, 89, 90,
00600 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
00601 86, 0, 0, 0, 0, 0, 336, 87, 88, 89,
00602 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
00603 100, 86, 0, 0, 0, 0, 0, 339, 87, 88,
00604 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
00605 99, 100, 0, 0, 0, 0, 0, 0, 340, 0,
00606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00607 0, 0, 87, 88, 89, 90, 91, 92, 93, 94,
00608 95, 96, 97, 98, 99, 100, 0, 0, 0, 0,
00609 0, 0, 341, 87, 88, 89, 90, 91, 92, 93,
00610 94, 95, 96, 97, 98, 99, 100, 86, 0, 0,
00611 0, 0, 0, 342, 0, 0, 0, 0, 0, 0,
00612 249, 0, 0, 0, 0, 0, 86, 0, 250, 0,
00613 0, 0, 0, 0, 0, 0, 251, 252, 253, 254,
00614 255, 256, 257, 258, 259, 260, 261, 86, 262, 263,
00615 264, 265, 266, 267, 268, 0, 269, 0, 0, 0,
00616 0, 0, 0, 0, 0, 86, 0, 0, 0, 87,
00617 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
00618 98, 99, 100, 86, 0, 0, 0, 270, 87, 88,
00619 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
00620 99, 100, 0, 0, 0, 156, 86, 0, 0, 87,
00621 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
00622 98, 99, 100, 0, 0, 0, 237, 87, 88, 89,
00623 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
00624 100, 86, 0, 0, 238, 87, 88, 89, 90, 91,
00625 92, 93, 94, 95, 96, 97, 98, 99, 100, 0,
00626 0, 0, 243, 0, 0, 0, 0, 286, 87, 88,
00627 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
00628 99, 100, 45, 46, 47, 48, 49, 50, 0, 45,
00629 46, 47, 48, 49, 50, 0, 0, 0, 0, 0,
00630 0, 0, 0, 87, 88, 89, 90, 91, 92, 93,
00631 94, 95, 96, 97, 98, 99, 100, 300, 301, 302,
00632 303, 304, 305, 306, 307, 51, 52, 53, 54, 0,
00633 0, 0, 51, 52, 53, 54, 0, 55, 0, 0,
00634 0, 0, 0, 56, 55, 57, 249, 0, 0, 0,
00635 56, 0, 57, 58, 250, 0, 0, 0, 0, 0,
00636 58, 0, 251, 252, 253, 254, 255, 256, 257, 258,
00637 259, 260, 261, 249, 262, 263, 264, 265, 266, 267,
00638 268, 250, 269, 0, 0, 0, 0, 0, 0, 251,
00639 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
00640 0, 262, 263, 264, 265, 266, 267, 268, 0, 269,
00641 0, 0, 0, 270, 344, 0, 0, 0, 0, 0,
00642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00644 270
00645 };
00646
00647 static const short yycheck[] =
00648 {
00649 55, 56, 21, 73, 44, 78, 115, 58, 103, 9,
00650 14, 3, 36, 5, 6, 7, 194, 195, 73, 11,
00651 12, 13, 36, 15, 270, 17, 18, 19, 20, 21,
00652 22, 23, 24, 25, 26, 27, 28, 29, 30, 48,
00653 32, 21, 15, 35, 290, 115, 24, 25, 26, 27,
00654 28, 31, 85, 91, 89, 16, 91, 95, 48, 78,
00655 115, 0, 86, 96, 0, 68, 69, 6, 15, 93,
00656 6, 317, 86, 0, 66, 67, 68, 69, 39, 6,
00657 87, 90, 68, 0, 91, 89, 78, 87, 68, 6,
00658 68, 69, 84, 202, 86, 68, 88, 89, 90, 277,
00659 90, 0, 94, 37, 81, 82, 83, 16, 86, 11,
00660 205, 151, 11, 15, 15, 17, 15, 19, 17, 68,
00661 19, 87, 90, 57, 58, 91, 8, 92, 237, 238,
00662 90, 91, 202, 35, 90, 91, 35, 78, 79, 80,
00663 81, 82, 83, 77, 68, 196, 197, 202, 90, 91,
00664 90, 91, 86, 87, 88, 89, 90, 91, 92, 93,
00665 94, 95, 96, 97, 98, 99, 100, 237, 238, 88,
00666 104, 68, 88, 86, 108, 68, 72, 68, 86, 94,
00667 94, 87, 237, 238, 94, 68, 120, 91, 70, 71,
00668 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
00669 82, 83, 90, 90, 68, 86, 86, 86, 68, 68,
00670 319, 86, 231, 95, 323, 86, 86, 86, 68, 95,
00671 36, 155, 90, 157, 33, 92, 92, 68, 8, 23,
00672 24, 25, 26, 27, 28, 68, 87, 91, 66, 87,
00673 87, 10, 68, 316, 86, 179, 86, 90, 182, 319,
00674 88, 90, 44, 323, 90, 90, 365, 44, 192, 90,
00675 194, 195, 196, 197, 319, 338, 90, 90, 323, 90,
00676 204, 90, 66, 67, 68, 69, 90, 90, 44, 87,
00677 10, 87, 216, 4, 78, 90, 68, 87, 90, 90,
00678 84, 90, 86, 227, 90, 365, 90, 316, 66, 90,
00679 94, 90, 372, 87, 90, 90, 29, 8, 86, 0,
00680 365, 87, 93, 6, 1, 249, 20, 372, 252, 338,
00681 370, 255, 42, 106, 258, -1, 218, 221, 262, 263,
00682 264, 265, 266, 267, 268, -1, 3, 148, 5, 6,
00683 7, 231, -1, 277, 11, 12, 13, -1, 15, -1,
00684 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
00685 27, 28, 29, 30, -1, 32, -1, -1, 35, 70,
00686 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
00687 81, 82, 83, -1, -1, -1, -1, -1, -1, -1,
00688 -1, 92, -1, 8, -1, -1, -1, -1, -1, 66,
00689 67, 68, 69, -1, -1, -1, -1, -1, -1, -1,
00690 -1, 78, -1, -1, -1, -1, -1, 84, -1, 86,
00691 -1, 88, 3, 90, 5, 6, 7, 94, -1, -1,
00692 11, 12, 13, -1, 15, -1, 17, 18, 19, 20,
00693 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
00694 -1, 32, 8, -1, 35, 70, 71, 72, 73, 74,
00695 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
00696 -1, -1, -1, 8, -1, 90, 91, -1, -1, -1,
00697 -1, -1, -1, -1, -1, 66, 67, 68, 69, -1,
00698 -1, -1, -1, -1, 8, -1, -1, 78, -1, -1,
00699 56, -1, -1, 84, -1, 86, -1, 88, -1, 90,
00700 -1, -1, -1, 94, 70, 71, 72, 73, 74, 75,
00701 76, 77, 78, 79, 80, 81, 82, 83, 8, -1,
00702 -1, -1, -1, -1, 90, 70, 71, 72, 73, 74,
00703 75, 76, 77, 78, 79, 80, 81, 82, 83, 8,
00704 -1, -1, -1, -1, -1, 90, 70, 71, 72, 73,
00705 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
00706 8, -1, -1, -1, -1, -1, 90, -1, -1, -1,
00707 -1, -1, -1, -1, -1, -1, -1, -1, -1, 8,
00708 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
00709 80, 81, 82, 83, 8, -1, -1, -1, -1, -1,
00710 90, 70, 71, 72, 73, 74, 75, 76, 77, 78,
00711 79, 80, 81, 82, 83, 8, -1, -1, -1, -1,
00712 -1, 90, 70, 71, 72, 73, 74, 75, 76, 77,
00713 78, 79, 80, 81, 82, 83, 8, -1, -1, -1,
00714 -1, -1, 90, 72, 73, 74, 75, 76, 77, 78,
00715 79, 80, 81, 82, 83, -1, 70, 71, 72, 73,
00716 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
00717 8, -1, -1, -1, -1, -1, 90, 70, 71, 72,
00718 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
00719 83, 8, -1, -1, -1, -1, -1, 90, 70, 71,
00720 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
00721 82, 83, -1, -1, -1, -1, -1, -1, 90, -1,
00722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00723 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
00724 78, 79, 80, 81, 82, 83, -1, -1, -1, -1,
00725 -1, -1, 90, 70, 71, 72, 73, 74, 75, 76,
00726 77, 78, 79, 80, 81, 82, 83, 8, -1, -1,
00727 -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
00728 21, -1, -1, -1, -1, -1, 8, -1, 29, -1,
00729 -1, -1, -1, -1, -1, -1, 37, 38, 39, 40,
00730 41, 42, 43, 44, 45, 46, 47, 8, 49, 50,
00731 51, 52, 53, 54, 55, -1, 57, -1, -1, -1,
00732 -1, -1, -1, -1, -1, 8, -1, -1, -1, 70,
00733 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
00734 81, 82, 83, 8, -1, -1, -1, 88, 70, 71,
00735 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
00736 82, 83, -1, -1, -1, 87, 8, -1, -1, 70,
00737 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
00738 81, 82, 83, -1, -1, -1, 87, 70, 71, 72,
00739 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
00740 83, 8, -1, -1, 87, 70, 71, 72, 73, 74,
00741 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
00742 -1, -1, 87, -1, -1, -1, -1, 34, 70, 71,
00743 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
00744 82, 83, 23, 24, 25, 26, 27, 28, -1, 23,
00745 24, 25, 26, 27, 28, -1, -1, -1, -1, -1,
00746 -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
00747 77, 78, 79, 80, 81, 82, 83, 58, 59, 60,
00748 61, 62, 63, 64, 65, 66, 67, 68, 69, -1,
00749 -1, -1, 66, 67, 68, 69, -1, 78, -1, -1,
00750 -1, -1, -1, 84, 78, 86, 21, -1, -1, -1,
00751 84, -1, 86, 94, 29, -1, -1, -1, -1, -1,
00752 94, -1, 37, 38, 39, 40, 41, 42, 43, 44,
00753 45, 46, 47, 21, 49, 50, 51, 52, 53, 54,
00754 55, 29, 57, -1, -1, -1, -1, -1, -1, 37,
00755 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
00756 -1, 49, 50, 51, 52, 53, 54, 55, -1, 57,
00757 -1, -1, -1, 88, 89, -1, -1, -1, -1, -1,
00758 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00759 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00760 88
00761 };
00762
00763 #line 3 "/usr/share/bison/bison.simple"
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
00803
00804
00805
00806 # if YYSTACK_USE_ALLOCA
00807 # define YYSTACK_ALLOC alloca
00808 # else
00809 # ifndef YYSTACK_USE_ALLOCA
00810 # if defined (alloca) || defined (_ALLOCA_H)
00811 # define YYSTACK_ALLOC alloca
00812 # else
00813 # ifdef __GNUC__
00814 # define YYSTACK_ALLOC __builtin_alloca
00815 # endif
00816 # endif
00817 # endif
00818 # endif
00819
00820 # ifdef YYSTACK_ALLOC
00821
00822 # define YYSTACK_FREE(Ptr) do { ; } while (0)
00823 # else
00824 # if defined (__STDC__) || defined (__cplusplus)
00825 # include <stdlib.h>
00826 # define YYSIZE_T size_t
00827 # endif
00828 # define YYSTACK_ALLOC malloc
00829 # define YYSTACK_FREE free
00830 # endif
00831 #endif
00832
00833
00834 #if (! defined (yyoverflow) \
00835 && (! defined (__cplusplus) \
00836 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00837
00838
00839 union yyalloc
00840 {
00841 short yyss;
00842 YYSTYPE yyvs;
00843 # if YYLSP_NEEDED
00844 YYLTYPE yyls;
00845 # endif
00846 };
00847
00848
00849 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
00850
00851
00852
00853 # if YYLSP_NEEDED
00854 # define YYSTACK_BYTES(N) \
00855 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
00856 + 2 * YYSTACK_GAP_MAX)
00857 # else
00858 # define YYSTACK_BYTES(N) \
00859 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
00860 + YYSTACK_GAP_MAX)
00861 # endif
00862
00863
00864
00865 # ifndef YYCOPY
00866 # if 1 < __GNUC__
00867 # define YYCOPY(To, From, Count) \
00868 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00869 # else
00870 # define YYCOPY(To, From, Count) \
00871 do \
00872 { \
00873 register YYSIZE_T yyi; \
00874 for (yyi = 0; yyi < (Count); yyi++) \
00875 (To)[yyi] = (From)[yyi]; \
00876 } \
00877 while (0)
00878 # endif
00879 # endif
00880
00881
00882
00883
00884
00885
00886 # define YYSTACK_RELOCATE(Stack) \
00887 do \
00888 { \
00889 YYSIZE_T yynewbytes; \
00890 YYCOPY (&yyptr->Stack, Stack, yysize); \
00891 Stack = &yyptr->Stack; \
00892 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
00893 yyptr += yynewbytes / sizeof (*yyptr); \
00894 } \
00895 while (0)
00896
00897 #endif
00898
00899
00900 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
00901 # define YYSIZE_T __SIZE_TYPE__
00902 #endif
00903 #if ! defined (YYSIZE_T) && defined (size_t)
00904 # define YYSIZE_T size_t
00905 #endif
00906 #if ! defined (YYSIZE_T)
00907 # if defined (__STDC__) || defined (__cplusplus)
00908 # include <stddef.h>
00909 # define YYSIZE_T size_t
00910 # endif
00911 #endif
00912 #if ! defined (YYSIZE_T)
00913 # define YYSIZE_T unsigned int
00914 #endif
00915
00916 #define yyerrok (yyerrstatus = 0)
00917 #define yyclearin (yychar = YYEMPTY)
00918 #define YYEMPTY -2
00919 #define YYEOF 0
00920 #define YYACCEPT goto yyacceptlab
00921 #define YYABORT goto yyabortlab
00922 #define YYERROR goto yyerrlab1
00923
00924
00925
00926 #define YYFAIL goto yyerrlab
00927 #define YYRECOVERING() (!!yyerrstatus)
00928 #define YYBACKUP(Token, Value) \
00929 do \
00930 if (yychar == YYEMPTY && yylen == 1) \
00931 { \
00932 yychar = (Token); \
00933 yylval = (Value); \
00934 yychar1 = YYTRANSLATE (yychar); \
00935 YYPOPSTACK; \
00936 goto yybackup; \
00937 } \
00938 else \
00939 { \
00940 yyerror ("syntax error: cannot back up"); \
00941 YYERROR; \
00942 } \
00943 while (0)
00944
00945 #define YYTERROR 1
00946 #define YYERRCODE 256
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956 #ifndef YYLLOC_DEFAULT
00957 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00958 Current.last_line = Rhs[N].last_line; \
00959 Current.last_column = Rhs[N].last_column;
00960 #endif
00961
00962
00963
00964
00965 #if YYPURE
00966 # if YYLSP_NEEDED
00967 # ifdef YYLEX_PARAM
00968 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
00969 # else
00970 # define YYLEX yylex (&yylval, &yylloc)
00971 # endif
00972 # else
00973 # ifdef YYLEX_PARAM
00974 # define YYLEX yylex (&yylval, YYLEX_PARAM)
00975 # else
00976 # define YYLEX yylex (&yylval)
00977 # endif
00978 # endif
00979 #else
00980 # define YYLEX yylex ()
00981 #endif
00982
00983
00984
00985 #if YYDEBUG
00986
00987 # ifndef YYFPRINTF
00988 # include <stdio.h>
00989 # define YYFPRINTF fprintf
00990 # endif
00991
00992 # define YYDPRINTF(Args) \
00993 do { \
00994 if (yydebug) \
00995 YYFPRINTF Args; \
00996 } while (0)
00997
00998
00999 int yydebug;
01000 #else
01001 # define YYDPRINTF(Args)
01002 #endif
01003
01004
01005 #ifndef YYINITDEPTH
01006 # define YYINITDEPTH 200
01007 #endif
01008
01009
01010
01011
01012
01013
01014
01015
01016 #if YYMAXDEPTH == 0
01017 # undef YYMAXDEPTH
01018 #endif
01019
01020 #ifndef YYMAXDEPTH
01021 # define YYMAXDEPTH 10000
01022 #endif
01023
01024 #ifdef YYERROR_VERBOSE
01025
01026 # ifndef yystrlen
01027 # if defined (__GLIBC__) && defined (_STRING_H)
01028 # define yystrlen strlen
01029 # else
01030
01031 static YYSIZE_T
01032 # if defined (__STDC__) || defined (__cplusplus)
01033 yystrlen (const char *yystr)
01034 # else
01035 yystrlen (yystr)
01036 const char *yystr;
01037 # endif
01038 {
01039 register const char *yys = yystr;
01040
01041 while (*yys++ != '\0')
01042 continue;
01043
01044 return yys - yystr - 1;
01045 }
01046 # endif
01047 # endif
01048
01049 # ifndef yystpcpy
01050 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
01051 # define yystpcpy stpcpy
01052 # else
01053
01054
01055 static char *
01056 # if defined (__STDC__) || defined (__cplusplus)
01057 yystpcpy (char *yydest, const char *yysrc)
01058 # else
01059 yystpcpy (yydest, yysrc)
01060 char *yydest;
01061 const char *yysrc;
01062 # endif
01063 {
01064 register char *yyd = yydest;
01065 register const char *yys = yysrc;
01066
01067 while ((*yyd++ = *yys++) != '\0')
01068 continue;
01069
01070 return yyd - 1;
01071 }
01072 # endif
01073 # endif
01074 #endif
01075
01076 #line 315 "/usr/share/bison/bison.simple"
01077
01078
01079
01080
01081
01082
01083
01084
01085 #ifdef YYPARSE_PARAM
01086 # if defined (__STDC__) || defined (__cplusplus)
01087 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
01088 # define YYPARSE_PARAM_DECL
01089 # else
01090 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
01091 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
01092 # endif
01093 #else
01094 # define YYPARSE_PARAM_ARG
01095 # define YYPARSE_PARAM_DECL
01096 #endif
01097
01098
01099 #ifdef __GNUC__
01100 # ifdef YYPARSE_PARAM
01101 int yyparse (void *);
01102 # else
01103 int yyparse (void);
01104 # endif
01105 #endif
01106
01107
01108
01109
01110 #define YY_DECL_NON_LSP_VARIABLES \
01111 \
01112 int yychar; \
01113 \
01114 \
01115 YYSTYPE yylval; \
01116 \
01117 \
01118 int yynerrs;
01119
01120 #if YYLSP_NEEDED
01121 # define YY_DECL_VARIABLES \
01122 YY_DECL_NON_LSP_VARIABLES \
01123 \
01124 \
01125 YYLTYPE yylloc;
01126 #else
01127 # define YY_DECL_VARIABLES \
01128 YY_DECL_NON_LSP_VARIABLES
01129 #endif
01130
01131
01132
01133
01134 #if !YYPURE
01135 YY_DECL_VARIABLES
01136 #endif
01137
01138 int
01139 yyparse (YYPARSE_PARAM_ARG)
01140 YYPARSE_PARAM_DECL
01141 {
01142
01143 #if YYPURE
01144 YY_DECL_VARIABLES
01145 #endif
01146
01147 register int yystate;
01148 register int yyn;
01149 int yyresult;
01150
01151 int yyerrstatus;
01152
01153 int yychar1 = 0;
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164 short yyssa[YYINITDEPTH];
01165 short *yyss = yyssa;
01166 register short *yyssp;
01167
01168
01169 YYSTYPE yyvsa[YYINITDEPTH];
01170 YYSTYPE *yyvs = yyvsa;
01171 register YYSTYPE *yyvsp;
01172
01173 #if YYLSP_NEEDED
01174
01175 YYLTYPE yylsa[YYINITDEPTH];
01176 YYLTYPE *yyls = yylsa;
01177 YYLTYPE *yylsp;
01178 #endif
01179
01180 #if YYLSP_NEEDED
01181 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
01182 #else
01183 # define YYPOPSTACK (yyvsp--, yyssp--)
01184 #endif
01185
01186 YYSIZE_T yystacksize = YYINITDEPTH;
01187
01188
01189
01190
01191 YYSTYPE yyval;
01192 #if YYLSP_NEEDED
01193 YYLTYPE yyloc;
01194 #endif
01195
01196
01197
01198 int yylen;
01199
01200 YYDPRINTF ((stderr, "Starting parse\n"));
01201
01202 yystate = 0;
01203 yyerrstatus = 0;
01204 yynerrs = 0;
01205 yychar = YYEMPTY;
01206
01207
01208
01209
01210
01211
01212 yyssp = yyss;
01213 yyvsp = yyvs;
01214 #if YYLSP_NEEDED
01215 yylsp = yyls;
01216 #endif
01217 goto yysetstate;
01218
01219
01220
01221
01222 yynewstate:
01223
01224
01225
01226 yyssp++;
01227
01228 yysetstate:
01229 *yyssp = yystate;
01230
01231 if (yyssp >= yyss + yystacksize - 1)
01232 {
01233
01234 YYSIZE_T yysize = yyssp - yyss + 1;
01235
01236 #ifdef yyoverflow
01237 {
01238
01239
01240
01241 YYSTYPE *yyvs1 = yyvs;
01242 short *yyss1 = yyss;
01243
01244
01245
01246 # if YYLSP_NEEDED
01247 YYLTYPE *yyls1 = yyls;
01248
01249
01250 yyoverflow ("parser stack overflow",
01251 &yyss1, yysize * sizeof (*yyssp),
01252 &yyvs1, yysize * sizeof (*yyvsp),
01253 &yyls1, yysize * sizeof (*yylsp),
01254 &yystacksize);
01255 yyls = yyls1;
01256 # else
01257 yyoverflow ("parser stack overflow",
01258 &yyss1, yysize * sizeof (*yyssp),
01259 &yyvs1, yysize * sizeof (*yyvsp),
01260 &yystacksize);
01261 # endif
01262 yyss = yyss1;
01263 yyvs = yyvs1;
01264 }
01265 #else
01266 # ifndef YYSTACK_RELOCATE
01267 goto yyoverflowlab;
01268 # else
01269
01270 if (yystacksize >= YYMAXDEPTH)
01271 goto yyoverflowlab;
01272 yystacksize *= 2;
01273 if (yystacksize > YYMAXDEPTH)
01274 yystacksize = YYMAXDEPTH;
01275
01276 {
01277 short *yyss1 = yyss;
01278 union yyalloc *yyptr =
01279 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01280 if (! yyptr)
01281 goto yyoverflowlab;
01282 YYSTACK_RELOCATE (yyss);
01283 YYSTACK_RELOCATE (yyvs);
01284 # if YYLSP_NEEDED
01285 YYSTACK_RELOCATE (yyls);
01286 # endif
01287 # undef YYSTACK_RELOCATE
01288 if (yyss1 != yyssa)
01289 YYSTACK_FREE (yyss1);
01290 }
01291 # endif
01292 #endif
01293
01294 yyssp = yyss + yysize - 1;
01295 yyvsp = yyvs + yysize - 1;
01296 #if YYLSP_NEEDED
01297 yylsp = yyls + yysize - 1;
01298 #endif
01299
01300 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01301 (unsigned long int) yystacksize));
01302
01303 if (yyssp >= yyss + yystacksize - 1)
01304 YYABORT;
01305 }
01306
01307 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01308
01309 goto yybackup;
01310
01311
01312
01313
01314
01315 yybackup:
01316
01317
01318
01319
01320
01321
01322
01323 yyn = yypact[yystate];
01324 if (yyn == YYFLAG)
01325 goto yydefault;
01326
01327
01328
01329
01330
01331
01332 if (yychar == YYEMPTY)
01333 {
01334 YYDPRINTF ((stderr, "Reading a token: "));
01335 yychar = YYLEX;
01336 }
01337
01338
01339
01340 if (yychar <= 0)
01341 {
01342 yychar1 = 0;
01343 yychar = YYEOF;
01344
01345 YYDPRINTF ((stderr, "Now at end of input.\n"));
01346 }
01347 else
01348 {
01349 yychar1 = YYTRANSLATE (yychar);
01350
01351 #if YYDEBUG
01352
01353
01354 if (yydebug)
01355 {
01356 YYFPRINTF (stderr, "Next token is %d (%s",
01357 yychar, yytname[yychar1]);
01358
01359
01360 # ifdef YYPRINT
01361 YYPRINT (stderr, yychar, yylval);
01362 # endif
01363 YYFPRINTF (stderr, ")\n");
01364 }
01365 #endif
01366 }
01367
01368 yyn += yychar1;
01369 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
01370 goto yydefault;
01371
01372 yyn = yytable[yyn];
01373
01374
01375
01376
01377
01378
01379
01380
01381 if (yyn < 0)
01382 {
01383 if (yyn == YYFLAG)
01384 goto yyerrlab;
01385 yyn = -yyn;
01386 goto yyreduce;
01387 }
01388 else if (yyn == 0)
01389 goto yyerrlab;
01390
01391 if (yyn == YYFINAL)
01392 YYACCEPT;
01393
01394
01395 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
01396 yychar, yytname[yychar1]));
01397
01398
01399 if (yychar != YYEOF)
01400 yychar = YYEMPTY;
01401
01402 *++yyvsp = yylval;
01403 #if YYLSP_NEEDED
01404 *++yylsp = yylloc;
01405 #endif
01406
01407
01408
01409 if (yyerrstatus)
01410 yyerrstatus--;
01411
01412 yystate = yyn;
01413 goto yynewstate;
01414
01415
01416
01417
01418
01419 yydefault:
01420 yyn = yydefact[yystate];
01421 if (yyn == 0)
01422 goto yyerrlab;
01423 goto yyreduce;
01424
01425
01426
01427
01428
01429 yyreduce:
01430
01431 yylen = yyr2[yyn];
01432
01433
01434
01435
01436
01437
01438
01439
01440
01441 yyval = yyvsp[1-yylen];
01442
01443 #if YYLSP_NEEDED
01444
01445
01446 yyloc = yylsp[1-yylen];
01447 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01448 #endif
01449
01450 #if YYDEBUG
01451
01452
01453 if (yydebug)
01454 {
01455 int yyi;
01456
01457 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
01458 yyn, yyrline[yyn]);
01459
01460
01461 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
01462 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
01463 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
01464 }
01465 #endif
01466
01467 switch (yyn) {
01468
01469 case 4:
01470 #line 148 "ucparse.yy"
01471 {
01472 if (!Uc_function::add_global_function_symbol(yyvsp[0].funsym))
01473 delete yyvsp[0].funsym;
01474 }
01475 break;
01476 case 8:
01477 #line 159 "ucparse.yy"
01478 { function = new Uc_function(yyvsp[0].funsym); }
01479 break;
01480 case 9:
01481 #line 161 "ucparse.yy"
01482 {
01483 function->set_statement(yyvsp[0].stmt);
01484 functions.push_back(function);
01485 function = 0;
01486 }
01487 break;
01488 case 10:
01489 #line 171 "ucparse.yy"
01490 {
01491 yyval.funsym = new Uc_function_symbol(yyvsp[-4].strval, yyvsp[-3].intval, *yyvsp[-1].strvec);
01492 delete yyvsp[-1].strvec;
01493 }
01494 break;
01495 case 12:
01496 #line 180 "ucparse.yy"
01497 { yyval.intval = -1; }
01498 break;
01499 case 13:
01500 #line 185 "ucparse.yy"
01501 { function->push_scope(); }
01502 break;
01503 case 14:
01504 #line 187 "ucparse.yy"
01505 {
01506 yyval.stmt = yyvsp[-1].block;
01507 function->pop_scope();
01508 }
01509 break;
01510 case 15:
01511 #line 195 "ucparse.yy"
01512 {
01513 if (yyvsp[0].stmt)
01514 yyval.block->add(yyvsp[0].stmt);
01515 }
01516 break;
01517 case 16:
01518 #line 200 "ucparse.yy"
01519 { yyval.block = new Uc_block_statement(); }
01520 break;
01521 case 32:
01522 #line 220 "ucparse.yy"
01523 { yyval.stmt = new Uc_say_statement(yyvsp[-2].exprlist); }
01524 break;
01525 case 33:
01526 #line 222 "ucparse.yy"
01527 { yyval.stmt = new Uc_message_statement(yyvsp[-2].exprlist); }
01528 break;
01529 case 35:
01530 #line 225 "ucparse.yy"
01531 { yyval.stmt = 0; }
01532 break;
01533 case 36:
01534 #line 230 "ucparse.yy"
01535 { yyval.stmt = yyvsp[-1].stmt; }
01536 break;
01537 case 37:
01538 #line 232 "ucparse.yy"
01539 { yyval.stmt = 0; }
01540 break;
01541 case 38:
01542 #line 234 "ucparse.yy"
01543 { yyval.stmt = 0; }
01544 break;
01545 case 39:
01546 #line 236 "ucparse.yy"
01547 { yyval.stmt = 0; }
01548 break;
01549 case 40:
01550 #line 238 "ucparse.yy"
01551 {
01552 if (!function->add_function_symbol(yyvsp[0].funsym))
01553 delete yyvsp[0].funsym;
01554 yyval.stmt = 0;
01555 }
01556 break;
01557 case 41:
01558 #line 244 "ucparse.yy"
01559 { yyval.stmt = 0; }
01560 break;
01561 case 42:
01562 #line 249 "ucparse.yy"
01563 {
01564 if (!yyvsp[0].stmt)
01565 yyval.stmt = yyvsp[-2].stmt;
01566 else if (!yyvsp[-2].stmt)
01567 yyval.stmt = yyvsp[0].stmt;
01568 else
01569 {
01570 Uc_block_statement *b =
01571 dynamic_cast<Uc_block_statement *>(yyvsp[-2].stmt);
01572 if (!b)
01573 {
01574 b = new Uc_block_statement();
01575 b->add(yyvsp[-2].stmt);
01576 }
01577 b->add(yyvsp[0].stmt);
01578 yyval.stmt = b;
01579 }
01580 }
01581 break;
01582 case 43:
01583 #line 268 "ucparse.yy"
01584 { yyval.stmt = yyvsp[0].stmt; }
01585 break;
01586 case 44:
01587 #line 272 "ucparse.yy"
01588 { enum_val = -1; }
01589 break;
01590 case 49:
01591 #line 283 "ucparse.yy"
01592 {
01593 ++enum_val;
01594 if (function)
01595 function->add_int_const_symbol(yyvsp[0].strval, enum_val);
01596 else
01597 Uc_function::add_global_int_const_symbol(yyvsp[0].strval, enum_val);
01598 }
01599 break;
01600 case 53:
01601 #line 303 "ucparse.yy"
01602 {
01603 int val;
01604 if (yyvsp[0].expr->eval_const(val))
01605 {
01606 if (function)
01607 function->add_int_const_symbol(yyvsp[-2].strval, val);
01608 else
01609 Uc_function::add_global_int_const_symbol(
01610 yyvsp[-2].strval, val);
01611 enum_val = val;
01612 }
01613 }
01614 break;
01615 case 54:
01616 #line 319 "ucparse.yy"
01617 {
01618 function->add_symbol(yyvsp[0].strval);
01619 yyval.stmt = 0;
01620 }
01621 break;
01622 case 55:
01623 #line 324 "ucparse.yy"
01624 {
01625 Uc_var_symbol *var = function->add_symbol(yyvsp[-2].strval);
01626 yyval.stmt = new Uc_assignment_statement(
01627 new Uc_var_expression(var), yyvsp[0].expr);
01628 }
01629 break;
01630 case 59:
01631 #line 342 "ucparse.yy"
01632 {
01633 if (function)
01634 function->add_static(yyvsp[0].strval);
01635 else
01636 Uc_function::add_global_static(yyvsp[0].strval);
01637 }
01638 break;
01639 case 62:
01640 #line 357 "ucparse.yy"
01641 {
01642 function->add_string_symbol(yyvsp[-2].strval, yyvsp[0].strval);
01643 }
01644 break;
01645 case 63:
01646 #line 364 "ucparse.yy"
01647 { yyval.funsym = yyvsp[-1].funsym; }
01648 break;
01649 case 64:
01650 #line 369 "ucparse.yy"
01651 { yyval.stmt = new Uc_assignment_statement(yyvsp[-3].expr, yyvsp[-1].expr); }
01652 break;
01653 case 65:
01654 #line 374 "ucparse.yy"
01655 { yyval.stmt = new Uc_if_statement(yyvsp[-2].expr, yyvsp[0].stmt, 0); }
01656 break;
01657 case 66:
01658 #line 376 "ucparse.yy"
01659 { yyval.stmt = new Uc_if_statement(yyvsp[-4].expr, yyvsp[-2].stmt, yyvsp[0].stmt); }
01660 break;
01661 case 67:
01662 #line 381 "ucparse.yy"
01663 { yyval.stmt = new Uc_while_statement(yyvsp[-2].expr, yyvsp[0].stmt); }
01664 break;
01665 case 68:
01666 #line 386 "ucparse.yy"
01667 {
01668 yyvsp[-2].arrayloop->set_statement(yyvsp[0].stmt);
01669 yyvsp[-2].arrayloop->finish(function);
01670 function->pop_scope();
01671 }
01672 break;
01673 case 69:
01674 #line 392 "ucparse.yy"
01675 { yyvsp[-2].arrayloop->set_index(function->add_symbol(yyvsp[0].strval)); }
01676 break;
01677 case 70:
01678 #line 394 "ucparse.yy"
01679 {
01680 yyvsp[-5].arrayloop->set_statement(yyvsp[0].stmt);
01681 yyvsp[-5].arrayloop->finish(function);
01682 function->pop_scope();
01683 }
01684 break;
01685 case 71:
01686 #line 400 "ucparse.yy"
01687 { yyvsp[-2].arrayloop->set_index(function->add_symbol(yyvsp[0].strval)); }
01688 break;
01689 case 72:
01690 #line 402 "ucparse.yy"
01691 { yyvsp[-5].arrayloop->set_array_size(function->add_symbol(yyvsp[0].strval)); }
01692 break;
01693 case 73:
01694 #line 404 "ucparse.yy"
01695 {
01696 yyvsp[-8].arrayloop->set_statement(yyvsp[0].stmt);
01697 function->pop_scope();
01698 }
01699 break;
01700 case 74:
01701 #line 412 "ucparse.yy"
01702 {
01703 Uc_var_symbol *var = function->add_symbol(yyvsp[-2].strval);
01704 yyval.arrayloop = new Uc_arrayloop_statement(var, yyvsp[0].var);
01705 }
01706 break;
01707 case 75:
01708 #line 420 "ucparse.yy"
01709 { function->push_scope(); }
01710 break;
01711 case 76:
01712 #line 425 "ucparse.yy"
01713 { yyval.stmt = new Uc_call_statement(yyvsp[-1].funcall); }
01714 break;
01715 case 77:
01716 #line 431 "ucparse.yy"
01717 {
01718 Uc_block_statement *stmts = new Uc_block_statement();
01719
01720 stmts->add(new Uc_call_statement(
01721 new Uc_call_expression(Uc_function::get_show_face(),
01722 new Uc_array_expression(yyvsp[-6].expr, new Uc_int_expression(0)),
01723 function)));
01724 stmts->add(new Uc_say_statement(yyvsp[-2].exprlist));
01725 yyval.stmt = stmts;
01726 }
01727 break;
01728 case 78:
01729 #line 442 "ucparse.yy"
01730 {
01731 yyval.stmt = new Uc_call_statement(
01732 new Uc_call_expression(Uc_function::get_remove_face(),
01733 new Uc_array_expression(yyvsp[-5].expr), function));
01734 }
01735 break;
01736 case 79:
01737 #line 451 "ucparse.yy"
01738 { yyval.stmt = new Uc_return_statement(yyvsp[-1].expr); }
01739 break;
01740 case 80:
01741 #line 453 "ucparse.yy"
01742 { yyval.stmt = new Uc_return_statement(); }
01743 break;
01744 case 81:
01745 #line 458 "ucparse.yy"
01746 { yyval.stmt = new Uc_converse_statement(yyvsp[0].stmt); }
01747 break;
01748 case 82:
01749 #line 463 "ucparse.yy"
01750 { yyval.stmt = new Uc_converse2_statement(yyvsp[-4].expr, yyvsp[-1].block); }
01751 break;
01752 case 83:
01753 #line 468 "ucparse.yy"
01754 {
01755 if (yyvsp[0].stmt)
01756 yyval.block->add(yyvsp[0].stmt);
01757 }
01758 break;
01759 case 84:
01760 #line 473 "ucparse.yy"
01761 { yyval.block = new Uc_block_statement(); }
01762 break;
01763 case 85:
01764 #line 478 "ucparse.yy"
01765 {
01766 yyval.stmt = new Uc_converse_case_statement(function->add_string(yyvsp[-3].strval),
01767 (yyvsp[-2].intval ? true : false), yyvsp[0].block);
01768 }
01769 break;
01770 case 86:
01771 #line 486 "ucparse.yy"
01772 { yyval.intval = 1; }
01773 break;
01774 case 87:
01775 #line 488 "ucparse.yy"
01776 { yyval.intval = 0; }
01777 break;
01778 case 88:
01779 #line 493 "ucparse.yy"
01780 {
01781 Uc_array_expression *parms = new Uc_array_expression();
01782 parms->add(yyvsp[-2].expr);
01783 parms->add(yyvsp[0].expr);
01784 if (yyvsp[-1].expr)
01785 parms->add(yyvsp[-1].expr);
01786
01787 Uc_symbol *sym = Uc_function::get_intrinsic(yyvsp[-1].expr ? 2 : 1);
01788 Uc_call_expression *fcall =
01789 new Uc_call_expression(sym, parms, function);
01790 yyval.stmt = new Uc_call_statement(fcall);
01791 }
01792 break;
01793 case 90:
01794 #line 513 "ucparse.yy"
01795 { yyval.exprlist->concat(yyvsp[0].expr); }
01796 break;
01797 case 91:
01798 #line 515 "ucparse.yy"
01799 {
01800 yyval.exprlist = new Uc_array_expression();
01801 yyval.exprlist->concat(yyvsp[0].expr);
01802 }
01803 break;
01804 case 92:
01805 #line 523 "ucparse.yy"
01806 { yyval.expr = new Uc_int_expression(Ucscript::cont); }
01807 break;
01808 case 93:
01809 #line 525 "ucparse.yy"
01810 {
01811 Uc_array_expression *result = new Uc_array_expression();
01812 result->concat(yyvsp[-1].expr);
01813 int sz = result->get_exprs().size();
01814 result->add(new Uc_int_expression(Ucscript::repeat));
01815
01816 result->add(new Uc_int_expression(-sz));
01817 result->add(yyvsp[-2].expr);
01818 yyval.expr = result;
01819 }
01820 break;
01821 case 94:
01822 #line 537 "ucparse.yy"
01823 { yyval.expr = new Uc_int_expression(Ucscript::nop); }
01824 break;
01825 case 95:
01826 #line 539 "ucparse.yy"
01827 { yyval.expr = new Uc_int_expression(Ucscript::dont_halt); }
01828 break;
01829 case 96:
01830 #line 541 "ucparse.yy"
01831 { yyval.expr = Create_array(Ucscript::delay_ticks, yyvsp[-1].expr); }
01832 break;
01833 case 97:
01834 #line 543 "ucparse.yy"
01835 { yyval.expr = Create_array(Ucscript::delay_hours, yyvsp[-2].expr); }
01836 break;
01837 case 98:
01838 #line 545 "ucparse.yy"
01839 { yyval.expr = new Uc_int_expression(Ucscript::remove); }
01840 break;
01841 case 99:
01842 #line 547 "ucparse.yy"
01843 { yyval.expr = new Uc_int_expression(Ucscript::rise); }
01844 break;
01845 case 100:
01846 #line 549 "ucparse.yy"
01847 { yyval.expr = new Uc_int_expression(Ucscript::descend); }
01848 break;
01849 case 101:
01850 #line 551 "ucparse.yy"
01851 { yyval.expr = Create_array(Ucscript::frame, yyvsp[-1].expr); }
01852 break;
01853 case 102:
01854 #line 553 "ucparse.yy"
01855 { yyval.expr = new Uc_int_expression(0x61 + (yyvsp[-1].intval & 15)); }
01856 break;
01857 case 103:
01858 #line 555 "ucparse.yy"
01859 { yyval.expr = new Uc_int_expression(Ucscript::egg); }
01860 break;
01861 case 104:
01862 #line 557 "ucparse.yy"
01863 { yyval.expr = new Uc_int_expression(Ucscript::next_frame_max); }
01864 break;
01865 case 105:
01866 #line 559 "ucparse.yy"
01867 { yyval.expr = new Uc_int_expression(Ucscript::next_frame); }
01868 break;
01869 case 106:
01870 #line 561 "ucparse.yy"
01871 { yyval.expr = new Uc_int_expression(Ucscript::prev_frame_min); }
01872 break;
01873 case 107:
01874 #line 563 "ucparse.yy"
01875 { yyval.expr = new Uc_int_expression(Ucscript::prev_frame); }
01876 break;
01877 case 108:
01878 #line 565 "ucparse.yy"
01879 { yyval.expr = Create_array(Ucscript::say, yyvsp[-1].expr); }
01880 break;
01881 case 109:
01882 #line 567 "ucparse.yy"
01883 { yyval.expr = Create_array(Ucscript::step, yyvsp[-1].expr); }
01884 break;
01885 case 110:
01886 #line 569 "ucparse.yy"
01887 { yyval.expr = new Uc_int_expression(Ucscript::step_n + yyvsp[-1].intval); }
01888 break;
01889 case 111:
01890 #line 571 "ucparse.yy"
01891 { yyval.expr = Create_array(Ucscript::music, yyvsp[-1].expr); }
01892 break;
01893 case 112:
01894 #line 573 "ucparse.yy"
01895 { yyval.expr = Create_array(Ucscript::usecode, yyvsp[-1].expr); }
01896 break;
01897 case 113:
01898 #line 575 "ucparse.yy"
01899 { yyval.expr = Create_array(Ucscript::usecode2, yyvsp[-3].expr,
01900 new Uc_int_expression(yyvsp[-1].intval)); }
01901 break;
01902 case 114:
01903 #line 578 "ucparse.yy"
01904 { yyval.expr = Create_array(Ucscript::speech, yyvsp[-1].expr); }
01905 break;
01906 case 115:
01907 #line 580 "ucparse.yy"
01908 { yyval.expr = Create_array(Ucscript::sfx, yyvsp[-1].expr); }
01909 break;
01910 case 116:
01911 #line 582 "ucparse.yy"
01912 { yyval.expr = Create_array(Ucscript::face_dir, yyvsp[-1].expr); }
01913 break;
01914 case 117:
01915 #line 584 "ucparse.yy"
01916 { yyval.expr = Create_array(Ucscript::hit, yyvsp[-1].expr); }
01917 break;
01918 case 118:
01919 #line 586 "ucparse.yy"
01920 { yyval.expr = yyvsp[-1].exprlist; }
01921 break;
01922 case 119:
01923 #line 591 "ucparse.yy"
01924 { yyval.intval = 0; }
01925 break;
01926 case 120:
01927 #line 593 "ucparse.yy"
01928 { yyval.intval = 1; }
01929 break;
01930 case 121:
01931 #line 595 "ucparse.yy"
01932 { yyval.intval = 2; }
01933 break;
01934 case 122:
01935 #line 597 "ucparse.yy"
01936 { yyval.intval = 3; }
01937 break;
01938 case 123:
01939 #line 599 "ucparse.yy"
01940 { yyval.intval = 4; }
01941 break;
01942 case 124:
01943 #line 601 "ucparse.yy"
01944 { yyval.intval = 5; }
01945 break;
01946 case 125:
01947 #line 603 "ucparse.yy"
01948 { yyval.intval = 6; }
01949 break;
01950 case 126:
01951 #line 605 "ucparse.yy"
01952 { yyval.intval = 7; }
01953 break;
01954 case 128:
01955 #line 614 "ucparse.yy"
01956 { yyval.expr = yyvsp[-1].expr; }
01957 break;
01958 case 129:
01959 #line 616 "ucparse.yy"
01960 { yyval.expr = 0; }
01961 break;
01962 case 130:
01963 #line 621 "ucparse.yy"
01964 { yyval.stmt = new Uc_break_statement(); }
01965 break;
01966 case 131:
01967 #line 626 "ucparse.yy"
01968 {
01969 Uc_label *label = function->search_label(yyvsp[-1].strval);
01970 if (label) {
01971 char buf[150];
01972 sprintf(buf, "duplicate label: '%s'", yyvsp[-1].strval);
01973 yyerror(buf);
01974 yyval.stmt = 0;
01975 }
01976 else {
01977 label = new Uc_label(yyvsp[-1].strval);
01978 function->add_label(label);
01979 yyval.stmt = new Uc_label_statement(label);
01980 }
01981 }
01982 break;
01983 case 132:
01984 #line 644 "ucparse.yy"
01985 { yyval.stmt = new Uc_goto_statement(yyvsp[0].strval); }
01986 break;
01987 case 133:
01988 #line 649 "ucparse.yy"
01989 {
01990 yyval.stmt = new Uc_call_statement(
01991 new Uc_call_expression(Uc_function::get_add_answer(),
01992 yyvsp[-2].exprlist, function));
01993 }
01994 break;
01995 case 134:
01996 #line 655 "ucparse.yy"
01997 {
01998 yyval.stmt = new Uc_call_statement(new Uc_call_expression(
01999 Uc_function::get_remove_answer(),
02000 yyvsp[-2].exprlist, function));
02001 }
02002 break;
02003 case 135:
02004 #line 664 "ucparse.yy"
02005 { yyval.expr = yyvsp[0].expr; }
02006 break;
02007 case 136:
02008 #line 666 "ucparse.yy"
02009 { yyval.expr = new Uc_binary_expression(UC_ADD, yyvsp[-2].expr, yyvsp[0].expr); }
02010 break;
02011 case 137:
02012 #line 668 "ucparse.yy"
02013 { yyval.expr = new Uc_binary_expression(UC_SUB, yyvsp[-2].expr, yyvsp[0].expr); }
02014 break;
02015 case 138:
02016 #line 670 "ucparse.yy"
02017 { yyval.expr = new Uc_binary_expression(UC_MUL, yyvsp[-2].expr, yyvsp[0].expr); }
02018 break;
02019 case 139:
02020 #line 672 "ucparse.yy"
02021 { yyval.expr = new Uc_binary_expression(UC_DIV, yyvsp[-2].expr, yyvsp[0].expr); }
02022 break;
02023 case 140:
02024 #line 674 "ucparse.yy"
02025 { yyval.expr = new Uc_binary_expression(UC_MOD, yyvsp[-2].expr, yyvsp[0].expr); }
02026 break;
02027 case 141:
02028 #line 676 "ucparse.yy"
02029 { yyval.expr = new Uc_binary_expression(UC_CMPEQ, yyvsp[-2].expr, yyvsp[0].expr); }
02030 break;
02031 case 142:
02032 #line 678 "ucparse.yy"
02033 { yyval.expr = new Uc_response_expression(yyvsp[0].expr); }
02034 break;
02035 case 143:
02036 #line 680 "ucparse.yy"
02037 { yyval.expr = new Uc_binary_expression(UC_CMPNE, yyvsp[-2].expr, yyvsp[0].expr); }
02038 break;
02039 case 144:
02040 #line 682 "ucparse.yy"
02041 { yyval.expr = new Uc_binary_expression(UC_CMPL, yyvsp[-2].expr, yyvsp[0].expr); }
02042 break;
02043 case 145:
02044 #line 684 "ucparse.yy"
02045 { yyval.expr = new Uc_binary_expression(UC_CMPLE, yyvsp[-2].expr, yyvsp[0].expr); }
02046 break;
02047 case 146:
02048 #line 686 "ucparse.yy"
02049 { yyval.expr = new Uc_binary_expression(UC_CMPG, yyvsp[-2].expr, yyvsp[0].expr); }
02050 break;
02051 case 147:
02052 #line 688 "ucparse.yy"
02053 { yyval.expr = new Uc_binary_expression(UC_CMPGE, yyvsp[-2].expr, yyvsp[0].expr); }
02054 break;
02055 case 148:
02056 #line 690 "ucparse.yy"
02057 { yyval.expr = new Uc_binary_expression(UC_AND, yyvsp[-2].expr, yyvsp[0].expr); }
02058 break;
02059 case 149:
02060 #line 692 "ucparse.yy"
02061 { yyval.expr = new Uc_binary_expression(UC_OR, yyvsp[-2].expr, yyvsp[0].expr); }
02062 break;
02063 case 150:
02064 #line 694 "ucparse.yy"
02065 { yyval.expr = new Uc_binary_expression(UC_IN, yyvsp[-2].expr, yyvsp[0].expr); }
02066 break;
02067 case 151:
02068 #line 696 "ucparse.yy"
02069 { yyval.expr = new Uc_binary_expression(UC_ARRA, yyvsp[-2].expr, yyvsp[0].expr); }
02070 break;
02071 case 152:
02072 #line 698 "ucparse.yy"
02073 { yyval.expr = new Uc_binary_expression(UC_SUB,
02074 new Uc_int_expression(0), yyvsp[0].expr); }
02075 break;
02076 case 153:
02077 #line 701 "ucparse.yy"
02078 { yyval.expr = new Uc_unary_expression(UC_NOT, yyvsp[0].expr); }
02079 break;
02080 case 154:
02081 #line 703 "ucparse.yy"
02082 { yyval.expr = yyvsp[-1].exprlist; }
02083 break;
02084 case 155:
02085 #line 705 "ucparse.yy"
02086 { yyval.expr = new Uc_string_expression(function->add_string(yyvsp[0].strval)); }
02087 break;
02088 case 156:
02089 #line 707 "ucparse.yy"
02090 { yyval.expr = new Uc_string_prefix_expression(function, yyvsp[0].strval); }
02091 break;
02092 case 158:
02093 #line 713 "ucparse.yy"
02094 { yyval.exprlist = new Uc_array_expression(); }
02095 break;
02096 case 159:
02097 #line 718 "ucparse.yy"
02098 { yyval.exprlist->add(yyvsp[0].expr); }
02099 break;
02100 case 160:
02101 #line 720 "ucparse.yy"
02102 {
02103 yyval.exprlist = new Uc_array_expression();
02104 yyval.exprlist->add(yyvsp[0].expr);
02105 }
02106 break;
02107 case 161:
02108 #line 728 "ucparse.yy"
02109 { yyval.expr = new Uc_int_expression(yyvsp[0].intval); }
02110 break;
02111 case 162:
02112 #line 730 "ucparse.yy"
02113 { yyval.expr = yyvsp[0].expr; }
02114 break;
02115 case 163:
02116 #line 732 "ucparse.yy"
02117 { yyval.expr = new Uc_arrayelem_expression(yyvsp[-3].var, yyvsp[-1].expr); }
02118 break;
02119 case 164:
02120 #line 734 "ucparse.yy"
02121 { yyval.expr = new Uc_flag_expression(yyvsp[-1].intval); }
02122 break;
02123 case 165:
02124 #line 736 "ucparse.yy"
02125 { yyval.expr = yyvsp[0].funcall; }
02126 break;
02127 case 166:
02128 #line 738 "ucparse.yy"
02129 { yyval.expr = new Uc_bool_expression(true); }
02130 break;
02131 case 167:
02132 #line 740 "ucparse.yy"
02133 { yyval.expr = new Uc_bool_expression(false); }
02134 break;
02135 case 168:
02136 #line 742 "ucparse.yy"
02137 { yyval.expr = new Uc_event_expression(); }
02138 break;
02139 case 169:
02140 #line 744 "ucparse.yy"
02141 { yyval.expr = new Uc_item_expression(); }
02142 break;
02143 case 170:
02144 #line 746 "ucparse.yy"
02145 { yyval.expr = yyvsp[-1].expr; }
02146 break;
02147 case 173:
02148 #line 756 "ucparse.yy"
02149 {
02150 yyvsp[0].funcall->set_itemref(yyvsp[-2].expr);
02151 yyval.funcall = yyvsp[0].funcall;
02152 }
02153 break;
02154 case 176:
02155 #line 769 "ucparse.yy"
02156 {
02157 Uc_symbol *sym = function->search_up(yyvsp[-4].strval);
02158 if (!sym)
02159 {
02160 char buf[150];
02161 sprintf(buf, "'%s' not declared", yyvsp[-4].strval);
02162 yyerror(buf);
02163 yyval.funcall = 0;
02164 }
02165 else
02166 yyval.funcall = new Uc_call_expression(sym, yyvsp[-1].exprlist, function,
02167 yyvsp[-3].intval ? true : false);
02168 }
02169 break;
02170 case 177:
02171 #line 786 "ucparse.yy"
02172 { yyval.intval = 1; }
02173 break;
02174 case 178:
02175 #line 788 "ucparse.yy"
02176 { yyval.intval = 0; }
02177 break;
02178 case 180:
02179 #line 794 "ucparse.yy"
02180 { yyval.strvec = new std::vector<char *>; }
02181 break;
02182 case 181:
02183 #line 799 "ucparse.yy"
02184 { yyvsp[-3].strvec->push_back(yyvsp[0].strval); }
02185 break;
02186 case 182:
02187 #line 801 "ucparse.yy"
02188 {
02189 yyval.strvec = new std::vector<char *>;
02190 yyval.strvec->push_back(yyvsp[0].strval);
02191 }
02192 break;
02193 case 184:
02194 #line 810 "ucparse.yy"
02195 {
02196 Uc_const_int_symbol *sym =
02197 dynamic_cast<Uc_const_int_symbol *>(yyvsp[0].sym);
02198 if (!sym)
02199 {
02200 char buf[150];
02201 sprintf(buf, "'%s' is not a const int");
02202 yyerror(buf);
02203 yyval.intval = 0;
02204 }
02205 else
02206 yyval.intval = sym->get_value();
02207 }
02208 break;
02209 case 187:
02210 #line 832 "ucparse.yy"
02211 {
02212 yyval.expr = yyvsp[0].sym->create_expression();
02213 if (!yyval.expr)
02214 {
02215 char buf[150];
02216 sprintf(buf, "Can't use '%s' here", yyvsp[0].sym->get_name());
02217 yyerror(buf);
02218 yyval.expr = new Uc_int_expression(0);
02219 }
02220 }
02221 break;
02222 case 188:
02223 #line 846 "ucparse.yy"
02224 {
02225 Uc_var_symbol *var = dynamic_cast<Uc_var_symbol *>(yyvsp[0].sym);
02226 if (!var)
02227 {
02228 char buf[150];
02229 sprintf(buf, "'%s' not a 'var'", yyvsp[0].sym);
02230 yyerror(buf);
02231 sprintf(buf, "%s_needvar", yyvsp[0].sym->get_name());
02232 var = function->add_symbol(buf);
02233 }
02234 yyval.var = var;
02235 }
02236 break;
02237 case 189:
02238 #line 862 "ucparse.yy"
02239 {
02240 Uc_symbol *sym = function->search_up(yyvsp[0].strval);
02241 if (!sym)
02242 {
02243 char buf[150];
02244 sprintf(buf, "'%s' not declared", yyvsp[0].strval);
02245 yyerror(buf);
02246 sym = function->add_symbol(yyvsp[0].strval);
02247 }
02248 yyval.sym = sym;
02249 }
02250 break;
02251 }
02252
02253 #line 705 "/usr/share/bison/bison.simple"
02254
02255
02256 yyvsp -= yylen;
02257 yyssp -= yylen;
02258 #if YYLSP_NEEDED
02259 yylsp -= yylen;
02260 #endif
02261
02262 #if YYDEBUG
02263 if (yydebug)
02264 {
02265 short *yyssp1 = yyss - 1;
02266 YYFPRINTF (stderr, "state stack now");
02267 while (yyssp1 != yyssp)
02268 YYFPRINTF (stderr, " %d", *++yyssp1);
02269 YYFPRINTF (stderr, "\n");
02270 }
02271 #endif
02272
02273 *++yyvsp = yyval;
02274 #if YYLSP_NEEDED
02275 *++yylsp = yyloc;
02276 #endif
02277
02278
02279
02280
02281
02282 yyn = yyr1[yyn];
02283
02284 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
02285 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
02286 yystate = yytable[yystate];
02287 else
02288 yystate = yydefgoto[yyn - YYNTBASE];
02289
02290 goto yynewstate;
02291
02292
02293
02294
02295
02296 yyerrlab:
02297
02298 if (!yyerrstatus)
02299 {
02300 ++yynerrs;
02301
02302 #ifdef YYERROR_VERBOSE
02303 yyn = yypact[yystate];
02304
02305 if (yyn > YYFLAG && yyn < YYLAST)
02306 {
02307 YYSIZE_T yysize = 0;
02308 char *yymsg;
02309 int yyx, yycount;
02310
02311 yycount = 0;
02312
02313
02314 for (yyx = yyn < 0 ? -yyn : 0;
02315 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
02316 if (yycheck[yyx + yyn] == yyx)
02317 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
02318 yysize += yystrlen ("parse error, unexpected ") + 1;
02319 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
02320 yymsg = (char *) YYSTACK_ALLOC (yysize);
02321 if (yymsg != 0)
02322 {
02323 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
02324 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
02325
02326 if (yycount < 5)
02327 {
02328 yycount = 0;
02329 for (yyx = yyn < 0 ? -yyn : 0;
02330 yyx < (int) (sizeof (yytname) / sizeof (char *));
02331 yyx++)
02332 if (yycheck[yyx + yyn] == yyx)
02333 {
02334 const char *yyq = ! yycount ? ", expecting " : " or ";
02335 yyp = yystpcpy (yyp, yyq);
02336 yyp = yystpcpy (yyp, yytname[yyx]);
02337 yycount++;
02338 }
02339 }
02340 yyerror (yymsg);
02341 YYSTACK_FREE (yymsg);
02342 }
02343 else
02344 yyerror ("parse error; also virtual memory exhausted");
02345 }
02346 else
02347 #endif
02348 yyerror ("parse error");
02349 }
02350 goto yyerrlab1;
02351
02352
02353
02354
02355
02356 yyerrlab1:
02357 if (yyerrstatus == 3)
02358 {
02359
02360
02361
02362
02363 if (yychar == YYEOF)
02364 YYABORT;
02365 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
02366 yychar, yytname[yychar1]));
02367 yychar = YYEMPTY;
02368 }
02369
02370
02371
02372
02373 yyerrstatus = 3;
02374
02375 goto yyerrhandle;
02376
02377
02378
02379
02380
02381
02382 yyerrdefault:
02383 #if 0
02384
02385
02386
02387
02388 yyn = yydefact[yystate];
02389 if (yyn)
02390 goto yydefault;
02391 #endif
02392
02393
02394
02395
02396
02397
02398 yyerrpop:
02399 if (yyssp == yyss)
02400 YYABORT;
02401 yyvsp--;
02402 yystate = *--yyssp;
02403 #if YYLSP_NEEDED
02404 yylsp--;
02405 #endif
02406
02407 #if YYDEBUG
02408 if (yydebug)
02409 {
02410 short *yyssp1 = yyss - 1;
02411 YYFPRINTF (stderr, "Error: state stack now");
02412 while (yyssp1 != yyssp)
02413 YYFPRINTF (stderr, " %d", *++yyssp1);
02414 YYFPRINTF (stderr, "\n");
02415 }
02416 #endif
02417
02418
02419
02420
02421 yyerrhandle:
02422 yyn = yypact[yystate];
02423 if (yyn == YYFLAG)
02424 goto yyerrdefault;
02425
02426 yyn += YYTERROR;
02427 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
02428 goto yyerrdefault;
02429
02430 yyn = yytable[yyn];
02431 if (yyn < 0)
02432 {
02433 if (yyn == YYFLAG)
02434 goto yyerrpop;
02435 yyn = -yyn;
02436 goto yyreduce;
02437 }
02438 else if (yyn == 0)
02439 goto yyerrpop;
02440
02441 if (yyn == YYFINAL)
02442 YYACCEPT;
02443
02444 YYDPRINTF ((stderr, "Shifting error token, "));
02445
02446 *++yyvsp = yylval;
02447 #if YYLSP_NEEDED
02448 *++yylsp = yylloc;
02449 #endif
02450
02451 yystate = yyn;
02452 goto yynewstate;
02453
02454
02455
02456
02457
02458 yyacceptlab:
02459 yyresult = 0;
02460 goto yyreturn;
02461
02462
02463
02464
02465 yyabortlab:
02466 yyresult = 1;
02467 goto yyreturn;
02468
02469
02470
02471
02472 yyoverflowlab:
02473 yyerror ("parser stack overflow");
02474 yyresult = 2;
02475
02476
02477 yyreturn:
02478 #ifndef yyoverflow
02479 if (yyss != yyssa)
02480 YYSTACK_FREE (yyss);
02481 #endif
02482 return yyresult;
02483 }
02484 #line 875 "ucparse.yy"
02485
02486
02487
02488
02489
02490
02491 static Uc_array_expression *Create_array
02492 (
02493 int e1,
02494 Uc_expression *e2
02495 )
02496 {
02497 Uc_array_expression *arr = new Uc_array_expression();
02498 arr->add(new Uc_int_expression(e1));
02499 arr->add(e2);
02500 return arr;
02501 }
02502 static Uc_array_expression *Create_array
02503 (
02504 int e1,
02505 Uc_expression *e2,
02506 Uc_expression *e3
02507 )
02508 {
02509 Uc_array_expression *arr = new Uc_array_expression();
02510 arr->add(new Uc_int_expression(e1));
02511 arr->add(e2);
02512 arr->add(e3);
02513 return arr;
02514 }