From bb864e1a88e670c99d559c7dee4f74e9bf7d978b Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Sun, 15 Mar 2009 22:33:36 +0100 Subject: [PATCH] remove namespaces from tokens again when they go out of scope --- lib/as3/parser.tab.c | 1256 ++++++++++++++++++++++++------------------------ lib/as3/parser.tab.h | 3 +- lib/as3/parser.y | 47 +- lib/as3/pool.c | 2 +- lib/as3/pool.h | 1 + lib/as3/tokenizer.h | 7 + lib/as3/tokenizer.lex | 4 + lib/as3/tokenizer.yy.c | 249 +++++----- lib/q.c | 20 +- lib/q.h | 1 + 10 files changed, 841 insertions(+), 749 deletions(-) diff --git a/lib/as3/parser.tab.c b/lib/as3/parser.tab.c index 3fadb5c..2631457 100644 --- a/lib/as3/parser.tab.c +++ b/lib/as3/parser.tab.c @@ -265,6 +265,7 @@ tokenunion abc_exception_t *exception; regexp_t regexp; modifiers_t flags; + namespace_decl_t* namespace_decl; struct { abc_exception_list_t *l; code_t*finally; @@ -273,7 +274,7 @@ tokenunion /* Line 223 of skeleton.m4 */ -#line 277 "parser.tab.c" +#line 278 "parser.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -284,7 +285,7 @@ tokenunion /* Copy the second part of user declarations. */ /* Line 273 of skeleton.m4 */ -#line 263 "parser.y" +#line 265 "parser.y" static int a3_error(char*s) @@ -375,6 +376,7 @@ typedef struct _state { dict_t*import_toplevel_packages; dict_t*imports; namespace_list_t*active_namespaces; + namespace_decl_list_t*new_namespaces; char has_own_imports; char new_vars; // e.g. transition between two functions @@ -458,6 +460,7 @@ static void new_state() state = s; state->level++; state->has_own_imports = 0; + state->new_namespaces = 0; state->vars = dict_new(); state->old = oldstate; state->new_vars = 0; @@ -512,6 +515,12 @@ static void old_state() state_t*leaving = state; state = state->old; + + namespace_decl_list_t*nl=leaving->new_namespaces; + while(nl) { + tokenizer_unregister_namespace(nl->namespace_decl->name); + nl = nl->next; + } if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) { free(leaving->method); @@ -2012,7 +2021,7 @@ code_t* insert_finally(code_t*c, code_t*finally, int tempvar) /* Line 273 of skeleton.m4 */ -#line 2016 "parser.tab.c" +#line 2025 "parser.tab.c" #ifdef short # undef short @@ -2227,7 +2236,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 145 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3015 +#define YYLAST 2999 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 134 @@ -2322,7 +2331,7 @@ static const yytype_uint16 yyprhs[] = 767, 771, 774, 779, 783, 784, 786, 790, 796, 800, 804, 808, 812, 816, 820, 824, 828, 832, 836, 840, 844, 850, 853, 856, 859, 862, 866, 869, 874, 880, - 884, 890, 894, 896, 899, 902, 907, 912 + 884, 890, 894, 896, 899, 904, 909, 912 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -2417,45 +2426,45 @@ static const yytype_int16 yyrhs[] = 239, -1, 53, 127, 3, -1, 128, 3, -1, 239, 127, 128, 3, -1, 239, 127, 3, 89, 3, -1, 239, 92, 3, -1, 239, 127, 122, 239, 133, -1, - 239, 127, 3, -1, 3, -1, 18, 3, -1, 189, - 244, -1, 189, 244, 102, 3, -1, 189, 244, 102, - 5, -1, 23, 18, 223, -1 + 239, 127, 3, -1, 3, -1, 18, 3, -1, 18, + 3, 102, 3, -1, 18, 3, 102, 5, -1, 189, + 244, -1, 23, 18, 223, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 1993, 1993, 1995, 1995, 1996, 1997, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2008, 2008, 2009, 2010, 2012, - 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021, 2023, 2024, - 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, - 2037, 2038, 2039, 2040, 2043, 2044, 2045, 2046, 2047, 2048, - 2049, 2050, 2054, 2055, 2059, 2066, 2070, 2071, 2075, 2076, - 2078, 2079, 2081, 2142, 2143, 2146, 2146, 2165, 2166, 2167, - 2172, 2176, 2181, 2182, 2184, 2204, 2252, 2252, 2271, 2271, - 2286, 2289, 2292, 2295, 2299, 2300, 2301, 2302, 2303, 2304, - 2306, 2317, 2320, 2320, 2349, 2349, 2373, 2373, 2389, 2390, - 2391, 2392, 2400, 2409, 2409, 2454, 2458, 2469, 2478, 2479, - 2481, 2482, 2484, 2484, 2486, 2486, 2489, 2505, 2522, 2523, - 2524, 2525, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, - 2541, 2542, 2546, 2547, 2549, 2550, 2552, 2553, 2557, 2555, - 2563, 2561, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, - 2579, 2585, 2586, 2587, 2588, 2589, 2590, 2593, 2606, 2606, - 2608, 2608, 2610, 2611, 2613, 2688, 2689, 2691, 2692, 2693, - 2694, 2695, 2697, 2698, 2699, 2700, 2712, 2716, 2722, 2728, - 2736, 2741, 2747, 2755, 2763, 2764, 2765, 2768, 2767, 2784, - 2785, 2787, 2786, 2810, 2826, 2841, 2842, 2844, 2845, 2847, - 2848, 2849, 2858, 2859, 2863, 2864, 2866, 2867, 2868, 2870, - 2874, 2875, 2880, 2881, 2917, 2963, 2984, 3005, 3008, 3015, - 3016, 3017, 3023, 3029, 3031, 3033, 3035, 3037, 3039, 3041, - 3058, 3063, 3066, 3069, 3072, 3075, 3078, 3081, 3084, 3087, - 3091, 3094, 3097, 3100, 3103, 3106, 3109, 3112, 3116, 3127, - 3145, 3150, 3155, 3160, 3165, 3170, 3174, 3178, 3183, 3187, - 3191, 3200, 3209, 3219, 3224, 3236, 3242, 3247, 3253, 3259, - 3263, 3265, 3276, 3285, 3292, 3293, 3295, 3301, 3310, 3317, - 3329, 3335, 3341, 3347, 3353, 3359, 3365, 3371, 3384, 3395, - 3402, 3415, 3442, 3456, 3470, 3484, 3499, 3506, 3513, 3520, - 3527, 3538, 3588, 3693, 3699, 3702, 3705, 3708 + 0, 2003, 2003, 2005, 2005, 2006, 2007, 2009, 2010, 2011, + 2012, 2013, 2014, 2015, 2016, 2018, 2018, 2019, 2020, 2022, + 2023, 2024, 2025, 2026, 2027, 2028, 2030, 2031, 2033, 2034, + 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, + 2047, 2048, 2049, 2050, 2053, 2054, 2055, 2056, 2057, 2058, + 2059, 2060, 2064, 2065, 2069, 2076, 2080, 2081, 2085, 2086, + 2088, 2089, 2091, 2152, 2153, 2156, 2156, 2175, 2176, 2177, + 2182, 2186, 2191, 2192, 2194, 2214, 2262, 2262, 2281, 2281, + 2296, 2299, 2302, 2305, 2309, 2310, 2311, 2312, 2313, 2314, + 2316, 2327, 2330, 2330, 2359, 2359, 2383, 2383, 2399, 2400, + 2401, 2402, 2410, 2419, 2419, 2464, 2468, 2479, 2488, 2489, + 2491, 2492, 2494, 2494, 2496, 2496, 2499, 2515, 2532, 2533, + 2534, 2535, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, + 2551, 2552, 2556, 2557, 2559, 2560, 2562, 2563, 2567, 2565, + 2573, 2571, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, + 2589, 2595, 2596, 2597, 2598, 2599, 2600, 2603, 2616, 2616, + 2618, 2618, 2620, 2621, 2623, 2698, 2699, 2701, 2702, 2703, + 2704, 2705, 2707, 2708, 2709, 2710, 2722, 2726, 2732, 2738, + 2746, 2751, 2757, 2765, 2773, 2774, 2775, 2778, 2777, 2794, + 2795, 2797, 2796, 2820, 2836, 2851, 2852, 2854, 2855, 2857, + 2858, 2859, 2868, 2869, 2873, 2874, 2876, 2877, 2878, 2880, + 2884, 2885, 2890, 2891, 2927, 2973, 2994, 3015, 3018, 3025, + 3026, 3027, 3033, 3039, 3041, 3043, 3045, 3047, 3049, 3051, + 3068, 3073, 3076, 3079, 3082, 3085, 3088, 3091, 3094, 3097, + 3101, 3104, 3107, 3110, 3113, 3116, 3119, 3122, 3126, 3137, + 3155, 3160, 3165, 3170, 3175, 3180, 3184, 3188, 3193, 3197, + 3201, 3210, 3219, 3229, 3234, 3246, 3252, 3257, 3263, 3269, + 3273, 3275, 3286, 3295, 3302, 3303, 3305, 3311, 3320, 3327, + 3339, 3345, 3351, 3357, 3363, 3369, 3375, 3381, 3394, 3405, + 3412, 3425, 3452, 3466, 3480, 3494, 3509, 3516, 3523, 3530, + 3537, 3548, 3598, 3703, 3710, 3717, 3724, 3731 }; #endif @@ -2570,7 +2579,7 @@ static const yytype_uint8 yyr1[] = 239, 239, 239, 239, 241, 241, 242, 242, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 243, 244, 245, 245, 245, 246 + 239, 239, 243, 244, 244, 244, 245, 246 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -2606,7 +2615,7 @@ static const yytype_uint8 yyr2[] = 3, 2, 4, 3, 0, 1, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 2, 2, 2, 2, 3, 2, 4, 5, 3, - 5, 3, 1, 2, 2, 4, 4, 3 + 5, 3, 1, 2, 4, 4, 2, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -2630,7 +2639,7 @@ static const yytype_uint16 yydefact[] = 0, 80, 44, 43, 118, 45, 29, 0, 46, 47, 48, 50, 0, 49, 296, 1, 6, 118, 302, 0, 68, 0, 0, 69, 0, 186, 0, 159, 0, 158, - 160, 304, 121, 0, 0, 0, 0, 0, 0, 0, + 160, 306, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2639,20 +2648,20 @@ static const yytype_uint16 yydefact[] = 307, 204, 176, 0, 0, 0, 27, 0, 295, 0, 0, 278, 0, 270, 273, 210, 211, 83, 203, 59, 60, 105, 218, 58, 81, 42, 28, 118, 0, 203, - 0, 0, 303, 185, 184, 0, 132, 134, 0, 0, - 221, 265, 266, 263, 264, 244, 245, 247, 246, 242, - 243, 285, 284, 280, 279, 287, 288, 286, 282, 281, - 283, 248, 249, 299, 257, 256, 255, 289, 0, 254, - 253, 252, 240, 241, 261, 260, 258, 262, 259, 0, - 0, 301, 0, 0, 0, 52, 0, 0, 25, 0, - 118, 17, 23, 0, 20, 19, 22, 21, 118, 110, - 0, 206, 213, 165, 0, 0, 177, 181, 118, 194, - 117, 267, 0, 26, 215, 0, 276, 0, 0, 57, - 0, 118, 13, 57, 0, 0, 0, 0, 136, 0, - 0, 203, 161, 162, 305, 306, 0, 214, 272, 0, - 0, 297, 118, 0, 0, 115, 18, 118, 0, 0, - 0, 0, 183, 178, 203, 0, 107, 0, 118, 0, - 201, 200, 199, 202, 0, 62, 61, 51, 0, 118, + 0, 0, 303, 185, 184, 0, 132, 134, 0, 221, + 265, 266, 263, 264, 244, 245, 247, 246, 242, 243, + 285, 284, 280, 279, 287, 288, 286, 282, 281, 283, + 248, 249, 299, 257, 256, 255, 289, 0, 254, 253, + 252, 240, 241, 261, 260, 258, 262, 259, 0, 0, + 301, 0, 0, 0, 52, 0, 0, 25, 0, 118, + 17, 23, 0, 20, 19, 22, 21, 118, 110, 0, + 206, 213, 165, 0, 0, 177, 181, 118, 194, 117, + 267, 0, 26, 215, 0, 276, 0, 0, 57, 0, + 118, 13, 57, 0, 0, 0, 0, 0, 136, 0, + 0, 203, 161, 162, 0, 214, 272, 0, 0, 297, + 118, 0, 0, 115, 18, 118, 0, 0, 0, 0, + 183, 178, 203, 0, 107, 0, 118, 0, 201, 200, + 199, 202, 0, 62, 61, 51, 0, 118, 304, 305, 176, 133, 0, 0, 197, 135, 140, 57, 0, 290, 298, 300, 77, 0, 84, 0, 113, 205, 175, 171, 168, 169, 167, 170, 174, 173, 172, 166, 165, 0, @@ -2671,94 +2680,94 @@ static const yytype_uint16 yydefact[] = /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 50, 51, 52, 53, 309, 310, 311, 332, 333, - 135, 136, 211, 312, 137, 385, 138, 243, 240, 456, + -1, 50, 51, 52, 53, 308, 309, 310, 331, 332, + 135, 136, 211, 311, 137, 383, 138, 243, 240, 456, 57, 229, 151, 152, 58, 59, 60, 61, 209, 62, 90, 139, 140, 443, 444, 445, 446, 63, 212, 424, 508, 425, 473, 426, 427, 64, 226, 141, 65, 95, - 217, 66, 318, 213, 67, 142, 69, 70, 348, 350, - 393, 314, 459, 315, 437, 482, 483, 484, 464, 465, - 466, 160, 316, 258, 352, 353, 372, 417, 325, 326, - 327, 255, 317, 505, 101, 75, 472, 218, 219, 382, - 395, 383, 339, 322, 122, 123, 124, 221, 76, 77, + 217, 66, 317, 213, 67, 142, 69, 70, 348, 350, + 393, 313, 459, 314, 437, 482, 483, 484, 464, 465, + 466, 160, 315, 258, 352, 353, 370, 417, 324, 325, + 326, 255, 316, 505, 101, 75, 472, 218, 219, 380, + 395, 381, 338, 321, 122, 123, 124, 221, 76, 77, 78, 143, 125, 79, 80, 81, 82, 114, 115, 83, 161, 84, 85 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -426 +#define YYPACT_NINF -386 static const yytype_int16 yypact[] = { - 1672, 12, -426, -426, -426, -426, -426, -426, -426, -426, - -16, -19, -426, -18, 11, -426, -426, -426, 107, -426, - 2092, -426, 132, -426, 350, -426, 58, 25, 79, -426, - -426, -426, -426, 84, -20, -426, -426, 2092, 83, 2092, - 2092, 2092, -426, 2092, 2092, 2092, 2092, 2092, 632, 209, - 216, -426, 502, -426, -426, -426, 93, -426, 2022, -426, - -426, -426, -426, -426, -426, -426, -426, -426, 356, 248, - -426, -426, -426, -426, -426, -426, -426, -426, -426, 118, - -426, 2522, -426, -426, -426, -426, 218, 105, -426, -426, - 1924, -426, -426, -426, -426, -426, -106, 86, -426, -46, - -426, 106, 139, 2092, 108, -426, 2092, -426, 2092, 229, - 139, -426, 129, 2522, 104, 138, 139, 139, 294, 139, - 139, -75, 115, 141, 2092, -426, 239, 243, 2092, 2092, - 243, 244, -426, -426, 762, -426, -426, 123, -426, -426, - -426, -426, 232, -426, -426, -426, -426, 1022, 183, 255, - -426, 165, 197, -426, 264, 92, 270, -426, 273, -426, - -426, 176, -426, 2092, 2092, 2092, 2092, 2092, 2092, 2092, + 1672, -68, -386, -386, -386, -386, -386, -386, -386, -386, + -31, -80, -386, -72, 15, -386, -386, -386, 59, -386, + 2092, -386, 86, -386, 2162, -386, 6, 45, 11, -386, + -386, -386, -386, -12, -43, -386, -386, 2092, 13, 2092, + 2092, 2092, -386, 2092, 2092, 2092, 2092, 2092, 632, 136, + 143, -386, 502, -386, -386, -386, 26, -386, 2022, -386, + -386, -386, -386, -386, -386, -386, -386, -386, 312, 405, + -386, -386, -386, -386, -386, -386, -386, -386, -386, 80, + -386, 2567, -386, -386, -386, -386, 198, 84, -386, -386, + 1924, -386, -386, -386, -386, -386, -2, 83, -386, -62, + -386, 95, -46, 2092, 89, -386, 2092, -386, 2092, 216, + -46, -386, 115, 2567, 101, 130, -46, -46, 237, -46, + -46, -74, 106, 138, 2092, -386, 233, 234, 2092, 2092, + 234, 236, -386, -386, 762, -386, -386, 117, -386, -386, + -386, -386, 223, -386, -386, -386, -386, 1022, 178, 245, + -386, 155, 188, -386, 254, 94, 260, -386, 262, -386, + -386, -386, -386, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, - 2092, 2092, 2092, 2092, 2092, 2092, -426, -426, 280, 2092, + 2092, 2092, 2092, 2092, 2092, 2092, -386, -386, 263, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, - 2092, 2092, 2092, 2092, 2092, 2092, 14, -426, -426, 2092, - 185, 271, 2092, 1152, -426, 25, 160, 161, -426, -426, - -426, 167, 20, -12, 19, 2150, 1798, 157, -426, 2092, - 2092, -426, 2092, -426, -426, -426, -426, -426, 186, 192, - -426, 118, 118, 192, -426, -426, -426, 1924, 166, 186, - 2092, 2092, -426, -426, -426, 296, 246, 252, 304, 149, - 2522, 1014, 494, 494, 494, 2888, 2888, 2888, 2888, 1014, - 1014, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, 2522, - 2522, 2583, 2644, -426, 211, 211, 211, 2522, 2339, 2705, - 2766, 2827, 1014, 1014, 294, 294, 139, 139, 139, 175, - 2400, 220, 2092, 311, -9, -426, 194, 2213, -426, 189, - 1282, -426, -426, 191, -426, -426, -426, -426, 1152, -426, - 125, 2092, -426, 97, 312, 195, 222, -426, 1924, 160, - -426, -426, 198, 1798, -426, -1, -426, 224, 38, 235, - 243, 892, -426, -26, -35, 8, 212, 86, 314, 86, - 213, 186, 240, -426, -426, -426, 2092, -426, -426, 338, - 2276, -426, 1924, 2092, 217, -426, -426, 1152, 210, 221, - 74, 38, -426, -426, 186, 24, -426, 98, 1924, 2092, - -426, -426, -426, -426, 2092, -426, -426, -426, 2092, 1924, - 20, -426, 86, 219, -426, 250, -426, 235, 304, 2522, - -426, -426, -426, 45, 56, 214, -426, -426, -426, -426, - -426, -426, -426, -426, -426, -426, -426, -426, 242, 225, - 312, -426, 237, 251, -426, -426, 98, -426, 299, -426, - -426, 245, -426, 247, 250, -426, 86, 47, -426, -426, - -426, 2092, 261, 249, 56, -426, -426, -426, -426, -426, - -426, -426, 379, -426, -426, 1924, -426, 1924, 186, 1412, - -426, 386, -426, 363, 259, 233, -426, 2461, 1798, -426, - -426, -426, 1798, 1798, 186, -426, -426, 266, -426, -426, - 267, 193, 262, 1542, -426, -426, -426, -426, 92, -426, - -426, 1798, -426, 265, 269, 263, -426, 1412, -426, -426, - 395, -426, -426, -426, -426, 1798, 272, 277, 281, 279, - -426, 20, 1798, -426, 282, 285, 186, -426, -426 + 2092, 2092, 2092, 2092, 2092, 2092, 8, -386, -386, 2092, + 168, 255, 2092, 1152, -386, 45, 141, 144, -386, -386, + -386, 148, 22, -28, 19, 2187, 1798, 139, -386, 2092, + 2092, -386, 2092, -386, -386, -386, -386, -386, 169, 173, + -386, 80, 80, 173, -386, -386, -386, 1924, 145, 169, + 2092, 2092, 179, -386, -386, 283, 240, 241, 284, 2567, + 1014, 494, 494, 494, 2872, 2872, 2872, 2872, 1014, 1014, + 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, + 308, 2628, -386, 137, 137, 137, 2567, 2384, 2689, 2750, + 2811, 1014, 1014, 237, 237, -46, -46, -46, 164, 2445, + 209, 2092, 296, 7, -386, 186, 2258, -386, 181, 1282, + -386, -386, 174, -386, -386, -386, -386, 1152, -386, 134, + 2092, -386, -1, 298, 182, 214, -386, 1924, 141, -386, + -386, 184, 1798, -386, 21, -386, 215, 63, 219, 234, + 892, -386, -45, 111, 99, 38, 200, 83, 306, 83, + 205, 169, 224, -386, 2092, -386, -386, 323, 2321, -386, + 1924, 2092, 206, -386, -386, 1152, 201, 204, 280, 63, + -386, -386, 169, 25, -386, 98, 1924, 2092, -386, -386, + -386, -386, 2092, -386, -386, -386, 2092, 1924, -386, -386, + 22, -386, 83, 212, -386, 242, -386, 219, 284, 2567, + -386, -386, -386, 102, 46, 208, -386, -386, -386, -386, + -386, -386, -386, -386, -386, -386, -386, -386, 239, 228, + 298, -386, 247, 227, -386, -386, 98, -386, 295, -386, + -386, 229, -386, 230, 242, -386, 83, 47, -386, -386, + -386, 2092, 266, 246, 46, -386, -386, -386, -386, -386, + -386, -386, 365, -386, -386, 1924, -386, 1924, 169, 1412, + -386, 382, -386, 359, 256, 258, -386, 2506, 1798, -386, + -386, -386, 1798, 1798, 169, -386, -386, 261, -386, -386, + 265, 194, 257, 1542, -386, -386, -386, -386, 94, -386, + -386, 1798, -386, 269, 273, 259, -386, 1412, -386, -386, + 390, -386, -386, -386, -386, 1798, 274, 272, 271, 275, + -386, 22, 1798, -386, 277, 276, 169, -386, -386 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -426, -426, 275, -426, 360, -292, -426, 103, -425, -39, - 1, -85, -317, 59, 2, 17, 361, 297, 85, -426, - -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, - -426, -426, -426, -426, -426, -21, -17, -426, -426, 5, - -426, 6, -426, -426, -426, -426, -426, -426, -426, -200, - 36, -426, -426, -426, -426, 0, -426, 357, -426, -426, - -426, 60, -426, 62, -426, -69, -426, -54, -426, -426, - -31, -426, 3, -426, -426, 32, 18, -426, -372, -426, - -305, -53, 4, -426, -426, -426, -426, -426, 411, -87, - 50, 68, -241, -426, -95, -426, -426, -426, -426, -426, - -426, -426, -32, -6, -52, -8, -426, -426, -426, -426, - -426, -426, -426 + -386, -386, 248, -386, 360, -290, -386, 104, -385, -38, + 1, -85, -313, 58, 2, 14, 361, 301, 97, -386, + -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, + -386, -386, -386, -386, -386, -10, -5, -386, -386, 12, + -386, 16, -386, -386, -386, -386, -386, -386, -386, -200, + 76, -386, -386, -386, -386, 0, -386, 371, -386, -386, + -386, 60, -386, 61, -386, -56, -386, -39, -386, -386, + -20, -386, 3, -386, -386, 48, 29, -386, -373, -386, + -303, -40, 4, -386, -386, -386, -386, -386, 422, -89, + 64, 81, -240, -386, -95, -386, -386, -386, -386, -386, + -386, -386, -32, -6, -52, -8, -386, -386, -386, -386, + -386, -386, -386 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -2768,54 +2777,54 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -153 static const yytype_int16 yytable[] = { - 68, 54, 56, 73, 74, 210, 153, 112, 343, 134, - 220, 376, 99, 227, 92, 319, 102, 301, 433, 373, - 214, 215, 329, 323, 319, 163, 368, 323, 92, 110, - 93, 113, 116, 117, 87, 118, 119, 120, 93, 113, - 121, 216, -70, 492, 93, 402, 188, 493, 494, 246, - 96, 2, 68, 54, 56, 73, 74, 93, 233, 55, - 71, 428, 72, 104, 388, 163, 501, 15, 16, 17, - 421, 19, 432, 21, 380, 405, 384, 408, 205, 409, - 509, 206, 410, 411, 412, 25, 413, 515, 163, 216, - 441, 163, 236, 461, 30, 31, 32, 223, 225, 163, - 113, 86, 108, 89, 91, 93, 88, 109, 163, 299, - 397, 55, 71, 324, 72, 450, 113, 420, 442, 414, - 319, 328, 241, 242, 362, 97, 422, 253, 329, 415, - 416, 423, 378, 419, 330, 100, 302, 94, 475, 514, - 476, 389, 303, 254, 93, 163, 462, 68, 54, 56, - 73, 74, 354, 381, 355, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 440, -151, - 103, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 113, 300, 336, 370, - 337, 106, 371, 304, 307, 111, 55, 71, 341, 72, - 107, 154, 144, 68, 54, 313, 145, 477, 163, 147, - 155, 207, 113, 335, 113, 157, 369, 208, 222, 186, - 187, 188, 228, 495, 230, 224, 231, 2, 232, 159, - 234, 235, 237, 210, 344, 345, 238, 244, 246, 247, - 154, -71, 2, 15, 16, 17, 246, 19, 249, 21, - 391, 204, 394, 205, 250, 251, 206, 252, 15, 16, - 17, 25, 19, 256, 21, 518, 257, 210, 259, 461, - 30, 31, 32, 283, 305, 306, 25, -108, 320, 321, - 334, 338, 340, 210, 360, 30, 31, 32, 342, 346, - 347, 186, 187, 188, 210, 394, 349, 351, 357, 359, - 68, 54, 313, 113, 361, 323, 363, 367, 68, 54, - 313, 365, 375, 199, 200, 201, 202, 203, 374, 379, - 377, 392, 462, 204, 390, 205, 431, 384, 206, 396, - 398, 400, 406, 404, 370, 435, 447, 429, 399, 460, - 436, 449, 430, 98, 407, 3, 4, 403, 5, 6, - 7, 8, 9, 451, 455, -152, 468, 68, 54, 313, - 210, 113, 210, 452, 154, 20, 113, 22, 457, 23, - 458, 469, 474, 155, 186, 187, 188, 156, 157, 487, - 488, 489, 496, 497, 498, 29, 504, 502, 507, 511, - 158, 503, 159, 34, 510, 35, 36, 512, 201, 202, - 203, 513, 146, 366, 438, 516, 204, 517, 205, 150, - 39, 206, 248, 470, 239, 386, 162, 471, 506, 499, - 439, 453, 454, 467, 490, 500, 448, 463, 105, 418, - 40, 41, 434, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, + 68, 54, 56, 73, 74, 210, 153, 112, 220, 342, + 134, 300, 99, 227, 374, 318, 102, 433, 92, 87, + 371, 86, 328, -70, 318, 322, 163, 366, 322, 110, + 188, 113, 116, 117, 93, 118, 119, 120, 93, 113, + 121, 388, 89, 389, 186, 187, 188, 402, 92, 246, + 91, 2, 68, 54, 56, 73, 74, 382, 55, 233, + 71, 72, 205, 428, 93, 206, 216, 15, 16, 17, + 421, 19, 163, 21, 432, 405, 204, 97, 205, 108, + 441, 206, 93, 492, 109, 25, 216, 493, 494, 100, + 96, 88, 236, 461, 30, 31, 32, 223, 225, 378, + 113, 368, 93, 104, 369, 327, 501, 163, 442, 298, + 55, 397, 71, 72, 107, 323, 113, 450, 420, 318, + 509, 163, 241, 242, 214, 215, 422, 515, 103, 253, + 301, 423, 419, 106, 329, 111, 302, 328, 514, 144, + 360, 94, 475, 145, 476, 254, 462, 68, 54, 56, + 73, 74, 147, 93, 376, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 379, -151, + 163, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 113, 299, 335, 163, + 336, 207, 163, 303, 306, 55, 208, 71, 72, 340, + 386, 163, 154, 68, 54, 312, 224, 222, 477, 228, + 230, 155, 113, 334, 113, 367, 157, 186, 187, 188, + 232, 234, 387, 231, 495, 440, 237, 238, 235, 244, + 159, 154, 210, 247, 343, 344, -71, 246, 249, 199, + 200, 201, 202, 203, 250, 246, 251, 252, 391, 204, + 394, 205, 2, 256, 206, 257, 282, 304, -108, 305, + 320, 319, 333, 339, 337, 210, 518, 341, 15, 16, + 17, 345, 19, 408, 21, 409, 346, 351, 410, 411, + 412, 210, 413, 358, 347, 349, 25, 355, 357, 359, + 365, 322, 210, 394, 461, 30, 31, 32, 361, 68, + 54, 312, 113, 363, 373, 372, 375, 68, 54, 312, + 377, 382, 390, 392, 398, 414, 400, 186, 187, 188, + 154, 396, 404, 406, 431, 415, 416, 407, 435, 155, + 447, 368, 436, 156, 157, 429, 399, 460, 164, 452, + 430, 201, 202, 203, 449, 403, 158, 462, 159, 204, + 455, 205, 457, 458, 206, 68, 54, 312, 474, 113, + 210, 468, 210, 451, 113, 165, 166, 167, 469, 168, + 169, 170, 171, 172, 173, 487, 488, 496, 489, 498, + -152, 497, 504, 507, 511, 248, 185, 512, 186, 187, + 188, 502, 189, 190, 191, 503, 510, 513, 517, 2, + 516, 438, 146, 364, 194, 195, 196, 197, 198, 150, + 199, 200, 201, 202, 203, 15, 16, 17, 239, 19, + 204, 21, 205, 467, 470, 206, 384, 463, 453, 471, + 162, 506, 454, 25, 499, 490, 439, 448, 500, 105, + 418, 0, 30, 31, 32, 0, 434, 0, 0, 481, 479, 480, 485, 486, 0, 463, 0, 0, 0, 0, - 0, 0, 46, 0, 47, 0, 0, 0, 49, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, 479, 480, 485, 486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, 479, 480, 485, 486, -4, 0, 0, 1, 2, 3, 4, 0, @@ -2870,7 +2879,7 @@ static const yytype_int16 yytable[] = 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 44, 45, 0, 0, 0, 46, 0, 47, 0, 48, 0, - 49, 0, 0, 0, 387, 1, 2, 3, 4, 0, + 49, 0, 0, 0, 385, 1, 2, 3, 4, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 0, 0, 23, 0, 0, -153, 0, 0, 0, 24, 0, @@ -2893,7 +2902,7 @@ static const yytype_int16 yytable[] = 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 41, 0, 0, 0, 0, 0, 0, - 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 44, 45, 0, 0, 0, 46, 0, 47, 0, 48, 0, 49, 0, 0, 0, -15, 1, 2, 3, 4, 0, @@ -2906,7 +2915,7 @@ static const yytype_int16 yytable[] = 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 41, 0, 0, 0, 0, 0, 0, - 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 44, 45, 0, 0, 0, 46, 0, 47, 0, 48, 0, 49, 0, 0, 0, -16, 1, 2, 3, 4, 0, @@ -2984,144 +2993,142 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 43, 28, 0, 29, 0, 44, 45, 0, 0, 0, 46, 34, 47, 35, 36, 0, 49, 0, 0, 0, 0, 37, 0, 0, 0, 0, + 0, 0, 39, 0, 0, 98, 0, 3, 4, 0, + 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, + 0, 0, 40, 41, 0, 0, 0, 20, 0, 22, + 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 43, 0, 0, 29, 0, 44, + 45, 0, 0, 0, 46, 34, 47, 35, 36, 0, + 49, 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 40, 41, 0, 0, 0, 0, 0, 0, - 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 43, 0, 0, 0, 0, 44, - 45, 0, 0, 0, 46, 0, 47, 165, 166, 167, - 49, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 0, - 186, 187, 188, 0, 189, 190, 191, 0, 0, 0, - 0, 0, 192, 164, 193, 0, 194, 195, 196, 197, - 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, - 0, 0, 204, 0, 205, 0, 0, 206, 0, 0, - 165, 166, 167, 331, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 0, 186, 187, 188, 0, 189, 190, 191, - 0, 0, 0, 0, 0, 192, 164, 193, 0, 194, - 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, - 0, 0, 0, 0, 0, 204, 0, 205, 0, 0, - 206, 0, 0, 165, 166, 167, 364, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 0, 186, 187, 188, 0, - 189, 190, 191, 0, 0, 0, 0, 0, 192, 164, - 193, 0, 194, 195, 196, 197, 198, 0, 199, 200, - 201, 202, 203, 0, 0, 0, 0, 0, 204, 0, - 205, 0, 0, 206, 0, 0, 165, 166, 167, 401, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 0, 186, - 187, 188, 0, 189, 190, 191, 0, 0, 0, 0, - 164, 192, 0, 193, 356, 194, 195, 196, 197, 198, - 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, - 0, 204, 0, 205, 0, 0, 206, 165, 166, 167, - 0, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 0, - 186, 187, 188, 0, 189, 190, 191, 0, 0, 0, - 0, 164, 192, 0, 193, 0, 194, 195, 196, 197, - 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, - 0, 0, 204, 0, 205, 358, 0, 206, 165, 166, - 167, 0, 168, 169, 170, 171, 172, 173, 174, 175, + 0, 0, 40, 41, 165, 166, 167, 0, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 0, 186, 187, 188, + 0, 189, 190, 191, 46, 0, 47, 0, 0, 192, + 49, 193, 0, 194, 195, 196, 197, 198, 164, 199, + 200, 201, 202, 203, 0, 0, 0, 0, 0, 204, + 0, 205, 0, 0, 206, 0, 0, 0, 0, 0, + 330, 0, 0, 0, 0, 165, 166, 167, 0, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 0, 186, 187, + 188, 0, 189, 190, 191, 0, 0, 0, 0, 0, + 192, 164, 193, 0, 194, 195, 196, 197, 198, 0, + 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, + 204, 0, 205, 0, 0, 206, 0, 0, 165, 166, + 167, 362, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 0, 186, 187, 188, 0, 189, 190, 191, 0, 0, - 0, 0, 164, 192, 0, 193, 491, 194, 195, 196, + 0, 0, 0, 192, 164, 193, 0, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, - 0, 0, 0, 204, 0, 205, 0, 0, 206, 165, - 166, 167, 0, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 0, 186, 187, 188, 0, 189, 190, 191, 0, - 0, 0, 0, 164, 192, 0, 193, 0, 194, 195, - 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, - 0, 0, 0, 0, 204, 0, 205, 0, 0, 206, - 165, 166, 167, 0, 168, 169, 170, 171, 172, 173, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 185, 0, 186, 187, 188, 0, 189, 190, 191, - 0, 0, 0, 0, 164, 0, 0, 0, 0, 194, - 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, - 0, 0, 0, 0, 0, 204, 0, 205, 0, 0, - 206, 165, 166, 167, 0, 168, 169, 170, 171, 172, - 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 186, 187, 188, 0, 189, 190, - 191, 0, 0, 0, 0, 164, 0, 0, 0, 0, + 0, 0, 0, 204, 0, 205, 0, 0, 206, 0, + 0, 165, 166, 167, 401, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 0, 186, 187, 188, 0, 189, 190, + 191, 0, 0, 0, 0, 164, 192, 0, 193, 354, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, 204, 0, 205, 0, 0, 206, 165, 166, 167, 0, 168, 169, 170, 171, - 172, 173, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 186, 187, 188, 0, 189, - 190, 191, 0, 0, 0, 0, 164, 0, 0, 0, - 0, 0, 195, 196, 197, 198, 0, 199, 200, 201, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 0, 186, 187, 188, 0, 189, + 190, 191, 0, 0, 0, 0, 164, 192, 0, 193, + 0, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, 204, 0, 205, - 0, 0, 206, 165, 166, 167, 0, 168, 169, 170, - 171, 172, 173, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 186, 187, 188, 0, - 189, 190, 191, 0, 0, 0, 0, 164, 0, 0, - 0, 0, 0, 0, 196, 197, 198, 0, 199, 200, + 356, 0, 206, 165, 166, 167, 0, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 0, 186, 187, 188, 0, + 189, 190, 191, 0, 0, 0, 0, 164, 192, 0, + 193, 491, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, 204, 0, 205, 0, 0, 206, 165, 166, 167, 0, 168, 169, - 170, 171, 172, 173, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 186, 187, 188, - 0, 189, 190, 191, 0, 0, 0, 0, 164, 0, - 0, 0, 0, 0, 0, -153, 197, 198, 0, 199, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 0, 186, 187, 188, + 0, 189, 190, 191, 0, 0, 0, 0, 164, 192, + 0, 193, 0, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, 204, - 0, 205, 0, 0, 206, 165, 166, 167, 0, -153, - -153, -153, -153, 172, 173, 0, 0, 0, 0, 0, + 0, 205, 0, 0, 206, 165, 166, 167, 0, 168, + 169, 170, 171, 172, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, - 188, 0, 189, 190, 191, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 197, 198, 0, + 188, 0, 189, 190, 191, 0, 0, 0, 0, 164, + 0, 0, 0, 0, 194, 195, 196, 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, 0, - 204, 0, 205, 0, 0, 206 + 204, 0, 205, 0, 0, 206, 165, 166, 167, 0, + 168, 169, 170, 171, 172, 173, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, + 187, 188, 0, 189, 190, 191, 0, 0, 0, 0, + 164, 0, 0, 0, 0, 0, 195, 196, 197, 198, + 0, 199, 200, 201, 202, 203, 0, 0, 0, 0, + 0, 204, 0, 205, 0, 0, 206, 165, 166, 167, + 0, 168, 169, 170, 171, 172, 173, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 186, 187, 188, 0, 189, 190, 191, 0, 0, 0, + 0, 164, 0, 0, 0, 0, 0, 0, 196, 197, + 198, 0, 199, 200, 201, 202, 203, 0, 0, 0, + 0, 0, 204, 0, 205, 0, 0, 206, 165, 166, + 167, 0, 168, 169, 170, 171, 172, 173, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 186, 187, 188, 0, 189, 190, 191, 0, 0, + 0, 0, 164, 0, 0, 0, 0, 0, 0, -153, + 197, 198, 0, 199, 200, 201, 202, 203, 0, 0, + 0, 0, 0, 204, 0, 205, 0, 0, 206, 165, + 166, 167, 0, -153, -153, -153, -153, 172, 173, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 186, 187, 188, 0, 189, 190, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 197, 198, 0, 199, 200, 201, 202, 203, 0, + 0, 0, 0, 0, 204, 0, 205, 0, 0, 206 }; static const yytype_int16 yycheck[] = { - 0, 0, 0, 0, 0, 90, 58, 39, 249, 48, - 97, 328, 20, 108, 3, 215, 24, 3, 390, 324, - 126, 127, 3, 3, 224, 100, 318, 3, 3, 37, - 19, 39, 40, 41, 50, 43, 44, 45, 19, 47, - 46, 3, 68, 468, 19, 362, 92, 472, 473, 134, - 14, 4, 52, 52, 52, 52, 52, 19, 133, 0, - 0, 378, 0, 27, 99, 100, 491, 20, 21, 22, - 375, 24, 389, 26, 36, 367, 102, 3, 124, 5, - 505, 127, 8, 9, 10, 38, 12, 512, 100, 3, - 34, 100, 124, 46, 47, 48, 49, 103, 106, 100, - 108, 89, 122, 122, 122, 19, 122, 127, 100, 204, - 351, 52, 52, 93, 52, 420, 124, 93, 62, 45, - 320, 133, 128, 129, 133, 18, 28, 35, 3, 55, - 56, 33, 133, 374, 115, 3, 122, 126, 455, 511, - 457, 133, 128, 51, 19, 100, 99, 147, 147, 147, - 147, 147, 3, 115, 5, 163, 164, 165, 166, 167, + 0, 0, 0, 0, 0, 90, 58, 39, 97, 249, + 48, 3, 20, 108, 327, 215, 24, 390, 3, 50, + 323, 89, 3, 68, 224, 3, 100, 317, 3, 37, + 92, 39, 40, 41, 19, 43, 44, 45, 19, 47, + 46, 3, 122, 5, 90, 91, 92, 360, 3, 134, + 122, 4, 52, 52, 52, 52, 52, 102, 0, 133, + 0, 0, 124, 376, 19, 127, 3, 20, 21, 22, + 373, 24, 100, 26, 387, 365, 122, 18, 124, 122, + 34, 127, 19, 468, 127, 38, 3, 472, 473, 3, + 14, 122, 124, 46, 47, 48, 49, 103, 106, 36, + 108, 102, 19, 27, 105, 133, 491, 100, 62, 204, + 52, 351, 52, 52, 126, 93, 124, 420, 93, 319, + 505, 100, 128, 129, 126, 127, 28, 512, 122, 35, + 122, 33, 372, 122, 115, 122, 128, 3, 511, 3, + 133, 126, 455, 0, 457, 51, 99, 147, 147, 147, + 147, 147, 126, 19, 133, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 133, 132, - 122, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 230, 102, - 232, 122, 105, 209, 212, 122, 147, 147, 247, 147, - 126, 18, 3, 213, 213, 213, 0, 458, 100, 126, - 27, 3, 230, 229, 232, 32, 321, 122, 122, 90, - 91, 92, 3, 474, 105, 127, 132, 4, 100, 46, - 125, 100, 3, 328, 250, 251, 3, 3, 333, 126, - 18, 68, 4, 20, 21, 22, 341, 24, 3, 26, - 347, 122, 349, 124, 99, 68, 127, 3, 20, 21, - 22, 38, 24, 3, 26, 516, 3, 362, 102, 46, - 47, 48, 49, 3, 99, 14, 38, 127, 127, 122, - 133, 105, 100, 378, 302, 47, 48, 49, 132, 3, - 54, 90, 91, 92, 389, 392, 54, 3, 133, 89, - 310, 310, 310, 321, 3, 3, 122, 126, 318, 318, - 318, 132, 100, 112, 113, 114, 115, 116, 133, 105, - 132, 17, 99, 122, 122, 124, 388, 102, 127, 126, - 100, 3, 132, 126, 102, 126, 132, 379, 356, 436, - 100, 126, 384, 3, 133, 5, 6, 363, 8, 9, - 10, 11, 12, 126, 65, 132, 105, 367, 367, 367, - 455, 379, 457, 122, 18, 25, 384, 27, 133, 29, - 133, 132, 3, 27, 90, 91, 92, 31, 32, 3, - 27, 132, 126, 126, 132, 45, 133, 132, 3, 122, - 44, 132, 46, 53, 132, 55, 56, 126, 114, 115, - 116, 132, 52, 310, 397, 133, 122, 132, 124, 58, - 70, 127, 147, 444, 127, 340, 69, 444, 497, 483, - 398, 426, 426, 441, 465, 488, 418, 437, 27, 371, - 90, 91, 392, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, + 178, 179, 180, 181, 182, 183, 184, 185, 115, 132, + 100, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 230, 100, + 232, 3, 100, 209, 212, 147, 122, 147, 147, 247, + 99, 100, 18, 213, 213, 213, 127, 122, 458, 3, + 105, 27, 230, 229, 232, 320, 32, 90, 91, 92, + 100, 125, 133, 132, 474, 133, 3, 3, 100, 3, + 46, 18, 327, 126, 250, 251, 68, 332, 3, 112, + 113, 114, 115, 116, 99, 340, 68, 3, 347, 122, + 349, 124, 4, 3, 127, 3, 3, 99, 127, 14, + 122, 127, 133, 100, 105, 360, 516, 132, 20, 21, + 22, 102, 24, 3, 26, 5, 3, 3, 8, 9, + 10, 376, 12, 301, 54, 54, 38, 133, 89, 3, + 126, 3, 387, 392, 46, 47, 48, 49, 122, 309, + 309, 309, 320, 132, 100, 133, 132, 317, 317, 317, + 105, 102, 122, 17, 100, 45, 3, 90, 91, 92, + 18, 126, 126, 132, 386, 55, 56, 133, 126, 27, + 132, 102, 100, 31, 32, 377, 354, 436, 40, 122, + 382, 114, 115, 116, 126, 361, 44, 99, 46, 122, + 65, 124, 133, 133, 127, 365, 365, 365, 3, 377, + 455, 105, 457, 126, 382, 67, 68, 69, 132, 71, + 72, 73, 74, 75, 76, 3, 27, 126, 132, 132, + 132, 126, 133, 3, 122, 147, 88, 126, 90, 91, + 92, 132, 94, 95, 96, 132, 132, 132, 132, 4, + 133, 397, 52, 309, 106, 107, 108, 109, 110, 58, + 112, 113, 114, 115, 116, 20, 21, 22, 127, 24, + 122, 26, 124, 441, 444, 127, 339, 437, 426, 444, + 69, 497, 426, 38, 483, 465, 398, 418, 488, 27, + 369, -1, 47, 48, 49, -1, 392, -1, -1, 459, 459, 459, 459, 459, -1, 465, -1, -1, -1, -1, - -1, -1, 122, -1, 124, -1, -1, -1, 128, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 483, 483, 483, 483, 483, -1, -1, -1, -1, -1, -1, -1, -1, -1, 497, 497, 497, 497, 497, 0, -1, -1, 3, 4, 5, 6, -1, @@ -3290,92 +3297,90 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, 112, 43, -1, 45, -1, 117, 118, -1, -1, -1, 122, 53, 124, 55, 56, -1, 128, -1, -1, -1, -1, 63, -1, -1, -1, -1, + -1, -1, 70, -1, -1, 3, -1, 5, 6, -1, + 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, + -1, -1, 90, 91, -1, -1, -1, 25, -1, 27, + -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, -1, -1, 45, -1, 117, + 118, -1, -1, -1, 122, 53, 124, 55, 56, -1, + 128, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 90, 91, -1, -1, -1, -1, -1, -1, - 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 112, -1, -1, -1, -1, 117, - 118, -1, -1, -1, 122, -1, 124, 67, 68, 69, - 128, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 90, 91, 92, -1, 94, 95, 96, -1, -1, -1, - -1, -1, 102, 40, 104, -1, 106, 107, 108, 109, - 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, - -1, -1, 122, -1, 124, -1, -1, 127, -1, -1, - 67, 68, 69, 133, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, -1, 90, 91, 92, -1, 94, 95, 96, - -1, -1, -1, -1, -1, 102, 40, 104, -1, 106, - 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, - -1, -1, -1, -1, -1, 122, -1, 124, -1, -1, - 127, -1, -1, 67, 68, 69, 133, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, - 94, 95, 96, -1, -1, -1, -1, -1, 102, 40, - 104, -1, 106, 107, 108, 109, 110, -1, 112, 113, - 114, 115, 116, -1, -1, -1, -1, -1, 122, -1, - 124, -1, -1, 127, -1, -1, 67, 68, 69, 133, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, -1, 90, - 91, 92, -1, 94, 95, 96, -1, -1, -1, -1, - 40, 102, -1, 104, 105, 106, 107, 108, 109, 110, - -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, - -1, 122, -1, 124, -1, -1, 127, 67, 68, 69, - -1, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 90, 91, 92, -1, 94, 95, 96, -1, -1, -1, - -1, 40, 102, -1, 104, -1, 106, 107, 108, 109, - 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, - -1, -1, 122, -1, 124, 125, -1, 127, 67, 68, - 69, -1, 71, 72, 73, 74, 75, 76, 77, 78, + -1, -1, 90, 91, 67, 68, 69, -1, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, + -1, 94, 95, 96, 122, -1, 124, -1, -1, 102, + 128, 104, -1, 106, 107, 108, 109, 110, 40, 112, + 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, + -1, 124, -1, -1, 127, -1, -1, -1, -1, -1, + 133, -1, -1, -1, -1, 67, 68, 69, -1, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, + 92, -1, 94, 95, 96, -1, -1, -1, -1, -1, + 102, 40, 104, -1, 106, 107, 108, 109, 110, -1, + 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, + 122, -1, 124, -1, -1, 127, -1, -1, 67, 68, + 69, 133, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, 96, -1, -1, - -1, -1, 40, 102, -1, 104, 105, 106, 107, 108, + -1, -1, -1, 102, 40, 104, -1, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, - -1, -1, -1, 122, -1, 124, -1, -1, 127, 67, - 68, 69, -1, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, -1, 90, 91, 92, -1, 94, 95, 96, -1, - -1, -1, -1, 40, 102, -1, 104, -1, 106, 107, - 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, - -1, -1, -1, -1, 122, -1, 124, -1, -1, 127, - 67, 68, 69, -1, 71, 72, 73, 74, 75, 76, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 88, -1, 90, 91, 92, -1, 94, 95, 96, - -1, -1, -1, -1, 40, -1, -1, -1, -1, 106, - 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, - -1, -1, -1, -1, -1, 122, -1, 124, -1, -1, - 127, 67, 68, 69, -1, 71, 72, 73, 74, 75, - 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 90, 91, 92, -1, 94, 95, - 96, -1, -1, -1, -1, 40, -1, -1, -1, -1, + -1, -1, -1, 122, -1, 124, -1, -1, 127, -1, + -1, 67, 68, 69, 133, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, + 96, -1, -1, -1, -1, 40, 102, -1, 104, 105, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, -1, 124, -1, -1, 127, 67, 68, 69, -1, 71, 72, 73, 74, - 75, 76, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 90, 91, 92, -1, 94, - 95, 96, -1, -1, -1, -1, 40, -1, -1, -1, - -1, -1, 107, 108, 109, 110, -1, 112, 113, 114, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, + 95, 96, -1, -1, -1, -1, 40, 102, -1, 104, + -1, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, -1, 124, - -1, -1, 127, 67, 68, 69, -1, 71, 72, 73, - 74, 75, 76, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 90, 91, 92, -1, - 94, 95, 96, -1, -1, -1, -1, 40, -1, -1, - -1, -1, -1, -1, 108, 109, 110, -1, 112, 113, + 125, -1, 127, 67, 68, 69, -1, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, + 94, 95, 96, -1, -1, -1, -1, 40, 102, -1, + 104, 105, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, -1, 124, -1, -1, 127, 67, 68, 69, -1, 71, 72, - 73, 74, 75, 76, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 90, 91, 92, - -1, 94, 95, 96, -1, -1, -1, -1, 40, -1, - -1, -1, -1, -1, -1, 108, 109, 110, -1, 112, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, + -1, 94, 95, 96, -1, -1, -1, -1, 40, 102, + -1, 104, -1, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, -1, 124, -1, -1, 127, 67, 68, 69, -1, 71, 72, 73, 74, 75, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, 91, - 92, -1, 94, 95, 96, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 109, 110, -1, + 92, -1, 94, 95, 96, -1, -1, -1, -1, 40, + -1, -1, -1, -1, 106, 107, 108, 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, -1, - 122, -1, 124, -1, -1, 127 + 122, -1, 124, -1, -1, 127, 67, 68, 69, -1, + 71, 72, 73, 74, 75, 76, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, + 91, 92, -1, 94, 95, 96, -1, -1, -1, -1, + 40, -1, -1, -1, -1, -1, 107, 108, 109, 110, + -1, 112, 113, 114, 115, 116, -1, -1, -1, -1, + -1, 122, -1, 124, -1, -1, 127, 67, 68, 69, + -1, 71, 72, 73, 74, 75, 76, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 90, 91, 92, -1, 94, 95, 96, -1, -1, -1, + -1, 40, -1, -1, -1, -1, -1, -1, 108, 109, + 110, -1, 112, 113, 114, 115, 116, -1, -1, -1, + -1, -1, 122, -1, 124, -1, -1, 127, 67, 68, + 69, -1, 71, 72, 73, 74, 75, 76, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 90, 91, 92, -1, 94, 95, 96, -1, -1, + -1, -1, 40, -1, -1, -1, -1, -1, -1, 108, + 109, 110, -1, 112, 113, 114, 115, 116, -1, -1, + -1, -1, -1, 122, -1, 124, -1, -1, 127, 67, + 68, 69, -1, 71, 72, 73, 74, 75, 76, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 90, 91, 92, -1, 94, 95, 96, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 109, 110, -1, 112, 113, 114, 115, 116, -1, + -1, -1, -1, -1, 122, -1, 124, -1, -1, 127 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -3407,20 +3412,20 @@ static const yytype_uint8 yystos[] = 223, 231, 122, 237, 127, 239, 180, 228, 3, 155, 105, 132, 100, 133, 125, 100, 236, 3, 3, 151, 152, 237, 237, 151, 3, 132, 145, 126, 136, 3, - 99, 68, 3, 35, 51, 215, 3, 3, 207, 102, + 99, 68, 3, 35, 51, 215, 3, 3, 207, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 3, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 228, - 239, 3, 122, 128, 237, 99, 14, 239, 99, 139, - 140, 141, 147, 148, 195, 197, 206, 216, 186, 183, - 127, 122, 227, 3, 93, 212, 213, 214, 133, 3, - 115, 133, 142, 143, 133, 237, 236, 236, 105, 226, - 100, 143, 132, 226, 237, 237, 3, 54, 192, 54, - 193, 3, 208, 209, 3, 5, 105, 133, 125, 89, - 239, 3, 133, 122, 133, 132, 141, 126, 139, 228, - 102, 105, 210, 214, 133, 100, 146, 132, 133, 105, - 36, 115, 223, 225, 102, 149, 152, 132, 99, 133, + 239, 239, 3, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 228, 239, + 3, 122, 128, 237, 99, 14, 239, 99, 139, 140, + 141, 147, 148, 195, 197, 206, 216, 186, 183, 127, + 122, 227, 3, 93, 212, 213, 214, 133, 3, 115, + 133, 142, 143, 133, 237, 236, 236, 105, 226, 100, + 143, 132, 226, 237, 237, 102, 3, 54, 192, 54, + 193, 3, 208, 209, 105, 133, 125, 89, 239, 3, + 133, 122, 133, 132, 141, 126, 139, 228, 102, 105, + 210, 214, 133, 100, 146, 132, 133, 105, 36, 115, + 223, 225, 102, 149, 152, 132, 99, 133, 3, 5, 122, 223, 17, 194, 223, 224, 126, 226, 100, 239, 3, 133, 146, 237, 126, 139, 132, 133, 3, 5, 8, 9, 10, 12, 45, 55, 56, 211, 225, 226, @@ -4249,7 +4254,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2020 "parser.y" +#line 2030 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4260,7 +4265,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2021 "parser.y" +#line 2031 "parser.y" {(yyval.code)=code_new();} } break; @@ -4271,7 +4276,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2023 "parser.y" +#line 2033 "parser.y" {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));} } break; @@ -4282,7 +4287,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2024 "parser.y" +#line 2034 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4293,7 +4298,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2039 "parser.y" +#line 2049 "parser.y" {(yyval.code)=(yyvsp[(2) - (3)].code);} } break; @@ -4304,7 +4309,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2040 "parser.y" +#line 2050 "parser.y" {(yyval.code)=0;} } break; @@ -4315,7 +4320,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2043 "parser.y" +#line 2053 "parser.y" {(yyval.code)=0;} } break; @@ -4326,7 +4331,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2050 "parser.y" +#line 2060 "parser.y" {(yyval.code)=(yyvsp[(3) - (4)].code);} } break; @@ -4337,7 +4342,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2054 "parser.y" +#line 2064 "parser.y" {(yyval.code)=(yyvsp[(1) - (2)].code);} } break; @@ -4348,7 +4353,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2055 "parser.y" +#line 2065 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4359,7 +4364,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2059 "parser.y" +#line 2069 "parser.y" { code_t**cc = &global->init->method->body->code; *cc = code_append(*cc, (yyvsp[(1) - (1)].code)); @@ -4373,7 +4378,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2070 "parser.y" +#line 2080 "parser.y" {(yyval.value)=(yyvsp[(2) - (2)].value);} } break; @@ -4384,7 +4389,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2071 "parser.y" +#line 2081 "parser.y" {(yyval.value).c=abc_pushundefined(0); (yyval.value).t=TYPE_ANY; } @@ -4397,7 +4402,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2075 "parser.y" +#line 2085 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4408,7 +4413,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2076 "parser.y" +#line 2086 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4419,7 +4424,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2078 "parser.y" +#line 2088 "parser.y" {(yyval.code) = (yyvsp[(1) - (1)].code);} } break; @@ -4430,7 +4435,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2079 "parser.y" +#line 2089 "parser.y" {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));} } break; @@ -4441,7 +4446,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2082 "parser.y" +#line 2092 "parser.y" { PASS12 if(variable_exists((yyvsp[(1) - (3)].id))) @@ -4508,7 +4513,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2142 "parser.y" +#line 2152 "parser.y" {(yyval.code) = code_new();} } break; @@ -4519,7 +4524,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2143 "parser.y" +#line 2153 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4530,7 +4535,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2146 "parser.y" +#line 2156 "parser.y" {PASS12 new_state();} } break; @@ -4541,7 +4546,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2146 "parser.y" +#line 2156 "parser.y" { (yyval.code) = code_new(); @@ -4569,7 +4574,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2165 "parser.y" +#line 2175 "parser.y" {(yyval.code)=code_new();} } break; @@ -4580,7 +4585,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2172 "parser.y" +#line 2182 "parser.y" { PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0); PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0); @@ -4594,7 +4599,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2176 "parser.y" +#line 2186 "parser.y" { PASS12 (yyval.id)=(yyvsp[(1) - (1)].id); @@ -4608,7 +4613,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2181 "parser.y" +#line 2191 "parser.y" {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;} } break; @@ -4619,7 +4624,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2182 "parser.y" +#line 2192 "parser.y" {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;} } break; @@ -4630,7 +4635,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2184 "parser.y" +#line 2194 "parser.y" { if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement"); (yyval.code) = code_new(); @@ -4659,7 +4664,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2204 "parser.y" +#line 2214 "parser.y" { variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id)); if(!var) { @@ -4716,7 +4721,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2252 "parser.y" +#line 2262 "parser.y" {PASS12 new_state();} } break; @@ -4727,7 +4732,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2252 "parser.y" +#line 2262 "parser.y" { (yyval.code) = code_new(); @@ -4755,7 +4760,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2271 "parser.y" +#line 2281 "parser.y" {PASS12 new_state();} } break; @@ -4766,7 +4771,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2271 "parser.y" +#line 2281 "parser.y" { (yyval.code) = code_new(); code_t*loopstart = (yyval.code) = abc_label((yyval.code)); @@ -4790,7 +4795,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2286 "parser.y" +#line 2296 "parser.y" { (yyval.code) = abc___break__(0, ""); } @@ -4803,7 +4808,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2289 "parser.y" +#line 2299 "parser.y" { (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id)); } @@ -4816,7 +4821,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2292 "parser.y" +#line 2302 "parser.y" { (yyval.code) = abc___continue__(0, ""); } @@ -4829,7 +4834,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2295 "parser.y" +#line 2305 "parser.y" { (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id)); } @@ -4842,7 +4847,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2299 "parser.y" +#line 2309 "parser.y" {(yyval.code)=0;} } break; @@ -4853,7 +4858,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2300 "parser.y" +#line 2310 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4864,7 +4869,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2301 "parser.y" +#line 2311 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4875,7 +4880,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2302 "parser.y" +#line 2312 "parser.y" {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));} } break; @@ -4886,7 +4891,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2303 "parser.y" +#line 2313 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4897,7 +4902,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2304 "parser.y" +#line 2314 "parser.y" {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));} } break; @@ -4908,7 +4913,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2306 "parser.y" +#line 2316 "parser.y" { (yyval.code) = abc_dup(0); (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c); @@ -4929,7 +4934,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2317 "parser.y" +#line 2327 "parser.y" { (yyval.code) = (yyvsp[(3) - (3)].code); } @@ -4942,7 +4947,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2320 "parser.y" +#line 2330 "parser.y" {PASS12 new_state();} } break; @@ -4953,7 +4958,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2320 "parser.y" +#line 2330 "parser.y" { (yyval.code)=(yyvsp[(4) - (8)].value).c; (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code)); @@ -4989,7 +4994,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2349 "parser.y" +#line 2359 "parser.y" {PASS12 new_state(); state->exception_name=(yyvsp[(3) - (5)].id); PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0); @@ -5004,7 +5009,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2354 "parser.y" +#line 2364 "parser.y" { namespace_t name_ns = {ACCESS_PACKAGE, ""}; multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)}; @@ -5033,7 +5038,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2373 "parser.y" +#line 2383 "parser.y" {PASS12 new_state();state->exception_name=0;} } break; @@ -5044,7 +5049,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2373 "parser.y" +#line 2383 "parser.y" { (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code)); if(!(yyvsp[(4) - (5)].code)) { @@ -5069,7 +5074,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2389 "parser.y" +#line 2399 "parser.y" {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));} } break; @@ -5080,7 +5085,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2390 "parser.y" +#line 2400 "parser.y" {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));} } break; @@ -5091,7 +5096,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2391 "parser.y" +#line 2401 "parser.y" {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);} } break; @@ -5102,7 +5107,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2392 "parser.y" +#line 2402 "parser.y" { (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list); (yyval.catch_list).finally = 0; @@ -5120,7 +5125,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2400 "parser.y" +#line 2410 "parser.y" { (yyval.catch_list).l=list_new(); (yyval.catch_list).finally = 0; @@ -5138,7 +5143,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2409 "parser.y" +#line 2419 "parser.y" {PASS12 new_state();} } break; @@ -5149,7 +5154,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2409 "parser.y" +#line 2419 "parser.y" { code_t*out = abc_nop(0); @@ -5201,7 +5206,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2454 "parser.y" +#line 2464 "parser.y" { (yyval.code)=(yyvsp[(2) - (2)].value).c; (yyval.code)=abc_throw((yyval.code)); @@ -5215,7 +5220,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2458 "parser.y" +#line 2468 "parser.y" { if(!state->exception_name) syntaxerror("re-throw only possible within a catch block"); @@ -5233,7 +5238,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2469 "parser.y" +#line 2479 "parser.y" { (yyval.code) = (yyvsp[(3) - (5)].value).c; (yyval.code) = abc_pushwith((yyval.code)); @@ -5249,7 +5254,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2479 "parser.y" +#line 2489 "parser.y" {PASS12 (yyval.id)="package";} } break; @@ -5260,7 +5265,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2481 "parser.y" +#line 2491 "parser.y" {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;} } break; @@ -5271,7 +5276,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2482 "parser.y" +#line 2492 "parser.y" {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));} } break; @@ -5282,7 +5287,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2484 "parser.y" +#line 2494 "parser.y" {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;} } break; @@ -5293,7 +5298,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2485 "parser.y" +#line 2495 "parser.y" {PASS12 endpackage();(yyval.code)=0;} } break; @@ -5304,7 +5309,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2486 "parser.y" +#line 2496 "parser.y" {PASS12 startpackage("");} } break; @@ -5315,7 +5320,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2487 "parser.y" +#line 2497 "parser.y" {PASS12 endpackage();(yyval.code)=0;} } break; @@ -5326,7 +5331,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2489 "parser.y" +#line 2499 "parser.y" { PASS12 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name); @@ -5352,7 +5357,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2505 "parser.y" +#line 2515 "parser.y" { PASS12 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) { @@ -5376,7 +5381,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2522 "parser.y" +#line 2532 "parser.y" {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;} } break; @@ -5387,7 +5392,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2523 "parser.y" +#line 2533 "parser.y" {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);} } break; @@ -5398,7 +5403,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2524 "parser.y" +#line 2534 "parser.y" {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);} } break; @@ -5409,7 +5414,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2525 "parser.y" +#line 2535 "parser.y" { PASS12 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags; @@ -5426,7 +5431,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2533 "parser.y" +#line 2543 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;} } break; @@ -5437,7 +5442,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2534 "parser.y" +#line 2544 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;} } break; @@ -5448,7 +5453,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2535 "parser.y" +#line 2545 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;} } break; @@ -5459,7 +5464,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2536 "parser.y" +#line 2546 "parser.y" {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;} } break; @@ -5470,7 +5475,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2537 "parser.y" +#line 2547 "parser.y" {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;} } break; @@ -5481,7 +5486,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2538 "parser.y" +#line 2548 "parser.y" {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;} } break; @@ -5492,7 +5497,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2539 "parser.y" +#line 2549 "parser.y" {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;} } break; @@ -5503,7 +5508,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2540 "parser.y" +#line 2550 "parser.y" {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;} } break; @@ -5514,7 +5519,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2541 "parser.y" +#line 2551 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;} } break; @@ -5525,7 +5530,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2542 "parser.y" +#line 2552 "parser.y" {PASS12 (yyval.flags).flags=FLAG_NAMESPACE; (yyval.flags).ns=(yyvsp[(1) - (1)].id); } @@ -5538,7 +5543,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2546 "parser.y" +#line 2556 "parser.y" {(yyval.classinfo)=0;} } break; @@ -5549,7 +5554,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2547 "parser.y" +#line 2557 "parser.y" {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);} } break; @@ -5560,7 +5565,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2549 "parser.y" +#line 2559 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();} } break; @@ -5571,7 +5576,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2550 "parser.y" +#line 2560 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);} } break; @@ -5582,7 +5587,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2552 "parser.y" +#line 2562 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();} } break; @@ -5593,7 +5598,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2553 "parser.y" +#line 2563 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);} } break; @@ -5604,7 +5609,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2557 "parser.y" +#line 2567 "parser.y" {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));} } break; @@ -5615,7 +5620,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2559 "parser.y" +#line 2569 "parser.y" {PASS12 endclass();(yyval.code)=0;} } break; @@ -5626,7 +5631,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2563 "parser.y" +#line 2573 "parser.y" {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE; startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));} } @@ -5638,7 +5643,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2566 "parser.y" +#line 2576 "parser.y" {PASS12 endclass();(yyval.code)=0;} } break; @@ -5649,7 +5654,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2579 "parser.y" +#line 2589 "parser.y" { code_t*c = state->cls->static_init->header; c = code_append(c, (yyvsp[(1) - (1)].code)); @@ -5664,7 +5669,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2590 "parser.y" +#line 2600 "parser.y" { syntaxerror("variable declarations not allowed in interfaces"); } @@ -5677,7 +5682,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2593 "parser.y" +#line 2603 "parser.y" { PASS12 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC; @@ -5697,7 +5702,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2608 "parser.y" +#line 2618 "parser.y" {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));} } break; @@ -5708,7 +5713,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2608 "parser.y" +#line 2618 "parser.y" {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);} } break; @@ -5719,7 +5724,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2610 "parser.y" +#line 2620 "parser.y" {(yyval.code) = (yyvsp[(1) - (1)].code);} } break; @@ -5730,7 +5735,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2611 "parser.y" +#line 2621 "parser.y" {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));} } break; @@ -5741,7 +5746,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2614 "parser.y" +#line 2624 "parser.y" { int flags = slotstate_flags->flags; namespace_t ns = modifiers2access(slotstate_flags); @@ -5822,7 +5827,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2688 "parser.y" +#line 2698 "parser.y" {(yyval.constant)=0;} } break; @@ -5833,7 +5838,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2689 "parser.y" +#line 2699 "parser.y" {(yyval.constant)=(yyvsp[(2) - (2)].constant);} } break; @@ -5844,7 +5849,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2691 "parser.y" +#line 2701 "parser.y" {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));} } break; @@ -5855,7 +5860,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2692 "parser.y" +#line 2702 "parser.y" {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));} } break; @@ -5866,7 +5871,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2693 "parser.y" +#line 2703 "parser.y" {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));} } break; @@ -5877,7 +5882,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2694 "parser.y" +#line 2704 "parser.y" {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));} } break; @@ -5888,7 +5893,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2695 "parser.y" +#line 2705 "parser.y" {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);} } break; @@ -5899,7 +5904,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2697 "parser.y" +#line 2707 "parser.y" {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));} } break; @@ -5910,7 +5915,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2698 "parser.y" +#line 2708 "parser.y" {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));} } break; @@ -5921,7 +5926,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2699 "parser.y" +#line 2709 "parser.y" {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));} } break; @@ -5932,7 +5937,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2700 "parser.y" +#line 2710 "parser.y" { if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) { (yyval.constant) = constant_new_float(__builtin_nan("")); @@ -5950,7 +5955,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2712 "parser.y" +#line 2722 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -5964,7 +5969,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2716 "parser.y" +#line 2726 "parser.y" { PASS12 (yyval.params)=(yyvsp[(1) - (1)].params); @@ -5978,7 +5983,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2722 "parser.y" +#line 2732 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -5994,7 +5999,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2728 "parser.y" +#line 2738 "parser.y" { PASS12 (yyval.params) =(yyvsp[(1) - (4)].params); @@ -6010,7 +6015,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2736 "parser.y" +#line 2746 "parser.y" { PASS12 (yyval.params) = (yyvsp[(1) - (3)].params); @@ -6025,7 +6030,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2741 "parser.y" +#line 2751 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -6040,7 +6045,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2747 "parser.y" +#line 2757 "parser.y" { PASS12 (yyval.param) = rfx_calloc(sizeof(param_t)); @@ -6058,7 +6063,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2755 "parser.y" +#line 2765 "parser.y" { PASS12 (yyval.param) = rfx_calloc(sizeof(param_t)); @@ -6076,7 +6081,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2765 "parser.y" +#line 2775 "parser.y" {PASS12 (yyval.token)=0;} } break; @@ -6087,7 +6092,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2768 "parser.y" +#line 2778 "parser.y" {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));} } break; @@ -6098,7 +6103,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2769 "parser.y" +#line 2779 "parser.y" { PASS1 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0); @@ -6122,7 +6127,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2785 "parser.y" +#line 2795 "parser.y" {PASS12 (yyval.id)=0;} } break; @@ -6133,7 +6138,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2787 "parser.y" +#line 2797 "parser.y" {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));} } break; @@ -6144,7 +6149,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2788 "parser.y" +#line 2798 "parser.y" { PASS1 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0); @@ -6172,7 +6177,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2810 "parser.y" +#line 2820 "parser.y" { PASS1 static classinfo_t c; memset(&c, 0, sizeof(c)); @@ -6197,7 +6202,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2826 "parser.y" +#line 2836 "parser.y" { PASS1 static classinfo_t c; memset(&c, 0, sizeof(c)); @@ -6221,7 +6226,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2844 "parser.y" +#line 2854 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));} } break; @@ -6232,7 +6237,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2845 "parser.y" +#line 2855 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));} } break; @@ -6243,7 +6248,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2847 "parser.y" +#line 2857 "parser.y" {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);} } break; @@ -6254,7 +6259,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2848 "parser.y" +#line 2858 "parser.y" {PASS12 (yyval.classinfo)=registry_getanytype();} } break; @@ -6265,7 +6270,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2849 "parser.y" +#line 2859 "parser.y" {PASS12 (yyval.classinfo)=registry_getanytype();} } break; @@ -6276,7 +6281,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2858 "parser.y" +#line 2868 "parser.y" {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);} } break; @@ -6287,7 +6292,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2859 "parser.y" +#line 2869 "parser.y" {PASS12 (yyval.classinfo)=0;} } break; @@ -6298,7 +6303,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2863 "parser.y" +#line 2873 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).len=0;} } break; @@ -6309,7 +6314,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2864 "parser.y" +#line 2874 "parser.y" {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);} } break; @@ -6320,7 +6325,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2866 "parser.y" +#line 2876 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).len=0;} } break; @@ -6331,7 +6336,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2870 "parser.y" +#line 2880 "parser.y" {(yyval.value_list).len=1; (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c; } @@ -6344,7 +6349,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2874 "parser.y" +#line 2884 "parser.y" {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);} } break; @@ -6355,7 +6360,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2875 "parser.y" +#line 2885 "parser.y" { (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1; (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c); @@ -6369,7 +6374,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2881 "parser.y" +#line 2891 "parser.y" { (yyval.value).c = (yyvsp[(2) - (4)].value).c; if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c); @@ -6410,7 +6415,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2917 "parser.y" +#line 2927 "parser.y" { (yyval.value).c = (yyvsp[(1) - (4)].value).c; @@ -6465,7 +6470,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2963 "parser.y" +#line 2973 "parser.y" { if(!state->cls) syntaxerror("super() not allowed outside of a class"); if(!state->method) syntaxerror("super() not allowed outside of a function"); @@ -6495,7 +6500,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2984 "parser.y" +#line 2994 "parser.y" { (yyval.value).c = (yyvsp[(2) - (2)].value).c; if((yyval.value).c->opcode == OPCODE_COERCE_A) { @@ -6525,7 +6530,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3005 "parser.y" +#line 3015 "parser.y" { (yyval.code) = abc_returnvoid(0); } @@ -6538,7 +6543,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3008 "parser.y" +#line 3018 "parser.y" { (yyval.code) = (yyvsp[(2) - (2)].value).c; (yyval.code) = abc_returnvalue((yyval.code)); @@ -6552,7 +6557,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3015 "parser.y" +#line 3025 "parser.y" {(yyval.value)=(yyvsp[(1) - (1)].value);} } break; @@ -6563,7 +6568,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3016 "parser.y" +#line 3026 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6574,7 +6579,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3017 "parser.y" +#line 3027 "parser.y" { (yyval.value).c = (yyvsp[(1) - (3)].value).c; (yyval.value).c = cut_last_push((yyval.value).c); @@ -6590,7 +6595,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3023 "parser.y" +#line 3033 "parser.y" { (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c); } @@ -6603,7 +6608,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3029 "parser.y" +#line 3039 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6614,7 +6619,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3033 "parser.y" +#line 3043 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6625,7 +6630,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3035 "parser.y" +#line 3045 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6636,7 +6641,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3037 "parser.y" +#line 3047 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6647,7 +6652,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3041 "parser.y" +#line 3051 "parser.y" { (yyval.value).c = 0; namespace_t ns = {ACCESS_PACKAGE, ""}; @@ -6673,7 +6678,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3058 "parser.y" +#line 3068 "parser.y" {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint)); //MULTINAME(m, registry_getintclass()); //$$.c = abc_coerce2($$.c, &m); // FIXME @@ -6688,7 +6693,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3063 "parser.y" +#line 3073 "parser.y" {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint)); (yyval.value).t = TYPE_INT; } @@ -6701,7 +6706,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3066 "parser.y" +#line 3076 "parser.y" {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int)); (yyval.value).t = TYPE_INT; } @@ -6714,7 +6719,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3069 "parser.y" +#line 3079 "parser.y" {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint)); (yyval.value).t = TYPE_UINT; } @@ -6727,7 +6732,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3072 "parser.y" +#line 3082 "parser.y" {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float)); (yyval.value).t = TYPE_FLOAT; } @@ -6740,7 +6745,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3075 "parser.y" +#line 3085 "parser.y" {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str); (yyval.value).t = TYPE_STRING; } @@ -6753,7 +6758,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3078 "parser.y" +#line 3088 "parser.y" {(yyval.value).c = abc_pushundefined(0); (yyval.value).t = TYPE_ANY; } @@ -6766,7 +6771,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3081 "parser.y" +#line 3091 "parser.y" {(yyval.value).c = abc_pushtrue(0); (yyval.value).t = TYPE_BOOLEAN; } @@ -6779,7 +6784,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3084 "parser.y" +#line 3094 "parser.y" {(yyval.value).c = abc_pushfalse(0); (yyval.value).t = TYPE_BOOLEAN; } @@ -6792,7 +6797,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3087 "parser.y" +#line 3097 "parser.y" {(yyval.value).c = abc_pushnull(0); (yyval.value).t = TYPE_NULL; } @@ -6805,7 +6810,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3091 "parser.y" +#line 3101 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6818,7 +6823,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3094 "parser.y" +#line 3104 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6831,7 +6836,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3097 "parser.y" +#line 3107 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6844,7 +6849,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3100 "parser.y" +#line 3110 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6857,7 +6862,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3103 "parser.y" +#line 3113 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6870,7 +6875,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3106 "parser.y" +#line 3116 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6883,7 +6888,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3109 "parser.y" +#line 3119 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6896,7 +6901,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3112 "parser.y" +#line 3122 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6909,7 +6914,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3116 "parser.y" +#line 3126 "parser.y" {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O'); (yyval.value).c = (yyvsp[(1) - (3)].value).c; (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t); @@ -6930,7 +6935,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3127 "parser.y" +#line 3137 "parser.y" { (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A'); /*printf("%08x:\n",$1.t); @@ -6957,7 +6962,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3145 "parser.y" +#line 3155 "parser.y" {(yyval.value).c=(yyvsp[(2) - (2)].value).c; (yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -6971,7 +6976,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3150 "parser.y" +#line 3160 "parser.y" {(yyval.value).c=(yyvsp[(2) - (2)].value).c; (yyval.value).c = abc_bitnot((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -6985,7 +6990,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3155 "parser.y" +#line 3165 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitand((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -6999,7 +7004,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3160 "parser.y" +#line 3170 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitxor((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7013,7 +7018,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3165 "parser.y" +#line 3175 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitor((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7027,7 +7032,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3170 "parser.y" +#line 3180 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_rshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7041,7 +7046,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3174 "parser.y" +#line 3184 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_urshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7055,7 +7060,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3178 "parser.y" +#line 3188 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_lshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7069,7 +7074,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3183 "parser.y" +#line 3193 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_divide((yyval.value).c); (yyval.value).t = TYPE_NUMBER; @@ -7083,7 +7088,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3187 "parser.y" +#line 3197 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_modulo((yyval.value).c); (yyval.value).t = TYPE_NUMBER; @@ -7097,7 +7102,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3191 "parser.y" +#line 3201 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_add_i((yyval.value).c); @@ -7116,7 +7121,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3200 "parser.y" +#line 3210 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_subtract_i((yyval.value).c); @@ -7135,7 +7140,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3209 "parser.y" +#line 3219 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_multiply_i((yyval.value).c); @@ -7154,7 +7159,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3219 "parser.y" +#line 3229 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_in((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7168,7 +7173,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3224 "parser.y" +#line 3234 "parser.y" {char use_astype=0; // flash player's astype works differently than astypelate if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) { MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data)); @@ -7189,7 +7194,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3237 "parser.y" +#line 3247 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_instanceof((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7203,7 +7208,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3242 "parser.y" +#line 3252 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_istypelate((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7217,7 +7222,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3247 "parser.y" +#line 3257 "parser.y" { (yyval.value).c = (yyvsp[(3) - (4)].value).c; (yyval.value).c = abc_typeof((yyval.value).c); @@ -7232,7 +7237,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3253 "parser.y" +#line 3263 "parser.y" { (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c); (yyval.value).c = abc_pushundefined((yyval.value).c); @@ -7247,7 +7252,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3259 "parser.y" +#line 3269 "parser.y" { (yyval.value).c = abc_pushundefined(0); (yyval.value).t = TYPE_ANY; } @@ -7260,7 +7265,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3263 "parser.y" +#line 3273 "parser.y" {(yyval.value)=(yyvsp[(2) - (3)].value);} } break; @@ -7271,7 +7276,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3265 "parser.y" +#line 3275 "parser.y" { (yyval.value)=(yyvsp[(2) - (2)].value); if(IS_INT((yyvsp[(2) - (2)].value).t)) { @@ -7291,7 +7296,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3276 "parser.y" +#line 3286 "parser.y" { (yyval.value).c = (yyvsp[(1) - (4)].value).c; (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c); @@ -7309,7 +7314,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3285 "parser.y" +#line 3295 "parser.y" { (yyval.value).c = code_new(); (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc); @@ -7325,7 +7330,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3292 "parser.y" +#line 3302 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).len=0;} } break; @@ -7336,7 +7341,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3293 "parser.y" +#line 3303 "parser.y" {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);} } break; @@ -7347,7 +7352,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3295 "parser.y" +#line 3305 "parser.y" { (yyval.value_list).cc = 0; (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c); @@ -7363,7 +7368,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3301 "parser.y" +#line 3311 "parser.y" { (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc; (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2; @@ -7379,7 +7384,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3310 "parser.y" +#line 3320 "parser.y" { (yyval.value).c = code_new(); (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc); @@ -7395,7 +7400,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3317 "parser.y" +#line 3327 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { @@ -7416,7 +7421,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3329 "parser.y" +#line 3339 "parser.y" { code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t); @@ -7432,7 +7437,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3335 "parser.y" +#line 3345 "parser.y" { code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t); @@ -7448,7 +7453,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3341 "parser.y" +#line 3351 "parser.y" { code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t); @@ -7464,7 +7469,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3347 "parser.y" +#line 3357 "parser.y" { code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t); @@ -7480,7 +7485,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3353 "parser.y" +#line 3363 "parser.y" { code_t*c = abc_divide((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t); @@ -7496,7 +7501,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3359 "parser.y" +#line 3369 "parser.y" { code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c); c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t); @@ -7512,7 +7517,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3365 "parser.y" +#line 3375 "parser.y" { code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c); c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t); @@ -7528,7 +7533,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3371 "parser.y" +#line 3381 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; @@ -7551,7 +7556,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3384 "parser.y" +#line 3394 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) { c=abc_subtract_i(c); @@ -7572,7 +7577,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3395 "parser.y" +#line 3405 "parser.y" { code_t*c = 0; c = code_append(c, (yyvsp[(3) - (3)].value).c); c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t); @@ -7588,7 +7593,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3402 "parser.y" +#line 3412 "parser.y" { (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?'); (yyval.value).c = (yyvsp[(1) - (5)].value).c; @@ -7610,7 +7615,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3415 "parser.y" +#line 3425 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(1) - (2)].value).t; if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) { @@ -7645,7 +7650,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3442 "parser.y" +#line 3452 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(1) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7668,7 +7673,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3456 "parser.y" +#line 3466 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(2) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7691,7 +7696,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3470 "parser.y" +#line 3480 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(2) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7714,7 +7719,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3485 "parser.y" +#line 3495 "parser.y" { if(!state->cls->info) syntaxerror("super keyword not allowed outside a class"); classinfo_t*t = state->cls->info->superclass; @@ -7737,7 +7742,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3499 "parser.y" +#line 3509 "parser.y" { // attribute TODO (yyval.value).c = abc_pushundefined(0); @@ -7753,7 +7758,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3506 "parser.y" +#line 3516 "parser.y" { // child attribute TODO (yyval.value).c = abc_pushundefined(0); @@ -7769,7 +7774,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3513 "parser.y" +#line 3523 "parser.y" { // namespace declaration TODO (yyval.value).c = abc_pushundefined(0); @@ -7785,7 +7790,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3520 "parser.y" +#line 3530 "parser.y" { // descendants TODO (yyval.value).c = abc_pushundefined(0); @@ -7801,7 +7806,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3527 "parser.y" +#line 3537 "parser.y" { // filter TODO (yyval.value).c = abc_pushundefined(0); @@ -7817,7 +7822,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3538 "parser.y" +#line 3548 "parser.y" { (yyval.value).c = (yyvsp[(1) - (3)].value).c; classinfo_t*t = (yyvsp[(1) - (3)].value).t; @@ -7876,7 +7881,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3588 "parser.y" +#line 3598 "parser.y" { PASS1 /* Queue unresolved identifiers for checking against the parent @@ -7988,11 +7993,13 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3693 "parser.y" +#line 3703 "parser.y" { PASS12 - tokenizer_register_namespace((yyvsp[(2) - (2)].id)); - (yyval.id)=(yyvsp[(2) - (2)].id); + NEW(namespace_decl_t,n); + n->name = (yyvsp[(2) - (2)].id); + n->url = 0; + (yyval.namespace_decl)=n; } } break; @@ -8003,9 +8010,13 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3699 "parser.y" +#line 3710 "parser.y" { - (yyval.code)=0; + PASS12 + NEW(namespace_decl_t,n); + n->name = (yyvsp[(2) - (4)].id); + n->url = (yyvsp[(4) - (4)].id); + (yyval.namespace_decl)=n; } } break; @@ -8016,9 +8027,13 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3702 "parser.y" +#line 3717 "parser.y" { - (yyval.code)=0; + PASS12 + NEW(namespace_decl_t,n); + n->name = (yyvsp[(2) - (4)].id); + n->url = (yyvsp[(4) - (4)].str).str; + (yyval.namespace_decl)=n; } } break; @@ -8029,8 +8044,11 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3705 "parser.y" +#line 3724 "parser.y" { + PASS12 + list_append(state->new_namespaces, (yyvsp[(2) - (2)].namespace_decl)); + tokenizer_register_namespace((yyvsp[(2) - (2)].namespace_decl)->name); (yyval.code)=0; } } @@ -8042,9 +8060,15 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3708 "parser.y" +#line 3731 "parser.y" { PASS12 + NEW(namespace_decl_t,n); + n->name = (yyvsp[(3) - (3)].classinfo)->name; + n->url = 0; + /* FIXME: for pass2, we should now try to figure out what the URL of + this thing is */ + list_append(state->new_namespaces, n); tokenizer_register_namespace((yyvsp[(3) - (3)].classinfo)->name); (yyval.code)=0; } @@ -8055,7 +8079,7 @@ PASS2 /* Line 1464 of skeleton.m4 */ -#line 8059 "parser.tab.c" +#line 8083 "parser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/lib/as3/parser.tab.h b/lib/as3/parser.tab.h index 14dbb67..f5184f6 100644 --- a/lib/as3/parser.tab.h +++ b/lib/as3/parser.tab.h @@ -182,6 +182,7 @@ tokenunion abc_exception_t *exception; regexp_t regexp; modifiers_t flags; + namespace_decl_t* namespace_decl; struct { abc_exception_list_t *l; code_t*finally; @@ -190,7 +191,7 @@ tokenunion /* Line 1685 of skeleton.m4 */ -#line 194 "parser.tab.h" +#line 195 "parser.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/lib/as3/parser.y b/lib/as3/parser.y index 2de22f6..818a090 100644 --- a/lib/as3/parser.y +++ b/lib/as3/parser.y @@ -65,6 +65,7 @@ extern int a3_lex(); abc_exception_t *exception; regexp_t regexp; modifiers_t flags; + namespace_decl_t* namespace_decl; struct { abc_exception_list_t *l; code_t*finally; @@ -170,7 +171,8 @@ extern int a3_lex(); %token T_SHR ">>" %type FOR_START -%type X_IDENTIFIER PACKAGE FOR_IN_INIT MAYBE_IDENTIFIER NAMESPACE_ID +%type X_IDENTIFIER PACKAGE FOR_IN_INIT MAYBE_IDENTIFIER +%type NAMESPACE_ID %type VARCONST %type CODE %type CODEPIECE CODE_STATEMENT @@ -350,6 +352,7 @@ typedef struct _state { dict_t*import_toplevel_packages; dict_t*imports; namespace_list_t*active_namespaces; + namespace_decl_list_t*new_namespaces; char has_own_imports; char new_vars; // e.g. transition between two functions @@ -433,6 +436,7 @@ static void new_state() state = s; state->level++; state->has_own_imports = 0; + state->new_namespaces = 0; state->vars = dict_new(); state->old = oldstate; state->new_vars = 0; @@ -487,6 +491,12 @@ static void old_state() state_t*leaving = state; state = state->old; + + namespace_decl_list_t*nl=leaving->new_namespaces; + while(nl) { + tokenizer_unregister_namespace(nl->namespace_decl->name); + nl = nl->next; + } if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) { free(leaving->method); @@ -3692,21 +3702,40 @@ VAR_READ : T_IDENTIFIER { NAMESPACE_ID : "namespace" T_IDENTIFIER { PASS12 - tokenizer_register_namespace($2); - $$=$2; + NEW(namespace_decl_t,n); + n->name = $2; + n->url = 0; + $$=n; } - -NAMESPACE_DECLARATION : MAYBE_MODIFIERS NAMESPACE_ID { - $$=0; +NAMESPACE_ID : "namespace" T_IDENTIFIER '=' T_IDENTIFIER { + PASS12 + NEW(namespace_decl_t,n); + n->name = $2; + n->url = $4; + $$=n; } -NAMESPACE_DECLARATION : MAYBE_MODIFIERS NAMESPACE_ID '=' T_IDENTIFIER { - $$=0; +NAMESPACE_ID : "namespace" T_IDENTIFIER '=' T_STRING { + PASS12 + NEW(namespace_decl_t,n); + n->name = $2; + n->url = $4.str; + $$=n; } -NAMESPACE_DECLARATION : MAYBE_MODIFIERS NAMESPACE_ID '=' T_STRING { +NAMESPACE_DECLARATION : MAYBE_MODIFIERS NAMESPACE_ID { + PASS12 + list_append(state->new_namespaces, $2); + tokenizer_register_namespace($2->name); $$=0; } + USE_NAMESPACE : "use" "namespace" CLASS_SPEC { PASS12 + NEW(namespace_decl_t,n); + n->name = $3->name; + n->url = 0; + /* FIXME: for pass2, we should now try to figure out what the URL of + this thing is */ + list_append(state->new_namespaces, n); tokenizer_register_namespace($3->name); $$=0; } diff --git a/lib/as3/pool.c b/lib/as3/pool.c index 5b708e2..6761537 100644 --- a/lib/as3/pool.c +++ b/lib/as3/pool.c @@ -250,7 +250,7 @@ namespace_t* namespace_new(U8 access, const char*name) ns->name = name?strdup(name):0; return ns; } -namespace_t* namespace_new_undefined(const char*name) { +namespace_t* namespace_new_namespace(const char*name) { return namespace_new(0x08, name); // public? } namespace_t* namespace_new_package(const char*name) { diff --git a/lib/as3/pool.h b/lib/as3/pool.h index 5a03a67..09e7377 100644 --- a/lib/as3/pool.h +++ b/lib/as3/pool.h @@ -178,6 +178,7 @@ int pool_register_multiname2(pool_t*pool, char*name); /* creation */ namespace_t* namespace_new(U8 access, const char*name); +namespace_t* namespace_new_namespace(const char*name); namespace_t* namespace_new_package(const char*name); namespace_t* namespace_new_packageinternal(const char*name); namespace_t* namespace_new_protected(const char*name); diff --git a/lib/as3/tokenizer.h b/lib/as3/tokenizer.h index 2d00ae4..914ba0c 100644 --- a/lib/as3/tokenizer.h +++ b/lib/as3/tokenizer.h @@ -35,6 +35,8 @@ DECLARE_LIST(param); DECLARE(params); DECLARE(typedcode); DECLARE(modifiers); +DECLARE(namespace_decl); +DECLARE_LIST(namespace_decl); DECLARE_LIST(typedcode); struct _param { @@ -56,6 +58,10 @@ struct _modifiers { int flags; char*ns; }; +struct _namespace_decl { + const char*name; + const char*url; +}; /* small helper structs: */ typedef struct _codeandnumber { @@ -89,6 +95,7 @@ void as3_buffer_input(void*buffer, int len); void as3_file_input(FILE*fi); void tokenizer_register_namespace(const char*id); +void tokenizer_unregister_namespace(const char*id); #define T_EOF 0 diff --git a/lib/as3/tokenizer.lex b/lib/as3/tokenizer.lex index e103b25..9ac9607 100644 --- a/lib/as3/tokenizer.lex +++ b/lib/as3/tokenizer.lex @@ -528,6 +528,10 @@ void tokenizer_register_namespace(const char*id) { trie_put(&namespaces, id); } +void tokenizer_unregister_namespace(const char*id) +{ + trie_remove(namespaces, id); +} static inline tokenizer_is_namespace(const char*id) { return trie_lookup(namespaces, id); diff --git a/lib/as3/tokenizer.yy.c b/lib/as3/tokenizer.yy.c index 3dbc43e..af61b5b 100644 --- a/lib/as3/tokenizer.yy.c +++ b/lib/as3/tokenizer.yy.c @@ -1574,8 +1574,15 @@ static int do_unescape(const char*s, const char*end, char*n) } break; } - default: - syntaxerror("unknown escape sequence: \"\\%c\"", *s); + default: { + if(o) { + o[len+0] = '\\'; + o[len+1] = *s; + } + s++; + len+=2; + break; + } } } if(o) o[len]=0; @@ -1836,6 +1843,10 @@ void tokenizer_register_namespace(const char*id) { trie_put(&namespaces, id); } +void tokenizer_unregister_namespace(const char*id) +{ + trie_remove(namespaces, id); +} static inline tokenizer_is_namespace(const char*id) { return trie_lookup(namespaces, id); @@ -1861,7 +1872,7 @@ static inline int handleIdentifier() -#line 1865 "tokenizer.yy.c" +#line 1876 "tokenizer.yy.c" #define INITIAL 0 #define REGEXPOK 1 @@ -2048,11 +2059,11 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 571 "tokenizer.lex" +#line 582 "tokenizer.lex" -#line 2056 "tokenizer.yy.c" +#line 2067 "tokenizer.yy.c" if ( !(yy_init) ) { @@ -2135,18 +2146,18 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 574 "tokenizer.lex" +#line 585 "tokenizer.lex" {l(); /* single line comment */} YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 575 "tokenizer.lex" +#line 586 "tokenizer.lex" {l(); /* multi line comment */} YY_BREAK case 3: YY_RULE_SETUP -#line 576 "tokenizer.lex" +#line 587 "tokenizer.lex" {syntaxerror("syntax error: unterminated comment", as3_text);} YY_BREAK case 4: @@ -2155,7 +2166,7 @@ case 4: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 578 "tokenizer.lex" +#line 589 "tokenizer.lex" {l();handleInclude(as3_text, as3_leng, 1);} YY_BREAK case 5: @@ -2164,25 +2175,25 @@ case 5: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 579 "tokenizer.lex" +#line 590 "tokenizer.lex" {l();handleInclude(as3_text, as3_leng, 0);} YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 580 "tokenizer.lex" +#line 591 "tokenizer.lex" {l(); BEGIN(INITIAL);handleString(as3_text, as3_leng);return T_STRING;} YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP -#line 581 "tokenizer.lex" +#line 592 "tokenizer.lex" {l(); BEGIN(INITIAL);handleCData(as3_text, as3_leng);return T_STRING;} YY_BREAK case 8: YY_RULE_SETUP -#line 584 "tokenizer.lex" +#line 595 "tokenizer.lex" {c(); BEGIN(INITIAL);return handleregexp();} YY_BREAK case 9: @@ -2191,7 +2202,7 @@ case 9: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 585 "tokenizer.lex" +#line 596 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlehex();} YY_BREAK case 10: @@ -2200,7 +2211,7 @@ case 10: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 586 "tokenizer.lex" +#line 597 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlehexfloat();} YY_BREAK case 11: @@ -2209,7 +2220,7 @@ case 11: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 587 "tokenizer.lex" +#line 598 "tokenizer.lex" {c(); BEGIN(INITIAL);return handleint();} YY_BREAK case 12: @@ -2218,29 +2229,29 @@ case 12: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 588 "tokenizer.lex" +#line 599 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlefloat();} YY_BREAK case 13: YY_RULE_SETUP -#line 591 "tokenizer.lex" +#line 602 "tokenizer.lex" {c(); BEGIN(REGEXPOK);return m(T_DICTSTART);} YY_BREAK case 14: YY_RULE_SETUP -#line 592 "tokenizer.lex" +#line 603 "tokenizer.lex" {c(); BEGIN(INITIAL); return m('{');} YY_BREAK case 15: YY_RULE_SETUP -#line 594 "tokenizer.lex" +#line 605 "tokenizer.lex" {/* utf 8 bom */} YY_BREAK case 16: /* rule 16 can match eol */ YY_RULE_SETUP -#line 595 "tokenizer.lex" +#line 606 "tokenizer.lex" {l();} YY_BREAK case 17: @@ -2249,7 +2260,7 @@ case 17: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 597 "tokenizer.lex" +#line 608 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlehex();} YY_BREAK case 18: @@ -2258,7 +2269,7 @@ case 18: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 598 "tokenizer.lex" +#line 609 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlehexfloat();} YY_BREAK case 19: @@ -2267,7 +2278,7 @@ case 19: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 599 "tokenizer.lex" +#line 610 "tokenizer.lex" {c(); BEGIN(INITIAL);return handleint();} YY_BREAK case 20: @@ -2276,12 +2287,12 @@ case 20: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 600 "tokenizer.lex" +#line 611 "tokenizer.lex" {c(); BEGIN(INITIAL);return handlefloat();} YY_BREAK case 21: YY_RULE_SETUP -#line 602 "tokenizer.lex" +#line 613 "tokenizer.lex" {/* for debugging: generates a tokenizer-level error */ syntaxerror("3rr0r");} YY_BREAK @@ -2291,7 +2302,7 @@ case 22: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 605 "tokenizer.lex" +#line 616 "tokenizer.lex" {l();BEGIN(INITIAL);handleLabel(as3_text, as3_leng-3);return T_FOR;} YY_BREAK case 23: @@ -2300,7 +2311,7 @@ case 23: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 606 "tokenizer.lex" +#line 617 "tokenizer.lex" {l();BEGIN(INITIAL);handleLabel(as3_text, as3_leng-2);return T_DO;} YY_BREAK case 24: @@ -2309,7 +2320,7 @@ case 24: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 607 "tokenizer.lex" +#line 618 "tokenizer.lex" {l();BEGIN(INITIAL);handleLabel(as3_text, as3_leng-5);return T_WHILE;} YY_BREAK case 25: @@ -2318,432 +2329,432 @@ case 25: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up as3_text again */ YY_RULE_SETUP -#line 608 "tokenizer.lex" +#line 619 "tokenizer.lex" {l();BEGIN(INITIAL);handleLabel(as3_text, as3_leng-6);return T_SWITCH;} YY_BREAK case 26: YY_RULE_SETUP -#line 609 "tokenizer.lex" +#line 620 "tokenizer.lex" {c();BEGIN(INITIAL);a3_lval.id="";return T_FOR;} YY_BREAK case 27: YY_RULE_SETUP -#line 610 "tokenizer.lex" +#line 621 "tokenizer.lex" {c();BEGIN(INITIAL);a3_lval.id="";return T_DO;} YY_BREAK case 28: YY_RULE_SETUP -#line 611 "tokenizer.lex" +#line 622 "tokenizer.lex" {c();BEGIN(INITIAL);a3_lval.id="";return T_WHILE;} YY_BREAK case 29: YY_RULE_SETUP -#line 612 "tokenizer.lex" +#line 623 "tokenizer.lex" {c();BEGIN(INITIAL);a3_lval.id="";return T_SWITCH;} YY_BREAK case 30: YY_RULE_SETUP -#line 614 "tokenizer.lex" +#line 625 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_ANDAND);} YY_BREAK case 31: YY_RULE_SETUP -#line 615 "tokenizer.lex" +#line 626 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_OROR);} YY_BREAK case 32: YY_RULE_SETUP -#line 616 "tokenizer.lex" +#line 627 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_NE);} YY_BREAK case 33: YY_RULE_SETUP -#line 617 "tokenizer.lex" +#line 628 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_NEE);} YY_BREAK case 34: YY_RULE_SETUP -#line 618 "tokenizer.lex" +#line 629 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_EQEQEQ);} YY_BREAK case 35: YY_RULE_SETUP -#line 619 "tokenizer.lex" +#line 630 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_EQEQ);} YY_BREAK case 36: YY_RULE_SETUP -#line 620 "tokenizer.lex" +#line 631 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_GE);} YY_BREAK case 37: YY_RULE_SETUP -#line 621 "tokenizer.lex" +#line 632 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_LE);} YY_BREAK case 38: YY_RULE_SETUP -#line 622 "tokenizer.lex" +#line 633 "tokenizer.lex" {c();BEGIN(INITIAL);return m(T_MINUSMINUS);} YY_BREAK case 39: YY_RULE_SETUP -#line 623 "tokenizer.lex" +#line 634 "tokenizer.lex" {c();BEGIN(INITIAL);return m(T_PLUSPLUS);} YY_BREAK case 40: YY_RULE_SETUP -#line 624 "tokenizer.lex" +#line 635 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_PLUSBY);} YY_BREAK case 41: YY_RULE_SETUP -#line 625 "tokenizer.lex" +#line 636 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_XORBY);} YY_BREAK case 42: YY_RULE_SETUP -#line 626 "tokenizer.lex" +#line 637 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_MINUSBY);} YY_BREAK case 43: YY_RULE_SETUP -#line 627 "tokenizer.lex" +#line 638 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_DIVBY);} YY_BREAK case 44: YY_RULE_SETUP -#line 628 "tokenizer.lex" +#line 639 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_MODBY);} YY_BREAK case 45: YY_RULE_SETUP -#line 629 "tokenizer.lex" +#line 640 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_MULBY);} YY_BREAK case 46: YY_RULE_SETUP -#line 630 "tokenizer.lex" +#line 641 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_ORBY);} YY_BREAK case 47: YY_RULE_SETUP -#line 631 "tokenizer.lex" +#line 642 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_SHRBY);} YY_BREAK case 48: YY_RULE_SETUP -#line 632 "tokenizer.lex" +#line 643 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_SHLBY);} YY_BREAK case 49: YY_RULE_SETUP -#line 633 "tokenizer.lex" +#line 644 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_USHRBY);} YY_BREAK case 50: YY_RULE_SETUP -#line 634 "tokenizer.lex" +#line 645 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_SHL);} YY_BREAK case 51: YY_RULE_SETUP -#line 635 "tokenizer.lex" +#line 646 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_USHR);} YY_BREAK case 52: YY_RULE_SETUP -#line 636 "tokenizer.lex" +#line 647 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_SHR);} YY_BREAK case 53: YY_RULE_SETUP -#line 637 "tokenizer.lex" +#line 648 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_DOTDOTDOT);} YY_BREAK case 54: YY_RULE_SETUP -#line 638 "tokenizer.lex" +#line 649 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_DOTDOT);} YY_BREAK case 55: YY_RULE_SETUP -#line 639 "tokenizer.lex" +#line 650 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m('.');} YY_BREAK case 56: YY_RULE_SETUP -#line 640 "tokenizer.lex" +#line 651 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(T_COLONCOLON);} YY_BREAK case 57: YY_RULE_SETUP -#line 641 "tokenizer.lex" +#line 652 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(':');} YY_BREAK case 58: YY_RULE_SETUP -#line 642 "tokenizer.lex" +#line 653 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_INSTANCEOF);} YY_BREAK case 59: YY_RULE_SETUP -#line 643 "tokenizer.lex" +#line 654 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_IMPLEMENTS);} YY_BREAK case 60: YY_RULE_SETUP -#line 644 "tokenizer.lex" +#line 655 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_INTERFACE);} YY_BREAK case 61: YY_RULE_SETUP -#line 645 "tokenizer.lex" +#line 656 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_NAMESPACE);} YY_BREAK case 62: YY_RULE_SETUP -#line 646 "tokenizer.lex" +#line 657 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_PROTECTED);} YY_BREAK case 63: YY_RULE_SETUP -#line 647 "tokenizer.lex" +#line 658 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_UNDEFINED);} YY_BREAK case 64: YY_RULE_SETUP -#line 648 "tokenizer.lex" +#line 659 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_CONTINUE);} YY_BREAK case 65: YY_RULE_SETUP -#line 649 "tokenizer.lex" +#line 660 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_OVERRIDE);} YY_BREAK case 66: YY_RULE_SETUP -#line 650 "tokenizer.lex" +#line 661 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_INTERNAL);} YY_BREAK case 67: YY_RULE_SETUP -#line 651 "tokenizer.lex" +#line 662 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_FUNCTION);} YY_BREAK case 68: YY_RULE_SETUP -#line 652 "tokenizer.lex" +#line 663 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_FINALLY);} YY_BREAK case 69: YY_RULE_SETUP -#line 653 "tokenizer.lex" +#line 664 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_DEFAULT);} YY_BREAK case 70: YY_RULE_SETUP -#line 654 "tokenizer.lex" +#line 665 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_PACKAGE);} YY_BREAK case 71: YY_RULE_SETUP -#line 655 "tokenizer.lex" +#line 666 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_PRIVATE);} YY_BREAK case 72: YY_RULE_SETUP -#line 656 "tokenizer.lex" +#line 667 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_DYNAMIC);} YY_BREAK case 73: YY_RULE_SETUP -#line 657 "tokenizer.lex" +#line 668 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_EXTENDS);} YY_BREAK case 74: YY_RULE_SETUP -#line 658 "tokenizer.lex" +#line 669 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_DELETE);} YY_BREAK case 75: YY_RULE_SETUP -#line 659 "tokenizer.lex" +#line 670 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_RETURN);} YY_BREAK case 76: YY_RULE_SETUP -#line 660 "tokenizer.lex" +#line 671 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_PUBLIC);} YY_BREAK case 77: YY_RULE_SETUP -#line 661 "tokenizer.lex" +#line 672 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_NATIVE);} YY_BREAK case 78: YY_RULE_SETUP -#line 662 "tokenizer.lex" +#line 673 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_STATIC);} YY_BREAK case 79: YY_RULE_SETUP -#line 663 "tokenizer.lex" +#line 674 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_IMPORT);} YY_BREAK case 80: YY_RULE_SETUP -#line 664 "tokenizer.lex" +#line 675 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_TYPEOF);} YY_BREAK case 81: YY_RULE_SETUP -#line 665 "tokenizer.lex" +#line 676 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_THROW);} YY_BREAK case 82: YY_RULE_SETUP -#line 666 "tokenizer.lex" +#line 677 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_CLASS);} YY_BREAK case 83: YY_RULE_SETUP -#line 667 "tokenizer.lex" +#line 678 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_CONST);} YY_BREAK case 84: YY_RULE_SETUP -#line 668 "tokenizer.lex" +#line 679 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_CATCH);} YY_BREAK case 85: YY_RULE_SETUP -#line 669 "tokenizer.lex" +#line 680 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_FINAL);} YY_BREAK case 86: YY_RULE_SETUP -#line 670 "tokenizer.lex" +#line 681 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_FALSE);} YY_BREAK case 87: YY_RULE_SETUP -#line 671 "tokenizer.lex" +#line 682 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_BREAK);} YY_BREAK case 88: YY_RULE_SETUP -#line 672 "tokenizer.lex" +#line 683 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_SUPER);} YY_BREAK case 89: YY_RULE_SETUP -#line 673 "tokenizer.lex" +#line 684 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_EACH);} YY_BREAK case 90: YY_RULE_SETUP -#line 674 "tokenizer.lex" +#line 685 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_VOID);} YY_BREAK case 91: YY_RULE_SETUP -#line 675 "tokenizer.lex" +#line 686 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_TRUE);} YY_BREAK case 92: YY_RULE_SETUP -#line 676 "tokenizer.lex" +#line 687 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_NULL);} YY_BREAK case 93: YY_RULE_SETUP -#line 677 "tokenizer.lex" +#line 688 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_ELSE);} YY_BREAK case 94: YY_RULE_SETUP -#line 678 "tokenizer.lex" +#line 689 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_CASE);} YY_BREAK case 95: YY_RULE_SETUP -#line 679 "tokenizer.lex" +#line 690 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_WITH);} YY_BREAK case 96: YY_RULE_SETUP -#line 680 "tokenizer.lex" +#line 691 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_USE);} YY_BREAK case 97: YY_RULE_SETUP -#line 681 "tokenizer.lex" +#line 692 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_NEW);} YY_BREAK case 98: YY_RULE_SETUP -#line 682 "tokenizer.lex" +#line 693 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_GET);} YY_BREAK case 99: YY_RULE_SETUP -#line 683 "tokenizer.lex" +#line 694 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_SET);} YY_BREAK case 100: YY_RULE_SETUP -#line 684 "tokenizer.lex" +#line 695 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_VAR);} YY_BREAK case 101: YY_RULE_SETUP -#line 685 "tokenizer.lex" +#line 696 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_TRY);} YY_BREAK case 102: YY_RULE_SETUP -#line 686 "tokenizer.lex" +#line 697 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_IS) ;} YY_BREAK case 103: YY_RULE_SETUP -#line 687 "tokenizer.lex" +#line 698 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_IN) ;} YY_BREAK case 104: YY_RULE_SETUP -#line 688 "tokenizer.lex" +#line 699 "tokenizer.lex" {c();BEGIN(INITIAL);return m(KW_IF) ;} YY_BREAK case 105: YY_RULE_SETUP -#line 689 "tokenizer.lex" +#line 700 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(KW_AS);} YY_BREAK case 106: YY_RULE_SETUP -#line 690 "tokenizer.lex" +#line 701 "tokenizer.lex" {c();BEGIN(INITIAL);return handleIdentifier();} YY_BREAK case 107: YY_RULE_SETUP -#line 692 "tokenizer.lex" +#line 703 "tokenizer.lex" {c();BEGIN(INITIAL);return m(as3_text[0]);} YY_BREAK case 108: YY_RULE_SETUP -#line 693 "tokenizer.lex" +#line 704 "tokenizer.lex" {c();BEGIN(REGEXPOK);return m(as3_text[0]);} YY_BREAK case 109: YY_RULE_SETUP -#line 694 "tokenizer.lex" +#line 705 "tokenizer.lex" {c();BEGIN(INITIAL);return m(as3_text[0]);} YY_BREAK case 110: YY_RULE_SETUP -#line 696 "tokenizer.lex" +#line 707 "tokenizer.lex" {/* ERROR */ char c1=as3_text[0]; char buf[128]; @@ -2768,7 +2779,7 @@ YY_RULE_SETUP case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(REGEXPOK): case YY_STATE_EOF(BEGINNING): -#line 716 "tokenizer.lex" +#line 727 "tokenizer.lex" {l(); void*b = leave_file(); if (!b) { @@ -2783,10 +2794,10 @@ case YY_STATE_EOF(BEGINNING): YY_BREAK case 111: YY_RULE_SETUP -#line 728 "tokenizer.lex" +#line 739 "tokenizer.lex" ECHO; YY_BREAK -#line 2790 "tokenizer.yy.c" +#line 2801 "tokenizer.yy.c" case YY_END_OF_BUFFER: { @@ -3796,7 +3807,7 @@ void as3_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 728 "tokenizer.lex" +#line 739 "tokenizer.lex" diff --git a/lib/q.c b/lib/q.c index 942cfbb..b1553b5 100644 --- a/lib/q.c +++ b/lib/q.c @@ -295,7 +295,7 @@ void trie_put(trie_t**t, unsigned const char*id) if(id[0]) { trie_put(&(*t)->row[id[0]], id+1); } else { - (*t)->rest = ""; + (*t)->rest = strdup(""); } } @@ -304,14 +304,28 @@ int trie_lookup(trie_t*t, unsigned const char*id) while(t) { if(t->rest && !strcmp(t->rest, id)) return 1; - t = t->row[id[0]]; if(!*id) return 0; - id++; + t = t->row[*id++]; } return 0; } +char trie_remove(trie_t*t, unsigned const char*id) +{ + while(t) { + if(t->rest && !strcmp(t->rest, id)) { + free(t->rest); + t->rest = 0; + return 1; + } + if(!*id) + return 0; + t = t->row[*id++]; + } +} + + // ------------------------------- crc32 -------------------------------------- static unsigned int*crc32 = 0; static void crc32_init(void) diff --git a/lib/q.h b/lib/q.h index 9e50000..db55cd6 100644 --- a/lib/q.h +++ b/lib/q.h @@ -212,6 +212,7 @@ void heap_dump(heap_t*h, FILE*fi); void** heap_flatten(heap_t*h); void trie_put(trie_t**t, unsigned const char*id); +char trie_remove(trie_t*t, unsigned const char*id); int trie_lookup(trie_t*t, unsigned const char*id); array_t* array_new(); -- 1.7.10.4