From 7cc882a76a03036ffbaab296caadc9b240941014 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9sar=20D=2E=20Rodas?= Date: Thu, 10 Feb 2011 04:38:31 -0300 Subject: [PATCH] + Moved variables resolution in the compiler Parser. (Temp. solution until the new AST class is ready) + Removed for variables from the compiler.php class --- lib/Haanga/Compiler.php | 28 +- lib/Haanga/Compiler/Parser.php | 1028 ++++++++++++++++++++-------------------- lib/Haanga/Compiler/Parser.y | 25 +- 3 files changed, 556 insertions(+), 525 deletions(-) diff --git a/lib/Haanga/Compiler.php b/lib/Haanga/Compiler.php index 9bbe139..92531b8 100644 --- a/lib/Haanga/Compiler.php +++ b/lib/Haanga/Compiler.php @@ -892,11 +892,14 @@ class Haanga_Compiler // }}} // Get variable name {{{ - function generate_variable_name($variable) + function generate_variable_name($variable, $special=true) { if (is_array($variable)) { switch ($variable[0]) { case 'forloop': + if (!$special) { + return array('var' => $variable); + } if (!$this->forid) { $this->Error("Invalid forloop reference outside of a loop"); } @@ -941,6 +944,9 @@ class Haanga_Compiler $this->var_is_safe = TRUE; break; case 'block': + if (!$special) { + return array('var' => $variable); + } if ($this->in_block == 0) { $this->Error("Can't use block.super outside a block"); } @@ -954,6 +960,11 @@ class Haanga_Compiler default: /* choose array or objects */ + if ($special) { + // this section is resolved on the parser.y + return array('var' => $variable); + } + for ($i=1; $i < count($variable); $i++) { $var_part = array_slice($variable, 0, $i); $def_arr = TRUE; @@ -1032,21 +1043,6 @@ class Haanga_Compiler } else { /* check variable context */ - /* get the proper variable */ - $pzName = is_array($details['array'][0]) ? $details['array'][0] : array($details['array'][0]); - $pzName = $this->generate_variable_name($pzName); - if (empty($pzName['var'])) { - // this is an error, but it is catched in the code generator - $pzName['var'] = ''; - } - $var = $this->get_context($pzName['var']); - - /* check the content of the first element */ - if (is_array($var) || $var instanceof Iterator) { - /* let's check if it is an object or array */ - $this->set_context($details['variable'], current($var)); - } - /* Check if the array to iterate is an object */ $var = &$details['array'][0]; if (is_string($var) && $this->var_is_object(array($var), FALSE)) { diff --git a/lib/Haanga/Compiler/Parser.php b/lib/Haanga/Compiler/Parser.php index 611ec5e..369fa61 100644 --- a/lib/Haanga/Compiler/Parser.php +++ b/lib/Haanga/Compiler/Parser.php @@ -230,9 +230,9 @@ class Haanga_yyStackEntry const T_BRACKETS_CLOSE = 62; const T_DOTDOT = 63; const T_NUMERIC = 64; - const YY_NO_ACTION = 354; - const YY_ACCEPT_ACTION = 353; - const YY_ERROR_ACTION = 352; + const YY_NO_ACTION = 356; + const YY_ACCEPT_ACTION = 355; + const YY_ERROR_ACTION = 354; /* Next are that tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement @@ -284,317 +284,323 @@ class Haanga_yyStackEntry ** shifting non-terminals after a reduce. ** self::$yy_default Default action for each state. */ - const YY_SZ_ACTTAB = 1293; + const YY_SZ_ACTTAB = 1328; static public $yy_action = array( - /* 0 */ 48, 128, 47, 89, 164, 39, 258, 41, 175, 88, - /* 10 */ 76, 255, 93, 61, 238, 146, 239, 33, 160, 40, - /* 20 */ 37, 35, 56, 53, 52, 48, 128, 47, 89, 163, - /* 30 */ 39, 115, 41, 175, 88, 76, 243, 93, 61, 242, - /* 40 */ 147, 222, 33, 162, 40, 37, 35, 56, 53, 52, - /* 50 */ 48, 128, 47, 89, 151, 39, 94, 41, 175, 88, - /* 60 */ 76, 243, 93, 61, 109, 144, 103, 33, 154, 40, - /* 70 */ 37, 35, 56, 53, 52, 48, 128, 47, 89, 172, - /* 80 */ 39, 195, 41, 175, 88, 76, 243, 93, 61, 72, - /* 90 */ 142, 167, 33, 50, 40, 37, 35, 56, 53, 52, - /* 100 */ 48, 128, 47, 89, 189, 39, 110, 41, 175, 88, - /* 110 */ 76, 243, 93, 61, 205, 173, 71, 33, 184, 40, - /* 120 */ 37, 35, 56, 53, 52, 48, 79, 47, 89, 185, - /* 130 */ 39, 126, 41, 175, 88, 76, 57, 93, 61, 235, - /* 140 */ 149, 248, 33, 186, 40, 37, 35, 56, 53, 52, - /* 150 */ 48, 57, 47, 89, 169, 39, 237, 41, 175, 88, - /* 160 */ 76, 57, 93, 61, 353, 69, 234, 33, 211, 40, - /* 170 */ 37, 35, 56, 53, 52, 48, 213, 47, 89, 177, - /* 180 */ 39, 204, 41, 175, 88, 76, 57, 93, 61, 26, - /* 190 */ 26, 259, 33, 106, 40, 37, 35, 56, 53, 52, - /* 200 */ 48, 171, 47, 89, 92, 39, 261, 41, 175, 88, - /* 210 */ 76, 57, 93, 61, 236, 262, 224, 33, 233, 40, - /* 220 */ 37, 35, 56, 53, 52, 48, 221, 47, 89, 187, - /* 230 */ 39, 102, 41, 175, 88, 76, 251, 93, 61, 199, - /* 240 */ 104, 107, 33, 194, 40, 37, 35, 56, 53, 52, - /* 250 */ 48, 129, 47, 89, 179, 39, 198, 41, 175, 88, - /* 260 */ 76, 192, 93, 61, 217, 214, 240, 33, 197, 40, - /* 270 */ 37, 35, 56, 53, 52, 48, 60, 47, 89, 174, - /* 280 */ 39, 241, 41, 175, 88, 76, 95, 93, 61, 98, - /* 290 */ 200, 132, 33, 139, 40, 37, 35, 56, 53, 52, - /* 300 */ 48, 66, 47, 89, 153, 39, 131, 41, 175, 88, - /* 310 */ 76, 67, 93, 61, 136, 84, 87, 33, 134, 40, - /* 320 */ 37, 35, 56, 53, 52, 48, 65, 47, 89, 161, - /* 330 */ 39, 135, 41, 175, 88, 76, 133, 93, 61, 227, - /* 340 */ 99, 64, 33, 155, 40, 37, 35, 56, 53, 52, - /* 350 */ 48, 73, 47, 89, 188, 39, 125, 41, 175, 88, - /* 360 */ 76, 78, 93, 61, 68, 90, 123, 33, 130, 40, - /* 370 */ 37, 35, 56, 53, 52, 48, 74, 47, 89, 156, - /* 380 */ 39, 70, 41, 175, 88, 76, 63, 93, 61, 59, - /* 390 */ 91, 85, 33, 182, 40, 37, 35, 56, 53, 52, - /* 400 */ 48, 81, 47, 89, 152, 39, 62, 41, 175, 88, - /* 410 */ 76, 182, 93, 61, 182, 182, 182, 33, 182, 40, - /* 420 */ 37, 35, 56, 53, 52, 48, 182, 47, 89, 158, - /* 430 */ 39, 182, 41, 175, 88, 76, 182, 93, 61, 182, - /* 440 */ 182, 182, 33, 182, 40, 37, 35, 56, 53, 52, - /* 450 */ 48, 182, 47, 89, 150, 39, 170, 41, 175, 88, - /* 460 */ 76, 182, 93, 61, 182, 182, 182, 33, 263, 40, - /* 470 */ 37, 35, 56, 53, 52, 30, 31, 24, 24, 24, - /* 480 */ 24, 24, 24, 24, 32, 32, 32, 25, 25, 25, - /* 490 */ 26, 26, 48, 182, 47, 89, 58, 39, 182, 41, - /* 500 */ 175, 88, 76, 182, 93, 61, 216, 215, 216, 33, - /* 510 */ 138, 40, 37, 35, 56, 53, 52, 159, 96, 207, - /* 520 */ 182, 48, 182, 47, 89, 157, 39, 228, 41, 175, - /* 530 */ 88, 76, 51, 93, 61, 182, 216, 182, 33, 182, - /* 540 */ 40, 37, 35, 56, 53, 52, 48, 182, 47, 89, - /* 550 */ 181, 39, 182, 41, 175, 88, 76, 182, 93, 61, - /* 560 */ 182, 75, 182, 33, 57, 40, 37, 35, 56, 53, - /* 570 */ 52, 30, 31, 24, 24, 24, 24, 24, 24, 24, - /* 580 */ 32, 32, 32, 25, 25, 25, 26, 26, 140, 140, - /* 590 */ 182, 141, 46, 111, 48, 86, 47, 89, 182, 39, - /* 600 */ 182, 41, 175, 88, 76, 182, 93, 61, 182, 182, - /* 610 */ 182, 33, 182, 40, 37, 35, 56, 53, 52, 30, - /* 620 */ 31, 24, 24, 24, 24, 24, 24, 24, 32, 32, - /* 630 */ 32, 25, 25, 25, 26, 26, 31, 24, 24, 24, - /* 640 */ 24, 24, 24, 24, 32, 32, 32, 25, 25, 25, - /* 650 */ 26, 26, 24, 24, 24, 24, 24, 24, 24, 32, - /* 660 */ 32, 32, 25, 25, 25, 26, 26, 170, 254, 182, - /* 670 */ 28, 206, 182, 206, 218, 168, 218, 182, 137, 245, - /* 680 */ 182, 170, 209, 218, 82, 218, 128, 210, 117, 182, - /* 690 */ 232, 218, 49, 182, 225, 230, 243, 218, 182, 218, - /* 700 */ 218, 206, 38, 138, 219, 212, 212, 205, 173, 182, - /* 710 */ 208, 182, 207, 219, 218, 182, 182, 182, 215, 231, - /* 720 */ 231, 205, 173, 182, 27, 182, 182, 219, 182, 83, - /* 730 */ 191, 182, 215, 180, 190, 193, 203, 201, 202, 196, - /* 740 */ 220, 250, 182, 182, 170, 226, 182, 113, 140, 140, - /* 750 */ 182, 141, 46, 170, 182, 168, 252, 182, 182, 182, - /* 760 */ 218, 77, 218, 182, 182, 101, 128, 182, 229, 218, - /* 770 */ 232, 218, 182, 182, 225, 230, 243, 218, 49, 182, - /* 780 */ 29, 182, 212, 212, 205, 173, 218, 182, 182, 182, - /* 790 */ 219, 212, 212, 205, 173, 215, 170, 182, 168, 219, - /* 800 */ 182, 182, 140, 140, 215, 141, 46, 170, 105, 128, - /* 810 */ 170, 116, 218, 232, 218, 182, 182, 225, 230, 243, - /* 820 */ 182, 49, 114, 218, 182, 218, 218, 182, 218, 218, - /* 830 */ 182, 182, 182, 182, 212, 212, 205, 173, 182, 182, - /* 840 */ 218, 182, 219, 218, 182, 182, 182, 215, 212, 212, - /* 850 */ 205, 173, 182, 219, 182, 182, 219, 170, 215, 182, - /* 860 */ 244, 215, 182, 168, 218, 182, 218, 182, 182, 97, - /* 870 */ 182, 170, 182, 218, 128, 218, 121, 182, 232, 182, - /* 880 */ 23, 218, 225, 230, 243, 182, 182, 218, 182, 218, - /* 890 */ 218, 182, 182, 182, 219, 212, 212, 205, 173, 247, - /* 900 */ 246, 55, 182, 219, 218, 9, 182, 182, 215, 212, - /* 910 */ 212, 205, 173, 182, 182, 182, 182, 219, 170, 182, - /* 920 */ 168, 182, 215, 182, 247, 246, 55, 168, 182, 182, - /* 930 */ 182, 128, 143, 122, 218, 232, 218, 182, 128, 225, - /* 940 */ 230, 243, 232, 124, 182, 182, 36, 230, 243, 145, - /* 950 */ 165, 218, 207, 243, 182, 168, 231, 231, 205, 173, - /* 960 */ 182, 182, 182, 182, 219, 182, 128, 168, 120, 215, - /* 970 */ 232, 182, 182, 182, 225, 230, 243, 182, 128, 168, - /* 980 */ 118, 182, 232, 182, 182, 182, 225, 230, 243, 182, - /* 990 */ 128, 168, 148, 182, 232, 182, 182, 182, 225, 230, - /* 1000 */ 243, 182, 128, 182, 119, 168, 232, 182, 182, 182, - /* 1010 */ 225, 230, 243, 182, 182, 182, 128, 182, 127, 182, - /* 1020 */ 232, 45, 168, 182, 225, 230, 243, 182, 140, 140, - /* 1030 */ 249, 141, 46, 128, 349, 168, 100, 232, 168, 182, - /* 1040 */ 54, 34, 230, 243, 108, 182, 128, 182, 182, 128, - /* 1050 */ 232, 182, 182, 232, 166, 230, 243, 178, 230, 243, - /* 1060 */ 182, 182, 140, 140, 260, 141, 46, 182, 140, 140, - /* 1070 */ 182, 141, 46, 182, 137, 42, 140, 140, 209, 141, - /* 1080 */ 46, 256, 182, 210, 260, 182, 140, 140, 182, 141, - /* 1090 */ 46, 182, 182, 80, 137, 43, 182, 182, 209, 182, - /* 1100 */ 112, 182, 182, 210, 182, 25, 25, 25, 26, 26, - /* 1110 */ 223, 182, 182, 140, 140, 260, 141, 46, 182, 182, - /* 1120 */ 140, 140, 182, 141, 46, 137, 44, 182, 12, 209, - /* 1130 */ 45, 1, 140, 140, 210, 141, 46, 140, 140, 17, - /* 1140 */ 141, 46, 140, 140, 13, 141, 46, 247, 246, 55, - /* 1150 */ 247, 246, 55, 3, 182, 182, 182, 182, 247, 246, - /* 1160 */ 55, 10, 182, 247, 246, 55, 140, 140, 14, 141, - /* 1170 */ 46, 7, 247, 246, 55, 11, 182, 182, 182, 182, - /* 1180 */ 247, 246, 55, 2, 182, 182, 182, 247, 246, 55, - /* 1190 */ 247, 246, 55, 15, 247, 246, 55, 183, 8, 182, - /* 1200 */ 182, 182, 247, 246, 55, 182, 5, 137, 182, 182, - /* 1210 */ 176, 209, 247, 246, 55, 182, 210, 247, 246, 55, - /* 1220 */ 137, 182, 253, 182, 209, 247, 246, 55, 182, 210, - /* 1230 */ 182, 137, 137, 257, 6, 209, 209, 18, 182, 182, - /* 1240 */ 210, 210, 21, 137, 182, 20, 182, 209, 182, 4, - /* 1250 */ 182, 182, 210, 247, 246, 55, 247, 246, 55, 19, - /* 1260 */ 182, 247, 246, 55, 247, 246, 55, 22, 247, 246, - /* 1270 */ 55, 16, 182, 182, 182, 182, 182, 182, 247, 246, - /* 1280 */ 55, 182, 182, 182, 182, 182, 247, 246, 55, 182, - /* 1290 */ 247, 246, 55, + /* 0 */ 47, 57, 49, 65, 152, 39, 194, 40, 172, 64, + /* 10 */ 59, 195, 93, 67, 233, 155, 212, 29, 153, 41, + /* 20 */ 37, 36, 56, 53, 55, 47, 57, 49, 65, 177, + /* 30 */ 39, 247, 40, 172, 64, 59, 57, 93, 67, 25, + /* 40 */ 25, 178, 29, 202, 41, 37, 36, 56, 53, 55, + /* 50 */ 47, 161, 49, 65, 165, 39, 248, 40, 172, 64, + /* 60 */ 59, 224, 93, 67, 242, 126, 238, 29, 162, 41, + /* 70 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 182, + /* 80 */ 39, 97, 40, 172, 64, 59, 253, 93, 67, 109, + /* 90 */ 128, 201, 29, 189, 41, 37, 36, 56, 53, 55, + /* 100 */ 47, 231, 49, 65, 187, 39, 107, 40, 172, 64, + /* 110 */ 59, 204, 93, 67, 215, 124, 251, 29, 183, 41, + /* 120 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 169, + /* 130 */ 39, 191, 40, 172, 64, 59, 237, 93, 67, 196, + /* 140 */ 139, 111, 29, 171, 41, 37, 36, 56, 53, 55, + /* 150 */ 47, 231, 49, 65, 158, 39, 199, 40, 172, 64, + /* 160 */ 59, 57, 93, 67, 108, 127, 104, 29, 95, 41, + /* 170 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 151, + /* 180 */ 39, 197, 40, 172, 64, 59, 57, 93, 67, 106, + /* 190 */ 135, 193, 29, 239, 41, 37, 36, 56, 53, 55, + /* 200 */ 47, 231, 49, 65, 92, 39, 100, 40, 172, 64, + /* 210 */ 59, 244, 93, 67, 210, 125, 110, 29, 115, 41, + /* 220 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 160, + /* 230 */ 39, 243, 40, 172, 64, 59, 236, 93, 67, 252, + /* 240 */ 130, 209, 29, 50, 41, 37, 36, 56, 53, 55, + /* 250 */ 47, 231, 49, 65, 184, 39, 229, 40, 172, 64, + /* 260 */ 59, 246, 93, 67, 102, 131, 225, 29, 232, 41, + /* 270 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 173, + /* 280 */ 39, 241, 40, 172, 64, 59, 83, 93, 67, 88, + /* 290 */ 133, 87, 29, 179, 41, 37, 36, 56, 53, 55, + /* 300 */ 47, 231, 49, 65, 188, 39, 184, 40, 172, 64, + /* 310 */ 59, 90, 93, 67, 89, 129, 85, 29, 184, 41, + /* 320 */ 37, 36, 56, 53, 55, 47, 231, 49, 65, 168, + /* 330 */ 39, 84, 40, 172, 64, 59, 86, 93, 67, 355, + /* 340 */ 78, 79, 29, 184, 41, 37, 36, 56, 53, 55, + /* 350 */ 47, 76, 49, 65, 170, 39, 81, 40, 172, 64, + /* 360 */ 59, 74, 93, 67, 75, 71, 77, 29, 184, 41, + /* 370 */ 37, 36, 56, 53, 55, 47, 80, 49, 65, 181, + /* 380 */ 39, 73, 40, 172, 64, 59, 184, 93, 67, 82, + /* 390 */ 72, 70, 29, 184, 41, 37, 36, 56, 53, 55, + /* 400 */ 47, 91, 49, 65, 58, 39, 69, 40, 172, 64, + /* 410 */ 59, 184, 93, 67, 184, 184, 184, 29, 184, 41, + /* 420 */ 37, 36, 56, 53, 55, 47, 184, 49, 65, 185, + /* 430 */ 39, 184, 40, 172, 64, 59, 184, 93, 67, 184, + /* 440 */ 184, 184, 29, 184, 41, 37, 36, 56, 53, 55, + /* 450 */ 47, 184, 49, 65, 149, 39, 184, 40, 172, 64, + /* 460 */ 59, 184, 93, 67, 184, 184, 184, 29, 184, 41, + /* 470 */ 37, 36, 56, 53, 55, 47, 184, 49, 65, 175, + /* 480 */ 39, 184, 40, 172, 64, 59, 184, 93, 67, 184, + /* 490 */ 184, 184, 29, 57, 41, 37, 36, 56, 53, 55, + /* 500 */ 30, 31, 32, 32, 32, 32, 32, 32, 32, 27, + /* 510 */ 27, 27, 26, 26, 26, 25, 25, 26, 26, 26, + /* 520 */ 25, 25, 113, 47, 66, 49, 65, 156, 39, 184, + /* 530 */ 40, 172, 64, 59, 184, 93, 67, 184, 184, 184, + /* 540 */ 29, 184, 41, 37, 36, 56, 53, 55, 47, 184, + /* 550 */ 49, 65, 180, 39, 184, 40, 172, 64, 59, 184, + /* 560 */ 93, 67, 184, 184, 184, 29, 184, 41, 37, 36, + /* 570 */ 56, 53, 55, 30, 31, 32, 32, 32, 32, 32, + /* 580 */ 32, 32, 27, 27, 27, 26, 26, 26, 25, 25, + /* 590 */ 47, 184, 49, 65, 132, 39, 184, 40, 172, 64, + /* 600 */ 59, 184, 93, 67, 257, 231, 143, 29, 45, 41, + /* 610 */ 37, 36, 56, 53, 55, 140, 140, 123, 141, 48, + /* 620 */ 184, 351, 184, 148, 164, 250, 198, 263, 231, 30, + /* 630 */ 31, 32, 32, 32, 32, 32, 32, 32, 27, 27, + /* 640 */ 27, 26, 26, 26, 25, 25, 31, 32, 32, 32, + /* 650 */ 32, 32, 32, 32, 27, 27, 27, 26, 26, 26, + /* 660 */ 25, 25, 32, 32, 32, 32, 32, 32, 32, 27, + /* 670 */ 27, 27, 26, 26, 26, 25, 25, 167, 245, 223, + /* 680 */ 45, 223, 220, 184, 220, 174, 184, 140, 140, 234, + /* 690 */ 141, 48, 144, 220, 61, 220, 132, 28, 122, 220, + /* 700 */ 259, 15, 46, 132, 249, 262, 263, 231, 167, 223, + /* 710 */ 220, 94, 230, 263, 231, 227, 227, 233, 155, 184, + /* 720 */ 203, 200, 54, 230, 220, 51, 220, 226, 219, 184, + /* 730 */ 154, 208, 207, 205, 206, 211, 217, 218, 216, 147, + /* 740 */ 167, 220, 240, 4, 96, 184, 261, 261, 233, 155, + /* 750 */ 132, 24, 213, 184, 230, 184, 220, 62, 220, 219, + /* 760 */ 263, 231, 203, 200, 54, 184, 264, 184, 184, 184, + /* 770 */ 184, 167, 184, 220, 254, 184, 184, 184, 227, 227, + /* 780 */ 233, 155, 184, 99, 138, 42, 230, 220, 228, 220, + /* 790 */ 184, 219, 184, 222, 167, 231, 46, 112, 140, 140, + /* 800 */ 184, 141, 48, 167, 220, 174, 190, 184, 184, 227, + /* 810 */ 227, 233, 155, 184, 184, 98, 132, 230, 116, 220, + /* 820 */ 259, 220, 219, 105, 249, 262, 263, 231, 46, 140, + /* 830 */ 140, 184, 141, 48, 184, 167, 220, 184, 184, 184, + /* 840 */ 184, 227, 227, 233, 155, 219, 184, 101, 184, 230, + /* 850 */ 174, 220, 184, 220, 219, 140, 140, 184, 141, 48, + /* 860 */ 221, 132, 221, 117, 167, 259, 184, 167, 220, 249, + /* 870 */ 262, 263, 231, 227, 227, 233, 155, 254, 184, 103, + /* 880 */ 220, 230, 220, 220, 184, 220, 219, 138, 43, 184, + /* 890 */ 221, 228, 184, 167, 63, 184, 222, 220, 231, 220, + /* 900 */ 220, 220, 184, 184, 184, 227, 227, 233, 155, 220, + /* 910 */ 230, 220, 184, 230, 235, 219, 220, 184, 219, 167, + /* 920 */ 184, 140, 140, 184, 141, 48, 220, 134, 184, 230, + /* 930 */ 184, 227, 227, 233, 155, 220, 176, 220, 231, 230, + /* 940 */ 184, 184, 184, 184, 219, 184, 140, 140, 184, 141, + /* 950 */ 48, 184, 220, 184, 184, 137, 174, 261, 261, 233, + /* 960 */ 155, 184, 192, 184, 198, 230, 231, 132, 13, 260, + /* 970 */ 219, 259, 254, 184, 184, 249, 262, 263, 231, 174, + /* 980 */ 184, 184, 138, 44, 22, 142, 228, 203, 200, 54, + /* 990 */ 132, 222, 121, 231, 259, 184, 132, 174, 249, 262, + /* 1000 */ 263, 231, 9, 203, 200, 54, 263, 231, 132, 184, + /* 1010 */ 118, 184, 259, 184, 184, 174, 249, 262, 263, 231, + /* 1020 */ 184, 203, 200, 54, 38, 184, 132, 174, 145, 184, + /* 1030 */ 259, 184, 184, 184, 249, 262, 263, 231, 132, 184, + /* 1040 */ 120, 174, 259, 184, 184, 184, 249, 262, 263, 231, + /* 1050 */ 184, 68, 132, 184, 119, 184, 259, 184, 184, 184, + /* 1060 */ 249, 262, 263, 231, 184, 174, 33, 184, 184, 184, + /* 1070 */ 140, 140, 184, 141, 48, 184, 132, 184, 136, 174, + /* 1080 */ 259, 184, 184, 184, 249, 262, 263, 231, 140, 140, + /* 1090 */ 132, 141, 48, 146, 259, 184, 184, 174, 163, 262, + /* 1100 */ 263, 231, 52, 184, 132, 60, 184, 184, 132, 174, + /* 1110 */ 184, 184, 259, 184, 263, 231, 35, 262, 263, 231, + /* 1120 */ 132, 184, 184, 174, 259, 114, 184, 184, 186, 262, + /* 1130 */ 263, 231, 140, 140, 132, 141, 48, 184, 259, 184, + /* 1140 */ 184, 184, 34, 262, 263, 231, 214, 184, 140, 140, + /* 1150 */ 184, 141, 48, 184, 184, 184, 159, 140, 140, 184, + /* 1160 */ 141, 48, 184, 184, 184, 184, 138, 184, 184, 184, + /* 1170 */ 228, 184, 184, 166, 256, 222, 184, 231, 140, 140, + /* 1180 */ 184, 141, 48, 138, 138, 184, 21, 228, 228, 258, + /* 1190 */ 255, 184, 222, 222, 231, 231, 184, 184, 184, 138, + /* 1200 */ 138, 184, 150, 228, 228, 203, 200, 54, 222, 222, + /* 1210 */ 231, 231, 138, 3, 184, 137, 228, 184, 20, 184, + /* 1220 */ 184, 222, 157, 231, 198, 23, 231, 184, 184, 184, + /* 1230 */ 184, 184, 203, 200, 54, 18, 184, 203, 200, 54, + /* 1240 */ 11, 184, 184, 184, 203, 200, 54, 1, 140, 140, + /* 1250 */ 184, 141, 48, 2, 203, 200, 54, 17, 184, 203, + /* 1260 */ 200, 54, 10, 184, 184, 184, 203, 200, 54, 14, + /* 1270 */ 184, 184, 203, 200, 54, 5, 203, 200, 54, 16, + /* 1280 */ 184, 203, 200, 54, 6, 184, 184, 184, 203, 200, + /* 1290 */ 54, 19, 184, 184, 203, 200, 54, 7, 203, 200, + /* 1300 */ 54, 12, 184, 203, 200, 54, 8, 184, 184, 184, + /* 1310 */ 203, 200, 54, 184, 184, 184, 203, 200, 54, 184, + /* 1320 */ 203, 200, 54, 184, 184, 203, 200, 54, ); static public $yy_lookahead = array( - /* 0 */ 24, 81, 26, 27, 28, 29, 25, 31, 32, 33, - /* 10 */ 34, 91, 36, 37, 25, 70, 25, 41, 42, 43, - /* 20 */ 44, 45, 46, 47, 48, 24, 81, 26, 27, 28, - /* 30 */ 29, 25, 31, 32, 33, 34, 91, 36, 37, 25, - /* 40 */ 70, 64, 41, 42, 43, 44, 45, 46, 47, 48, - /* 50 */ 24, 81, 26, 27, 28, 29, 25, 31, 32, 33, - /* 60 */ 34, 91, 36, 37, 25, 70, 25, 41, 42, 43, - /* 70 */ 44, 45, 46, 47, 48, 24, 81, 26, 27, 28, - /* 80 */ 29, 25, 31, 32, 33, 34, 91, 36, 37, 67, - /* 90 */ 70, 40, 41, 63, 43, 44, 45, 46, 47, 48, - /* 100 */ 24, 81, 26, 27, 28, 29, 25, 31, 32, 33, - /* 110 */ 34, 91, 36, 37, 53, 54, 67, 41, 42, 43, - /* 120 */ 44, 45, 46, 47, 48, 24, 67, 26, 27, 28, - /* 130 */ 29, 81, 31, 32, 33, 34, 18, 36, 37, 25, - /* 140 */ 90, 23, 41, 42, 43, 44, 45, 46, 47, 48, - /* 150 */ 24, 18, 26, 27, 28, 29, 25, 31, 32, 33, - /* 160 */ 34, 18, 36, 37, 66, 67, 25, 41, 25, 43, - /* 170 */ 44, 45, 46, 47, 48, 24, 55, 26, 27, 28, - /* 180 */ 29, 25, 31, 32, 33, 34, 18, 36, 37, 18, - /* 190 */ 19, 25, 41, 25, 43, 44, 45, 46, 47, 48, - /* 200 */ 24, 53, 26, 27, 28, 29, 25, 31, 32, 33, - /* 210 */ 34, 18, 36, 37, 25, 25, 25, 41, 25, 43, - /* 220 */ 44, 45, 46, 47, 48, 24, 62, 26, 27, 28, + /* 0 */ 24, 18, 26, 27, 28, 29, 23, 31, 32, 33, + /* 10 */ 34, 25, 36, 37, 53, 54, 25, 41, 42, 43, + /* 20 */ 44, 45, 46, 47, 48, 24, 18, 26, 27, 28, + /* 30 */ 29, 25, 31, 32, 33, 34, 18, 36, 37, 18, + /* 40 */ 19, 40, 41, 25, 43, 44, 45, 46, 47, 48, + /* 50 */ 24, 53, 26, 27, 28, 29, 25, 31, 32, 33, + /* 60 */ 34, 25, 36, 37, 25, 81, 25, 41, 42, 43, + /* 70 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, + /* 80 */ 29, 25, 31, 32, 33, 34, 25, 36, 37, 25, + /* 90 */ 81, 25, 41, 42, 43, 44, 45, 46, 47, 48, + /* 100 */ 24, 92, 26, 27, 28, 29, 25, 31, 32, 33, + /* 110 */ 34, 25, 36, 37, 25, 81, 25, 41, 42, 43, + /* 120 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, + /* 130 */ 29, 25, 31, 32, 33, 34, 25, 36, 37, 25, + /* 140 */ 81, 25, 41, 42, 43, 44, 45, 46, 47, 48, + /* 150 */ 24, 92, 26, 27, 28, 29, 25, 31, 32, 33, + /* 160 */ 34, 18, 36, 37, 25, 81, 25, 41, 25, 43, + /* 170 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, + /* 180 */ 29, 25, 31, 32, 33, 34, 18, 36, 37, 25, + /* 190 */ 81, 25, 41, 25, 43, 44, 45, 46, 47, 48, + /* 200 */ 24, 92, 26, 27, 28, 29, 25, 31, 32, 33, + /* 210 */ 34, 25, 36, 37, 25, 81, 25, 41, 25, 43, + /* 220 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, /* 230 */ 29, 25, 31, 32, 33, 34, 25, 36, 37, 25, - /* 240 */ 25, 25, 41, 25, 43, 44, 45, 46, 47, 48, - /* 250 */ 24, 81, 26, 27, 28, 29, 25, 31, 32, 33, - /* 260 */ 34, 25, 36, 37, 25, 25, 25, 41, 25, 43, - /* 270 */ 44, 45, 46, 47, 48, 24, 67, 26, 27, 28, - /* 280 */ 29, 25, 31, 32, 33, 34, 25, 36, 37, 25, - /* 290 */ 68, 81, 41, 81, 43, 44, 45, 46, 47, 48, - /* 300 */ 24, 67, 26, 27, 28, 29, 81, 31, 32, 33, - /* 310 */ 34, 67, 36, 37, 81, 67, 67, 41, 81, 43, - /* 320 */ 44, 45, 46, 47, 48, 24, 67, 26, 27, 28, - /* 330 */ 29, 81, 31, 32, 33, 34, 81, 36, 37, 85, - /* 340 */ 25, 67, 41, 90, 43, 44, 45, 46, 47, 48, - /* 350 */ 24, 67, 26, 27, 28, 29, 81, 31, 32, 33, - /* 360 */ 34, 67, 36, 37, 67, 67, 81, 41, 81, 43, + /* 240 */ 81, 64, 41, 63, 43, 44, 45, 46, 47, 48, + /* 250 */ 24, 92, 26, 27, 28, 29, 62, 31, 32, 33, + /* 260 */ 34, 25, 36, 37, 25, 81, 68, 41, 55, 43, + /* 270 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, + /* 280 */ 29, 85, 31, 32, 33, 34, 67, 36, 37, 67, + /* 290 */ 81, 67, 41, 90, 43, 44, 45, 46, 47, 48, + /* 300 */ 24, 92, 26, 27, 28, 29, 93, 31, 32, 33, + /* 310 */ 34, 67, 36, 37, 67, 81, 67, 41, 93, 43, + /* 320 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, + /* 330 */ 29, 67, 31, 32, 33, 34, 67, 36, 37, 66, + /* 340 */ 67, 67, 41, 93, 43, 44, 45, 46, 47, 48, + /* 350 */ 24, 67, 26, 27, 28, 29, 67, 31, 32, 33, + /* 360 */ 34, 67, 36, 37, 67, 67, 67, 41, 93, 43, /* 370 */ 44, 45, 46, 47, 48, 24, 67, 26, 27, 28, - /* 380 */ 29, 67, 31, 32, 33, 34, 67, 36, 37, 67, - /* 390 */ 67, 67, 41, 92, 43, 44, 45, 46, 47, 48, + /* 380 */ 29, 67, 31, 32, 33, 34, 93, 36, 37, 67, + /* 390 */ 67, 67, 41, 93, 43, 44, 45, 46, 47, 48, /* 400 */ 24, 67, 26, 27, 28, 29, 67, 31, 32, 33, - /* 410 */ 34, 92, 36, 37, 92, 92, 92, 41, 92, 43, - /* 420 */ 44, 45, 46, 47, 48, 24, 92, 26, 27, 28, - /* 430 */ 29, 92, 31, 32, 33, 34, 92, 36, 37, 92, - /* 440 */ 92, 92, 41, 92, 43, 44, 45, 46, 47, 48, - /* 450 */ 24, 92, 26, 27, 28, 29, 13, 31, 32, 33, - /* 460 */ 34, 92, 36, 37, 92, 92, 92, 41, 25, 43, - /* 470 */ 44, 45, 46, 47, 48, 3, 4, 5, 6, 7, - /* 480 */ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - /* 490 */ 18, 19, 24, 92, 26, 27, 28, 29, 92, 31, - /* 500 */ 32, 33, 34, 92, 36, 37, 29, 64, 31, 41, - /* 510 */ 81, 43, 44, 45, 46, 47, 48, 88, 25, 90, - /* 520 */ 92, 24, 92, 26, 27, 28, 29, 55, 31, 32, - /* 530 */ 33, 34, 39, 36, 37, 92, 59, 92, 41, 92, - /* 540 */ 43, 44, 45, 46, 47, 48, 24, 92, 26, 27, - /* 550 */ 28, 29, 92, 31, 32, 33, 34, 92, 36, 37, - /* 560 */ 92, 30, 92, 41, 18, 43, 44, 45, 46, 47, - /* 570 */ 48, 3, 4, 5, 6, 7, 8, 9, 10, 11, - /* 580 */ 12, 13, 14, 15, 16, 17, 18, 19, 57, 58, - /* 590 */ 92, 60, 61, 25, 24, 49, 26, 27, 92, 29, - /* 600 */ 92, 31, 32, 33, 34, 92, 36, 37, 92, 92, - /* 610 */ 92, 41, 92, 43, 44, 45, 46, 47, 48, 3, - /* 620 */ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - /* 630 */ 14, 15, 16, 17, 18, 19, 4, 5, 6, 7, - /* 640 */ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - /* 650 */ 18, 19, 5, 6, 7, 8, 9, 10, 11, 12, - /* 660 */ 13, 14, 15, 16, 17, 18, 19, 13, 71, 92, - /* 670 */ 2, 29, 92, 31, 29, 70, 31, 92, 81, 25, - /* 680 */ 92, 13, 85, 29, 30, 31, 81, 90, 83, 92, - /* 690 */ 85, 46, 38, 92, 89, 90, 91, 29, 92, 31, - /* 700 */ 46, 59, 11, 81, 59, 51, 52, 53, 54, 92, - /* 710 */ 88, 92, 90, 59, 46, 92, 92, 92, 64, 51, - /* 720 */ 52, 53, 54, 92, 56, 92, 92, 59, 92, 38, - /* 730 */ 69, 92, 64, 72, 73, 74, 75, 76, 77, 78, - /* 740 */ 79, 80, 92, 92, 13, 84, 92, 86, 57, 58, - /* 750 */ 92, 60, 61, 13, 92, 70, 25, 92, 92, 92, - /* 760 */ 29, 30, 31, 92, 92, 25, 81, 92, 83, 29, - /* 770 */ 85, 31, 92, 92, 89, 90, 91, 46, 38, 92, - /* 780 */ 35, 92, 51, 52, 53, 54, 46, 92, 92, 92, - /* 790 */ 59, 51, 52, 53, 54, 64, 13, 92, 70, 59, - /* 800 */ 92, 92, 57, 58, 64, 60, 61, 13, 25, 81, - /* 810 */ 13, 83, 29, 85, 31, 92, 92, 89, 90, 91, - /* 820 */ 92, 38, 25, 29, 92, 31, 29, 92, 31, 46, - /* 830 */ 92, 92, 92, 92, 51, 52, 53, 54, 92, 92, - /* 840 */ 46, 92, 59, 46, 92, 92, 92, 64, 51, 52, - /* 850 */ 53, 54, 92, 59, 92, 92, 59, 13, 64, 92, - /* 860 */ 25, 64, 92, 70, 29, 92, 31, 92, 92, 25, - /* 870 */ 92, 13, 92, 29, 81, 31, 83, 92, 85, 92, - /* 880 */ 1, 46, 89, 90, 91, 92, 92, 29, 92, 31, - /* 890 */ 46, 92, 92, 92, 59, 51, 52, 53, 54, 20, - /* 900 */ 21, 22, 92, 59, 46, 1, 92, 92, 64, 51, - /* 910 */ 52, 53, 54, 92, 92, 92, 92, 59, 13, 92, - /* 920 */ 70, 92, 64, 92, 20, 21, 22, 70, 92, 92, - /* 930 */ 92, 81, 70, 83, 29, 85, 31, 92, 81, 89, - /* 940 */ 90, 91, 85, 81, 92, 92, 89, 90, 91, 87, - /* 950 */ 88, 46, 90, 91, 92, 70, 51, 52, 53, 54, - /* 960 */ 92, 92, 92, 92, 59, 92, 81, 70, 83, 64, - /* 970 */ 85, 92, 92, 92, 89, 90, 91, 92, 81, 70, - /* 980 */ 83, 92, 85, 92, 92, 92, 89, 90, 91, 92, - /* 990 */ 81, 70, 83, 92, 85, 92, 92, 92, 89, 90, - /* 1000 */ 91, 92, 81, 92, 83, 70, 85, 92, 92, 92, - /* 1010 */ 89, 90, 91, 92, 92, 92, 81, 92, 83, 92, - /* 1020 */ 85, 50, 70, 92, 89, 90, 91, 92, 57, 58, - /* 1030 */ 25, 60, 61, 81, 63, 70, 25, 85, 70, 92, - /* 1040 */ 11, 89, 90, 91, 25, 92, 81, 92, 92, 81, - /* 1050 */ 85, 92, 92, 85, 89, 90, 91, 89, 90, 91, - /* 1060 */ 92, 92, 57, 58, 71, 60, 61, 92, 57, 58, - /* 1070 */ 92, 60, 61, 92, 81, 82, 57, 58, 85, 60, - /* 1080 */ 61, 25, 92, 90, 71, 92, 57, 58, 92, 60, - /* 1090 */ 61, 92, 92, 30, 81, 82, 92, 92, 85, 92, - /* 1100 */ 25, 92, 92, 90, 92, 15, 16, 17, 18, 19, - /* 1110 */ 25, 92, 92, 57, 58, 71, 60, 61, 92, 92, - /* 1120 */ 57, 58, 92, 60, 61, 81, 82, 92, 1, 85, - /* 1130 */ 50, 1, 57, 58, 90, 60, 61, 57, 58, 1, - /* 1140 */ 60, 61, 57, 58, 1, 60, 61, 20, 21, 22, - /* 1150 */ 20, 21, 22, 1, 92, 92, 92, 92, 20, 21, - /* 1160 */ 22, 1, 92, 20, 21, 22, 57, 58, 1, 60, - /* 1170 */ 61, 1, 20, 21, 22, 1, 92, 92, 92, 92, - /* 1180 */ 20, 21, 22, 1, 92, 92, 92, 20, 21, 22, - /* 1190 */ 20, 21, 22, 1, 20, 21, 22, 71, 1, 92, - /* 1200 */ 92, 92, 20, 21, 22, 92, 1, 81, 92, 92, - /* 1210 */ 71, 85, 20, 21, 22, 92, 90, 20, 21, 22, - /* 1220 */ 81, 71, 71, 92, 85, 20, 21, 22, 92, 90, - /* 1230 */ 92, 81, 81, 71, 1, 85, 85, 1, 92, 92, - /* 1240 */ 90, 90, 1, 81, 92, 1, 92, 85, 92, 1, - /* 1250 */ 92, 92, 90, 20, 21, 22, 20, 21, 22, 1, - /* 1260 */ 92, 20, 21, 22, 20, 21, 22, 1, 20, 21, - /* 1270 */ 22, 1, 92, 92, 92, 92, 92, 92, 20, 21, - /* 1280 */ 22, 92, 92, 92, 92, 92, 20, 21, 22, 92, - /* 1290 */ 20, 21, 22, + /* 410 */ 34, 93, 36, 37, 93, 93, 93, 41, 93, 43, + /* 420 */ 44, 45, 46, 47, 48, 24, 93, 26, 27, 28, + /* 430 */ 29, 93, 31, 32, 33, 34, 93, 36, 37, 93, + /* 440 */ 93, 93, 41, 93, 43, 44, 45, 46, 47, 48, + /* 450 */ 24, 93, 26, 27, 28, 29, 93, 31, 32, 33, + /* 460 */ 34, 93, 36, 37, 93, 93, 93, 41, 93, 43, + /* 470 */ 44, 45, 46, 47, 48, 24, 93, 26, 27, 28, + /* 480 */ 29, 93, 31, 32, 33, 34, 93, 36, 37, 93, + /* 490 */ 93, 93, 41, 18, 43, 44, 45, 46, 47, 48, + /* 500 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + /* 510 */ 13, 14, 15, 16, 17, 18, 19, 15, 16, 17, + /* 520 */ 18, 19, 25, 24, 49, 26, 27, 28, 29, 93, + /* 530 */ 31, 32, 33, 34, 93, 36, 37, 93, 93, 93, + /* 540 */ 41, 93, 43, 44, 45, 46, 47, 48, 24, 93, + /* 550 */ 26, 27, 28, 29, 93, 31, 32, 33, 34, 93, + /* 560 */ 36, 37, 93, 93, 93, 41, 93, 43, 44, 45, + /* 570 */ 46, 47, 48, 3, 4, 5, 6, 7, 8, 9, + /* 580 */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + /* 590 */ 24, 93, 26, 27, 81, 29, 93, 31, 32, 33, + /* 600 */ 34, 93, 36, 37, 91, 92, 70, 41, 50, 43, + /* 610 */ 44, 45, 46, 47, 48, 57, 58, 81, 60, 61, + /* 620 */ 93, 63, 93, 87, 88, 55, 90, 91, 92, 3, + /* 630 */ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + /* 640 */ 14, 15, 16, 17, 18, 19, 4, 5, 6, 7, + /* 650 */ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + /* 660 */ 18, 19, 5, 6, 7, 8, 9, 10, 11, 12, + /* 670 */ 13, 14, 15, 16, 17, 18, 19, 13, 25, 29, + /* 680 */ 50, 31, 29, 93, 31, 70, 93, 57, 58, 25, + /* 690 */ 60, 61, 70, 29, 30, 31, 81, 2, 83, 46, + /* 700 */ 85, 1, 38, 81, 89, 90, 91, 92, 13, 59, + /* 710 */ 46, 25, 59, 91, 92, 51, 52, 53, 54, 93, + /* 720 */ 20, 21, 22, 59, 29, 39, 31, 69, 64, 93, + /* 730 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 70, + /* 740 */ 13, 46, 84, 1, 86, 93, 51, 52, 53, 54, + /* 750 */ 81, 56, 25, 93, 59, 93, 29, 30, 31, 64, + /* 760 */ 91, 92, 20, 21, 22, 93, 25, 93, 93, 93, + /* 770 */ 93, 13, 93, 46, 71, 93, 93, 93, 51, 52, + /* 780 */ 53, 54, 93, 25, 81, 82, 59, 29, 85, 31, + /* 790 */ 93, 64, 93, 90, 13, 92, 38, 25, 57, 58, + /* 800 */ 93, 60, 61, 13, 46, 70, 25, 93, 93, 51, + /* 810 */ 52, 53, 54, 93, 93, 25, 81, 59, 83, 29, + /* 820 */ 85, 31, 64, 25, 89, 90, 91, 92, 38, 57, + /* 830 */ 58, 93, 60, 61, 93, 13, 46, 93, 93, 93, + /* 840 */ 93, 51, 52, 53, 54, 64, 93, 25, 93, 59, + /* 850 */ 70, 29, 93, 31, 64, 57, 58, 93, 60, 61, + /* 860 */ 29, 81, 31, 83, 13, 85, 93, 13, 46, 89, + /* 870 */ 90, 91, 92, 51, 52, 53, 54, 71, 93, 25, + /* 880 */ 29, 59, 31, 29, 93, 31, 64, 81, 82, 93, + /* 890 */ 59, 85, 93, 13, 30, 93, 90, 46, 92, 29, + /* 900 */ 46, 31, 93, 93, 93, 51, 52, 53, 54, 29, + /* 910 */ 59, 31, 93, 59, 25, 64, 46, 93, 64, 13, + /* 920 */ 93, 57, 58, 93, 60, 61, 46, 81, 93, 59, + /* 930 */ 93, 51, 52, 53, 54, 29, 90, 31, 92, 59, + /* 940 */ 93, 93, 93, 93, 64, 93, 57, 58, 93, 60, + /* 950 */ 61, 93, 46, 93, 93, 81, 70, 51, 52, 53, + /* 960 */ 54, 93, 88, 93, 90, 59, 92, 81, 1, 83, + /* 970 */ 64, 85, 71, 93, 93, 89, 90, 91, 92, 70, + /* 980 */ 93, 93, 81, 82, 1, 70, 85, 20, 21, 22, + /* 990 */ 81, 90, 83, 92, 85, 93, 81, 70, 89, 90, + /* 1000 */ 91, 92, 1, 20, 21, 22, 91, 92, 81, 93, + /* 1010 */ 83, 93, 85, 93, 93, 70, 89, 90, 91, 92, + /* 1020 */ 93, 20, 21, 22, 11, 93, 81, 70, 83, 93, + /* 1030 */ 85, 93, 93, 93, 89, 90, 91, 92, 81, 93, + /* 1040 */ 83, 70, 85, 93, 93, 93, 89, 90, 91, 92, + /* 1050 */ 93, 38, 81, 93, 83, 93, 85, 93, 93, 93, + /* 1060 */ 89, 90, 91, 92, 93, 70, 35, 93, 93, 93, + /* 1070 */ 57, 58, 93, 60, 61, 93, 81, 93, 83, 70, + /* 1080 */ 85, 93, 93, 93, 89, 90, 91, 92, 57, 58, + /* 1090 */ 81, 60, 61, 70, 85, 93, 93, 70, 89, 90, + /* 1100 */ 91, 92, 11, 93, 81, 30, 93, 93, 81, 70, + /* 1110 */ 93, 93, 85, 93, 91, 92, 89, 90, 91, 92, + /* 1120 */ 81, 93, 93, 70, 85, 25, 93, 93, 89, 90, + /* 1130 */ 91, 92, 57, 58, 81, 60, 61, 93, 85, 93, + /* 1140 */ 93, 93, 89, 90, 91, 92, 25, 93, 57, 58, + /* 1150 */ 93, 60, 61, 93, 93, 93, 71, 57, 58, 93, + /* 1160 */ 60, 61, 93, 93, 93, 93, 81, 93, 93, 93, + /* 1170 */ 85, 93, 93, 71, 71, 90, 93, 92, 57, 58, + /* 1180 */ 93, 60, 61, 81, 81, 93, 1, 85, 85, 71, + /* 1190 */ 71, 93, 90, 90, 92, 92, 93, 93, 93, 81, + /* 1200 */ 81, 93, 71, 85, 85, 20, 21, 22, 90, 90, + /* 1210 */ 92, 92, 81, 1, 93, 81, 85, 93, 1, 93, + /* 1220 */ 93, 90, 88, 92, 90, 1, 92, 93, 93, 93, + /* 1230 */ 93, 93, 20, 21, 22, 1, 93, 20, 21, 22, + /* 1240 */ 1, 93, 93, 93, 20, 21, 22, 1, 57, 58, + /* 1250 */ 93, 60, 61, 1, 20, 21, 22, 1, 93, 20, + /* 1260 */ 21, 22, 1, 93, 93, 93, 20, 21, 22, 1, + /* 1270 */ 93, 93, 20, 21, 22, 1, 20, 21, 22, 1, + /* 1280 */ 93, 20, 21, 22, 1, 93, 93, 93, 20, 21, + /* 1290 */ 22, 1, 93, 93, 20, 21, 22, 1, 20, 21, + /* 1300 */ 22, 1, 93, 20, 21, 22, 1, 93, 93, 93, + /* 1310 */ 20, 21, 22, 93, 93, 93, 20, 21, 22, 93, + /* 1320 */ 20, 21, 22, 93, 93, 20, 21, 22, ); - const YY_SHIFT_USE_DFLT = -25; + const YY_SHIFT_USE_DFLT = -40; const YY_SHIFT_MAX = 189; static public $yy_shift_ofst = array( - /* 0 */ -25, 101, 51, -24, 76, 1, 26, 468, 497, 522, + /* 0 */ -40, 101, 51, -24, 76, 1, 26, 451, 499, 524, /* 10 */ 351, 426, 201, 226, 176, 151, 126, 276, 376, 326, - /* 20 */ 401, 301, 251, 570, 668, 668, 668, 668, 668, 668, - /* 30 */ 668, 668, 668, 668, 905, 905, 905, 905, 794, 731, - /* 40 */ 844, 797, 654, 740, 783, 858, 858, 858, 858, 858, - /* 50 */ 794, 794, 645, 645, 645, 645, 794, 645, 835, 1270, - /* 60 */ 1258, 645, 1236, 1233, 1241, 1244, 1248, 1205, 904, 879, - /* 70 */ 1130, 1127, 1182, 1174, 1170, 645, 645, 645, 1167, 1143, - /* 80 */ 645, 1160, 645, 645, 1152, 1138, 645, 1192, 645, 645, - /* 90 */ 1197, 1266, 443, 61, -25, -25, -25, -25, -25, -25, - /* 100 */ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - /* 110 */ -25, -25, -25, -25, -25, -25, 568, 472, 616, 616, - /* 120 */ 632, 647, 647, 691, 971, 1029, 1075, 1090, 1080, 1085, - /* 130 */ 1056, 745, 1005, 531, 1019, 1011, 1063, 1109, 1109, 1109, - /* 140 */ 642, 477, 143, 193, 168, 493, 118, 546, 171, 206, - /* 150 */ 191, 189, 190, 243, 261, 231, 236, 240, 156, 39, - /* 160 */ 41, -9, 31, 141, 56, 30, 315, 81, 133, -19, - /* 170 */ -23, 121, 241, 148, 166, 215, 214, 211, 216, 181, - /* 180 */ 218, 256, 164, 239, 264, 14, 6, -11, 131, 114, + /* 20 */ 401, 301, 251, 566, 695, 695, 695, 695, 695, 695, + /* 30 */ 695, 695, 695, 695, 906, 906, 906, 906, 851, 727, + /* 40 */ 822, 854, 664, 758, 790, 880, 880, 880, 880, 880, + /* 50 */ 851, 851, 870, 870, 870, 870, 851, 870, 653, 870, + /* 60 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 1296, + /* 70 */ 1283, 1278, 1274, 1290, 1305, 1300, 967, 1234, 1224, 1239, + /* 80 */ 1246, 1256, 1217, 1212, 742, 700, 983, 1252, 1185, 1001, + /* 90 */ 1261, 1268, 781, -39, -40, -40, -40, -40, -40, -40, + /* 100 */ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, + /* 110 */ -40, -40, -40, -40, -40, -40, 570, 497, 626, 626, + /* 120 */ 642, 657, 657, 558, 1013, 1100, 798, 1031, 889, 1075, + /* 130 */ 1121, 1091, 630, 864, 772, 741, 502, 1191, 1191, 1191, + /* 140 */ 650, 831, -17, 168, 143, 21, 475, 18, 686, 6, + /* 150 */ -9, -14, 31, 239, 189, -2, 186, 181, 156, 36, + /* 160 */ 166, 213, 191, 193, 180, 236, 194, 177, 206, 211, + /* 170 */ 214, 139, 64, 61, 8, 41, 56, 86, 116, 114, + /* 180 */ 111, 91, 106, 164, 89, 131, 81, 39, 66, 141, ); - const YY_REDUCE_USE_DFLT = -81; + const YY_REDUCE_USE_DFLT = -17; const YY_REDUCE_MAX = 115; static public $yy_reduce_ofst = array( - /* 0 */ 98, 661, 661, 661, 661, 661, 661, 661, 661, 661, - /* 10 */ 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, - /* 20 */ 661, 661, 661, 661, 850, 909, 685, 605, 897, 921, - /* 30 */ 885, 793, 935, 728, 968, 857, 965, 952, 862, 993, - /* 40 */ 1013, 1044, 1151, 1151, 1151, 1162, 1150, 1139, 1126, 597, - /* 50 */ 622, 429, -30, -5, 20, -55, 50, -80, 287, 222, - /* 60 */ 222, 285, 222, 222, 222, 222, 222, 222, 222, 222, - /* 70 */ 222, 222, 222, 222, 222, 237, 225, 210, 222, 222, - /* 80 */ 212, 222, 170, 275, 222, 222, 233, 222, 255, 250, - /* 90 */ 222, 222, 253, 254, 284, 274, 259, 234, 209, 244, - /* 100 */ 249, 248, 294, 334, 323, 324, 339, 319, 322, 298, - /* 110 */ 297, 314, 309, 22, 59, 49, + /* 0 */ 273, 658, 658, 658, 658, 658, 658, 658, 658, 658, + /* 10 */ 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, + /* 20 */ 658, 658, 658, 658, 735, 886, 945, 995, 927, 780, + /* 30 */ 957, 909, 615, 971, 1039, 1009, 1027, 1053, 536, 703, + /* 40 */ 901, 806, 1119, 1119, 1119, 1118, 1103, 1085, 1102, 1131, + /* 50 */ 874, 1134, 669, 622, 915, 1023, 846, 513, 109, 84, + /* 60 */ 59, 9, 159, 134, 209, -16, 234, 34, 184, 198, + /* 70 */ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + /* 80 */ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + /* 90 */ 198, 198, 203, 196, 322, 298, 323, 334, 297, 224, + /* 100 */ 249, 269, 274, 264, 289, 284, 222, 219, 247, 244, + /* 110 */ 294, 339, 299, 309, 314, 324, ); static public $yyExpectedTokens = array( /* 0 */ array(), /* 1 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), - /* 2 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 40, 41, 43, 44, 45, 46, 47, 48, ), + /* 2 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), /* 3 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), /* 4 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), - /* 5 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), + /* 5 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 40, 41, 43, 44, 45, 46, 47, 48, ), /* 6 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 42, 43, 44, 45, 46, 47, 48, ), /* 7 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 43, 44, 45, 46, 47, 48, ), /* 8 */ array(24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 41, 43, 44, 45, 46, 47, 48, ), @@ -648,37 +654,37 @@ static public $yy_action = array( /* 56 */ array(13, 29, 31, 46, 59, 64, ), /* 57 */ array(29, 31, 46, 59, ), /* 58 */ array(25, 29, 31, 46, 59, ), - /* 59 */ array(1, 20, 21, 22, ), - /* 60 */ array(1, 20, 21, 22, ), + /* 59 */ array(29, 31, 46, 59, ), + /* 60 */ array(29, 31, 46, 59, ), /* 61 */ array(29, 31, 46, 59, ), - /* 62 */ array(1, 20, 21, 22, ), - /* 63 */ array(1, 20, 21, 22, ), - /* 64 */ array(1, 20, 21, 22, ), - /* 65 */ array(1, 20, 21, 22, ), - /* 66 */ array(1, 20, 21, 22, ), - /* 67 */ array(1, 20, 21, 22, ), - /* 68 */ array(1, 20, 21, 22, ), + /* 62 */ array(29, 31, 46, 59, ), + /* 63 */ array(29, 31, 46, 59, ), + /* 64 */ array(29, 31, 46, 59, ), + /* 65 */ array(29, 31, 46, 59, ), + /* 66 */ array(29, 31, 46, 59, ), + /* 67 */ array(29, 31, 46, 59, ), + /* 68 */ array(29, 31, 46, 59, ), /* 69 */ array(1, 20, 21, 22, ), /* 70 */ array(1, 20, 21, 22, ), /* 71 */ array(1, 20, 21, 22, ), /* 72 */ array(1, 20, 21, 22, ), /* 73 */ array(1, 20, 21, 22, ), /* 74 */ array(1, 20, 21, 22, ), - /* 75 */ array(29, 31, 46, 59, ), - /* 76 */ array(29, 31, 46, 59, ), - /* 77 */ array(29, 31, 46, 59, ), + /* 75 */ array(1, 20, 21, 22, ), + /* 76 */ array(1, 20, 21, 22, ), + /* 77 */ array(1, 20, 21, 22, ), /* 78 */ array(1, 20, 21, 22, ), /* 79 */ array(1, 20, 21, 22, ), - /* 80 */ array(29, 31, 46, 59, ), + /* 80 */ array(1, 20, 21, 22, ), /* 81 */ array(1, 20, 21, 22, ), - /* 82 */ array(29, 31, 46, 59, ), - /* 83 */ array(29, 31, 46, 59, ), + /* 82 */ array(1, 20, 21, 22, ), + /* 83 */ array(1, 20, 21, 22, ), /* 84 */ array(1, 20, 21, 22, ), /* 85 */ array(1, 20, 21, 22, ), - /* 86 */ array(29, 31, 46, 59, ), + /* 86 */ array(1, 20, 21, 22, ), /* 87 */ array(1, 20, 21, 22, ), - /* 88 */ array(29, 31, 46, 59, ), - /* 89 */ array(29, 31, 46, 59, ), + /* 88 */ array(1, 20, 21, 22, ), + /* 89 */ array(1, 20, 21, 22, ), /* 90 */ array(1, 20, 21, 22, ), /* 91 */ array(1, 20, 21, 22, ), /* 92 */ array(13, 25, 64, ), @@ -705,65 +711,65 @@ static public $yy_action = array( /* 113 */ array(), /* 114 */ array(), /* 115 */ array(), - /* 116 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 25, ), - /* 117 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 55, ), + /* 116 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 55, ), + /* 117 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 25, ), /* 118 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ), /* 119 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ), /* 120 */ array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ), /* 121 */ array(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ), /* 122 */ array(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ), - /* 123 */ array(11, 38, 57, 58, 60, 61, ), - /* 124 */ array(50, 57, 58, 60, 61, 63, ), - /* 125 */ array(11, 57, 58, 60, 61, ), + /* 123 */ array(50, 57, 58, 60, 61, 63, ), + /* 124 */ array(11, 38, 57, 58, 60, 61, ), + /* 125 */ array(25, 57, 58, 60, 61, ), /* 126 */ array(25, 57, 58, 60, 61, ), - /* 127 */ array(15, 16, 17, 18, 19, ), - /* 128 */ array(50, 57, 58, 60, 61, ), - /* 129 */ array(25, 57, 58, 60, 61, ), + /* 127 */ array(35, 57, 58, 60, 61, ), + /* 128 */ array(25, 57, 58, 60, 61, ), + /* 129 */ array(30, 57, 58, 60, 61, ), /* 130 */ array(25, 57, 58, 60, 61, ), - /* 131 */ array(35, 57, 58, 60, 61, ), - /* 132 */ array(25, 57, 58, 60, 61, ), + /* 131 */ array(11, 57, 58, 60, 61, ), + /* 132 */ array(50, 57, 58, 60, 61, ), /* 133 */ array(30, 57, 58, 60, 61, ), /* 134 */ array(25, 57, 58, 60, 61, ), /* 135 */ array(25, 57, 58, 60, 61, ), - /* 136 */ array(30, 57, 58, 60, 61, ), + /* 136 */ array(15, 16, 17, 18, 19, ), /* 137 */ array(57, 58, 60, 61, ), /* 138 */ array(57, 58, 60, 61, ), /* 139 */ array(57, 58, 60, 61, ), /* 140 */ array(29, 31, 59, ), /* 141 */ array(29, 31, 59, ), - /* 142 */ array(18, 25, ), + /* 142 */ array(18, 23, ), /* 143 */ array(18, 25, ), /* 144 */ array(18, 25, ), - /* 145 */ array(25, 39, ), - /* 146 */ array(18, 23, ), - /* 147 */ array(18, 49, ), - /* 148 */ array(18, 19, ), + /* 145 */ array(18, 19, ), + /* 146 */ array(18, 49, ), + /* 147 */ array(18, 25, ), + /* 148 */ array(25, 39, ), /* 149 */ array(25, ), /* 150 */ array(25, ), /* 151 */ array(25, ), /* 152 */ array(25, ), /* 153 */ array(25, ), /* 154 */ array(25, ), - /* 155 */ array(25, ), + /* 155 */ array(53, ), /* 156 */ array(25, ), /* 157 */ array(25, ), /* 158 */ array(25, ), /* 159 */ array(25, ), /* 160 */ array(25, ), - /* 161 */ array(25, ), + /* 161 */ array(55, ), /* 162 */ array(25, ), /* 163 */ array(25, ), - /* 164 */ array(25, ), - /* 165 */ array(63, ), - /* 166 */ array(25, ), - /* 167 */ array(25, ), - /* 168 */ array(18, ), + /* 164 */ array(63, ), + /* 165 */ array(25, ), + /* 166 */ array(62, ), + /* 167 */ array(64, ), + /* 168 */ array(25, ), /* 169 */ array(25, ), - /* 170 */ array(64, ), - /* 171 */ array(55, ), + /* 170 */ array(25, ), + /* 171 */ array(25, ), /* 172 */ array(25, ), - /* 173 */ array(53, ), - /* 174 */ array(25, ), + /* 173 */ array(25, ), + /* 174 */ array(18, ), /* 175 */ array(25, ), /* 176 */ array(25, ), /* 177 */ array(25, ), @@ -771,7 +777,7 @@ static public $yy_action = array( /* 179 */ array(25, ), /* 180 */ array(25, ), /* 181 */ array(25, ), - /* 182 */ array(62, ), + /* 182 */ array(25, ), /* 183 */ array(25, ), /* 184 */ array(25, ), /* 185 */ array(25, ), @@ -853,35 +859,36 @@ static public $yy_action = array( /* 261 */ array(), /* 262 */ array(), /* 263 */ array(), + /* 264 */ array(), ); static public $yy_default = array( - /* 0 */ 266, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 10 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 20 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 30 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 40 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 50 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 60 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 264, - /* 70 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 80 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 90 */ 352, 352, 352, 352, 266, 266, 266, 266, 266, 266, - /* 100 */ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, - /* 110 */ 266, 266, 266, 266, 266, 266, 352, 352, 333, 291, - /* 120 */ 334, 335, 337, 352, 319, 352, 352, 336, 319, 352, - /* 130 */ 352, 352, 352, 352, 352, 352, 352, 323, 349, 315, - /* 140 */ 352, 352, 352, 352, 352, 352, 352, 352, 338, 352, - /* 150 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 160 */ 352, 352, 352, 352, 352, 352, 352, 352, 327, 352, - /* 170 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 180 */ 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, - /* 190 */ 273, 267, 305, 274, 272, 303, 279, 288, 313, 278, - /* 200 */ 265, 276, 277, 275, 297, 331, 342, 348, 347, 326, - /* 210 */ 324, 295, 325, 332, 298, 350, 343, 271, 346, 345, - /* 220 */ 280, 344, 351, 286, 309, 341, 292, 293, 340, 339, - /* 230 */ 328, 329, 330, 294, 308, 302, 306, 304, 301, 307, - /* 240 */ 296, 299, 300, 317, 310, 285, 269, 268, 270, 284, - /* 250 */ 281, 282, 283, 320, 321, 316, 311, 318, 290, 289, - /* 260 */ 322, 287, 314, 312, + /* 0 */ 267, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 10 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 20 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 30 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 40 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 50 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 60 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 70 */ 354, 354, 354, 354, 354, 354, 354, 354, 265, 354, + /* 80 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 90 */ 354, 354, 354, 354, 267, 267, 267, 267, 267, 267, + /* 100 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, + /* 110 */ 267, 267, 267, 267, 267, 267, 354, 354, 334, 292, + /* 120 */ 335, 336, 338, 320, 354, 354, 354, 354, 354, 354, + /* 130 */ 354, 354, 320, 354, 354, 354, 337, 351, 324, 316, + /* 140 */ 354, 354, 354, 354, 354, 339, 354, 354, 354, 354, + /* 150 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 160 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 170 */ 354, 354, 354, 354, 328, 354, 354, 354, 354, 354, + /* 180 */ 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + /* 190 */ 313, 304, 349, 289, 271, 299, 314, 315, 350, 298, + /* 200 */ 270, 306, 296, 269, 297, 276, 277, 275, 274, 353, + /* 210 */ 273, 278, 279, 284, 285, 283, 282, 280, 281, 352, + /* 220 */ 348, 345, 325, 344, 272, 266, 268, 326, 327, 346, + /* 230 */ 347, 343, 333, 332, 286, 287, 301, 302, 300, 295, + /* 240 */ 293, 294, 303, 305, 310, 311, 309, 308, 307, 342, + /* 250 */ 341, 290, 291, 288, 323, 321, 322, 317, 319, 331, + /* 260 */ 340, 330, 329, 318, 312, ); /* The next thing included is series of defines which control ** various aspects of the generated parser. @@ -898,10 +905,10 @@ static public $yy_action = array( ** self::YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ - const YYNOCODE = 93; + const YYNOCODE = 94; const YYSTACKDEPTH = 100; - const YYNSTATE = 264; - const YYNRULE = 88; + const YYNSTATE = 265; + const YYNRULE = 89; const YYERRORSYMBOL = 65; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; @@ -1007,6 +1014,7 @@ static public $yy_action = array( 'ifequal', 'varname', 'params', 'expr', 'regroup', 'string', 'for_def', 'range', 'numvar', 'fvar_or_string', 'number', 'varname_args', + 'varpart', ); /** @@ -1092,16 +1100,17 @@ static public $yy_action = array( /* 75 */ "expr ::= expr T_BITWISE|T_PIPE expr", /* 76 */ "expr ::= T_LPARENT expr T_RPARENT", /* 77 */ "expr ::= fvar_or_string", - /* 78 */ "varname ::= varname T_OBJ|T_DOT T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK", - /* 79 */ "varname ::= varname T_CLASS T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK", - /* 80 */ "varname ::= varname T_BRACKETS_OPEN var_or_string T_BRACKETS_CLOSE", - /* 81 */ "varname ::= T_ALPHA", - /* 82 */ "varname ::= T_BLOCK|T_CUSTOM_TAG|T_CUSTOM_BLOCK", - /* 83 */ "range ::= numvar T_DOTDOT numvar", - /* 84 */ "numvar ::= number", - /* 85 */ "numvar ::= varname", - /* 86 */ "number ::= T_NUMERIC", - /* 87 */ "number ::= T_MINUS T_NUMERIC", + /* 78 */ "varname ::= varpart", + /* 79 */ "varpart ::= varname T_OBJ|T_DOT T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK", + /* 80 */ "varpart ::= varname T_CLASS T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK", + /* 81 */ "varpart ::= varname T_BRACKETS_OPEN var_or_string T_BRACKETS_CLOSE", + /* 82 */ "varpart ::= T_ALPHA", + /* 83 */ "varpart ::= T_BLOCK|T_CUSTOM_TAG|T_CUSTOM_BLOCK", + /* 84 */ "range ::= numvar T_DOTDOT numvar", + /* 85 */ "numvar ::= number", + /* 86 */ "numvar ::= varname", + /* 87 */ "number ::= T_NUMERIC", + /* 88 */ "number ::= T_MINUS T_NUMERIC", ); /** @@ -1544,11 +1553,12 @@ static public $yy_action = array( array( 'lhs' => 83, 'rhs' => 3 ), array( 'lhs' => 83, 'rhs' => 3 ), array( 'lhs' => 83, 'rhs' => 1 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 1 ), array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 92, 'rhs' => 3 ), + array( 'lhs' => 92, 'rhs' => 3 ), + array( 'lhs' => 92, 'rhs' => 4 ), + array( 'lhs' => 92, 'rhs' => 1 ), + array( 'lhs' => 92, 'rhs' => 1 ), array( 'lhs' => 87, 'rhs' => 3 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), @@ -1585,10 +1595,10 @@ static public $yy_action = array( 55 => 9, 67 => 9, 77 => 9, - 81 => 9, 82 => 9, - 84 => 9, - 86 => 9, + 83 => 9, + 85 => 9, + 87 => 9, 14 => 14, 18 => 18, 19 => 19, @@ -1630,6 +1640,7 @@ static public $yy_action = array( 54 => 54, 56 => 56, 59 => 59, + 86 => 59, 60 => 60, 64 => 60, 61 => 61, @@ -1648,9 +1659,9 @@ static public $yy_action = array( 78 => 78, 79 => 79, 80 => 80, - 83 => 83, - 85 => 85, - 87 => 87, + 81 => 81, + 84 => 84, + 88 => 88, ); /* Beginning here are the reduction cases. A typical example ** follows: @@ -1660,43 +1671,43 @@ static public $yy_action = array( */ #line 80 "Parser.y" function yy_r0(){ $this->body = $this->yystack[$this->yyidx + 0]->minor; } -#line 1669 "Parser.php" +#line 1680 "Parser.php" #line 82 "Parser.y" function yy_r1(){ $this->_retvalue=$this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } -#line 1672 "Parser.php" +#line 1683 "Parser.php" #line 83 "Parser.y" function yy_r2(){ $this->_retvalue = array(); } -#line 1675 "Parser.php" +#line 1686 "Parser.php" #line 86 "Parser.y" function yy_r3(){ if (count($this->yystack[$this->yyidx + 0]->minor)) $this->yystack[$this->yyidx + 0]->minor['line'] = $this->lex->getLine(); $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -#line 1678 "Parser.php" +#line 1689 "Parser.php" #line 87 "Parser.y" function yy_r4(){ $this->_retvalue = array('operation' => 'html', 'html' => $this->yystack[$this->yyidx + 0]->minor, 'line' => $this->lex->getLine() ); } -#line 1683 "Parser.php" +#line 1694 "Parser.php" #line 90 "Parser.y" function yy_r5(){ $this->yystack[$this->yyidx + 0]->minor=rtrim($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = array('operation' => 'comment', 'comment' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1688 "Parser.php" +#line 1699 "Parser.php" #line 93 "Parser.y" function yy_r6(){ $this->_retvalue = array('operation' => 'print_var', 'variable' => $this->yystack[$this->yyidx + -1]->minor, 'line' => $this->lex->getLine() ); } -#line 1693 "Parser.php" +#line 1704 "Parser.php" #line 97 "Parser.y" function yy_r7(){ $this->_retvalue = array('operation' => 'base', $this->yystack[$this->yyidx + -1]->minor); } -#line 1696 "Parser.php" +#line 1707 "Parser.php" #line 98 "Parser.y" function yy_r8(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } -#line 1699 "Parser.php" +#line 1710 "Parser.php" #line 99 "Parser.y" function yy_r9(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -#line 1702 "Parser.php" +#line 1713 "Parser.php" #line 104 "Parser.y" function yy_r14(){ $this->_retvalue = array('operation' => 'include', $this->yystack[$this->yyidx + -1]->minor); } -#line 1705 "Parser.php" +#line 1716 "Parser.php" #line 108 "Parser.y" function yy_r18(){ $this->yystack[$this->yyidx + -5]->minor = strtolower($this->yystack[$this->yyidx + -5]->minor); @@ -1708,27 +1719,27 @@ static public $yy_action = array( } $this->_retvalue = array('operation' => 'autoescape', 'value' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1717 "Parser.php" +#line 1728 "Parser.php" #line 122 "Parser.y" function yy_r19(){ $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -1]->minor, 'list'=>array()); } -#line 1722 "Parser.php" +#line 1733 "Parser.php" #line 125 "Parser.y" function yy_r20(){ $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -3]->minor, 'as' => $this->yystack[$this->yyidx + -1]->minor, 'list'=>array()); } -#line 1727 "Parser.php" +#line 1738 "Parser.php" #line 128 "Parser.y" function yy_r21(){ $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -2]->minor, 'list' => $this->yystack[$this->yyidx + -1]->minor); } -#line 1732 "Parser.php" +#line 1743 "Parser.php" #line 131 "Parser.y" function yy_r22(){ $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -4]->minor, 'as' => $this->yystack[$this->yyidx + -1]->minor, 'list' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1737 "Parser.php" +#line 1748 "Parser.php" #line 136 "Parser.y" function yy_r23(){ if ('end'.$this->yystack[$this->yyidx + -5]->minor != $this->yystack[$this->yyidx + -1]->minor) { @@ -1736,7 +1747,7 @@ static public $yy_action = array( } $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor, 'list' => array()); } -#line 1745 "Parser.php" +#line 1756 "Parser.php" #line 142 "Parser.y" function yy_r24(){ if ('end'.$this->yystack[$this->yyidx + -6]->minor != $this->yystack[$this->yyidx + -1]->minor) { @@ -1744,7 +1755,7 @@ static public $yy_action = array( } $this->_retvalue = array('operation' => 'custom_tag', 'name' => $this->yystack[$this->yyidx + -6]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor, 'list' => $this->yystack[$this->yyidx + -5]->minor); } -#line 1753 "Parser.php" +#line 1764 "Parser.php" #line 150 "Parser.y" function yy_r25(){ if ('endspacefull' != $this->yystack[$this->yyidx + -1]->minor) { @@ -1752,7 +1763,7 @@ static public $yy_action = array( } $this->_retvalue = array('operation' => 'spacefull', 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1761 "Parser.php" +#line 1772 "Parser.php" #line 158 "Parser.y" function yy_r26(){ if ($this->yystack[$this->yyidx + -1]->minor != "endwith") { @@ -1760,10 +1771,10 @@ static public $yy_action = array( } $this->_retvalue = array('operation' => 'alias', 'var' => $this->yystack[$this->yyidx + -7]->minor, 'as' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1769 "Parser.php" +#line 1780 "Parser.php" #line 166 "Parser.y" function yy_r27(){ $this->_retvalue = array('operation' => 'set', 'var' => $this->yystack[$this->yyidx + -2]->minor,'expr' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1772 "Parser.php" +#line 1783 "Parser.php" #line 168 "Parser.y" function yy_r29(){ if (!is_file($this->yystack[$this->yyidx + 0]->minor) || !Haanga_Compiler::getOption('enable_load')) { @@ -1771,18 +1782,29 @@ static public $yy_action = array( } require_once $this->yystack[$this->yyidx + 0]->minor; } -#line 1780 "Parser.php" +#line 1791 "Parser.php" #line 177 "Parser.y" function yy_r30(){ + $var = $this->compiler->get_context($this->yystack[$this->yyidx + -1]->minor[0]); + if (is_array($var) || $var instanceof Iterator) { + /* let's check if it is an object or array */ + $this->compiler->set_context($this->yystack[$this->yyidx + -3]->minor, current($var)); + } $this->_retvalue = array('operation' => 'loop', 'variable' => $this->yystack[$this->yyidx + -3]->minor, 'index' => NULL, 'array' => $this->yystack[$this->yyidx + -1]->minor); } -#line 1785 "Parser.php" -#line 181 "Parser.y" +#line 1801 "Parser.php" +#line 185 "Parser.y" function yy_r31(){ + $var = $this->compiler->get_context($this->yystack[$this->yyidx + -1]->minor[0]); + if (is_array($var) || $var instanceof Iterator) { + /* let's check if it is an object or array */ + $this->compiler->set_context($this->yystack[$this->yyidx + -3]->minor, current($var)); + } $this->_retvalue = array('operation' => 'loop', 'variable' => $this->yystack[$this->yyidx + -3]->minor, 'index' => $this->yystack[$this->yyidx + -5]->minor, 'array' => $this->yystack[$this->yyidx + -1]->minor); + } -#line 1790 "Parser.php" -#line 186 "Parser.y" +#line 1812 "Parser.php" +#line 195 "Parser.y" function yy_r32(){ if ($this->yystack[$this->yyidx + -1]->minor != "endfor") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endfor"); @@ -1790,24 +1812,24 @@ static public $yy_action = array( $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor; $this->_retvalue['body'] = $this->yystack[$this->yyidx + -3]->minor; } -#line 1799 "Parser.php" -#line 194 "Parser.y" +#line 1821 "Parser.php" +#line 203 "Parser.y" function yy_r33(){ if ($this->yystack[$this->yyidx + -1]->minor != "endfor") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endfor"); } $this->_retvalue = array('operation' => 'loop', 'variable' => $this->yystack[$this->yyidx + -7]->minor, 'range' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor, 'variable' => $this->yystack[$this->yyidx + -7]->minor, 'step' => 1); } -#line 1807 "Parser.php" -#line 201 "Parser.y" +#line 1829 "Parser.php" +#line 210 "Parser.y" function yy_r34(){ if ($this->yystack[$this->yyidx + -1]->minor != "endfor") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endfor"); } $this->_retvalue = array('operation' => 'loop', 'variable' => $this->yystack[$this->yyidx + -9]->minor, 'range' => $this->yystack[$this->yyidx + -7]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor, 'variable' => $this->yystack[$this->yyidx + -9]->minor, 'step' => $this->yystack[$this->yyidx + -5]->minor); } -#line 1815 "Parser.php" -#line 208 "Parser.y" +#line 1837 "Parser.php" +#line 217 "Parser.y" function yy_r35(){ if ($this->yystack[$this->yyidx + -1]->minor != "endfor") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endfor"); @@ -1816,191 +1838,191 @@ static public $yy_action = array( $this->_retvalue['body'] = $this->yystack[$this->yyidx + -7]->minor; $this->_retvalue['empty'] = $this->yystack[$this->yyidx + -3]->minor; } -#line 1825 "Parser.php" -#line 217 "Parser.y" +#line 1847 "Parser.php" +#line 226 "Parser.y" function yy_r36(){ if ($this->yystack[$this->yyidx + -1]->minor != "endif") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endif"); } $this->_retvalue = array('operation' => 'if', 'expr' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1833 "Parser.php" -#line 223 "Parser.y" +#line 1855 "Parser.php" +#line 232 "Parser.y" function yy_r37(){ if ($this->yystack[$this->yyidx + -1]->minor != "endif") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endif"); } $this->_retvalue = array('operation' => 'if', 'expr' => $this->yystack[$this->yyidx + -9]->minor, 'body' => $this->yystack[$this->yyidx + -7]->minor, 'else' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1841 "Parser.php" -#line 231 "Parser.y" +#line 1863 "Parser.php" +#line 240 "Parser.y" function yy_r38(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifchanged") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifchanged"); } $this->_retvalue = array('operation' => 'ifchanged', 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1849 "Parser.php" -#line 238 "Parser.y" +#line 1871 "Parser.php" +#line 247 "Parser.y" function yy_r39(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifchanged") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifchanged"); } $this->_retvalue = array('operation' => 'ifchanged', 'body' => $this->yystack[$this->yyidx + -3]->minor, 'check' => $this->yystack[$this->yyidx + -5]->minor); } -#line 1857 "Parser.php" -#line 244 "Parser.y" +#line 1879 "Parser.php" +#line 253 "Parser.y" function yy_r40(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifchanged") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifchanged"); } $this->_retvalue = array('operation' => 'ifchanged', 'body' => $this->yystack[$this->yyidx + -7]->minor, 'else' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1865 "Parser.php" -#line 251 "Parser.y" +#line 1887 "Parser.php" +#line 260 "Parser.y" function yy_r41(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifchanged") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifchanged"); } $this->_retvalue = array('operation' => 'ifchanged', 'body' => $this->yystack[$this->yyidx + -7]->minor, 'check' => $this->yystack[$this->yyidx + -9]->minor, 'else' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1873 "Parser.php" -#line 259 "Parser.y" +#line 1895 "Parser.php" +#line 268 "Parser.y" function yy_r42(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifequal") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifequal"); } $this->_retvalue = array('operation' => 'ifequal', 'cmp' => '==', 1 => $this->yystack[$this->yyidx + -6]->minor, 2 => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1881 "Parser.php" -#line 265 "Parser.y" +#line 1903 "Parser.php" +#line 274 "Parser.y" function yy_r43(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifequal") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifequal"); } $this->_retvalue = array('operation' => 'ifequal', 'cmp' => '==', 1 => $this->yystack[$this->yyidx + -10]->minor, 2 => $this->yystack[$this->yyidx + -9]->minor, 'body' => $this->yystack[$this->yyidx + -7]->minor, 'else' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1889 "Parser.php" -#line 271 "Parser.y" +#line 1911 "Parser.php" +#line 280 "Parser.y" function yy_r44(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifnotequal") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifnotequal"); } $this->_retvalue = array('operation' => 'ifequal', 'cmp' => '!=', 1 => $this->yystack[$this->yyidx + -6]->minor, 2 => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1897 "Parser.php" -#line 277 "Parser.y" +#line 1919 "Parser.php" +#line 286 "Parser.y" function yy_r45(){ if ($this->yystack[$this->yyidx + -1]->minor != "endifnotequal") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endifnotequal"); } $this->_retvalue = array('operation' => 'ifequal', 'cmp' => '!=', 1 => $this->yystack[$this->yyidx + -10]->minor, 2 => $this->yystack[$this->yyidx + -9]->minor, 'body' => $this->yystack[$this->yyidx + -7]->minor, 'else' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1905 "Parser.php" -#line 285 "Parser.y" +#line 1927 "Parser.php" +#line 294 "Parser.y" function yy_r46(){ if ($this->yystack[$this->yyidx + -1]->minor != "endblock") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endblock"); } $this->_retvalue = array('operation' => 'block', 'name' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1913 "Parser.php" -#line 292 "Parser.y" +#line 1935 "Parser.php" +#line 301 "Parser.y" function yy_r47(){ if ($this->yystack[$this->yyidx + -2]->minor != "endblock") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -2]->minor.", expecting endblock"); } $this->_retvalue = array('operation' => 'block', 'name' => $this->yystack[$this->yyidx + -6]->minor, 'body' => $this->yystack[$this->yyidx + -4]->minor); } -#line 1921 "Parser.php" -#line 299 "Parser.y" +#line 1943 "Parser.php" +#line 308 "Parser.y" function yy_r48(){ if ($this->yystack[$this->yyidx + -1]->minor != "endblock") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endblock"); } $this->_retvalue = array('operation' => 'block', 'name' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1929 "Parser.php" -#line 314 "Parser.y" +#line 1951 "Parser.php" +#line 323 "Parser.y" function yy_r50(){ if ($this->yystack[$this->yyidx + -1]->minor != "endfilter") { $this->Error("Unexpected ".$this->yystack[$this->yyidx + -1]->minor.", expecting endfilter"); } $this->_retvalue = array('operation' => 'filter', 'functions' => $this->yystack[$this->yyidx + -5]->minor, 'body' => $this->yystack[$this->yyidx + -3]->minor); } -#line 1937 "Parser.php" -#line 322 "Parser.y" +#line 1959 "Parser.php" +#line 331 "Parser.y" function yy_r51(){ $this->_retvalue=array('operation' => 'regroup', 'array' => $this->yystack[$this->yyidx + -4]->minor, 'row' => $this->yystack[$this->yyidx + -2]->minor, 'as' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1940 "Parser.php" -#line 325 "Parser.y" +#line 1962 "Parser.php" +#line 334 "Parser.y" function yy_r52(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } -#line 1943 "Parser.php" -#line 326 "Parser.y" +#line 1965 "Parser.php" +#line 335 "Parser.y" function yy_r53(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } -#line 1946 "Parser.php" -#line 328 "Parser.y" +#line 1968 "Parser.php" +#line 337 "Parser.y" function yy_r54(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor, 'args'=>array($this->yystack[$this->yyidx + 0]->minor)); } -#line 1949 "Parser.php" -#line 332 "Parser.y" +#line 1971 "Parser.php" +#line 341 "Parser.y" function yy_r56(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } -#line 1952 "Parser.php" -#line 338 "Parser.y" - function yy_r59(){ /*$this->_retvalue = array('var' => $this->yystack[$this->yyidx + 0]->minor);*/ $this->_retvalue = $this->compiler->generate_variable_name($this->yystack[$this->yyidx + 0]->minor); } -#line 1955 "Parser.php" -#line 339 "Parser.y" +#line 1974 "Parser.php" +#line 347 "Parser.y" + function yy_r59(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + 0]->minor); } +#line 1977 "Parser.php" +#line 348 "Parser.y" function yy_r60(){ $this->_retvalue = array('number' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1958 "Parser.php" -#line 340 "Parser.y" +#line 1980 "Parser.php" +#line 349 "Parser.y" function yy_r61(){ $this->_retvalue = trim(@$this->yystack[$this->yyidx + 0]->minor); } -#line 1961 "Parser.php" -#line 341 "Parser.y" +#line 1983 "Parser.php" +#line 350 "Parser.y" function yy_r62(){ $this->_retvalue = array('string' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1964 "Parser.php" -#line 344 "Parser.y" +#line 1986 "Parser.php" +#line 353 "Parser.y" function yy_r63(){ $this->_retvalue = array('var_filter' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1967 "Parser.php" -#line 354 "Parser.y" +#line 1989 "Parser.php" +#line 363 "Parser.y" function yy_r69(){ $this->_retvalue = array('op_expr' => 'not', $this->yystack[$this->yyidx + 0]->minor); } -#line 1970 "Parser.php" -#line 355 "Parser.y" +#line 1992 "Parser.php" +#line 364 "Parser.y" function yy_r70(){ $this->_retvalue = array('op_expr' => @$this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); } -#line 1973 "Parser.php" -#line 358 "Parser.y" +#line 1995 "Parser.php" +#line 367 "Parser.y" function yy_r73(){ $this->_retvalue = array('op_expr' => trim(@$this->yystack[$this->yyidx + -1]->minor), $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); } -#line 1976 "Parser.php" -#line 360 "Parser.y" +#line 1998 "Parser.php" +#line 369 "Parser.y" function yy_r75(){ $this->_retvalue = array('op_expr' => 'expr', array('op_expr' => @$this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor)); } -#line 1979 "Parser.php" -#line 361 "Parser.y" +#line 2001 "Parser.php" +#line 370 "Parser.y" function yy_r76(){ $this->_retvalue = array('op_expr' => 'expr', $this->yystack[$this->yyidx + -1]->minor); } -#line 1982 "Parser.php" -#line 365 "Parser.y" - function yy_r78(){ +#line 2004 "Parser.php" +#line 375 "Parser.y" + function yy_r78(){ $this->_retvalue = current($this->compiler->generate_variable_name($this->yystack[$this->yyidx + 0]->minor, false)); } +#line 2007 "Parser.php" +#line 376 "Parser.y" + function yy_r79(){ if (!is_array($this->yystack[$this->yyidx + -2]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor); } else { $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } $this->_retvalue[]=array('object' => $this->yystack[$this->yyidx + 0]->minor); } -#line 1988 "Parser.php" -#line 369 "Parser.y" - function yy_r79(){ +#line 2013 "Parser.php" +#line 380 "Parser.y" + function yy_r80(){ if (!is_array($this->yystack[$this->yyidx + -2]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor); } else { $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } $this->_retvalue[]=array('class' => '$'.$this->yystack[$this->yyidx + 0]->minor); } -#line 1994 "Parser.php" -#line 373 "Parser.y" - function yy_r80(){ +#line 2019 "Parser.php" +#line 384 "Parser.y" + function yy_r81(){ if (!is_array($this->yystack[$this->yyidx + -3]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -3]->minor); } else { $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor; } $this->_retvalue[]=$this->yystack[$this->yyidx + -1]->minor; } -#line 2000 "Parser.php" -#line 381 "Parser.y" - function yy_r83(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); } -#line 2003 "Parser.php" -#line 384 "Parser.y" - function yy_r85(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + 0]->minor); } -#line 2006 "Parser.php" -#line 387 "Parser.y" - function yy_r87(){ $this->_retvalue = -1 * ($this->yystack[$this->yyidx + 0]->minor); } -#line 2009 "Parser.php" +#line 2025 "Parser.php" +#line 392 "Parser.y" + function yy_r84(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); } +#line 2028 "Parser.php" +#line 398 "Parser.y" + function yy_r88(){ $this->_retvalue = -1 * ($this->yystack[$this->yyidx + 0]->minor); } +#line 2031 "Parser.php" /** * placeholder for the left hand side in a reduce operation. @@ -2119,7 +2141,7 @@ static public $yy_action = array( $expect[] = self::$yyTokenName[$token]; } $this->Error('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN. '), expected one of: ' . implode(',', $expect)); -#line 2129 "Parser.php" +#line 2151 "Parser.php" } /** @@ -2139,7 +2161,7 @@ static public $yy_action = array( ** parser accepts */ #line 57 "Parser.y" -#line 2150 "Parser.php" +#line 2172 "Parser.php" } /** diff --git a/lib/Haanga/Compiler/Parser.y b/lib/Haanga/Compiler/Parser.y index b83dadb..e153d0b 100644 --- a/lib/Haanga/Compiler/Parser.y +++ b/lib/Haanga/Compiler/Parser.y @@ -176,11 +176,22 @@ stmt ::= T_LOAD string(B). { /* FOR loop */ for_def(A) ::= T_FOR varname(B) T_IN filtered_var(C) T_TAG_CLOSE . { + $var = $this->compiler->get_context(C[0]); + if (is_array($var) || $var instanceof Iterator) { + /* let's check if it is an object or array */ + $this->compiler->set_context(B, current($var)); + } A = array('operation' => 'loop', 'variable' => B, 'index' => NULL, 'array' => C); } for_def(A) ::= T_FOR varname(I) T_COMMA varname(B) T_IN filtered_var(C) T_TAG_CLOSE . { + $var = $this->compiler->get_context(C[0]); + if (is_array($var) || $var instanceof Iterator) { + /* let's check if it is an object or array */ + $this->compiler->set_context(B, current($var)); + } A = array('operation' => 'loop', 'variable' => B, 'index' => I, 'array' => C); + } @@ -336,7 +347,7 @@ params(A) ::= var_or_string(B). { A = array(B); } /* variable or string (used on params) */ -var_or_string(A) ::= varname(B). { /*A = array('var' => B);*/ A = $this->compiler->generate_variable_name(B); } +var_or_string(A) ::= varname(B). { A = array('var' => B); } var_or_string(A) ::= number(B). { A = array('number' => B); } var_or_string(A) ::= T_TRUE|T_FALSE(B). { A = trim(@B); } var_or_string(A) ::= string(B). { A = array('string' => B); } @@ -363,21 +374,23 @@ expr(A) ::= T_LPARENT expr(B) T_RPARENT. { A = array('op_expr' => 'expr', B); } expr(A) ::= fvar_or_string(B). { A = B; } /* Variable name */ -varname(A) ::= varname(B) T_OBJ|T_DOT T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK(C). { + +varname(A) ::= varpart(B). { A = current($this->compiler->generate_variable_name(B, false)); } +varpart(A) ::= varname(B) T_OBJ|T_DOT T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK(C). { if (!is_array(B)) { A = array(B); } else { A = B; } A[]=array('object' => C); } -varname(A) ::= varname(B) T_CLASS T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK(C). { +varpart(A) ::= varname(B) T_CLASS T_ALPHA|T_CUSTOM_TAG|T_CUSTOM_BLOCK(C). { if (!is_array(B)) { A = array(B); } else { A = B; } A[]=array('class' => '$'.C); } -varname(A) ::= varname(B) T_BRACKETS_OPEN var_or_string(C) T_BRACKETS_CLOSE. { +varpart(A) ::= varname(B) T_BRACKETS_OPEN var_or_string(C) T_BRACKETS_CLOSE. { if (!is_array(B)) { A = array(B); } else { A = B; } A[]=C; } -varname(A) ::= T_ALPHA(B). { A = B; } +varpart(A) ::= T_ALPHA(B). { A = B; } /* T_BLOCK|T_CUSTOM|T_CUSTOM_BLOCK are also T_ALPHA */ -varname(A) ::= T_BLOCK|T_CUSTOM_TAG|T_CUSTOM_BLOCK(B). { A = B; } +varpart(A) ::= T_BLOCK|T_CUSTOM_TAG|T_CUSTOM_BLOCK(B). { A = B; } range(A) ::= numvar(B) T_DOTDOT numvar(C). { A = array(B, C); } -- 2.11.4.GIT