--- parser3/src/main/compile.tab.C 2005/11/03 10:17:22 1.105 +++ parser3/src/main/compile.tab.C 2007/10/17 13:34:59 1.114 @@ -1,7 +1,7 @@ -/* A Bison parser, made by GNU Bison 1.875. */ +/* A Bison parser, made by GNU Bison 1.875d. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -82,7 +82,9 @@ FEXISTS = 284, DEXISTS = 285, IS = 286, - NUNARY = 287 + LITERAL_TRUE = 287, + LITERAL_FALSE = 288, + NUNARY = 289 }; #endif #define EON 258 @@ -114,7 +116,9 @@ #define FEXISTS 284 #define DEXISTS 285 #define IS 286 -#define NUNARY 287 +#define LITERAL_TRUE 287 +#define LITERAL_FALSE 288 +#define NUNARY 289 @@ -125,10 +129,10 @@ /** @file Parser: compiler(lexical parser and grammar). - Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.tab.C,v 1.105 2005/11/03 10:17:22 paf Exp $ + $Id: compile.tab.C,v 1.114 2007/10/17 13:34:59 misha Exp $ */ /** @@ -171,6 +175,10 @@ static int real_yyerror(Parse_control* p static void yyprint(FILE* file, int type, YYSTYPE value); static int yylex(YYSTYPE* lvalp, void* pc); +static const VBool vfalse(false); +static const VBool vtrue(true); +static const VVoid vvoid; + // local convinient inplace typecast & var #undef PC #define PC (*(Parse_control *)pc) @@ -205,22 +213,29 @@ typedef int YYSTYPE; /* Line 214 of yacc.c. */ -#line 208 "compile.tab.C" +#line 217 "compile.tab.C" #if ! defined (yyoverflow) || YYERROR_VERBOSE +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + /* The parser invokes alloca or malloc; define the necessary symbols. */ -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif # else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif @@ -233,20 +248,20 @@ typedef int YYSTYPE; # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short yyss; + short int yyss; YYSTYPE yyvs; }; @@ -256,13 +271,13 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if 1 < __GNUC__ +# if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else @@ -298,26 +313,26 @@ union yyalloc #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else - typedef short yysigned_char; + typedef short int yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 51 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 479 +#define YYLAST 500 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 60 +#define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 87 +#define YYNNTS 88 /* YYNRULES -- Number of rules. */ -#define YYNRULES 168 +#define YYNRULES 171 /* YYNRULES -- Number of states. */ -#define YYNSTATES 259 +#define YYNSTATES 262 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 287 +#define YYMAXUTOK 289 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -326,18 +341,18 @@ union yyalloc static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 46, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 44, 58, 2, 50, 41, 35, 59, - 54, 55, 38, 36, 2, 37, 53, 39, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 57, 49, - 32, 2, 33, 2, 45, 2, 2, 2, 2, 2, + 2, 2, 2, 46, 60, 2, 52, 43, 37, 61, + 56, 57, 40, 38, 2, 39, 55, 41, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 59, 51, + 34, 2, 35, 2, 47, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 47, 40, 48, 56, 2, 2, 2, 2, 2, + 2, 49, 42, 50, 58, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 51, 34, 52, 43, 2, 2, 2, + 2, 2, 2, 53, 36, 54, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -353,105 +368,108 @@ static const unsigned char yytranslate[] 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 42 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 44 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short yyprhs[] = +static const unsigned short int yyprhs[] = { 0, 0, 3, 5, 7, 9, 12, 14, 16, 18, - 23, 25, 27, 29, 32, 35, 37, 39, 40, 49, - 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, - 75, 77, 80, 82, 84, 86, 88, 90, 92, 95, - 98, 100, 104, 106, 108, 110, 113, 115, 118, 122, - 124, 126, 128, 130, 133, 136, 138, 140, 142, 143, - 144, 150, 154, 158, 160, 162, 164, 166, 168, 170, - 173, 175, 176, 177, 184, 186, 188, 191, 193, 195, - 197, 198, 199, 205, 209, 213, 215, 219, 221, 225, - 227, 231, 233, 235, 237, 239, 241, 243, 245, 248, - 250, 253, 256, 258, 260, 263, 265, 267, 269, 271, - 274, 277, 278, 279, 285, 287, 289, 292, 295, 297, - 299, 302, 305, 307, 309, 311, 313, 317, 321, 325, - 328, 331, 334, 337, 340, 343, 346, 349, 353, 357, - 361, 365, 369, 373, 377, 381, 385, 389, 393, 397, - 401, 405, 409, 413, 417, 421, 425, 429, 433, 437, - 441, 445, 449, 453, 457, 459, 461, 463, 464 + 23, 25, 27, 29, 32, 35, 37, 39, 47, 49, + 51, 55, 57, 59, 61, 65, 67, 69, 71, 73, + 75, 78, 80, 82, 84, 86, 88, 90, 93, 96, + 98, 102, 104, 106, 108, 111, 113, 116, 120, 122, + 124, 126, 128, 131, 134, 136, 138, 140, 141, 142, + 148, 152, 156, 158, 160, 162, 164, 166, 168, 171, + 173, 174, 175, 182, 184, 186, 189, 191, 193, 195, + 196, 197, 203, 207, 211, 213, 217, 219, 223, 225, + 229, 231, 233, 235, 237, 239, 241, 243, 246, 248, + 251, 254, 256, 258, 261, 263, 265, 267, 269, 272, + 275, 276, 277, 283, 285, 287, 290, 293, 295, 297, + 300, 303, 305, 307, 309, 311, 313, 315, 319, 323, + 327, 330, 333, 336, 339, 342, 345, 348, 351, 355, + 359, 363, 367, 371, 375, 379, 383, 387, 391, 395, + 399, 403, 407, 411, 415, 419, 423, 427, 431, 435, + 439, 443, 447, 451, 455, 459, 461, 463, 465, 466, + 468, 470 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short yyrhs[] = +static const short int yyrhs[] = { - 61, 0, -1, 63, -1, 62, -1, 64, -1, 62, - 64, -1, 77, -1, 65, -1, 70, -1, 45, 4, - 46, 66, -1, 146, -1, 67, -1, 68, -1, 67, - 68, -1, 69, 46, -1, 146, -1, 4, -1, -1, - 45, 4, 73, 72, 76, 46, 71, 77, -1, 146, - -1, 73, -1, 47, 74, 48, -1, 146, -1, 75, - -1, 4, -1, 75, 49, 4, -1, 146, -1, 4, - -1, 146, -1, 78, -1, 79, -1, 78, 79, -1, - 144, -1, 80, -1, 81, -1, 89, -1, 104, -1, - 82, -1, 50, 83, -1, 85, 3, -1, 84, -1, - 51, 85, 52, -1, 86, -1, 87, -1, 88, -1, - 137, 88, -1, 127, -1, 124, 127, -1, 50, 90, - 94, -1, 91, -1, 92, -1, 93, -1, 123, -1, - 53, 123, -1, 137, 123, -1, 95, -1, 98, -1, - 99, -1, -1, -1, 47, 96, 100, 97, 48, -1, - 54, 140, 55, -1, 51, 77, 52, -1, 145, -1, - 4, -1, 101, -1, 102, -1, 103, -1, 80, -1, - 79, 78, -1, 105, -1, -1, -1, 56, 106, 108, - 107, 109, 3, -1, 85, -1, 110, -1, 109, 110, - -1, 111, -1, 114, -1, 115, -1, -1, -1, 47, - 112, 116, 113, 48, -1, 54, 117, 55, -1, 51, - 118, 52, -1, 119, -1, 116, 49, 119, -1, 120, - -1, 117, 49, 120, -1, 121, -1, 118, 49, 121, - -1, 122, -1, 140, -1, 77, -1, 145, -1, 4, - -1, 101, -1, 128, -1, 124, 128, -1, 125, -1, - 124, 125, -1, 126, 53, -1, 128, -1, 128, -1, - 4, 5, -1, 4, -1, 129, -1, 130, -1, 131, - -1, 50, 134, -1, 4, 135, -1, -1, -1, 47, - 132, 78, 133, 48, -1, 4, -1, 136, -1, 135, - 136, -1, 50, 134, -1, 138, -1, 139, -1, 4, - 57, -1, 138, 57, -1, 141, -1, 142, -1, 82, - -1, 105, -1, 58, 143, 58, -1, 59, 143, 59, - -1, 54, 141, 55, -1, 37, 141, -1, 36, 141, - -1, 43, 141, -1, 44, 141, -1, 27, 141, -1, - 28, 141, -1, 29, 141, -1, 30, 141, -1, 141, - 37, 141, -1, 141, 36, 141, -1, 141, 38, 141, - -1, 141, 39, 141, -1, 141, 41, 141, -1, 141, - 40, 141, -1, 141, 19, 141, -1, 141, 20, 141, - -1, 141, 35, 141, -1, 141, 34, 141, -1, 141, - 14, 141, -1, 141, 11, 141, -1, 141, 12, 141, - -1, 141, 13, 141, -1, 141, 32, 141, -1, 141, - 33, 141, -1, 141, 15, 141, -1, 141, 16, 141, - -1, 141, 17, 141, -1, 141, 18, 141, -1, 141, - 21, 141, -1, 141, 22, 141, -1, 141, 23, 141, - -1, 141, 24, 141, -1, 141, 25, 141, -1, 141, - 26, 141, -1, 141, 31, 141, -1, 4, -1, 77, - -1, 4, -1, -1, -1 + 63, 0, -1, 65, -1, 64, -1, 66, -1, 64, + 66, -1, 78, -1, 67, -1, 72, -1, 47, 4, + 48, 68, -1, 149, -1, 69, -1, 70, -1, 69, + 70, -1, 71, 48, -1, 149, -1, 4, -1, 47, + 4, 74, 73, 77, 48, 78, -1, 149, -1, 74, + -1, 49, 75, 50, -1, 149, -1, 76, -1, 4, + -1, 76, 51, 4, -1, 149, -1, 4, -1, 149, + -1, 79, -1, 80, -1, 79, 80, -1, 145, -1, + 81, -1, 82, -1, 90, -1, 105, -1, 83, -1, + 52, 84, -1, 86, 3, -1, 85, -1, 53, 86, + 54, -1, 87, -1, 88, -1, 89, -1, 138, 89, + -1, 128, -1, 125, 128, -1, 52, 91, 95, -1, + 92, -1, 93, -1, 94, -1, 124, -1, 55, 124, + -1, 138, 124, -1, 96, -1, 99, -1, 100, -1, + -1, -1, 49, 97, 101, 98, 50, -1, 56, 141, + 57, -1, 53, 78, 54, -1, 146, -1, 4, -1, + 102, -1, 103, -1, 104, -1, 81, -1, 80, 79, + -1, 106, -1, -1, -1, 58, 107, 109, 108, 110, + 3, -1, 86, -1, 111, -1, 110, 111, -1, 112, + -1, 115, -1, 116, -1, -1, -1, 49, 113, 117, + 114, 50, -1, 56, 118, 57, -1, 53, 119, 54, + -1, 120, -1, 117, 51, 120, -1, 121, -1, 118, + 51, 121, -1, 122, -1, 119, 51, 122, -1, 123, + -1, 141, -1, 78, -1, 146, -1, 4, -1, 102, + -1, 129, -1, 125, 129, -1, 126, -1, 125, 126, + -1, 127, 55, -1, 129, -1, 129, -1, 4, 5, + -1, 4, -1, 130, -1, 131, -1, 132, -1, 52, + 135, -1, 4, 136, -1, -1, -1, 49, 133, 79, + 134, 50, -1, 4, -1, 137, -1, 136, 137, -1, + 52, 135, -1, 139, -1, 140, -1, 4, 59, -1, + 139, 59, -1, 142, -1, 143, -1, 147, -1, 148, + -1, 83, -1, 106, -1, 60, 144, 60, -1, 61, + 144, 61, -1, 56, 142, 57, -1, 39, 142, -1, + 38, 142, -1, 45, 142, -1, 46, 142, -1, 27, + 142, -1, 28, 142, -1, 29, 142, -1, 30, 142, + -1, 142, 39, 142, -1, 142, 38, 142, -1, 142, + 40, 142, -1, 142, 41, 142, -1, 142, 43, 142, + -1, 142, 42, 142, -1, 142, 19, 142, -1, 142, + 20, 142, -1, 142, 37, 142, -1, 142, 36, 142, + -1, 142, 14, 142, -1, 142, 11, 142, -1, 142, + 12, 142, -1, 142, 13, 142, -1, 142, 34, 142, + -1, 142, 35, 142, -1, 142, 15, 142, -1, 142, + 16, 142, -1, 142, 17, 142, -1, 142, 18, 142, + -1, 142, 21, 142, -1, 142, 22, 142, -1, 142, + 23, 142, -1, 142, 24, 142, -1, 142, 25, 142, + -1, 142, 26, 142, -1, 142, 31, 142, -1, 4, + -1, 78, -1, 4, -1, -1, 32, -1, 33, -1, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = +static const unsigned short int yyrline[] = { - 0, 121, 121, 128, 130, 130, 131, 133, 133, 135, - 207, 207, 208, 208, 209, 210, 210, 212, 212, 252, - 252, 253, 254, 254, 255, 255, 257, 257, 261, 261, - 263, 263, 264, 264, 265, 265, 265, 269, 276, 277, - 277, 278, 280, 281, 282, 304, 305, 305, 309, 314, - 315, 316, 317, 334, 339, 342, 343, 344, 346, 349, - 346, 357, 365, 372, 373, 374, 376, 382, 383, 383, - 387, 393, 396, 393, 412, 414, 414, 416, 417, 418, - 420, 423, 420, 426, 427, 429, 430, 433, 434, 437, - 438, 440, 444, 458, 463, 464, 465, 470, 470, 472, - 472, 473, 474, 482, 487, 490, 491, 492, 493, 495, - 499, 508, 511, 508, 519, 524, 524, 525, 531, 532, - 534, 546, 558, 560, 561, 562, 563, 564, 565, 567, - 568, 569, 570, 571, 572, 573, 574, 576, 577, 578, - 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, - 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, - 599, 600, 601, 602, 605, 610, 619, 624, 625 + 0, 128, 128, 135, 137, 137, 138, 140, 140, 142, + 214, 214, 215, 215, 216, 217, 217, 219, 257, 257, + 258, 259, 259, 260, 260, 262, 262, 266, 266, 268, + 268, 269, 269, 270, 270, 270, 274, 281, 282, 282, + 283, 285, 286, 287, 309, 310, 310, 314, 319, 320, + 321, 322, 339, 344, 347, 348, 349, 351, 354, 351, + 362, 370, 377, 378, 379, 381, 387, 388, 388, 392, + 398, 401, 398, 417, 419, 419, 421, 422, 423, 425, + 428, 425, 431, 432, 434, 435, 438, 439, 442, 443, + 445, 449, 464, 469, 470, 471, 476, 476, 478, 478, + 479, 480, 488, 493, 496, 497, 498, 499, 501, 505, + 514, 517, 514, 525, 530, 530, 531, 537, 538, 540, + 552, 564, 566, 567, 568, 569, 570, 571, 572, 573, + 575, 576, 577, 578, 579, 580, 581, 582, 584, 585, + 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, + 606, 607, 608, 609, 610, 613, 618, 627, 632, 633, + 634, 636 }; #endif @@ -460,100 +478,103 @@ static const unsigned short yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "EON", "STRING", "BOGUS", - "BAD_STRING_COMPARISON_OPERATOR", "BAD_HEX_LITERAL", - "BAD_METHOD_DECL_START", "BAD_METHOD_PARAMETER_NAME_CHARACTER", - "BAD_NONWHITESPACE_CHARACTER_IN_EXPLICIT_RESULT_MODE", "\"&&\"", - "\"||\"", "\"!||\"", "\"!|\"", "\"<=\"", "\">=\"", "\"==\"", "\"!=\"", - "\"<<\"", "\">>\"", "\"lt\"", "\"gt\"", "\"le\"", "\"ge\"", "\"eq\"", - "\"ne\"", "\"def\"", "\"in\"", "\"-f\"", "\"-d\"", "\"is\"", "'<'", - "'>'", "'|'", "'&'", "'+'", "'-'", "'*'", "'/'", "'\\\\'", "'%'", - "NUNARY", "'~'", "'!'", "'@'", "'\\n'", "'['", "']'", "';'", "'$'", - "'{'", "'}'", "'.'", "'('", "')'", "'^'", "':'", "'\"'", "'''", - "$accept", "all", "methods", "one_big_piece", "method", - "control_method", "maybe_control_strings", "control_strings", - "control_string", "maybe_string", "code_method", "@1", - "maybe_bracketed_strings", "bracketed_maybe_strings", "maybe_strings", - "strings", "maybe_comment", "maybe_codes", "codes", "code", "action", - "get", "get_value", "get_name_value", "name_in_curly_rdive", - "name_without_curly_rdive", "name_without_curly_rdive_read", - "name_without_curly_rdive_class", "name_without_curly_rdive_code", - "put", "name_expr_wdive", "name_expr_wdive_root", - "name_expr_wdive_write", "name_expr_wdive_class", "construct", - "construct_square", "@2", "@3", "construct_round", "construct_curly", - "any_constructor_code_value", "constructor_code_value", - "constructor_code", "codes__excluding_sole_str_literal", "call", - "call_value", "@4", "@5", "call_name", "store_params", "store_param", - "store_square_param", "@6", "@7", "store_round_param", - "store_curly_param", "store_code_param_parts", "store_expr_param_parts", - "store_curly_param_parts", "store_code_param_part", - "store_expr_param_part", "store_curly_param_part", "code_param_value", - "name_expr_dive_code", "name_path", "name_step", "name_advance1", - "name_advance2", "name_expr_value", "name_expr_subvar_value", - "name_expr_with_subvar_value", "name_square_code_value", "@8", "@9", - "subvar_ref_name_rdive", "subvar_get_writes", "subvar__get_write", - "class_prefix", "class_static_prefix", "class_constructor_prefix", - "expr_value", "expr", "double_or_STRING", "string_inside_quotes_value", - "write_string", "void_value", "empty", 0 + "$end", "error", "$undefined", "EON", "STRING", "BOGUS", + "BAD_STRING_COMPARISON_OPERATOR", "BAD_HEX_LITERAL", + "BAD_METHOD_DECL_START", "BAD_METHOD_PARAMETER_NAME_CHARACTER", + "BAD_NONWHITESPACE_CHARACTER_IN_EXPLICIT_RESULT_MODE", "\"&&\"", + "\"||\"", "\"!||\"", "\"!|\"", "\"<=\"", "\">=\"", "\"==\"", "\"!=\"", + "\"<<\"", "\">>\"", "\"lt\"", "\"gt\"", "\"le\"", "\"ge\"", "\"eq\"", + "\"ne\"", "\"def\"", "\"in\"", "\"-f\"", "\"-d\"", "\"is\"", "\"true\"", + "\"false\"", "'<'", "'>'", "'|'", "'&'", "'+'", "'-'", "'*'", "'/'", + "'\\\\'", "'%'", "NUNARY", "'~'", "'!'", "'@'", "'\\n'", "'['", "']'", + "';'", "'$'", "'{'", "'}'", "'.'", "'('", "')'", "'^'", "':'", "'\"'", + "'''", "$accept", "all", "methods", "one_big_piece", "method", + "control_method", "maybe_control_strings", "control_strings", + "control_string", "maybe_string", "code_method", + "maybe_bracketed_strings", "bracketed_maybe_strings", "maybe_strings", + "strings", "maybe_comment", "maybe_codes", "codes", "code", "action", + "get", "get_value", "get_name_value", "name_in_curly_rdive", + "name_without_curly_rdive", "name_without_curly_rdive_read", + "name_without_curly_rdive_class", "name_without_curly_rdive_code", "put", + "name_expr_wdive", "name_expr_wdive_root", "name_expr_wdive_write", + "name_expr_wdive_class", "construct", "construct_square", "@1", "@2", + "construct_round", "construct_curly", "any_constructor_code_value", + "constructor_code_value", "constructor_code", + "codes__excluding_sole_str_literal", "call", "call_value", "@3", "@4", + "call_name", "store_params", "store_param", "store_square_param", "@5", + "@6", "store_round_param", "store_curly_param", "store_code_param_parts", + "store_expr_param_parts", "store_curly_param_parts", + "store_code_param_part", "store_expr_param_part", + "store_curly_param_part", "code_param_value", "name_expr_dive_code", + "name_path", "name_step", "name_advance1", "name_advance2", + "name_expr_value", "name_expr_subvar_value", + "name_expr_with_subvar_value", "name_square_code_value", "@7", "@8", + "subvar_ref_name_rdive", "subvar_get_writes", "subvar__get_write", + "class_prefix", "class_static_prefix", "class_constructor_prefix", + "expr_value", "expr", "double_or_STRING", "string_inside_quotes_value", + "write_string", "void_value", "true_value", "false_value", "empty", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short yytoknum[] = +static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 60, 62, 124, 38, 43, 45, 42, 47, - 92, 37, 287, 126, 33, 64, 10, 91, 93, 59, - 36, 123, 125, 46, 40, 41, 94, 58, 34, 39 + 285, 286, 287, 288, 60, 62, 124, 38, 43, 45, + 42, 47, 92, 37, 289, 126, 33, 64, 10, 91, + 93, 59, 36, 123, 125, 46, 40, 41, 94, 58, + 34, 39 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 60, 61, 61, 62, 62, 63, 64, 64, 65, - 66, 66, 67, 67, 68, 69, 69, 71, 70, 72, - 72, 73, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 81, 82, 83, - 83, 84, 85, 85, 86, 87, 88, 88, 89, 90, - 90, 90, 91, 92, 93, 94, 94, 94, 96, 97, - 95, 98, 99, 100, 100, 100, 101, 102, 103, 103, - 104, 106, 107, 105, 108, 109, 109, 110, 110, 110, - 112, 113, 111, 114, 115, 116, 116, 117, 117, 118, - 118, 119, 120, 121, 122, 122, 122, 123, 123, 124, - 124, 125, 126, 127, 127, 128, 128, 128, 128, 129, - 130, 132, 133, 131, 134, 135, 135, 136, 137, 137, - 138, 139, 140, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 142, 143, 144, 145, 146 + 0, 62, 63, 63, 64, 64, 65, 66, 66, 67, + 68, 68, 69, 69, 70, 71, 71, 72, 73, 73, + 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, + 79, 80, 80, 81, 81, 81, 82, 83, 84, 84, + 85, 86, 86, 87, 88, 89, 89, 90, 91, 91, + 91, 92, 93, 94, 95, 95, 95, 97, 98, 96, + 99, 100, 101, 101, 101, 102, 103, 104, 104, 105, + 107, 108, 106, 109, 110, 110, 111, 111, 111, 113, + 114, 112, 115, 116, 117, 117, 118, 118, 119, 119, + 120, 121, 122, 123, 123, 123, 124, 124, 125, 125, + 126, 127, 128, 128, 129, 129, 129, 129, 130, 131, + 133, 134, 132, 135, 136, 136, 137, 138, 138, 139, + 140, 141, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 143, 144, 145, 146, 147, + 148, 149 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 1, 1, 1, 2, 1, 1, 1, 4, - 1, 1, 1, 2, 2, 1, 1, 0, 8, 1, - 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, - 1, 3, 1, 1, 1, 2, 1, 2, 3, 1, - 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, - 5, 3, 3, 1, 1, 1, 1, 1, 1, 2, - 1, 0, 0, 6, 1, 1, 2, 1, 1, 1, - 0, 0, 5, 3, 3, 1, 3, 1, 3, 1, - 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 0, 0, 5, 1, 1, 2, 2, 1, 1, - 2, 2, 1, 1, 1, 1, 3, 3, 3, 2, - 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, + 1, 1, 1, 2, 2, 1, 1, 7, 1, 1, + 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, + 3, 1, 1, 1, 2, 1, 2, 3, 1, 1, + 1, 1, 2, 2, 1, 1, 1, 0, 0, 5, + 3, 3, 1, 1, 1, 1, 1, 1, 2, 1, + 0, 0, 6, 1, 1, 2, 1, 1, 1, 0, + 0, 5, 3, 3, 1, 3, 1, 3, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, + 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, + 0, 0, 5, 1, 1, 2, 2, 1, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 1, 1, 0, 0 + 3, 3, 3, 3, 3, 1, 1, 1, 0, 1, + 1, 0 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -561,234 +582,243 @@ static const unsigned char yyr2[] = means the default is an error. */ static const unsigned char yydefact[] = { - 168, 166, 0, 0, 71, 0, 3, 2, 4, 7, - 8, 6, 29, 30, 33, 34, 37, 35, 36, 70, - 32, 28, 0, 105, 111, 0, 0, 0, 38, 40, - 0, 42, 43, 44, 0, 49, 50, 51, 52, 0, - 99, 0, 46, 97, 106, 107, 108, 0, 118, 119, - 0, 1, 5, 31, 168, 168, 168, 104, 0, 120, - 110, 115, 0, 114, 109, 0, 0, 103, 0, 105, - 53, 0, 97, 39, 58, 168, 0, 48, 55, 56, - 57, 105, 100, 47, 98, 101, 45, 54, 121, 74, - 72, 16, 9, 11, 12, 0, 10, 24, 0, 23, - 22, 168, 20, 19, 117, 116, 112, 41, 98, 167, - 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 168, 168, 124, 125, 0, 122, 123, 0, - 13, 15, 14, 21, 0, 27, 0, 26, 0, 166, - 0, 33, 59, 65, 66, 67, 63, 62, 133, 134, - 135, 136, 130, 129, 131, 132, 0, 165, 0, 0, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 171, 167, 0, 0, 70, 0, 3, 2, 4, 7, + 8, 6, 28, 29, 32, 33, 36, 34, 35, 69, + 31, 27, 0, 104, 110, 0, 0, 0, 37, 39, + 0, 41, 42, 43, 0, 48, 49, 50, 51, 0, + 98, 0, 45, 96, 105, 106, 107, 0, 117, 118, + 0, 1, 5, 30, 171, 171, 171, 103, 0, 119, + 109, 114, 0, 113, 108, 0, 0, 102, 0, 104, + 52, 0, 96, 38, 57, 171, 0, 47, 54, 55, + 56, 104, 99, 46, 97, 100, 44, 53, 120, 73, + 71, 16, 9, 11, 12, 0, 10, 23, 0, 22, + 21, 171, 19, 18, 116, 115, 111, 40, 97, 168, + 0, 165, 0, 0, 0, 0, 169, 170, 0, 0, + 0, 0, 0, 0, 171, 171, 125, 126, 0, 121, + 122, 123, 124, 0, 13, 15, 14, 20, 0, 26, + 0, 25, 0, 167, 0, 32, 58, 64, 65, 66, + 62, 61, 134, 135, 136, 137, 131, 130, 132, 133, + 0, 166, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 80, 168, - 0, 0, 75, 77, 78, 79, 25, 17, 113, 69, - 0, 128, 126, 127, 148, 149, 150, 147, 153, 154, - 155, 156, 143, 144, 157, 158, 159, 160, 161, 162, - 163, 151, 152, 146, 145, 138, 137, 139, 140, 142, - 141, 167, 93, 0, 89, 0, 87, 92, 73, 76, - 168, 60, 166, 96, 81, 85, 91, 94, 168, 84, - 0, 83, 18, 167, 0, 90, 88, 86, 82 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 79, 171, 0, 0, 74, 76, 77, 78, + 24, 171, 112, 68, 0, 129, 127, 128, 149, 150, + 151, 148, 154, 155, 156, 157, 144, 145, 158, 159, + 160, 161, 162, 163, 164, 152, 153, 147, 146, 139, + 138, 140, 141, 143, 142, 168, 92, 0, 88, 0, + 86, 91, 72, 75, 17, 59, 167, 95, 80, 84, + 90, 93, 171, 83, 0, 82, 168, 0, 89, 87, + 85, 81 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const short yydefgoto[] = +static const short int yydefgoto[] = { -1, 5, 6, 7, 8, 9, 92, 93, 94, 95, - 10, 240, 101, 56, 98, 99, 136, 157, 12, 13, - 14, 15, 124, 28, 29, 30, 31, 32, 33, 17, - 34, 35, 36, 37, 77, 78, 109, 200, 79, 80, - 142, 243, 144, 145, 18, 125, 50, 129, 90, 191, - 192, 193, 231, 254, 194, 195, 244, 235, 233, 245, - 236, 234, 246, 38, 66, 40, 41, 42, 67, 44, - 45, 46, 62, 138, 64, 60, 61, 68, 48, 49, - 237, 127, 128, 158, 20, 247, 21 + 10, 101, 56, 98, 99, 140, 161, 12, 13, 14, + 15, 126, 28, 29, 30, 31, 32, 33, 17, 34, + 35, 36, 37, 77, 78, 109, 204, 79, 80, 146, + 247, 148, 149, 18, 127, 50, 133, 90, 195, 196, + 197, 235, 257, 198, 199, 248, 239, 237, 249, 240, + 238, 250, 38, 66, 40, 41, 42, 67, 44, 45, + 46, 62, 142, 64, 60, 61, 68, 48, 49, 241, + 129, 130, 162, 20, 251, 131, 132, 21 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -106 -static const short yypact[] = +#define YYPACT_NINF -104 +static const short int yypact[] = { - 4, -106, 15, 39, -106, 28, -13, -106, -106, -106, - -106, -106, 5, -106, -106, -106, -106, -106, -106, -106, - -106, -106, 51, 16, -106, 43, 65, 67, -106, -106, - 77, -106, -106, -106, -29, -106, -106, -106, -106, 89, - -106, 34, -106, 17, -106, -106, -106, 89, 25, -106, - 65, -106, -106, -106, 97, 106, 69, -106, 43, -106, - 63, -106, 5, -106, -106, 82, 89, 85, 89, 63, - -106, 67, 85, -106, -106, 5, 9, -106, -106, -106, - -106, 6, -106, -106, 17, -106, -106, -106, -106, -106, - -106, -106, -106, 12, -106, 98, 99, -106, 87, 94, - -106, 142, -106, -106, -106, -106, 5, -106, 85, 22, - 115, -106, 9, 9, 9, 9, 9, 9, 9, 9, - 53, 9, 5, 5, -106, -106, 92, 272, -106, -3, - -106, -106, -106, -106, 164, -106, 148, -106, 140, 147, - 5, 70, -106, -106, -106, -106, -106, -106, 431, 431, - 431, 431, -106, -106, -106, -106, 138, -106, 139, 137, - -106, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, -106, 5, - 9, 37, -106, -106, -106, -106, -106, -106, -106, 5, - 150, -106, -106, -106, 362, 334, 303, 146, 390, 390, - 403, 403, 189, 189, 390, 390, 390, 390, 403, 403, - 431, 390, 390, 438, 198, 90, 90, -106, -106, -106, - -106, 29, -106, -25, -106, -26, -106, -106, -106, -106, - 5, -106, 72, -106, 151, -106, -106, -106, 5, -106, - 9, -106, -106, 29, 154, -106, -106, -106, -106 + 11, -104, 17, 44, -104, 13, -22, -104, -104, -104, + -104, -104, 12, -104, -104, -104, -104, -104, -104, -104, + -104, -104, 55, 9, -104, 30, 42, 96, -104, -104, + 33, -104, -104, -104, -26, -104, -104, -104, -104, 98, + -104, -16, -104, 16, -104, -104, -104, 98, -12, -104, + 42, -104, -104, -104, 39, 45, 56, -104, 30, -104, + 58, -104, 12, -104, -104, 28, 98, -3, 98, 58, + -104, 96, -3, -104, -104, 12, 27, -104, -104, -104, + -104, -2, -104, -104, 16, -104, -104, -104, -104, -104, + -104, -104, -104, 3, -104, 60, 72, -104, 68, 76, + -104, 124, -104, -104, -104, -104, 12, -104, -3, 34, + 79, -104, 27, 27, 27, 27, -104, -104, 27, 27, + 27, 27, 86, 27, 12, 12, -104, -104, 77, 325, + -104, -104, -104, 70, -104, -104, -104, -104, 132, -104, + 89, -104, 102, 105, 12, 62, -104, -104, -104, -104, + -104, -104, 426, 426, 426, 426, -104, -104, -104, -104, + 278, -104, 99, 85, -104, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, -104, 12, 27, 25, -104, -104, -104, -104, + -104, 12, -104, 12, 106, -104, -104, -104, 388, 358, + 149, 451, 418, 418, 291, 291, 190, 190, 418, 418, + 418, 418, 291, 291, 426, 418, 418, 204, 457, 100, + 100, -104, -104, -104, -104, 37, -104, -25, -104, -33, + -104, -104, -104, -104, -104, -104, 71, -104, 107, -104, + -104, -104, 12, -104, 27, -104, 37, 126, -104, -104, + -104, -104 }; /* YYPGOTO[NTERM-NUM]. */ -static const short yypgoto[] = +static const short int yypgoto[] = { - -106, -106, -106, -106, 197, -106, -106, -106, 111, -106, - -106, -106, -106, 149, -106, -106, -106, 1, -59, -7, - -105, -106, 0, -106, -106, -9, -106, -106, -37, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, 110, -106, -106, -106, 2, -106, -106, -106, -106, - 24, -106, -106, -106, -106, -106, -106, -106, -106, -47, - -30, -27, -106, -12, 80, 66, -106, -32, 3, -106, - -106, -106, -106, -106, 165, -106, 162, 229, -106, -106, - 167, 95, -106, 121, -106, 136, 40 + -104, -104, -104, -104, 151, -104, -104, -104, 84, -104, + -104, -104, 122, -104, -104, -104, 1, -60, -8, -103, + -104, 0, -104, -104, -6, -104, -104, -36, -104, -104, + -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, + 73, -104, -104, -104, 5, -104, -104, -104, -104, -14, + -104, -104, -104, -104, -104, -104, -104, -104, -77, -58, + -55, -104, -5, 104, -31, -104, -29, 6, -104, -104, + -104, -104, -104, 141, -104, 140, 201, -104, -104, 129, + 97, -104, 82, -104, 110, -104, -104, 61 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -169 -static const short yytable[] = +#define YYTABLE_NINF -172 +static const short int yytable[] = { - 16, 11, 19, 106, 141, 53, 43, 83, 1, 1, - 86, 57, 16, 111, 19, 70, 91, 65, 74, 22, - -103, 57, 75, 250, 248, 76, 139, 249, 51, 251, - 72, 86, 2, 242, 83, 87, 112, 113, 114, 115, - 238, 89, 84, 23, 188, 116, 117, 63, 189, 2, - 43, 190, 118, 119, 3, 3, 58, 23, -168, 120, - 4, 4, 16, 121, 19, 4, 58, 122, 123, 23, - -102, 69, 3, 59, 108, 16, 110, 19, 4, 3, - 73, 199, 88, 39, 188, 4, 24, 85, 189, 25, - 26, 190, 27, 81, 96, 100, 103, 54, 55, 53, - 24, 91, 140, 25, 26, 82, 16, 71, 19, 16, - 97, 19, 24, 58, 24, 25, 55, 25, -68, -68, - -95, -95, 16, 16, 19, 19, 141, 39, 184, 185, - 186, 187, 82, 131, 107, 133, 24, 82, -102, 25, - 16, 137, 19, 134, 132, -15, 135, 160, 141, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 169, 170, 147, 196, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 180, 181, 182, 183, 184, 185, 186, 187, 198, 16, - 232, 19, 53, 201, 197, -64, 203, 202, 241, 16, - 253, 19, 258, 52, 130, 102, 257, 148, 149, 150, - 151, 152, 153, 154, 155, 239, 156, 169, 170, 143, - 256, 255, 105, 104, 140, 182, 183, 184, 185, 186, - 187, 16, 47, 19, 182, 183, 184, 185, 186, 187, - 16, 252, 19, 126, 159, 146, 140, 0, 16, 232, - 19, 0, 0, 16, 0, 19, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 0, - 0, 0, 0, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 161, 162, 0, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 0, 0, 0, 0, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 161, 0, 0, 164, 165, + 16, 11, 106, 57, 53, 19, 145, 91, 82, 43, + 83, 86, 16, 51, 57, 1, 1, 19, 254, -102, + 65, 22, 70, 74, 255, 2, 252, 75, 242, 253, + 76, 111, 86, 72, 63, 82, 73, 83, 143, 85, + 82, 246, 87, 91, 89, 84, 23, 88, 23, 97, + 58, -171, -101, 43, 112, 113, 114, 115, 2, 116, + 117, 58, 16, 3, 3, 118, 119, 19, 59, 4, + 4, -101, 120, 121, 192, 16, 110, 108, 193, 122, + 19, 194, 107, 123, 203, 4, 3, 124, 125, 3, + 23, 24, 4, 24, 25, 4, 25, 26, 53, 27, + 69, 144, 81, 54, 55, 55, 16, 39, 136, 16, + 58, 19, -67, -67, 19, 96, 100, 103, 137, 192, + -15, -94, -94, 193, 16, 16, 194, 138, 139, 19, + 19, 71, 145, 151, 164, 24, 200, 201, 25, 26, + 188, 189, 190, 191, 16, 24, 207, 24, 25, 19, + 25, 39, 202, 145, 135, -63, 245, 52, 256, 206, + 165, 166, 141, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 261, 134, 102, 260, + 181, 243, 147, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 16, 236, 53, 259, 258, 19, 104, + 105, 16, 244, 16, 47, 128, 19, 163, 19, 152, + 153, 154, 155, 0, 0, 156, 157, 158, 159, 150, + 160, 0, 0, 173, 174, 0, 0, 144, 186, 187, + 188, 189, 190, 191, 0, 16, 0, 0, 0, 0, + 19, 185, 186, 187, 188, 189, 190, 191, 144, 0, + 0, 0, 16, 236, 0, 0, 16, 19, 0, 0, + 0, 19, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 0, 0, 0, 0, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 0, - 0, 0, 0, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 164, 0, 0, 167, 168, 169, - 170, 0, 0, 0, 0, 175, 176, 164, 0, 0, - 0, 177, 169, 170, 180, 181, 182, 183, 184, 185, - 186, 187, 0, 0, 177, 0, 0, 180, 181, 182, - 183, 184, 185, 186, 187, 164, 0, 0, 0, 0, - 169, 170, 0, 0, 0, 0, 0, 169, 170, 0, - 0, 0, 0, 0, 0, 180, 181, 182, 183, 184, - 185, 186, 187, 181, 182, 183, 184, 185, 186, 187 + 176, 177, 178, 179, 180, 168, 0, 0, 0, 181, + 173, 174, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 181, 0, 0, 0, 0, 184, 185, 186, + 187, 188, 189, 190, 191, 205, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 0, 0, 0, 0, 181, 0, 0, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 165, + 0, 0, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 0, 0, 0, 0, 181, + 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 0, 0, 0, 0, 181, + 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 168, 0, 0, 171, 172, 173, 174, 0, + 168, 0, 0, 179, 180, 173, 174, 0, 0, 181, + 0, 0, 0, 0, 184, 185, 186, 187, 188, 189, + 190, 191, 184, 185, 186, 187, 188, 189, 190, 191, + 173, 174, 0, 0, 0, 0, 173, 174, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 185, 186, + 187, 188, 189, 190, 191, 186, 187, 188, 189, 190, + 191 }; -static const short yycheck[] = +static const short int yycheck[] = { - 0, 0, 0, 62, 109, 12, 3, 39, 4, 4, - 47, 5, 12, 4, 12, 27, 4, 26, 47, 4, - 3, 5, 51, 49, 49, 54, 4, 52, 0, 55, - 27, 68, 45, 4, 66, 47, 27, 28, 29, 30, - 3, 50, 39, 4, 47, 36, 37, 4, 51, 45, - 47, 54, 43, 44, 50, 50, 50, 4, 46, 50, - 56, 56, 62, 54, 62, 56, 50, 58, 59, 4, - 53, 4, 50, 57, 71, 75, 75, 75, 56, 50, - 3, 140, 57, 3, 47, 56, 47, 53, 51, 50, - 51, 54, 53, 4, 54, 55, 56, 46, 47, 106, - 47, 4, 109, 50, 51, 39, 106, 27, 106, 109, - 4, 109, 47, 50, 47, 50, 47, 50, 48, 49, - 48, 49, 122, 123, 122, 123, 231, 47, 38, 39, - 40, 41, 66, 93, 52, 48, 47, 71, 53, 50, - 140, 101, 140, 49, 46, 46, 4, 55, 253, 11, + 0, 0, 62, 5, 12, 0, 109, 4, 39, 3, + 39, 47, 12, 0, 5, 4, 4, 12, 51, 3, + 26, 4, 27, 49, 57, 47, 51, 53, 3, 54, + 56, 4, 68, 27, 4, 66, 3, 66, 4, 55, + 71, 4, 47, 4, 50, 39, 4, 59, 4, 4, + 52, 48, 55, 47, 27, 28, 29, 30, 47, 32, + 33, 52, 62, 52, 52, 38, 39, 62, 59, 58, + 58, 55, 45, 46, 49, 75, 75, 71, 53, 52, + 75, 56, 54, 56, 144, 58, 52, 60, 61, 52, + 4, 49, 58, 49, 52, 58, 52, 53, 106, 55, + 4, 109, 4, 48, 49, 49, 106, 3, 48, 109, + 52, 106, 50, 51, 109, 54, 55, 56, 50, 49, + 48, 50, 51, 53, 124, 125, 56, 51, 4, 124, + 125, 27, 235, 54, 57, 49, 4, 48, 52, 53, + 40, 41, 42, 43, 144, 49, 61, 49, 52, 144, + 52, 47, 50, 256, 93, 50, 50, 6, 51, 60, + 11, 12, 101, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 50, 93, 56, 256, + 31, 195, 109, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 193, 193, 203, 254, 252, 193, 58, + 60, 201, 201, 203, 3, 76, 201, 125, 203, 112, + 113, 114, 115, -1, -1, 118, 119, 120, 121, 109, + 123, -1, -1, 19, 20, -1, -1, 235, 38, 39, + 40, 41, 42, 43, -1, 235, -1, -1, -1, -1, + 235, 37, 38, 39, 40, 41, 42, 43, 256, -1, + -1, -1, 252, 252, -1, -1, 256, 252, -1, -1, + -1, 256, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 19, 20, 52, 4, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 34, 35, 36, 37, 38, 39, 40, 41, 48, 189, - 189, 189, 199, 55, 46, 48, 59, 58, 48, 199, - 49, 199, 48, 6, 93, 56, 253, 112, 113, 114, - 115, 116, 117, 118, 119, 191, 121, 19, 20, 109, - 250, 248, 60, 58, 231, 36, 37, 38, 39, 40, - 41, 231, 3, 231, 36, 37, 38, 39, 40, 41, - 240, 240, 240, 76, 123, 109, 253, -1, 248, 248, - 248, -1, -1, 253, -1, 253, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, - -1, -1, -1, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 11, 12, -1, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 11, -1, -1, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, -1, -1, -1, -1, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, - -1, -1, -1, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 14, -1, -1, 17, 18, 19, - 20, -1, -1, -1, -1, 25, 26, 14, -1, -1, - -1, 31, 19, 20, 34, 35, 36, 37, 38, 39, - 40, 41, -1, -1, 31, -1, -1, 34, 35, 36, - 37, 38, 39, 40, 41, 14, -1, -1, -1, -1, - 19, 20, -1, -1, -1, -1, -1, 19, 20, -1, - -1, -1, -1, -1, -1, 34, 35, 36, 37, 38, - 39, 40, 41, 35, 36, 37, 38, 39, 40, 41 + 22, 23, 24, 25, 26, 14, -1, -1, -1, 31, + 19, 20, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 31, -1, -1, -1, -1, 36, 37, 38, + 39, 40, 41, 42, 43, 57, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, -1, -1, -1, -1, 31, -1, -1, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 11, + -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, -1, -1, -1, -1, 31, + -1, -1, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, -1, -1, -1, -1, 31, + -1, -1, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 14, -1, -1, 17, 18, 19, 20, -1, + 14, -1, -1, 25, 26, 19, 20, -1, -1, 31, + -1, -1, -1, -1, 36, 37, 38, 39, 40, 41, + 42, 43, 36, 37, 38, 39, 40, 41, 42, 43, + 19, 20, -1, -1, -1, -1, 19, 20, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 36, 37, 38, + 39, 40, 41, 42, 43, 38, 39, 40, 41, 42, + 43 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 4, 45, 50, 56, 61, 62, 63, 64, 65, - 70, 77, 78, 79, 80, 81, 82, 89, 104, 105, - 144, 146, 4, 4, 47, 50, 51, 53, 83, 84, - 85, 86, 87, 88, 90, 91, 92, 93, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 137, 138, 139, - 106, 0, 64, 79, 46, 47, 73, 5, 50, 57, - 135, 136, 132, 4, 134, 85, 124, 128, 137, 4, - 123, 124, 128, 3, 47, 51, 54, 94, 95, 98, - 99, 4, 125, 127, 128, 53, 88, 123, 57, 85, - 108, 4, 66, 67, 68, 69, 146, 4, 74, 75, - 146, 72, 73, 146, 134, 136, 78, 52, 128, 96, - 77, 4, 27, 28, 29, 30, 36, 37, 43, 44, - 50, 54, 58, 59, 82, 105, 140, 141, 142, 107, - 68, 146, 46, 48, 49, 4, 76, 146, 133, 4, - 79, 80, 100, 101, 102, 103, 145, 52, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 77, 143, 143, - 55, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 47, 51, - 54, 109, 110, 111, 114, 115, 4, 46, 48, 78, - 97, 55, 58, 59, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 112, 77, 118, 121, 117, 120, 140, 3, 110, - 71, 48, 4, 101, 116, 119, 122, 145, 49, 52, - 49, 55, 77, 49, 113, 121, 120, 119, 48 + 0, 4, 47, 52, 58, 63, 64, 65, 66, 67, + 72, 78, 79, 80, 81, 82, 83, 90, 105, 106, + 145, 149, 4, 4, 49, 52, 53, 55, 84, 85, + 86, 87, 88, 89, 91, 92, 93, 94, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 138, 139, 140, + 107, 0, 66, 80, 48, 49, 74, 5, 52, 59, + 136, 137, 133, 4, 135, 86, 125, 129, 138, 4, + 124, 125, 129, 3, 49, 53, 56, 95, 96, 99, + 100, 4, 126, 128, 129, 55, 89, 124, 59, 86, + 109, 4, 68, 69, 70, 71, 149, 4, 75, 76, + 149, 73, 74, 149, 135, 137, 79, 54, 129, 97, + 78, 4, 27, 28, 29, 30, 32, 33, 38, 39, + 45, 46, 52, 56, 60, 61, 83, 106, 141, 142, + 143, 147, 148, 108, 70, 149, 48, 50, 51, 4, + 77, 149, 134, 4, 80, 81, 101, 102, 103, 104, + 146, 54, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 78, 144, 144, 57, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 31, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 49, 53, 56, 110, 111, 112, 115, 116, + 4, 48, 50, 79, 98, 57, 60, 61, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 113, 78, 119, 122, 118, + 121, 141, 3, 111, 78, 50, 4, 102, 117, 120, + 123, 146, 51, 54, 51, 57, 51, 114, 122, 121, + 120, 50 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -814,7 +844,8 @@ static const unsigned char yystos[] = #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYERROR goto yyerrorlab + /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. @@ -848,11 +879,11 @@ while (0) are run). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) #endif /* YYLEX -- calling `yylex' with the right arguments. */ @@ -896,17 +927,17 @@ do { \ /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (cinluded). | +| TOP (included). | `------------------------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (short *bottom, short *top) +yy_stack_print (short int *bottom, short int *top) #else static void yy_stack_print (bottom, top) - short *bottom; - short *top; + short int *bottom; + short int *top; #endif { YYFPRINTF (stderr, "Stack now"); @@ -936,9 +967,9 @@ yy_reduce_print (yyrule) #endif { int yyi; - unsigned int yylineno = yyrline[yyrule]; + unsigned int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); + yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); @@ -975,7 +1006,7 @@ int yydebug; SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if YYMAXDEPTH == 0 +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif @@ -1173,9 +1204,9 @@ int yynerrs; to reallocate them elsewhere. */ /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; @@ -1212,6 +1243,7 @@ int yynerrs; yyssp = yyss; yyvsp = yyvs; + goto yysetstate; /*------------------------------------------------------------. @@ -1237,7 +1269,7 @@ int yynerrs; these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + short int *yyss1 = yyss; /* Each stack pointer address is followed by the size of the @@ -1265,7 +1297,7 @@ int yynerrs; yystacksize = YYMAXDEPTH; { - short *yyss1 = yyss; + short int *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) @@ -1398,7 +1430,7 @@ yyreduce: switch (yyn) { case 2: -#line 121 "compile.y" +#line 128 "compile.y" { Method& method=*new Method(Method::CT_ANY, 0, 0, /*min, max numbered_params_count*/ @@ -1409,7 +1441,7 @@ yyreduce: break; case 9: -#line 136 "compile.y" +#line 143 "compile.y" { const String& command=*LA2S(*yyvsp[-2]); YYSTYPE strings_code=yyvsp[0]; @@ -1484,17 +1516,17 @@ yyreduce: break; case 13: -#line 208 "compile.y" +#line 215 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; case 17: -#line 212 "compile.y" +#line 219 "compile.y" { PC.explicit_result=false; - const String& name=*LA2S(*yyvsp[-4]); + const String& name=*LA2S(*yyvsp[-5]); - YYSTYPE params_names_code=yyvsp[-3]; + YYSTYPE params_names_code=yyvsp[-4]; ArrayString* params_names=0; if(int size=params_names_code->count()) { params_names=new ArrayString; @@ -1502,7 +1534,7 @@ yyreduce: *params_names+=LA2S(*params_names_code, i); } - YYSTYPE locals_names_code=yyvsp[-2]; + YYSTYPE locals_names_code=yyvsp[-3]; ArrayString* locals_names=0; if(int size=locals_names_code->count()) { locals_names=new ArrayString; @@ -1520,7 +1552,8 @@ yyreduce: Method::CT_ANY, 0, 0/*min,max numbered_params_count*/, params_names, locals_names, - 0/*to be filled later in next {} */, 0); + yyvsp[0], 0); + PC.cclass->add_method(PC.alias_method(name), *method); *reinterpret_cast(&yyval)=method; @@ -1528,31 +1561,23 @@ yyreduce: ;} break; - case 18: -#line 247 "compile.y" - { - // fill in the code - reinterpret_cast(yyvsp[-1])->parser_code=yyvsp[0]; -;} - break; - - case 21: -#line 253 "compile.y" + case 20: +#line 258 "compile.y" {yyval=yyvsp[-1];} break; - case 25: -#line 255 "compile.y" + case 24: +#line 260 "compile.y" { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} break; - case 31: -#line 263 "compile.y" + case 30: +#line 268 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 37: -#line 269 "compile.y" + case 36: +#line 274 "compile.y" { yyval=yyvsp[0]; /* stack: resulting value */ changetail_or_append(*yyval, @@ -1562,18 +1587,18 @@ yyreduce: ;} break; - case 38: -#line 276 "compile.y" + case 37: +#line 281 "compile.y" { yyval=yyvsp[0] ;} break; - case 41: -#line 278 "compile.y" + case 40: +#line 283 "compile.y" { yyval=yyvsp[-1] ;} break; - case 44: -#line 282 "compile.y" + case 43: +#line 287 "compile.y" { yyval=N(); ArrayOperation* diving_code=yyvsp[0]; @@ -1598,26 +1623,26 @@ yyreduce: ;} break; - case 45: -#line 304 "compile.y" + case 44: +#line 309 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 47: -#line 305 "compile.y" + case 46: +#line 310 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 48: -#line 309 "compile.y" + case 47: +#line 314 "compile.y" { yyval=yyvsp[-1]; /* stack: context,name */ P(*yyval, *yyvsp[0]); /* stack: context,name,constructor_value */ ;} break; - case 52: -#line 317 "compile.y" + case 51: +#line 322 "compile.y" { yyval=N(); ArrayOperation* diving_code=yyvsp[0]; @@ -1637,8 +1662,8 @@ yyreduce: ;} break; - case 53: -#line 334 "compile.y" + case 52: +#line 339 "compile.y" { yyval=N(); O(*yyval, OP_WITH_WRITE); /* stack: starting context */ @@ -1646,28 +1671,28 @@ yyreduce: ;} break; - case 54: -#line 339 "compile.y" + case 53: +#line 344 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 58: -#line 346 "compile.y" + case 57: +#line 351 "compile.y" { // allow $result_or_other_variable[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; ;} break; - case 59: -#line 349 "compile.y" + case 58: +#line 354 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; - case 60: -#line 351 "compile.y" + case 59: +#line 356 "compile.y" { // stack: context, name yyval=yyvsp[-2]; // stack: context, name, value @@ -1675,8 +1700,8 @@ yyreduce: ;} break; - case 61: -#line 357 "compile.y" + case 60: +#line 362 "compile.y" { yyval=N(); O(*yyval, OP_PREPARE_TO_EXPRESSION); @@ -1686,8 +1711,8 @@ yyreduce: ;} break; - case 62: -#line 365 "compile.y" + case 61: +#line 370 "compile.y" { // stack: context, name yyval=N(); @@ -1695,8 +1720,8 @@ yyreduce: ;} break; - case 66: -#line 376 "compile.y" + case 65: +#line 381 "compile.y" { yyval=N(); OA(*yyval, OP_OBJECT_POOL, yyvsp[0]); /* stack: empty write context */ @@ -1705,13 +1730,13 @@ yyreduce: ;} break; - case 69: -#line 383 "compile.y" + case 68: +#line 388 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 70: -#line 387 "compile.y" + case 69: +#line 392 "compile.y" { yyval=yyvsp[0]; /* stack: value */ changetail_or_append(*yyval, @@ -1720,29 +1745,29 @@ yyreduce: ;} break; - case 71: -#line 393 "compile.y" + case 70: +#line 398 "compile.y" { PC.in_call_value=true; ;} break; - case 72: -#line 396 "compile.y" + case 71: +#line 401 "compile.y" { PC.in_call_value=false; ;} break; - case 73: -#line 399 "compile.y" + case 72: +#line 404 "compile.y" { /* ^field.$method{vasya} */ yyval=yyvsp[-3]; /* with_xxx,diving code; stack: context,method_junction */ YYSTYPE params_code=yyvsp[-1]; if(params_code->count()==4) { // probably [] case. [OP_VALUE+origin+Void+STORE_PARAM] if(Value* value=LA2V(*params_code)) // it is OP_VALUE+origin+value? - if(!value->is_defined()) // value is VVoid? + if(value->is_void()) // value is VVoid? params_code=0; // ^zzz[] case. don't append lone empty param. } /* stack: context, method_junction */ @@ -1750,69 +1775,70 @@ yyreduce: ;} break; - case 76: -#line 414 "compile.y" + case 75: +#line 419 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 80: -#line 420 "compile.y" + case 79: +#line 425 "compile.y" { // allow ^call[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; ;} break; - case 81: -#line 423 "compile.y" + case 80: +#line 428 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; - case 82: -#line 425 "compile.y" + case 81: +#line 430 "compile.y" {yyval=yyvsp[-2];} break; - case 83: -#line 426 "compile.y" + case 82: +#line 431 "compile.y" {yyval=yyvsp[-1];} break; - case 84: -#line 427 "compile.y" + case 83: +#line 432 "compile.y" {yyval=yyvsp[-1];} break; - case 86: -#line 430 "compile.y" + case 85: +#line 435 "compile.y" { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} break; - case 88: -#line 434 "compile.y" + case 87: +#line 439 "compile.y" { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} break; - case 90: -#line 438 "compile.y" + case 89: +#line 443 "compile.y" { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;} break; - case 91: -#line 440 "compile.y" + case 90: +#line 445 "compile.y" { yyval=yyvsp[0]; O(*yyval, OP_STORE_PARAM); ;} break; - case 92: -#line 444 "compile.y" + case 91: +#line 449 "compile.y" { YYSTYPE expr_code=yyvsp[0]; - if(expr_code->count()==3) { // optimizing (double) case. [OP_VALUE+origin+Double] + if(expr_code->count()==3 + && (*expr_code)[0].code==OP_VALUE) { // optimizing (double/bool/incidently 'string' too) case. [OP_VALUE+origin+Double] yyval=expr_code; O(*yyval, OP_STORE_PARAM); // no evaluating } else { @@ -1826,26 +1852,26 @@ yyreduce: ;} break; - case 93: -#line 458 "compile.y" + case 92: +#line 464 "compile.y" { yyval=N(); OA(*yyval, OP_CURLY_CODE__STORE_PARAM, yyvsp[0]); ;} break; - case 98: -#line 470 "compile.y" + case 97: +#line 476 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 100: -#line 472 "compile.y" + case 99: +#line 478 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 102: -#line 474 "compile.y" + case 101: +#line 480 "compile.y" { // we know that name_advance1 not called from ^xxx context // so we'll not check for operator call possibility as we do in name_advance2 @@ -1856,8 +1882,8 @@ yyreduce: ;} break; - case 103: -#line 482 "compile.y" + case 102: +#line 488 "compile.y" { /* stack: context */ yyval=yyvsp[0]; /* stack: context,name */ @@ -1865,16 +1891,16 @@ yyreduce: ;} break; - case 109: -#line 495 "compile.y" + case 108: +#line 501 "compile.y" { yyval=yyvsp[0]; O(*yyval, OP_GET_ELEMENT); ;} break; - case 110: -#line 499 "compile.y" + case 109: +#line 505 "compile.y" { ArrayOperation* code; { @@ -1886,23 +1912,23 @@ yyreduce: ;} break; - case 111: -#line 508 "compile.y" + case 110: +#line 514 "compile.y" { // allow $result_or_other_variable[ letters here any time ] *reinterpret_cast(&yyval)=PC.explicit_result; PC.explicit_result=false; ;} break; - case 112: -#line 511 "compile.y" + case 111: +#line 517 "compile.y" { PC.explicit_result=*reinterpret_cast(&yyvsp[-1]); ;} break; - case 113: -#line 513 "compile.y" + case 112: +#line 519 "compile.y" { yyval=N(); OA(*yyval, OP_OBJECT_POOL, yyvsp[-2]); /* stack: empty write context */ @@ -1911,8 +1937,8 @@ yyreduce: ;} break; - case 114: -#line 519 "compile.y" + case 113: +#line 525 "compile.y" { yyval=N(); O(*yyval, OP_WITH_READ); @@ -1920,21 +1946,21 @@ yyreduce: ;} break; - case 116: -#line 524 "compile.y" + case 115: +#line 530 "compile.y" { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;} break; - case 117: -#line 525 "compile.y" + case 116: +#line 531 "compile.y" { yyval=yyvsp[0]; O(*yyval, OP_GET_ELEMENT__WRITE); ;} break; - case 120: -#line 534 "compile.y" + case 119: +#line 540 "compile.y" { yyval=yyvsp[-1]; // stack: class name string if(*LA2S(*yyval) == BASE_NAME) { // pseudo BASE class @@ -1949,8 +1975,8 @@ yyreduce: ;} break; - case 121: -#line 546 "compile.y" + case 120: +#line 552 "compile.y" { yyval=yyvsp[-1]; if(!PC.in_call_value) { @@ -1961,206 +1987,206 @@ yyreduce: ;} break; - case 126: -#line 563 "compile.y" - { yyval = yyvsp[-1]; ;} - break; - case 127: -#line 564 "compile.y" - { yyval = yyvsp[-1]; ;} +#line 571 "compile.y" + { yyval = yyvsp[-1] ;} break; case 128: -#line 565 "compile.y" - { yyval = yyvsp[-1]; ;} +#line 572 "compile.y" + { yyval = yyvsp[-1] ;} break; case 129: -#line 567 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_NEG) ;} +#line 573 "compile.y" + { yyval = yyvsp[-1]; ;} break; case 130: -#line 568 "compile.y" - { yyval=yyvsp[0] ;} +#line 575 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_NEG) ;} break; case 131: -#line 569 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_INV) ;} +#line 576 "compile.y" + { yyval=yyvsp[0] ;} break; case 132: -#line 570 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_NOT) ;} +#line 577 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_INV) ;} break; case 133: -#line 571 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_DEF) ;} +#line 578 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_NOT) ;} break; case 134: -#line 572 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_IN) ;} +#line 579 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_DEF) ;} break; case 135: -#line 573 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_FEXISTS) ;} +#line 580 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_IN) ;} break; case 136: -#line 574 "compile.y" - { yyval=yyvsp[0]; O(*yyval, OP_DEXISTS) ;} +#line 581 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_FEXISTS) ;} break; case 137: -#line 576 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_SUB) ;} +#line 582 "compile.y" + { yyval=yyvsp[0]; O(*yyval, OP_DEXISTS) ;} break; case 138: -#line 577 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_ADD) ;} +#line 584 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_SUB) ;} break; case 139: -#line 578 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_MUL) ;} +#line 585 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_ADD) ;} break; case 140: -#line 579 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_DIV) ;} +#line 586 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_MUL) ;} break; case 141: -#line 580 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_MOD) ;} +#line 587 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_DIV) ;} break; case 142: -#line 581 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_INTDIV) ;} +#line 588 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_MOD) ;} break; case 143: -#line 582 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_SL) ;} +#line 589 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_INTDIV) ;} break; case 144: -#line 583 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_SR) ;} +#line 590 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_SL) ;} break; case 145: -#line 584 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_AND) ;} +#line 591 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_SR) ;} break; case 146: -#line 585 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_OR) ;} +#line 592 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_AND) ;} break; case 147: -#line 586 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_XOR) ;} +#line 593 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_OR) ;} break; case 148: -#line 587 "compile.y" - { yyval=yyvsp[-2]; OA(*yyval, OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP_LOG_AND) ;} +#line 594 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_BIN_XOR) ;} break; case 149: -#line 588 "compile.y" - { yyval=yyvsp[-2]; OA(*yyval, OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP_LOG_OR) ;} +#line 595 "compile.y" + { yyval=yyvsp[-2]; OA(*yyval, OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP_LOG_AND) ;} break; case 150: -#line 589 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_LOG_XOR) ;} +#line 596 "compile.y" + { yyval=yyvsp[-2]; OA(*yyval, OP_NESTED_CODE, yyvsp[0]); O(*yyval, OP_LOG_OR) ;} break; case 151: -#line 590 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_LT) ;} +#line 597 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_LOG_XOR) ;} break; case 152: -#line 591 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_GT) ;} +#line 598 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_LT) ;} break; case 153: -#line 592 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_LE) ;} +#line 599 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_GT) ;} break; case 154: -#line 593 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_GE) ;} +#line 600 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_LE) ;} break; case 155: -#line 594 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_EQ) ;} +#line 601 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_GE) ;} break; case 156: -#line 595 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_NE) ;} +#line 602 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_EQ) ;} break; case 157: -#line 596 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_LT) ;} +#line 603 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_NUM_NE) ;} break; case 158: -#line 597 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_GT) ;} +#line 604 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_LT) ;} break; case 159: -#line 598 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_LE) ;} +#line 605 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_GT) ;} break; case 160: -#line 599 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_GE) ;} +#line 606 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_LE) ;} break; case 161: -#line 600 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_EQ) ;} +#line 607 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_GE) ;} break; case 162: -#line 601 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_NE) ;} +#line 608 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_EQ) ;} break; case 163: -#line 602 "compile.y" - { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_IS) ;} +#line 609 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_STR_NE) ;} break; case 164: -#line 605 "compile.y" +#line 610 "compile.y" + { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]); O(*yyval, OP_IS) ;} + break; + + case 165: +#line 613 "compile.y" { // optimized from OP_STRING->OP_VALUE for doubles maybe_change_string_literal_to_double_literal(*(yyval=yyvsp[0])); ;} break; - case 165: -#line 610 "compile.y" + case 166: +#line 618 "compile.y" { yyval=N(); OA(*yyval, OP_STRING_POOL, yyvsp[0]); /* stack: empty write context */ @@ -2169,29 +2195,39 @@ yyreduce: ;} break; - case 166: -#line 619 "compile.y" + case 167: +#line 627 "compile.y" { // optimized from OP_STRING+OP_WRITE_VALUE to OP_STRING__WRITE change_string_literal_to_write_string_literal(*(yyval=yyvsp[0])) ;} break; - case 167: -#line 624 "compile.y" - { yyval=VL(new VVoid(), 0, 0, 0) ;} + case 168: +#line 632 "compile.y" + { yyval=VL(/*we know that we will not change it*/const_cast(&vvoid), 0, 0, 0) ;} break; - case 168: -#line 625 "compile.y" + case 169: +#line 633 "compile.y" + { yyval = VL(/*we know that we will not change it*/const_cast(&vtrue), 0, 0, 0) ;} + break; + + case 170: +#line 634 "compile.y" + { yyval = VL(/*we know that we will not change it*/const_cast(&vfalse), 0, 0, 0) ;} + break; + + case 171: +#line 636 "compile.y" { yyval=N() ;} break; } -/* Line 991 of yacc.c. */ -#line 2194 "compile.tab.C" +/* Line 1010 of yacc.c. */ +#line 2231 "compile.tab.C" yyvsp -= yylen; yyssp -= yylen; @@ -2232,18 +2268,33 @@ yyerrlab: { YYSIZE_T yysize = 0; int yytype = YYTRANSLATE (yychar); + const char* yyprefix; char *yymsg; - int yyx, yycount; + int yyx; - yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("syntax error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { @@ -2252,16 +2303,13 @@ yyerrlab: if (yycount < 5) { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); + yyp = yystpcpy (yyp, yyprefix); yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; + yyprefix = " or "; } } yyerror (yymsg); @@ -2282,51 +2330,56 @@ yyerrlab: /* If just tried and failed to reuse lookahead token after an error, discard it. */ - /* Return failure if at end of input. */ - if (yychar == YYEOF) + if (yychar <= YYEOF) { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - + } } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab2; + goto yyerrlab1; -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ -yyerrlab1: - - /* Suppress GCC warning that yyerrlab1 is unused when no action - invokes YYERROR. */ -#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) - __attribute__ ((__unused__)) +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; #endif - - goto yyerrlab2; + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; -/*---------------------------------------------------------------. -| yyerrlab2 -- pop states until the error token can be shifted. | -`---------------------------------------------------------------*/ -yyerrlab2: +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) @@ -2349,9 +2402,8 @@ yyerrlab2: YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; - + YYPOPSTACK; + yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -2400,7 +2452,7 @@ yyreturn: } -#line 627 "compile.y" +#line 638 "compile.y" #endif @@ -2522,9 +2574,9 @@ default: } // #HH ? if(pc.source[0]=='#' && pc.source[1] && pc.source[2]) { - char c= + char c=(char)( hex_value[(unsigned char)pc.source[1]]*0x10+ - hex_value[(unsigned char)pc.source[2]]; + hex_value[(unsigned char)pc.source[2]]); if(c==0) { result=BAD_HEX_LITERAL; goto break2; // wrong hex value[no ^#00 chars allowed]: bail out @@ -2842,6 +2894,22 @@ default: goto break2; } break; + case 't': + if(end==begin) // right after whitespace + if(pc.source[0]=='r' && pc.source[1]=='u' && pc.source[2]=='e') { // def + skip_analized=3; + result=LITERAL_TRUE; + goto break2; + } + break; + case 'f': + if(end==begin) // right after whitespace + if(pc.source[0]=='a' && pc.source[1]=='l' && pc.source[2]=='s' && pc.source[3]=='e') { // def + skip_analized=4; + result=LITERAL_FALSE; + goto break2; + } + break; case ' ': case '\t': case '\n': if(end!=begin) { // there were a string after previous operator? result=0; // return that string @@ -2918,6 +2986,8 @@ default: case '=': case '!': // common delimiters case ',': case '?': case '#': + // mysql column separators + case '`': // before call case '^': pop_LS(pc);