@@ -2,75 +2,75 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | class TP_yyToken implements ArrayAccess |
| 4 | 4 | { |
| 5 | - public $string = ''; |
|
| 6 | - |
|
| 7 | - public $metadata = array(); |
|
| 8 | - |
|
| 9 | - public function __construct($s, $m = array()) |
|
| 10 | - { |
|
| 11 | - if ($s instanceof TP_yyToken) { |
|
| 12 | - $this->string = $s->string; |
|
| 13 | - $this->metadata = $s->metadata; |
|
| 14 | - } else { |
|
| 15 | - $this->string = (string) $s; |
|
| 16 | - if ($m instanceof TP_yyToken) { |
|
| 17 | - $this->metadata = $m->metadata; |
|
| 18 | - } elseif (is_array($m)) { |
|
| 19 | - $this->metadata = $m; |
|
| 20 | - } |
|
| 21 | - } |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - public function __toString() |
|
| 25 | - { |
|
| 26 | - return $this->string; |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function offsetExists($offset) |
|
| 30 | - { |
|
| 31 | - return isset($this->metadata[ $offset ]); |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - public function offsetGet($offset) |
|
| 35 | - { |
|
| 36 | - return $this->metadata[ $offset ]; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - public function offsetSet($offset, $value) |
|
| 40 | - { |
|
| 41 | - if ($offset === null) { |
|
| 42 | - if (isset($value[ 0 ])) { |
|
| 43 | - $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; |
|
| 44 | - $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | - |
|
| 46 | - return; |
|
| 47 | - } |
|
| 48 | - $offset = count($this->metadata); |
|
| 49 | - } |
|
| 50 | - if ($value === null) { |
|
| 51 | - return; |
|
| 52 | - } |
|
| 53 | - if ($value instanceof TP_yyToken) { |
|
| 54 | - if ($value->metadata) { |
|
| 55 | - $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | - } |
|
| 57 | - } elseif ($value) { |
|
| 58 | - $this->metadata[ $offset ] = $value; |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - public function offsetUnset($offset) |
|
| 63 | - { |
|
| 64 | - unset($this->metadata[ $offset ]); |
|
| 65 | - } |
|
| 5 | + public $string = ''; |
|
| 6 | + |
|
| 7 | + public $metadata = array(); |
|
| 8 | + |
|
| 9 | + public function __construct($s, $m = array()) |
|
| 10 | + { |
|
| 11 | + if ($s instanceof TP_yyToken) { |
|
| 12 | + $this->string = $s->string; |
|
| 13 | + $this->metadata = $s->metadata; |
|
| 14 | + } else { |
|
| 15 | + $this->string = (string) $s; |
|
| 16 | + if ($m instanceof TP_yyToken) { |
|
| 17 | + $this->metadata = $m->metadata; |
|
| 18 | + } elseif (is_array($m)) { |
|
| 19 | + $this->metadata = $m; |
|
| 20 | + } |
|
| 21 | + } |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public function __toString() |
|
| 25 | + { |
|
| 26 | + return $this->string; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function offsetExists($offset) |
|
| 30 | + { |
|
| 31 | + return isset($this->metadata[ $offset ]); |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + public function offsetGet($offset) |
|
| 35 | + { |
|
| 36 | + return $this->metadata[ $offset ]; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + public function offsetSet($offset, $value) |
|
| 40 | + { |
|
| 41 | + if ($offset === null) { |
|
| 42 | + if (isset($value[ 0 ])) { |
|
| 43 | + $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; |
|
| 44 | + $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | + |
|
| 46 | + return; |
|
| 47 | + } |
|
| 48 | + $offset = count($this->metadata); |
|
| 49 | + } |
|
| 50 | + if ($value === null) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 53 | + if ($value instanceof TP_yyToken) { |
|
| 54 | + if ($value->metadata) { |
|
| 55 | + $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | + } |
|
| 57 | + } elseif ($value) { |
|
| 58 | + $this->metadata[ $offset ] = $value; |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + public function offsetUnset($offset) |
|
| 63 | + { |
|
| 64 | + unset($this->metadata[ $offset ]); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | class TP_yyStackEntry |
| 69 | 69 | { |
| 70 | - public $stateno; /* The state-number */ |
|
| 71 | - public $major; /* The major token value. This is the code |
|
| 70 | + public $stateno; /* The state-number */ |
|
| 71 | + public $major; /* The major token value. This is the code |
|
| 72 | 72 | ** number for the token at this stack level */ |
| 73 | - public $minor; /* The user-supplied minor token value. This |
|
| 73 | + public $minor; /* The user-supplied minor token value. This |
|
| 74 | 74 | ** is the value of the token */ |
| 75 | 75 | } |
| 76 | 76 | |
@@ -88,2793 +88,2793 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | class Smarty_Internal_Templateparser |
| 90 | 90 | { |
| 91 | - #line 23 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 92 | - |
|
| 93 | - const Err1 = "Security error: Call to private object member not allowed"; |
|
| 94 | - |
|
| 95 | - const Err2 = "Security error: Call to dynamic object member not allowed"; |
|
| 96 | - |
|
| 97 | - const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * result status |
|
| 101 | - * |
|
| 102 | - * @var bool |
|
| 103 | - */ |
|
| 104 | - public $successful = true; |
|
| 105 | - |
|
| 106 | - /** |
|
| 107 | - * return value |
|
| 108 | - * |
|
| 109 | - * @var mixed |
|
| 110 | - */ |
|
| 111 | - public $retvalue = 0; |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * @var |
|
| 115 | - */ |
|
| 116 | - public $yymajor; |
|
| 117 | - |
|
| 118 | - /** |
|
| 119 | - * last index of array variable |
|
| 120 | - * |
|
| 121 | - * @var mixed |
|
| 122 | - */ |
|
| 123 | - public $last_index; |
|
| 124 | - |
|
| 125 | - /** |
|
| 126 | - * last variable name |
|
| 127 | - * |
|
| 128 | - * @var string |
|
| 129 | - */ |
|
| 130 | - public $last_variable; |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * root parse tree buffer |
|
| 134 | - * |
|
| 135 | - * @var Smarty_Internal_ParseTree |
|
| 136 | - */ |
|
| 137 | - public $root_buffer; |
|
| 138 | - |
|
| 139 | - /** |
|
| 140 | - * current parse tree object |
|
| 141 | - * |
|
| 142 | - * @var Smarty_Internal_ParseTree |
|
| 143 | - */ |
|
| 144 | - public $current_buffer; |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * lexer object |
|
| 148 | - * |
|
| 149 | - * @var Smarty_Internal_Templatelexer |
|
| 150 | - */ |
|
| 151 | - public $lex; |
|
| 152 | - |
|
| 153 | - /** |
|
| 154 | - * internal error flag |
|
| 155 | - * |
|
| 156 | - * @var bool |
|
| 157 | - */ |
|
| 158 | - private $internalError = false; |
|
| 159 | - |
|
| 160 | - /** |
|
| 161 | - * {strip} status |
|
| 162 | - * |
|
| 163 | - * @var bool |
|
| 164 | - */ |
|
| 165 | - public $strip = false; |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * compiler object |
|
| 169 | - * |
|
| 170 | - * @var Smarty_Internal_TemplateCompilerBase |
|
| 171 | - */ |
|
| 172 | - public $compiler = null; |
|
| 173 | - |
|
| 174 | - /** |
|
| 175 | - * smarty object |
|
| 176 | - * |
|
| 177 | - * @var Smarty |
|
| 178 | - */ |
|
| 179 | - public $smarty = null; |
|
| 180 | - |
|
| 181 | - /** |
|
| 182 | - * template object |
|
| 183 | - * |
|
| 184 | - * @var Smarty_Internal_Template |
|
| 185 | - */ |
|
| 186 | - public $template = null; |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * block nesting level |
|
| 190 | - * |
|
| 191 | - * @var int |
|
| 192 | - */ |
|
| 193 | - public $block_nesting_level = 0; |
|
| 194 | - |
|
| 195 | - /** |
|
| 196 | - * security object |
|
| 197 | - * |
|
| 198 | - * @var Smarty_Security |
|
| 199 | - */ |
|
| 200 | - public $security = null; |
|
| 201 | - |
|
| 202 | - /** |
|
| 203 | - * template prefix array |
|
| 204 | - * |
|
| 205 | - * @var \Smarty_Internal_ParseTree[] |
|
| 206 | - */ |
|
| 207 | - public $template_prefix = array(); |
|
| 208 | - |
|
| 209 | - /** |
|
| 210 | - * security object |
|
| 211 | - * |
|
| 212 | - * @var \Smarty_Internal_ParseTree[] |
|
| 213 | - */ |
|
| 214 | - public $template_postfix = array(); |
|
| 215 | - |
|
| 216 | - /** |
|
| 217 | - * constructor |
|
| 218 | - * |
|
| 219 | - * @param Smarty_Internal_Templatelexer $lex |
|
| 220 | - * @param Smarty_Internal_TemplateCompilerBase $compiler |
|
| 221 | - */ |
|
| 222 | - public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) |
|
| 223 | - { |
|
| 224 | - $this->lex = $lex; |
|
| 225 | - $this->compiler = $compiler; |
|
| 226 | - $this->template = $this->compiler->template; |
|
| 227 | - $this->smarty = $this->template->smarty; |
|
| 228 | - $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false; |
|
| 229 | - $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template(); |
|
| 230 | - } |
|
| 91 | + #line 23 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 92 | + |
|
| 93 | + const Err1 = "Security error: Call to private object member not allowed"; |
|
| 94 | + |
|
| 95 | + const Err2 = "Security error: Call to dynamic object member not allowed"; |
|
| 96 | + |
|
| 97 | + const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * result status |
|
| 101 | + * |
|
| 102 | + * @var bool |
|
| 103 | + */ |
|
| 104 | + public $successful = true; |
|
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * return value |
|
| 108 | + * |
|
| 109 | + * @var mixed |
|
| 110 | + */ |
|
| 111 | + public $retvalue = 0; |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * @var |
|
| 115 | + */ |
|
| 116 | + public $yymajor; |
|
| 117 | + |
|
| 118 | + /** |
|
| 119 | + * last index of array variable |
|
| 120 | + * |
|
| 121 | + * @var mixed |
|
| 122 | + */ |
|
| 123 | + public $last_index; |
|
| 124 | + |
|
| 125 | + /** |
|
| 126 | + * last variable name |
|
| 127 | + * |
|
| 128 | + * @var string |
|
| 129 | + */ |
|
| 130 | + public $last_variable; |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * root parse tree buffer |
|
| 134 | + * |
|
| 135 | + * @var Smarty_Internal_ParseTree |
|
| 136 | + */ |
|
| 137 | + public $root_buffer; |
|
| 138 | + |
|
| 139 | + /** |
|
| 140 | + * current parse tree object |
|
| 141 | + * |
|
| 142 | + * @var Smarty_Internal_ParseTree |
|
| 143 | + */ |
|
| 144 | + public $current_buffer; |
|
| 145 | + |
|
| 146 | + /** |
|
| 147 | + * lexer object |
|
| 148 | + * |
|
| 149 | + * @var Smarty_Internal_Templatelexer |
|
| 150 | + */ |
|
| 151 | + public $lex; |
|
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * internal error flag |
|
| 155 | + * |
|
| 156 | + * @var bool |
|
| 157 | + */ |
|
| 158 | + private $internalError = false; |
|
| 159 | + |
|
| 160 | + /** |
|
| 161 | + * {strip} status |
|
| 162 | + * |
|
| 163 | + * @var bool |
|
| 164 | + */ |
|
| 165 | + public $strip = false; |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * compiler object |
|
| 169 | + * |
|
| 170 | + * @var Smarty_Internal_TemplateCompilerBase |
|
| 171 | + */ |
|
| 172 | + public $compiler = null; |
|
| 173 | + |
|
| 174 | + /** |
|
| 175 | + * smarty object |
|
| 176 | + * |
|
| 177 | + * @var Smarty |
|
| 178 | + */ |
|
| 179 | + public $smarty = null; |
|
| 180 | + |
|
| 181 | + /** |
|
| 182 | + * template object |
|
| 183 | + * |
|
| 184 | + * @var Smarty_Internal_Template |
|
| 185 | + */ |
|
| 186 | + public $template = null; |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * block nesting level |
|
| 190 | + * |
|
| 191 | + * @var int |
|
| 192 | + */ |
|
| 193 | + public $block_nesting_level = 0; |
|
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * security object |
|
| 197 | + * |
|
| 198 | + * @var Smarty_Security |
|
| 199 | + */ |
|
| 200 | + public $security = null; |
|
| 201 | + |
|
| 202 | + /** |
|
| 203 | + * template prefix array |
|
| 204 | + * |
|
| 205 | + * @var \Smarty_Internal_ParseTree[] |
|
| 206 | + */ |
|
| 207 | + public $template_prefix = array(); |
|
| 208 | + |
|
| 209 | + /** |
|
| 210 | + * security object |
|
| 211 | + * |
|
| 212 | + * @var \Smarty_Internal_ParseTree[] |
|
| 213 | + */ |
|
| 214 | + public $template_postfix = array(); |
|
| 215 | + |
|
| 216 | + /** |
|
| 217 | + * constructor |
|
| 218 | + * |
|
| 219 | + * @param Smarty_Internal_Templatelexer $lex |
|
| 220 | + * @param Smarty_Internal_TemplateCompilerBase $compiler |
|
| 221 | + */ |
|
| 222 | + public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) |
|
| 223 | + { |
|
| 224 | + $this->lex = $lex; |
|
| 225 | + $this->compiler = $compiler; |
|
| 226 | + $this->template = $this->compiler->template; |
|
| 227 | + $this->smarty = $this->template->smarty; |
|
| 228 | + $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false; |
|
| 229 | + $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template(); |
|
| 230 | + } |
|
| 231 | 231 | |
| 232 | - /** |
|
| 233 | - * insert PHP code in current buffer |
|
| 234 | - * |
|
| 235 | - * @param string $code |
|
| 236 | - */ |
|
| 237 | - public function insertPhpCode($code) |
|
| 238 | - { |
|
| 239 | - $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code)); |
|
| 240 | - } |
|
| 232 | + /** |
|
| 233 | + * insert PHP code in current buffer |
|
| 234 | + * |
|
| 235 | + * @param string $code |
|
| 236 | + */ |
|
| 237 | + public function insertPhpCode($code) |
|
| 238 | + { |
|
| 239 | + $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code)); |
|
| 240 | + } |
|
| 241 | 241 | |
| 242 | - /** |
|
| 243 | - * merge PHP code with prefix code and return parse tree tag object |
|
| 244 | - * |
|
| 245 | - * @param string $code |
|
| 246 | - * |
|
| 247 | - * @return Smarty_Internal_ParseTree_Tag |
|
| 248 | - */ |
|
| 249 | - public function mergePrefixCode($code) |
|
| 250 | - { |
|
| 251 | - $tmp = ''; |
|
| 252 | - foreach ($this->compiler->prefix_code as $preCode) { |
|
| 253 | - $tmp .= $preCode; |
|
| 254 | - } |
|
| 255 | - $this->compiler->prefix_code = array(); |
|
| 256 | - $tmp .= $code; |
|
| 257 | - return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); |
|
| 258 | - } |
|
| 242 | + /** |
|
| 243 | + * merge PHP code with prefix code and return parse tree tag object |
|
| 244 | + * |
|
| 245 | + * @param string $code |
|
| 246 | + * |
|
| 247 | + * @return Smarty_Internal_ParseTree_Tag |
|
| 248 | + */ |
|
| 249 | + public function mergePrefixCode($code) |
|
| 250 | + { |
|
| 251 | + $tmp = ''; |
|
| 252 | + foreach ($this->compiler->prefix_code as $preCode) { |
|
| 253 | + $tmp .= $preCode; |
|
| 254 | + } |
|
| 255 | + $this->compiler->prefix_code = array(); |
|
| 256 | + $tmp .= $code; |
|
| 257 | + return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); |
|
| 258 | + } |
|
| 259 | 259 | |
| 260 | - const TP_VERT = 1; |
|
| 260 | + const TP_VERT = 1; |
|
| 261 | 261 | |
| 262 | - const TP_COLON = 2; |
|
| 262 | + const TP_COLON = 2; |
|
| 263 | 263 | |
| 264 | - const TP_PHP = 3; |
|
| 264 | + const TP_PHP = 3; |
|
| 265 | 265 | |
| 266 | - const TP_NOCACHE = 4; |
|
| 266 | + const TP_NOCACHE = 4; |
|
| 267 | 267 | |
| 268 | - const TP_TEXT = 5; |
|
| 268 | + const TP_TEXT = 5; |
|
| 269 | 269 | |
| 270 | - const TP_STRIPON = 6; |
|
| 270 | + const TP_STRIPON = 6; |
|
| 271 | 271 | |
| 272 | - const TP_STRIPOFF = 7; |
|
| 272 | + const TP_STRIPOFF = 7; |
|
| 273 | 273 | |
| 274 | - const TP_LITERALSTART = 8; |
|
| 274 | + const TP_LITERALSTART = 8; |
|
| 275 | 275 | |
| 276 | - const TP_LITERALEND = 9; |
|
| 276 | + const TP_LITERALEND = 9; |
|
| 277 | 277 | |
| 278 | - const TP_LITERAL = 10; |
|
| 278 | + const TP_LITERAL = 10; |
|
| 279 | 279 | |
| 280 | - const TP_RDEL = 11; |
|
| 280 | + const TP_RDEL = 11; |
|
| 281 | 281 | |
| 282 | - const TP_SIMPELOUTPUT = 12; |
|
| 282 | + const TP_SIMPELOUTPUT = 12; |
|
| 283 | 283 | |
| 284 | - const TP_LDEL = 13; |
|
| 284 | + const TP_LDEL = 13; |
|
| 285 | 285 | |
| 286 | - const TP_DOLLARID = 14; |
|
| 286 | + const TP_DOLLARID = 14; |
|
| 287 | 287 | |
| 288 | - const TP_EQUAL = 15; |
|
| 288 | + const TP_EQUAL = 15; |
|
| 289 | 289 | |
| 290 | - const TP_SIMPLETAG = 16; |
|
| 290 | + const TP_SIMPLETAG = 16; |
|
| 291 | 291 | |
| 292 | - const TP_ID = 17; |
|
| 292 | + const TP_ID = 17; |
|
| 293 | 293 | |
| 294 | - const TP_PTR = 18; |
|
| 294 | + const TP_PTR = 18; |
|
| 295 | 295 | |
| 296 | - const TP_LDELMAKENOCACHE = 19; |
|
| 296 | + const TP_LDELMAKENOCACHE = 19; |
|
| 297 | 297 | |
| 298 | - const TP_LDELIF = 20; |
|
| 298 | + const TP_LDELIF = 20; |
|
| 299 | 299 | |
| 300 | - const TP_LDELFOR = 21; |
|
| 300 | + const TP_LDELFOR = 21; |
|
| 301 | 301 | |
| 302 | - const TP_SEMICOLON = 22; |
|
| 302 | + const TP_SEMICOLON = 22; |
|
| 303 | 303 | |
| 304 | - const TP_INCDEC = 23; |
|
| 304 | + const TP_INCDEC = 23; |
|
| 305 | 305 | |
| 306 | - const TP_TO = 24; |
|
| 306 | + const TP_TO = 24; |
|
| 307 | 307 | |
| 308 | - const TP_STEP = 25; |
|
| 308 | + const TP_STEP = 25; |
|
| 309 | 309 | |
| 310 | - const TP_LDELFOREACH = 26; |
|
| 310 | + const TP_LDELFOREACH = 26; |
|
| 311 | 311 | |
| 312 | - const TP_SPACE = 27; |
|
| 312 | + const TP_SPACE = 27; |
|
| 313 | 313 | |
| 314 | - const TP_AS = 28; |
|
| 314 | + const TP_AS = 28; |
|
| 315 | 315 | |
| 316 | - const TP_APTR = 29; |
|
| 316 | + const TP_APTR = 29; |
|
| 317 | 317 | |
| 318 | - const TP_LDELSETFILTER = 30; |
|
| 318 | + const TP_LDELSETFILTER = 30; |
|
| 319 | 319 | |
| 320 | - const TP_SMARTYBLOCKCHILDPARENT = 31; |
|
| 320 | + const TP_SMARTYBLOCKCHILDPARENT = 31; |
|
| 321 | 321 | |
| 322 | - const TP_CLOSETAG = 32; |
|
| 322 | + const TP_CLOSETAG = 32; |
|
| 323 | 323 | |
| 324 | - const TP_LDELSLASH = 33; |
|
| 324 | + const TP_LDELSLASH = 33; |
|
| 325 | 325 | |
| 326 | - const TP_ATTR = 34; |
|
| 326 | + const TP_ATTR = 34; |
|
| 327 | 327 | |
| 328 | - const TP_INTEGER = 35; |
|
| 328 | + const TP_INTEGER = 35; |
|
| 329 | 329 | |
| 330 | - const TP_COMMA = 36; |
|
| 330 | + const TP_COMMA = 36; |
|
| 331 | 331 | |
| 332 | - const TP_OPENP = 37; |
|
| 332 | + const TP_OPENP = 37; |
|
| 333 | 333 | |
| 334 | - const TP_CLOSEP = 38; |
|
| 334 | + const TP_CLOSEP = 38; |
|
| 335 | 335 | |
| 336 | - const TP_MATH = 39; |
|
| 336 | + const TP_MATH = 39; |
|
| 337 | 337 | |
| 338 | - const TP_UNIMATH = 40; |
|
| 338 | + const TP_UNIMATH = 40; |
|
| 339 | 339 | |
| 340 | - const TP_ISIN = 41; |
|
| 340 | + const TP_ISIN = 41; |
|
| 341 | 341 | |
| 342 | - const TP_QMARK = 42; |
|
| 342 | + const TP_QMARK = 42; |
|
| 343 | 343 | |
| 344 | - const TP_NOT = 43; |
|
| 344 | + const TP_NOT = 43; |
|
| 345 | 345 | |
| 346 | - const TP_TYPECAST = 44; |
|
| 346 | + const TP_TYPECAST = 44; |
|
| 347 | 347 | |
| 348 | - const TP_HEX = 45; |
|
| 348 | + const TP_HEX = 45; |
|
| 349 | 349 | |
| 350 | - const TP_DOT = 46; |
|
| 350 | + const TP_DOT = 46; |
|
| 351 | 351 | |
| 352 | - const TP_INSTANCEOF = 47; |
|
| 352 | + const TP_INSTANCEOF = 47; |
|
| 353 | 353 | |
| 354 | - const TP_SINGLEQUOTESTRING = 48; |
|
| 354 | + const TP_SINGLEQUOTESTRING = 48; |
|
| 355 | 355 | |
| 356 | - const TP_DOUBLECOLON = 49; |
|
| 356 | + const TP_DOUBLECOLON = 49; |
|
| 357 | 357 | |
| 358 | - const TP_NAMESPACE = 50; |
|
| 358 | + const TP_NAMESPACE = 50; |
|
| 359 | 359 | |
| 360 | - const TP_AT = 51; |
|
| 360 | + const TP_AT = 51; |
|
| 361 | 361 | |
| 362 | - const TP_HATCH = 52; |
|
| 362 | + const TP_HATCH = 52; |
|
| 363 | 363 | |
| 364 | - const TP_OPENB = 53; |
|
| 364 | + const TP_OPENB = 53; |
|
| 365 | 365 | |
| 366 | - const TP_CLOSEB = 54; |
|
| 366 | + const TP_CLOSEB = 54; |
|
| 367 | 367 | |
| 368 | - const TP_DOLLAR = 55; |
|
| 368 | + const TP_DOLLAR = 55; |
|
| 369 | 369 | |
| 370 | - const TP_LOGOP = 56; |
|
| 370 | + const TP_LOGOP = 56; |
|
| 371 | 371 | |
| 372 | - const TP_SLOGOP = 57; |
|
| 372 | + const TP_SLOGOP = 57; |
|
| 373 | 373 | |
| 374 | - const TP_TLOGOP = 58; |
|
| 374 | + const TP_TLOGOP = 58; |
|
| 375 | 375 | |
| 376 | - const TP_SINGLECOND = 59; |
|
| 376 | + const TP_SINGLECOND = 59; |
|
| 377 | 377 | |
| 378 | - const TP_QUOTE = 60; |
|
| 378 | + const TP_QUOTE = 60; |
|
| 379 | 379 | |
| 380 | - const TP_BACKTICK = 61; |
|
| 380 | + const TP_BACKTICK = 61; |
|
| 381 | 381 | |
| 382 | - const YY_NO_ACTION = 534; |
|
| 382 | + const YY_NO_ACTION = 534; |
|
| 383 | 383 | |
| 384 | - const YY_ACCEPT_ACTION = 533; |
|
| 384 | + const YY_ACCEPT_ACTION = 533; |
|
| 385 | 385 | |
| 386 | - const YY_ERROR_ACTION = 532; |
|
| 386 | + const YY_ERROR_ACTION = 532; |
|
| 387 | 387 | |
| 388 | - const YY_SZ_ACTTAB = 2017; |
|
| 388 | + const YY_SZ_ACTTAB = 2017; |
|
| 389 | 389 | |
| 390 | - static public $yy_action = array(269, 8, 133, 295, 335, 80, 282, 219, 7, 84, 128, 178, 255, 276, 113, 102, 13, 83, |
|
| 391 | - 227, 286, 305, 220, 36, 223, 283, 21, 32, 297, 41, 14, 90, 40, 44, 260, 213, 231, |
|
| 392 | - 250, 235, 210, 128, 81, 1, 298, 296, 102, 269, 8, 132, 79, 335, 196, 184, 219, 7, |
|
| 393 | - 84, 26, 297, 461, 101, 113, 39, 24, 278, 227, 461, 305, 220, 171, 206, 222, 21, |
|
| 394 | - 230, 201, 41, 104, 192, 40, 44, 260, 213, 18, 236, 241, 210, 251, 81, 1, 316, 296, |
|
| 395 | - 114, 269, 8, 135, 79, 335, 205, 302, 219, 7, 84, 116, 107, 477, 477, 113, 33, 197, |
|
| 396 | - 477, 227, 266, 305, 220, 326, 223, 31, 21, 29, 215, 41, 311, 78, 40, 44, 260, 213, |
|
| 397 | - 296, 250, 256, 210, 190, 81, 1, 3, 296, 307, 269, 8, 134, 79, 335, 205, 302, 219, |
|
| 398 | - 7, 84, 232, 18, 296, 294, 113, 334, 85, 323, 227, 136, 305, 220, 328, 223, 29, 21, |
|
| 399 | - 183, 101, 41, 234, 78, 40, 44, 260, 213, 137, 250, 314, 210, 139, 81, 1, 10, 296, |
|
| 400 | - 101, 269, 8, 135, 79, 335, 195, 154, 219, 7, 84, 322, 232, 81, 114, 113, 296, 329, |
|
| 401 | - 94, 227, 315, 305, 220, 326, 212, 120, 21, 168, 215, 41, 281, 114, 40, 44, 260, |
|
| 402 | - 213, 296, 250, 222, 210, 265, 81, 1, 104, 296, 211, 269, 8, 135, 79, 335, 193, 302, |
|
| 403 | - 219, 7, 84, 242, 239, 249, 217, 113, 11, 215, 289, 227, 136, 305, 220, 228, 223, |
|
| 404 | - 222, 21, 238, 149, 41, 104, 78, 40, 44, 260, 213, 461, 250, 329, 210, 6, 81, 1, |
|
| 405 | - 461, 296, 2, 269, 8, 136, 79, 335, 205, 158, 219, 7, 84, 190, 211, 81, 101, 113, |
|
| 406 | - 296, 329, 93, 227, 12, 305, 220, 18, 223, 244, 34, 268, 448, 41, 281, 449, 40, 44, |
|
| 407 | - 260, 213, 191, 250, 36, 210, 448, 81, 1, 449, 296, 14, 269, 8, 135, 79, 335, 205, |
|
| 408 | - 15, 219, 7, 84, 186, 293, 152, 14, 113, 16, 214, 5, 227, 165, 305, 220, 329, 194, |
|
| 409 | - 20, 21, 140, 101, 41, 115, 448, 40, 44, 260, 213, 281, 250, 303, 210, 264, 81, 1, |
|
| 410 | - 448, 296, 169, 269, 8, 131, 79, 335, 205, 176, 219, 7, 84, 137, 28, 296, 310, 113, |
|
| 411 | - 185, 293, 10, 227, 275, 305, 220, 296, 223, 175, 4, 281, 143, 41, 144, 192, 40, 44, |
|
| 412 | - 260, 213, 35, 250, 329, 210, 329, 81, 1, 270, 296, 308, 269, 8, 135, 79, 335, 198, |
|
| 413 | - 121, 219, 7, 84, 190, 292, 17, 232, 113, 166, 284, 281, 227, 141, 305, 220, 211, |
|
| 414 | - 223, 319, 21, 299, 211, 41, 329, 211, 40, 44, 260, 213, 258, 250, 363, 210, 221, |
|
| 415 | - 81, 1, 281, 296, 6, 269, 8, 136, 79, 335, 205, 177, 219, 7, 84, 167, 211, 159, 22, |
|
| 416 | - 113, 104, 211, 156, 227, 300, 305, 220, 329, 223, 274, 34, 359, 329, 41, 172, 192, |
|
| 417 | - 40, 44, 260, 213, 95, 250, 318, 210, 329, 81, 273, 36, 296, 257, 292, 17, 181, 79, |
|
| 418 | - 14, 284, 309, 277, 254, 262, 263, 259, 178, 211, 25, 36, 269, 8, 187, 331, 335, |
|
| 419 | - 261, 14, 219, 7, 84, 192, 303, 211, 38, 113, 237, 321, 180, 227, 267, 305, 220, |
|
| 420 | - 153, 121, 312, 179, 192, 272, 108, 215, 209, 211, 118, 69, 112, 43, 42, 37, 248, |
|
| 421 | - 102, 86, 189, 252, 279, 182, 293, 150, 271, 204, 317, 176, 297, 288, 287, 285, 280, |
|
| 422 | - 329, 281, 312, 174, 87, 202, 330, 215, 209, 170, 118, 69, 112, 43, 42, 37, 138, |
|
| 423 | - 102, 192, 402, 252, 279, 38, 216, 88, 271, 204, 317, 211, 297, 288, 287, 285, 280, |
|
| 424 | - 310, 402, 105, 253, 404, 164, 332, 312, 402, 211, 89, 448, 215, 209, 305, 129, 61, |
|
| 425 | - 106, 163, 238, 404, 142, 102, 448, 305, 252, 279, 404, 305, 305, 271, 204, 317, |
|
| 426 | - 305, 297, 312, 155, 305, 305, 305, 215, 209, 211, 129, 73, 112, 211, 43, 42, 37, |
|
| 427 | - 102, 305, 404, 252, 279, 305, 292, 17, 271, 204, 317, 284, 297, 305, 288, 287, 285, |
|
| 428 | - 280, 404, 203, 305, 477, 477, 312, 305, 404, 477, 305, 215, 209, 305, 129, 73, 112, |
|
| 429 | - 43, 42, 37, 305, 102, 305, 305, 252, 279, 305, 305, 224, 271, 204, 317, 324, 297, |
|
| 430 | - 288, 287, 285, 280, 305, 305, 208, 312, 305, 477, 305, 305, 215, 209, 211, 129, 50, |
|
| 431 | - 106, 305, 117, 305, 305, 102, 148, 401, 252, 279, 92, 325, 448, 271, 204, 317, 329, |
|
| 432 | - 297, 269, 9, 327, 218, 335, 401, 448, 219, 7, 84, 305, 320, 401, 305, 113, 325, |
|
| 433 | - 192, 305, 227, 305, 305, 220, 269, 9, 327, 305, 335, 305, 305, 219, 7, 84, 305, 43, |
|
| 434 | - 42, 37, 113, 305, 305, 305, 227, 305, 305, 220, 305, 305, 305, 305, 291, 27, 288, |
|
| 435 | - 287, 285, 280, 305, 305, 305, 312, 305, 305, 305, 305, 215, 209, 305, 129, 73, 112, |
|
| 436 | - 211, 305, 290, 27, 102, 305, 305, 252, 279, 305, 369, 305, 271, 204, 317, 305, 297, |
|
| 437 | - 225, 305, 312, 305, 211, 305, 207, 215, 209, 36, 129, 54, 112, 305, 188, 305, 14, |
|
| 438 | - 102, 145, 448, 252, 279, 91, 305, 305, 271, 204, 317, 329, 297, 312, 448, 292, 17, |
|
| 439 | - 305, 215, 209, 284, 129, 65, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, |
|
| 440 | - 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 99, 67, |
|
| 441 | - 112, 305, 305, 229, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, |
|
| 442 | - 312, 297, 211, 305, 305, 215, 209, 305, 129, 45, 112, 305, 246, 305, 305, 102, 162, |
|
| 443 | - 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, |
|
| 444 | - 209, 305, 129, 56, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, |
|
| 445 | - 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 96, 55, 112, 305, |
|
| 446 | - 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 447 | - 211, 305, 305, 215, 97, 305, 82, 47, 103, 305, 247, 305, 305, 102, 151, 305, 252, |
|
| 448 | - 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, |
|
| 449 | - 129, 71, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, |
|
| 450 | - 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 59, 112, 305, 305, 305, |
|
| 451 | - 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, |
|
| 452 | - 305, 215, 209, 305, 129, 58, 112, 305, 305, 305, 305, 102, 160, 305, 252, 279, 184, |
|
| 453 | - 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 53, |
|
| 454 | - 112, 226, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, |
|
| 455 | - 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 60, 112, 305, 305, 305, 305, 102, |
|
| 456 | - 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, |
|
| 457 | - 209, 305, 100, 64, 112, 305, 305, 305, 305, 102, 146, 305, 252, 279, 184, 305, 305, |
|
| 458 | - 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 61, 112, 245, |
|
| 459 | - 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 460 | - 288, 287, 285, 280, 215, 200, 305, 129, 63, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 461 | - 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, 209, 305, |
|
| 462 | - 111, 51, 112, 305, 305, 305, 305, 102, 147, 305, 252, 279, 184, 305, 305, 271, 204, |
|
| 463 | - 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 49, 112, 305, 43, 42, 37, |
|
| 464 | - 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, |
|
| 465 | - 285, 280, 215, 209, 305, 129, 75, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, |
|
| 466 | - 305, 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 76, 112, |
|
| 467 | - 305, 305, 305, 305, 102, 161, 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, |
|
| 468 | - 297, 312, 39, 24, 278, 305, 215, 98, 305, 82, 46, 103, 305, 305, 305, 305, 102, |
|
| 469 | - 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, |
|
| 470 | - 305, 215, 209, 305, 129, 70, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, |
|
| 471 | - 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 57, 112, 305, |
|
| 472 | - 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, |
|
| 473 | - 312, 305, 305, 305, 305, 215, 199, 305, 109, 62, 112, 305, 305, 305, 305, 102, 305, |
|
| 474 | - 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, |
|
| 475 | - 215, 209, 305, 129, 72, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, |
|
| 476 | - 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 77, 112, 305, 305, |
|
| 477 | - 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 478 | - 305, 305, 305, 305, 215, 209, 305, 129, 68, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 479 | - 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, 215, |
|
| 480 | - 209, 305, 129, 74, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, |
|
| 481 | - 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 48, 112, 305, 305, 305, |
|
| 482 | - 305, 102, 305, 305, 252, 279, 414, 414, 305, 271, 204, 317, 305, 297, 312, 305, |
|
| 483 | - 305, 305, 305, 215, 209, 305, 129, 66, 112, 305, 305, 305, 305, 102, 305, 305, 252, |
|
| 484 | - 279, 211, 305, 305, 271, 204, 317, 305, 297, 448, 305, 414, 414, 414, 533, 52, 243, |
|
| 485 | - 239, 249, 217, 305, 448, 215, 305, 305, 30, 305, 36, 414, 414, 414, 414, 305, 233, |
|
| 486 | - 14, 305, 305, 305, 305, 43, 42, 37, 305, 477, 477, 312, 23, 305, 477, 461, 215, |
|
| 487 | - 209, 211, 127, 305, 112, 288, 287, 285, 280, 102, 305, 301, 357, 313, 305, 292, 17, |
|
| 488 | - 271, 204, 317, 284, 297, 305, 305, 302, 305, 461, 36, 36, 461, 36, 477, 157, 461, |
|
| 489 | - 14, 14, 305, 14, 305, 43, 42, 37, 305, 305, 305, 312, 305, 211, 78, 305, 215, 209, |
|
| 490 | - 305, 130, 305, 112, 288, 287, 285, 280, 102, 305, 305, 305, 240, 305, 292, 17, 271, |
|
| 491 | - 204, 317, 284, 297, 36, 305, 305, 305, 305, 305, 305, 14, 36, 305, 173, 312, 43, |
|
| 492 | - 42, 37, 14, 215, 209, 305, 122, 305, 112, 305, 305, 305, 305, 102, 304, 305, 288, |
|
| 493 | - 287, 285, 280, 305, 271, 204, 317, 305, 297, 302, 305, 312, 305, 36, 305, 305, 215, |
|
| 494 | - 209, 305, 123, 14, 112, 312, 305, 305, 305, 102, 215, 209, 305, 124, 305, 112, 78, |
|
| 495 | - 271, 204, 317, 102, 297, 305, 305, 305, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 496 | - 305, 305, 305, 215, 209, 305, 119, 305, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 497 | - 233, 305, 305, 305, 305, 271, 204, 317, 305, 297, 477, 477, 312, 32, 305, 477, 461, |
|
| 498 | - 215, 209, 305, 126, 305, 112, 305, 305, 305, 305, 102, 305, 305, 233, 305, 305, |
|
| 499 | - 305, 305, 271, 204, 317, 305, 297, 477, 477, 305, 305, 461, 477, 461, 461, 312, |
|
| 500 | - 477, 19, 461, 211, 215, 209, 305, 125, 305, 112, 305, 477, 477, 305, 102, 305, 477, |
|
| 501 | - 461, 305, 305, 305, 305, 271, 204, 317, 461, 297, 305, 461, 305, 477, 305, 461, |
|
| 502 | - 333, 305, 211, 305, 305, 305, 305, 305, 43, 42, 37, 305, 461, 305, 305, 461, 305, |
|
| 503 | - 477, 305, 461, 305, 305, 233, 110, 305, 288, 287, 285, 280, 305, 306, 305, 477, |
|
| 504 | - 477, 305, 305, 305, 477, 461, 305, 43, 42, 37, 477, 477, 305, 305, 305, 477, 461, |
|
| 505 | - 305, 305, 305, 305, 305, 305, 305, 288, 287, 285, 280, 305, 305, 305, 305, 305, |
|
| 506 | - 461, 305, 305, 461, 408, 477, 305, 461, 305, 305, 305, 461, 305, 305, 461, 408, |
|
| 507 | - 477, 408, 461, 305, 408, 305, 305, 305, 305, 305, 305, 408, 305, 408, 305, 408, |
|
| 508 | - 305, 305, 305, 305, 305, 305, 305, 232,); |
|
| 509 | - |
|
| 510 | - static public $yy_lookahead = array(12, 13, 14, 17, 16, 17, 72, 19, 20, 21, 76, 8, 9, 10, 26, 81, 22, 17, 30, 31, |
|
| 511 | - 32, 33, 27, 35, 90, 37, 15, 93, 40, 34, 36, 43, 44, 45, 46, 72, 48, 51, 50, 76, |
|
| 512 | - 52, 53, 98, 55, 81, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 15, 93, 46, 18, 26, |
|
| 513 | - 86, 87, 88, 30, 53, 32, 33, 94, 35, 76, 37, 78, 79, 40, 81, 101, 43, 44, 45, 46, |
|
| 514 | - 36, 48, 38, 50, 14, 52, 53, 54, 55, 49, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, |
|
| 515 | - 17, 81, 12, 13, 26, 13, 14, 17, 30, 17, 32, 33, 66, 35, 15, 37, 15, 71, 40, 99, |
|
| 516 | - 47, 43, 44, 45, 46, 55, 48, 35, 50, 101, 52, 53, 36, 55, 61, 12, 13, 14, 60, 16, |
|
| 517 | - 17, 23, 19, 20, 21, 46, 36, 55, 38, 26, 54, 105, 106, 30, 14, 32, 33, 17, 35, |
|
| 518 | - 15, 37, 14, 18, 40, 17, 47, 43, 44, 45, 46, 46, 48, 54, 50, 14, 52, 53, 53, 55, |
|
| 519 | - 18, 12, 13, 14, 60, 16, 17, 73, 19, 20, 21, 50, 46, 52, 49, 26, 55, 83, 37, 30, |
|
| 520 | - 54, 32, 33, 66, 35, 17, 37, 94, 71, 40, 96, 49, 43, 44, 45, 46, 55, 48, 76, 50, |
|
| 521 | - 78, 52, 53, 81, 55, 1, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, 65, 66, 67, 68, |
|
| 522 | - 26, 13, 71, 106, 30, 14, 32, 33, 17, 35, 76, 37, 78, 73, 40, 81, 47, 43, 44, 45, |
|
| 523 | - 46, 46, 48, 83, 50, 37, 52, 53, 53, 55, 37, 12, 13, 14, 60, 16, 17, 73, 19, 20, |
|
| 524 | - 21, 101, 1, 52, 18, 26, 55, 83, 94, 30, 29, 32, 33, 36, 35, 38, 37, 17, 37, 40, |
|
| 525 | - 96, 37, 43, 44, 45, 46, 17, 48, 27, 50, 49, 52, 53, 49, 55, 34, 12, 13, 14, 60, |
|
| 526 | - 16, 17, 27, 19, 20, 21, 97, 98, 73, 34, 26, 13, 14, 37, 30, 17, 32, 33, 83, 35, |
|
| 527 | - 42, 37, 14, 18, 40, 49, 37, 43, 44, 45, 46, 96, 48, 102, 50, 35, 52, 53, 49, 55, |
|
| 528 | - 52, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 46, 15, 55, 95, 26, 97, 98, 53, 30, |
|
| 529 | - 23, 32, 33, 55, 35, 94, 37, 96, 73, 40, 73, 101, 43, 44, 45, 46, 24, 48, 83, 50, |
|
| 530 | - 83, 52, 53, 17, 55, 92, 12, 13, 14, 60, 16, 17, 99, 19, 20, 21, 101, 12, 13, 46, |
|
| 531 | - 26, 94, 17, 96, 30, 73, 32, 33, 1, 35, 54, 37, 17, 1, 40, 83, 1, 43, 44, 45, 46, |
|
| 532 | - 38, 48, 11, 50, 18, 52, 53, 96, 55, 37, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, |
|
| 533 | - 76, 1, 73, 29, 26, 81, 1, 73, 30, 17, 32, 33, 83, 35, 35, 37, 11, 83, 40, 73, |
|
| 534 | - 101, 43, 44, 45, 46, 82, 48, 54, 50, 83, 52, 67, 27, 55, 70, 12, 13, 77, 60, 34, |
|
| 535 | - 17, 14, 3, 4, 5, 6, 7, 8, 1, 2, 27, 12, 13, 77, 54, 16, 5, 34, 19, 20, 21, 101, |
|
| 536 | - 102, 1, 2, 26, 17, 92, 82, 30, 11, 32, 33, 52, 99, 66, 82, 101, 17, 80, 71, 72, |
|
| 537 | - 1, 74, 75, 76, 39, 40, 41, 83, 81, 81, 11, 84, 85, 97, 98, 73, 89, 90, 91, 77, |
|
| 538 | - 93, 56, 57, 58, 59, 83, 96, 66, 94, 81, 103, 104, 71, 72, 94, 74, 75, 76, 39, |
|
| 539 | - 40, 41, 81, 81, 101, 11, 84, 85, 2, 15, 81, 89, 90, 91, 1, 93, 56, 57, 58, 59, |
|
| 540 | - 95, 27, 69, 9, 11, 94, 104, 66, 34, 1, 81, 37, 71, 72, 107, 74, 75, 76, 94, 78, |
|
| 541 | - 27, 28, 81, 49, 107, 84, 85, 34, 107, 107, 89, 90, 91, 107, 93, 66, 28, 107, |
|
| 542 | - 107, 107, 71, 72, 1, 74, 75, 76, 1, 39, 40, 41, 81, 107, 11, 84, 85, 107, 12, |
|
| 543 | - 13, 89, 90, 91, 17, 93, 107, 56, 57, 58, 59, 27, 100, 107, 12, 13, 66, 107, 34, |
|
| 544 | - 17, 107, 71, 72, 107, 74, 75, 76, 39, 40, 41, 107, 81, 107, 107, 84, 85, 107, |
|
| 545 | - 107, 51, 89, 90, 91, 54, 93, 56, 57, 58, 59, 107, 107, 100, 66, 107, 51, 107, |
|
| 546 | - 107, 71, 72, 1, 74, 75, 76, 107, 78, 107, 107, 81, 73, 11, 84, 85, 77, 5, 37, |
|
| 547 | - 89, 90, 91, 83, 93, 12, 13, 14, 46, 16, 27, 49, 19, 20, 21, 107, 54, 34, 107, |
|
| 548 | - 26, 5, 101, 107, 30, 107, 32, 33, 12, 13, 14, 107, 16, 107, 107, 19, 20, 21, |
|
| 549 | - 107, 39, 40, 41, 26, 107, 107, 107, 30, 107, 32, 33, 107, 107, 107, 107, 60, 61, |
|
| 550 | - 56, 57, 58, 59, 107, 107, 107, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 551 | - 1, 107, 60, 61, 81, 107, 107, 84, 85, 107, 11, 107, 89, 90, 91, 107, 93, 18, |
|
| 552 | - 107, 66, 107, 1, 107, 100, 71, 72, 27, 74, 75, 76, 107, 11, 107, 34, 81, 73, 37, |
|
| 553 | - 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 49, 12, 13, 107, 71, 72, 17, 74, |
|
| 554 | - 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, |
|
| 555 | - 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 51, 107, 81, 107, |
|
| 556 | - 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, |
|
| 557 | - 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, |
|
| 558 | - 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, |
|
| 559 | - 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, |
|
| 560 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 561 | - 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, |
|
| 562 | - 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, |
|
| 563 | - 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 564 | - 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 565 | - 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 566 | - 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, |
|
| 567 | - 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 568 | - 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 569 | - 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, |
|
| 570 | - 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, |
|
| 571 | - 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, |
|
| 572 | - 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, |
|
| 573 | - 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, |
|
| 574 | - 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, |
|
| 575 | - 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, |
|
| 576 | - 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 577 | - 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 578 | - 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, |
|
| 579 | - 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, |
|
| 580 | - 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, |
|
| 581 | - 107, 107, 107, 107, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 582 | - 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, |
|
| 583 | - 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, |
|
| 584 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, |
|
| 585 | - 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, |
|
| 586 | - 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, |
|
| 587 | - 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, |
|
| 588 | - 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, |
|
| 589 | - 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, |
|
| 590 | - 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, |
|
| 591 | - 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 592 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 593 | - 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 594 | - 84, 85, 1, 2, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 595 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 1, 107, 107, 89, 90, 91, 107, |
|
| 596 | - 93, 37, 107, 39, 40, 41, 63, 64, 65, 66, 67, 68, 107, 49, 71, 107, 107, 25, 107, |
|
| 597 | - 27, 56, 57, 58, 59, 107, 2, 34, 107, 107, 107, 107, 39, 40, 41, 107, 12, 13, 66, |
|
| 598 | - 15, 107, 17, 18, 71, 72, 1, 74, 107, 76, 56, 57, 58, 59, 81, 107, 11, 11, 85, |
|
| 599 | - 107, 12, 13, 89, 90, 91, 17, 93, 107, 107, 23, 107, 46, 27, 27, 49, 27, 51, 29, |
|
| 600 | - 53, 34, 34, 107, 34, 107, 39, 40, 41, 107, 107, 107, 66, 107, 1, 47, 107, 71, |
|
| 601 | - 72, 107, 74, 107, 76, 56, 57, 58, 59, 81, 107, 107, 107, 85, 107, 12, 13, 89, |
|
| 602 | - 90, 91, 17, 93, 27, 107, 107, 107, 107, 107, 107, 34, 27, 107, 29, 66, 39, 40, |
|
| 603 | - 41, 34, 71, 72, 107, 74, 107, 76, 107, 107, 107, 107, 81, 11, 107, 56, 57, 58, |
|
| 604 | - 59, 107, 89, 90, 91, 107, 93, 23, 107, 66, 107, 27, 107, 107, 71, 72, 107, 74, |
|
| 605 | - 34, 76, 66, 107, 107, 107, 81, 71, 72, 107, 74, 107, 76, 47, 89, 90, 91, 81, 93, |
|
| 606 | - 107, 107, 107, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, |
|
| 607 | - 74, 107, 76, 107, 107, 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, |
|
| 608 | - 91, 107, 93, 12, 13, 66, 15, 107, 17, 18, 71, 72, 107, 74, 107, 76, 107, 107, |
|
| 609 | - 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, 91, 107, 93, 12, 13, 107, |
|
| 610 | - 107, 46, 17, 18, 49, 66, 51, 2, 53, 1, 71, 72, 107, 74, 107, 76, 107, 12, 13, |
|
| 611 | - 107, 81, 107, 17, 18, 107, 107, 107, 107, 89, 90, 91, 46, 93, 107, 49, 107, 51, |
|
| 612 | - 107, 53, 54, 107, 1, 107, 107, 107, 107, 107, 39, 40, 41, 107, 46, 107, 107, 49, |
|
| 613 | - 107, 51, 107, 53, 107, 107, 2, 22, 107, 56, 57, 58, 59, 107, 61, 107, 12, 13, |
|
| 614 | - 107, 107, 107, 17, 18, 107, 39, 40, 41, 12, 13, 107, 107, 107, 17, 18, 107, 107, |
|
| 615 | - 107, 107, 107, 107, 107, 56, 57, 58, 59, 107, 107, 107, 107, 107, 46, 107, 107, |
|
| 616 | - 49, 11, 51, 107, 53, 107, 107, 107, 46, 107, 107, 49, 22, 51, 24, 53, 107, 27, |
|
| 617 | - 107, 107, 107, 107, 107, 107, 34, 107, 36, 107, 38, 107, 107, 107, 107, 107, |
|
| 618 | - 107, 107, 46,); |
|
| 619 | - |
|
| 620 | - const YY_SHIFT_USE_DFLT = - 15; |
|
| 621 | - |
|
| 622 | - const YY_SHIFT_MAX = 238; |
|
| 623 | - |
|
| 624 | - static public $yy_shift_ofst = array(499, 393, 78, 393, 348, 78, 78, 348, - 12, - 12, 33, 78, 78, 78, 78, 168, 78, |
|
| 625 | - 78, 78, 213, 123, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 303, 78, 78, 78, |
|
| 626 | - 168, 258, 258, 438, 438, 438, 438, 438, 438, 1609, 1660, 1706, 1706, 1706, |
|
| 627 | - 1706, 1706, 499, 1912, 1153, 609, 541, 507, 989, 907, 825, 1071, 646, 1880, |
|
| 628 | - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 731, |
|
| 629 | - 731, 140, 725, 804, 230, 465, 280, 160, 747, 1714, 1663, 483, 483, 160, 280, |
|
| 630 | - 280, 324, 160, 522, 594, 1661, 1749, 642, 715, 317, 842, 40, 404, 3, 144, 404, |
|
| 631 | - - 5, 460, 327, 431, 161, 294, 147, 147, 426, - 5, 434, 223, 223, 265, 223, 223, |
|
| 632 | - 223, 223, 223, 223, 265, 223, - 15, 1827, 1857, 1640, 1877, 1931, 1942, 92, |
|
| 633 | - 645, 11, 90, - 5, 70, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, 214, |
|
| 634 | - - 5, 70, - 5, 70, - 5, - 5, - 5, - 5, - 5, 124, 124, 227, 124, 356, 124, 214, |
|
| 635 | - 124, 124, - 5, 70, 124, 124, 223, 223, 595, 587, 587, 223, 265, 232, 223, 265, |
|
| 636 | - 265, 223, - 15, - 15, - 15, - 15, - 15, 1581, 1970, 575, 694, 660, 260, 118, |
|
| 637 | - 73, - 6, 96, 256, 295, 308, 145, 44, 110, 208, 263, - 14, 99, 439, 232, 519, |
|
| 638 | - 521, 511, 509, 487, 83, 187, 101, 372, 279, 0, 297, 288, 481, 452, 371, 307, |
|
| 639 | - 319, 385, 412, 414, 433, 375, 402,); |
|
| 640 | - |
|
| 641 | - const YY_REDUCE_USE_DFLT = - 67; |
|
| 642 | - |
|
| 643 | - const YY_REDUCE_MAX = 192; |
|
| 644 | - |
|
| 645 | - static public $yy_reduce_ofst = array(1560, 469, 608, 503, 542, 570, 728, 643, 922, 1278, 1360, 1060, 950, 1032, |
|
| 646 | - 1086, 896, 868, 1004, 786, 1414, 1332, 1114, 1524, 1168, 1224, 1250, 1196, |
|
| 647 | - 1142, 1306, 1470, 1496, 1388, 1442, 978, 758, 840, 814, 1588, 1639, 1745, |
|
| 648 | - 1719, 1678, 1708, 1775, 1811, 1259, 931, 931, 1013, 1095, 849, 1177, 170, |
|
| 649 | - - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, |
|
| 650 | - - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 66, |
|
| 651 | - 46, 652, - 37, 484, 767, - 7, 136, 351, 113, 203, 254, 141, 314, 179, 278, |
|
| 652 | - 173, 420, 289, 394, 394, 289, 289, 20, 290, 228, 290, 424, 228, 326, 406, 289, |
|
| 653 | - 384, 289, 228, 316, 312, 435, 379, 389, 289, 289, 436, 458, 289, 289, 289, |
|
| 654 | - 289, 289, 289, 228, 289, 289, 476, 476, 476, 476, 476, 476, 502, 472, 476, |
|
| 655 | - 476, 466, 470, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 482, 466, |
|
| 656 | - 490, 466, 510, 466, 466, 466, 466, 466, 506, 506, 512, 506, 459, 506, 525, |
|
| 657 | - 506, 506, 466, 530, 506, 506, 28, 28, 534, 250, 250, 28, - 56, 193, 28, - 56, |
|
| 658 | - - 56, 28, 112, - 27, 454, 403, 446,); |
|
| 659 | - |
|
| 660 | - static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 661 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 662 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 663 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 664 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 665 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 666 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 667 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 668 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 669 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 670 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 671 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 672 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 673 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 674 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 675 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 676 | - 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 677 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 678 | - 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 679 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 680 | - 45, 46, 48, 50, 52, 53, 54, 55, 60,), |
|
| 681 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 682 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 683 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 684 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 685 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 686 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 687 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 688 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 689 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 690 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 691 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 692 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 693 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 694 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 695 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 696 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 697 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 698 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 699 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 700 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 701 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 702 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 703 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 704 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 705 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 706 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 707 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 708 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 709 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 710 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 711 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 712 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 713 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 714 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 715 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 716 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 717 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 718 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 719 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 720 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 721 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 722 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 723 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 724 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 725 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 726 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 727 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 728 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 729 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 730 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 731 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 732 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 733 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 734 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 735 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 736 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 737 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 738 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 739 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 740 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 741 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 742 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 743 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 744 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 745 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 746 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 747 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 748 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 749 | - array(1, 25, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 750 | - array(1, 11, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 751 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 752 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 753 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 754 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 755 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 756 | - array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 757 | - array(1, 22, 39, 40, 41, 56, 57, 58, 59,), |
|
| 758 | - array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 759 | - array(1, 28, 39, 40, 41, 56, 57, 58, 59,), |
|
| 760 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 761 | - array(1, 2, 39, 40, 41, 56, 57, 58, 59,), |
|
| 762 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 763 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 764 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 765 | - array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 766 | - array(1, 39, 40, 41, 54, 56, 57, 58, 59,), |
|
| 767 | - array(1, 39, 40, 41, 56, 57, 58, 59, 61,), |
|
| 768 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 769 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 770 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 771 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 772 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 773 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 774 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 775 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 776 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 777 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 778 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 779 | - array(1, 39, 40, 41, 56, 57, 58, 59,), array(39, 40, 41, 56, 57, 58, 59,), |
|
| 780 | - array(39, 40, 41, 56, 57, 58, 59,), array(14, 17, 50, 52, 55,), |
|
| 781 | - array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 782 | - array(1, 11, 18, 27, 34, 37, 49,), array(14, 17, 52, 55,), |
|
| 783 | - array(1, 11, 27, 34,), array(1, 27, 34,), array(14, 37, 55,), |
|
| 784 | - array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 785 | - array(12, 13, 17, 27, 29, 34,), array(12, 13, 17, 27, 29, 34,), |
|
| 786 | - array(12, 13, 17, 27, 34,), array(12, 13, 17, 27, 34,), array(14, 37, 55,), |
|
| 787 | - array(1, 27, 34,), array(1, 27, 34,), array(18, 46, 53,), |
|
| 788 | - array(14, 37, 55,), array(1, 2,), array(1, 11, 27, 28, 34,), |
|
| 789 | - array(11, 23, 27, 34, 47,), array(11, 23, 27, 34, 47,), |
|
| 790 | - array(1, 11, 27, 34,), array(1, 11, 27, 34,), array(13, 14, 17, 55,), |
|
| 791 | - array(12, 13, 17, 51,), array(15, 18, 49,), array(12, 13, 17,), |
|
| 792 | - array(8, 9, 10,), array(15, 18, 49,), array(12, 13, 17,), array(27, 34,), |
|
| 793 | - array(1, 54,), array(14, 55,), array(1, 11,), array(18, 49,), |
|
| 794 | - array(27, 34,), array(14, 17,), array(14, 17,), array(1, 18,), |
|
| 795 | - array(27, 34,), array(1, 29,), array(1,), array(1,), array(18,), array(1,), |
|
| 796 | - array(1,), array(1,), array(1,), array(1,), array(1,), array(18,), |
|
| 797 | - array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 798 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53, 54,), |
|
| 799 | - array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 800 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 801 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 802 | - array(12, 13, 17, 18, 46, 49, 51, 53,), array(13, 14, 17, 35, 55,), |
|
| 803 | - array(12, 13, 17, 51,), array(15, 46, 53,), array(12, 13, 17,), |
|
| 804 | - array(27, 34,), array(14, 55,), array(27, 34,), array(27, 34,), |
|
| 805 | - array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 806 | - array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 807 | - array(46, 53,), array(27, 34,), array(14, 55,), array(27, 34,), |
|
| 808 | - array(14, 55,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 809 | - array(27, 34,), array(27, 34,), array(46, 53,), array(46, 53,), |
|
| 810 | - array(13, 37,), array(46, 53,), array(15, 23,), array(46, 53,), |
|
| 811 | - array(46, 53,), array(46, 53,), array(46, 53,), array(27, 34,), |
|
| 812 | - array(14, 55,), array(46, 53,), array(46, 53,), array(1,), array(1,), |
|
| 813 | - array(9,), array(2,), array(2,), array(1,), array(18,), array(37,), |
|
| 814 | - array(1,), array(18,), array(18,), array(1,), array(), array(), array(), |
|
| 815 | - array(), array(), array(1, 2, 37, 39, 40, 41, 49, 56, 57, 58, 59,), |
|
| 816 | - array(11, 22, 24, 27, 34, 36, 38, 46,), array(11, 15, 27, 34, 37, 49,), |
|
| 817 | - array(37, 46, 49, 54,), array(12, 13, 17, 51,), array(29, 37, 49,), |
|
| 818 | - array(23, 47, 54,), array(23, 47, 61,), array(22, 36,), array(36, 54,), |
|
| 819 | - array(36, 38,), array(37, 49,), array(37, 49,), array(46, 54,), |
|
| 820 | - array(36, 38,), array(36, 38,), array(23, 47,), array(37, 49,), |
|
| 821 | - array(17, 51,), array(15, 46,), array(35,), array(37,), array(11,), |
|
| 822 | - array(17,), array(5,), array(17,), array(14,), array(17,), array(17,), |
|
| 823 | - array(15,), array(46,), array(17,), array(17,), array(42,), array(17,), |
|
| 824 | - array(52,), array(17,), array(24,), array(52,), array(35,), array(17,), |
|
| 825 | - array(37,), array(17,), array(54,), array(54,), array(38,), array(), |
|
| 826 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 827 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 828 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 829 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 830 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 831 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 832 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 833 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 834 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 835 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 836 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 837 | - array(), array(), array(), array(), array(), array(), array(), array(),); |
|
| 838 | - |
|
| 839 | - static public $yy_default = array(339, 517, 496, 532, 532, 496, 496, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 840 | - 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 841 | - 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 398, 532, 361, |
|
| 842 | - 398, 398, 374, 364, 336, 532, 532, 403, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 843 | - 400, 494, 518, 403, 409, 520, 379, 519, 405, 495, 410, 420, 425, 424, 532, 532, |
|
| 844 | - 436, 532, 412, 398, 532, 532, 398, 398, 398, 398, 532, 398, 398, 508, 532, 388, |
|
| 845 | - 412, 426, 426, 412, 412, 532, 461, 451, 461, 532, 451, 461, 398, 412, 532, 412, |
|
| 846 | - 451, 398, 532, 532, 392, 376, 412, 419, 394, 505, 427, 416, 428, 429, 415, 423, |
|
| 847 | - 451, 412, 503, 450, 450, 450, 450, 450, 450, 532, 463, 477, 461, 384, 532, 372, |
|
| 848 | - 383, 371, 366, 365, 368, 370, 360, 362, 385, 454, 386, 532, 358, 532, 387, 377, |
|
| 849 | - 382, 381, 375, 457, 486, 461, 487, 532, 489, 456, 455, 488, 378, 532, 458, 459, |
|
| 850 | - 445, 393, 352, 497, 498, 389, 506, 461, 418, 509, 483, 395, 461, 461, 502, 502, |
|
| 851 | - 502, 436, 432, 436, 436, 462, 436, 426, 426, 532, 532, 532, 532, 436, 432, 532, |
|
| 852 | - 532, 426, 446, 532, 432, 532, 477, 532, 532, 344, 532, 532, 532, 532, 532, 432, |
|
| 853 | - 532, 532, 438, 532, 532, 532, 406, 532, 434, 532, 507, 532, 441, 532, 532, 340, |
|
| 854 | - 504, 492, 338, 337, 491, 438, 467, 482, 396, 341, 441, 477, 413, 349, 343, 350, |
|
| 855 | - 466, 351, 411, 348, 431, 346, 345, 347, 433, 407, 465, 355, 464, 356, 414, 437, |
|
| 856 | - 399, 353, 435, 380, 354, 342, 421, 417, 513, 479, 440, 439, 480, 512, 390, 511, |
|
| 857 | - 510, 523, 522, 521, 481, 484, 493, 500, 478, 453, 485, 499, 452, 529, 430, 501, |
|
| 858 | - 528, 391, 526, 525, 443, 373, 460, 490, 444, 422, 473, 471, 476, 442, 470, 469, |
|
| 859 | - 468, 447, 449, 524, 475, 531, 530, 527, 448, 397, 515, 474, 516, 472, 514, 367,); |
|
| 860 | - |
|
| 861 | - const YYNOCODE = 108; |
|
| 862 | - |
|
| 863 | - const YYSTACKDEPTH = 500; |
|
| 864 | - |
|
| 865 | - const YYNSTATE = 336; |
|
| 866 | - |
|
| 867 | - const YYNRULE = 196; |
|
| 868 | - |
|
| 869 | - const YYERRORSYMBOL = 62; |
|
| 870 | - |
|
| 871 | - const YYERRSYMDT = 'yy0'; |
|
| 872 | - |
|
| 873 | - const YYFALLBACK = 0; |
|
| 874 | - |
|
| 875 | - public static $yyFallback = array(); |
|
| 876 | - |
|
| 877 | - public function Trace($TraceFILE, $zTracePrompt) |
|
| 878 | - { |
|
| 879 | - if (!$TraceFILE) { |
|
| 880 | - $zTracePrompt = 0; |
|
| 881 | - } elseif (!$zTracePrompt) { |
|
| 882 | - $TraceFILE = 0; |
|
| 883 | - } |
|
| 884 | - $this->yyTraceFILE = $TraceFILE; |
|
| 885 | - $this->yyTracePrompt = $zTracePrompt; |
|
| 886 | - } |
|
| 887 | - |
|
| 888 | - public function PrintTrace() |
|
| 889 | - { |
|
| 890 | - $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 891 | - $this->yyTracePrompt = '<br>'; |
|
| 892 | - } |
|
| 893 | - |
|
| 894 | - public $yyTraceFILE; |
|
| 895 | - |
|
| 896 | - public $yyTracePrompt; |
|
| 897 | - |
|
| 898 | - public $yyidx; /* Index of top element in stack */ |
|
| 899 | - public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | - public $yystack = array(); /* The parser's stack */ |
|
| 901 | - |
|
| 902 | - public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', |
|
| 903 | - 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', |
|
| 904 | - 'SIMPLETAG', 'ID', 'PTR', 'LDELMAKENOCACHE', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', |
|
| 905 | - 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', |
|
| 906 | - 'SMARTYBLOCKCHILDPARENT', 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', |
|
| 907 | - 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', |
|
| 908 | - 'INSTANCEOF', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', |
|
| 909 | - 'CLOSEB', 'DOLLAR', 'LOGOP', 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', |
|
| 910 | - 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', |
|
| 911 | - 'text_content', 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', |
|
| 912 | - 'value', 'expr', 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', |
|
| 913 | - 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'tlop', 'lop', 'scond', |
|
| 914 | - 'function', 'ns1', 'doublequoted_with_quotes', 'static_class_access', 'object', |
|
| 915 | - 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', |
|
| 916 | - 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', |
|
| 917 | - 'doublequotedcontent',); |
|
| 918 | - |
|
| 919 | - public static $yyRuleName = array('start ::= template', 'template ::= template_element', |
|
| 920 | - 'template ::= template template_element', 'template ::=', |
|
| 921 | - 'template_element ::= smartytag', 'template_element ::= literal', |
|
| 922 | - 'template_element ::= PHP', 'template_element ::= NOCACHE', |
|
| 923 | - 'template_element ::= text_content', 'text_content ::= TEXT', |
|
| 924 | - 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', |
|
| 925 | - 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND', |
|
| 926 | - 'literal ::= LITERALSTART literal_elements LITERALEND', |
|
| 927 | - 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', |
|
| 928 | - 'literal_element ::= literal', 'literal_element ::= LITERAL', |
|
| 929 | - 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable', |
|
| 930 | - 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', |
|
| 931 | - 'tag ::= LDEL value attributes', 'tag ::= LDEL expr', |
|
| 932 | - 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', |
|
| 933 | - 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes', |
|
| 934 | - 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG', |
|
| 935 | - 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID', |
|
| 936 | - 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes', |
|
| 937 | - 'tag ::= LDEL ID PTR ID modifierlist attributes', |
|
| 938 | - 'tag ::= LDELMAKENOCACHE DOLLARID', 'tag ::= LDELIF expr', |
|
| 939 | - 'tag ::= LDELIF expr attributes', 'tag ::= LDELIF statement', |
|
| 940 | - 'tag ::= LDELIF statement attributes', |
|
| 941 | - 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', |
|
| 942 | - 'foraction ::= EQUAL expr', 'foraction ::= INCDEC', |
|
| 943 | - 'tag ::= LDELFOR statement TO expr attributes', |
|
| 944 | - 'tag ::= LDELFOR statement TO expr STEP expr attributes', |
|
| 945 | - 'tag ::= LDELFOREACH attributes', |
|
| 946 | - 'tag ::= LDELFOREACH SPACE value AS varvar attributes', |
|
| 947 | - 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes', |
|
| 948 | - 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', |
|
| 949 | - 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', |
|
| 950 | - 'tag ::= LDELSETFILTER ID modparameters', |
|
| 951 | - 'tag ::= LDELSETFILTER ID modparameters modifierlist', |
|
| 952 | - 'tag ::= LDEL SMARTYBLOCKCHILDPARENT', 'smartytag ::= CLOSETAG', |
|
| 953 | - 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist', |
|
| 954 | - 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist', |
|
| 955 | - 'attributes ::= attributes attribute', 'attributes ::= attribute', |
|
| 956 | - 'attributes ::=', 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr', |
|
| 957 | - 'attribute ::= ATTR value', 'attribute ::= SPACE ID', 'attribute ::= SPACE expr', |
|
| 958 | - 'attribute ::= SPACE value', 'attribute ::= SPACE INTEGER EQUAL expr', |
|
| 959 | - 'statements ::= statement', 'statements ::= statements COMMA statement', |
|
| 960 | - 'statement ::= DOLLARID EQUAL INTEGER', 'statement ::= DOLLARID EQUAL expr', |
|
| 961 | - 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP', |
|
| 962 | - 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID', |
|
| 963 | - 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array', |
|
| 964 | - 'expr ::= expr modifierlist', 'expr ::= expr tlop value', |
|
| 965 | - 'expr ::= expr lop expr', 'expr ::= expr scond', 'expr ::= expr ISIN array', |
|
| 966 | - 'expr ::= expr ISIN value', |
|
| 967 | - 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', |
|
| 968 | - 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable', |
|
| 969 | - 'value ::= UNIMATH value', 'value ::= NOT value', 'value ::= TYPECAST value', |
|
| 970 | - 'value ::= variable INCDEC', 'value ::= HEX', 'value ::= INTEGER', |
|
| 971 | - 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER', |
|
| 972 | - 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP', |
|
| 973 | - 'value ::= variable INSTANCEOF ns1', 'value ::= variable INSTANCEOF variable', |
|
| 974 | - 'value ::= SINGLEQUOTESTRING', 'value ::= doublequoted_with_quotes', |
|
| 975 | - 'value ::= varindexed DOUBLECOLON static_class_access', 'value ::= smartytag', |
|
| 976 | - 'value ::= value modifierlist', 'value ::= NAMESPACE', |
|
| 977 | - 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID', |
|
| 978 | - 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID', 'variable ::= varindexed', |
|
| 979 | - 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH', |
|
| 980 | - 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH', |
|
| 981 | - 'variable ::= HATCH variable HATCH arrayindex', |
|
| 982 | - 'varindexed ::= DOLLARID arrayindex', 'varindexed ::= varvar arrayindex', |
|
| 983 | - 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=', |
|
| 984 | - 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar', |
|
| 985 | - 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID', |
|
| 986 | - 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL', |
|
| 987 | - 'indexdef ::= OPENB ID CLOSEB', 'indexdef ::= OPENB ID DOT ID CLOSEB', |
|
| 988 | - 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', |
|
| 989 | - 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB', |
|
| 990 | - 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB', |
|
| 991 | - 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB', |
|
| 992 | - 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', |
|
| 993 | - 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', |
|
| 994 | - 'object ::= varindexed objectchain', 'objectchain ::= objectelement', |
|
| 995 | - 'objectchain ::= objectchain objectelement', |
|
| 996 | - 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex', |
|
| 997 | - 'objectelement ::= PTR LDEL expr RDEL arrayindex', |
|
| 998 | - 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', |
|
| 999 | - 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP', |
|
| 1000 | - 'method ::= ID OPENP params CLOSEP', 'method ::= DOLLARID OPENP params CLOSEP', |
|
| 1001 | - 'params ::= params COMMA expr', 'params ::= expr', 'params ::=', |
|
| 1002 | - 'modifierlist ::= modifierlist modifier modparameters', |
|
| 1003 | - 'modifierlist ::= modifier modparameters', 'modifier ::= VERT AT ID', |
|
| 1004 | - 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter', |
|
| 1005 | - 'modparameters ::=', 'modparameter ::= COLON value', |
|
| 1006 | - 'modparameter ::= COLON array', 'static_class_access ::= method', |
|
| 1007 | - 'static_class_access ::= method objectchain', 'static_class_access ::= ID', |
|
| 1008 | - 'static_class_access ::= DOLLARID arrayindex', |
|
| 1009 | - 'static_class_access ::= DOLLARID arrayindex objectchain', 'lop ::= LOGOP', |
|
| 1010 | - 'lop ::= SLOGOP', 'tlop ::= TLOGOP', 'scond ::= SINGLECOND', |
|
| 1011 | - 'array ::= OPENB arrayelements CLOSEB', 'arrayelements ::= arrayelement', |
|
| 1012 | - 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=', |
|
| 1013 | - 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr', |
|
| 1014 | - 'arrayelement ::= expr', 'doublequoted_with_quotes ::= QUOTE QUOTE', |
|
| 1015 | - 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', |
|
| 1016 | - 'doublequoted ::= doublequoted doublequotedcontent', |
|
| 1017 | - 'doublequoted ::= doublequotedcontent', |
|
| 1018 | - 'doublequotedcontent ::= BACKTICK variable BACKTICK', |
|
| 1019 | - 'doublequotedcontent ::= BACKTICK expr BACKTICK', |
|
| 1020 | - 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL', |
|
| 1021 | - 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag', |
|
| 1022 | - 'doublequotedcontent ::= TEXT',); |
|
| 1023 | - |
|
| 1024 | - public function tokenName($tokenType) |
|
| 1025 | - { |
|
| 1026 | - if ($tokenType === 0) { |
|
| 1027 | - return 'End of Input'; |
|
| 1028 | - } |
|
| 390 | + static public $yy_action = array(269, 8, 133, 295, 335, 80, 282, 219, 7, 84, 128, 178, 255, 276, 113, 102, 13, 83, |
|
| 391 | + 227, 286, 305, 220, 36, 223, 283, 21, 32, 297, 41, 14, 90, 40, 44, 260, 213, 231, |
|
| 392 | + 250, 235, 210, 128, 81, 1, 298, 296, 102, 269, 8, 132, 79, 335, 196, 184, 219, 7, |
|
| 393 | + 84, 26, 297, 461, 101, 113, 39, 24, 278, 227, 461, 305, 220, 171, 206, 222, 21, |
|
| 394 | + 230, 201, 41, 104, 192, 40, 44, 260, 213, 18, 236, 241, 210, 251, 81, 1, 316, 296, |
|
| 395 | + 114, 269, 8, 135, 79, 335, 205, 302, 219, 7, 84, 116, 107, 477, 477, 113, 33, 197, |
|
| 396 | + 477, 227, 266, 305, 220, 326, 223, 31, 21, 29, 215, 41, 311, 78, 40, 44, 260, 213, |
|
| 397 | + 296, 250, 256, 210, 190, 81, 1, 3, 296, 307, 269, 8, 134, 79, 335, 205, 302, 219, |
|
| 398 | + 7, 84, 232, 18, 296, 294, 113, 334, 85, 323, 227, 136, 305, 220, 328, 223, 29, 21, |
|
| 399 | + 183, 101, 41, 234, 78, 40, 44, 260, 213, 137, 250, 314, 210, 139, 81, 1, 10, 296, |
|
| 400 | + 101, 269, 8, 135, 79, 335, 195, 154, 219, 7, 84, 322, 232, 81, 114, 113, 296, 329, |
|
| 401 | + 94, 227, 315, 305, 220, 326, 212, 120, 21, 168, 215, 41, 281, 114, 40, 44, 260, |
|
| 402 | + 213, 296, 250, 222, 210, 265, 81, 1, 104, 296, 211, 269, 8, 135, 79, 335, 193, 302, |
|
| 403 | + 219, 7, 84, 242, 239, 249, 217, 113, 11, 215, 289, 227, 136, 305, 220, 228, 223, |
|
| 404 | + 222, 21, 238, 149, 41, 104, 78, 40, 44, 260, 213, 461, 250, 329, 210, 6, 81, 1, |
|
| 405 | + 461, 296, 2, 269, 8, 136, 79, 335, 205, 158, 219, 7, 84, 190, 211, 81, 101, 113, |
|
| 406 | + 296, 329, 93, 227, 12, 305, 220, 18, 223, 244, 34, 268, 448, 41, 281, 449, 40, 44, |
|
| 407 | + 260, 213, 191, 250, 36, 210, 448, 81, 1, 449, 296, 14, 269, 8, 135, 79, 335, 205, |
|
| 408 | + 15, 219, 7, 84, 186, 293, 152, 14, 113, 16, 214, 5, 227, 165, 305, 220, 329, 194, |
|
| 409 | + 20, 21, 140, 101, 41, 115, 448, 40, 44, 260, 213, 281, 250, 303, 210, 264, 81, 1, |
|
| 410 | + 448, 296, 169, 269, 8, 131, 79, 335, 205, 176, 219, 7, 84, 137, 28, 296, 310, 113, |
|
| 411 | + 185, 293, 10, 227, 275, 305, 220, 296, 223, 175, 4, 281, 143, 41, 144, 192, 40, 44, |
|
| 412 | + 260, 213, 35, 250, 329, 210, 329, 81, 1, 270, 296, 308, 269, 8, 135, 79, 335, 198, |
|
| 413 | + 121, 219, 7, 84, 190, 292, 17, 232, 113, 166, 284, 281, 227, 141, 305, 220, 211, |
|
| 414 | + 223, 319, 21, 299, 211, 41, 329, 211, 40, 44, 260, 213, 258, 250, 363, 210, 221, |
|
| 415 | + 81, 1, 281, 296, 6, 269, 8, 136, 79, 335, 205, 177, 219, 7, 84, 167, 211, 159, 22, |
|
| 416 | + 113, 104, 211, 156, 227, 300, 305, 220, 329, 223, 274, 34, 359, 329, 41, 172, 192, |
|
| 417 | + 40, 44, 260, 213, 95, 250, 318, 210, 329, 81, 273, 36, 296, 257, 292, 17, 181, 79, |
|
| 418 | + 14, 284, 309, 277, 254, 262, 263, 259, 178, 211, 25, 36, 269, 8, 187, 331, 335, |
|
| 419 | + 261, 14, 219, 7, 84, 192, 303, 211, 38, 113, 237, 321, 180, 227, 267, 305, 220, |
|
| 420 | + 153, 121, 312, 179, 192, 272, 108, 215, 209, 211, 118, 69, 112, 43, 42, 37, 248, |
|
| 421 | + 102, 86, 189, 252, 279, 182, 293, 150, 271, 204, 317, 176, 297, 288, 287, 285, 280, |
|
| 422 | + 329, 281, 312, 174, 87, 202, 330, 215, 209, 170, 118, 69, 112, 43, 42, 37, 138, |
|
| 423 | + 102, 192, 402, 252, 279, 38, 216, 88, 271, 204, 317, 211, 297, 288, 287, 285, 280, |
|
| 424 | + 310, 402, 105, 253, 404, 164, 332, 312, 402, 211, 89, 448, 215, 209, 305, 129, 61, |
|
| 425 | + 106, 163, 238, 404, 142, 102, 448, 305, 252, 279, 404, 305, 305, 271, 204, 317, |
|
| 426 | + 305, 297, 312, 155, 305, 305, 305, 215, 209, 211, 129, 73, 112, 211, 43, 42, 37, |
|
| 427 | + 102, 305, 404, 252, 279, 305, 292, 17, 271, 204, 317, 284, 297, 305, 288, 287, 285, |
|
| 428 | + 280, 404, 203, 305, 477, 477, 312, 305, 404, 477, 305, 215, 209, 305, 129, 73, 112, |
|
| 429 | + 43, 42, 37, 305, 102, 305, 305, 252, 279, 305, 305, 224, 271, 204, 317, 324, 297, |
|
| 430 | + 288, 287, 285, 280, 305, 305, 208, 312, 305, 477, 305, 305, 215, 209, 211, 129, 50, |
|
| 431 | + 106, 305, 117, 305, 305, 102, 148, 401, 252, 279, 92, 325, 448, 271, 204, 317, 329, |
|
| 432 | + 297, 269, 9, 327, 218, 335, 401, 448, 219, 7, 84, 305, 320, 401, 305, 113, 325, |
|
| 433 | + 192, 305, 227, 305, 305, 220, 269, 9, 327, 305, 335, 305, 305, 219, 7, 84, 305, 43, |
|
| 434 | + 42, 37, 113, 305, 305, 305, 227, 305, 305, 220, 305, 305, 305, 305, 291, 27, 288, |
|
| 435 | + 287, 285, 280, 305, 305, 305, 312, 305, 305, 305, 305, 215, 209, 305, 129, 73, 112, |
|
| 436 | + 211, 305, 290, 27, 102, 305, 305, 252, 279, 305, 369, 305, 271, 204, 317, 305, 297, |
|
| 437 | + 225, 305, 312, 305, 211, 305, 207, 215, 209, 36, 129, 54, 112, 305, 188, 305, 14, |
|
| 438 | + 102, 145, 448, 252, 279, 91, 305, 305, 271, 204, 317, 329, 297, 312, 448, 292, 17, |
|
| 439 | + 305, 215, 209, 284, 129, 65, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, |
|
| 440 | + 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 99, 67, |
|
| 441 | + 112, 305, 305, 229, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, |
|
| 442 | + 312, 297, 211, 305, 305, 215, 209, 305, 129, 45, 112, 305, 246, 305, 305, 102, 162, |
|
| 443 | + 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, |
|
| 444 | + 209, 305, 129, 56, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, |
|
| 445 | + 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 96, 55, 112, 305, |
|
| 446 | + 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 447 | + 211, 305, 305, 215, 97, 305, 82, 47, 103, 305, 247, 305, 305, 102, 151, 305, 252, |
|
| 448 | + 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, |
|
| 449 | + 129, 71, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, |
|
| 450 | + 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 59, 112, 305, 305, 305, |
|
| 451 | + 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, |
|
| 452 | + 305, 215, 209, 305, 129, 58, 112, 305, 305, 305, 305, 102, 160, 305, 252, 279, 184, |
|
| 453 | + 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 53, |
|
| 454 | + 112, 226, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, |
|
| 455 | + 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 60, 112, 305, 305, 305, 305, 102, |
|
| 456 | + 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, |
|
| 457 | + 209, 305, 100, 64, 112, 305, 305, 305, 305, 102, 146, 305, 252, 279, 184, 305, 305, |
|
| 458 | + 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 61, 112, 245, |
|
| 459 | + 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 460 | + 288, 287, 285, 280, 215, 200, 305, 129, 63, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 461 | + 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, 209, 305, |
|
| 462 | + 111, 51, 112, 305, 305, 305, 305, 102, 147, 305, 252, 279, 184, 305, 305, 271, 204, |
|
| 463 | + 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 49, 112, 305, 43, 42, 37, |
|
| 464 | + 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, |
|
| 465 | + 285, 280, 215, 209, 305, 129, 75, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, |
|
| 466 | + 305, 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 76, 112, |
|
| 467 | + 305, 305, 305, 305, 102, 161, 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, |
|
| 468 | + 297, 312, 39, 24, 278, 305, 215, 98, 305, 82, 46, 103, 305, 305, 305, 305, 102, |
|
| 469 | + 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, |
|
| 470 | + 305, 215, 209, 305, 129, 70, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, |
|
| 471 | + 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 57, 112, 305, |
|
| 472 | + 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, |
|
| 473 | + 312, 305, 305, 305, 305, 215, 199, 305, 109, 62, 112, 305, 305, 305, 305, 102, 305, |
|
| 474 | + 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, |
|
| 475 | + 215, 209, 305, 129, 72, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, |
|
| 476 | + 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 77, 112, 305, 305, |
|
| 477 | + 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 478 | + 305, 305, 305, 305, 215, 209, 305, 129, 68, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 479 | + 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, 215, |
|
| 480 | + 209, 305, 129, 74, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, |
|
| 481 | + 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 48, 112, 305, 305, 305, |
|
| 482 | + 305, 102, 305, 305, 252, 279, 414, 414, 305, 271, 204, 317, 305, 297, 312, 305, |
|
| 483 | + 305, 305, 305, 215, 209, 305, 129, 66, 112, 305, 305, 305, 305, 102, 305, 305, 252, |
|
| 484 | + 279, 211, 305, 305, 271, 204, 317, 305, 297, 448, 305, 414, 414, 414, 533, 52, 243, |
|
| 485 | + 239, 249, 217, 305, 448, 215, 305, 305, 30, 305, 36, 414, 414, 414, 414, 305, 233, |
|
| 486 | + 14, 305, 305, 305, 305, 43, 42, 37, 305, 477, 477, 312, 23, 305, 477, 461, 215, |
|
| 487 | + 209, 211, 127, 305, 112, 288, 287, 285, 280, 102, 305, 301, 357, 313, 305, 292, 17, |
|
| 488 | + 271, 204, 317, 284, 297, 305, 305, 302, 305, 461, 36, 36, 461, 36, 477, 157, 461, |
|
| 489 | + 14, 14, 305, 14, 305, 43, 42, 37, 305, 305, 305, 312, 305, 211, 78, 305, 215, 209, |
|
| 490 | + 305, 130, 305, 112, 288, 287, 285, 280, 102, 305, 305, 305, 240, 305, 292, 17, 271, |
|
| 491 | + 204, 317, 284, 297, 36, 305, 305, 305, 305, 305, 305, 14, 36, 305, 173, 312, 43, |
|
| 492 | + 42, 37, 14, 215, 209, 305, 122, 305, 112, 305, 305, 305, 305, 102, 304, 305, 288, |
|
| 493 | + 287, 285, 280, 305, 271, 204, 317, 305, 297, 302, 305, 312, 305, 36, 305, 305, 215, |
|
| 494 | + 209, 305, 123, 14, 112, 312, 305, 305, 305, 102, 215, 209, 305, 124, 305, 112, 78, |
|
| 495 | + 271, 204, 317, 102, 297, 305, 305, 305, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 496 | + 305, 305, 305, 215, 209, 305, 119, 305, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 497 | + 233, 305, 305, 305, 305, 271, 204, 317, 305, 297, 477, 477, 312, 32, 305, 477, 461, |
|
| 498 | + 215, 209, 305, 126, 305, 112, 305, 305, 305, 305, 102, 305, 305, 233, 305, 305, |
|
| 499 | + 305, 305, 271, 204, 317, 305, 297, 477, 477, 305, 305, 461, 477, 461, 461, 312, |
|
| 500 | + 477, 19, 461, 211, 215, 209, 305, 125, 305, 112, 305, 477, 477, 305, 102, 305, 477, |
|
| 501 | + 461, 305, 305, 305, 305, 271, 204, 317, 461, 297, 305, 461, 305, 477, 305, 461, |
|
| 502 | + 333, 305, 211, 305, 305, 305, 305, 305, 43, 42, 37, 305, 461, 305, 305, 461, 305, |
|
| 503 | + 477, 305, 461, 305, 305, 233, 110, 305, 288, 287, 285, 280, 305, 306, 305, 477, |
|
| 504 | + 477, 305, 305, 305, 477, 461, 305, 43, 42, 37, 477, 477, 305, 305, 305, 477, 461, |
|
| 505 | + 305, 305, 305, 305, 305, 305, 305, 288, 287, 285, 280, 305, 305, 305, 305, 305, |
|
| 506 | + 461, 305, 305, 461, 408, 477, 305, 461, 305, 305, 305, 461, 305, 305, 461, 408, |
|
| 507 | + 477, 408, 461, 305, 408, 305, 305, 305, 305, 305, 305, 408, 305, 408, 305, 408, |
|
| 508 | + 305, 305, 305, 305, 305, 305, 305, 232,); |
|
| 509 | + |
|
| 510 | + static public $yy_lookahead = array(12, 13, 14, 17, 16, 17, 72, 19, 20, 21, 76, 8, 9, 10, 26, 81, 22, 17, 30, 31, |
|
| 511 | + 32, 33, 27, 35, 90, 37, 15, 93, 40, 34, 36, 43, 44, 45, 46, 72, 48, 51, 50, 76, |
|
| 512 | + 52, 53, 98, 55, 81, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 15, 93, 46, 18, 26, |
|
| 513 | + 86, 87, 88, 30, 53, 32, 33, 94, 35, 76, 37, 78, 79, 40, 81, 101, 43, 44, 45, 46, |
|
| 514 | + 36, 48, 38, 50, 14, 52, 53, 54, 55, 49, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, |
|
| 515 | + 17, 81, 12, 13, 26, 13, 14, 17, 30, 17, 32, 33, 66, 35, 15, 37, 15, 71, 40, 99, |
|
| 516 | + 47, 43, 44, 45, 46, 55, 48, 35, 50, 101, 52, 53, 36, 55, 61, 12, 13, 14, 60, 16, |
|
| 517 | + 17, 23, 19, 20, 21, 46, 36, 55, 38, 26, 54, 105, 106, 30, 14, 32, 33, 17, 35, |
|
| 518 | + 15, 37, 14, 18, 40, 17, 47, 43, 44, 45, 46, 46, 48, 54, 50, 14, 52, 53, 53, 55, |
|
| 519 | + 18, 12, 13, 14, 60, 16, 17, 73, 19, 20, 21, 50, 46, 52, 49, 26, 55, 83, 37, 30, |
|
| 520 | + 54, 32, 33, 66, 35, 17, 37, 94, 71, 40, 96, 49, 43, 44, 45, 46, 55, 48, 76, 50, |
|
| 521 | + 78, 52, 53, 81, 55, 1, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, 65, 66, 67, 68, |
|
| 522 | + 26, 13, 71, 106, 30, 14, 32, 33, 17, 35, 76, 37, 78, 73, 40, 81, 47, 43, 44, 45, |
|
| 523 | + 46, 46, 48, 83, 50, 37, 52, 53, 53, 55, 37, 12, 13, 14, 60, 16, 17, 73, 19, 20, |
|
| 524 | + 21, 101, 1, 52, 18, 26, 55, 83, 94, 30, 29, 32, 33, 36, 35, 38, 37, 17, 37, 40, |
|
| 525 | + 96, 37, 43, 44, 45, 46, 17, 48, 27, 50, 49, 52, 53, 49, 55, 34, 12, 13, 14, 60, |
|
| 526 | + 16, 17, 27, 19, 20, 21, 97, 98, 73, 34, 26, 13, 14, 37, 30, 17, 32, 33, 83, 35, |
|
| 527 | + 42, 37, 14, 18, 40, 49, 37, 43, 44, 45, 46, 96, 48, 102, 50, 35, 52, 53, 49, 55, |
|
| 528 | + 52, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 46, 15, 55, 95, 26, 97, 98, 53, 30, |
|
| 529 | + 23, 32, 33, 55, 35, 94, 37, 96, 73, 40, 73, 101, 43, 44, 45, 46, 24, 48, 83, 50, |
|
| 530 | + 83, 52, 53, 17, 55, 92, 12, 13, 14, 60, 16, 17, 99, 19, 20, 21, 101, 12, 13, 46, |
|
| 531 | + 26, 94, 17, 96, 30, 73, 32, 33, 1, 35, 54, 37, 17, 1, 40, 83, 1, 43, 44, 45, 46, |
|
| 532 | + 38, 48, 11, 50, 18, 52, 53, 96, 55, 37, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, |
|
| 533 | + 76, 1, 73, 29, 26, 81, 1, 73, 30, 17, 32, 33, 83, 35, 35, 37, 11, 83, 40, 73, |
|
| 534 | + 101, 43, 44, 45, 46, 82, 48, 54, 50, 83, 52, 67, 27, 55, 70, 12, 13, 77, 60, 34, |
|
| 535 | + 17, 14, 3, 4, 5, 6, 7, 8, 1, 2, 27, 12, 13, 77, 54, 16, 5, 34, 19, 20, 21, 101, |
|
| 536 | + 102, 1, 2, 26, 17, 92, 82, 30, 11, 32, 33, 52, 99, 66, 82, 101, 17, 80, 71, 72, |
|
| 537 | + 1, 74, 75, 76, 39, 40, 41, 83, 81, 81, 11, 84, 85, 97, 98, 73, 89, 90, 91, 77, |
|
| 538 | + 93, 56, 57, 58, 59, 83, 96, 66, 94, 81, 103, 104, 71, 72, 94, 74, 75, 76, 39, |
|
| 539 | + 40, 41, 81, 81, 101, 11, 84, 85, 2, 15, 81, 89, 90, 91, 1, 93, 56, 57, 58, 59, |
|
| 540 | + 95, 27, 69, 9, 11, 94, 104, 66, 34, 1, 81, 37, 71, 72, 107, 74, 75, 76, 94, 78, |
|
| 541 | + 27, 28, 81, 49, 107, 84, 85, 34, 107, 107, 89, 90, 91, 107, 93, 66, 28, 107, |
|
| 542 | + 107, 107, 71, 72, 1, 74, 75, 76, 1, 39, 40, 41, 81, 107, 11, 84, 85, 107, 12, |
|
| 543 | + 13, 89, 90, 91, 17, 93, 107, 56, 57, 58, 59, 27, 100, 107, 12, 13, 66, 107, 34, |
|
| 544 | + 17, 107, 71, 72, 107, 74, 75, 76, 39, 40, 41, 107, 81, 107, 107, 84, 85, 107, |
|
| 545 | + 107, 51, 89, 90, 91, 54, 93, 56, 57, 58, 59, 107, 107, 100, 66, 107, 51, 107, |
|
| 546 | + 107, 71, 72, 1, 74, 75, 76, 107, 78, 107, 107, 81, 73, 11, 84, 85, 77, 5, 37, |
|
| 547 | + 89, 90, 91, 83, 93, 12, 13, 14, 46, 16, 27, 49, 19, 20, 21, 107, 54, 34, 107, |
|
| 548 | + 26, 5, 101, 107, 30, 107, 32, 33, 12, 13, 14, 107, 16, 107, 107, 19, 20, 21, |
|
| 549 | + 107, 39, 40, 41, 26, 107, 107, 107, 30, 107, 32, 33, 107, 107, 107, 107, 60, 61, |
|
| 550 | + 56, 57, 58, 59, 107, 107, 107, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 551 | + 1, 107, 60, 61, 81, 107, 107, 84, 85, 107, 11, 107, 89, 90, 91, 107, 93, 18, |
|
| 552 | + 107, 66, 107, 1, 107, 100, 71, 72, 27, 74, 75, 76, 107, 11, 107, 34, 81, 73, 37, |
|
| 553 | + 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 49, 12, 13, 107, 71, 72, 17, 74, |
|
| 554 | + 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, |
|
| 555 | + 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 51, 107, 81, 107, |
|
| 556 | + 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, |
|
| 557 | + 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, |
|
| 558 | + 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, |
|
| 559 | + 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, |
|
| 560 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 561 | + 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, |
|
| 562 | + 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, |
|
| 563 | + 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 564 | + 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 565 | + 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 566 | + 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, |
|
| 567 | + 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 568 | + 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 569 | + 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, |
|
| 570 | + 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, |
|
| 571 | + 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, |
|
| 572 | + 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, |
|
| 573 | + 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, |
|
| 574 | + 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, |
|
| 575 | + 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, |
|
| 576 | + 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 577 | + 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 578 | + 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, |
|
| 579 | + 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, |
|
| 580 | + 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, |
|
| 581 | + 107, 107, 107, 107, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 582 | + 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, |
|
| 583 | + 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, |
|
| 584 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, |
|
| 585 | + 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, |
|
| 586 | + 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, |
|
| 587 | + 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, |
|
| 588 | + 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, |
|
| 589 | + 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, |
|
| 590 | + 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, |
|
| 591 | + 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 592 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 593 | + 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 594 | + 84, 85, 1, 2, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 595 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 1, 107, 107, 89, 90, 91, 107, |
|
| 596 | + 93, 37, 107, 39, 40, 41, 63, 64, 65, 66, 67, 68, 107, 49, 71, 107, 107, 25, 107, |
|
| 597 | + 27, 56, 57, 58, 59, 107, 2, 34, 107, 107, 107, 107, 39, 40, 41, 107, 12, 13, 66, |
|
| 598 | + 15, 107, 17, 18, 71, 72, 1, 74, 107, 76, 56, 57, 58, 59, 81, 107, 11, 11, 85, |
|
| 599 | + 107, 12, 13, 89, 90, 91, 17, 93, 107, 107, 23, 107, 46, 27, 27, 49, 27, 51, 29, |
|
| 600 | + 53, 34, 34, 107, 34, 107, 39, 40, 41, 107, 107, 107, 66, 107, 1, 47, 107, 71, |
|
| 601 | + 72, 107, 74, 107, 76, 56, 57, 58, 59, 81, 107, 107, 107, 85, 107, 12, 13, 89, |
|
| 602 | + 90, 91, 17, 93, 27, 107, 107, 107, 107, 107, 107, 34, 27, 107, 29, 66, 39, 40, |
|
| 603 | + 41, 34, 71, 72, 107, 74, 107, 76, 107, 107, 107, 107, 81, 11, 107, 56, 57, 58, |
|
| 604 | + 59, 107, 89, 90, 91, 107, 93, 23, 107, 66, 107, 27, 107, 107, 71, 72, 107, 74, |
|
| 605 | + 34, 76, 66, 107, 107, 107, 81, 71, 72, 107, 74, 107, 76, 47, 89, 90, 91, 81, 93, |
|
| 606 | + 107, 107, 107, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, |
|
| 607 | + 74, 107, 76, 107, 107, 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, |
|
| 608 | + 91, 107, 93, 12, 13, 66, 15, 107, 17, 18, 71, 72, 107, 74, 107, 76, 107, 107, |
|
| 609 | + 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, 91, 107, 93, 12, 13, 107, |
|
| 610 | + 107, 46, 17, 18, 49, 66, 51, 2, 53, 1, 71, 72, 107, 74, 107, 76, 107, 12, 13, |
|
| 611 | + 107, 81, 107, 17, 18, 107, 107, 107, 107, 89, 90, 91, 46, 93, 107, 49, 107, 51, |
|
| 612 | + 107, 53, 54, 107, 1, 107, 107, 107, 107, 107, 39, 40, 41, 107, 46, 107, 107, 49, |
|
| 613 | + 107, 51, 107, 53, 107, 107, 2, 22, 107, 56, 57, 58, 59, 107, 61, 107, 12, 13, |
|
| 614 | + 107, 107, 107, 17, 18, 107, 39, 40, 41, 12, 13, 107, 107, 107, 17, 18, 107, 107, |
|
| 615 | + 107, 107, 107, 107, 107, 56, 57, 58, 59, 107, 107, 107, 107, 107, 46, 107, 107, |
|
| 616 | + 49, 11, 51, 107, 53, 107, 107, 107, 46, 107, 107, 49, 22, 51, 24, 53, 107, 27, |
|
| 617 | + 107, 107, 107, 107, 107, 107, 34, 107, 36, 107, 38, 107, 107, 107, 107, 107, |
|
| 618 | + 107, 107, 46,); |
|
| 619 | + |
|
| 620 | + const YY_SHIFT_USE_DFLT = - 15; |
|
| 621 | + |
|
| 622 | + const YY_SHIFT_MAX = 238; |
|
| 623 | + |
|
| 624 | + static public $yy_shift_ofst = array(499, 393, 78, 393, 348, 78, 78, 348, - 12, - 12, 33, 78, 78, 78, 78, 168, 78, |
|
| 625 | + 78, 78, 213, 123, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 303, 78, 78, 78, |
|
| 626 | + 168, 258, 258, 438, 438, 438, 438, 438, 438, 1609, 1660, 1706, 1706, 1706, |
|
| 627 | + 1706, 1706, 499, 1912, 1153, 609, 541, 507, 989, 907, 825, 1071, 646, 1880, |
|
| 628 | + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 731, |
|
| 629 | + 731, 140, 725, 804, 230, 465, 280, 160, 747, 1714, 1663, 483, 483, 160, 280, |
|
| 630 | + 280, 324, 160, 522, 594, 1661, 1749, 642, 715, 317, 842, 40, 404, 3, 144, 404, |
|
| 631 | + - 5, 460, 327, 431, 161, 294, 147, 147, 426, - 5, 434, 223, 223, 265, 223, 223, |
|
| 632 | + 223, 223, 223, 223, 265, 223, - 15, 1827, 1857, 1640, 1877, 1931, 1942, 92, |
|
| 633 | + 645, 11, 90, - 5, 70, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, 214, |
|
| 634 | + - 5, 70, - 5, 70, - 5, - 5, - 5, - 5, - 5, 124, 124, 227, 124, 356, 124, 214, |
|
| 635 | + 124, 124, - 5, 70, 124, 124, 223, 223, 595, 587, 587, 223, 265, 232, 223, 265, |
|
| 636 | + 265, 223, - 15, - 15, - 15, - 15, - 15, 1581, 1970, 575, 694, 660, 260, 118, |
|
| 637 | + 73, - 6, 96, 256, 295, 308, 145, 44, 110, 208, 263, - 14, 99, 439, 232, 519, |
|
| 638 | + 521, 511, 509, 487, 83, 187, 101, 372, 279, 0, 297, 288, 481, 452, 371, 307, |
|
| 639 | + 319, 385, 412, 414, 433, 375, 402,); |
|
| 640 | + |
|
| 641 | + const YY_REDUCE_USE_DFLT = - 67; |
|
| 642 | + |
|
| 643 | + const YY_REDUCE_MAX = 192; |
|
| 644 | + |
|
| 645 | + static public $yy_reduce_ofst = array(1560, 469, 608, 503, 542, 570, 728, 643, 922, 1278, 1360, 1060, 950, 1032, |
|
| 646 | + 1086, 896, 868, 1004, 786, 1414, 1332, 1114, 1524, 1168, 1224, 1250, 1196, |
|
| 647 | + 1142, 1306, 1470, 1496, 1388, 1442, 978, 758, 840, 814, 1588, 1639, 1745, |
|
| 648 | + 1719, 1678, 1708, 1775, 1811, 1259, 931, 931, 1013, 1095, 849, 1177, 170, |
|
| 649 | + - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, |
|
| 650 | + - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 66, |
|
| 651 | + 46, 652, - 37, 484, 767, - 7, 136, 351, 113, 203, 254, 141, 314, 179, 278, |
|
| 652 | + 173, 420, 289, 394, 394, 289, 289, 20, 290, 228, 290, 424, 228, 326, 406, 289, |
|
| 653 | + 384, 289, 228, 316, 312, 435, 379, 389, 289, 289, 436, 458, 289, 289, 289, |
|
| 654 | + 289, 289, 289, 228, 289, 289, 476, 476, 476, 476, 476, 476, 502, 472, 476, |
|
| 655 | + 476, 466, 470, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 482, 466, |
|
| 656 | + 490, 466, 510, 466, 466, 466, 466, 466, 506, 506, 512, 506, 459, 506, 525, |
|
| 657 | + 506, 506, 466, 530, 506, 506, 28, 28, 534, 250, 250, 28, - 56, 193, 28, - 56, |
|
| 658 | + - 56, 28, 112, - 27, 454, 403, 446,); |
|
| 659 | + |
|
| 660 | + static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 661 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 662 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 663 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 664 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 665 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 666 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 667 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 668 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 669 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 670 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 671 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 672 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 673 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 674 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 675 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 676 | + 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 677 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 678 | + 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 679 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 680 | + 45, 46, 48, 50, 52, 53, 54, 55, 60,), |
|
| 681 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 682 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 683 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 684 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 685 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 686 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 687 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 688 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 689 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 690 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 691 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 692 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 693 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 694 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 695 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 696 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 697 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 698 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 699 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 700 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 701 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 702 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 703 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 704 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 705 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 706 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 707 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 708 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 709 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 710 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 711 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 712 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 713 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 714 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 715 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 716 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 717 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 718 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 719 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 720 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 721 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 722 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 723 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 724 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 725 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 726 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 727 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 728 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 729 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 730 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 731 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 732 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 733 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 734 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 735 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 736 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 737 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 738 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 739 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 740 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 741 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 742 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 743 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 744 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 745 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 746 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 747 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 748 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 749 | + array(1, 25, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 750 | + array(1, 11, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 751 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 752 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 753 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 754 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 755 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 756 | + array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 757 | + array(1, 22, 39, 40, 41, 56, 57, 58, 59,), |
|
| 758 | + array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 759 | + array(1, 28, 39, 40, 41, 56, 57, 58, 59,), |
|
| 760 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 761 | + array(1, 2, 39, 40, 41, 56, 57, 58, 59,), |
|
| 762 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 763 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 764 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 765 | + array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 766 | + array(1, 39, 40, 41, 54, 56, 57, 58, 59,), |
|
| 767 | + array(1, 39, 40, 41, 56, 57, 58, 59, 61,), |
|
| 768 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 769 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 770 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 771 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 772 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 773 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 774 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 775 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 776 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 777 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 778 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 779 | + array(1, 39, 40, 41, 56, 57, 58, 59,), array(39, 40, 41, 56, 57, 58, 59,), |
|
| 780 | + array(39, 40, 41, 56, 57, 58, 59,), array(14, 17, 50, 52, 55,), |
|
| 781 | + array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 782 | + array(1, 11, 18, 27, 34, 37, 49,), array(14, 17, 52, 55,), |
|
| 783 | + array(1, 11, 27, 34,), array(1, 27, 34,), array(14, 37, 55,), |
|
| 784 | + array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 785 | + array(12, 13, 17, 27, 29, 34,), array(12, 13, 17, 27, 29, 34,), |
|
| 786 | + array(12, 13, 17, 27, 34,), array(12, 13, 17, 27, 34,), array(14, 37, 55,), |
|
| 787 | + array(1, 27, 34,), array(1, 27, 34,), array(18, 46, 53,), |
|
| 788 | + array(14, 37, 55,), array(1, 2,), array(1, 11, 27, 28, 34,), |
|
| 789 | + array(11, 23, 27, 34, 47,), array(11, 23, 27, 34, 47,), |
|
| 790 | + array(1, 11, 27, 34,), array(1, 11, 27, 34,), array(13, 14, 17, 55,), |
|
| 791 | + array(12, 13, 17, 51,), array(15, 18, 49,), array(12, 13, 17,), |
|
| 792 | + array(8, 9, 10,), array(15, 18, 49,), array(12, 13, 17,), array(27, 34,), |
|
| 793 | + array(1, 54,), array(14, 55,), array(1, 11,), array(18, 49,), |
|
| 794 | + array(27, 34,), array(14, 17,), array(14, 17,), array(1, 18,), |
|
| 795 | + array(27, 34,), array(1, 29,), array(1,), array(1,), array(18,), array(1,), |
|
| 796 | + array(1,), array(1,), array(1,), array(1,), array(1,), array(18,), |
|
| 797 | + array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 798 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53, 54,), |
|
| 799 | + array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 800 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 801 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 802 | + array(12, 13, 17, 18, 46, 49, 51, 53,), array(13, 14, 17, 35, 55,), |
|
| 803 | + array(12, 13, 17, 51,), array(15, 46, 53,), array(12, 13, 17,), |
|
| 804 | + array(27, 34,), array(14, 55,), array(27, 34,), array(27, 34,), |
|
| 805 | + array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 806 | + array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 807 | + array(46, 53,), array(27, 34,), array(14, 55,), array(27, 34,), |
|
| 808 | + array(14, 55,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 809 | + array(27, 34,), array(27, 34,), array(46, 53,), array(46, 53,), |
|
| 810 | + array(13, 37,), array(46, 53,), array(15, 23,), array(46, 53,), |
|
| 811 | + array(46, 53,), array(46, 53,), array(46, 53,), array(27, 34,), |
|
| 812 | + array(14, 55,), array(46, 53,), array(46, 53,), array(1,), array(1,), |
|
| 813 | + array(9,), array(2,), array(2,), array(1,), array(18,), array(37,), |
|
| 814 | + array(1,), array(18,), array(18,), array(1,), array(), array(), array(), |
|
| 815 | + array(), array(), array(1, 2, 37, 39, 40, 41, 49, 56, 57, 58, 59,), |
|
| 816 | + array(11, 22, 24, 27, 34, 36, 38, 46,), array(11, 15, 27, 34, 37, 49,), |
|
| 817 | + array(37, 46, 49, 54,), array(12, 13, 17, 51,), array(29, 37, 49,), |
|
| 818 | + array(23, 47, 54,), array(23, 47, 61,), array(22, 36,), array(36, 54,), |
|
| 819 | + array(36, 38,), array(37, 49,), array(37, 49,), array(46, 54,), |
|
| 820 | + array(36, 38,), array(36, 38,), array(23, 47,), array(37, 49,), |
|
| 821 | + array(17, 51,), array(15, 46,), array(35,), array(37,), array(11,), |
|
| 822 | + array(17,), array(5,), array(17,), array(14,), array(17,), array(17,), |
|
| 823 | + array(15,), array(46,), array(17,), array(17,), array(42,), array(17,), |
|
| 824 | + array(52,), array(17,), array(24,), array(52,), array(35,), array(17,), |
|
| 825 | + array(37,), array(17,), array(54,), array(54,), array(38,), array(), |
|
| 826 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 827 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 828 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 829 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 830 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 831 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 832 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 833 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 834 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 835 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 836 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 837 | + array(), array(), array(), array(), array(), array(), array(), array(),); |
|
| 838 | + |
|
| 839 | + static public $yy_default = array(339, 517, 496, 532, 532, 496, 496, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 840 | + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 841 | + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 398, 532, 361, |
|
| 842 | + 398, 398, 374, 364, 336, 532, 532, 403, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 843 | + 400, 494, 518, 403, 409, 520, 379, 519, 405, 495, 410, 420, 425, 424, 532, 532, |
|
| 844 | + 436, 532, 412, 398, 532, 532, 398, 398, 398, 398, 532, 398, 398, 508, 532, 388, |
|
| 845 | + 412, 426, 426, 412, 412, 532, 461, 451, 461, 532, 451, 461, 398, 412, 532, 412, |
|
| 846 | + 451, 398, 532, 532, 392, 376, 412, 419, 394, 505, 427, 416, 428, 429, 415, 423, |
|
| 847 | + 451, 412, 503, 450, 450, 450, 450, 450, 450, 532, 463, 477, 461, 384, 532, 372, |
|
| 848 | + 383, 371, 366, 365, 368, 370, 360, 362, 385, 454, 386, 532, 358, 532, 387, 377, |
|
| 849 | + 382, 381, 375, 457, 486, 461, 487, 532, 489, 456, 455, 488, 378, 532, 458, 459, |
|
| 850 | + 445, 393, 352, 497, 498, 389, 506, 461, 418, 509, 483, 395, 461, 461, 502, 502, |
|
| 851 | + 502, 436, 432, 436, 436, 462, 436, 426, 426, 532, 532, 532, 532, 436, 432, 532, |
|
| 852 | + 532, 426, 446, 532, 432, 532, 477, 532, 532, 344, 532, 532, 532, 532, 532, 432, |
|
| 853 | + 532, 532, 438, 532, 532, 532, 406, 532, 434, 532, 507, 532, 441, 532, 532, 340, |
|
| 854 | + 504, 492, 338, 337, 491, 438, 467, 482, 396, 341, 441, 477, 413, 349, 343, 350, |
|
| 855 | + 466, 351, 411, 348, 431, 346, 345, 347, 433, 407, 465, 355, 464, 356, 414, 437, |
|
| 856 | + 399, 353, 435, 380, 354, 342, 421, 417, 513, 479, 440, 439, 480, 512, 390, 511, |
|
| 857 | + 510, 523, 522, 521, 481, 484, 493, 500, 478, 453, 485, 499, 452, 529, 430, 501, |
|
| 858 | + 528, 391, 526, 525, 443, 373, 460, 490, 444, 422, 473, 471, 476, 442, 470, 469, |
|
| 859 | + 468, 447, 449, 524, 475, 531, 530, 527, 448, 397, 515, 474, 516, 472, 514, 367,); |
|
| 860 | + |
|
| 861 | + const YYNOCODE = 108; |
|
| 862 | + |
|
| 863 | + const YYSTACKDEPTH = 500; |
|
| 864 | + |
|
| 865 | + const YYNSTATE = 336; |
|
| 866 | + |
|
| 867 | + const YYNRULE = 196; |
|
| 868 | + |
|
| 869 | + const YYERRORSYMBOL = 62; |
|
| 870 | + |
|
| 871 | + const YYERRSYMDT = 'yy0'; |
|
| 872 | + |
|
| 873 | + const YYFALLBACK = 0; |
|
| 874 | + |
|
| 875 | + public static $yyFallback = array(); |
|
| 876 | + |
|
| 877 | + public function Trace($TraceFILE, $zTracePrompt) |
|
| 878 | + { |
|
| 879 | + if (!$TraceFILE) { |
|
| 880 | + $zTracePrompt = 0; |
|
| 881 | + } elseif (!$zTracePrompt) { |
|
| 882 | + $TraceFILE = 0; |
|
| 883 | + } |
|
| 884 | + $this->yyTraceFILE = $TraceFILE; |
|
| 885 | + $this->yyTracePrompt = $zTracePrompt; |
|
| 886 | + } |
|
| 887 | + |
|
| 888 | + public function PrintTrace() |
|
| 889 | + { |
|
| 890 | + $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 891 | + $this->yyTracePrompt = '<br>'; |
|
| 892 | + } |
|
| 893 | + |
|
| 894 | + public $yyTraceFILE; |
|
| 895 | + |
|
| 896 | + public $yyTracePrompt; |
|
| 897 | + |
|
| 898 | + public $yyidx; /* Index of top element in stack */ |
|
| 899 | + public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | + public $yystack = array(); /* The parser's stack */ |
|
| 901 | + |
|
| 902 | + public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', |
|
| 903 | + 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', |
|
| 904 | + 'SIMPLETAG', 'ID', 'PTR', 'LDELMAKENOCACHE', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', |
|
| 905 | + 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', |
|
| 906 | + 'SMARTYBLOCKCHILDPARENT', 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', |
|
| 907 | + 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', |
|
| 908 | + 'INSTANCEOF', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', |
|
| 909 | + 'CLOSEB', 'DOLLAR', 'LOGOP', 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', |
|
| 910 | + 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', |
|
| 911 | + 'text_content', 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', |
|
| 912 | + 'value', 'expr', 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', |
|
| 913 | + 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'tlop', 'lop', 'scond', |
|
| 914 | + 'function', 'ns1', 'doublequoted_with_quotes', 'static_class_access', 'object', |
|
| 915 | + 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', |
|
| 916 | + 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', |
|
| 917 | + 'doublequotedcontent',); |
|
| 918 | + |
|
| 919 | + public static $yyRuleName = array('start ::= template', 'template ::= template_element', |
|
| 920 | + 'template ::= template template_element', 'template ::=', |
|
| 921 | + 'template_element ::= smartytag', 'template_element ::= literal', |
|
| 922 | + 'template_element ::= PHP', 'template_element ::= NOCACHE', |
|
| 923 | + 'template_element ::= text_content', 'text_content ::= TEXT', |
|
| 924 | + 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', |
|
| 925 | + 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND', |
|
| 926 | + 'literal ::= LITERALSTART literal_elements LITERALEND', |
|
| 927 | + 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', |
|
| 928 | + 'literal_element ::= literal', 'literal_element ::= LITERAL', |
|
| 929 | + 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable', |
|
| 930 | + 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', |
|
| 931 | + 'tag ::= LDEL value attributes', 'tag ::= LDEL expr', |
|
| 932 | + 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', |
|
| 933 | + 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes', |
|
| 934 | + 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG', |
|
| 935 | + 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID', |
|
| 936 | + 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes', |
|
| 937 | + 'tag ::= LDEL ID PTR ID modifierlist attributes', |
|
| 938 | + 'tag ::= LDELMAKENOCACHE DOLLARID', 'tag ::= LDELIF expr', |
|
| 939 | + 'tag ::= LDELIF expr attributes', 'tag ::= LDELIF statement', |
|
| 940 | + 'tag ::= LDELIF statement attributes', |
|
| 941 | + 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', |
|
| 942 | + 'foraction ::= EQUAL expr', 'foraction ::= INCDEC', |
|
| 943 | + 'tag ::= LDELFOR statement TO expr attributes', |
|
| 944 | + 'tag ::= LDELFOR statement TO expr STEP expr attributes', |
|
| 945 | + 'tag ::= LDELFOREACH attributes', |
|
| 946 | + 'tag ::= LDELFOREACH SPACE value AS varvar attributes', |
|
| 947 | + 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes', |
|
| 948 | + 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', |
|
| 949 | + 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', |
|
| 950 | + 'tag ::= LDELSETFILTER ID modparameters', |
|
| 951 | + 'tag ::= LDELSETFILTER ID modparameters modifierlist', |
|
| 952 | + 'tag ::= LDEL SMARTYBLOCKCHILDPARENT', 'smartytag ::= CLOSETAG', |
|
| 953 | + 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist', |
|
| 954 | + 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist', |
|
| 955 | + 'attributes ::= attributes attribute', 'attributes ::= attribute', |
|
| 956 | + 'attributes ::=', 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr', |
|
| 957 | + 'attribute ::= ATTR value', 'attribute ::= SPACE ID', 'attribute ::= SPACE expr', |
|
| 958 | + 'attribute ::= SPACE value', 'attribute ::= SPACE INTEGER EQUAL expr', |
|
| 959 | + 'statements ::= statement', 'statements ::= statements COMMA statement', |
|
| 960 | + 'statement ::= DOLLARID EQUAL INTEGER', 'statement ::= DOLLARID EQUAL expr', |
|
| 961 | + 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP', |
|
| 962 | + 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID', |
|
| 963 | + 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array', |
|
| 964 | + 'expr ::= expr modifierlist', 'expr ::= expr tlop value', |
|
| 965 | + 'expr ::= expr lop expr', 'expr ::= expr scond', 'expr ::= expr ISIN array', |
|
| 966 | + 'expr ::= expr ISIN value', |
|
| 967 | + 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', |
|
| 968 | + 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable', |
|
| 969 | + 'value ::= UNIMATH value', 'value ::= NOT value', 'value ::= TYPECAST value', |
|
| 970 | + 'value ::= variable INCDEC', 'value ::= HEX', 'value ::= INTEGER', |
|
| 971 | + 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER', |
|
| 972 | + 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP', |
|
| 973 | + 'value ::= variable INSTANCEOF ns1', 'value ::= variable INSTANCEOF variable', |
|
| 974 | + 'value ::= SINGLEQUOTESTRING', 'value ::= doublequoted_with_quotes', |
|
| 975 | + 'value ::= varindexed DOUBLECOLON static_class_access', 'value ::= smartytag', |
|
| 976 | + 'value ::= value modifierlist', 'value ::= NAMESPACE', |
|
| 977 | + 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID', |
|
| 978 | + 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID', 'variable ::= varindexed', |
|
| 979 | + 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH', |
|
| 980 | + 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH', |
|
| 981 | + 'variable ::= HATCH variable HATCH arrayindex', |
|
| 982 | + 'varindexed ::= DOLLARID arrayindex', 'varindexed ::= varvar arrayindex', |
|
| 983 | + 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=', |
|
| 984 | + 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar', |
|
| 985 | + 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID', |
|
| 986 | + 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL', |
|
| 987 | + 'indexdef ::= OPENB ID CLOSEB', 'indexdef ::= OPENB ID DOT ID CLOSEB', |
|
| 988 | + 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', |
|
| 989 | + 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB', |
|
| 990 | + 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB', |
|
| 991 | + 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB', |
|
| 992 | + 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', |
|
| 993 | + 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', |
|
| 994 | + 'object ::= varindexed objectchain', 'objectchain ::= objectelement', |
|
| 995 | + 'objectchain ::= objectchain objectelement', |
|
| 996 | + 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex', |
|
| 997 | + 'objectelement ::= PTR LDEL expr RDEL arrayindex', |
|
| 998 | + 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', |
|
| 999 | + 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP', |
|
| 1000 | + 'method ::= ID OPENP params CLOSEP', 'method ::= DOLLARID OPENP params CLOSEP', |
|
| 1001 | + 'params ::= params COMMA expr', 'params ::= expr', 'params ::=', |
|
| 1002 | + 'modifierlist ::= modifierlist modifier modparameters', |
|
| 1003 | + 'modifierlist ::= modifier modparameters', 'modifier ::= VERT AT ID', |
|
| 1004 | + 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter', |
|
| 1005 | + 'modparameters ::=', 'modparameter ::= COLON value', |
|
| 1006 | + 'modparameter ::= COLON array', 'static_class_access ::= method', |
|
| 1007 | + 'static_class_access ::= method objectchain', 'static_class_access ::= ID', |
|
| 1008 | + 'static_class_access ::= DOLLARID arrayindex', |
|
| 1009 | + 'static_class_access ::= DOLLARID arrayindex objectchain', 'lop ::= LOGOP', |
|
| 1010 | + 'lop ::= SLOGOP', 'tlop ::= TLOGOP', 'scond ::= SINGLECOND', |
|
| 1011 | + 'array ::= OPENB arrayelements CLOSEB', 'arrayelements ::= arrayelement', |
|
| 1012 | + 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=', |
|
| 1013 | + 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr', |
|
| 1014 | + 'arrayelement ::= expr', 'doublequoted_with_quotes ::= QUOTE QUOTE', |
|
| 1015 | + 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', |
|
| 1016 | + 'doublequoted ::= doublequoted doublequotedcontent', |
|
| 1017 | + 'doublequoted ::= doublequotedcontent', |
|
| 1018 | + 'doublequotedcontent ::= BACKTICK variable BACKTICK', |
|
| 1019 | + 'doublequotedcontent ::= BACKTICK expr BACKTICK', |
|
| 1020 | + 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL', |
|
| 1021 | + 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag', |
|
| 1022 | + 'doublequotedcontent ::= TEXT',); |
|
| 1023 | + |
|
| 1024 | + public function tokenName($tokenType) |
|
| 1025 | + { |
|
| 1026 | + if ($tokenType === 0) { |
|
| 1027 | + return 'End of Input'; |
|
| 1028 | + } |
|
| 1029 | 1029 | $countYyTokenName = count($this->yyTokenName); |
| 1030 | - if ($tokenType > 0 && $tokenType < $countYyTokenName) { |
|
| 1031 | - return $this->yyTokenName[ $tokenType ]; |
|
| 1032 | - } else { |
|
| 1033 | - return "Unknown"; |
|
| 1034 | - } |
|
| 1035 | - } |
|
| 1036 | - |
|
| 1037 | - public static function yy_destructor($yymajor, $yypminor) |
|
| 1038 | - { |
|
| 1039 | - switch ($yymajor) { |
|
| 1040 | - default: |
|
| 1041 | - break; /* If no destructor action specified: do nothing */ |
|
| 1042 | - } |
|
| 1043 | - } |
|
| 1044 | - |
|
| 1045 | - public function yy_pop_parser_stack() |
|
| 1046 | - { |
|
| 1047 | - if (empty($this->yystack)) { |
|
| 1048 | - return; |
|
| 1049 | - } |
|
| 1050 | - $yytos = array_pop($this->yystack); |
|
| 1051 | - if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 1052 | - fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 1053 | - } |
|
| 1054 | - $yymajor = $yytos->major; |
|
| 1055 | - self::yy_destructor($yymajor, $yytos->minor); |
|
| 1056 | - $this->yyidx --; |
|
| 1057 | - |
|
| 1058 | - return $yymajor; |
|
| 1059 | - } |
|
| 1060 | - |
|
| 1061 | - public function __destruct() |
|
| 1062 | - { |
|
| 1063 | - while ($this->yystack !== Array()) { |
|
| 1064 | - $this->yy_pop_parser_stack(); |
|
| 1065 | - } |
|
| 1066 | - if (is_resource($this->yyTraceFILE)) { |
|
| 1067 | - fclose($this->yyTraceFILE); |
|
| 1068 | - } |
|
| 1069 | - } |
|
| 1070 | - |
|
| 1071 | - public function yy_get_expected_tokens($token) |
|
| 1072 | - { |
|
| 1073 | - static $res3 = array(); |
|
| 1074 | - static $res4 = array(); |
|
| 1075 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1076 | - $expected = self::$yyExpectedTokens[ $state ]; |
|
| 1077 | - if (isset($res3[ $state ][ $token ])) { |
|
| 1078 | - if ($res3[ $state ][ $token ]) { |
|
| 1079 | - return $expected; |
|
| 1080 | - } |
|
| 1081 | - } else { |
|
| 1082 | - if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1083 | - return $expected; |
|
| 1084 | - } |
|
| 1085 | - } |
|
| 1086 | - $stack = $this->yystack; |
|
| 1087 | - $yyidx = $this->yyidx; |
|
| 1088 | - do { |
|
| 1089 | - $yyact = $this->yy_find_shift_action($token); |
|
| 1090 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1091 | - // reduce action |
|
| 1092 | - $done = 0; |
|
| 1093 | - do { |
|
| 1094 | - if ($done ++ == 100) { |
|
| 1095 | - $this->yyidx = $yyidx; |
|
| 1096 | - $this->yystack = $stack; |
|
| 1097 | - // too much recursion prevents proper detection |
|
| 1098 | - // so give up |
|
| 1099 | - return array_unique($expected); |
|
| 1100 | - } |
|
| 1101 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 1102 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1103 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1104 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1105 | - if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 1106 | - $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 1107 | - if (isset($res4[ $nextstate ][ $token ])) { |
|
| 1108 | - if ($res4[ $nextstate ][ $token ]) { |
|
| 1109 | - $this->yyidx = $yyidx; |
|
| 1110 | - $this->yystack = $stack; |
|
| 1111 | - return array_unique($expected); |
|
| 1112 | - } |
|
| 1113 | - } else { |
|
| 1114 | - if ($res4[ $nextstate ][ $token ] = |
|
| 1115 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 1116 | - ) { |
|
| 1117 | - $this->yyidx = $yyidx; |
|
| 1118 | - $this->yystack = $stack; |
|
| 1119 | - return array_unique($expected); |
|
| 1120 | - } |
|
| 1121 | - } |
|
| 1122 | - } |
|
| 1123 | - if ($nextstate < self::YYNSTATE) { |
|
| 1124 | - // we need to shift a non-terminal |
|
| 1125 | - $this->yyidx ++; |
|
| 1126 | - $x = new TP_yyStackEntry; |
|
| 1127 | - $x->stateno = $nextstate; |
|
| 1128 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1129 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1130 | - continue 2; |
|
| 1131 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1132 | - $this->yyidx = $yyidx; |
|
| 1133 | - $this->yystack = $stack; |
|
| 1134 | - // the last token was just ignored, we can't accept |
|
| 1135 | - // by ignoring input, this is in essence ignoring a |
|
| 1136 | - // syntax error! |
|
| 1137 | - return array_unique($expected); |
|
| 1138 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1139 | - $this->yyidx = $yyidx; |
|
| 1140 | - $this->yystack = $stack; |
|
| 1141 | - // input accepted, but not shifted (I guess) |
|
| 1142 | - return $expected; |
|
| 1143 | - } else { |
|
| 1144 | - $yyact = $nextstate; |
|
| 1145 | - } |
|
| 1146 | - } |
|
| 1147 | - while (true); |
|
| 1148 | - } |
|
| 1149 | - break; |
|
| 1150 | - } |
|
| 1151 | - while (true); |
|
| 1152 | - $this->yyidx = $yyidx; |
|
| 1153 | - $this->yystack = $stack; |
|
| 1154 | - |
|
| 1155 | - return array_unique($expected); |
|
| 1156 | - } |
|
| 1157 | - |
|
| 1158 | - public function yy_is_expected_token($token) |
|
| 1159 | - { |
|
| 1160 | - static $res = array(); |
|
| 1161 | - static $res2 = array(); |
|
| 1162 | - if ($token === 0) { |
|
| 1163 | - return true; // 0 is not part of this |
|
| 1164 | - } |
|
| 1165 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1166 | - if (isset($res[ $state ][ $token ])) { |
|
| 1167 | - if ($res[ $state ][ $token ]) { |
|
| 1168 | - return true; |
|
| 1169 | - } |
|
| 1170 | - } else { |
|
| 1171 | - if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1172 | - return true; |
|
| 1173 | - } |
|
| 1174 | - } |
|
| 1175 | - $stack = $this->yystack; |
|
| 1176 | - $yyidx = $this->yyidx; |
|
| 1177 | - do { |
|
| 1178 | - $yyact = $this->yy_find_shift_action($token); |
|
| 1179 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1180 | - // reduce action |
|
| 1181 | - $done = 0; |
|
| 1182 | - do { |
|
| 1183 | - if ($done ++ == 100) { |
|
| 1184 | - $this->yyidx = $yyidx; |
|
| 1185 | - $this->yystack = $stack; |
|
| 1186 | - // too much recursion prevents proper detection |
|
| 1187 | - // so give up |
|
| 1188 | - return true; |
|
| 1189 | - } |
|
| 1190 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 1191 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1192 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1193 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1194 | - if (isset($res2[ $nextstate ][ $token ])) { |
|
| 1195 | - if ($res2[ $nextstate ][ $token ]) { |
|
| 1196 | - $this->yyidx = $yyidx; |
|
| 1197 | - $this->yystack = $stack; |
|
| 1198 | - return true; |
|
| 1199 | - } |
|
| 1200 | - } else { |
|
| 1201 | - if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 1202 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 1203 | - true)) |
|
| 1204 | - ) { |
|
| 1205 | - $this->yyidx = $yyidx; |
|
| 1206 | - $this->yystack = $stack; |
|
| 1207 | - return true; |
|
| 1208 | - } |
|
| 1209 | - } |
|
| 1210 | - if ($nextstate < self::YYNSTATE) { |
|
| 1211 | - // we need to shift a non-terminal |
|
| 1212 | - $this->yyidx ++; |
|
| 1213 | - $x = new TP_yyStackEntry; |
|
| 1214 | - $x->stateno = $nextstate; |
|
| 1215 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1216 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1217 | - continue 2; |
|
| 1218 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1219 | - $this->yyidx = $yyidx; |
|
| 1220 | - $this->yystack = $stack; |
|
| 1221 | - if (!$token) { |
|
| 1222 | - // end of input: this is valid |
|
| 1223 | - return true; |
|
| 1224 | - } |
|
| 1225 | - // the last token was just ignored, we can't accept |
|
| 1226 | - // by ignoring input, this is in essence ignoring a |
|
| 1227 | - // syntax error! |
|
| 1228 | - return false; |
|
| 1229 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1230 | - $this->yyidx = $yyidx; |
|
| 1231 | - $this->yystack = $stack; |
|
| 1232 | - // input accepted, but not shifted (I guess) |
|
| 1233 | - return true; |
|
| 1234 | - } else { |
|
| 1235 | - $yyact = $nextstate; |
|
| 1236 | - } |
|
| 1237 | - } |
|
| 1238 | - while (true); |
|
| 1239 | - } |
|
| 1240 | - break; |
|
| 1241 | - } |
|
| 1242 | - while (true); |
|
| 1243 | - $this->yyidx = $yyidx; |
|
| 1244 | - $this->yystack = $stack; |
|
| 1245 | - |
|
| 1246 | - return true; |
|
| 1247 | - } |
|
| 1248 | - |
|
| 1249 | - public function yy_find_shift_action($iLookAhead) |
|
| 1250 | - { |
|
| 1251 | - $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1252 | - |
|
| 1253 | - /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 1254 | - if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 1255 | - // no shift actions |
|
| 1256 | - return self::$yy_default[ $stateno ]; |
|
| 1257 | - } |
|
| 1258 | - $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 1259 | - if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 1260 | - return self::$yy_default[ $stateno ]; |
|
| 1261 | - } |
|
| 1262 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 1263 | - return self::YY_NO_ACTION; |
|
| 1264 | - } |
|
| 1265 | - $i += $iLookAhead; |
|
| 1266 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1030 | + if ($tokenType > 0 && $tokenType < $countYyTokenName) { |
|
| 1031 | + return $this->yyTokenName[ $tokenType ]; |
|
| 1032 | + } else { |
|
| 1033 | + return "Unknown"; |
|
| 1034 | + } |
|
| 1035 | + } |
|
| 1036 | + |
|
| 1037 | + public static function yy_destructor($yymajor, $yypminor) |
|
| 1038 | + { |
|
| 1039 | + switch ($yymajor) { |
|
| 1040 | + default: |
|
| 1041 | + break; /* If no destructor action specified: do nothing */ |
|
| 1042 | + } |
|
| 1043 | + } |
|
| 1044 | + |
|
| 1045 | + public function yy_pop_parser_stack() |
|
| 1046 | + { |
|
| 1047 | + if (empty($this->yystack)) { |
|
| 1048 | + return; |
|
| 1049 | + } |
|
| 1050 | + $yytos = array_pop($this->yystack); |
|
| 1051 | + if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 1052 | + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 1053 | + } |
|
| 1054 | + $yymajor = $yytos->major; |
|
| 1055 | + self::yy_destructor($yymajor, $yytos->minor); |
|
| 1056 | + $this->yyidx --; |
|
| 1057 | + |
|
| 1058 | + return $yymajor; |
|
| 1059 | + } |
|
| 1060 | + |
|
| 1061 | + public function __destruct() |
|
| 1062 | + { |
|
| 1063 | + while ($this->yystack !== Array()) { |
|
| 1064 | + $this->yy_pop_parser_stack(); |
|
| 1065 | + } |
|
| 1066 | + if (is_resource($this->yyTraceFILE)) { |
|
| 1067 | + fclose($this->yyTraceFILE); |
|
| 1068 | + } |
|
| 1069 | + } |
|
| 1070 | + |
|
| 1071 | + public function yy_get_expected_tokens($token) |
|
| 1072 | + { |
|
| 1073 | + static $res3 = array(); |
|
| 1074 | + static $res4 = array(); |
|
| 1075 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1076 | + $expected = self::$yyExpectedTokens[ $state ]; |
|
| 1077 | + if (isset($res3[ $state ][ $token ])) { |
|
| 1078 | + if ($res3[ $state ][ $token ]) { |
|
| 1079 | + return $expected; |
|
| 1080 | + } |
|
| 1081 | + } else { |
|
| 1082 | + if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1083 | + return $expected; |
|
| 1084 | + } |
|
| 1085 | + } |
|
| 1086 | + $stack = $this->yystack; |
|
| 1087 | + $yyidx = $this->yyidx; |
|
| 1088 | + do { |
|
| 1089 | + $yyact = $this->yy_find_shift_action($token); |
|
| 1090 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1091 | + // reduce action |
|
| 1092 | + $done = 0; |
|
| 1093 | + do { |
|
| 1094 | + if ($done ++ == 100) { |
|
| 1095 | + $this->yyidx = $yyidx; |
|
| 1096 | + $this->yystack = $stack; |
|
| 1097 | + // too much recursion prevents proper detection |
|
| 1098 | + // so give up |
|
| 1099 | + return array_unique($expected); |
|
| 1100 | + } |
|
| 1101 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 1102 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1103 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1104 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1105 | + if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 1106 | + $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 1107 | + if (isset($res4[ $nextstate ][ $token ])) { |
|
| 1108 | + if ($res4[ $nextstate ][ $token ]) { |
|
| 1109 | + $this->yyidx = $yyidx; |
|
| 1110 | + $this->yystack = $stack; |
|
| 1111 | + return array_unique($expected); |
|
| 1112 | + } |
|
| 1113 | + } else { |
|
| 1114 | + if ($res4[ $nextstate ][ $token ] = |
|
| 1115 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 1116 | + ) { |
|
| 1117 | + $this->yyidx = $yyidx; |
|
| 1118 | + $this->yystack = $stack; |
|
| 1119 | + return array_unique($expected); |
|
| 1120 | + } |
|
| 1121 | + } |
|
| 1122 | + } |
|
| 1123 | + if ($nextstate < self::YYNSTATE) { |
|
| 1124 | + // we need to shift a non-terminal |
|
| 1125 | + $this->yyidx ++; |
|
| 1126 | + $x = new TP_yyStackEntry; |
|
| 1127 | + $x->stateno = $nextstate; |
|
| 1128 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1129 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 1130 | + continue 2; |
|
| 1131 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1132 | + $this->yyidx = $yyidx; |
|
| 1133 | + $this->yystack = $stack; |
|
| 1134 | + // the last token was just ignored, we can't accept |
|
| 1135 | + // by ignoring input, this is in essence ignoring a |
|
| 1136 | + // syntax error! |
|
| 1137 | + return array_unique($expected); |
|
| 1138 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1139 | + $this->yyidx = $yyidx; |
|
| 1140 | + $this->yystack = $stack; |
|
| 1141 | + // input accepted, but not shifted (I guess) |
|
| 1142 | + return $expected; |
|
| 1143 | + } else { |
|
| 1144 | + $yyact = $nextstate; |
|
| 1145 | + } |
|
| 1146 | + } |
|
| 1147 | + while (true); |
|
| 1148 | + } |
|
| 1149 | + break; |
|
| 1150 | + } |
|
| 1151 | + while (true); |
|
| 1152 | + $this->yyidx = $yyidx; |
|
| 1153 | + $this->yystack = $stack; |
|
| 1154 | + |
|
| 1155 | + return array_unique($expected); |
|
| 1156 | + } |
|
| 1157 | + |
|
| 1158 | + public function yy_is_expected_token($token) |
|
| 1159 | + { |
|
| 1160 | + static $res = array(); |
|
| 1161 | + static $res2 = array(); |
|
| 1162 | + if ($token === 0) { |
|
| 1163 | + return true; // 0 is not part of this |
|
| 1164 | + } |
|
| 1165 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1166 | + if (isset($res[ $state ][ $token ])) { |
|
| 1167 | + if ($res[ $state ][ $token ]) { |
|
| 1168 | + return true; |
|
| 1169 | + } |
|
| 1170 | + } else { |
|
| 1171 | + if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1172 | + return true; |
|
| 1173 | + } |
|
| 1174 | + } |
|
| 1175 | + $stack = $this->yystack; |
|
| 1176 | + $yyidx = $this->yyidx; |
|
| 1177 | + do { |
|
| 1178 | + $yyact = $this->yy_find_shift_action($token); |
|
| 1179 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1180 | + // reduce action |
|
| 1181 | + $done = 0; |
|
| 1182 | + do { |
|
| 1183 | + if ($done ++ == 100) { |
|
| 1184 | + $this->yyidx = $yyidx; |
|
| 1185 | + $this->yystack = $stack; |
|
| 1186 | + // too much recursion prevents proper detection |
|
| 1187 | + // so give up |
|
| 1188 | + return true; |
|
| 1189 | + } |
|
| 1190 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 1191 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1192 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1193 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1194 | + if (isset($res2[ $nextstate ][ $token ])) { |
|
| 1195 | + if ($res2[ $nextstate ][ $token ]) { |
|
| 1196 | + $this->yyidx = $yyidx; |
|
| 1197 | + $this->yystack = $stack; |
|
| 1198 | + return true; |
|
| 1199 | + } |
|
| 1200 | + } else { |
|
| 1201 | + if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 1202 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 1203 | + true)) |
|
| 1204 | + ) { |
|
| 1205 | + $this->yyidx = $yyidx; |
|
| 1206 | + $this->yystack = $stack; |
|
| 1207 | + return true; |
|
| 1208 | + } |
|
| 1209 | + } |
|
| 1210 | + if ($nextstate < self::YYNSTATE) { |
|
| 1211 | + // we need to shift a non-terminal |
|
| 1212 | + $this->yyidx ++; |
|
| 1213 | + $x = new TP_yyStackEntry; |
|
| 1214 | + $x->stateno = $nextstate; |
|
| 1215 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1216 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 1217 | + continue 2; |
|
| 1218 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1219 | + $this->yyidx = $yyidx; |
|
| 1220 | + $this->yystack = $stack; |
|
| 1221 | + if (!$token) { |
|
| 1222 | + // end of input: this is valid |
|
| 1223 | + return true; |
|
| 1224 | + } |
|
| 1225 | + // the last token was just ignored, we can't accept |
|
| 1226 | + // by ignoring input, this is in essence ignoring a |
|
| 1227 | + // syntax error! |
|
| 1228 | + return false; |
|
| 1229 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1230 | + $this->yyidx = $yyidx; |
|
| 1231 | + $this->yystack = $stack; |
|
| 1232 | + // input accepted, but not shifted (I guess) |
|
| 1233 | + return true; |
|
| 1234 | + } else { |
|
| 1235 | + $yyact = $nextstate; |
|
| 1236 | + } |
|
| 1237 | + } |
|
| 1238 | + while (true); |
|
| 1239 | + } |
|
| 1240 | + break; |
|
| 1241 | + } |
|
| 1242 | + while (true); |
|
| 1243 | + $this->yyidx = $yyidx; |
|
| 1244 | + $this->yystack = $stack; |
|
| 1245 | + |
|
| 1246 | + return true; |
|
| 1247 | + } |
|
| 1248 | + |
|
| 1249 | + public function yy_find_shift_action($iLookAhead) |
|
| 1250 | + { |
|
| 1251 | + $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1252 | + |
|
| 1253 | + /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 1254 | + if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 1255 | + // no shift actions |
|
| 1256 | + return self::$yy_default[ $stateno ]; |
|
| 1257 | + } |
|
| 1258 | + $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 1259 | + if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 1260 | + return self::$yy_default[ $stateno ]; |
|
| 1261 | + } |
|
| 1262 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 1263 | + return self::YY_NO_ACTION; |
|
| 1264 | + } |
|
| 1265 | + $i += $iLookAhead; |
|
| 1266 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1267 | 1267 | $countYyFallback = count(self::$yyFallback); |
| 1268 | - if (count(self::$yyFallback) && $iLookAhead < $countYyFallback && |
|
| 1269 | - ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 1270 | - ) { |
|
| 1271 | - if ($this->yyTraceFILE) { |
|
| 1272 | - fwrite($this->yyTraceFILE, |
|
| 1273 | - $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 1274 | - $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 1275 | - } |
|
| 1276 | - |
|
| 1277 | - return $this->yy_find_shift_action($iFallback); |
|
| 1278 | - } |
|
| 1279 | - |
|
| 1280 | - return self::$yy_default[ $stateno ]; |
|
| 1281 | - } else { |
|
| 1282 | - return self::$yy_action[ $i ]; |
|
| 1283 | - } |
|
| 1284 | - } |
|
| 1285 | - |
|
| 1286 | - public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 1287 | - { |
|
| 1288 | - /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 1289 | - |
|
| 1290 | - if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 1291 | - return self::$yy_default[ $stateno ]; |
|
| 1292 | - } |
|
| 1293 | - $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 1294 | - if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 1295 | - return self::$yy_default[ $stateno ]; |
|
| 1296 | - } |
|
| 1297 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 1298 | - return self::YY_NO_ACTION; |
|
| 1299 | - } |
|
| 1300 | - $i += $iLookAhead; |
|
| 1301 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1302 | - return self::$yy_default[ $stateno ]; |
|
| 1303 | - } else { |
|
| 1304 | - return self::$yy_action[ $i ]; |
|
| 1305 | - } |
|
| 1306 | - } |
|
| 1307 | - |
|
| 1308 | - public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 1309 | - { |
|
| 1310 | - $this->yyidx ++; |
|
| 1311 | - if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 1312 | - $this->yyidx --; |
|
| 1313 | - if ($this->yyTraceFILE) { |
|
| 1314 | - fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 1315 | - } |
|
| 1316 | - while ($this->yyidx >= 0) { |
|
| 1317 | - $this->yy_pop_parser_stack(); |
|
| 1318 | - } |
|
| 1319 | - #line 207 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1320 | - |
|
| 1321 | - $this->internalError = true; |
|
| 1322 | - $this->compiler->trigger_template_error("Stack overflow in template parser"); |
|
| 1323 | - |
|
| 1324 | - return; |
|
| 1325 | - } |
|
| 1326 | - $yytos = new TP_yyStackEntry; |
|
| 1327 | - $yytos->stateno = $yyNewState; |
|
| 1328 | - $yytos->major = $yyMajor; |
|
| 1329 | - $yytos->minor = $yypMinor; |
|
| 1330 | - $this->yystack[] = $yytos; |
|
| 1331 | - if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 1332 | - fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 1333 | - fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 1334 | - for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 1335 | - fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 1336 | - } |
|
| 1337 | - fwrite($this->yyTraceFILE, "\n"); |
|
| 1338 | - } |
|
| 1339 | - } |
|
| 1340 | - |
|
| 1341 | - public static $yyRuleInfo = array(array(0 => 63, 1 => 1), array(0 => 64, 1 => 1), array(0 => 64, 1 => 2), |
|
| 1342 | - array(0 => 64, 1 => 0), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1343 | - array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1344 | - array(0 => 68, 1 => 1), array(0 => 68, 1 => 2), array(0 => 65, 1 => 1), |
|
| 1345 | - array(0 => 65, 1 => 1), array(0 => 67, 1 => 2), array(0 => 67, 1 => 3), |
|
| 1346 | - array(0 => 69, 1 => 2), array(0 => 69, 1 => 0), array(0 => 70, 1 => 1), |
|
| 1347 | - array(0 => 70, 1 => 1), array(0 => 66, 1 => 2), array(0 => 66, 1 => 1), |
|
| 1348 | - array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), |
|
| 1349 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1350 | - array(0 => 71, 1 => 4), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1351 | - array(0 => 71, 1 => 5), array(0 => 66, 1 => 1), array(0 => 71, 1 => 3), |
|
| 1352 | - array(0 => 71, 1 => 2), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1353 | - array(0 => 71, 1 => 6), array(0 => 71, 1 => 2), array(0 => 71, 1 => 2), |
|
| 1354 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1355 | - array(0 => 71, 1 => 8), array(0 => 80, 1 => 2), array(0 => 80, 1 => 1), |
|
| 1356 | - array(0 => 71, 1 => 5), array(0 => 71, 1 => 7), array(0 => 71, 1 => 2), |
|
| 1357 | - array(0 => 71, 1 => 6), array(0 => 71, 1 => 8), array(0 => 71, 1 => 6), |
|
| 1358 | - array(0 => 71, 1 => 8), array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), |
|
| 1359 | - array(0 => 71, 1 => 2), array(0 => 66, 1 => 1), array(0 => 71, 1 => 2), |
|
| 1360 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1361 | - array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 0), |
|
| 1362 | - array(0 => 83, 1 => 4), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1363 | - array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1364 | - array(0 => 83, 1 => 4), array(0 => 79, 1 => 1), array(0 => 79, 1 => 3), |
|
| 1365 | - array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), |
|
| 1366 | - array(0 => 78, 1 => 3), array(0 => 75, 1 => 1), array(0 => 75, 1 => 1), |
|
| 1367 | - array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), |
|
| 1368 | - array(0 => 75, 1 => 1), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1369 | - array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1370 | - array(0 => 75, 1 => 3), array(0 => 84, 1 => 7), array(0 => 84, 1 => 7), |
|
| 1371 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), |
|
| 1372 | - array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1373 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), |
|
| 1374 | - array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), |
|
| 1375 | - array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), |
|
| 1376 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), |
|
| 1377 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1378 | - array(0 => 74, 1 => 3), array(0 => 90, 1 => 1), array(0 => 90, 1 => 1), |
|
| 1379 | - array(0 => 72, 1 => 1), array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), |
|
| 1380 | - array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), |
|
| 1381 | - array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), array(0 => 76, 1 => 2), |
|
| 1382 | - array(0 => 76, 1 => 2), array(0 => 94, 1 => 2), array(0 => 94, 1 => 0), |
|
| 1383 | - array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1384 | - array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1385 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 3), |
|
| 1386 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), |
|
| 1387 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 2), |
|
| 1388 | - array(0 => 81, 1 => 1), array(0 => 81, 1 => 1), array(0 => 81, 1 => 2), |
|
| 1389 | - array(0 => 96, 1 => 1), array(0 => 96, 1 => 1), array(0 => 96, 1 => 3), |
|
| 1390 | - array(0 => 93, 1 => 2), array(0 => 97, 1 => 1), array(0 => 97, 1 => 2), |
|
| 1391 | - array(0 => 98, 1 => 3), array(0 => 98, 1 => 3), array(0 => 98, 1 => 5), |
|
| 1392 | - array(0 => 98, 1 => 6), array(0 => 98, 1 => 2), array(0 => 89, 1 => 4), |
|
| 1393 | - array(0 => 99, 1 => 4), array(0 => 99, 1 => 4), array(0 => 100, 1 => 3), |
|
| 1394 | - array(0 => 100, 1 => 1), array(0 => 100, 1 => 0), array(0 => 77, 1 => 3), |
|
| 1395 | - array(0 => 77, 1 => 2), array(0 => 101, 1 => 3), array(0 => 101, 1 => 2), |
|
| 1396 | - array(0 => 82, 1 => 2), array(0 => 82, 1 => 0), array(0 => 102, 1 => 2), |
|
| 1397 | - array(0 => 102, 1 => 2), array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), |
|
| 1398 | - array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), array(0 => 92, 1 => 3), |
|
| 1399 | - array(0 => 87, 1 => 1), array(0 => 87, 1 => 1), array(0 => 86, 1 => 1), |
|
| 1400 | - array(0 => 88, 1 => 1), array(0 => 85, 1 => 3), array(0 => 103, 1 => 1), |
|
| 1401 | - array(0 => 103, 1 => 3), array(0 => 103, 1 => 0), array(0 => 104, 1 => 3), |
|
| 1402 | - array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 91, 1 => 2), |
|
| 1403 | - array(0 => 91, 1 => 3), array(0 => 105, 1 => 2), array(0 => 105, 1 => 1), |
|
| 1404 | - array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1405 | - array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1406 | - array(0 => 106, 1 => 1),); |
|
| 1407 | - |
|
| 1408 | - public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9, |
|
| 1409 | - 18 => 9, 44 => 9, 67 => 9, 68 => 9, 76 => 9, 77 => 9, 81 => 9, 90 => 9, 95 => 9, |
|
| 1410 | - 96 => 9, 101 => 9, 105 => 9, 106 => 9, 110 => 9, 112 => 9, 117 => 9, 179 => 9, |
|
| 1411 | - 184 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 75 => 14, |
|
| 1412 | - 15 => 15, 91 => 15, 93 => 15, 94 => 15, 124 => 15, 19 => 19, 20 => 20, 21 => 21, |
|
| 1413 | - 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27, 29 => 29, |
|
| 1414 | - 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37, |
|
| 1415 | - 38 => 38, 39 => 39, 41 => 39, 40 => 40, 42 => 42, 43 => 43, 45 => 45, 46 => 46, |
|
| 1416 | - 47 => 47, 48 => 48, 50 => 48, 49 => 49, 51 => 49, 52 => 52, 53 => 53, 54 => 54, |
|
| 1417 | - 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61, 70 => 61, |
|
| 1418 | - 159 => 61, 163 => 61, 167 => 61, 168 => 61, 62 => 62, 160 => 62, 166 => 62, |
|
| 1419 | - 63 => 63, 64 => 64, 65 => 64, 66 => 66, 144 => 66, 69 => 69, 71 => 71, 72 => 72, |
|
| 1420 | - 73 => 72, 74 => 74, 78 => 78, 79 => 79, 80 => 79, 82 => 82, 109 => 82, 83 => 83, |
|
| 1421 | - 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 89, 92 => 92, 97 => 97, |
|
| 1422 | - 98 => 98, 99 => 99, 100 => 100, 102 => 102, 103 => 103, 104 => 103, 107 => 107, |
|
| 1423 | - 108 => 108, 111 => 111, 113 => 113, 114 => 114, 115 => 115, 116 => 116, |
|
| 1424 | - 118 => 118, 119 => 119, 120 => 120, 121 => 121, 122 => 122, 123 => 123, |
|
| 1425 | - 125 => 125, 181 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, |
|
| 1426 | - 130 => 130, 131 => 131, 139 => 131, 132 => 132, 133 => 133, 134 => 134, |
|
| 1427 | - 135 => 134, 137 => 134, 138 => 134, 136 => 136, 140 => 140, 141 => 141, |
|
| 1428 | - 142 => 142, 185 => 142, 143 => 143, 145 => 145, 146 => 146, 147 => 147, |
|
| 1429 | - 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, |
|
| 1430 | - 154 => 154, 155 => 155, 156 => 156, 157 => 157, 158 => 158, 161 => 161, |
|
| 1431 | - 162 => 162, 164 => 164, 165 => 165, 169 => 169, 170 => 170, 171 => 171, |
|
| 1432 | - 172 => 172, 173 => 173, 174 => 174, 175 => 175, 176 => 176, 177 => 177, |
|
| 1433 | - 178 => 178, 180 => 180, 182 => 182, 183 => 183, 186 => 186, 187 => 187, |
|
| 1434 | - 188 => 188, 189 => 189, 190 => 189, 192 => 189, 191 => 191, 193 => 193, |
|
| 1435 | - 194 => 194, 195 => 195,); |
|
| 1436 | - |
|
| 1437 | - #line 218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1438 | - public function yy_r0() |
|
| 1439 | - { |
|
| 1440 | - $this->root_buffer->prepend_array($this, $this->template_prefix); |
|
| 1441 | - $this->root_buffer->append_array($this, $this->template_postfix); |
|
| 1442 | - $this->_retvalue = $this->root_buffer->to_smarty_php($this); |
|
| 1443 | - } |
|
| 1444 | - |
|
| 1445 | - #line 228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1446 | - public function yy_r1() |
|
| 1447 | - { |
|
| 1448 | - if ($this->yystack[ $this->yyidx + 0 ]->minor != null) { |
|
| 1449 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1450 | - } |
|
| 1451 | - } |
|
| 1452 | - |
|
| 1453 | - #line 235 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1454 | - public function yy_r2() |
|
| 1455 | - { |
|
| 1456 | - if ($this->yystack[ $this->yyidx + 0 ]->minor != null) { |
|
| 1457 | - // because of possible code injection |
|
| 1458 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1459 | - } |
|
| 1460 | - } |
|
| 1461 | - |
|
| 1462 | - #line 249 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1463 | - public function yy_r4() |
|
| 1464 | - { |
|
| 1465 | - if ($this->compiler->has_code) { |
|
| 1466 | - $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1467 | - } else { |
|
| 1468 | - $this->_retvalue = null; |
|
| 1469 | - } |
|
| 1470 | - $this->compiler->has_variable_string = false; |
|
| 1471 | - $this->block_nesting_level = count($this->compiler->_tag_stack); |
|
| 1472 | - } |
|
| 1473 | - |
|
| 1474 | - #line 260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1475 | - public function yy_r5() |
|
| 1476 | - { |
|
| 1477 | - $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1478 | - } |
|
| 1479 | - |
|
| 1480 | - #line 264 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1481 | - public function yy_r6() |
|
| 1482 | - { |
|
| 1483 | - $code = $this->compiler->compileTag('private_php', |
|
| 1484 | - array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1485 | - array('type' => $this->lex->phpType)), array()); |
|
| 1486 | - if ($this->compiler->has_code && !empty($code)) { |
|
| 1487 | - $tmp = ''; |
|
| 1488 | - foreach ($this->compiler->prefix_code as $code) { |
|
| 1489 | - $tmp .= $code; |
|
| 1490 | - } |
|
| 1491 | - $this->compiler->prefix_code = array(); |
|
| 1492 | - $this->_retvalue = |
|
| 1493 | - new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)); |
|
| 1494 | - } else { |
|
| 1495 | - $this->_retvalue = null; |
|
| 1496 | - } |
|
| 1497 | - } |
|
| 1498 | - |
|
| 1499 | - #line 275 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1500 | - public function yy_r7() |
|
| 1501 | - { |
|
| 1502 | - $this->compiler->tag_nocache = true; |
|
| 1503 | - $save = $this->template->compiled->has_nocache_code; |
|
| 1504 | - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, |
|
| 1505 | - $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n", |
|
| 1506 | - true)); |
|
| 1507 | - $this->template->compiled->has_nocache_code = $save; |
|
| 1508 | - } |
|
| 1509 | - |
|
| 1510 | - #line 282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1511 | - public function yy_r8() |
|
| 1512 | - { |
|
| 1513 | - $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1514 | - } |
|
| 1515 | - |
|
| 1516 | - #line 286 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1517 | - public function yy_r9() |
|
| 1518 | - { |
|
| 1519 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1520 | - } |
|
| 1521 | - |
|
| 1522 | - #line 290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1523 | - public function yy_r10() |
|
| 1524 | - { |
|
| 1525 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1526 | - } |
|
| 1527 | - |
|
| 1528 | - #line 295 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1529 | - public function yy_r11() |
|
| 1530 | - { |
|
| 1531 | - $this->strip = true; |
|
| 1532 | - } |
|
| 1533 | - |
|
| 1534 | - #line 299 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1535 | - public function yy_r12() |
|
| 1536 | - { |
|
| 1537 | - $this->strip = false; |
|
| 1538 | - } |
|
| 1539 | - |
|
| 1540 | - #line 304 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1541 | - public function yy_r13() |
|
| 1542 | - { |
|
| 1543 | - $this->_retvalue = ''; |
|
| 1544 | - } |
|
| 1545 | - |
|
| 1546 | - #line 308 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1547 | - public function yy_r14() |
|
| 1548 | - { |
|
| 1549 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1550 | - } |
|
| 1551 | - |
|
| 1552 | - #line 312 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1553 | - public function yy_r15() |
|
| 1554 | - { |
|
| 1555 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1556 | - } |
|
| 1557 | - |
|
| 1558 | - #line 328 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1559 | - public function yy_r19() |
|
| 1560 | - { |
|
| 1561 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1562 | - } |
|
| 1563 | - |
|
| 1564 | - #line 334 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1565 | - public function yy_r20() |
|
| 1566 | - { |
|
| 1567 | - $var = |
|
| 1568 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1569 | - ' $'); |
|
| 1570 | - if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { |
|
| 1571 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'), |
|
| 1572 | - array('value' => $this->compiler->compileVariable('\'' . |
|
| 1573 | - $match[ 1 ] . |
|
| 1574 | - '\''))); |
|
| 1575 | - } else { |
|
| 1576 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1577 | - array('value' => $this->compiler->compileVariable('\'' . |
|
| 1578 | - $var . |
|
| 1579 | - '\''))); |
|
| 1580 | - } |
|
| 1581 | - } |
|
| 1582 | - |
|
| 1583 | - #line 344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1584 | - public function yy_r21() |
|
| 1585 | - { |
|
| 1586 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1587 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1588 | - } |
|
| 1589 | - |
|
| 1590 | - #line 348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1591 | - public function yy_r22() |
|
| 1592 | - { |
|
| 1593 | - $this->_retvalue = |
|
| 1594 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1595 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1596 | - } |
|
| 1597 | - |
|
| 1598 | - #line 371 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1599 | - public function yy_r27() |
|
| 1600 | - { |
|
| 1601 | - $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1602 | - 0 ]->minor), |
|
| 1603 | - array('var' => '\'' . |
|
| 1604 | - substr($this->yystack[ $this->yyidx + |
|
| 1605 | - - 2 ]->minor, |
|
| 1606 | - 1) . '\''))); |
|
| 1607 | - } |
|
| 1608 | - |
|
| 1609 | - #line 379 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1610 | - public function yy_r29() |
|
| 1611 | - { |
|
| 1612 | - $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1613 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1614 | - - 1 ]->minor), |
|
| 1615 | - array('var' => '\'' . |
|
| 1616 | - substr($this->yystack[ $this->yyidx + |
|
| 1617 | - - 3 ]->minor, |
|
| 1618 | - 1) . '\'')), |
|
| 1619 | - $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1620 | - } |
|
| 1621 | - |
|
| 1622 | - #line 383 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1623 | - public function yy_r30() |
|
| 1624 | - { |
|
| 1625 | - $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1626 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1627 | - - 1 ]->minor), |
|
| 1628 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1629 | - - 3 ]->minor[ 'var' ])), |
|
| 1630 | - $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1631 | - array('smarty_internal_index' => $this->yystack[ $this->yyidx + |
|
| 1632 | - - 3 ]->minor[ 'smarty_internal_index' ])); |
|
| 1633 | - } |
|
| 1634 | - |
|
| 1635 | - #line 388 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1636 | - public function yy_r31() |
|
| 1637 | - { |
|
| 1638 | - $tag = |
|
| 1639 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1640 | - if ($tag == 'strip') { |
|
| 1641 | - $this->strip = true; |
|
| 1642 | - $this->_retvalue = null;; |
|
| 1643 | - } else { |
|
| 1644 | - if (defined($tag)) { |
|
| 1645 | - if ($this->security) { |
|
| 1646 | - $this->security->isTrustedConstant($tag, $this->compiler); |
|
| 1647 | - } |
|
| 1648 | - $this->_retvalue = |
|
| 1649 | - $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); |
|
| 1650 | - } else { |
|
| 1651 | - if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { |
|
| 1652 | - $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'")); |
|
| 1653 | - } else { |
|
| 1654 | - $this->_retvalue = $this->compiler->compileTag($tag, array()); |
|
| 1655 | - } |
|
| 1656 | - } |
|
| 1657 | - } |
|
| 1658 | - } |
|
| 1659 | - |
|
| 1660 | - #line 410 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1661 | - public function yy_r32() |
|
| 1662 | - { |
|
| 1663 | - if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) { |
|
| 1664 | - if ($this->security) { |
|
| 1665 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler); |
|
| 1666 | - } |
|
| 1667 | - $this->_retvalue = |
|
| 1668 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1669 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1670 | - } else { |
|
| 1671 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 1672 | - $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1673 | - } |
|
| 1674 | - } |
|
| 1675 | - |
|
| 1676 | - #line 420 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1677 | - public function yy_r33() |
|
| 1678 | - { |
|
| 1679 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1680 | - if ($this->security) { |
|
| 1681 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1682 | - } |
|
| 1683 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1684 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1685 | - } else { |
|
| 1686 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); |
|
| 1687 | - } |
|
| 1688 | - } |
|
| 1689 | - |
|
| 1690 | - #line 433 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1691 | - public function yy_r34() |
|
| 1692 | - { |
|
| 1693 | - if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) { |
|
| 1694 | - if ($this->security) { |
|
| 1695 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler); |
|
| 1696 | - } |
|
| 1697 | - $this->_retvalue = |
|
| 1698 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1699 | - array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1700 | - 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1701 | - } else { |
|
| 1702 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1703 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1704 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1705 | - - 1 ]->minor)); |
|
| 1706 | - } |
|
| 1707 | - } |
|
| 1708 | - |
|
| 1709 | - #line 445 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1710 | - public function yy_r35() |
|
| 1711 | - { |
|
| 1712 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 1713 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1714 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1715 | - - 1 ]->minor)); |
|
| 1716 | - } |
|
| 1717 | - |
|
| 1718 | - #line 450 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1719 | - public function yy_r36() |
|
| 1720 | - { |
|
| 1721 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor, |
|
| 1722 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1723 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1724 | - - 1 ]->minor, |
|
| 1725 | - 'object_method' => $this->yystack[ $this->yyidx + |
|
| 1726 | - - 2 ]->minor)); |
|
| 1727 | - } |
|
| 1728 | - |
|
| 1729 | - #line 455 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1730 | - public function yy_r37() |
|
| 1731 | - { |
|
| 1732 | - $this->_retvalue = $this->compiler->compileTag('make_nocache', array(array('var' => '\'' . |
|
| 1733 | - substr($this->yystack[ $this->yyidx + |
|
| 1734 | - 0 ]->minor, |
|
| 1735 | - 1) . '\''))); |
|
| 1736 | - } |
|
| 1737 | - |
|
| 1738 | - #line 460 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1739 | - public function yy_r38() |
|
| 1740 | - { |
|
| 1741 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1742 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1743 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1744 | - 0 ]->minor)); |
|
| 1745 | - } |
|
| 1746 | - |
|
| 1747 | - #line 465 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1748 | - public function yy_r39() |
|
| 1749 | - { |
|
| 1750 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length)); |
|
| 1751 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, |
|
| 1752 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1753 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1754 | - - 1 ]->minor)); |
|
| 1755 | - } |
|
| 1756 | - |
|
| 1757 | - #line 470 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1758 | - public function yy_r40() |
|
| 1759 | - { |
|
| 1760 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1761 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1762 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1763 | - 0 ]->minor)); |
|
| 1764 | - } |
|
| 1765 | - |
|
| 1766 | - #line 481 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1767 | - public function yy_r42() |
|
| 1768 | - { |
|
| 1769 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1770 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1771 | - - 6 ]->minor), |
|
| 1772 | - array('ifexp' => $this->yystack[ $this->yyidx + |
|
| 1773 | - - 4 ]->minor), |
|
| 1774 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1775 | - - 2 ]->minor), |
|
| 1776 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1777 | - - 1 ]->minor))), |
|
| 1778 | - 1); |
|
| 1779 | - } |
|
| 1780 | - |
|
| 1781 | - #line 485 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1782 | - public function yy_r43() |
|
| 1783 | - { |
|
| 1784 | - $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1785 | - } |
|
| 1786 | - |
|
| 1787 | - #line 493 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1788 | - public function yy_r45() |
|
| 1789 | - { |
|
| 1790 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1791 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1792 | - - 3 ]->minor), |
|
| 1793 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1794 | - - 1 ]->minor))), |
|
| 1795 | - 0); |
|
| 1796 | - } |
|
| 1797 | - |
|
| 1798 | - #line 497 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1799 | - public function yy_r46() |
|
| 1800 | - { |
|
| 1801 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1802 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1803 | - - 5 ]->minor), |
|
| 1804 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1805 | - - 3 ]->minor), |
|
| 1806 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1807 | - - 1 ]->minor))), |
|
| 1808 | - 0); |
|
| 1809 | - } |
|
| 1810 | - |
|
| 1811 | - #line 502 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1812 | - public function yy_r47() |
|
| 1813 | - { |
|
| 1814 | - $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1815 | - } |
|
| 1816 | - |
|
| 1817 | - #line 507 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1818 | - public function yy_r48() |
|
| 1819 | - { |
|
| 1820 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1821 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1822 | - - 3 ]->minor), |
|
| 1823 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1824 | - - 1 ]->minor)))); |
|
| 1825 | - } |
|
| 1826 | - |
|
| 1827 | - #line 511 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1828 | - public function yy_r49() |
|
| 1829 | - { |
|
| 1830 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1831 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1832 | - - 5 ]->minor), |
|
| 1833 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1834 | - - 1 ]->minor), |
|
| 1835 | - array('key' => $this->yystack[ $this->yyidx + |
|
| 1836 | - - 3 ]->minor)))); |
|
| 1837 | - } |
|
| 1838 | - |
|
| 1839 | - #line 524 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1840 | - public function yy_r52() |
|
| 1841 | - { |
|
| 1842 | - $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1843 | - array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1844 | - - 1 ]->minor), |
|
| 1845 | - $this->yystack[ $this->yyidx + |
|
| 1846 | - 0 ]->minor)))); |
|
| 1847 | - } |
|
| 1848 | - |
|
| 1849 | - #line 528 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1850 | - public function yy_r53() |
|
| 1851 | - { |
|
| 1852 | - $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1853 | - array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1854 | - - 2 ]->minor), |
|
| 1855 | - $this->yystack[ $this->yyidx + |
|
| 1856 | - - 1 ]->minor)), |
|
| 1857 | - $this->yystack[ $this->yyidx + |
|
| 1858 | - 0 ]->minor))); |
|
| 1859 | - } |
|
| 1860 | - |
|
| 1861 | - #line 533 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1862 | - public function yy_r54() |
|
| 1863 | - { |
|
| 1864 | - $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); |
|
| 1865 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { |
|
| 1866 | - // {$smarty.block.child} |
|
| 1867 | - $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); |
|
| 1868 | - } else { |
|
| 1869 | - // {$smarty.block.parent} |
|
| 1870 | - $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler); |
|
| 1871 | - } |
|
| 1872 | - } |
|
| 1873 | - |
|
| 1874 | - #line 546 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1875 | - public function yy_r55() |
|
| 1876 | - { |
|
| 1877 | - $tag = |
|
| 1878 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1879 | - ' /'); |
|
| 1880 | - if ($tag == 'strip') { |
|
| 1881 | - $this->strip = false; |
|
| 1882 | - $this->_retvalue = null; |
|
| 1883 | - } else { |
|
| 1884 | - $this->_retvalue = $this->compiler->compileTag($tag . 'close', array()); |
|
| 1885 | - } |
|
| 1886 | - } |
|
| 1887 | - |
|
| 1888 | - #line 555 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1889 | - public function yy_r56() |
|
| 1890 | - { |
|
| 1891 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); |
|
| 1892 | - } |
|
| 1893 | - |
|
| 1894 | - #line 559 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1895 | - public function yy_r57() |
|
| 1896 | - { |
|
| 1897 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(), |
|
| 1898 | - array('modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1899 | - 0 ]->minor)); |
|
| 1900 | - } |
|
| 1901 | - |
|
| 1902 | - #line 564 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1903 | - public function yy_r58() |
|
| 1904 | - { |
|
| 1905 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(), |
|
| 1906 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1907 | - 0 ]->minor)); |
|
| 1908 | - } |
|
| 1909 | - |
|
| 1910 | - #line 568 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1911 | - public function yy_r59() |
|
| 1912 | - { |
|
| 1913 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(), |
|
| 1914 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1915 | - - 1 ]->minor, |
|
| 1916 | - 'modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1917 | - 0 ]->minor)); |
|
| 1918 | - } |
|
| 1919 | - |
|
| 1920 | - #line 576 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1921 | - public function yy_r60() |
|
| 1922 | - { |
|
| 1923 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1924 | - $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1925 | - } |
|
| 1926 | - |
|
| 1927 | - #line 582 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1928 | - public function yy_r61() |
|
| 1929 | - { |
|
| 1930 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1931 | - } |
|
| 1932 | - |
|
| 1933 | - #line 587 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1934 | - public function yy_r62() |
|
| 1935 | - { |
|
| 1936 | - $this->_retvalue = array(); |
|
| 1937 | - } |
|
| 1938 | - |
|
| 1939 | - #line 592 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1940 | - public function yy_r63() |
|
| 1941 | - { |
|
| 1942 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1943 | - if ($this->security) { |
|
| 1944 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1945 | - } |
|
| 1946 | - $this->_retvalue = |
|
| 1947 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1948 | - } else { |
|
| 1949 | - $this->_retvalue = |
|
| 1950 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 1951 | - '\''); |
|
| 1952 | - } |
|
| 1953 | - } |
|
| 1954 | - |
|
| 1955 | - #line 603 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1956 | - public function yy_r64() |
|
| 1957 | - { |
|
| 1958 | - $this->_retvalue = |
|
| 1959 | - array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + |
|
| 1960 | - 0 ]->minor); |
|
| 1961 | - } |
|
| 1962 | - |
|
| 1963 | - #line 611 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1964 | - public function yy_r66() |
|
| 1965 | - { |
|
| 1966 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 1967 | - } |
|
| 1968 | - |
|
| 1969 | - #line 623 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1970 | - public function yy_r69() |
|
| 1971 | - { |
|
| 1972 | - $this->_retvalue = |
|
| 1973 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1974 | - } |
|
| 1975 | - |
|
| 1976 | - #line 636 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1977 | - public function yy_r71() |
|
| 1978 | - { |
|
| 1979 | - $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1980 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor; |
|
| 1981 | - } |
|
| 1982 | - |
|
| 1983 | - #line 641 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1984 | - public function yy_r72() |
|
| 1985 | - { |
|
| 1986 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'', |
|
| 1987 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1988 | - } |
|
| 1989 | - |
|
| 1990 | - #line 648 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1991 | - public function yy_r74() |
|
| 1992 | - { |
|
| 1993 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1994 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1995 | - } |
|
| 1996 | - |
|
| 1997 | - #line 672 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1998 | - public function yy_r78() |
|
| 1999 | - { |
|
| 2000 | - $this->_retvalue = |
|
| 2001 | - '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' . |
|
| 2002 | - $this->yystack[ $this->yyidx + 0 ]->minor . '\')'; |
|
| 2003 | - } |
|
| 2004 | - |
|
| 2005 | - #line 677 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2006 | - public function yy_r79() |
|
| 2007 | - { |
|
| 2008 | - $this->_retvalue = |
|
| 2009 | - $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2010 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2011 | - } |
|
| 2012 | - |
|
| 2013 | - #line 691 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2014 | - public function yy_r82() |
|
| 2015 | - { |
|
| 2016 | - $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), |
|
| 2017 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2018 | - 'modifierlist' => $this->yystack[ $this->yyidx + |
|
| 2019 | - 0 ]->minor)); |
|
| 2020 | - } |
|
| 2021 | - |
|
| 2022 | - #line 697 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2023 | - public function yy_r83() |
|
| 2024 | - { |
|
| 2025 | - $this->_retvalue = |
|
| 2026 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2027 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] . $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2028 | - } |
|
| 2029 | - |
|
| 2030 | - #line 701 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2031 | - public function yy_r84() |
|
| 2032 | - { |
|
| 2033 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2034 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2035 | - } |
|
| 2036 | - |
|
| 2037 | - #line 705 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2038 | - public function yy_r85() |
|
| 2039 | - { |
|
| 2040 | - $this->_retvalue = |
|
| 2041 | - $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2042 | - } |
|
| 2043 | - |
|
| 2044 | - #line 709 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2045 | - public function yy_r86() |
|
| 2046 | - { |
|
| 2047 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . |
|
| 2048 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2049 | - } |
|
| 2050 | - |
|
| 2051 | - #line 713 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2052 | - public function yy_r87() |
|
| 2053 | - { |
|
| 2054 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' . |
|
| 2055 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2056 | - } |
|
| 2057 | - |
|
| 2058 | - #line 721 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2059 | - public function yy_r88() |
|
| 2060 | - { |
|
| 2061 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2062 | - substr($this->yystack[ $this->yyidx + |
|
| 2063 | - - 2 ]->minor, |
|
| 2064 | - 1) . |
|
| 2065 | - '\'') . |
|
| 2066 | - ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2067 | - } |
|
| 2068 | - |
|
| 2069 | - #line 725 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2070 | - public function yy_r89() |
|
| 2071 | - { |
|
| 2072 | - $this->_retvalue = |
|
| 2073 | - $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' . |
|
| 2074 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2075 | - } |
|
| 2076 | - |
|
| 2077 | - #line 740 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2078 | - public function yy_r92() |
|
| 2079 | - { |
|
| 2080 | - $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2081 | - } |
|
| 2082 | - |
|
| 2083 | - #line 761 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2084 | - public function yy_r97() |
|
| 2085 | - { |
|
| 2086 | - $this->_retvalue = |
|
| 2087 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2088 | - } |
|
| 2089 | - |
|
| 2090 | - #line 765 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2091 | - public function yy_r98() |
|
| 2092 | - { |
|
| 2093 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.'; |
|
| 2094 | - } |
|
| 2095 | - |
|
| 2096 | - #line 769 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2097 | - public function yy_r99() |
|
| 2098 | - { |
|
| 2099 | - $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2100 | - } |
|
| 2101 | - |
|
| 2102 | - #line 774 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2103 | - public function yy_r100() |
|
| 2104 | - { |
|
| 2105 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 2106 | - if ($this->security) { |
|
| 2107 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 2108 | - } |
|
| 2109 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2110 | - } else { |
|
| 2111 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 2112 | - } |
|
| 2113 | - } |
|
| 2114 | - |
|
| 2115 | - #line 791 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2116 | - public function yy_r102() |
|
| 2117 | - { |
|
| 2118 | - $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")"; |
|
| 2119 | - } |
|
| 2120 | - |
|
| 2121 | - #line 795 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2122 | - public function yy_r103() |
|
| 2123 | - { |
|
| 2124 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2125 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2126 | - } |
|
| 2127 | - |
|
| 2128 | - #line 813 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2129 | - public function yy_r107() |
|
| 2130 | - { |
|
| 2131 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2132 | - if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2133 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2134 | - $this->compiler->compileTag('private_special_variable', array(), |
|
| 2135 | - $this->yystack[ $this->yyidx + |
|
| 2136 | - - 2 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2137 | - ';?>'); |
|
| 2138 | - } else { |
|
| 2139 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2140 | - $this->compiler->compileVariable($this->yystack[ $this->yyidx + |
|
| 2141 | - - 2 ]->minor[ 'var' ]) . |
|
| 2142 | - $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . |
|
| 2143 | - ';?>'); |
|
| 2144 | - } |
|
| 2145 | - $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2146 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2147 | - } |
|
| 2148 | - |
|
| 2149 | - #line 824 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2150 | - public function yy_r108() |
|
| 2151 | - { |
|
| 2152 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2153 | - $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2154 | - $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>')); |
|
| 2155 | - $this->_retvalue = $prefixVar; |
|
| 2156 | - } |
|
| 2157 | - |
|
| 2158 | - #line 841 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2159 | - public function yy_r111() |
|
| 2160 | - { |
|
| 2161 | - if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) && |
|
| 2162 | - (!$this->security || |
|
| 2163 | - $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2164 | - $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler)) |
|
| 2165 | - ) { |
|
| 2166 | - if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) { |
|
| 2167 | - $this->_retvalue = |
|
| 2168 | - $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' . |
|
| 2169 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2170 | - } else { |
|
| 2171 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' . |
|
| 2172 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2173 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2174 | - } |
|
| 2175 | - } else { |
|
| 2176 | - $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2177 | - "' is undefined or not allowed by security setting"); |
|
| 2178 | - } |
|
| 2179 | - } |
|
| 2180 | - |
|
| 2181 | - #line 860 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2182 | - public function yy_r113() |
|
| 2183 | - { |
|
| 2184 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2185 | - } |
|
| 2186 | - |
|
| 2187 | - #line 871 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2188 | - public function yy_r114() |
|
| 2189 | - { |
|
| 2190 | - $this->_retvalue = |
|
| 2191 | - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); |
|
| 2192 | - } |
|
| 2193 | - |
|
| 2194 | - #line 874 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2195 | - public function yy_r115() |
|
| 2196 | - { |
|
| 2197 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2198 | - $smarty_var = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2199 | - $this->yystack[ $this->yyidx + |
|
| 2200 | - 0 ]->minor[ 'smarty_internal_index' ]); |
|
| 2201 | - $this->_retvalue = $smarty_var; |
|
| 2202 | - } else { |
|
| 2203 | - // used for array reset,next,prev,end,current |
|
| 2204 | - $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; |
|
| 2205 | - $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2206 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . |
|
| 2207 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2208 | - } |
|
| 2209 | - } |
|
| 2210 | - |
|
| 2211 | - #line 887 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2212 | - public function yy_r116() |
|
| 2213 | - { |
|
| 2214 | - $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' . |
|
| 2215 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2216 | - } |
|
| 2217 | - |
|
| 2218 | - #line 897 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2219 | - public function yy_r118() |
|
| 2220 | - { |
|
| 2221 | - $this->_retvalue = |
|
| 2222 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'"); |
|
| 2223 | - } |
|
| 2224 | - |
|
| 2225 | - #line 901 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2226 | - public function yy_r119() |
|
| 2227 | - { |
|
| 2228 | - $this->_retvalue = '(is_array($tmp = ' . |
|
| 2229 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2230 | - "'") . ') ? $tmp' . |
|
| 2231 | - $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)'; |
|
| 2232 | - } |
|
| 2233 | - |
|
| 2234 | - #line 905 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2235 | - public function yy_r120() |
|
| 2236 | - { |
|
| 2237 | - $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2238 | - } |
|
| 2239 | - |
|
| 2240 | - #line 909 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2241 | - public function yy_r121() |
|
| 2242 | - { |
|
| 2243 | - $this->_retvalue = |
|
| 2244 | - '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . |
|
| 2245 | - ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)'; |
|
| 2246 | - } |
|
| 2247 | - |
|
| 2248 | - #line 913 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2249 | - public function yy_r122() |
|
| 2250 | - { |
|
| 2251 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'', |
|
| 2252 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2253 | - } |
|
| 2254 | - |
|
| 2255 | - #line 916 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2256 | - public function yy_r123() |
|
| 2257 | - { |
|
| 2258 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2259 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2260 | - } |
|
| 2261 | - |
|
| 2262 | - #line 929 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2263 | - public function yy_r125() |
|
| 2264 | - { |
|
| 2265 | - return; |
|
| 2266 | - } |
|
| 2267 | - |
|
| 2268 | - #line 935 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2269 | - public function yy_r126() |
|
| 2270 | - { |
|
| 2271 | - $this->_retvalue = |
|
| 2272 | - '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . |
|
| 2273 | - ']'; |
|
| 2274 | - } |
|
| 2275 | - |
|
| 2276 | - #line 938 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2277 | - public function yy_r127() |
|
| 2278 | - { |
|
| 2279 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; |
|
| 2280 | - } |
|
| 2281 | - |
|
| 2282 | - #line 942 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2283 | - public function yy_r128() |
|
| 2284 | - { |
|
| 2285 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' . |
|
| 2286 | - $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2287 | - } |
|
| 2288 | - |
|
| 2289 | - #line 946 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2290 | - public function yy_r129() |
|
| 2291 | - { |
|
| 2292 | - $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']"; |
|
| 2293 | - } |
|
| 2294 | - |
|
| 2295 | - #line 950 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2296 | - public function yy_r130() |
|
| 2297 | - { |
|
| 2298 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2299 | - } |
|
| 2300 | - |
|
| 2301 | - #line 955 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2302 | - public function yy_r131() |
|
| 2303 | - { |
|
| 2304 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2305 | - } |
|
| 2306 | - |
|
| 2307 | - #line 960 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2308 | - public function yy_r132() |
|
| 2309 | - { |
|
| 2310 | - $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2311 | - $this->yystack[ $this->yyidx + |
|
| 2312 | - - 1 ]->minor . |
|
| 2313 | - '\'][\'index\']') . |
|
| 2314 | - ']'; |
|
| 2315 | - } |
|
| 2316 | - |
|
| 2317 | - #line 964 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2318 | - public function yy_r133() |
|
| 2319 | - { |
|
| 2320 | - $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2321 | - $this->yystack[ $this->yyidx + |
|
| 2322 | - - 3 ]->minor . |
|
| 2323 | - '\'][\'' . |
|
| 2324 | - $this->yystack[ $this->yyidx + |
|
| 2325 | - - 1 ]->minor . |
|
| 2326 | - '\']') . ']'; |
|
| 2327 | - } |
|
| 2328 | - |
|
| 2329 | - #line 967 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2330 | - public function yy_r134() |
|
| 2331 | - { |
|
| 2332 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2333 | - } |
|
| 2334 | - |
|
| 2335 | - #line 973 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2336 | - public function yy_r136() |
|
| 2337 | - { |
|
| 2338 | - $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . |
|
| 2339 | - substr($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2340 | - 1) . '\'') . ']';; |
|
| 2341 | - } |
|
| 2342 | - |
|
| 2343 | - #line 989 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2344 | - public function yy_r140() |
|
| 2345 | - { |
|
| 2346 | - $this->_retvalue = '[]'; |
|
| 2347 | - } |
|
| 2348 | - |
|
| 2349 | - #line 999 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2350 | - public function yy_r141() |
|
| 2351 | - { |
|
| 2352 | - $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; |
|
| 2353 | - } |
|
| 2354 | - |
|
| 2355 | - #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2356 | - public function yy_r142() |
|
| 2357 | - { |
|
| 2358 | - $this->_retvalue = "''"; |
|
| 2359 | - } |
|
| 2360 | - |
|
| 2361 | - #line 1008 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2362 | - public function yy_r143() |
|
| 2363 | - { |
|
| 2364 | - $this->_retvalue = |
|
| 2365 | - $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2366 | - } |
|
| 2367 | - |
|
| 2368 | - #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2369 | - public function yy_r145() |
|
| 2370 | - { |
|
| 2371 | - $var = |
|
| 2372 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2373 | - ' $'); |
|
| 2374 | - $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); |
|
| 2375 | - } |
|
| 2376 | - |
|
| 2377 | - #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2378 | - public function yy_r146() |
|
| 2379 | - { |
|
| 2380 | - $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2381 | - } |
|
| 2382 | - |
|
| 2383 | - #line 1029 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2384 | - public function yy_r147() |
|
| 2385 | - { |
|
| 2386 | - if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2387 | - $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2388 | - $this->yystack[ $this->yyidx + |
|
| 2389 | - - 1 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2390 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2391 | - } else { |
|
| 2392 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) . |
|
| 2393 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] . |
|
| 2394 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2395 | - } |
|
| 2396 | - } |
|
| 2397 | - |
|
| 2398 | - #line 1038 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2399 | - public function yy_r148() |
|
| 2400 | - { |
|
| 2401 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2402 | - } |
|
| 2403 | - |
|
| 2404 | - #line 1043 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2405 | - public function yy_r149() |
|
| 2406 | - { |
|
| 2407 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2408 | - } |
|
| 2409 | - |
|
| 2410 | - #line 1048 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2411 | - public function yy_r150() |
|
| 2412 | - { |
|
| 2413 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') { |
|
| 2414 | - $this->compiler->trigger_template_error(self::Err1); |
|
| 2415 | - } |
|
| 2416 | - $this->_retvalue = |
|
| 2417 | - '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2418 | - } |
|
| 2419 | - |
|
| 2420 | - #line 1055 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2421 | - public function yy_r151() |
|
| 2422 | - { |
|
| 2423 | - if ($this->security) { |
|
| 2424 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2425 | - } |
|
| 2426 | - $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2427 | - $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2428 | - } |
|
| 2429 | - |
|
| 2430 | - #line 1062 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2431 | - public function yy_r152() |
|
| 2432 | - { |
|
| 2433 | - if ($this->security) { |
|
| 2434 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2435 | - } |
|
| 2436 | - $this->_retvalue = |
|
| 2437 | - '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2438 | - } |
|
| 2439 | - |
|
| 2440 | - #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2441 | - public function yy_r153() |
|
| 2442 | - { |
|
| 2443 | - if ($this->security) { |
|
| 2444 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2445 | - } |
|
| 2446 | - $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' . |
|
| 2447 | - $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 2448 | - '}'; |
|
| 2449 | - } |
|
| 2450 | - |
|
| 2451 | - #line 1077 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2452 | - public function yy_r154() |
|
| 2453 | - { |
|
| 2454 | - $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2455 | - } |
|
| 2456 | - |
|
| 2457 | - #line 1085 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2458 | - public function yy_r155() |
|
| 2459 | - { |
|
| 2460 | - if (!$this->security || |
|
| 2461 | - $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler) |
|
| 2462 | - ) { |
|
| 2463 | - if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 || |
|
| 2464 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 || |
|
| 2465 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 || |
|
| 2466 | - is_callable($this->yystack[ $this->yyidx + - 3 ]->minor) |
|
| 2467 | - ) { |
|
| 2468 | - $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor); |
|
| 2469 | - if ($func_name == 'isset') { |
|
| 2470 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) { |
|
| 2471 | - $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"'); |
|
| 2472 | - } |
|
| 2473 | - $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2474 | - if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', |
|
| 2475 | - strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0 |
|
| 2476 | - ) { |
|
| 2477 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2478 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . |
|
| 2479 | - str_replace(')', ', false)', $par) . ';?>'); |
|
| 2480 | - $isset_par = $prefixVar; |
|
| 2481 | - } else { |
|
| 2482 | - $isset_par = str_replace("')->value", "',null,true,false)->value", $par); |
|
| 2483 | - } |
|
| 2484 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")"; |
|
| 2485 | - } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) { |
|
| 2486 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) { |
|
| 2487 | - $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"'); |
|
| 2488 | - } |
|
| 2489 | - if ($func_name == 'empty') { |
|
| 2490 | - $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", |
|
| 2491 | - $this->yystack[ $this->yyidx + |
|
| 2492 | - - 1 ]->minor[ 0 ]) . ')'; |
|
| 2493 | - } else { |
|
| 2494 | - $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')'; |
|
| 2495 | - } |
|
| 2496 | - } else { |
|
| 2497 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2498 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2499 | - } |
|
| 2500 | - } else { |
|
| 2501 | - $this->compiler->trigger_template_error("unknown function \"" . |
|
| 2502 | - $this->yystack[ $this->yyidx + - 3 ]->minor . "\""); |
|
| 2503 | - } |
|
| 2504 | - } |
|
| 2505 | - } |
|
| 2506 | - |
|
| 2507 | - #line 1124 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2508 | - public function yy_r156() |
|
| 2509 | - { |
|
| 2510 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') { |
|
| 2511 | - $this->compiler->trigger_template_error(self::Err1); |
|
| 2512 | - } |
|
| 2513 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2514 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2515 | - } |
|
| 2516 | - |
|
| 2517 | - #line 1131 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2518 | - public function yy_r157() |
|
| 2519 | - { |
|
| 2520 | - if ($this->security) { |
|
| 2521 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2522 | - } |
|
| 2523 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2524 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . |
|
| 2525 | - substr($this->yystack[ $this->yyidx + |
|
| 2526 | - - 3 ]->minor, |
|
| 2527 | - 1) . |
|
| 2528 | - '\'') . ';?>'); |
|
| 2529 | - $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')'; |
|
| 2530 | - } |
|
| 2531 | - |
|
| 2532 | - #line 1142 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2533 | - public function yy_r158() |
|
| 2534 | - { |
|
| 2535 | - $this->_retvalue = |
|
| 2536 | - array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2537 | - } |
|
| 2538 | - |
|
| 2539 | - #line 1159 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2540 | - public function yy_r161() |
|
| 2541 | - { |
|
| 2542 | - $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2543 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2544 | - $this->yystack[ $this->yyidx + 0 ]->minor))); |
|
| 2545 | - } |
|
| 2546 | - |
|
| 2547 | - #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2548 | - public function yy_r162() |
|
| 2549 | - { |
|
| 2550 | - $this->_retvalue = |
|
| 2551 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2552 | - } |
|
| 2553 | - |
|
| 2554 | - #line 1171 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2555 | - public function yy_r164() |
|
| 2556 | - { |
|
| 2557 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2558 | - } |
|
| 2559 | - |
|
| 2560 | - #line 1179 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2561 | - public function yy_r165() |
|
| 2562 | - { |
|
| 2563 | - $this->_retvalue = |
|
| 2564 | - array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2565 | - } |
|
| 2566 | - |
|
| 2567 | - #line 1198 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2568 | - public function yy_r169() |
|
| 2569 | - { |
|
| 2570 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); |
|
| 2571 | - } |
|
| 2572 | - |
|
| 2573 | - #line 1203 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2574 | - public function yy_r170() |
|
| 2575 | - { |
|
| 2576 | - $this->_retvalue = |
|
| 2577 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); |
|
| 2578 | - } |
|
| 2579 | - |
|
| 2580 | - #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2581 | - public function yy_r171() |
|
| 2582 | - { |
|
| 2583 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); |
|
| 2584 | - } |
|
| 2585 | - |
|
| 2586 | - #line 1213 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2587 | - public function yy_r172() |
|
| 2588 | - { |
|
| 2589 | - $this->_retvalue = |
|
| 2590 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2591 | - } |
|
| 2592 | - |
|
| 2593 | - #line 1218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2594 | - public function yy_r173() |
|
| 2595 | - { |
|
| 2596 | - $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2597 | - $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2598 | - $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2599 | - } |
|
| 2600 | - |
|
| 2601 | - #line 1224 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2602 | - public function yy_r174() |
|
| 2603 | - { |
|
| 2604 | - $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; |
|
| 2605 | - } |
|
| 2606 | - |
|
| 2607 | - #line 1228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2608 | - public function yy_r175() |
|
| 2609 | - { |
|
| 2610 | - static $lops = |
|
| 2611 | - array('eq' => ' == ', 'ne' => ' != ', 'neq' => ' != ', 'gt' => ' > ', 'ge' => ' >= ', 'gte' => ' >= ', |
|
| 2612 | - 'lt' => ' < ', 'le' => ' <= ', 'lte' => ' <= ', 'mod' => ' % ', 'and' => ' && ', 'or' => ' || ', |
|
| 2613 | - 'xor' => ' xor ',); |
|
| 2614 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2615 | - $this->_retvalue = $lops[ $op ]; |
|
| 2616 | - } |
|
| 2617 | - |
|
| 2618 | - #line 1247 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2619 | - public function yy_r176() |
|
| 2620 | - { |
|
| 2621 | - static $tlops = |
|
| 2622 | - array('isdivby' => array('op' => ' % ', 'pre' => '!('), 'isnotdivby' => array('op' => ' % ', 'pre' => '('), |
|
| 2623 | - 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), |
|
| 2624 | - 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2625 | - 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2626 | - 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),); |
|
| 2627 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2628 | - $this->_retvalue = $tlops[ $op ]; |
|
| 2629 | - } |
|
| 2630 | - |
|
| 2631 | - #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2632 | - public function yy_r177() |
|
| 2633 | - { |
|
| 2634 | - static $scond = |
|
| 2635 | - array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); |
|
| 2636 | - $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2637 | - $this->_retvalue = $scond[ $op ]; |
|
| 2638 | - } |
|
| 2639 | - |
|
| 2640 | - #line 1274 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2641 | - public function yy_r178() |
|
| 2642 | - { |
|
| 2643 | - $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2644 | - } |
|
| 2645 | - |
|
| 2646 | - #line 1282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2647 | - public function yy_r180() |
|
| 2648 | - { |
|
| 2649 | - $this->_retvalue = |
|
| 2650 | - $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2651 | - } |
|
| 2652 | - |
|
| 2653 | - #line 1290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2654 | - public function yy_r182() |
|
| 2655 | - { |
|
| 2656 | - $this->_retvalue = |
|
| 2657 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2658 | - } |
|
| 2659 | - |
|
| 2660 | - #line 1294 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2661 | - public function yy_r183() |
|
| 2662 | - { |
|
| 2663 | - $this->_retvalue = |
|
| 2664 | - '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2665 | - } |
|
| 2666 | - |
|
| 2667 | - #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2668 | - public function yy_r186() |
|
| 2669 | - { |
|
| 2670 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this); |
|
| 2671 | - } |
|
| 2672 | - |
|
| 2673 | - #line 1315 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2674 | - public function yy_r187() |
|
| 2675 | - { |
|
| 2676 | - $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2677 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 2678 | - } |
|
| 2679 | - |
|
| 2680 | - #line 1320 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2681 | - public function yy_r188() |
|
| 2682 | - { |
|
| 2683 | - $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2684 | - } |
|
| 2685 | - |
|
| 2686 | - #line 1324 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2687 | - public function yy_r189() |
|
| 2688 | - { |
|
| 2689 | - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2690 | - } |
|
| 2691 | - |
|
| 2692 | - #line 1332 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2693 | - public function yy_r191() |
|
| 2694 | - { |
|
| 2695 | - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . |
|
| 2696 | - substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . |
|
| 2697 | - '\']->value'); |
|
| 2698 | - } |
|
| 2699 | - |
|
| 2700 | - #line 1340 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2701 | - public function yy_r193() |
|
| 2702 | - { |
|
| 2703 | - $this->_retvalue = |
|
| 2704 | - new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'); |
|
| 2705 | - } |
|
| 2706 | - |
|
| 2707 | - #line 1344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2708 | - public function yy_r194() |
|
| 2709 | - { |
|
| 2710 | - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2711 | - } |
|
| 2712 | - |
|
| 2713 | - #line 1348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2714 | - public function yy_r195() |
|
| 2715 | - { |
|
| 2716 | - $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2717 | - } |
|
| 2718 | - |
|
| 2719 | - private $_retvalue; |
|
| 2720 | - |
|
| 2721 | - public function yy_reduce($yyruleno) |
|
| 2722 | - { |
|
| 1268 | + if (count(self::$yyFallback) && $iLookAhead < $countYyFallback && |
|
| 1269 | + ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 1270 | + ) { |
|
| 1271 | + if ($this->yyTraceFILE) { |
|
| 1272 | + fwrite($this->yyTraceFILE, |
|
| 1273 | + $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 1274 | + $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 1275 | + } |
|
| 1276 | + |
|
| 1277 | + return $this->yy_find_shift_action($iFallback); |
|
| 1278 | + } |
|
| 1279 | + |
|
| 1280 | + return self::$yy_default[ $stateno ]; |
|
| 1281 | + } else { |
|
| 1282 | + return self::$yy_action[ $i ]; |
|
| 1283 | + } |
|
| 1284 | + } |
|
| 1285 | + |
|
| 1286 | + public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 1287 | + { |
|
| 1288 | + /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 1289 | + |
|
| 1290 | + if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 1291 | + return self::$yy_default[ $stateno ]; |
|
| 1292 | + } |
|
| 1293 | + $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 1294 | + if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 1295 | + return self::$yy_default[ $stateno ]; |
|
| 1296 | + } |
|
| 1297 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 1298 | + return self::YY_NO_ACTION; |
|
| 1299 | + } |
|
| 1300 | + $i += $iLookAhead; |
|
| 1301 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1302 | + return self::$yy_default[ $stateno ]; |
|
| 1303 | + } else { |
|
| 1304 | + return self::$yy_action[ $i ]; |
|
| 1305 | + } |
|
| 1306 | + } |
|
| 1307 | + |
|
| 1308 | + public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 1309 | + { |
|
| 1310 | + $this->yyidx ++; |
|
| 1311 | + if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 1312 | + $this->yyidx --; |
|
| 1313 | + if ($this->yyTraceFILE) { |
|
| 1314 | + fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 1315 | + } |
|
| 1316 | + while ($this->yyidx >= 0) { |
|
| 1317 | + $this->yy_pop_parser_stack(); |
|
| 1318 | + } |
|
| 1319 | + #line 207 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1320 | + |
|
| 1321 | + $this->internalError = true; |
|
| 1322 | + $this->compiler->trigger_template_error("Stack overflow in template parser"); |
|
| 1323 | + |
|
| 1324 | + return; |
|
| 1325 | + } |
|
| 1326 | + $yytos = new TP_yyStackEntry; |
|
| 1327 | + $yytos->stateno = $yyNewState; |
|
| 1328 | + $yytos->major = $yyMajor; |
|
| 1329 | + $yytos->minor = $yypMinor; |
|
| 1330 | + $this->yystack[] = $yytos; |
|
| 1331 | + if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 1332 | + fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 1333 | + fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 1334 | + for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 1335 | + fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 1336 | + } |
|
| 1337 | + fwrite($this->yyTraceFILE, "\n"); |
|
| 1338 | + } |
|
| 1339 | + } |
|
| 1340 | + |
|
| 1341 | + public static $yyRuleInfo = array(array(0 => 63, 1 => 1), array(0 => 64, 1 => 1), array(0 => 64, 1 => 2), |
|
| 1342 | + array(0 => 64, 1 => 0), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1343 | + array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1344 | + array(0 => 68, 1 => 1), array(0 => 68, 1 => 2), array(0 => 65, 1 => 1), |
|
| 1345 | + array(0 => 65, 1 => 1), array(0 => 67, 1 => 2), array(0 => 67, 1 => 3), |
|
| 1346 | + array(0 => 69, 1 => 2), array(0 => 69, 1 => 0), array(0 => 70, 1 => 1), |
|
| 1347 | + array(0 => 70, 1 => 1), array(0 => 66, 1 => 2), array(0 => 66, 1 => 1), |
|
| 1348 | + array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), |
|
| 1349 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1350 | + array(0 => 71, 1 => 4), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1351 | + array(0 => 71, 1 => 5), array(0 => 66, 1 => 1), array(0 => 71, 1 => 3), |
|
| 1352 | + array(0 => 71, 1 => 2), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1353 | + array(0 => 71, 1 => 6), array(0 => 71, 1 => 2), array(0 => 71, 1 => 2), |
|
| 1354 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1355 | + array(0 => 71, 1 => 8), array(0 => 80, 1 => 2), array(0 => 80, 1 => 1), |
|
| 1356 | + array(0 => 71, 1 => 5), array(0 => 71, 1 => 7), array(0 => 71, 1 => 2), |
|
| 1357 | + array(0 => 71, 1 => 6), array(0 => 71, 1 => 8), array(0 => 71, 1 => 6), |
|
| 1358 | + array(0 => 71, 1 => 8), array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), |
|
| 1359 | + array(0 => 71, 1 => 2), array(0 => 66, 1 => 1), array(0 => 71, 1 => 2), |
|
| 1360 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1361 | + array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 0), |
|
| 1362 | + array(0 => 83, 1 => 4), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1363 | + array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1364 | + array(0 => 83, 1 => 4), array(0 => 79, 1 => 1), array(0 => 79, 1 => 3), |
|
| 1365 | + array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), |
|
| 1366 | + array(0 => 78, 1 => 3), array(0 => 75, 1 => 1), array(0 => 75, 1 => 1), |
|
| 1367 | + array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), |
|
| 1368 | + array(0 => 75, 1 => 1), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1369 | + array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1370 | + array(0 => 75, 1 => 3), array(0 => 84, 1 => 7), array(0 => 84, 1 => 7), |
|
| 1371 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), |
|
| 1372 | + array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1373 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), |
|
| 1374 | + array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), |
|
| 1375 | + array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), |
|
| 1376 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), |
|
| 1377 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1378 | + array(0 => 74, 1 => 3), array(0 => 90, 1 => 1), array(0 => 90, 1 => 1), |
|
| 1379 | + array(0 => 72, 1 => 1), array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), |
|
| 1380 | + array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), |
|
| 1381 | + array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), array(0 => 76, 1 => 2), |
|
| 1382 | + array(0 => 76, 1 => 2), array(0 => 94, 1 => 2), array(0 => 94, 1 => 0), |
|
| 1383 | + array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1384 | + array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1385 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 3), |
|
| 1386 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), |
|
| 1387 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 2), |
|
| 1388 | + array(0 => 81, 1 => 1), array(0 => 81, 1 => 1), array(0 => 81, 1 => 2), |
|
| 1389 | + array(0 => 96, 1 => 1), array(0 => 96, 1 => 1), array(0 => 96, 1 => 3), |
|
| 1390 | + array(0 => 93, 1 => 2), array(0 => 97, 1 => 1), array(0 => 97, 1 => 2), |
|
| 1391 | + array(0 => 98, 1 => 3), array(0 => 98, 1 => 3), array(0 => 98, 1 => 5), |
|
| 1392 | + array(0 => 98, 1 => 6), array(0 => 98, 1 => 2), array(0 => 89, 1 => 4), |
|
| 1393 | + array(0 => 99, 1 => 4), array(0 => 99, 1 => 4), array(0 => 100, 1 => 3), |
|
| 1394 | + array(0 => 100, 1 => 1), array(0 => 100, 1 => 0), array(0 => 77, 1 => 3), |
|
| 1395 | + array(0 => 77, 1 => 2), array(0 => 101, 1 => 3), array(0 => 101, 1 => 2), |
|
| 1396 | + array(0 => 82, 1 => 2), array(0 => 82, 1 => 0), array(0 => 102, 1 => 2), |
|
| 1397 | + array(0 => 102, 1 => 2), array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), |
|
| 1398 | + array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), array(0 => 92, 1 => 3), |
|
| 1399 | + array(0 => 87, 1 => 1), array(0 => 87, 1 => 1), array(0 => 86, 1 => 1), |
|
| 1400 | + array(0 => 88, 1 => 1), array(0 => 85, 1 => 3), array(0 => 103, 1 => 1), |
|
| 1401 | + array(0 => 103, 1 => 3), array(0 => 103, 1 => 0), array(0 => 104, 1 => 3), |
|
| 1402 | + array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 91, 1 => 2), |
|
| 1403 | + array(0 => 91, 1 => 3), array(0 => 105, 1 => 2), array(0 => 105, 1 => 1), |
|
| 1404 | + array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1405 | + array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1406 | + array(0 => 106, 1 => 1),); |
|
| 1407 | + |
|
| 1408 | + public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9, |
|
| 1409 | + 18 => 9, 44 => 9, 67 => 9, 68 => 9, 76 => 9, 77 => 9, 81 => 9, 90 => 9, 95 => 9, |
|
| 1410 | + 96 => 9, 101 => 9, 105 => 9, 106 => 9, 110 => 9, 112 => 9, 117 => 9, 179 => 9, |
|
| 1411 | + 184 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 75 => 14, |
|
| 1412 | + 15 => 15, 91 => 15, 93 => 15, 94 => 15, 124 => 15, 19 => 19, 20 => 20, 21 => 21, |
|
| 1413 | + 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27, 29 => 29, |
|
| 1414 | + 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37, |
|
| 1415 | + 38 => 38, 39 => 39, 41 => 39, 40 => 40, 42 => 42, 43 => 43, 45 => 45, 46 => 46, |
|
| 1416 | + 47 => 47, 48 => 48, 50 => 48, 49 => 49, 51 => 49, 52 => 52, 53 => 53, 54 => 54, |
|
| 1417 | + 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61, 70 => 61, |
|
| 1418 | + 159 => 61, 163 => 61, 167 => 61, 168 => 61, 62 => 62, 160 => 62, 166 => 62, |
|
| 1419 | + 63 => 63, 64 => 64, 65 => 64, 66 => 66, 144 => 66, 69 => 69, 71 => 71, 72 => 72, |
|
| 1420 | + 73 => 72, 74 => 74, 78 => 78, 79 => 79, 80 => 79, 82 => 82, 109 => 82, 83 => 83, |
|
| 1421 | + 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 89, 92 => 92, 97 => 97, |
|
| 1422 | + 98 => 98, 99 => 99, 100 => 100, 102 => 102, 103 => 103, 104 => 103, 107 => 107, |
|
| 1423 | + 108 => 108, 111 => 111, 113 => 113, 114 => 114, 115 => 115, 116 => 116, |
|
| 1424 | + 118 => 118, 119 => 119, 120 => 120, 121 => 121, 122 => 122, 123 => 123, |
|
| 1425 | + 125 => 125, 181 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, |
|
| 1426 | + 130 => 130, 131 => 131, 139 => 131, 132 => 132, 133 => 133, 134 => 134, |
|
| 1427 | + 135 => 134, 137 => 134, 138 => 134, 136 => 136, 140 => 140, 141 => 141, |
|
| 1428 | + 142 => 142, 185 => 142, 143 => 143, 145 => 145, 146 => 146, 147 => 147, |
|
| 1429 | + 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, |
|
| 1430 | + 154 => 154, 155 => 155, 156 => 156, 157 => 157, 158 => 158, 161 => 161, |
|
| 1431 | + 162 => 162, 164 => 164, 165 => 165, 169 => 169, 170 => 170, 171 => 171, |
|
| 1432 | + 172 => 172, 173 => 173, 174 => 174, 175 => 175, 176 => 176, 177 => 177, |
|
| 1433 | + 178 => 178, 180 => 180, 182 => 182, 183 => 183, 186 => 186, 187 => 187, |
|
| 1434 | + 188 => 188, 189 => 189, 190 => 189, 192 => 189, 191 => 191, 193 => 193, |
|
| 1435 | + 194 => 194, 195 => 195,); |
|
| 1436 | + |
|
| 1437 | + #line 218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1438 | + public function yy_r0() |
|
| 1439 | + { |
|
| 1440 | + $this->root_buffer->prepend_array($this, $this->template_prefix); |
|
| 1441 | + $this->root_buffer->append_array($this, $this->template_postfix); |
|
| 1442 | + $this->_retvalue = $this->root_buffer->to_smarty_php($this); |
|
| 1443 | + } |
|
| 1444 | + |
|
| 1445 | + #line 228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1446 | + public function yy_r1() |
|
| 1447 | + { |
|
| 1448 | + if ($this->yystack[ $this->yyidx + 0 ]->minor != null) { |
|
| 1449 | + $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1450 | + } |
|
| 1451 | + } |
|
| 1452 | + |
|
| 1453 | + #line 235 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1454 | + public function yy_r2() |
|
| 1455 | + { |
|
| 1456 | + if ($this->yystack[ $this->yyidx + 0 ]->minor != null) { |
|
| 1457 | + // because of possible code injection |
|
| 1458 | + $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1459 | + } |
|
| 1460 | + } |
|
| 1461 | + |
|
| 1462 | + #line 249 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1463 | + public function yy_r4() |
|
| 1464 | + { |
|
| 1465 | + if ($this->compiler->has_code) { |
|
| 1466 | + $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1467 | + } else { |
|
| 1468 | + $this->_retvalue = null; |
|
| 1469 | + } |
|
| 1470 | + $this->compiler->has_variable_string = false; |
|
| 1471 | + $this->block_nesting_level = count($this->compiler->_tag_stack); |
|
| 1472 | + } |
|
| 1473 | + |
|
| 1474 | + #line 260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1475 | + public function yy_r5() |
|
| 1476 | + { |
|
| 1477 | + $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1478 | + } |
|
| 1479 | + |
|
| 1480 | + #line 264 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1481 | + public function yy_r6() |
|
| 1482 | + { |
|
| 1483 | + $code = $this->compiler->compileTag('private_php', |
|
| 1484 | + array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1485 | + array('type' => $this->lex->phpType)), array()); |
|
| 1486 | + if ($this->compiler->has_code && !empty($code)) { |
|
| 1487 | + $tmp = ''; |
|
| 1488 | + foreach ($this->compiler->prefix_code as $code) { |
|
| 1489 | + $tmp .= $code; |
|
| 1490 | + } |
|
| 1491 | + $this->compiler->prefix_code = array(); |
|
| 1492 | + $this->_retvalue = |
|
| 1493 | + new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)); |
|
| 1494 | + } else { |
|
| 1495 | + $this->_retvalue = null; |
|
| 1496 | + } |
|
| 1497 | + } |
|
| 1498 | + |
|
| 1499 | + #line 275 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1500 | + public function yy_r7() |
|
| 1501 | + { |
|
| 1502 | + $this->compiler->tag_nocache = true; |
|
| 1503 | + $save = $this->template->compiled->has_nocache_code; |
|
| 1504 | + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, |
|
| 1505 | + $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n", |
|
| 1506 | + true)); |
|
| 1507 | + $this->template->compiled->has_nocache_code = $save; |
|
| 1508 | + } |
|
| 1509 | + |
|
| 1510 | + #line 282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1511 | + public function yy_r8() |
|
| 1512 | + { |
|
| 1513 | + $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1514 | + } |
|
| 1515 | + |
|
| 1516 | + #line 286 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1517 | + public function yy_r9() |
|
| 1518 | + { |
|
| 1519 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1520 | + } |
|
| 1521 | + |
|
| 1522 | + #line 290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1523 | + public function yy_r10() |
|
| 1524 | + { |
|
| 1525 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1526 | + } |
|
| 1527 | + |
|
| 1528 | + #line 295 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1529 | + public function yy_r11() |
|
| 1530 | + { |
|
| 1531 | + $this->strip = true; |
|
| 1532 | + } |
|
| 1533 | + |
|
| 1534 | + #line 299 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1535 | + public function yy_r12() |
|
| 1536 | + { |
|
| 1537 | + $this->strip = false; |
|
| 1538 | + } |
|
| 1539 | + |
|
| 1540 | + #line 304 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1541 | + public function yy_r13() |
|
| 1542 | + { |
|
| 1543 | + $this->_retvalue = ''; |
|
| 1544 | + } |
|
| 1545 | + |
|
| 1546 | + #line 308 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1547 | + public function yy_r14() |
|
| 1548 | + { |
|
| 1549 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1550 | + } |
|
| 1551 | + |
|
| 1552 | + #line 312 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1553 | + public function yy_r15() |
|
| 1554 | + { |
|
| 1555 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1556 | + } |
|
| 1557 | + |
|
| 1558 | + #line 328 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1559 | + public function yy_r19() |
|
| 1560 | + { |
|
| 1561 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1562 | + } |
|
| 1563 | + |
|
| 1564 | + #line 334 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1565 | + public function yy_r20() |
|
| 1566 | + { |
|
| 1567 | + $var = |
|
| 1568 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1569 | + ' $'); |
|
| 1570 | + if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { |
|
| 1571 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'), |
|
| 1572 | + array('value' => $this->compiler->compileVariable('\'' . |
|
| 1573 | + $match[ 1 ] . |
|
| 1574 | + '\''))); |
|
| 1575 | + } else { |
|
| 1576 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1577 | + array('value' => $this->compiler->compileVariable('\'' . |
|
| 1578 | + $var . |
|
| 1579 | + '\''))); |
|
| 1580 | + } |
|
| 1581 | + } |
|
| 1582 | + |
|
| 1583 | + #line 344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1584 | + public function yy_r21() |
|
| 1585 | + { |
|
| 1586 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1587 | + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1588 | + } |
|
| 1589 | + |
|
| 1590 | + #line 348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1591 | + public function yy_r22() |
|
| 1592 | + { |
|
| 1593 | + $this->_retvalue = |
|
| 1594 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1595 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1596 | + } |
|
| 1597 | + |
|
| 1598 | + #line 371 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1599 | + public function yy_r27() |
|
| 1600 | + { |
|
| 1601 | + $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1602 | + 0 ]->minor), |
|
| 1603 | + array('var' => '\'' . |
|
| 1604 | + substr($this->yystack[ $this->yyidx + |
|
| 1605 | + - 2 ]->minor, |
|
| 1606 | + 1) . '\''))); |
|
| 1607 | + } |
|
| 1608 | + |
|
| 1609 | + #line 379 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1610 | + public function yy_r29() |
|
| 1611 | + { |
|
| 1612 | + $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1613 | + array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1614 | + - 1 ]->minor), |
|
| 1615 | + array('var' => '\'' . |
|
| 1616 | + substr($this->yystack[ $this->yyidx + |
|
| 1617 | + - 3 ]->minor, |
|
| 1618 | + 1) . '\'')), |
|
| 1619 | + $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1620 | + } |
|
| 1621 | + |
|
| 1622 | + #line 383 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1623 | + public function yy_r30() |
|
| 1624 | + { |
|
| 1625 | + $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1626 | + array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1627 | + - 1 ]->minor), |
|
| 1628 | + array('var' => $this->yystack[ $this->yyidx + |
|
| 1629 | + - 3 ]->minor[ 'var' ])), |
|
| 1630 | + $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1631 | + array('smarty_internal_index' => $this->yystack[ $this->yyidx + |
|
| 1632 | + - 3 ]->minor[ 'smarty_internal_index' ])); |
|
| 1633 | + } |
|
| 1634 | + |
|
| 1635 | + #line 388 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1636 | + public function yy_r31() |
|
| 1637 | + { |
|
| 1638 | + $tag = |
|
| 1639 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1640 | + if ($tag == 'strip') { |
|
| 1641 | + $this->strip = true; |
|
| 1642 | + $this->_retvalue = null;; |
|
| 1643 | + } else { |
|
| 1644 | + if (defined($tag)) { |
|
| 1645 | + if ($this->security) { |
|
| 1646 | + $this->security->isTrustedConstant($tag, $this->compiler); |
|
| 1647 | + } |
|
| 1648 | + $this->_retvalue = |
|
| 1649 | + $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); |
|
| 1650 | + } else { |
|
| 1651 | + if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { |
|
| 1652 | + $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'")); |
|
| 1653 | + } else { |
|
| 1654 | + $this->_retvalue = $this->compiler->compileTag($tag, array()); |
|
| 1655 | + } |
|
| 1656 | + } |
|
| 1657 | + } |
|
| 1658 | + } |
|
| 1659 | + |
|
| 1660 | + #line 410 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1661 | + public function yy_r32() |
|
| 1662 | + { |
|
| 1663 | + if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) { |
|
| 1664 | + if ($this->security) { |
|
| 1665 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler); |
|
| 1666 | + } |
|
| 1667 | + $this->_retvalue = |
|
| 1668 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1669 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1670 | + } else { |
|
| 1671 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 1672 | + $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1673 | + } |
|
| 1674 | + } |
|
| 1675 | + |
|
| 1676 | + #line 420 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1677 | + public function yy_r33() |
|
| 1678 | + { |
|
| 1679 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1680 | + if ($this->security) { |
|
| 1681 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1682 | + } |
|
| 1683 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1684 | + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1685 | + } else { |
|
| 1686 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); |
|
| 1687 | + } |
|
| 1688 | + } |
|
| 1689 | + |
|
| 1690 | + #line 433 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1691 | + public function yy_r34() |
|
| 1692 | + { |
|
| 1693 | + if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) { |
|
| 1694 | + if ($this->security) { |
|
| 1695 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler); |
|
| 1696 | + } |
|
| 1697 | + $this->_retvalue = |
|
| 1698 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1699 | + array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1700 | + 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1701 | + } else { |
|
| 1702 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1703 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1704 | + array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1705 | + - 1 ]->minor)); |
|
| 1706 | + } |
|
| 1707 | + } |
|
| 1708 | + |
|
| 1709 | + #line 445 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1710 | + public function yy_r35() |
|
| 1711 | + { |
|
| 1712 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 1713 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1714 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1715 | + - 1 ]->minor)); |
|
| 1716 | + } |
|
| 1717 | + |
|
| 1718 | + #line 450 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1719 | + public function yy_r36() |
|
| 1720 | + { |
|
| 1721 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor, |
|
| 1722 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1723 | + array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1724 | + - 1 ]->minor, |
|
| 1725 | + 'object_method' => $this->yystack[ $this->yyidx + |
|
| 1726 | + - 2 ]->minor)); |
|
| 1727 | + } |
|
| 1728 | + |
|
| 1729 | + #line 455 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1730 | + public function yy_r37() |
|
| 1731 | + { |
|
| 1732 | + $this->_retvalue = $this->compiler->compileTag('make_nocache', array(array('var' => '\'' . |
|
| 1733 | + substr($this->yystack[ $this->yyidx + |
|
| 1734 | + 0 ]->minor, |
|
| 1735 | + 1) . '\''))); |
|
| 1736 | + } |
|
| 1737 | + |
|
| 1738 | + #line 460 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1739 | + public function yy_r38() |
|
| 1740 | + { |
|
| 1741 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1742 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1743 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1744 | + 0 ]->minor)); |
|
| 1745 | + } |
|
| 1746 | + |
|
| 1747 | + #line 465 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1748 | + public function yy_r39() |
|
| 1749 | + { |
|
| 1750 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length)); |
|
| 1751 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, |
|
| 1752 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1753 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1754 | + - 1 ]->minor)); |
|
| 1755 | + } |
|
| 1756 | + |
|
| 1757 | + #line 470 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1758 | + public function yy_r40() |
|
| 1759 | + { |
|
| 1760 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1761 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1762 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1763 | + 0 ]->minor)); |
|
| 1764 | + } |
|
| 1765 | + |
|
| 1766 | + #line 481 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1767 | + public function yy_r42() |
|
| 1768 | + { |
|
| 1769 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1770 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1771 | + - 6 ]->minor), |
|
| 1772 | + array('ifexp' => $this->yystack[ $this->yyidx + |
|
| 1773 | + - 4 ]->minor), |
|
| 1774 | + array('var' => $this->yystack[ $this->yyidx + |
|
| 1775 | + - 2 ]->minor), |
|
| 1776 | + array('step' => $this->yystack[ $this->yyidx + |
|
| 1777 | + - 1 ]->minor))), |
|
| 1778 | + 1); |
|
| 1779 | + } |
|
| 1780 | + |
|
| 1781 | + #line 485 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1782 | + public function yy_r43() |
|
| 1783 | + { |
|
| 1784 | + $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1785 | + } |
|
| 1786 | + |
|
| 1787 | + #line 493 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1788 | + public function yy_r45() |
|
| 1789 | + { |
|
| 1790 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1791 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1792 | + - 3 ]->minor), |
|
| 1793 | + array('to' => $this->yystack[ $this->yyidx + |
|
| 1794 | + - 1 ]->minor))), |
|
| 1795 | + 0); |
|
| 1796 | + } |
|
| 1797 | + |
|
| 1798 | + #line 497 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1799 | + public function yy_r46() |
|
| 1800 | + { |
|
| 1801 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1802 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1803 | + - 5 ]->minor), |
|
| 1804 | + array('to' => $this->yystack[ $this->yyidx + |
|
| 1805 | + - 3 ]->minor), |
|
| 1806 | + array('step' => $this->yystack[ $this->yyidx + |
|
| 1807 | + - 1 ]->minor))), |
|
| 1808 | + 0); |
|
| 1809 | + } |
|
| 1810 | + |
|
| 1811 | + #line 502 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1812 | + public function yy_r47() |
|
| 1813 | + { |
|
| 1814 | + $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1815 | + } |
|
| 1816 | + |
|
| 1817 | + #line 507 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1818 | + public function yy_r48() |
|
| 1819 | + { |
|
| 1820 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1821 | + array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1822 | + - 3 ]->minor), |
|
| 1823 | + array('item' => $this->yystack[ $this->yyidx + |
|
| 1824 | + - 1 ]->minor)))); |
|
| 1825 | + } |
|
| 1826 | + |
|
| 1827 | + #line 511 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1828 | + public function yy_r49() |
|
| 1829 | + { |
|
| 1830 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1831 | + array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1832 | + - 5 ]->minor), |
|
| 1833 | + array('item' => $this->yystack[ $this->yyidx + |
|
| 1834 | + - 1 ]->minor), |
|
| 1835 | + array('key' => $this->yystack[ $this->yyidx + |
|
| 1836 | + - 3 ]->minor)))); |
|
| 1837 | + } |
|
| 1838 | + |
|
| 1839 | + #line 524 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1840 | + public function yy_r52() |
|
| 1841 | + { |
|
| 1842 | + $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1843 | + array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1844 | + - 1 ]->minor), |
|
| 1845 | + $this->yystack[ $this->yyidx + |
|
| 1846 | + 0 ]->minor)))); |
|
| 1847 | + } |
|
| 1848 | + |
|
| 1849 | + #line 528 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1850 | + public function yy_r53() |
|
| 1851 | + { |
|
| 1852 | + $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1853 | + array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1854 | + - 2 ]->minor), |
|
| 1855 | + $this->yystack[ $this->yyidx + |
|
| 1856 | + - 1 ]->minor)), |
|
| 1857 | + $this->yystack[ $this->yyidx + |
|
| 1858 | + 0 ]->minor))); |
|
| 1859 | + } |
|
| 1860 | + |
|
| 1861 | + #line 533 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1862 | + public function yy_r54() |
|
| 1863 | + { |
|
| 1864 | + $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); |
|
| 1865 | + if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { |
|
| 1866 | + // {$smarty.block.child} |
|
| 1867 | + $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); |
|
| 1868 | + } else { |
|
| 1869 | + // {$smarty.block.parent} |
|
| 1870 | + $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler); |
|
| 1871 | + } |
|
| 1872 | + } |
|
| 1873 | + |
|
| 1874 | + #line 546 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1875 | + public function yy_r55() |
|
| 1876 | + { |
|
| 1877 | + $tag = |
|
| 1878 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1879 | + ' /'); |
|
| 1880 | + if ($tag == 'strip') { |
|
| 1881 | + $this->strip = false; |
|
| 1882 | + $this->_retvalue = null; |
|
| 1883 | + } else { |
|
| 1884 | + $this->_retvalue = $this->compiler->compileTag($tag . 'close', array()); |
|
| 1885 | + } |
|
| 1886 | + } |
|
| 1887 | + |
|
| 1888 | + #line 555 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1889 | + public function yy_r56() |
|
| 1890 | + { |
|
| 1891 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); |
|
| 1892 | + } |
|
| 1893 | + |
|
| 1894 | + #line 559 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1895 | + public function yy_r57() |
|
| 1896 | + { |
|
| 1897 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(), |
|
| 1898 | + array('modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1899 | + 0 ]->minor)); |
|
| 1900 | + } |
|
| 1901 | + |
|
| 1902 | + #line 564 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1903 | + public function yy_r58() |
|
| 1904 | + { |
|
| 1905 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(), |
|
| 1906 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1907 | + 0 ]->minor)); |
|
| 1908 | + } |
|
| 1909 | + |
|
| 1910 | + #line 568 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1911 | + public function yy_r59() |
|
| 1912 | + { |
|
| 1913 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(), |
|
| 1914 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1915 | + - 1 ]->minor, |
|
| 1916 | + 'modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1917 | + 0 ]->minor)); |
|
| 1918 | + } |
|
| 1919 | + |
|
| 1920 | + #line 576 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1921 | + public function yy_r60() |
|
| 1922 | + { |
|
| 1923 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1924 | + $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1925 | + } |
|
| 1926 | + |
|
| 1927 | + #line 582 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1928 | + public function yy_r61() |
|
| 1929 | + { |
|
| 1930 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1931 | + } |
|
| 1932 | + |
|
| 1933 | + #line 587 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1934 | + public function yy_r62() |
|
| 1935 | + { |
|
| 1936 | + $this->_retvalue = array(); |
|
| 1937 | + } |
|
| 1938 | + |
|
| 1939 | + #line 592 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1940 | + public function yy_r63() |
|
| 1941 | + { |
|
| 1942 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1943 | + if ($this->security) { |
|
| 1944 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1945 | + } |
|
| 1946 | + $this->_retvalue = |
|
| 1947 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1948 | + } else { |
|
| 1949 | + $this->_retvalue = |
|
| 1950 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 1951 | + '\''); |
|
| 1952 | + } |
|
| 1953 | + } |
|
| 1954 | + |
|
| 1955 | + #line 603 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1956 | + public function yy_r64() |
|
| 1957 | + { |
|
| 1958 | + $this->_retvalue = |
|
| 1959 | + array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + |
|
| 1960 | + 0 ]->minor); |
|
| 1961 | + } |
|
| 1962 | + |
|
| 1963 | + #line 611 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1964 | + public function yy_r66() |
|
| 1965 | + { |
|
| 1966 | + $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 1967 | + } |
|
| 1968 | + |
|
| 1969 | + #line 623 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1970 | + public function yy_r69() |
|
| 1971 | + { |
|
| 1972 | + $this->_retvalue = |
|
| 1973 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1974 | + } |
|
| 1975 | + |
|
| 1976 | + #line 636 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1977 | + public function yy_r71() |
|
| 1978 | + { |
|
| 1979 | + $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1980 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor; |
|
| 1981 | + } |
|
| 1982 | + |
|
| 1983 | + #line 641 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1984 | + public function yy_r72() |
|
| 1985 | + { |
|
| 1986 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'', |
|
| 1987 | + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1988 | + } |
|
| 1989 | + |
|
| 1990 | + #line 648 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1991 | + public function yy_r74() |
|
| 1992 | + { |
|
| 1993 | + $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1994 | + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1995 | + } |
|
| 1996 | + |
|
| 1997 | + #line 672 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1998 | + public function yy_r78() |
|
| 1999 | + { |
|
| 2000 | + $this->_retvalue = |
|
| 2001 | + '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' . |
|
| 2002 | + $this->yystack[ $this->yyidx + 0 ]->minor . '\')'; |
|
| 2003 | + } |
|
| 2004 | + |
|
| 2005 | + #line 677 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2006 | + public function yy_r79() |
|
| 2007 | + { |
|
| 2008 | + $this->_retvalue = |
|
| 2009 | + $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2010 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2011 | + } |
|
| 2012 | + |
|
| 2013 | + #line 691 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2014 | + public function yy_r82() |
|
| 2015 | + { |
|
| 2016 | + $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), |
|
| 2017 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2018 | + 'modifierlist' => $this->yystack[ $this->yyidx + |
|
| 2019 | + 0 ]->minor)); |
|
| 2020 | + } |
|
| 2021 | + |
|
| 2022 | + #line 697 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2023 | + public function yy_r83() |
|
| 2024 | + { |
|
| 2025 | + $this->_retvalue = |
|
| 2026 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2027 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] . $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2028 | + } |
|
| 2029 | + |
|
| 2030 | + #line 701 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2031 | + public function yy_r84() |
|
| 2032 | + { |
|
| 2033 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2034 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2035 | + } |
|
| 2036 | + |
|
| 2037 | + #line 705 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2038 | + public function yy_r85() |
|
| 2039 | + { |
|
| 2040 | + $this->_retvalue = |
|
| 2041 | + $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2042 | + } |
|
| 2043 | + |
|
| 2044 | + #line 709 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2045 | + public function yy_r86() |
|
| 2046 | + { |
|
| 2047 | + $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . |
|
| 2048 | + $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2049 | + } |
|
| 2050 | + |
|
| 2051 | + #line 713 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2052 | + public function yy_r87() |
|
| 2053 | + { |
|
| 2054 | + $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' . |
|
| 2055 | + $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2056 | + } |
|
| 2057 | + |
|
| 2058 | + #line 721 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2059 | + public function yy_r88() |
|
| 2060 | + { |
|
| 2061 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2062 | + substr($this->yystack[ $this->yyidx + |
|
| 2063 | + - 2 ]->minor, |
|
| 2064 | + 1) . |
|
| 2065 | + '\'') . |
|
| 2066 | + ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2067 | + } |
|
| 2068 | + |
|
| 2069 | + #line 725 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2070 | + public function yy_r89() |
|
| 2071 | + { |
|
| 2072 | + $this->_retvalue = |
|
| 2073 | + $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' . |
|
| 2074 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2075 | + } |
|
| 2076 | + |
|
| 2077 | + #line 740 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2078 | + public function yy_r92() |
|
| 2079 | + { |
|
| 2080 | + $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2081 | + } |
|
| 2082 | + |
|
| 2083 | + #line 761 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2084 | + public function yy_r97() |
|
| 2085 | + { |
|
| 2086 | + $this->_retvalue = |
|
| 2087 | + $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2088 | + } |
|
| 2089 | + |
|
| 2090 | + #line 765 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2091 | + public function yy_r98() |
|
| 2092 | + { |
|
| 2093 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.'; |
|
| 2094 | + } |
|
| 2095 | + |
|
| 2096 | + #line 769 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2097 | + public function yy_r99() |
|
| 2098 | + { |
|
| 2099 | + $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2100 | + } |
|
| 2101 | + |
|
| 2102 | + #line 774 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2103 | + public function yy_r100() |
|
| 2104 | + { |
|
| 2105 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 2106 | + if ($this->security) { |
|
| 2107 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 2108 | + } |
|
| 2109 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2110 | + } else { |
|
| 2111 | + $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 2112 | + } |
|
| 2113 | + } |
|
| 2114 | + |
|
| 2115 | + #line 791 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2116 | + public function yy_r102() |
|
| 2117 | + { |
|
| 2118 | + $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")"; |
|
| 2119 | + } |
|
| 2120 | + |
|
| 2121 | + #line 795 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2122 | + public function yy_r103() |
|
| 2123 | + { |
|
| 2124 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2125 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2126 | + } |
|
| 2127 | + |
|
| 2128 | + #line 813 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2129 | + public function yy_r107() |
|
| 2130 | + { |
|
| 2131 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2132 | + if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2133 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2134 | + $this->compiler->compileTag('private_special_variable', array(), |
|
| 2135 | + $this->yystack[ $this->yyidx + |
|
| 2136 | + - 2 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2137 | + ';?>'); |
|
| 2138 | + } else { |
|
| 2139 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2140 | + $this->compiler->compileVariable($this->yystack[ $this->yyidx + |
|
| 2141 | + - 2 ]->minor[ 'var' ]) . |
|
| 2142 | + $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . |
|
| 2143 | + ';?>'); |
|
| 2144 | + } |
|
| 2145 | + $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2146 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2147 | + } |
|
| 2148 | + |
|
| 2149 | + #line 824 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2150 | + public function yy_r108() |
|
| 2151 | + { |
|
| 2152 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2153 | + $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2154 | + $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>')); |
|
| 2155 | + $this->_retvalue = $prefixVar; |
|
| 2156 | + } |
|
| 2157 | + |
|
| 2158 | + #line 841 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2159 | + public function yy_r111() |
|
| 2160 | + { |
|
| 2161 | + if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) && |
|
| 2162 | + (!$this->security || |
|
| 2163 | + $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2164 | + $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler)) |
|
| 2165 | + ) { |
|
| 2166 | + if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) { |
|
| 2167 | + $this->_retvalue = |
|
| 2168 | + $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' . |
|
| 2169 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2170 | + } else { |
|
| 2171 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' . |
|
| 2172 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2173 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2174 | + } |
|
| 2175 | + } else { |
|
| 2176 | + $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2177 | + "' is undefined or not allowed by security setting"); |
|
| 2178 | + } |
|
| 2179 | + } |
|
| 2180 | + |
|
| 2181 | + #line 860 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2182 | + public function yy_r113() |
|
| 2183 | + { |
|
| 2184 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2185 | + } |
|
| 2186 | + |
|
| 2187 | + #line 871 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2188 | + public function yy_r114() |
|
| 2189 | + { |
|
| 2190 | + $this->_retvalue = |
|
| 2191 | + $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); |
|
| 2192 | + } |
|
| 2193 | + |
|
| 2194 | + #line 874 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2195 | + public function yy_r115() |
|
| 2196 | + { |
|
| 2197 | + if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2198 | + $smarty_var = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2199 | + $this->yystack[ $this->yyidx + |
|
| 2200 | + 0 ]->minor[ 'smarty_internal_index' ]); |
|
| 2201 | + $this->_retvalue = $smarty_var; |
|
| 2202 | + } else { |
|
| 2203 | + // used for array reset,next,prev,end,current |
|
| 2204 | + $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; |
|
| 2205 | + $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2206 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . |
|
| 2207 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2208 | + } |
|
| 2209 | + } |
|
| 2210 | + |
|
| 2211 | + #line 887 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2212 | + public function yy_r116() |
|
| 2213 | + { |
|
| 2214 | + $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' . |
|
| 2215 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2216 | + } |
|
| 2217 | + |
|
| 2218 | + #line 897 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2219 | + public function yy_r118() |
|
| 2220 | + { |
|
| 2221 | + $this->_retvalue = |
|
| 2222 | + $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'"); |
|
| 2223 | + } |
|
| 2224 | + |
|
| 2225 | + #line 901 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2226 | + public function yy_r119() |
|
| 2227 | + { |
|
| 2228 | + $this->_retvalue = '(is_array($tmp = ' . |
|
| 2229 | + $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2230 | + "'") . ') ? $tmp' . |
|
| 2231 | + $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)'; |
|
| 2232 | + } |
|
| 2233 | + |
|
| 2234 | + #line 905 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2235 | + public function yy_r120() |
|
| 2236 | + { |
|
| 2237 | + $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2238 | + } |
|
| 2239 | + |
|
| 2240 | + #line 909 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2241 | + public function yy_r121() |
|
| 2242 | + { |
|
| 2243 | + $this->_retvalue = |
|
| 2244 | + '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . |
|
| 2245 | + ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)'; |
|
| 2246 | + } |
|
| 2247 | + |
|
| 2248 | + #line 913 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2249 | + public function yy_r122() |
|
| 2250 | + { |
|
| 2251 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'', |
|
| 2252 | + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2253 | + } |
|
| 2254 | + |
|
| 2255 | + #line 916 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2256 | + public function yy_r123() |
|
| 2257 | + { |
|
| 2258 | + $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2259 | + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2260 | + } |
|
| 2261 | + |
|
| 2262 | + #line 929 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2263 | + public function yy_r125() |
|
| 2264 | + { |
|
| 2265 | + return; |
|
| 2266 | + } |
|
| 2267 | + |
|
| 2268 | + #line 935 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2269 | + public function yy_r126() |
|
| 2270 | + { |
|
| 2271 | + $this->_retvalue = |
|
| 2272 | + '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . |
|
| 2273 | + ']'; |
|
| 2274 | + } |
|
| 2275 | + |
|
| 2276 | + #line 938 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2277 | + public function yy_r127() |
|
| 2278 | + { |
|
| 2279 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; |
|
| 2280 | + } |
|
| 2281 | + |
|
| 2282 | + #line 942 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2283 | + public function yy_r128() |
|
| 2284 | + { |
|
| 2285 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' . |
|
| 2286 | + $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2287 | + } |
|
| 2288 | + |
|
| 2289 | + #line 946 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2290 | + public function yy_r129() |
|
| 2291 | + { |
|
| 2292 | + $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']"; |
|
| 2293 | + } |
|
| 2294 | + |
|
| 2295 | + #line 950 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2296 | + public function yy_r130() |
|
| 2297 | + { |
|
| 2298 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2299 | + } |
|
| 2300 | + |
|
| 2301 | + #line 955 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2302 | + public function yy_r131() |
|
| 2303 | + { |
|
| 2304 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2305 | + } |
|
| 2306 | + |
|
| 2307 | + #line 960 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2308 | + public function yy_r132() |
|
| 2309 | + { |
|
| 2310 | + $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2311 | + $this->yystack[ $this->yyidx + |
|
| 2312 | + - 1 ]->minor . |
|
| 2313 | + '\'][\'index\']') . |
|
| 2314 | + ']'; |
|
| 2315 | + } |
|
| 2316 | + |
|
| 2317 | + #line 964 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2318 | + public function yy_r133() |
|
| 2319 | + { |
|
| 2320 | + $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2321 | + $this->yystack[ $this->yyidx + |
|
| 2322 | + - 3 ]->minor . |
|
| 2323 | + '\'][\'' . |
|
| 2324 | + $this->yystack[ $this->yyidx + |
|
| 2325 | + - 1 ]->minor . |
|
| 2326 | + '\']') . ']'; |
|
| 2327 | + } |
|
| 2328 | + |
|
| 2329 | + #line 967 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2330 | + public function yy_r134() |
|
| 2331 | + { |
|
| 2332 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2333 | + } |
|
| 2334 | + |
|
| 2335 | + #line 973 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2336 | + public function yy_r136() |
|
| 2337 | + { |
|
| 2338 | + $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . |
|
| 2339 | + substr($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2340 | + 1) . '\'') . ']';; |
|
| 2341 | + } |
|
| 2342 | + |
|
| 2343 | + #line 989 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2344 | + public function yy_r140() |
|
| 2345 | + { |
|
| 2346 | + $this->_retvalue = '[]'; |
|
| 2347 | + } |
|
| 2348 | + |
|
| 2349 | + #line 999 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2350 | + public function yy_r141() |
|
| 2351 | + { |
|
| 2352 | + $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; |
|
| 2353 | + } |
|
| 2354 | + |
|
| 2355 | + #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2356 | + public function yy_r142() |
|
| 2357 | + { |
|
| 2358 | + $this->_retvalue = "''"; |
|
| 2359 | + } |
|
| 2360 | + |
|
| 2361 | + #line 1008 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2362 | + public function yy_r143() |
|
| 2363 | + { |
|
| 2364 | + $this->_retvalue = |
|
| 2365 | + $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2366 | + } |
|
| 2367 | + |
|
| 2368 | + #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2369 | + public function yy_r145() |
|
| 2370 | + { |
|
| 2371 | + $var = |
|
| 2372 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2373 | + ' $'); |
|
| 2374 | + $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); |
|
| 2375 | + } |
|
| 2376 | + |
|
| 2377 | + #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2378 | + public function yy_r146() |
|
| 2379 | + { |
|
| 2380 | + $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2381 | + } |
|
| 2382 | + |
|
| 2383 | + #line 1029 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2384 | + public function yy_r147() |
|
| 2385 | + { |
|
| 2386 | + if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2387 | + $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2388 | + $this->yystack[ $this->yyidx + |
|
| 2389 | + - 1 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2390 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2391 | + } else { |
|
| 2392 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) . |
|
| 2393 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] . |
|
| 2394 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2395 | + } |
|
| 2396 | + } |
|
| 2397 | + |
|
| 2398 | + #line 1038 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2399 | + public function yy_r148() |
|
| 2400 | + { |
|
| 2401 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2402 | + } |
|
| 2403 | + |
|
| 2404 | + #line 1043 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2405 | + public function yy_r149() |
|
| 2406 | + { |
|
| 2407 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2408 | + } |
|
| 2409 | + |
|
| 2410 | + #line 1048 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2411 | + public function yy_r150() |
|
| 2412 | + { |
|
| 2413 | + if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') { |
|
| 2414 | + $this->compiler->trigger_template_error(self::Err1); |
|
| 2415 | + } |
|
| 2416 | + $this->_retvalue = |
|
| 2417 | + '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2418 | + } |
|
| 2419 | + |
|
| 2420 | + #line 1055 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2421 | + public function yy_r151() |
|
| 2422 | + { |
|
| 2423 | + if ($this->security) { |
|
| 2424 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2425 | + } |
|
| 2426 | + $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2427 | + $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2428 | + } |
|
| 2429 | + |
|
| 2430 | + #line 1062 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2431 | + public function yy_r152() |
|
| 2432 | + { |
|
| 2433 | + if ($this->security) { |
|
| 2434 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2435 | + } |
|
| 2436 | + $this->_retvalue = |
|
| 2437 | + '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2438 | + } |
|
| 2439 | + |
|
| 2440 | + #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2441 | + public function yy_r153() |
|
| 2442 | + { |
|
| 2443 | + if ($this->security) { |
|
| 2444 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2445 | + } |
|
| 2446 | + $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' . |
|
| 2447 | + $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 2448 | + '}'; |
|
| 2449 | + } |
|
| 2450 | + |
|
| 2451 | + #line 1077 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2452 | + public function yy_r154() |
|
| 2453 | + { |
|
| 2454 | + $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2455 | + } |
|
| 2456 | + |
|
| 2457 | + #line 1085 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2458 | + public function yy_r155() |
|
| 2459 | + { |
|
| 2460 | + if (!$this->security || |
|
| 2461 | + $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler) |
|
| 2462 | + ) { |
|
| 2463 | + if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 || |
|
| 2464 | + strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 || |
|
| 2465 | + strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 || |
|
| 2466 | + is_callable($this->yystack[ $this->yyidx + - 3 ]->minor) |
|
| 2467 | + ) { |
|
| 2468 | + $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor); |
|
| 2469 | + if ($func_name == 'isset') { |
|
| 2470 | + if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) { |
|
| 2471 | + $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"'); |
|
| 2472 | + } |
|
| 2473 | + $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2474 | + if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', |
|
| 2475 | + strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0 |
|
| 2476 | + ) { |
|
| 2477 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2478 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . |
|
| 2479 | + str_replace(')', ', false)', $par) . ';?>'); |
|
| 2480 | + $isset_par = $prefixVar; |
|
| 2481 | + } else { |
|
| 2482 | + $isset_par = str_replace("')->value", "',null,true,false)->value", $par); |
|
| 2483 | + } |
|
| 2484 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")"; |
|
| 2485 | + } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) { |
|
| 2486 | + if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) { |
|
| 2487 | + $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"'); |
|
| 2488 | + } |
|
| 2489 | + if ($func_name == 'empty') { |
|
| 2490 | + $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", |
|
| 2491 | + $this->yystack[ $this->yyidx + |
|
| 2492 | + - 1 ]->minor[ 0 ]) . ')'; |
|
| 2493 | + } else { |
|
| 2494 | + $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')'; |
|
| 2495 | + } |
|
| 2496 | + } else { |
|
| 2497 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2498 | + implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2499 | + } |
|
| 2500 | + } else { |
|
| 2501 | + $this->compiler->trigger_template_error("unknown function \"" . |
|
| 2502 | + $this->yystack[ $this->yyidx + - 3 ]->minor . "\""); |
|
| 2503 | + } |
|
| 2504 | + } |
|
| 2505 | + } |
|
| 2506 | + |
|
| 2507 | + #line 1124 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2508 | + public function yy_r156() |
|
| 2509 | + { |
|
| 2510 | + if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') { |
|
| 2511 | + $this->compiler->trigger_template_error(self::Err1); |
|
| 2512 | + } |
|
| 2513 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2514 | + implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2515 | + } |
|
| 2516 | + |
|
| 2517 | + #line 1131 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2518 | + public function yy_r157() |
|
| 2519 | + { |
|
| 2520 | + if ($this->security) { |
|
| 2521 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2522 | + } |
|
| 2523 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2524 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . |
|
| 2525 | + substr($this->yystack[ $this->yyidx + |
|
| 2526 | + - 3 ]->minor, |
|
| 2527 | + 1) . |
|
| 2528 | + '\'') . ';?>'); |
|
| 2529 | + $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')'; |
|
| 2530 | + } |
|
| 2531 | + |
|
| 2532 | + #line 1142 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2533 | + public function yy_r158() |
|
| 2534 | + { |
|
| 2535 | + $this->_retvalue = |
|
| 2536 | + array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2537 | + } |
|
| 2538 | + |
|
| 2539 | + #line 1159 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2540 | + public function yy_r161() |
|
| 2541 | + { |
|
| 2542 | + $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2543 | + array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2544 | + $this->yystack[ $this->yyidx + 0 ]->minor))); |
|
| 2545 | + } |
|
| 2546 | + |
|
| 2547 | + #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2548 | + public function yy_r162() |
|
| 2549 | + { |
|
| 2550 | + $this->_retvalue = |
|
| 2551 | + array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2552 | + } |
|
| 2553 | + |
|
| 2554 | + #line 1171 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2555 | + public function yy_r164() |
|
| 2556 | + { |
|
| 2557 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2558 | + } |
|
| 2559 | + |
|
| 2560 | + #line 1179 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2561 | + public function yy_r165() |
|
| 2562 | + { |
|
| 2563 | + $this->_retvalue = |
|
| 2564 | + array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2565 | + } |
|
| 2566 | + |
|
| 2567 | + #line 1198 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2568 | + public function yy_r169() |
|
| 2569 | + { |
|
| 2570 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); |
|
| 2571 | + } |
|
| 2572 | + |
|
| 2573 | + #line 1203 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2574 | + public function yy_r170() |
|
| 2575 | + { |
|
| 2576 | + $this->_retvalue = |
|
| 2577 | + array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); |
|
| 2578 | + } |
|
| 2579 | + |
|
| 2580 | + #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2581 | + public function yy_r171() |
|
| 2582 | + { |
|
| 2583 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); |
|
| 2584 | + } |
|
| 2585 | + |
|
| 2586 | + #line 1213 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2587 | + public function yy_r172() |
|
| 2588 | + { |
|
| 2589 | + $this->_retvalue = |
|
| 2590 | + array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2591 | + } |
|
| 2592 | + |
|
| 2593 | + #line 1218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2594 | + public function yy_r173() |
|
| 2595 | + { |
|
| 2596 | + $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2597 | + $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2598 | + $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2599 | + } |
|
| 2600 | + |
|
| 2601 | + #line 1224 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2602 | + public function yy_r174() |
|
| 2603 | + { |
|
| 2604 | + $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; |
|
| 2605 | + } |
|
| 2606 | + |
|
| 2607 | + #line 1228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2608 | + public function yy_r175() |
|
| 2609 | + { |
|
| 2610 | + static $lops = |
|
| 2611 | + array('eq' => ' == ', 'ne' => ' != ', 'neq' => ' != ', 'gt' => ' > ', 'ge' => ' >= ', 'gte' => ' >= ', |
|
| 2612 | + 'lt' => ' < ', 'le' => ' <= ', 'lte' => ' <= ', 'mod' => ' % ', 'and' => ' && ', 'or' => ' || ', |
|
| 2613 | + 'xor' => ' xor ',); |
|
| 2614 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2615 | + $this->_retvalue = $lops[ $op ]; |
|
| 2616 | + } |
|
| 2617 | + |
|
| 2618 | + #line 1247 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2619 | + public function yy_r176() |
|
| 2620 | + { |
|
| 2621 | + static $tlops = |
|
| 2622 | + array('isdivby' => array('op' => ' % ', 'pre' => '!('), 'isnotdivby' => array('op' => ' % ', 'pre' => '('), |
|
| 2623 | + 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), |
|
| 2624 | + 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2625 | + 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2626 | + 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),); |
|
| 2627 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2628 | + $this->_retvalue = $tlops[ $op ]; |
|
| 2629 | + } |
|
| 2630 | + |
|
| 2631 | + #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2632 | + public function yy_r177() |
|
| 2633 | + { |
|
| 2634 | + static $scond = |
|
| 2635 | + array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); |
|
| 2636 | + $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2637 | + $this->_retvalue = $scond[ $op ]; |
|
| 2638 | + } |
|
| 2639 | + |
|
| 2640 | + #line 1274 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2641 | + public function yy_r178() |
|
| 2642 | + { |
|
| 2643 | + $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2644 | + } |
|
| 2645 | + |
|
| 2646 | + #line 1282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2647 | + public function yy_r180() |
|
| 2648 | + { |
|
| 2649 | + $this->_retvalue = |
|
| 2650 | + $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2651 | + } |
|
| 2652 | + |
|
| 2653 | + #line 1290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2654 | + public function yy_r182() |
|
| 2655 | + { |
|
| 2656 | + $this->_retvalue = |
|
| 2657 | + $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2658 | + } |
|
| 2659 | + |
|
| 2660 | + #line 1294 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2661 | + public function yy_r183() |
|
| 2662 | + { |
|
| 2663 | + $this->_retvalue = |
|
| 2664 | + '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2665 | + } |
|
| 2666 | + |
|
| 2667 | + #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2668 | + public function yy_r186() |
|
| 2669 | + { |
|
| 2670 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this); |
|
| 2671 | + } |
|
| 2672 | + |
|
| 2673 | + #line 1315 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2674 | + public function yy_r187() |
|
| 2675 | + { |
|
| 2676 | + $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2677 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 2678 | + } |
|
| 2679 | + |
|
| 2680 | + #line 1320 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2681 | + public function yy_r188() |
|
| 2682 | + { |
|
| 2683 | + $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2684 | + } |
|
| 2685 | + |
|
| 2686 | + #line 1324 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2687 | + public function yy_r189() |
|
| 2688 | + { |
|
| 2689 | + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2690 | + } |
|
| 2691 | + |
|
| 2692 | + #line 1332 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2693 | + public function yy_r191() |
|
| 2694 | + { |
|
| 2695 | + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . |
|
| 2696 | + substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . |
|
| 2697 | + '\']->value'); |
|
| 2698 | + } |
|
| 2699 | + |
|
| 2700 | + #line 1340 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2701 | + public function yy_r193() |
|
| 2702 | + { |
|
| 2703 | + $this->_retvalue = |
|
| 2704 | + new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'); |
|
| 2705 | + } |
|
| 2706 | + |
|
| 2707 | + #line 1344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2708 | + public function yy_r194() |
|
| 2709 | + { |
|
| 2710 | + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2711 | + } |
|
| 2712 | + |
|
| 2713 | + #line 1348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2714 | + public function yy_r195() |
|
| 2715 | + { |
|
| 2716 | + $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2717 | + } |
|
| 2718 | + |
|
| 2719 | + private $_retvalue; |
|
| 2720 | + |
|
| 2721 | + public function yy_reduce($yyruleno) |
|
| 2722 | + { |
|
| 2723 | 2723 | $countYyRuleName = count(self::$yyRuleName) |
| 2724 | - if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < $countYyRuleName) { |
|
| 2725 | - fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 2726 | - self::$yyRuleName[ $yyruleno ]); |
|
| 2727 | - } |
|
| 2728 | - |
|
| 2729 | - $this->_retvalue = $yy_lefthand_side = null; |
|
| 2730 | - if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 2731 | - // call the action |
|
| 2732 | - $this->_retvalue = null; |
|
| 2733 | - $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 2734 | - $yy_lefthand_side = $this->_retvalue; |
|
| 2735 | - } |
|
| 2736 | - $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 2737 | - $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 2738 | - $this->yyidx -= $yysize; |
|
| 2739 | - for ($i = $yysize; $i; $i --) { |
|
| 2740 | - // pop all of the right-hand side parameters |
|
| 2741 | - array_pop($this->yystack); |
|
| 2742 | - } |
|
| 2743 | - $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 2744 | - if ($yyact < self::YYNSTATE) { |
|
| 2745 | - if (!$this->yyTraceFILE && $yysize) { |
|
| 2746 | - $this->yyidx ++; |
|
| 2747 | - $x = new TP_yyStackEntry; |
|
| 2748 | - $x->stateno = $yyact; |
|
| 2749 | - $x->major = $yygoto; |
|
| 2750 | - $x->minor = $yy_lefthand_side; |
|
| 2751 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 2752 | - } else { |
|
| 2753 | - $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 2754 | - } |
|
| 2755 | - } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 2756 | - $this->yy_accept(); |
|
| 2757 | - } |
|
| 2758 | - } |
|
| 2759 | - |
|
| 2760 | - public function yy_parse_failed() |
|
| 2761 | - { |
|
| 2762 | - if ($this->yyTraceFILE) { |
|
| 2763 | - fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 2764 | - } |
|
| 2765 | - while ($this->yyidx >= 0) { |
|
| 2766 | - $this->yy_pop_parser_stack(); |
|
| 2767 | - } |
|
| 2768 | - } |
|
| 2769 | - |
|
| 2770 | - public function yy_syntax_error($yymajor, $TOKEN) |
|
| 2771 | - { |
|
| 2772 | - #line 200 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2773 | - |
|
| 2774 | - $this->internalError = true; |
|
| 2775 | - $this->yymajor = $yymajor; |
|
| 2776 | - $this->compiler->trigger_template_error(); |
|
| 2777 | - } |
|
| 2778 | - |
|
| 2779 | - public function yy_accept() |
|
| 2780 | - { |
|
| 2781 | - if ($this->yyTraceFILE) { |
|
| 2782 | - fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 2783 | - } |
|
| 2784 | - while ($this->yyidx >= 0) { |
|
| 2785 | - $this->yy_pop_parser_stack(); |
|
| 2786 | - } |
|
| 2787 | - #line 193 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2788 | - |
|
| 2789 | - $this->successful = !$this->internalError; |
|
| 2790 | - $this->internalError = false; |
|
| 2791 | - $this->retvalue = $this->_retvalue; |
|
| 2792 | - } |
|
| 2793 | - |
|
| 2794 | - public function doParse($yymajor, $yytokenvalue) |
|
| 2795 | - { |
|
| 2796 | - $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2797 | - |
|
| 2798 | - if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 2799 | - $this->yyidx = 0; |
|
| 2800 | - $this->yyerrcnt = - 1; |
|
| 2801 | - $x = new TP_yyStackEntry; |
|
| 2802 | - $x->stateno = 0; |
|
| 2803 | - $x->major = 0; |
|
| 2804 | - $this->yystack = array(); |
|
| 2805 | - $this->yystack[] = $x; |
|
| 2806 | - } |
|
| 2807 | - $yyendofinput = ($yymajor == 0); |
|
| 2808 | - |
|
| 2809 | - if ($this->yyTraceFILE) { |
|
| 2810 | - fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 2811 | - } |
|
| 2812 | - |
|
| 2813 | - do { |
|
| 2814 | - $yyact = $this->yy_find_shift_action($yymajor); |
|
| 2815 | - if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 2816 | - // force a syntax error |
|
| 2817 | - $yyact = self::YY_ERROR_ACTION; |
|
| 2818 | - } |
|
| 2819 | - if ($yyact < self::YYNSTATE) { |
|
| 2820 | - $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 2821 | - $this->yyerrcnt --; |
|
| 2822 | - if ($yyendofinput && $this->yyidx >= 0) { |
|
| 2823 | - $yymajor = 0; |
|
| 2824 | - } else { |
|
| 2825 | - $yymajor = self::YYNOCODE; |
|
| 2826 | - } |
|
| 2827 | - } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 2828 | - $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 2829 | - } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 2830 | - if ($this->yyTraceFILE) { |
|
| 2831 | - fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 2832 | - } |
|
| 2833 | - if (self::YYERRORSYMBOL) { |
|
| 2834 | - if ($this->yyerrcnt < 0) { |
|
| 2835 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2836 | - } |
|
| 2837 | - $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 2838 | - if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 2839 | - if ($this->yyTraceFILE) { |
|
| 2840 | - fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 2841 | - $this->yyTokenName[ $yymajor ]); |
|
| 2842 | - } |
|
| 2843 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2844 | - $yymajor = self::YYNOCODE; |
|
| 2845 | - } else { |
|
| 2846 | - while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 2847 | - ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 2848 | - $this->yy_pop_parser_stack(); |
|
| 2849 | - } |
|
| 2850 | - if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 2851 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2852 | - $this->yy_parse_failed(); |
|
| 2853 | - $yymajor = self::YYNOCODE; |
|
| 2854 | - } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 2855 | - $u2 = 0; |
|
| 2856 | - $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 2857 | - } |
|
| 2858 | - } |
|
| 2859 | - $this->yyerrcnt = 3; |
|
| 2860 | - $yyerrorhit = 1; |
|
| 2861 | - } else { |
|
| 2862 | - if ($this->yyerrcnt <= 0) { |
|
| 2863 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2864 | - } |
|
| 2865 | - $this->yyerrcnt = 3; |
|
| 2866 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2867 | - if ($yyendofinput) { |
|
| 2868 | - $this->yy_parse_failed(); |
|
| 2869 | - } |
|
| 2870 | - $yymajor = self::YYNOCODE; |
|
| 2871 | - } |
|
| 2872 | - } else { |
|
| 2873 | - $this->yy_accept(); |
|
| 2874 | - $yymajor = self::YYNOCODE; |
|
| 2875 | - } |
|
| 2876 | - } |
|
| 2877 | - while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 2878 | - } |
|
| 2724 | + if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < $countYyRuleName) { |
|
| 2725 | + fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 2726 | + self::$yyRuleName[ $yyruleno ]); |
|
| 2727 | + } |
|
| 2728 | + |
|
| 2729 | + $this->_retvalue = $yy_lefthand_side = null; |
|
| 2730 | + if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 2731 | + // call the action |
|
| 2732 | + $this->_retvalue = null; |
|
| 2733 | + $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 2734 | + $yy_lefthand_side = $this->_retvalue; |
|
| 2735 | + } |
|
| 2736 | + $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 2737 | + $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 2738 | + $this->yyidx -= $yysize; |
|
| 2739 | + for ($i = $yysize; $i; $i --) { |
|
| 2740 | + // pop all of the right-hand side parameters |
|
| 2741 | + array_pop($this->yystack); |
|
| 2742 | + } |
|
| 2743 | + $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 2744 | + if ($yyact < self::YYNSTATE) { |
|
| 2745 | + if (!$this->yyTraceFILE && $yysize) { |
|
| 2746 | + $this->yyidx ++; |
|
| 2747 | + $x = new TP_yyStackEntry; |
|
| 2748 | + $x->stateno = $yyact; |
|
| 2749 | + $x->major = $yygoto; |
|
| 2750 | + $x->minor = $yy_lefthand_side; |
|
| 2751 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 2752 | + } else { |
|
| 2753 | + $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 2754 | + } |
|
| 2755 | + } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 2756 | + $this->yy_accept(); |
|
| 2757 | + } |
|
| 2758 | + } |
|
| 2759 | + |
|
| 2760 | + public function yy_parse_failed() |
|
| 2761 | + { |
|
| 2762 | + if ($this->yyTraceFILE) { |
|
| 2763 | + fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 2764 | + } |
|
| 2765 | + while ($this->yyidx >= 0) { |
|
| 2766 | + $this->yy_pop_parser_stack(); |
|
| 2767 | + } |
|
| 2768 | + } |
|
| 2769 | + |
|
| 2770 | + public function yy_syntax_error($yymajor, $TOKEN) |
|
| 2771 | + { |
|
| 2772 | + #line 200 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2773 | + |
|
| 2774 | + $this->internalError = true; |
|
| 2775 | + $this->yymajor = $yymajor; |
|
| 2776 | + $this->compiler->trigger_template_error(); |
|
| 2777 | + } |
|
| 2778 | + |
|
| 2779 | + public function yy_accept() |
|
| 2780 | + { |
|
| 2781 | + if ($this->yyTraceFILE) { |
|
| 2782 | + fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 2783 | + } |
|
| 2784 | + while ($this->yyidx >= 0) { |
|
| 2785 | + $this->yy_pop_parser_stack(); |
|
| 2786 | + } |
|
| 2787 | + #line 193 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2788 | + |
|
| 2789 | + $this->successful = !$this->internalError; |
|
| 2790 | + $this->internalError = false; |
|
| 2791 | + $this->retvalue = $this->_retvalue; |
|
| 2792 | + } |
|
| 2793 | + |
|
| 2794 | + public function doParse($yymajor, $yytokenvalue) |
|
| 2795 | + { |
|
| 2796 | + $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2797 | + |
|
| 2798 | + if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 2799 | + $this->yyidx = 0; |
|
| 2800 | + $this->yyerrcnt = - 1; |
|
| 2801 | + $x = new TP_yyStackEntry; |
|
| 2802 | + $x->stateno = 0; |
|
| 2803 | + $x->major = 0; |
|
| 2804 | + $this->yystack = array(); |
|
| 2805 | + $this->yystack[] = $x; |
|
| 2806 | + } |
|
| 2807 | + $yyendofinput = ($yymajor == 0); |
|
| 2808 | + |
|
| 2809 | + if ($this->yyTraceFILE) { |
|
| 2810 | + fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 2811 | + } |
|
| 2812 | + |
|
| 2813 | + do { |
|
| 2814 | + $yyact = $this->yy_find_shift_action($yymajor); |
|
| 2815 | + if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 2816 | + // force a syntax error |
|
| 2817 | + $yyact = self::YY_ERROR_ACTION; |
|
| 2818 | + } |
|
| 2819 | + if ($yyact < self::YYNSTATE) { |
|
| 2820 | + $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 2821 | + $this->yyerrcnt --; |
|
| 2822 | + if ($yyendofinput && $this->yyidx >= 0) { |
|
| 2823 | + $yymajor = 0; |
|
| 2824 | + } else { |
|
| 2825 | + $yymajor = self::YYNOCODE; |
|
| 2826 | + } |
|
| 2827 | + } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 2828 | + $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 2829 | + } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 2830 | + if ($this->yyTraceFILE) { |
|
| 2831 | + fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 2832 | + } |
|
| 2833 | + if (self::YYERRORSYMBOL) { |
|
| 2834 | + if ($this->yyerrcnt < 0) { |
|
| 2835 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2836 | + } |
|
| 2837 | + $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 2838 | + if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 2839 | + if ($this->yyTraceFILE) { |
|
| 2840 | + fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 2841 | + $this->yyTokenName[ $yymajor ]); |
|
| 2842 | + } |
|
| 2843 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2844 | + $yymajor = self::YYNOCODE; |
|
| 2845 | + } else { |
|
| 2846 | + while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 2847 | + ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 2848 | + $this->yy_pop_parser_stack(); |
|
| 2849 | + } |
|
| 2850 | + if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 2851 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2852 | + $this->yy_parse_failed(); |
|
| 2853 | + $yymajor = self::YYNOCODE; |
|
| 2854 | + } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 2855 | + $u2 = 0; |
|
| 2856 | + $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 2857 | + } |
|
| 2858 | + } |
|
| 2859 | + $this->yyerrcnt = 3; |
|
| 2860 | + $yyerrorhit = 1; |
|
| 2861 | + } else { |
|
| 2862 | + if ($this->yyerrcnt <= 0) { |
|
| 2863 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2864 | + } |
|
| 2865 | + $this->yyerrcnt = 3; |
|
| 2866 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2867 | + if ($yyendofinput) { |
|
| 2868 | + $this->yy_parse_failed(); |
|
| 2869 | + } |
|
| 2870 | + $yymajor = self::YYNOCODE; |
|
| 2871 | + } |
|
| 2872 | + } else { |
|
| 2873 | + $this->yy_accept(); |
|
| 2874 | + $yymajor = self::YYNOCODE; |
|
| 2875 | + } |
|
| 2876 | + } |
|
| 2877 | + while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 2878 | + } |
|
| 2879 | 2879 | } |
| 2880 | 2880 | |
@@ -2,75 +2,75 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | class TPC_yyToken implements ArrayAccess |
| 4 | 4 | { |
| 5 | - public $string = ''; |
|
| 6 | - |
|
| 7 | - public $metadata = array(); |
|
| 8 | - |
|
| 9 | - public function __construct($s, $m = array()) |
|
| 10 | - { |
|
| 11 | - if ($s instanceof TPC_yyToken) { |
|
| 12 | - $this->string = $s->string; |
|
| 13 | - $this->metadata = $s->metadata; |
|
| 14 | - } else { |
|
| 15 | - $this->string = (string) $s; |
|
| 16 | - if ($m instanceof TPC_yyToken) { |
|
| 17 | - $this->metadata = $m->metadata; |
|
| 18 | - } elseif (is_array($m)) { |
|
| 19 | - $this->metadata = $m; |
|
| 20 | - } |
|
| 21 | - } |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - public function __toString() |
|
| 25 | - { |
|
| 26 | - return $this->string; |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function offsetExists($offset) |
|
| 30 | - { |
|
| 31 | - return isset($this->metadata[ $offset ]); |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - public function offsetGet($offset) |
|
| 35 | - { |
|
| 36 | - return $this->metadata[ $offset ]; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - public function offsetSet($offset, $value) |
|
| 40 | - { |
|
| 41 | - if ($offset === null) { |
|
| 42 | - if (isset($value[ 0 ])) { |
|
| 43 | - $x = ($value instanceof TPC_yyToken) ? $value->metadata : $value; |
|
| 44 | - $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | - |
|
| 46 | - return; |
|
| 47 | - } |
|
| 48 | - $offset = count($this->metadata); |
|
| 49 | - } |
|
| 50 | - if ($value === null) { |
|
| 51 | - return; |
|
| 52 | - } |
|
| 53 | - if ($value instanceof TPC_yyToken) { |
|
| 54 | - if ($value->metadata) { |
|
| 55 | - $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | - } |
|
| 57 | - } elseif ($value) { |
|
| 58 | - $this->metadata[ $offset ] = $value; |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - public function offsetUnset($offset) |
|
| 63 | - { |
|
| 64 | - unset($this->metadata[ $offset ]); |
|
| 65 | - } |
|
| 5 | + public $string = ''; |
|
| 6 | + |
|
| 7 | + public $metadata = array(); |
|
| 8 | + |
|
| 9 | + public function __construct($s, $m = array()) |
|
| 10 | + { |
|
| 11 | + if ($s instanceof TPC_yyToken) { |
|
| 12 | + $this->string = $s->string; |
|
| 13 | + $this->metadata = $s->metadata; |
|
| 14 | + } else { |
|
| 15 | + $this->string = (string) $s; |
|
| 16 | + if ($m instanceof TPC_yyToken) { |
|
| 17 | + $this->metadata = $m->metadata; |
|
| 18 | + } elseif (is_array($m)) { |
|
| 19 | + $this->metadata = $m; |
|
| 20 | + } |
|
| 21 | + } |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public function __toString() |
|
| 25 | + { |
|
| 26 | + return $this->string; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function offsetExists($offset) |
|
| 30 | + { |
|
| 31 | + return isset($this->metadata[ $offset ]); |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + public function offsetGet($offset) |
|
| 35 | + { |
|
| 36 | + return $this->metadata[ $offset ]; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + public function offsetSet($offset, $value) |
|
| 40 | + { |
|
| 41 | + if ($offset === null) { |
|
| 42 | + if (isset($value[ 0 ])) { |
|
| 43 | + $x = ($value instanceof TPC_yyToken) ? $value->metadata : $value; |
|
| 44 | + $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | + |
|
| 46 | + return; |
|
| 47 | + } |
|
| 48 | + $offset = count($this->metadata); |
|
| 49 | + } |
|
| 50 | + if ($value === null) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 53 | + if ($value instanceof TPC_yyToken) { |
|
| 54 | + if ($value->metadata) { |
|
| 55 | + $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | + } |
|
| 57 | + } elseif ($value) { |
|
| 58 | + $this->metadata[ $offset ] = $value; |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + public function offsetUnset($offset) |
|
| 63 | + { |
|
| 64 | + unset($this->metadata[ $offset ]); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | class TPC_yyStackEntry |
| 69 | 69 | { |
| 70 | - public $stateno; /* The state-number */ |
|
| 71 | - public $major; /* The major token value. This is the code |
|
| 70 | + public $stateno; /* The state-number */ |
|
| 71 | + public $major; /* The major token value. This is the code |
|
| 72 | 72 | ** number for the token at this stack level */ |
| 73 | - public $minor; /* The user-supplied minor token value. This |
|
| 73 | + public $minor; /* The user-supplied minor token value. This |
|
| 74 | 74 | ** is the value of the token */ |
| 75 | 75 | } |
| 76 | 76 | |
@@ -90,952 +90,952 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | class Smarty_Internal_Configfileparser |
| 92 | 92 | { |
| 93 | - #line 25 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 94 | - |
|
| 95 | - /** |
|
| 96 | - * result status |
|
| 97 | - * |
|
| 98 | - * @var bool |
|
| 99 | - */ |
|
| 100 | - public $successful = true; |
|
| 101 | - |
|
| 102 | - /** |
|
| 103 | - * return value |
|
| 104 | - * |
|
| 105 | - * @var mixed |
|
| 106 | - */ |
|
| 107 | - public $retvalue = 0; |
|
| 108 | - |
|
| 109 | - /** |
|
| 110 | - * @var |
|
| 111 | - */ |
|
| 112 | - public $yymajor; |
|
| 113 | - |
|
| 114 | - /** |
|
| 115 | - * lexer object |
|
| 116 | - * |
|
| 117 | - * @var Smarty_Internal_Configfilelexer |
|
| 118 | - */ |
|
| 119 | - private $lex; |
|
| 120 | - |
|
| 121 | - /** |
|
| 122 | - * internal error flag |
|
| 123 | - * |
|
| 124 | - * @var bool |
|
| 125 | - */ |
|
| 126 | - private $internalError = false; |
|
| 127 | - |
|
| 128 | - /** |
|
| 129 | - * compiler object |
|
| 130 | - * |
|
| 131 | - * @var Smarty_Internal_Config_File_Compiler |
|
| 132 | - */ |
|
| 133 | - public $compiler = null; |
|
| 134 | - |
|
| 135 | - /** |
|
| 136 | - * smarty object |
|
| 137 | - * |
|
| 138 | - * @var Smarty |
|
| 139 | - */ |
|
| 140 | - public $smarty = null; |
|
| 141 | - |
|
| 142 | - /** |
|
| 143 | - * copy of config_overwrite property |
|
| 144 | - * |
|
| 145 | - * @var bool |
|
| 146 | - */ |
|
| 147 | - private $configOverwrite = false; |
|
| 148 | - |
|
| 149 | - /** |
|
| 150 | - * copy of config_read_hidden property |
|
| 151 | - * |
|
| 152 | - * @var bool |
|
| 153 | - */ |
|
| 154 | - private $configReadHidden = false; |
|
| 155 | - |
|
| 156 | - /** |
|
| 157 | - * helper map |
|
| 158 | - * |
|
| 159 | - * @var array |
|
| 160 | - */ |
|
| 161 | - private static $escapes_single = Array('\\' => '\\', '\'' => '\''); |
|
| 162 | - |
|
| 163 | - /** |
|
| 164 | - * constructor |
|
| 165 | - * |
|
| 166 | - * @param Smarty_Internal_Configfilelexer $lex |
|
| 167 | - * @param Smarty_Internal_Config_File_Compiler $compiler |
|
| 168 | - */ |
|
| 169 | - public function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler) |
|
| 170 | - { |
|
| 171 | - // set instance object |
|
| 172 | - self::instance($this); |
|
| 173 | - $this->lex = $lex; |
|
| 174 | - $this->smarty = $compiler->smarty; |
|
| 175 | - $this->compiler = $compiler; |
|
| 176 | - $this->configOverwrite = $this->smarty->config_overwrite; |
|
| 177 | - $this->configReadHidden = $this->smarty->config_read_hidden; |
|
| 178 | - } |
|
| 179 | - |
|
| 180 | - /** |
|
| 181 | - * @param null $new_instance |
|
| 182 | - * |
|
| 183 | - * @return null |
|
| 184 | - */ |
|
| 185 | - public static function &instance($new_instance = null) |
|
| 186 | - { |
|
| 187 | - static $instance = null; |
|
| 188 | - if (isset($new_instance) && is_object($new_instance)) { |
|
| 189 | - $instance = $new_instance; |
|
| 190 | - } |
|
| 191 | - return $instance; |
|
| 192 | - } |
|
| 193 | - |
|
| 194 | - /** |
|
| 195 | - * parse optional boolean keywords |
|
| 196 | - * |
|
| 197 | - * @param string $str |
|
| 198 | - * |
|
| 199 | - * @return bool |
|
| 200 | - */ |
|
| 201 | - private function parse_bool($str) |
|
| 202 | - { |
|
| 203 | - $str = strtolower($str); |
|
| 204 | - if (in_array($str, array('on', 'yes', 'true'))) { |
|
| 205 | - $res = true; |
|
| 206 | - } else { |
|
| 207 | - $res = false; |
|
| 208 | - } |
|
| 209 | - return $res; |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - /** |
|
| 213 | - * parse single quoted string |
|
| 214 | - * remove outer quotes |
|
| 215 | - * unescape inner quotes |
|
| 216 | - * |
|
| 217 | - * @param string $qstr |
|
| 218 | - * |
|
| 219 | - * @return string |
|
| 220 | - */ |
|
| 221 | - private static function parse_single_quoted_string($qstr) |
|
| 222 | - { |
|
| 223 | - $escaped_string = substr($qstr, 1, strlen($qstr) - 2); //remove outer quotes |
|
| 224 | - |
|
| 225 | - $ss = preg_split('/(\\\\.)/', $escaped_string, - 1, PREG_SPLIT_DELIM_CAPTURE); |
|
| 226 | - |
|
| 227 | - $str = ""; |
|
| 228 | - foreach ($ss as $s) { |
|
| 229 | - if (strlen($s) === 2 && $s[ 0 ] === '\\') { |
|
| 230 | - if (isset(self::$escapes_single[ $s[ 1 ] ])) { |
|
| 231 | - $s = self::$escapes_single[ $s[ 1 ] ]; |
|
| 232 | - } |
|
| 233 | - } |
|
| 234 | - $str .= $s; |
|
| 235 | - } |
|
| 236 | - return $str; |
|
| 237 | - } |
|
| 238 | - |
|
| 239 | - /** |
|
| 240 | - * parse double quoted string |
|
| 241 | - * |
|
| 242 | - * @param string $qstr |
|
| 243 | - * |
|
| 244 | - * @return string |
|
| 245 | - */ |
|
| 246 | - private static function parse_double_quoted_string($qstr) |
|
| 247 | - { |
|
| 248 | - $inner_str = substr($qstr, 1, strlen($qstr) - 2); |
|
| 249 | - return stripcslashes($inner_str); |
|
| 250 | - } |
|
| 251 | - |
|
| 252 | - /** |
|
| 253 | - * parse triple quoted string |
|
| 254 | - * |
|
| 255 | - * @param string $qstr |
|
| 256 | - * |
|
| 257 | - * @return string |
|
| 258 | - */ |
|
| 259 | - private static function parse_tripple_double_quoted_string($qstr) |
|
| 260 | - { |
|
| 261 | - return stripcslashes($qstr); |
|
| 262 | - } |
|
| 263 | - |
|
| 264 | - /** |
|
| 265 | - * set a config variable in target array |
|
| 266 | - * |
|
| 267 | - * @param array $var |
|
| 268 | - * @param array $target_array |
|
| 269 | - */ |
|
| 270 | - private function set_var(Array $var, Array &$target_array) |
|
| 271 | - { |
|
| 272 | - $key = $var[ "key" ]; |
|
| 273 | - $value = $var[ "value" ]; |
|
| 274 | - |
|
| 275 | - if ($this->configOverwrite || !isset($target_array[ 'vars' ][ $key ])) { |
|
| 276 | - $target_array[ 'vars' ][ $key ] = $value; |
|
| 277 | - } else { |
|
| 278 | - settype($target_array[ 'vars' ][ $key ], 'array'); |
|
| 279 | - $target_array[ 'vars' ][ $key ][] = $value; |
|
| 280 | - } |
|
| 281 | - } |
|
| 282 | - |
|
| 283 | - /** |
|
| 284 | - * add config variable to global vars |
|
| 285 | - * |
|
| 286 | - * @param array $vars |
|
| 287 | - */ |
|
| 288 | - private function add_global_vars(Array $vars) |
|
| 289 | - { |
|
| 290 | - if (!isset($this->compiler->config_data[ 'vars' ])) { |
|
| 291 | - $this->compiler->config_data[ 'vars' ] = Array(); |
|
| 292 | - } |
|
| 293 | - foreach ($vars as $var) { |
|
| 294 | - $this->set_var($var, $this->compiler->config_data); |
|
| 295 | - } |
|
| 296 | - } |
|
| 297 | - |
|
| 298 | - /** |
|
| 299 | - * add config variable to section |
|
| 300 | - * |
|
| 301 | - * @param string $section_name |
|
| 302 | - * @param array $vars |
|
| 303 | - */ |
|
| 304 | - private function add_section_vars($section_name, Array $vars) |
|
| 305 | - { |
|
| 306 | - if (!isset($this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ])) { |
|
| 307 | - $this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ] = Array(); |
|
| 308 | - } |
|
| 309 | - foreach ($vars as $var) { |
|
| 310 | - $this->set_var($var, $this->compiler->config_data[ 'sections' ][ $section_name ]); |
|
| 311 | - } |
|
| 312 | - } |
|
| 313 | - |
|
| 314 | - const TPC_OPENB = 1; |
|
| 93 | + #line 25 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 94 | + |
|
| 95 | + /** |
|
| 96 | + * result status |
|
| 97 | + * |
|
| 98 | + * @var bool |
|
| 99 | + */ |
|
| 100 | + public $successful = true; |
|
| 101 | + |
|
| 102 | + /** |
|
| 103 | + * return value |
|
| 104 | + * |
|
| 105 | + * @var mixed |
|
| 106 | + */ |
|
| 107 | + public $retvalue = 0; |
|
| 108 | + |
|
| 109 | + /** |
|
| 110 | + * @var |
|
| 111 | + */ |
|
| 112 | + public $yymajor; |
|
| 113 | + |
|
| 114 | + /** |
|
| 115 | + * lexer object |
|
| 116 | + * |
|
| 117 | + * @var Smarty_Internal_Configfilelexer |
|
| 118 | + */ |
|
| 119 | + private $lex; |
|
| 120 | + |
|
| 121 | + /** |
|
| 122 | + * internal error flag |
|
| 123 | + * |
|
| 124 | + * @var bool |
|
| 125 | + */ |
|
| 126 | + private $internalError = false; |
|
| 127 | + |
|
| 128 | + /** |
|
| 129 | + * compiler object |
|
| 130 | + * |
|
| 131 | + * @var Smarty_Internal_Config_File_Compiler |
|
| 132 | + */ |
|
| 133 | + public $compiler = null; |
|
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * smarty object |
|
| 137 | + * |
|
| 138 | + * @var Smarty |
|
| 139 | + */ |
|
| 140 | + public $smarty = null; |
|
| 141 | + |
|
| 142 | + /** |
|
| 143 | + * copy of config_overwrite property |
|
| 144 | + * |
|
| 145 | + * @var bool |
|
| 146 | + */ |
|
| 147 | + private $configOverwrite = false; |
|
| 148 | + |
|
| 149 | + /** |
|
| 150 | + * copy of config_read_hidden property |
|
| 151 | + * |
|
| 152 | + * @var bool |
|
| 153 | + */ |
|
| 154 | + private $configReadHidden = false; |
|
| 155 | + |
|
| 156 | + /** |
|
| 157 | + * helper map |
|
| 158 | + * |
|
| 159 | + * @var array |
|
| 160 | + */ |
|
| 161 | + private static $escapes_single = Array('\\' => '\\', '\'' => '\''); |
|
| 162 | + |
|
| 163 | + /** |
|
| 164 | + * constructor |
|
| 165 | + * |
|
| 166 | + * @param Smarty_Internal_Configfilelexer $lex |
|
| 167 | + * @param Smarty_Internal_Config_File_Compiler $compiler |
|
| 168 | + */ |
|
| 169 | + public function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler) |
|
| 170 | + { |
|
| 171 | + // set instance object |
|
| 172 | + self::instance($this); |
|
| 173 | + $this->lex = $lex; |
|
| 174 | + $this->smarty = $compiler->smarty; |
|
| 175 | + $this->compiler = $compiler; |
|
| 176 | + $this->configOverwrite = $this->smarty->config_overwrite; |
|
| 177 | + $this->configReadHidden = $this->smarty->config_read_hidden; |
|
| 178 | + } |
|
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * @param null $new_instance |
|
| 182 | + * |
|
| 183 | + * @return null |
|
| 184 | + */ |
|
| 185 | + public static function &instance($new_instance = null) |
|
| 186 | + { |
|
| 187 | + static $instance = null; |
|
| 188 | + if (isset($new_instance) && is_object($new_instance)) { |
|
| 189 | + $instance = $new_instance; |
|
| 190 | + } |
|
| 191 | + return $instance; |
|
| 192 | + } |
|
| 193 | + |
|
| 194 | + /** |
|
| 195 | + * parse optional boolean keywords |
|
| 196 | + * |
|
| 197 | + * @param string $str |
|
| 198 | + * |
|
| 199 | + * @return bool |
|
| 200 | + */ |
|
| 201 | + private function parse_bool($str) |
|
| 202 | + { |
|
| 203 | + $str = strtolower($str); |
|
| 204 | + if (in_array($str, array('on', 'yes', 'true'))) { |
|
| 205 | + $res = true; |
|
| 206 | + } else { |
|
| 207 | + $res = false; |
|
| 208 | + } |
|
| 209 | + return $res; |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + /** |
|
| 213 | + * parse single quoted string |
|
| 214 | + * remove outer quotes |
|
| 215 | + * unescape inner quotes |
|
| 216 | + * |
|
| 217 | + * @param string $qstr |
|
| 218 | + * |
|
| 219 | + * @return string |
|
| 220 | + */ |
|
| 221 | + private static function parse_single_quoted_string($qstr) |
|
| 222 | + { |
|
| 223 | + $escaped_string = substr($qstr, 1, strlen($qstr) - 2); //remove outer quotes |
|
| 224 | + |
|
| 225 | + $ss = preg_split('/(\\\\.)/', $escaped_string, - 1, PREG_SPLIT_DELIM_CAPTURE); |
|
| 226 | + |
|
| 227 | + $str = ""; |
|
| 228 | + foreach ($ss as $s) { |
|
| 229 | + if (strlen($s) === 2 && $s[ 0 ] === '\\') { |
|
| 230 | + if (isset(self::$escapes_single[ $s[ 1 ] ])) { |
|
| 231 | + $s = self::$escapes_single[ $s[ 1 ] ]; |
|
| 232 | + } |
|
| 233 | + } |
|
| 234 | + $str .= $s; |
|
| 235 | + } |
|
| 236 | + return $str; |
|
| 237 | + } |
|
| 238 | + |
|
| 239 | + /** |
|
| 240 | + * parse double quoted string |
|
| 241 | + * |
|
| 242 | + * @param string $qstr |
|
| 243 | + * |
|
| 244 | + * @return string |
|
| 245 | + */ |
|
| 246 | + private static function parse_double_quoted_string($qstr) |
|
| 247 | + { |
|
| 248 | + $inner_str = substr($qstr, 1, strlen($qstr) - 2); |
|
| 249 | + return stripcslashes($inner_str); |
|
| 250 | + } |
|
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * parse triple quoted string |
|
| 254 | + * |
|
| 255 | + * @param string $qstr |
|
| 256 | + * |
|
| 257 | + * @return string |
|
| 258 | + */ |
|
| 259 | + private static function parse_tripple_double_quoted_string($qstr) |
|
| 260 | + { |
|
| 261 | + return stripcslashes($qstr); |
|
| 262 | + } |
|
| 263 | + |
|
| 264 | + /** |
|
| 265 | + * set a config variable in target array |
|
| 266 | + * |
|
| 267 | + * @param array $var |
|
| 268 | + * @param array $target_array |
|
| 269 | + */ |
|
| 270 | + private function set_var(Array $var, Array &$target_array) |
|
| 271 | + { |
|
| 272 | + $key = $var[ "key" ]; |
|
| 273 | + $value = $var[ "value" ]; |
|
| 274 | + |
|
| 275 | + if ($this->configOverwrite || !isset($target_array[ 'vars' ][ $key ])) { |
|
| 276 | + $target_array[ 'vars' ][ $key ] = $value; |
|
| 277 | + } else { |
|
| 278 | + settype($target_array[ 'vars' ][ $key ], 'array'); |
|
| 279 | + $target_array[ 'vars' ][ $key ][] = $value; |
|
| 280 | + } |
|
| 281 | + } |
|
| 282 | + |
|
| 283 | + /** |
|
| 284 | + * add config variable to global vars |
|
| 285 | + * |
|
| 286 | + * @param array $vars |
|
| 287 | + */ |
|
| 288 | + private function add_global_vars(Array $vars) |
|
| 289 | + { |
|
| 290 | + if (!isset($this->compiler->config_data[ 'vars' ])) { |
|
| 291 | + $this->compiler->config_data[ 'vars' ] = Array(); |
|
| 292 | + } |
|
| 293 | + foreach ($vars as $var) { |
|
| 294 | + $this->set_var($var, $this->compiler->config_data); |
|
| 295 | + } |
|
| 296 | + } |
|
| 297 | + |
|
| 298 | + /** |
|
| 299 | + * add config variable to section |
|
| 300 | + * |
|
| 301 | + * @param string $section_name |
|
| 302 | + * @param array $vars |
|
| 303 | + */ |
|
| 304 | + private function add_section_vars($section_name, Array $vars) |
|
| 305 | + { |
|
| 306 | + if (!isset($this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ])) { |
|
| 307 | + $this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ] = Array(); |
|
| 308 | + } |
|
| 309 | + foreach ($vars as $var) { |
|
| 310 | + $this->set_var($var, $this->compiler->config_data[ 'sections' ][ $section_name ]); |
|
| 311 | + } |
|
| 312 | + } |
|
| 313 | + |
|
| 314 | + const TPC_OPENB = 1; |
|
| 315 | 315 | |
| 316 | - const TPC_SECTION = 2; |
|
| 316 | + const TPC_SECTION = 2; |
|
| 317 | 317 | |
| 318 | - const TPC_CLOSEB = 3; |
|
| 318 | + const TPC_CLOSEB = 3; |
|
| 319 | 319 | |
| 320 | - const TPC_DOT = 4; |
|
| 320 | + const TPC_DOT = 4; |
|
| 321 | 321 | |
| 322 | - const TPC_ID = 5; |
|
| 322 | + const TPC_ID = 5; |
|
| 323 | 323 | |
| 324 | - const TPC_EQUAL = 6; |
|
| 324 | + const TPC_EQUAL = 6; |
|
| 325 | 325 | |
| 326 | - const TPC_FLOAT = 7; |
|
| 326 | + const TPC_FLOAT = 7; |
|
| 327 | 327 | |
| 328 | - const TPC_INT = 8; |
|
| 328 | + const TPC_INT = 8; |
|
| 329 | 329 | |
| 330 | - const TPC_BOOL = 9; |
|
| 330 | + const TPC_BOOL = 9; |
|
| 331 | 331 | |
| 332 | - const TPC_SINGLE_QUOTED_STRING = 10; |
|
| 332 | + const TPC_SINGLE_QUOTED_STRING = 10; |
|
| 333 | 333 | |
| 334 | - const TPC_DOUBLE_QUOTED_STRING = 11; |
|
| 334 | + const TPC_DOUBLE_QUOTED_STRING = 11; |
|
| 335 | 335 | |
| 336 | - const TPC_TRIPPLE_QUOTES = 12; |
|
| 336 | + const TPC_TRIPPLE_QUOTES = 12; |
|
| 337 | 337 | |
| 338 | - const TPC_TRIPPLE_TEXT = 13; |
|
| 338 | + const TPC_TRIPPLE_TEXT = 13; |
|
| 339 | 339 | |
| 340 | - const TPC_TRIPPLE_QUOTES_END = 14; |
|
| 340 | + const TPC_TRIPPLE_QUOTES_END = 14; |
|
| 341 | 341 | |
| 342 | - const TPC_NAKED_STRING = 15; |
|
| 342 | + const TPC_NAKED_STRING = 15; |
|
| 343 | 343 | |
| 344 | - const TPC_OTHER = 16; |
|
| 344 | + const TPC_OTHER = 16; |
|
| 345 | 345 | |
| 346 | - const TPC_NEWLINE = 17; |
|
| 346 | + const TPC_NEWLINE = 17; |
|
| 347 | 347 | |
| 348 | - const TPC_COMMENTSTART = 18; |
|
| 348 | + const TPC_COMMENTSTART = 18; |
|
| 349 | 349 | |
| 350 | - const YY_NO_ACTION = 60; |
|
| 350 | + const YY_NO_ACTION = 60; |
|
| 351 | 351 | |
| 352 | - const YY_ACCEPT_ACTION = 59; |
|
| 352 | + const YY_ACCEPT_ACTION = 59; |
|
| 353 | 353 | |
| 354 | - const YY_ERROR_ACTION = 58; |
|
| 354 | + const YY_ERROR_ACTION = 58; |
|
| 355 | 355 | |
| 356 | - const YY_SZ_ACTTAB = 38; |
|
| 356 | + const YY_SZ_ACTTAB = 38; |
|
| 357 | 357 | |
| 358 | - static public $yy_action = array(29, 30, 34, 33, 24, 13, 19, 25, 35, 21, 59, 8, 3, 1, 20, 12, 14, 31, 20, 12, 15, |
|
| 359 | - 17, 23, 18, 27, 26, 4, 5, 6, 32, 2, 11, 28, 22, 16, 9, 7, 10,); |
|
| 358 | + static public $yy_action = array(29, 30, 34, 33, 24, 13, 19, 25, 35, 21, 59, 8, 3, 1, 20, 12, 14, 31, 20, 12, 15, |
|
| 359 | + 17, 23, 18, 27, 26, 4, 5, 6, 32, 2, 11, 28, 22, 16, 9, 7, 10,); |
|
| 360 | 360 | |
| 361 | - static public $yy_lookahead = array(7, 8, 9, 10, 11, 12, 5, 27, 15, 16, 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, 15, |
|
| 362 | - 2, 17, 4, 25, 26, 6, 3, 3, 14, 23, 1, 24, 17, 2, 25, 22, 25,); |
|
| 361 | + static public $yy_lookahead = array(7, 8, 9, 10, 11, 12, 5, 27, 15, 16, 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, 15, |
|
| 362 | + 2, 17, 4, 25, 26, 6, 3, 3, 14, 23, 1, 24, 17, 2, 25, 22, 25,); |
|
| 363 | 363 | |
| 364 | - const YY_SHIFT_USE_DFLT = - 8; |
|
| 364 | + const YY_SHIFT_USE_DFLT = - 8; |
|
| 365 | 365 | |
| 366 | - const YY_SHIFT_MAX = 19; |
|
| 366 | + const YY_SHIFT_MAX = 19; |
|
| 367 | 367 | |
| 368 | - static public $yy_shift_ofst = array(- 8, 1, 1, 1, - 7, - 3, - 3, 30, - 8, - 8, - 8, 19, 5, 3, 15, 16, 24, 25, 32, |
|
| 369 | - 20,); |
|
| 368 | + static public $yy_shift_ofst = array(- 8, 1, 1, 1, - 7, - 3, - 3, 30, - 8, - 8, - 8, 19, 5, 3, 15, 16, 24, 25, 32, |
|
| 369 | + 20,); |
|
| 370 | 370 | |
| 371 | - const YY_REDUCE_USE_DFLT = - 21; |
|
| 371 | + const YY_REDUCE_USE_DFLT = - 21; |
|
| 372 | 372 | |
| 373 | - const YY_REDUCE_MAX = 10; |
|
| 373 | + const YY_REDUCE_MAX = 10; |
|
| 374 | 374 | |
| 375 | - static public $yy_reduce_ofst = array(- 10, - 1, - 1, - 1, - 20, 10, 12, 8, 14, 7, - 11,); |
|
| 375 | + static public $yy_reduce_ofst = array(- 10, - 1, - 1, - 1, - 20, 10, 12, 8, 14, 7, - 11,); |
|
| 376 | 376 | |
| 377 | - static public $yyExpectedTokens = array(array(), array(5, 17, 18,), array(5, 17, 18,), array(5, 17, 18,), |
|
| 378 | - array(7, 8, 9, 10, 11, 12, 15, 16,), array(17, 18,), array(17, 18,), |
|
| 379 | - array(1,), array(), array(), array(), array(2, 4,), array(15, 17,), |
|
| 380 | - array(13, 14,), array(14,), array(17,), array(3,), array(3,), array(2,), |
|
| 381 | - array(6,), array(), array(), array(), array(), array(), array(), array(), |
|
| 382 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 383 | - array(),); |
|
| 377 | + static public $yyExpectedTokens = array(array(), array(5, 17, 18,), array(5, 17, 18,), array(5, 17, 18,), |
|
| 378 | + array(7, 8, 9, 10, 11, 12, 15, 16,), array(17, 18,), array(17, 18,), |
|
| 379 | + array(1,), array(), array(), array(), array(2, 4,), array(15, 17,), |
|
| 380 | + array(13, 14,), array(14,), array(17,), array(3,), array(3,), array(2,), |
|
| 381 | + array(6,), array(), array(), array(), array(), array(), array(), array(), |
|
| 382 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 383 | + array(),); |
|
| 384 | 384 | |
| 385 | - static public $yy_default = array(44, 37, 41, 40, 58, 58, 58, 36, 39, 44, 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, |
|
| 386 | - 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, 47, 52, 51, 49, 48, 53,); |
|
| 385 | + static public $yy_default = array(44, 37, 41, 40, 58, 58, 58, 36, 39, 44, 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, |
|
| 386 | + 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, 47, 52, 51, 49, 48, 53,); |
|
| 387 | 387 | |
| 388 | - const YYNOCODE = 29; |
|
| 388 | + const YYNOCODE = 29; |
|
| 389 | 389 | |
| 390 | - const YYSTACKDEPTH = 100; |
|
| 390 | + const YYSTACKDEPTH = 100; |
|
| 391 | 391 | |
| 392 | - const YYNSTATE = 36; |
|
| 392 | + const YYNSTATE = 36; |
|
| 393 | 393 | |
| 394 | - const YYNRULE = 22; |
|
| 394 | + const YYNRULE = 22; |
|
| 395 | 395 | |
| 396 | - const YYERRORSYMBOL = 19; |
|
| 396 | + const YYERRORSYMBOL = 19; |
|
| 397 | 397 | |
| 398 | - const YYERRSYMDT = 'yy0'; |
|
| 398 | + const YYERRSYMDT = 'yy0'; |
|
| 399 | 399 | |
| 400 | - const YYFALLBACK = 0; |
|
| 400 | + const YYFALLBACK = 0; |
|
| 401 | 401 | |
| 402 | - public static $yyFallback = array(); |
|
| 402 | + public static $yyFallback = array(); |
|
| 403 | 403 | |
| 404 | - public function Trace($TraceFILE, $zTracePrompt) |
|
| 405 | - { |
|
| 406 | - if (!$TraceFILE) { |
|
| 407 | - $zTracePrompt = 0; |
|
| 408 | - } elseif (!$zTracePrompt) { |
|
| 409 | - $TraceFILE = 0; |
|
| 410 | - } |
|
| 411 | - $this->yyTraceFILE = $TraceFILE; |
|
| 412 | - $this->yyTracePrompt = $zTracePrompt; |
|
| 413 | - } |
|
| 404 | + public function Trace($TraceFILE, $zTracePrompt) |
|
| 405 | + { |
|
| 406 | + if (!$TraceFILE) { |
|
| 407 | + $zTracePrompt = 0; |
|
| 408 | + } elseif (!$zTracePrompt) { |
|
| 409 | + $TraceFILE = 0; |
|
| 410 | + } |
|
| 411 | + $this->yyTraceFILE = $TraceFILE; |
|
| 412 | + $this->yyTracePrompt = $zTracePrompt; |
|
| 413 | + } |
|
| 414 | 414 | |
| 415 | - public function PrintTrace() |
|
| 416 | - { |
|
| 417 | - $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 418 | - $this->yyTracePrompt = '<br>'; |
|
| 419 | - } |
|
| 415 | + public function PrintTrace() |
|
| 416 | + { |
|
| 417 | + $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 418 | + $this->yyTracePrompt = '<br>'; |
|
| 419 | + } |
|
| 420 | 420 | |
| 421 | - public $yyTraceFILE; |
|
| 421 | + public $yyTraceFILE; |
|
| 422 | 422 | |
| 423 | - public $yyTracePrompt; |
|
| 423 | + public $yyTracePrompt; |
|
| 424 | 424 | |
| 425 | - public $yyidx; /* Index of top element in stack */ |
|
| 426 | - public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 427 | - public $yystack = array(); /* The parser's stack */ |
|
| 425 | + public $yyidx; /* Index of top element in stack */ |
|
| 426 | + public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 427 | + public $yystack = array(); /* The parser's stack */ |
|
| 428 | 428 | |
| 429 | - public $yyTokenName = array('$', 'OPENB', 'SECTION', 'CLOSEB', 'DOT', 'ID', 'EQUAL', 'FLOAT', 'INT', 'BOOL', |
|
| 430 | - 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING', 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', |
|
| 431 | - 'TRIPPLE_QUOTES_END', 'NAKED_STRING', 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error', |
|
| 432 | - 'start', 'global_vars', 'sections', 'var_list', 'section', 'newline', 'var', 'value',); |
|
| 429 | + public $yyTokenName = array('$', 'OPENB', 'SECTION', 'CLOSEB', 'DOT', 'ID', 'EQUAL', 'FLOAT', 'INT', 'BOOL', |
|
| 430 | + 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING', 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', |
|
| 431 | + 'TRIPPLE_QUOTES_END', 'NAKED_STRING', 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error', |
|
| 432 | + 'start', 'global_vars', 'sections', 'var_list', 'section', 'newline', 'var', 'value',); |
|
| 433 | 433 | |
| 434 | - public static $yyRuleName = array('start ::= global_vars sections', 'global_vars ::= var_list', |
|
| 435 | - 'sections ::= sections section', 'sections ::=', |
|
| 436 | - 'section ::= OPENB SECTION CLOSEB newline var_list', |
|
| 437 | - 'section ::= OPENB DOT SECTION CLOSEB newline var_list', |
|
| 438 | - 'var_list ::= var_list newline', 'var_list ::= var_list var', 'var_list ::=', |
|
| 439 | - 'var ::= ID EQUAL value', 'value ::= FLOAT', 'value ::= INT', 'value ::= BOOL', |
|
| 440 | - 'value ::= SINGLE_QUOTED_STRING', 'value ::= DOUBLE_QUOTED_STRING', |
|
| 441 | - 'value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END', |
|
| 442 | - 'value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END', 'value ::= NAKED_STRING', |
|
| 443 | - 'value ::= OTHER', 'newline ::= NEWLINE', 'newline ::= COMMENTSTART NEWLINE', |
|
| 444 | - 'newline ::= COMMENTSTART NAKED_STRING NEWLINE',); |
|
| 434 | + public static $yyRuleName = array('start ::= global_vars sections', 'global_vars ::= var_list', |
|
| 435 | + 'sections ::= sections section', 'sections ::=', |
|
| 436 | + 'section ::= OPENB SECTION CLOSEB newline var_list', |
|
| 437 | + 'section ::= OPENB DOT SECTION CLOSEB newline var_list', |
|
| 438 | + 'var_list ::= var_list newline', 'var_list ::= var_list var', 'var_list ::=', |
|
| 439 | + 'var ::= ID EQUAL value', 'value ::= FLOAT', 'value ::= INT', 'value ::= BOOL', |
|
| 440 | + 'value ::= SINGLE_QUOTED_STRING', 'value ::= DOUBLE_QUOTED_STRING', |
|
| 441 | + 'value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END', |
|
| 442 | + 'value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END', 'value ::= NAKED_STRING', |
|
| 443 | + 'value ::= OTHER', 'newline ::= NEWLINE', 'newline ::= COMMENTSTART NEWLINE', |
|
| 444 | + 'newline ::= COMMENTSTART NAKED_STRING NEWLINE',); |
|
| 445 | 445 | |
| 446 | - public function tokenName($tokenType) |
|
| 447 | - { |
|
| 448 | - if ($tokenType === 0) { |
|
| 449 | - return 'End of Input'; |
|
| 450 | - } |
|
| 446 | + public function tokenName($tokenType) |
|
| 447 | + { |
|
| 448 | + if ($tokenType === 0) { |
|
| 449 | + return 'End of Input'; |
|
| 450 | + } |
|
| 451 | 451 | $countYyTokenName = count($this->yyTokenName); |
| 452 | - if ($tokenType > 0 && $tokenType < $countYyTokenName) { |
|
| 453 | - return $this->yyTokenName[ $tokenType ]; |
|
| 454 | - } else { |
|
| 455 | - return "Unknown"; |
|
| 456 | - } |
|
| 457 | - } |
|
| 458 | - |
|
| 459 | - public static function yy_destructor($yymajor, $yypminor) |
|
| 460 | - { |
|
| 461 | - switch ($yymajor) { |
|
| 462 | - default: |
|
| 463 | - break; /* If no destructor action specified: do nothing */ |
|
| 464 | - } |
|
| 465 | - } |
|
| 466 | - |
|
| 467 | - public function yy_pop_parser_stack() |
|
| 468 | - { |
|
| 469 | - if (empty($this->yystack)) { |
|
| 470 | - return; |
|
| 471 | - } |
|
| 472 | - $yytos = array_pop($this->yystack); |
|
| 473 | - if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 474 | - fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 475 | - } |
|
| 476 | - $yymajor = $yytos->major; |
|
| 477 | - self::yy_destructor($yymajor, $yytos->minor); |
|
| 478 | - $this->yyidx --; |
|
| 479 | - |
|
| 480 | - return $yymajor; |
|
| 481 | - } |
|
| 482 | - |
|
| 483 | - public function __destruct() |
|
| 484 | - { |
|
| 485 | - while ($this->yystack !== Array()) { |
|
| 486 | - $this->yy_pop_parser_stack(); |
|
| 487 | - } |
|
| 488 | - if (is_resource($this->yyTraceFILE)) { |
|
| 489 | - fclose($this->yyTraceFILE); |
|
| 490 | - } |
|
| 491 | - } |
|
| 492 | - |
|
| 493 | - public function yy_get_expected_tokens($token) |
|
| 494 | - { |
|
| 495 | - static $res3 = array(); |
|
| 496 | - static $res4 = array(); |
|
| 497 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 498 | - $expected = self::$yyExpectedTokens[ $state ]; |
|
| 499 | - if (isset($res3[ $state ][ $token ])) { |
|
| 500 | - if ($res3[ $state ][ $token ]) { |
|
| 501 | - return $expected; |
|
| 502 | - } |
|
| 503 | - } else { |
|
| 504 | - if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 505 | - return $expected; |
|
| 506 | - } |
|
| 507 | - } |
|
| 508 | - $stack = $this->yystack; |
|
| 509 | - $yyidx = $this->yyidx; |
|
| 510 | - do { |
|
| 511 | - $yyact = $this->yy_find_shift_action($token); |
|
| 512 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 513 | - // reduce action |
|
| 514 | - $done = 0; |
|
| 515 | - do { |
|
| 516 | - if ($done ++ == 100) { |
|
| 517 | - $this->yyidx = $yyidx; |
|
| 518 | - $this->yystack = $stack; |
|
| 519 | - // too much recursion prevents proper detection |
|
| 520 | - // so give up |
|
| 521 | - return array_unique($expected); |
|
| 522 | - } |
|
| 523 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 524 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 525 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 526 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 527 | - if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 528 | - $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 529 | - if (isset($res4[ $nextstate ][ $token ])) { |
|
| 530 | - if ($res4[ $nextstate ][ $token ]) { |
|
| 531 | - $this->yyidx = $yyidx; |
|
| 532 | - $this->yystack = $stack; |
|
| 533 | - return array_unique($expected); |
|
| 534 | - } |
|
| 535 | - } else { |
|
| 536 | - if ($res4[ $nextstate ][ $token ] = |
|
| 537 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 538 | - ) { |
|
| 539 | - $this->yyidx = $yyidx; |
|
| 540 | - $this->yystack = $stack; |
|
| 541 | - return array_unique($expected); |
|
| 542 | - } |
|
| 543 | - } |
|
| 544 | - } |
|
| 545 | - if ($nextstate < self::YYNSTATE) { |
|
| 546 | - // we need to shift a non-terminal |
|
| 547 | - $this->yyidx ++; |
|
| 548 | - $x = new TPC_yyStackEntry; |
|
| 549 | - $x->stateno = $nextstate; |
|
| 550 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 551 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 552 | - continue 2; |
|
| 553 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 554 | - $this->yyidx = $yyidx; |
|
| 555 | - $this->yystack = $stack; |
|
| 556 | - // the last token was just ignored, we can't accept |
|
| 557 | - // by ignoring input, this is in essence ignoring a |
|
| 558 | - // syntax error! |
|
| 559 | - return array_unique($expected); |
|
| 560 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 561 | - $this->yyidx = $yyidx; |
|
| 562 | - $this->yystack = $stack; |
|
| 563 | - // input accepted, but not shifted (I guess) |
|
| 564 | - return $expected; |
|
| 565 | - } else { |
|
| 566 | - $yyact = $nextstate; |
|
| 567 | - } |
|
| 568 | - } |
|
| 569 | - while (true); |
|
| 570 | - } |
|
| 571 | - break; |
|
| 572 | - } |
|
| 573 | - while (true); |
|
| 574 | - $this->yyidx = $yyidx; |
|
| 575 | - $this->yystack = $stack; |
|
| 576 | - |
|
| 577 | - return array_unique($expected); |
|
| 578 | - } |
|
| 579 | - |
|
| 580 | - public function yy_is_expected_token($token) |
|
| 581 | - { |
|
| 582 | - static $res = array(); |
|
| 583 | - static $res2 = array(); |
|
| 584 | - if ($token === 0) { |
|
| 585 | - return true; // 0 is not part of this |
|
| 586 | - } |
|
| 587 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 588 | - if (isset($res[ $state ][ $token ])) { |
|
| 589 | - if ($res[ $state ][ $token ]) { |
|
| 590 | - return true; |
|
| 591 | - } |
|
| 592 | - } else { |
|
| 593 | - if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 594 | - return true; |
|
| 595 | - } |
|
| 596 | - } |
|
| 597 | - $stack = $this->yystack; |
|
| 598 | - $yyidx = $this->yyidx; |
|
| 599 | - do { |
|
| 600 | - $yyact = $this->yy_find_shift_action($token); |
|
| 601 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 602 | - // reduce action |
|
| 603 | - $done = 0; |
|
| 604 | - do { |
|
| 605 | - if ($done ++ == 100) { |
|
| 606 | - $this->yyidx = $yyidx; |
|
| 607 | - $this->yystack = $stack; |
|
| 608 | - // too much recursion prevents proper detection |
|
| 609 | - // so give up |
|
| 610 | - return true; |
|
| 611 | - } |
|
| 612 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 613 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 614 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 615 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 616 | - if (isset($res2[ $nextstate ][ $token ])) { |
|
| 617 | - if ($res2[ $nextstate ][ $token ]) { |
|
| 618 | - $this->yyidx = $yyidx; |
|
| 619 | - $this->yystack = $stack; |
|
| 620 | - return true; |
|
| 621 | - } |
|
| 622 | - } else { |
|
| 623 | - if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 624 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 625 | - true)) |
|
| 626 | - ) { |
|
| 627 | - $this->yyidx = $yyidx; |
|
| 628 | - $this->yystack = $stack; |
|
| 629 | - return true; |
|
| 630 | - } |
|
| 631 | - } |
|
| 632 | - if ($nextstate < self::YYNSTATE) { |
|
| 633 | - // we need to shift a non-terminal |
|
| 634 | - $this->yyidx ++; |
|
| 635 | - $x = new TPC_yyStackEntry; |
|
| 636 | - $x->stateno = $nextstate; |
|
| 637 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 638 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 639 | - continue 2; |
|
| 640 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 641 | - $this->yyidx = $yyidx; |
|
| 642 | - $this->yystack = $stack; |
|
| 643 | - if (!$token) { |
|
| 644 | - // end of input: this is valid |
|
| 645 | - return true; |
|
| 646 | - } |
|
| 647 | - // the last token was just ignored, we can't accept |
|
| 648 | - // by ignoring input, this is in essence ignoring a |
|
| 649 | - // syntax error! |
|
| 650 | - return false; |
|
| 651 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 652 | - $this->yyidx = $yyidx; |
|
| 653 | - $this->yystack = $stack; |
|
| 654 | - // input accepted, but not shifted (I guess) |
|
| 655 | - return true; |
|
| 656 | - } else { |
|
| 657 | - $yyact = $nextstate; |
|
| 658 | - } |
|
| 659 | - } |
|
| 660 | - while (true); |
|
| 661 | - } |
|
| 662 | - break; |
|
| 663 | - } |
|
| 664 | - while (true); |
|
| 665 | - $this->yyidx = $yyidx; |
|
| 666 | - $this->yystack = $stack; |
|
| 667 | - |
|
| 668 | - return true; |
|
| 669 | - } |
|
| 670 | - |
|
| 671 | - public function yy_find_shift_action($iLookAhead) |
|
| 672 | - { |
|
| 673 | - $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 674 | - |
|
| 675 | - /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 676 | - if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 677 | - // no shift actions |
|
| 678 | - return self::$yy_default[ $stateno ]; |
|
| 679 | - } |
|
| 680 | - $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 681 | - if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 682 | - return self::$yy_default[ $stateno ]; |
|
| 683 | - } |
|
| 684 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 685 | - return self::YY_NO_ACTION; |
|
| 686 | - } |
|
| 687 | - $i += $iLookAhead; |
|
| 688 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 452 | + if ($tokenType > 0 && $tokenType < $countYyTokenName) { |
|
| 453 | + return $this->yyTokenName[ $tokenType ]; |
|
| 454 | + } else { |
|
| 455 | + return "Unknown"; |
|
| 456 | + } |
|
| 457 | + } |
|
| 458 | + |
|
| 459 | + public static function yy_destructor($yymajor, $yypminor) |
|
| 460 | + { |
|
| 461 | + switch ($yymajor) { |
|
| 462 | + default: |
|
| 463 | + break; /* If no destructor action specified: do nothing */ |
|
| 464 | + } |
|
| 465 | + } |
|
| 466 | + |
|
| 467 | + public function yy_pop_parser_stack() |
|
| 468 | + { |
|
| 469 | + if (empty($this->yystack)) { |
|
| 470 | + return; |
|
| 471 | + } |
|
| 472 | + $yytos = array_pop($this->yystack); |
|
| 473 | + if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 474 | + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 475 | + } |
|
| 476 | + $yymajor = $yytos->major; |
|
| 477 | + self::yy_destructor($yymajor, $yytos->minor); |
|
| 478 | + $this->yyidx --; |
|
| 479 | + |
|
| 480 | + return $yymajor; |
|
| 481 | + } |
|
| 482 | + |
|
| 483 | + public function __destruct() |
|
| 484 | + { |
|
| 485 | + while ($this->yystack !== Array()) { |
|
| 486 | + $this->yy_pop_parser_stack(); |
|
| 487 | + } |
|
| 488 | + if (is_resource($this->yyTraceFILE)) { |
|
| 489 | + fclose($this->yyTraceFILE); |
|
| 490 | + } |
|
| 491 | + } |
|
| 492 | + |
|
| 493 | + public function yy_get_expected_tokens($token) |
|
| 494 | + { |
|
| 495 | + static $res3 = array(); |
|
| 496 | + static $res4 = array(); |
|
| 497 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 498 | + $expected = self::$yyExpectedTokens[ $state ]; |
|
| 499 | + if (isset($res3[ $state ][ $token ])) { |
|
| 500 | + if ($res3[ $state ][ $token ]) { |
|
| 501 | + return $expected; |
|
| 502 | + } |
|
| 503 | + } else { |
|
| 504 | + if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 505 | + return $expected; |
|
| 506 | + } |
|
| 507 | + } |
|
| 508 | + $stack = $this->yystack; |
|
| 509 | + $yyidx = $this->yyidx; |
|
| 510 | + do { |
|
| 511 | + $yyact = $this->yy_find_shift_action($token); |
|
| 512 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 513 | + // reduce action |
|
| 514 | + $done = 0; |
|
| 515 | + do { |
|
| 516 | + if ($done ++ == 100) { |
|
| 517 | + $this->yyidx = $yyidx; |
|
| 518 | + $this->yystack = $stack; |
|
| 519 | + // too much recursion prevents proper detection |
|
| 520 | + // so give up |
|
| 521 | + return array_unique($expected); |
|
| 522 | + } |
|
| 523 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 524 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 525 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 526 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 527 | + if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 528 | + $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 529 | + if (isset($res4[ $nextstate ][ $token ])) { |
|
| 530 | + if ($res4[ $nextstate ][ $token ]) { |
|
| 531 | + $this->yyidx = $yyidx; |
|
| 532 | + $this->yystack = $stack; |
|
| 533 | + return array_unique($expected); |
|
| 534 | + } |
|
| 535 | + } else { |
|
| 536 | + if ($res4[ $nextstate ][ $token ] = |
|
| 537 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 538 | + ) { |
|
| 539 | + $this->yyidx = $yyidx; |
|
| 540 | + $this->yystack = $stack; |
|
| 541 | + return array_unique($expected); |
|
| 542 | + } |
|
| 543 | + } |
|
| 544 | + } |
|
| 545 | + if ($nextstate < self::YYNSTATE) { |
|
| 546 | + // we need to shift a non-terminal |
|
| 547 | + $this->yyidx ++; |
|
| 548 | + $x = new TPC_yyStackEntry; |
|
| 549 | + $x->stateno = $nextstate; |
|
| 550 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 551 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 552 | + continue 2; |
|
| 553 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 554 | + $this->yyidx = $yyidx; |
|
| 555 | + $this->yystack = $stack; |
|
| 556 | + // the last token was just ignored, we can't accept |
|
| 557 | + // by ignoring input, this is in essence ignoring a |
|
| 558 | + // syntax error! |
|
| 559 | + return array_unique($expected); |
|
| 560 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 561 | + $this->yyidx = $yyidx; |
|
| 562 | + $this->yystack = $stack; |
|
| 563 | + // input accepted, but not shifted (I guess) |
|
| 564 | + return $expected; |
|
| 565 | + } else { |
|
| 566 | + $yyact = $nextstate; |
|
| 567 | + } |
|
| 568 | + } |
|
| 569 | + while (true); |
|
| 570 | + } |
|
| 571 | + break; |
|
| 572 | + } |
|
| 573 | + while (true); |
|
| 574 | + $this->yyidx = $yyidx; |
|
| 575 | + $this->yystack = $stack; |
|
| 576 | + |
|
| 577 | + return array_unique($expected); |
|
| 578 | + } |
|
| 579 | + |
|
| 580 | + public function yy_is_expected_token($token) |
|
| 581 | + { |
|
| 582 | + static $res = array(); |
|
| 583 | + static $res2 = array(); |
|
| 584 | + if ($token === 0) { |
|
| 585 | + return true; // 0 is not part of this |
|
| 586 | + } |
|
| 587 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 588 | + if (isset($res[ $state ][ $token ])) { |
|
| 589 | + if ($res[ $state ][ $token ]) { |
|
| 590 | + return true; |
|
| 591 | + } |
|
| 592 | + } else { |
|
| 593 | + if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 594 | + return true; |
|
| 595 | + } |
|
| 596 | + } |
|
| 597 | + $stack = $this->yystack; |
|
| 598 | + $yyidx = $this->yyidx; |
|
| 599 | + do { |
|
| 600 | + $yyact = $this->yy_find_shift_action($token); |
|
| 601 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 602 | + // reduce action |
|
| 603 | + $done = 0; |
|
| 604 | + do { |
|
| 605 | + if ($done ++ == 100) { |
|
| 606 | + $this->yyidx = $yyidx; |
|
| 607 | + $this->yystack = $stack; |
|
| 608 | + // too much recursion prevents proper detection |
|
| 609 | + // so give up |
|
| 610 | + return true; |
|
| 611 | + } |
|
| 612 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 613 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 614 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 615 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 616 | + if (isset($res2[ $nextstate ][ $token ])) { |
|
| 617 | + if ($res2[ $nextstate ][ $token ]) { |
|
| 618 | + $this->yyidx = $yyidx; |
|
| 619 | + $this->yystack = $stack; |
|
| 620 | + return true; |
|
| 621 | + } |
|
| 622 | + } else { |
|
| 623 | + if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 624 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 625 | + true)) |
|
| 626 | + ) { |
|
| 627 | + $this->yyidx = $yyidx; |
|
| 628 | + $this->yystack = $stack; |
|
| 629 | + return true; |
|
| 630 | + } |
|
| 631 | + } |
|
| 632 | + if ($nextstate < self::YYNSTATE) { |
|
| 633 | + // we need to shift a non-terminal |
|
| 634 | + $this->yyidx ++; |
|
| 635 | + $x = new TPC_yyStackEntry; |
|
| 636 | + $x->stateno = $nextstate; |
|
| 637 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 638 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 639 | + continue 2; |
|
| 640 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 641 | + $this->yyidx = $yyidx; |
|
| 642 | + $this->yystack = $stack; |
|
| 643 | + if (!$token) { |
|
| 644 | + // end of input: this is valid |
|
| 645 | + return true; |
|
| 646 | + } |
|
| 647 | + // the last token was just ignored, we can't accept |
|
| 648 | + // by ignoring input, this is in essence ignoring a |
|
| 649 | + // syntax error! |
|
| 650 | + return false; |
|
| 651 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 652 | + $this->yyidx = $yyidx; |
|
| 653 | + $this->yystack = $stack; |
|
| 654 | + // input accepted, but not shifted (I guess) |
|
| 655 | + return true; |
|
| 656 | + } else { |
|
| 657 | + $yyact = $nextstate; |
|
| 658 | + } |
|
| 659 | + } |
|
| 660 | + while (true); |
|
| 661 | + } |
|
| 662 | + break; |
|
| 663 | + } |
|
| 664 | + while (true); |
|
| 665 | + $this->yyidx = $yyidx; |
|
| 666 | + $this->yystack = $stack; |
|
| 667 | + |
|
| 668 | + return true; |
|
| 669 | + } |
|
| 670 | + |
|
| 671 | + public function yy_find_shift_action($iLookAhead) |
|
| 672 | + { |
|
| 673 | + $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 674 | + |
|
| 675 | + /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 676 | + if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 677 | + // no shift actions |
|
| 678 | + return self::$yy_default[ $stateno ]; |
|
| 679 | + } |
|
| 680 | + $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 681 | + if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 682 | + return self::$yy_default[ $stateno ]; |
|
| 683 | + } |
|
| 684 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 685 | + return self::YY_NO_ACTION; |
|
| 686 | + } |
|
| 687 | + $i += $iLookAhead; |
|
| 688 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 689 | 689 | $countYyFallback = count(self::$yyFallback); |
| 690 | - if (count(self::$yyFallback) && $iLookAhead < $countYyFallback && |
|
| 691 | - ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 692 | - ) { |
|
| 693 | - if ($this->yyTraceFILE) { |
|
| 694 | - fwrite($this->yyTraceFILE, |
|
| 695 | - $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 696 | - $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 697 | - } |
|
| 698 | - |
|
| 699 | - return $this->yy_find_shift_action($iFallback); |
|
| 700 | - } |
|
| 701 | - |
|
| 702 | - return self::$yy_default[ $stateno ]; |
|
| 703 | - } else { |
|
| 704 | - return self::$yy_action[ $i ]; |
|
| 705 | - } |
|
| 706 | - } |
|
| 707 | - |
|
| 708 | - public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 709 | - { |
|
| 710 | - /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 711 | - |
|
| 712 | - if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 713 | - return self::$yy_default[ $stateno ]; |
|
| 714 | - } |
|
| 715 | - $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 716 | - if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 717 | - return self::$yy_default[ $stateno ]; |
|
| 718 | - } |
|
| 719 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 720 | - return self::YY_NO_ACTION; |
|
| 721 | - } |
|
| 722 | - $i += $iLookAhead; |
|
| 723 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 724 | - return self::$yy_default[ $stateno ]; |
|
| 725 | - } else { |
|
| 726 | - return self::$yy_action[ $i ]; |
|
| 727 | - } |
|
| 728 | - } |
|
| 729 | - |
|
| 730 | - public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 731 | - { |
|
| 732 | - $this->yyidx ++; |
|
| 733 | - if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 734 | - $this->yyidx --; |
|
| 735 | - if ($this->yyTraceFILE) { |
|
| 736 | - fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 737 | - } |
|
| 738 | - while ($this->yyidx >= 0) { |
|
| 739 | - $this->yy_pop_parser_stack(); |
|
| 740 | - } |
|
| 741 | - #line 255 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 742 | - |
|
| 743 | - $this->internalError = true; |
|
| 744 | - $this->compiler->trigger_config_file_error("Stack overflow in configfile parser"); |
|
| 745 | - |
|
| 746 | - return; |
|
| 747 | - } |
|
| 748 | - $yytos = new TPC_yyStackEntry; |
|
| 749 | - $yytos->stateno = $yyNewState; |
|
| 750 | - $yytos->major = $yyMajor; |
|
| 751 | - $yytos->minor = $yypMinor; |
|
| 752 | - $this->yystack[] = $yytos; |
|
| 753 | - if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 754 | - fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 755 | - fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 756 | - for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 757 | - fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 758 | - } |
|
| 759 | - fwrite($this->yyTraceFILE, "\n"); |
|
| 760 | - } |
|
| 761 | - } |
|
| 762 | - |
|
| 763 | - public static $yyRuleInfo = array(array(0 => 20, 1 => 2), array(0 => 21, 1 => 1), array(0 => 22, 1 => 2), |
|
| 764 | - array(0 => 22, 1 => 0), array(0 => 24, 1 => 5), array(0 => 24, 1 => 6), |
|
| 765 | - array(0 => 23, 1 => 2), array(0 => 23, 1 => 2), array(0 => 23, 1 => 0), |
|
| 766 | - array(0 => 26, 1 => 3), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), |
|
| 767 | - array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), |
|
| 768 | - array(0 => 27, 1 => 3), array(0 => 27, 1 => 2), array(0 => 27, 1 => 1), |
|
| 769 | - array(0 => 27, 1 => 1), array(0 => 25, 1 => 1), array(0 => 25, 1 => 2), |
|
| 770 | - array(0 => 25, 1 => 3),); |
|
| 771 | - |
|
| 772 | - public static $yyReduceMap = array(0 => 0, 2 => 0, 3 => 0, 19 => 0, 20 => 0, 21 => 0, 1 => 1, 4 => 4, 5 => 5, |
|
| 773 | - 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, |
|
| 774 | - 15 => 15, 16 => 16, 17 => 17, 18 => 17,); |
|
| 775 | - |
|
| 776 | - #line 261 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 777 | - public function yy_r0() |
|
| 778 | - { |
|
| 779 | - $this->_retvalue = null; |
|
| 780 | - } |
|
| 781 | - |
|
| 782 | - #line 266 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 783 | - public function yy_r1() |
|
| 784 | - { |
|
| 785 | - $this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 786 | - $this->_retvalue = null; |
|
| 787 | - } |
|
| 788 | - |
|
| 789 | - #line 280 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 790 | - public function yy_r4() |
|
| 791 | - { |
|
| 792 | - $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 793 | - $this->_retvalue = null; |
|
| 794 | - } |
|
| 795 | - |
|
| 796 | - #line 285 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 797 | - public function yy_r5() |
|
| 798 | - { |
|
| 799 | - if ($this->configReadHidden) { |
|
| 800 | - $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 801 | - $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 802 | - } |
|
| 803 | - $this->_retvalue = null; |
|
| 804 | - } |
|
| 805 | - |
|
| 806 | - #line 293 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 807 | - public function yy_r6() |
|
| 808 | - { |
|
| 809 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 810 | - } |
|
| 811 | - |
|
| 812 | - #line 297 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 813 | - public function yy_r7() |
|
| 814 | - { |
|
| 815 | - $this->_retvalue = |
|
| 816 | - array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, Array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 817 | - } |
|
| 818 | - |
|
| 819 | - #line 301 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 820 | - public function yy_r8() |
|
| 821 | - { |
|
| 822 | - $this->_retvalue = Array(); |
|
| 823 | - } |
|
| 824 | - |
|
| 825 | - #line 307 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 826 | - public function yy_r9() |
|
| 827 | - { |
|
| 828 | - $this->_retvalue = Array("key" => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 829 | - "value" => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 830 | - } |
|
| 831 | - |
|
| 832 | - #line 312 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 833 | - public function yy_r10() |
|
| 834 | - { |
|
| 835 | - $this->_retvalue = (float) $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 836 | - } |
|
| 837 | - |
|
| 838 | - #line 316 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 839 | - public function yy_r11() |
|
| 840 | - { |
|
| 841 | - $this->_retvalue = (int) $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 842 | - } |
|
| 843 | - |
|
| 844 | - #line 320 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 845 | - public function yy_r12() |
|
| 846 | - { |
|
| 847 | - $this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 848 | - } |
|
| 849 | - |
|
| 850 | - #line 324 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 851 | - public function yy_r13() |
|
| 852 | - { |
|
| 853 | - $this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 854 | - } |
|
| 855 | - |
|
| 856 | - #line 328 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 857 | - public function yy_r14() |
|
| 858 | - { |
|
| 859 | - $this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 860 | - } |
|
| 861 | - |
|
| 862 | - #line 332 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 863 | - public function yy_r15() |
|
| 864 | - { |
|
| 865 | - $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 866 | - } |
|
| 867 | - |
|
| 868 | - #line 336 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 869 | - public function yy_r16() |
|
| 870 | - { |
|
| 871 | - $this->_retvalue = ''; |
|
| 872 | - } |
|
| 873 | - |
|
| 874 | - #line 340 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 875 | - public function yy_r17() |
|
| 876 | - { |
|
| 877 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 878 | - } |
|
| 879 | - |
|
| 880 | - private $_retvalue; |
|
| 881 | - |
|
| 882 | - public function yy_reduce($yyruleno) |
|
| 883 | - { |
|
| 690 | + if (count(self::$yyFallback) && $iLookAhead < $countYyFallback && |
|
| 691 | + ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 692 | + ) { |
|
| 693 | + if ($this->yyTraceFILE) { |
|
| 694 | + fwrite($this->yyTraceFILE, |
|
| 695 | + $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 696 | + $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 697 | + } |
|
| 698 | + |
|
| 699 | + return $this->yy_find_shift_action($iFallback); |
|
| 700 | + } |
|
| 701 | + |
|
| 702 | + return self::$yy_default[ $stateno ]; |
|
| 703 | + } else { |
|
| 704 | + return self::$yy_action[ $i ]; |
|
| 705 | + } |
|
| 706 | + } |
|
| 707 | + |
|
| 708 | + public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 709 | + { |
|
| 710 | + /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 711 | + |
|
| 712 | + if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 713 | + return self::$yy_default[ $stateno ]; |
|
| 714 | + } |
|
| 715 | + $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 716 | + if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 717 | + return self::$yy_default[ $stateno ]; |
|
| 718 | + } |
|
| 719 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 720 | + return self::YY_NO_ACTION; |
|
| 721 | + } |
|
| 722 | + $i += $iLookAhead; |
|
| 723 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 724 | + return self::$yy_default[ $stateno ]; |
|
| 725 | + } else { |
|
| 726 | + return self::$yy_action[ $i ]; |
|
| 727 | + } |
|
| 728 | + } |
|
| 729 | + |
|
| 730 | + public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 731 | + { |
|
| 732 | + $this->yyidx ++; |
|
| 733 | + if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 734 | + $this->yyidx --; |
|
| 735 | + if ($this->yyTraceFILE) { |
|
| 736 | + fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 737 | + } |
|
| 738 | + while ($this->yyidx >= 0) { |
|
| 739 | + $this->yy_pop_parser_stack(); |
|
| 740 | + } |
|
| 741 | + #line 255 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 742 | + |
|
| 743 | + $this->internalError = true; |
|
| 744 | + $this->compiler->trigger_config_file_error("Stack overflow in configfile parser"); |
|
| 745 | + |
|
| 746 | + return; |
|
| 747 | + } |
|
| 748 | + $yytos = new TPC_yyStackEntry; |
|
| 749 | + $yytos->stateno = $yyNewState; |
|
| 750 | + $yytos->major = $yyMajor; |
|
| 751 | + $yytos->minor = $yypMinor; |
|
| 752 | + $this->yystack[] = $yytos; |
|
| 753 | + if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 754 | + fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 755 | + fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 756 | + for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 757 | + fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 758 | + } |
|
| 759 | + fwrite($this->yyTraceFILE, "\n"); |
|
| 760 | + } |
|
| 761 | + } |
|
| 762 | + |
|
| 763 | + public static $yyRuleInfo = array(array(0 => 20, 1 => 2), array(0 => 21, 1 => 1), array(0 => 22, 1 => 2), |
|
| 764 | + array(0 => 22, 1 => 0), array(0 => 24, 1 => 5), array(0 => 24, 1 => 6), |
|
| 765 | + array(0 => 23, 1 => 2), array(0 => 23, 1 => 2), array(0 => 23, 1 => 0), |
|
| 766 | + array(0 => 26, 1 => 3), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), |
|
| 767 | + array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), |
|
| 768 | + array(0 => 27, 1 => 3), array(0 => 27, 1 => 2), array(0 => 27, 1 => 1), |
|
| 769 | + array(0 => 27, 1 => 1), array(0 => 25, 1 => 1), array(0 => 25, 1 => 2), |
|
| 770 | + array(0 => 25, 1 => 3),); |
|
| 771 | + |
|
| 772 | + public static $yyReduceMap = array(0 => 0, 2 => 0, 3 => 0, 19 => 0, 20 => 0, 21 => 0, 1 => 1, 4 => 4, 5 => 5, |
|
| 773 | + 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, |
|
| 774 | + 15 => 15, 16 => 16, 17 => 17, 18 => 17,); |
|
| 775 | + |
|
| 776 | + #line 261 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 777 | + public function yy_r0() |
|
| 778 | + { |
|
| 779 | + $this->_retvalue = null; |
|
| 780 | + } |
|
| 781 | + |
|
| 782 | + #line 266 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 783 | + public function yy_r1() |
|
| 784 | + { |
|
| 785 | + $this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 786 | + $this->_retvalue = null; |
|
| 787 | + } |
|
| 788 | + |
|
| 789 | + #line 280 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 790 | + public function yy_r4() |
|
| 791 | + { |
|
| 792 | + $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 793 | + $this->_retvalue = null; |
|
| 794 | + } |
|
| 795 | + |
|
| 796 | + #line 285 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 797 | + public function yy_r5() |
|
| 798 | + { |
|
| 799 | + if ($this->configReadHidden) { |
|
| 800 | + $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 801 | + $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 802 | + } |
|
| 803 | + $this->_retvalue = null; |
|
| 804 | + } |
|
| 805 | + |
|
| 806 | + #line 293 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 807 | + public function yy_r6() |
|
| 808 | + { |
|
| 809 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 810 | + } |
|
| 811 | + |
|
| 812 | + #line 297 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 813 | + public function yy_r7() |
|
| 814 | + { |
|
| 815 | + $this->_retvalue = |
|
| 816 | + array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, Array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 817 | + } |
|
| 818 | + |
|
| 819 | + #line 301 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 820 | + public function yy_r8() |
|
| 821 | + { |
|
| 822 | + $this->_retvalue = Array(); |
|
| 823 | + } |
|
| 824 | + |
|
| 825 | + #line 307 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 826 | + public function yy_r9() |
|
| 827 | + { |
|
| 828 | + $this->_retvalue = Array("key" => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 829 | + "value" => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 830 | + } |
|
| 831 | + |
|
| 832 | + #line 312 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 833 | + public function yy_r10() |
|
| 834 | + { |
|
| 835 | + $this->_retvalue = (float) $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 836 | + } |
|
| 837 | + |
|
| 838 | + #line 316 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 839 | + public function yy_r11() |
|
| 840 | + { |
|
| 841 | + $this->_retvalue = (int) $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 842 | + } |
|
| 843 | + |
|
| 844 | + #line 320 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 845 | + public function yy_r12() |
|
| 846 | + { |
|
| 847 | + $this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 848 | + } |
|
| 849 | + |
|
| 850 | + #line 324 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 851 | + public function yy_r13() |
|
| 852 | + { |
|
| 853 | + $this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 854 | + } |
|
| 855 | + |
|
| 856 | + #line 328 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 857 | + public function yy_r14() |
|
| 858 | + { |
|
| 859 | + $this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 860 | + } |
|
| 861 | + |
|
| 862 | + #line 332 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 863 | + public function yy_r15() |
|
| 864 | + { |
|
| 865 | + $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 866 | + } |
|
| 867 | + |
|
| 868 | + #line 336 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 869 | + public function yy_r16() |
|
| 870 | + { |
|
| 871 | + $this->_retvalue = ''; |
|
| 872 | + } |
|
| 873 | + |
|
| 874 | + #line 340 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 875 | + public function yy_r17() |
|
| 876 | + { |
|
| 877 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 878 | + } |
|
| 879 | + |
|
| 880 | + private $_retvalue; |
|
| 881 | + |
|
| 882 | + public function yy_reduce($yyruleno) |
|
| 883 | + { |
|
| 884 | 884 | $countYyRuleName = count(self::$yyRuleName); |
| 885 | - if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < $countYyRuleName) { |
|
| 886 | - fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 887 | - self::$yyRuleName[ $yyruleno ]); |
|
| 888 | - } |
|
| 889 | - |
|
| 890 | - $this->_retvalue = $yy_lefthand_side = null; |
|
| 891 | - if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 892 | - // call the action |
|
| 893 | - $this->_retvalue = null; |
|
| 894 | - $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 895 | - $yy_lefthand_side = $this->_retvalue; |
|
| 896 | - } |
|
| 897 | - $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 898 | - $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 899 | - $this->yyidx -= $yysize; |
|
| 900 | - for ($i = $yysize; $i; $i --) { |
|
| 901 | - // pop all of the right-hand side parameters |
|
| 902 | - array_pop($this->yystack); |
|
| 903 | - } |
|
| 904 | - $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 905 | - if ($yyact < self::YYNSTATE) { |
|
| 906 | - if (!$this->yyTraceFILE && $yysize) { |
|
| 907 | - $this->yyidx ++; |
|
| 908 | - $x = new TPC_yyStackEntry; |
|
| 909 | - $x->stateno = $yyact; |
|
| 910 | - $x->major = $yygoto; |
|
| 911 | - $x->minor = $yy_lefthand_side; |
|
| 912 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 913 | - } else { |
|
| 914 | - $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 915 | - } |
|
| 916 | - } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 917 | - $this->yy_accept(); |
|
| 918 | - } |
|
| 919 | - } |
|
| 920 | - |
|
| 921 | - public function yy_parse_failed() |
|
| 922 | - { |
|
| 923 | - if ($this->yyTraceFILE) { |
|
| 924 | - fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 925 | - } |
|
| 926 | - while ($this->yyidx >= 0) { |
|
| 927 | - $this->yy_pop_parser_stack(); |
|
| 928 | - } |
|
| 929 | - } |
|
| 930 | - |
|
| 931 | - public function yy_syntax_error($yymajor, $TOKEN) |
|
| 932 | - { |
|
| 933 | - #line 248 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 934 | - |
|
| 935 | - $this->internalError = true; |
|
| 936 | - $this->yymajor = $yymajor; |
|
| 937 | - $this->compiler->trigger_config_file_error(); |
|
| 938 | - } |
|
| 939 | - |
|
| 940 | - public function yy_accept() |
|
| 941 | - { |
|
| 942 | - if ($this->yyTraceFILE) { |
|
| 943 | - fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 944 | - } |
|
| 945 | - while ($this->yyidx >= 0) { |
|
| 946 | - $this->yy_pop_parser_stack(); |
|
| 947 | - } |
|
| 948 | - #line 241 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 949 | - |
|
| 950 | - $this->successful = !$this->internalError; |
|
| 951 | - $this->internalError = false; |
|
| 952 | - $this->retvalue = $this->_retvalue; |
|
| 953 | - } |
|
| 954 | - |
|
| 955 | - public function doParse($yymajor, $yytokenvalue) |
|
| 956 | - { |
|
| 957 | - $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 958 | - |
|
| 959 | - if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 960 | - $this->yyidx = 0; |
|
| 961 | - $this->yyerrcnt = - 1; |
|
| 962 | - $x = new TPC_yyStackEntry; |
|
| 963 | - $x->stateno = 0; |
|
| 964 | - $x->major = 0; |
|
| 965 | - $this->yystack = array(); |
|
| 966 | - $this->yystack[] = $x; |
|
| 967 | - } |
|
| 968 | - $yyendofinput = ($yymajor == 0); |
|
| 969 | - |
|
| 970 | - if ($this->yyTraceFILE) { |
|
| 971 | - fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 972 | - } |
|
| 973 | - |
|
| 974 | - do { |
|
| 975 | - $yyact = $this->yy_find_shift_action($yymajor); |
|
| 976 | - if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 977 | - // force a syntax error |
|
| 978 | - $yyact = self::YY_ERROR_ACTION; |
|
| 979 | - } |
|
| 980 | - if ($yyact < self::YYNSTATE) { |
|
| 981 | - $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 982 | - $this->yyerrcnt --; |
|
| 983 | - if ($yyendofinput && $this->yyidx >= 0) { |
|
| 984 | - $yymajor = 0; |
|
| 985 | - } else { |
|
| 986 | - $yymajor = self::YYNOCODE; |
|
| 987 | - } |
|
| 988 | - } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 989 | - $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 990 | - } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 991 | - if ($this->yyTraceFILE) { |
|
| 992 | - fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 993 | - } |
|
| 994 | - if (self::YYERRORSYMBOL) { |
|
| 995 | - if ($this->yyerrcnt < 0) { |
|
| 996 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 997 | - } |
|
| 998 | - $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 999 | - if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 1000 | - if ($this->yyTraceFILE) { |
|
| 1001 | - fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 1002 | - $this->yyTokenName[ $yymajor ]); |
|
| 1003 | - } |
|
| 1004 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1005 | - $yymajor = self::YYNOCODE; |
|
| 1006 | - } else { |
|
| 1007 | - while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 1008 | - ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 1009 | - $this->yy_pop_parser_stack(); |
|
| 1010 | - } |
|
| 1011 | - if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 1012 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1013 | - $this->yy_parse_failed(); |
|
| 1014 | - $yymajor = self::YYNOCODE; |
|
| 1015 | - } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 1016 | - $u2 = 0; |
|
| 1017 | - $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 1018 | - } |
|
| 1019 | - } |
|
| 1020 | - $this->yyerrcnt = 3; |
|
| 1021 | - $yyerrorhit = 1; |
|
| 1022 | - } else { |
|
| 1023 | - if ($this->yyerrcnt <= 0) { |
|
| 1024 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 1025 | - } |
|
| 1026 | - $this->yyerrcnt = 3; |
|
| 1027 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1028 | - if ($yyendofinput) { |
|
| 1029 | - $this->yy_parse_failed(); |
|
| 1030 | - } |
|
| 1031 | - $yymajor = self::YYNOCODE; |
|
| 1032 | - } |
|
| 1033 | - } else { |
|
| 1034 | - $this->yy_accept(); |
|
| 1035 | - $yymajor = self::YYNOCODE; |
|
| 1036 | - } |
|
| 1037 | - } |
|
| 1038 | - while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 1039 | - } |
|
| 885 | + if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < $countYyRuleName) { |
|
| 886 | + fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 887 | + self::$yyRuleName[ $yyruleno ]); |
|
| 888 | + } |
|
| 889 | + |
|
| 890 | + $this->_retvalue = $yy_lefthand_side = null; |
|
| 891 | + if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 892 | + // call the action |
|
| 893 | + $this->_retvalue = null; |
|
| 894 | + $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 895 | + $yy_lefthand_side = $this->_retvalue; |
|
| 896 | + } |
|
| 897 | + $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 898 | + $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 899 | + $this->yyidx -= $yysize; |
|
| 900 | + for ($i = $yysize; $i; $i --) { |
|
| 901 | + // pop all of the right-hand side parameters |
|
| 902 | + array_pop($this->yystack); |
|
| 903 | + } |
|
| 904 | + $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 905 | + if ($yyact < self::YYNSTATE) { |
|
| 906 | + if (!$this->yyTraceFILE && $yysize) { |
|
| 907 | + $this->yyidx ++; |
|
| 908 | + $x = new TPC_yyStackEntry; |
|
| 909 | + $x->stateno = $yyact; |
|
| 910 | + $x->major = $yygoto; |
|
| 911 | + $x->minor = $yy_lefthand_side; |
|
| 912 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 913 | + } else { |
|
| 914 | + $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 915 | + } |
|
| 916 | + } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 917 | + $this->yy_accept(); |
|
| 918 | + } |
|
| 919 | + } |
|
| 920 | + |
|
| 921 | + public function yy_parse_failed() |
|
| 922 | + { |
|
| 923 | + if ($this->yyTraceFILE) { |
|
| 924 | + fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 925 | + } |
|
| 926 | + while ($this->yyidx >= 0) { |
|
| 927 | + $this->yy_pop_parser_stack(); |
|
| 928 | + } |
|
| 929 | + } |
|
| 930 | + |
|
| 931 | + public function yy_syntax_error($yymajor, $TOKEN) |
|
| 932 | + { |
|
| 933 | + #line 248 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 934 | + |
|
| 935 | + $this->internalError = true; |
|
| 936 | + $this->yymajor = $yymajor; |
|
| 937 | + $this->compiler->trigger_config_file_error(); |
|
| 938 | + } |
|
| 939 | + |
|
| 940 | + public function yy_accept() |
|
| 941 | + { |
|
| 942 | + if ($this->yyTraceFILE) { |
|
| 943 | + fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 944 | + } |
|
| 945 | + while ($this->yyidx >= 0) { |
|
| 946 | + $this->yy_pop_parser_stack(); |
|
| 947 | + } |
|
| 948 | + #line 241 "../smarty/lexer/smarty_internal_configfileparser.y" |
|
| 949 | + |
|
| 950 | + $this->successful = !$this->internalError; |
|
| 951 | + $this->internalError = false; |
|
| 952 | + $this->retvalue = $this->_retvalue; |
|
| 953 | + } |
|
| 954 | + |
|
| 955 | + public function doParse($yymajor, $yytokenvalue) |
|
| 956 | + { |
|
| 957 | + $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 958 | + |
|
| 959 | + if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 960 | + $this->yyidx = 0; |
|
| 961 | + $this->yyerrcnt = - 1; |
|
| 962 | + $x = new TPC_yyStackEntry; |
|
| 963 | + $x->stateno = 0; |
|
| 964 | + $x->major = 0; |
|
| 965 | + $this->yystack = array(); |
|
| 966 | + $this->yystack[] = $x; |
|
| 967 | + } |
|
| 968 | + $yyendofinput = ($yymajor == 0); |
|
| 969 | + |
|
| 970 | + if ($this->yyTraceFILE) { |
|
| 971 | + fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 972 | + } |
|
| 973 | + |
|
| 974 | + do { |
|
| 975 | + $yyact = $this->yy_find_shift_action($yymajor); |
|
| 976 | + if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 977 | + // force a syntax error |
|
| 978 | + $yyact = self::YY_ERROR_ACTION; |
|
| 979 | + } |
|
| 980 | + if ($yyact < self::YYNSTATE) { |
|
| 981 | + $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 982 | + $this->yyerrcnt --; |
|
| 983 | + if ($yyendofinput && $this->yyidx >= 0) { |
|
| 984 | + $yymajor = 0; |
|
| 985 | + } else { |
|
| 986 | + $yymajor = self::YYNOCODE; |
|
| 987 | + } |
|
| 988 | + } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 989 | + $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 990 | + } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 991 | + if ($this->yyTraceFILE) { |
|
| 992 | + fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 993 | + } |
|
| 994 | + if (self::YYERRORSYMBOL) { |
|
| 995 | + if ($this->yyerrcnt < 0) { |
|
| 996 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 997 | + } |
|
| 998 | + $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 999 | + if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 1000 | + if ($this->yyTraceFILE) { |
|
| 1001 | + fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 1002 | + $this->yyTokenName[ $yymajor ]); |
|
| 1003 | + } |
|
| 1004 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1005 | + $yymajor = self::YYNOCODE; |
|
| 1006 | + } else { |
|
| 1007 | + while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 1008 | + ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 1009 | + $this->yy_pop_parser_stack(); |
|
| 1010 | + } |
|
| 1011 | + if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 1012 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1013 | + $this->yy_parse_failed(); |
|
| 1014 | + $yymajor = self::YYNOCODE; |
|
| 1015 | + } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 1016 | + $u2 = 0; |
|
| 1017 | + $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 1018 | + } |
|
| 1019 | + } |
|
| 1020 | + $this->yyerrcnt = 3; |
|
| 1021 | + $yyerrorhit = 1; |
|
| 1022 | + } else { |
|
| 1023 | + if ($this->yyerrcnt <= 0) { |
|
| 1024 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 1025 | + } |
|
| 1026 | + $this->yyerrcnt = 3; |
|
| 1027 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 1028 | + if ($yyendofinput) { |
|
| 1029 | + $this->yy_parse_failed(); |
|
| 1030 | + } |
|
| 1031 | + $yymajor = self::YYNOCODE; |
|
| 1032 | + } |
|
| 1033 | + } else { |
|
| 1034 | + $this->yy_accept(); |
|
| 1035 | + $yymajor = self::YYNOCODE; |
|
| 1036 | + } |
|
| 1037 | + } |
|
| 1038 | + while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 1039 | + } |
|
| 1040 | 1040 | } |
| 1041 | 1041 | |
@@ -14,35 +14,35 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class wsdl extends nusoap_base { |
| 16 | 16 | // URL or filename of the root of this WSDL |
| 17 | - public $wsdl; |
|
| 18 | - // define internal arrays of bindings, ports, operations, messages, etc. |
|
| 19 | - public $schemas = array(); |
|
| 20 | - public $currentSchema; |
|
| 21 | - public $message = array(); |
|
| 22 | - public $complexTypes = array(); |
|
| 23 | - public $messages = array(); |
|
| 24 | - public $currentMessage; |
|
| 25 | - public $currentOperation; |
|
| 26 | - public $portTypes = array(); |
|
| 27 | - public $currentPortType; |
|
| 28 | - public $bindings = array(); |
|
| 29 | - public $currentBinding; |
|
| 30 | - public $ports = array(); |
|
| 31 | - public $currentPort; |
|
| 32 | - public $opData = array(); |
|
| 33 | - public $status = ''; |
|
| 34 | - public $documentation = false; |
|
| 35 | - public $endpoint = ''; |
|
| 36 | - // array of wsdl docs to import |
|
| 37 | - public $import = array(); |
|
| 38 | - // parser vars |
|
| 39 | - public $parser; |
|
| 40 | - public $position = 0; |
|
| 41 | - public $depth = 0; |
|
| 42 | - public $depth_array = array(); |
|
| 17 | + public $wsdl; |
|
| 18 | + // define internal arrays of bindings, ports, operations, messages, etc. |
|
| 19 | + public $schemas = array(); |
|
| 20 | + public $currentSchema; |
|
| 21 | + public $message = array(); |
|
| 22 | + public $complexTypes = array(); |
|
| 23 | + public $messages = array(); |
|
| 24 | + public $currentMessage; |
|
| 25 | + public $currentOperation; |
|
| 26 | + public $portTypes = array(); |
|
| 27 | + public $currentPortType; |
|
| 28 | + public $bindings = array(); |
|
| 29 | + public $currentBinding; |
|
| 30 | + public $ports = array(); |
|
| 31 | + public $currentPort; |
|
| 32 | + public $opData = array(); |
|
| 33 | + public $status = ''; |
|
| 34 | + public $documentation = false; |
|
| 35 | + public $endpoint = ''; |
|
| 36 | + // array of wsdl docs to import |
|
| 37 | + public $import = array(); |
|
| 38 | + // parser vars |
|
| 39 | + public $parser; |
|
| 40 | + public $position = 0; |
|
| 41 | + public $depth = 0; |
|
| 42 | + public $depth_array = array(); |
|
| 43 | 43 | // for getting wsdl |
| 44 | 44 | public $proxyhost = ''; |
| 45 | - public $proxyport = ''; |
|
| 45 | + public $proxyport = ''; |
|
| 46 | 46 | public $proxyusername = ''; |
| 47 | 47 | public $proxypassword = ''; |
| 48 | 48 | public $timeout = 0; |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | public $authtype = ''; // Type of HTTP authentication |
| 56 | 56 | public $certRequest = array(); // Certificate for HTTP SSL authentication |
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * constructor |
|
| 60 | - * |
|
| 61 | - * @param string $wsdl WSDL document URL |
|
| 58 | + /** |
|
| 59 | + * constructor |
|
| 60 | + * |
|
| 61 | + * @param string $wsdl WSDL document URL |
|
| 62 | 62 | * @param string $proxyhost |
| 63 | 63 | * @param string $proxyport |
| 64 | 64 | * @param string $proxyusername |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | * @param integer $response_timeout set the response timeout |
| 68 | 68 | * @param array $curl_options user-specified cURL options |
| 69 | 69 | * @param boolean $use_curl try to use cURL |
| 70 | - * @access public |
|
| 71 | - */ |
|
| 72 | - public function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ |
|
| 70 | + * @access public |
|
| 71 | + */ |
|
| 72 | + public function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ |
|
| 73 | 73 | parent::nusoap_base(); |
| 74 | 74 | $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); |
| 75 | - $this->proxyhost = $proxyhost; |
|
| 76 | - $this->proxyport = $proxyport; |
|
| 75 | + $this->proxyhost = $proxyhost; |
|
| 76 | + $this->proxyport = $proxyport; |
|
| 77 | 77 | $this->proxyusername = $proxyusername; |
| 78 | 78 | $this->proxypassword = $proxypassword; |
| 79 | 79 | $this->timeout = $timeout; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $this->curl_options = $curl_options; |
| 83 | 83 | $this->use_curl = $use_curl; |
| 84 | 84 | $this->fetchWSDL($wsdl); |
| 85 | - } |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * fetches the WSDL document and parses it |
@@ -92,29 +92,29 @@ discard block |
||
| 92 | 92 | public function fetchWSDL($wsdl) { |
| 93 | 93 | $this->debug("parse and process WSDL path=$wsdl"); |
| 94 | 94 | $this->wsdl = $wsdl; |
| 95 | - // parse wsdl file |
|
| 96 | - if ($this->wsdl != "") { |
|
| 97 | - $this->parseWSDL($this->wsdl); |
|
| 98 | - } |
|
| 99 | - $imported_urls = array(); |
|
| 100 | - $imported = 1; |
|
| 101 | - while ($imported > 0) { |
|
| 102 | - $imported = 0; |
|
| 103 | - // Schema imports |
|
| 104 | - foreach ($this->schemas as $ns => $list) { |
|
| 105 | - foreach ($list as $xs) { |
|
| 95 | + // parse wsdl file |
|
| 96 | + if ($this->wsdl != "") { |
|
| 97 | + $this->parseWSDL($this->wsdl); |
|
| 98 | + } |
|
| 99 | + $imported_urls = array(); |
|
| 100 | + $imported = 1; |
|
| 101 | + while ($imported > 0) { |
|
| 102 | + $imported = 0; |
|
| 103 | + // Schema imports |
|
| 104 | + foreach ($this->schemas as $ns => $list) { |
|
| 105 | + foreach ($list as $xs) { |
|
| 106 | 106 | $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
| 107 | - foreach ($xs->imports as $ns2 => $list2) { |
|
| 107 | + foreach ($xs->imports as $ns2 => $list2) { |
|
| 108 | 108 | $countList2 = count($list2); |
| 109 | - for ($ii = 0; $ii < $countList2; $ii++) { |
|
| 110 | - if (! $list2[$ii]['loaded']) { |
|
| 111 | - /* |
|
| 109 | + for ($ii = 0; $ii < $countList2; $ii++) { |
|
| 110 | + if (! $list2[$ii]['loaded']) { |
|
| 111 | + /* |
|
| 112 | 112 | * Substituted with line below |
| 113 | 113 | * because of error "Warning: attempt to modify property of non-object" |
| 114 | 114 | * GitHub issue #1 |
| 115 | 115 | */ |
| 116 | - $list2[$ii]['loaded'] = true; |
|
| 117 | - $url = $list2[$ii]['location']; |
|
| 116 | + $list2[$ii]['loaded'] = true; |
|
| 117 | + $url = $list2[$ii]['location']; |
|
| 118 | 118 | if ($url != '') { |
| 119 | 119 | $urlparts = parse_url($url); |
| 120 | 120 | if (!isset($urlparts['host'])) { |
@@ -122,26 +122,26 @@ discard block |
||
| 122 | 122 | substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; |
| 123 | 123 | } |
| 124 | 124 | if (! in_array($url, $imported_urls)) { |
| 125 | - $this->parseWSDL($url); |
|
| 126 | - $imported++; |
|
| 127 | - $imported_urls[] = $url; |
|
| 128 | - } |
|
| 125 | + $this->parseWSDL($url); |
|
| 126 | + $imported++; |
|
| 127 | + $imported_urls[] = $url; |
|
| 128 | + } |
|
| 129 | 129 | } else { |
| 130 | 130 | $this->debug("Unexpected scenario: empty URL for unloaded import"); |
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | - } |
|
| 135 | - } |
|
| 136 | - } |
|
| 137 | - // WSDL imports |
|
| 134 | + } |
|
| 135 | + } |
|
| 136 | + } |
|
| 137 | + // WSDL imports |
|
| 138 | 138 | $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
| 139 | - foreach ($this->import as $ns => $list) { |
|
| 139 | + foreach ($this->import as $ns => $list) { |
|
| 140 | 140 | $countList = count($list); |
| 141 | - for ($ii = 0; $ii < $countList; $ii++) { |
|
| 142 | - if (! $list[$ii]['loaded']) { |
|
| 143 | - $this->import[$ns][$ii]['loaded'] = true; |
|
| 144 | - $url = $list[$ii]['location']; |
|
| 141 | + for ($ii = 0; $ii < $countList; $ii++) { |
|
| 142 | + if (! $list[$ii]['loaded']) { |
|
| 143 | + $this->import[$ns][$ii]['loaded'] = true; |
|
| 144 | + $url = $list[$ii]['location']; |
|
| 145 | 145 | if ($url != '') { |
| 146 | 146 | $urlparts = parse_url($url); |
| 147 | 147 | if (!isset($urlparts['host'])) { |
@@ -149,70 +149,70 @@ discard block |
||
| 149 | 149 | substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; |
| 150 | 150 | } |
| 151 | 151 | if (! in_array($url, $imported_urls)) { |
| 152 | - $this->parseWSDL($url); |
|
| 153 | - $imported++; |
|
| 154 | - $imported_urls[] = $url; |
|
| 155 | - } |
|
| 152 | + $this->parseWSDL($url); |
|
| 153 | + $imported++; |
|
| 154 | + $imported_urls[] = $url; |
|
| 155 | + } |
|
| 156 | 156 | } else { |
| 157 | 157 | $this->debug("Unexpected scenario: empty URL for unloaded import"); |
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | - } |
|
| 161 | + } |
|
| 162 | 162 | } |
| 163 | - // add new data to operation data |
|
| 164 | - foreach($this->bindings as $binding => $bindingData) { |
|
| 165 | - if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { |
|
| 166 | - foreach($bindingData['operations'] as $operation => $data) { |
|
| 167 | - $this->debug('post-parse data gathering for ' . $operation); |
|
| 168 | - $this->bindings[$binding]['operations'][$operation]['input'] = |
|
| 163 | + // add new data to operation data |
|
| 164 | + foreach($this->bindings as $binding => $bindingData) { |
|
| 165 | + if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { |
|
| 166 | + foreach($bindingData['operations'] as $operation => $data) { |
|
| 167 | + $this->debug('post-parse data gathering for ' . $operation); |
|
| 168 | + $this->bindings[$binding]['operations'][$operation]['input'] = |
|
| 169 | 169 | isset($this->bindings[$binding]['operations'][$operation]['input']) ? |
| 170 | 170 | array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : |
| 171 | 171 | $this->portTypes[ $bindingData['portType'] ][$operation]['input']; |
| 172 | - $this->bindings[$binding]['operations'][$operation]['output'] = |
|
| 172 | + $this->bindings[$binding]['operations'][$operation]['output'] = |
|
| 173 | 173 | isset($this->bindings[$binding]['operations'][$operation]['output']) ? |
| 174 | 174 | array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : |
| 175 | 175 | $this->portTypes[ $bindingData['portType'] ][$operation]['output']; |
| 176 | - if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ |
|
| 176 | + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ |
|
| 177 | 177 | $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; |
| 178 | 178 | } |
| 179 | 179 | if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ |
| 180 | - $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; |
|
| 181 | - } |
|
| 182 | - // Set operation style if necessary, but do not override one already provided |
|
| 180 | + $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; |
|
| 181 | + } |
|
| 182 | + // Set operation style if necessary, but do not override one already provided |
|
| 183 | 183 | if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) { |
| 184 | - $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; |
|
| 185 | - } |
|
| 186 | - $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; |
|
| 187 | - $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; |
|
| 188 | - $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; |
|
| 189 | - } |
|
| 190 | - } |
|
| 191 | - } |
|
| 184 | + $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; |
|
| 185 | + } |
|
| 186 | + $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; |
|
| 187 | + $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; |
|
| 188 | + $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; |
|
| 189 | + } |
|
| 190 | + } |
|
| 191 | + } |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - /** |
|
| 195 | - * parses the wsdl document |
|
| 196 | - * |
|
| 197 | - * @param string $wsdl path or URL |
|
| 198 | - * @access private |
|
| 199 | - */ |
|
| 200 | - public function parseWSDL($wsdl = '') { |
|
| 194 | + /** |
|
| 195 | + * parses the wsdl document |
|
| 196 | + * |
|
| 197 | + * @param string $wsdl path or URL |
|
| 198 | + * @access private |
|
| 199 | + */ |
|
| 200 | + public function parseWSDL($wsdl = '') { |
|
| 201 | 201 | $this->debug("parse WSDL at path=$wsdl"); |
| 202 | 202 | |
| 203 | - if ($wsdl == '') { |
|
| 204 | - $this->debug('no wsdl passed to parseWSDL()!!'); |
|
| 205 | - $this->setError('no wsdl passed to parseWSDL()!!'); |
|
| 206 | - return false; |
|
| 207 | - } |
|
| 203 | + if ($wsdl == '') { |
|
| 204 | + $this->debug('no wsdl passed to parseWSDL()!!'); |
|
| 205 | + $this->setError('no wsdl passed to parseWSDL()!!'); |
|
| 206 | + return false; |
|
| 207 | + } |
|
| 208 | 208 | |
| 209 | - // parse $wsdl for url format |
|
| 210 | - $wsdl_props = parse_url($wsdl); |
|
| 209 | + // parse $wsdl for url format |
|
| 210 | + $wsdl_props = parse_url($wsdl); |
|
| 211 | 211 | |
| 212 | - if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { |
|
| 213 | - $this->debug('getting WSDL http(s) URL ' . $wsdl); |
|
| 214 | - // get wsdl |
|
| 215 | - $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); |
|
| 212 | + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { |
|
| 213 | + $this->debug('getting WSDL http(s) URL ' . $wsdl); |
|
| 214 | + // get wsdl |
|
| 215 | + $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); |
|
| 216 | 216 | $tr->request_method = 'GET'; |
| 217 | 217 | $tr->useSOAPAction = false; |
| 218 | 218 | if($this->proxyhost && $this->proxyport){ |
@@ -228,239 +228,239 @@ discard block |
||
| 228 | 228 | if($err = $tr->getError() ){ |
| 229 | 229 | $errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err; |
| 230 | 230 | $this->debug($errstr); |
| 231 | - $this->setError($errstr); |
|
| 231 | + $this->setError($errstr); |
|
| 232 | 232 | unset($tr); |
| 233 | - return false; |
|
| 233 | + return false; |
|
| 234 | 234 | } |
| 235 | 235 | unset($tr); |
| 236 | 236 | $this->debug("got WSDL URL"); |
| 237 | - } else { |
|
| 238 | - // $wsdl is not http(s), so treat it as a file URL or plain file path |
|
| 239 | - if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { |
|
| 240 | - $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; |
|
| 241 | - } else { |
|
| 242 | - $path = $wsdl; |
|
| 243 | - } |
|
| 244 | - $this->debug('getting WSDL file ' . $path); |
|
| 245 | - if ($fp = @fopen($path, 'r')) { |
|
| 246 | - $wsdl_string = ''; |
|
| 247 | - while ($data = fread($fp, 32768)) { |
|
| 248 | - $wsdl_string .= $data; |
|
| 249 | - } |
|
| 250 | - fclose($fp); |
|
| 251 | - } else { |
|
| 252 | - $errstr = "Bad path to WSDL file $path"; |
|
| 253 | - $this->debug($errstr); |
|
| 254 | - $this->setError($errstr); |
|
| 255 | - return false; |
|
| 256 | - } |
|
| 257 | - } |
|
| 258 | - $this->debug('Parse WSDL'); |
|
| 259 | - // end new code added |
|
| 260 | - // Create an XML parser. |
|
| 261 | - $this->parser = xml_parser_create(); |
|
| 262 | - // Set the options for parsing the XML data. |
|
| 263 | - // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); |
|
| 264 | - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); |
|
| 265 | - // Set the object for the parser. |
|
| 266 | - xml_set_object($this->parser, $this); |
|
| 267 | - // Set the element handlers for the parser. |
|
| 268 | - xml_set_element_handler($this->parser, 'start_element', 'end_element'); |
|
| 269 | - xml_set_character_data_handler($this->parser, 'character_data'); |
|
| 270 | - // Parse the XML file. |
|
| 271 | - if (!xml_parse($this->parser, $wsdl_string, true)) { |
|
| 272 | - // Display an error message. |
|
| 273 | - $errstr = sprintf( |
|
| 237 | + } else { |
|
| 238 | + // $wsdl is not http(s), so treat it as a file URL or plain file path |
|
| 239 | + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { |
|
| 240 | + $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; |
|
| 241 | + } else { |
|
| 242 | + $path = $wsdl; |
|
| 243 | + } |
|
| 244 | + $this->debug('getting WSDL file ' . $path); |
|
| 245 | + if ($fp = @fopen($path, 'r')) { |
|
| 246 | + $wsdl_string = ''; |
|
| 247 | + while ($data = fread($fp, 32768)) { |
|
| 248 | + $wsdl_string .= $data; |
|
| 249 | + } |
|
| 250 | + fclose($fp); |
|
| 251 | + } else { |
|
| 252 | + $errstr = "Bad path to WSDL file $path"; |
|
| 253 | + $this->debug($errstr); |
|
| 254 | + $this->setError($errstr); |
|
| 255 | + return false; |
|
| 256 | + } |
|
| 257 | + } |
|
| 258 | + $this->debug('Parse WSDL'); |
|
| 259 | + // end new code added |
|
| 260 | + // Create an XML parser. |
|
| 261 | + $this->parser = xml_parser_create(); |
|
| 262 | + // Set the options for parsing the XML data. |
|
| 263 | + // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); |
|
| 264 | + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); |
|
| 265 | + // Set the object for the parser. |
|
| 266 | + xml_set_object($this->parser, $this); |
|
| 267 | + // Set the element handlers for the parser. |
|
| 268 | + xml_set_element_handler($this->parser, 'start_element', 'end_element'); |
|
| 269 | + xml_set_character_data_handler($this->parser, 'character_data'); |
|
| 270 | + // Parse the XML file. |
|
| 271 | + if (!xml_parse($this->parser, $wsdl_string, true)) { |
|
| 272 | + // Display an error message. |
|
| 273 | + $errstr = sprintf( |
|
| 274 | 274 | 'XML error parsing WSDL from %s on line %d: %s', |
| 275 | 275 | $wsdl, |
| 276 | - xml_get_current_line_number($this->parser), |
|
| 277 | - xml_error_string(xml_get_error_code($this->parser)) |
|
| 278 | - ); |
|
| 279 | - $this->debug($errstr); |
|
| 276 | + xml_get_current_line_number($this->parser), |
|
| 277 | + xml_error_string(xml_get_error_code($this->parser)) |
|
| 278 | + ); |
|
| 279 | + $this->debug($errstr); |
|
| 280 | 280 | $this->debug("XML payload:\n" . $wsdl_string); |
| 281 | - $this->setError($errstr); |
|
| 282 | - return false; |
|
| 283 | - } |
|
| 281 | + $this->setError($errstr); |
|
| 282 | + return false; |
|
| 283 | + } |
|
| 284 | 284 | // free the parser |
| 285 | - xml_parser_free($this->parser); |
|
| 286 | - $this->debug('Parsing WSDL done'); |
|
| 285 | + xml_parser_free($this->parser); |
|
| 286 | + $this->debug('Parsing WSDL done'); |
|
| 287 | 287 | // catch wsdl parse errors |
| 288 | 288 | if($this->getError()){ |
| 289 | 289 | return false; |
| 290 | 290 | } |
| 291 | - return true; |
|
| 292 | - } |
|
| 291 | + return true; |
|
| 292 | + } |
|
| 293 | 293 | |
| 294 | - /** |
|
| 295 | - * start-element handler |
|
| 296 | - * |
|
| 297 | - * @param string $parser XML parser object |
|
| 298 | - * @param string $name element name |
|
| 299 | - * @param string $attrs associative array of attributes |
|
| 300 | - * @access private |
|
| 301 | - */ |
|
| 302 | - public function start_element($parser, $name, $attrs) |
|
| 303 | - { |
|
| 304 | - if ($this->status == 'schema') { |
|
| 305 | - $this->currentSchema->schemaStartElement($parser, $name, $attrs); |
|
| 306 | - $this->appendDebug($this->currentSchema->getDebug()); |
|
| 307 | - $this->currentSchema->clearDebug(); |
|
| 308 | - } elseif (preg_match('/schema$/', $name)) { |
|
| 309 | - $this->debug('Parsing WSDL schema'); |
|
| 310 | - $this->status = 'schema'; |
|
| 311 | - $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); |
|
| 312 | - $this->currentSchema->schemaStartElement($parser, $name, $attrs); |
|
| 313 | - $this->appendDebug($this->currentSchema->getDebug()); |
|
| 314 | - $this->currentSchema->clearDebug(); |
|
| 315 | - } else { |
|
| 316 | - // position in the total number of elements, starting from 0 |
|
| 317 | - $pos = $this->position++; |
|
| 318 | - $depth = $this->depth++; |
|
| 319 | - // set self as current value for this depth |
|
| 320 | - $this->depth_array[$depth] = $pos; |
|
| 321 | - $this->message[$pos] = array('cdata' => ''); |
|
| 322 | - // process attributes |
|
| 323 | - if (count($attrs) > 0) { |
|
| 294 | + /** |
|
| 295 | + * start-element handler |
|
| 296 | + * |
|
| 297 | + * @param string $parser XML parser object |
|
| 298 | + * @param string $name element name |
|
| 299 | + * @param string $attrs associative array of attributes |
|
| 300 | + * @access private |
|
| 301 | + */ |
|
| 302 | + public function start_element($parser, $name, $attrs) |
|
| 303 | + { |
|
| 304 | + if ($this->status == 'schema') { |
|
| 305 | + $this->currentSchema->schemaStartElement($parser, $name, $attrs); |
|
| 306 | + $this->appendDebug($this->currentSchema->getDebug()); |
|
| 307 | + $this->currentSchema->clearDebug(); |
|
| 308 | + } elseif (preg_match('/schema$/', $name)) { |
|
| 309 | + $this->debug('Parsing WSDL schema'); |
|
| 310 | + $this->status = 'schema'; |
|
| 311 | + $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); |
|
| 312 | + $this->currentSchema->schemaStartElement($parser, $name, $attrs); |
|
| 313 | + $this->appendDebug($this->currentSchema->getDebug()); |
|
| 314 | + $this->currentSchema->clearDebug(); |
|
| 315 | + } else { |
|
| 316 | + // position in the total number of elements, starting from 0 |
|
| 317 | + $pos = $this->position++; |
|
| 318 | + $depth = $this->depth++; |
|
| 319 | + // set self as current value for this depth |
|
| 320 | + $this->depth_array[$depth] = $pos; |
|
| 321 | + $this->message[$pos] = array('cdata' => ''); |
|
| 322 | + // process attributes |
|
| 323 | + if (count($attrs) > 0) { |
|
| 324 | 324 | // register namespace declarations |
| 325 | - foreach($attrs as $k => $v) { |
|
| 326 | - if (preg_match('/^xmlns/',$k)) { |
|
| 327 | - if ($ns_prefix = substr(strrchr($k, ':'), 1)) { |
|
| 328 | - $this->namespaces[$ns_prefix] = $v; |
|
| 329 | - } else { |
|
| 330 | - $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; |
|
| 331 | - } |
|
| 332 | - if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { |
|
| 333 | - $this->XMLSchemaVersion = $v; |
|
| 334 | - $this->namespaces['xsi'] = $v . '-instance'; |
|
| 335 | - } |
|
| 336 | - } |
|
| 337 | - } |
|
| 338 | - // expand each attribute prefix to its namespace |
|
| 339 | - foreach($attrs as $k => $v) { |
|
| 340 | - $k = strpos($k, ':') ? $this->expandQname($k) : $k; |
|
| 341 | - if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { |
|
| 342 | - $v = strpos($v, ':') ? $this->expandQname($v) : $v; |
|
| 343 | - } |
|
| 344 | - $eAttrs[$k] = $v; |
|
| 345 | - } |
|
| 346 | - $attrs = $eAttrs; |
|
| 347 | - } else { |
|
| 348 | - $attrs = array(); |
|
| 349 | - } |
|
| 350 | - // get element prefix, namespace and name |
|
| 351 | - if (preg_match('/:/', $name)) { |
|
| 352 | - // get ns prefix |
|
| 353 | - $prefix = substr($name, 0, strpos($name, ':')); |
|
| 354 | - // get ns |
|
| 355 | - $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; |
|
| 356 | - // get unqualified name |
|
| 357 | - $name = substr(strstr($name, ':'), 1); |
|
| 358 | - } |
|
| 325 | + foreach($attrs as $k => $v) { |
|
| 326 | + if (preg_match('/^xmlns/',$k)) { |
|
| 327 | + if ($ns_prefix = substr(strrchr($k, ':'), 1)) { |
|
| 328 | + $this->namespaces[$ns_prefix] = $v; |
|
| 329 | + } else { |
|
| 330 | + $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; |
|
| 331 | + } |
|
| 332 | + if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { |
|
| 333 | + $this->XMLSchemaVersion = $v; |
|
| 334 | + $this->namespaces['xsi'] = $v . '-instance'; |
|
| 335 | + } |
|
| 336 | + } |
|
| 337 | + } |
|
| 338 | + // expand each attribute prefix to its namespace |
|
| 339 | + foreach($attrs as $k => $v) { |
|
| 340 | + $k = strpos($k, ':') ? $this->expandQname($k) : $k; |
|
| 341 | + if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { |
|
| 342 | + $v = strpos($v, ':') ? $this->expandQname($v) : $v; |
|
| 343 | + } |
|
| 344 | + $eAttrs[$k] = $v; |
|
| 345 | + } |
|
| 346 | + $attrs = $eAttrs; |
|
| 347 | + } else { |
|
| 348 | + $attrs = array(); |
|
| 349 | + } |
|
| 350 | + // get element prefix, namespace and name |
|
| 351 | + if (preg_match('/:/', $name)) { |
|
| 352 | + // get ns prefix |
|
| 353 | + $prefix = substr($name, 0, strpos($name, ':')); |
|
| 354 | + // get ns |
|
| 355 | + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; |
|
| 356 | + // get unqualified name |
|
| 357 | + $name = substr(strstr($name, ':'), 1); |
|
| 358 | + } |
|
| 359 | 359 | // process attributes, expanding any prefixes to namespaces |
| 360 | - // find status, register data |
|
| 361 | - switch ($this->status) { |
|
| 362 | - case 'message': |
|
| 363 | - if ($name == 'part') { |
|
| 364 | - if (isset($attrs['type'])) { |
|
| 365 | - $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); |
|
| 366 | - $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; |
|
| 367 | - } |
|
| 368 | - if (isset($attrs['element'])) { |
|
| 369 | - $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); |
|
| 370 | - $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; |
|
| 371 | - } |
|
| 372 | - } |
|
| 373 | - break; |
|
| 374 | - case 'portType': |
|
| 375 | - switch ($name) { |
|
| 376 | - case 'operation': |
|
| 377 | - $this->currentPortOperation = $attrs['name']; |
|
| 378 | - $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); |
|
| 379 | - if (isset($attrs['parameterOrder'])) { |
|
| 380 | - $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; |
|
| 381 | - } |
|
| 382 | - break; |
|
| 383 | - case 'documentation': |
|
| 384 | - $this->documentation = true; |
|
| 385 | - break; |
|
| 386 | - // merge input/output data |
|
| 387 | - default: |
|
| 388 | - $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; |
|
| 389 | - $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; |
|
| 390 | - break; |
|
| 360 | + // find status, register data |
|
| 361 | + switch ($this->status) { |
|
| 362 | + case 'message': |
|
| 363 | + if ($name == 'part') { |
|
| 364 | + if (isset($attrs['type'])) { |
|
| 365 | + $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); |
|
| 366 | + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; |
|
| 367 | + } |
|
| 368 | + if (isset($attrs['element'])) { |
|
| 369 | + $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); |
|
| 370 | + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; |
|
| 371 | + } |
|
| 391 | 372 | } |
| 392 | - break; |
|
| 373 | + break; |
|
| 374 | + case 'portType': |
|
| 375 | + switch ($name) { |
|
| 376 | + case 'operation': |
|
| 377 | + $this->currentPortOperation = $attrs['name']; |
|
| 378 | + $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); |
|
| 379 | + if (isset($attrs['parameterOrder'])) { |
|
| 380 | + $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; |
|
| 381 | + } |
|
| 382 | + break; |
|
| 383 | + case 'documentation': |
|
| 384 | + $this->documentation = true; |
|
| 385 | + break; |
|
| 386 | + // merge input/output data |
|
| 387 | + default: |
|
| 388 | + $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; |
|
| 389 | + $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; |
|
| 390 | + break; |
|
| 391 | + } |
|
| 392 | + break; |
|
| 393 | 393 | case 'binding': |
| 394 | - switch ($name) { |
|
| 395 | - case 'binding': |
|
| 396 | - // get ns prefix |
|
| 397 | - if (isset($attrs['style'])) { |
|
| 398 | - $this->bindings[$this->currentBinding]['prefix'] = $prefix; |
|
| 399 | - } |
|
| 400 | - $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); |
|
| 401 | - break; |
|
| 394 | + switch ($name) { |
|
| 395 | + case 'binding': |
|
| 396 | + // get ns prefix |
|
| 397 | + if (isset($attrs['style'])) { |
|
| 398 | + $this->bindings[$this->currentBinding]['prefix'] = $prefix; |
|
| 399 | + } |
|
| 400 | + $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); |
|
| 401 | + break; |
|
| 402 | 402 | case 'header': |
| 403 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; |
|
| 404 | - break; |
|
| 403 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; |
|
| 404 | + break; |
|
| 405 | 405 | case 'operation': |
| 406 | - if (isset($attrs['soapAction'])) { |
|
| 407 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; |
|
| 408 | - } |
|
| 409 | - if (isset($attrs['style'])) { |
|
| 410 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; |
|
| 411 | - } |
|
| 412 | - if (isset($attrs['name'])) { |
|
| 413 | - $this->currentOperation = $attrs['name']; |
|
| 414 | - $this->debug("current binding operation: $this->currentOperation"); |
|
| 415 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; |
|
| 416 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; |
|
| 417 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; |
|
| 418 | - } |
|
| 419 | - break; |
|
| 406 | + if (isset($attrs['soapAction'])) { |
|
| 407 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; |
|
| 408 | + } |
|
| 409 | + if (isset($attrs['style'])) { |
|
| 410 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; |
|
| 411 | + } |
|
| 412 | + if (isset($attrs['name'])) { |
|
| 413 | + $this->currentOperation = $attrs['name']; |
|
| 414 | + $this->debug("current binding operation: $this->currentOperation"); |
|
| 415 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; |
|
| 416 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; |
|
| 417 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; |
|
| 418 | + } |
|
| 419 | + break; |
|
| 420 | 420 | case 'input': |
| 421 | - $this->opStatus = 'input'; |
|
| 422 | - break; |
|
| 421 | + $this->opStatus = 'input'; |
|
| 422 | + break; |
|
| 423 | 423 | case 'output': |
| 424 | - $this->opStatus = 'output'; |
|
| 425 | - break; |
|
| 424 | + $this->opStatus = 'output'; |
|
| 425 | + break; |
|
| 426 | 426 | case 'body': |
| 427 | - if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { |
|
| 428 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); |
|
| 429 | - } else { |
|
| 430 | - $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; |
|
| 431 | - } |
|
| 432 | - break; |
|
| 427 | + if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { |
|
| 428 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); |
|
| 429 | + } else { |
|
| 430 | + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; |
|
| 431 | + } |
|
| 432 | + break; |
|
| 433 | 433 | } |
| 434 | 434 | break; |
| 435 | 435 | case 'service': |
| 436 | 436 | switch ($name) { |
| 437 | - case 'port': |
|
| 438 | - $this->currentPort = $attrs['name']; |
|
| 439 | - $this->debug('current port: ' . $this->currentPort); |
|
| 440 | - $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); |
|
| 437 | + case 'port': |
|
| 438 | + $this->currentPort = $attrs['name']; |
|
| 439 | + $this->debug('current port: ' . $this->currentPort); |
|
| 440 | + $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); |
|
| 441 | 441 | |
| 442 | - break; |
|
| 443 | - case 'address': |
|
| 444 | - $this->ports[$this->currentPort]['location'] = $attrs['location']; |
|
| 445 | - $this->ports[$this->currentPort]['bindingType'] = $namespace; |
|
| 446 | - $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; |
|
| 447 | - $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; |
|
| 448 | - break; |
|
| 442 | + break; |
|
| 443 | + case 'address': |
|
| 444 | + $this->ports[$this->currentPort]['location'] = $attrs['location']; |
|
| 445 | + $this->ports[$this->currentPort]['bindingType'] = $namespace; |
|
| 446 | + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; |
|
| 447 | + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; |
|
| 448 | + break; |
|
| 449 | 449 | } |
| 450 | 450 | break; |
| 451 | 451 | } |
| 452 | 452 | // set status |
| 453 | 453 | switch ($name) { |
| 454 | 454 | case 'import': |
| 455 | - if (isset($attrs['location'])) { |
|
| 456 | - $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); |
|
| 457 | - $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); |
|
| 455 | + if (isset($attrs['location'])) { |
|
| 456 | + $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); |
|
| 457 | + $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); |
|
| 458 | 458 | } else { |
| 459 | - $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); |
|
| 459 | + $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); |
|
| 460 | 460 | if (! $this->getPrefixFromNamespace($attrs['namespace'])) { |
| 461 | 461 | $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; |
| 462 | 462 | } |
| 463 | - $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); |
|
| 463 | + $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); |
|
| 464 | 464 | } |
| 465 | 465 | break; |
| 466 | 466 | //wait for schema |
@@ -481,9 +481,9 @@ discard block |
||
| 481 | 481 | if (isset($attrs['name'])) { |
| 482 | 482 | // get binding name |
| 483 | 483 | if (strpos($attrs['name'], ':')) { |
| 484 | - $this->currentBinding = $this->getLocalPart($attrs['name']); |
|
| 484 | + $this->currentBinding = $this->getLocalPart($attrs['name']); |
|
| 485 | 485 | } else { |
| 486 | - $this->currentBinding = $attrs['name']; |
|
| 486 | + $this->currentBinding = $attrs['name']; |
|
| 487 | 487 | } |
| 488 | 488 | $this->status = 'binding'; |
| 489 | 489 | $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); |
@@ -505,20 +505,20 @@ discard block |
||
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | /** |
| 508 | - * end-element handler |
|
| 509 | - * |
|
| 510 | - * @param string $parser XML parser object |
|
| 511 | - * @param string $name element name |
|
| 512 | - * @access private |
|
| 513 | - */ |
|
| 508 | + * end-element handler |
|
| 509 | + * |
|
| 510 | + * @param string $parser XML parser object |
|
| 511 | + * @param string $name element name |
|
| 512 | + * @access private |
|
| 513 | + */ |
|
| 514 | 514 | public function end_element($parser, $name){ |
| 515 | 515 | // unset schema status |
| 516 | 516 | if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { |
| 517 | 517 | $this->status = ""; |
| 518 | - $this->appendDebug($this->currentSchema->getDebug()); |
|
| 519 | - $this->currentSchema->clearDebug(); |
|
| 518 | + $this->appendDebug($this->currentSchema->getDebug()); |
|
| 519 | + $this->currentSchema->clearDebug(); |
|
| 520 | 520 | $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; |
| 521 | - $this->debug('Parsing WSDL schema done'); |
|
| 521 | + $this->debug('Parsing WSDL schema done'); |
|
| 522 | 522 | } |
| 523 | 523 | if ($this->status == 'schema') { |
| 524 | 524 | $this->currentSchema->schemaEndElement($parser, $name); |
@@ -551,14 +551,14 @@ discard block |
||
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | /** |
| 554 | - * if authenticating, set user credentials here |
|
| 555 | - * |
|
| 556 | - * @param string $username |
|
| 557 | - * @param string $password |
|
| 558 | - * @param string $authtype (basic|digest|certificate|ntlm) |
|
| 559 | - * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) |
|
| 560 | - * @access public |
|
| 561 | - */ |
|
| 554 | + * if authenticating, set user credentials here |
|
| 555 | + * |
|
| 556 | + * @param string $username |
|
| 557 | + * @param string $password |
|
| 558 | + * @param string $authtype (basic|digest|certificate|ntlm) |
|
| 559 | + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) |
|
| 560 | + * @access public |
|
| 561 | + */ |
|
| 562 | 562 | public function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { |
| 563 | 563 | $this->debug("setCredentials username=$username authtype=$authtype certRequest="); |
| 564 | 564 | $this->appendDebug($this->varDump($certRequest)); |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | // note that we could/should also check the namespace here |
| 639 | 639 | if ($operation == $bOperation) { |
| 640 | 640 | $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; |
| 641 | - return $opData; |
|
| 641 | + return $opData; |
|
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | 644 | } |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | // loop through operations for the binding |
| 667 | 667 | foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { |
| 668 | 668 | if ($opData['soapAction'] == $soapAction) { |
| 669 | - return $opData; |
|
| 669 | + return $opData; |
|
| 670 | 670 | } |
| 671 | 671 | } |
| 672 | 672 | } |
@@ -674,23 +674,23 @@ discard block |
||
| 674 | 674 | } |
| 675 | 675 | |
| 676 | 676 | /** |
| 677 | - * returns an array of information about a given type |
|
| 678 | - * returns false if no type exists by the given name |
|
| 679 | - * |
|
| 680 | - * typeDef = array( |
|
| 681 | - * 'elements' => array(), // refs to elements array |
|
| 682 | - * 'restrictionBase' => '', |
|
| 683 | - * 'phpType' => '', |
|
| 684 | - * 'order' => '(sequence|all)', |
|
| 685 | - * 'attrs' => array() // refs to attributes array |
|
| 686 | - * ) |
|
| 687 | - * |
|
| 688 | - * @param string $type the type |
|
| 689 | - * @param string $ns namespace (not prefix) of the type |
|
| 690 | - * @return mixed |
|
| 691 | - * @access public |
|
| 692 | - * @see nusoap_xmlschema |
|
| 693 | - */ |
|
| 677 | + * returns an array of information about a given type |
|
| 678 | + * returns false if no type exists by the given name |
|
| 679 | + * |
|
| 680 | + * typeDef = array( |
|
| 681 | + * 'elements' => array(), // refs to elements array |
|
| 682 | + * 'restrictionBase' => '', |
|
| 683 | + * 'phpType' => '', |
|
| 684 | + * 'order' => '(sequence|all)', |
|
| 685 | + * 'attrs' => array() // refs to attributes array |
|
| 686 | + * ) |
|
| 687 | + * |
|
| 688 | + * @param string $type the type |
|
| 689 | + * @param string $ns namespace (not prefix) of the type |
|
| 690 | + * @return mixed |
|
| 691 | + * @access public |
|
| 692 | + * @see nusoap_xmlschema |
|
| 693 | + */ |
|
| 694 | 694 | public function getTypeDef($type, $ns) { |
| 695 | 695 | $this->debug("in getTypeDef: type=$type, ns=$ns"); |
| 696 | 696 | if ((! $ns) && isset($this->namespaces['tns'])) { |
@@ -747,13 +747,13 @@ discard block |
||
| 747 | 747 | return false; |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | - /** |
|
| 751 | - * prints html description of services |
|
| 752 | - * |
|
| 753 | - * @access private |
|
| 754 | - */ |
|
| 755 | - public function webDescription(){ |
|
| 756 | - global $HTTP_SERVER_VARS; |
|
| 750 | + /** |
|
| 751 | + * prints html description of services |
|
| 752 | + * |
|
| 753 | + * @access private |
|
| 754 | + */ |
|
| 755 | + public function webDescription(){ |
|
| 756 | + global $HTTP_SERVER_VARS; |
|
| 757 | 757 | |
| 758 | 758 | if (isset($_SERVER)) { |
| 759 | 759 | $PHP_SELF = $_SERVER['PHP_SELF']; |
@@ -847,29 +847,29 @@ discard block |
||
| 847 | 847 | Click on an operation name to view it's details.</p> |
| 848 | 848 | <ul>'; |
| 849 | 849 | foreach($this->getOperations() as $op => $data){ |
| 850 | - $b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>"; |
|
| 851 | - // create hidden div |
|
| 852 | - $b .= "<div id='$op' class='hidden'> |
|
| 850 | + $b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>"; |
|
| 851 | + // create hidden div |
|
| 852 | + $b .= "<div id='$op' class='hidden'> |
|
| 853 | 853 | <a href='#' onclick='popout()'><font color='#ffffff'>Close</font></a><br><br>"; |
| 854 | - foreach($data as $donnie => $marie){ // loop through opdata |
|
| 854 | + foreach($data as $donnie => $marie){ // loop through opdata |
|
| 855 | 855 | if($donnie == 'input' || $donnie == 'output'){ // show input/output data |
| 856 | - $b .= "<font color='white'>".ucfirst($donnie).':</font><br>'; |
|
| 857 | - foreach($marie as $captain => $tenille){ // loop through data |
|
| 856 | + $b .= "<font color='white'>".ucfirst($donnie).':</font><br>'; |
|
| 857 | + foreach($marie as $captain => $tenille){ // loop through data |
|
| 858 | 858 | if($captain == 'parts'){ // loop thru parts |
| 859 | - $b .= " $captain:<br>"; |
|
| 860 | - //if(is_array($tenille)){ |
|
| 861 | - foreach($tenille as $joanie => $chachi){ |
|
| 859 | + $b .= " $captain:<br>"; |
|
| 860 | + //if(is_array($tenille)){ |
|
| 861 | + foreach($tenille as $joanie => $chachi){ |
|
| 862 | 862 | $b .= " $joanie: $chachi<br>"; |
| 863 | - } |
|
| 864 | - //} |
|
| 863 | + } |
|
| 864 | + //} |
|
| 865 | 865 | } else { |
| 866 | - $b .= " $captain: $tenille<br>"; |
|
| 866 | + $b .= " $captain: $tenille<br>"; |
|
| 867 | 867 | } |
| 868 | - } |
|
| 868 | + } |
|
| 869 | 869 | } else { |
| 870 | - $b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>"; |
|
| 870 | + $b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>"; |
|
| 871 | 871 | } |
| 872 | - } |
|
| 872 | + } |
|
| 873 | 873 | $b .= '</div>'; |
| 874 | 874 | } |
| 875 | 875 | $b .= ' |
@@ -877,15 +877,15 @@ discard block |
||
| 877 | 877 | </div> |
| 878 | 878 | </div></body></html>'; |
| 879 | 879 | return $b; |
| 880 | - } |
|
| 880 | + } |
|
| 881 | 881 | |
| 882 | 882 | /** |
| 883 | - * serialize the parsed wsdl |
|
| 884 | - * |
|
| 885 | - * @param mixed $debug whether to put debug=1 in endpoint URL |
|
| 886 | - * @return string serialization of WSDL |
|
| 887 | - * @access public |
|
| 888 | - */ |
|
| 883 | + * serialize the parsed wsdl |
|
| 884 | + * |
|
| 885 | + * @param mixed $debug whether to put debug=1 in endpoint URL |
|
| 886 | + * @return string serialization of WSDL |
|
| 887 | + * @access public |
|
| 888 | + */ |
|
| 889 | 889 | public function serialize($debug = 0) |
| 890 | 890 | { |
| 891 | 891 | $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>'; |
@@ -931,19 +931,19 @@ discard block |
||
| 931 | 931 | foreach($msgParts as $partName => $partType) { |
| 932 | 932 | // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>'; |
| 933 | 933 | if (strpos($partType, ':')) { |
| 934 | - $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); |
|
| 934 | + $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); |
|
| 935 | 935 | } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { |
| 936 | - // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>'; |
|
| 937 | - $typePrefix = 'xsd'; |
|
| 936 | + // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>'; |
|
| 937 | + $typePrefix = 'xsd'; |
|
| 938 | 938 | } else { |
| 939 | - foreach($this->typemap as $ns => $types) { |
|
| 940 | - if (isset($types[$partType])) { |
|
| 941 | - $typePrefix = $this->getPrefixFromNamespace($ns); |
|
| 942 | - } |
|
| 943 | - } |
|
| 944 | - if (!isset($typePrefix)) { |
|
| 945 | - die("$partType has no namespace!"); |
|
| 946 | - } |
|
| 939 | + foreach($this->typemap as $ns => $types) { |
|
| 940 | + if (isset($types[$partType])) { |
|
| 941 | + $typePrefix = $this->getPrefixFromNamespace($ns); |
|
| 942 | + } |
|
| 943 | + } |
|
| 944 | + if (!isset($typePrefix)) { |
|
| 945 | + die("$partType has no namespace!"); |
|
| 946 | + } |
|
| 947 | 947 | } |
| 948 | 948 | $ns = $this->getNamespaceFromPrefix($typePrefix); |
| 949 | 949 | $localPart = $this->getLocalPart($partType); |
@@ -988,7 +988,7 @@ discard block |
||
| 988 | 988 | $binding_xml .= "\n" . ' </operation>'; |
| 989 | 989 | $portType_xml .= "\n" . ' <operation name="' . $opParts['name'] . '"'; |
| 990 | 990 | if (isset($opParts['parameterOrder'])) { |
| 991 | - $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"'; |
|
| 991 | + $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"'; |
|
| 992 | 992 | } |
| 993 | 993 | $portType_xml .= '>'; |
| 994 | 994 | if(isset($opParts['documentation']) && $opParts['documentation'] != '') { |
@@ -1283,34 +1283,34 @@ discard block |
||
| 1283 | 1283 | } |
| 1284 | 1284 | |
| 1285 | 1285 | // if a soapval has been supplied, let its type override the WSDL |
| 1286 | - if (is_object($value) && get_class($value) == 'soapval') { |
|
| 1287 | - if ($value->type_ns) { |
|
| 1288 | - $type = $value->type_ns . ':' . $value->type; |
|
| 1289 | - $forceType = true; |
|
| 1290 | - $this->debug("in serializeType: soapval overrides type to $type"); |
|
| 1291 | - } elseif ($value->type) { |
|
| 1292 | - $type = $value->type; |
|
| 1293 | - $forceType = true; |
|
| 1294 | - $this->debug("in serializeType: soapval overrides type to $type"); |
|
| 1295 | - } else { |
|
| 1296 | - $forceType = false; |
|
| 1297 | - $this->debug("in serializeType: soapval does not override type"); |
|
| 1298 | - } |
|
| 1299 | - $attrs = $value->attributes; |
|
| 1300 | - $value = $value->value; |
|
| 1301 | - $this->debug("in serializeType: soapval overrides value to $value"); |
|
| 1302 | - if ($attrs) { |
|
| 1303 | - if (!is_array($value)) { |
|
| 1304 | - $value['!'] = $value; |
|
| 1305 | - } |
|
| 1306 | - foreach ($attrs as $n => $v) { |
|
| 1307 | - $value['!' . $n] = $v; |
|
| 1308 | - } |
|
| 1309 | - $this->debug("in serializeType: soapval provides attributes"); |
|
| 1310 | - } |
|
| 1311 | - } else { |
|
| 1312 | - $forceType = false; |
|
| 1313 | - } |
|
| 1286 | + if (is_object($value) && get_class($value) == 'soapval') { |
|
| 1287 | + if ($value->type_ns) { |
|
| 1288 | + $type = $value->type_ns . ':' . $value->type; |
|
| 1289 | + $forceType = true; |
|
| 1290 | + $this->debug("in serializeType: soapval overrides type to $type"); |
|
| 1291 | + } elseif ($value->type) { |
|
| 1292 | + $type = $value->type; |
|
| 1293 | + $forceType = true; |
|
| 1294 | + $this->debug("in serializeType: soapval overrides type to $type"); |
|
| 1295 | + } else { |
|
| 1296 | + $forceType = false; |
|
| 1297 | + $this->debug("in serializeType: soapval does not override type"); |
|
| 1298 | + } |
|
| 1299 | + $attrs = $value->attributes; |
|
| 1300 | + $value = $value->value; |
|
| 1301 | + $this->debug("in serializeType: soapval overrides value to $value"); |
|
| 1302 | + if ($attrs) { |
|
| 1303 | + if (!is_array($value)) { |
|
| 1304 | + $value['!'] = $value; |
|
| 1305 | + } |
|
| 1306 | + foreach ($attrs as $n => $v) { |
|
| 1307 | + $value['!' . $n] = $v; |
|
| 1308 | + } |
|
| 1309 | + $this->debug("in serializeType: soapval provides attributes"); |
|
| 1310 | + } |
|
| 1311 | + } else { |
|
| 1312 | + $forceType = false; |
|
| 1313 | + } |
|
| 1314 | 1314 | |
| 1315 | 1315 | $xml = ''; |
| 1316 | 1316 | if (strpos($type, ':')) { |
@@ -1342,8 +1342,8 @@ discard block |
||
| 1342 | 1342 | // JBoss/Axis does this sometimes |
| 1343 | 1343 | return $this->serialize_val($value, $name, false, false, false, false, $use); |
| 1344 | 1344 | } |
| 1345 | - if ($uqType == 'boolean') { |
|
| 1346 | - if ((is_string($value) && $value == 'false') || (! $value)) { |
|
| 1345 | + if ($uqType == 'boolean') { |
|
| 1346 | + if ((is_string($value) && $value == 'false') || (! $value)) { |
|
| 1347 | 1347 | $value = 'false'; |
| 1348 | 1348 | } else { |
| 1349 | 1349 | $value = 'true'; |
@@ -1526,9 +1526,9 @@ discard block |
||
| 1526 | 1526 | $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); |
| 1527 | 1527 | //if (strpos($typeDef['arrayType'], ':') ) { |
| 1528 | 1528 | if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { |
| 1529 | - $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); |
|
| 1529 | + $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); |
|
| 1530 | 1530 | } else { |
| 1531 | - $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); |
|
| 1531 | + $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); |
|
| 1532 | 1532 | } |
| 1533 | 1533 | } |
| 1534 | 1534 | } else { |
@@ -1684,7 +1684,7 @@ discard block |
||
| 1684 | 1684 | } |
| 1685 | 1685 | // if user took advantage of a minOccurs=0, then only serialize named parameters |
| 1686 | 1686 | if (isset($optionals) |
| 1687 | - && (!isset($xvalue[$eName])) |
|
| 1687 | + && (!isset($xvalue[$eName])) |
|
| 1688 | 1688 | && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') |
| 1689 | 1689 | ){ |
| 1690 | 1690 | if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { |
@@ -1695,9 +1695,9 @@ discard block |
||
| 1695 | 1695 | } else { |
| 1696 | 1696 | // get value |
| 1697 | 1697 | if (isset($xvalue[$eName])) { |
| 1698 | - $v = $xvalue[$eName]; |
|
| 1698 | + $v = $xvalue[$eName]; |
|
| 1699 | 1699 | } else { |
| 1700 | - $v = null; |
|
| 1700 | + $v = null; |
|
| 1701 | 1701 | } |
| 1702 | 1702 | if (isset($attrs['form'])) { |
| 1703 | 1703 | $unqualified = ($attrs['form'] == 'unqualified'); |
@@ -1709,24 +1709,24 @@ discard block |
||
| 1709 | 1709 | foreach ($vv as $k => $v) { |
| 1710 | 1710 | if (isset($attrs['type']) || isset($attrs['ref'])) { |
| 1711 | 1711 | // serialize schema-defined type |
| 1712 | - $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1712 | + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1713 | 1713 | } else { |
| 1714 | 1714 | // serialize generic type (can this ever really happen?) |
| 1715 | - $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); |
|
| 1716 | - $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); |
|
| 1715 | + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); |
|
| 1716 | + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); |
|
| 1717 | 1717 | } |
| 1718 | 1718 | } |
| 1719 | 1719 | } else { |
| 1720 | 1720 | if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') { |
| 1721 | 1721 | } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') { |
| 1722 | - $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1722 | + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1723 | 1723 | } elseif (isset($attrs['type']) || isset($attrs['ref'])) { |
| 1724 | 1724 | // serialize schema-defined type |
| 1725 | - $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1725 | + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); |
|
| 1726 | 1726 | } else { |
| 1727 | 1727 | // serialize generic type (can this ever really happen?) |
| 1728 | - $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); |
|
| 1729 | - $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); |
|
| 1728 | + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); |
|
| 1729 | + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); |
|
| 1730 | 1730 | } |
| 1731 | 1731 | } |
| 1732 | 1732 | } |
@@ -1738,46 +1738,46 @@ discard block |
||
| 1738 | 1738 | } |
| 1739 | 1739 | |
| 1740 | 1740 | /** |
| 1741 | - * adds an XML Schema complex type to the WSDL types |
|
| 1742 | - * |
|
| 1743 | - * @param string $name |
|
| 1744 | - * @param string $typeClass (complexType|simpleType|attribute) |
|
| 1745 | - * @param string $phpType currently supported are array and struct (php assoc array) |
|
| 1746 | - * @param string $compositor (all|sequence|choice) |
|
| 1747 | - * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) |
|
| 1748 | - * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) |
|
| 1749 | - * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) |
|
| 1750 | - * @param string $arrayType as namespace:name (xsd:string) |
|
| 1751 | - * @see nusoap_xmlschema |
|
| 1752 | - * @access public |
|
| 1753 | - */ |
|
| 1741 | + * adds an XML Schema complex type to the WSDL types |
|
| 1742 | + * |
|
| 1743 | + * @param string $name |
|
| 1744 | + * @param string $typeClass (complexType|simpleType|attribute) |
|
| 1745 | + * @param string $phpType currently supported are array and struct (php assoc array) |
|
| 1746 | + * @param string $compositor (all|sequence|choice) |
|
| 1747 | + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) |
|
| 1748 | + * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) |
|
| 1749 | + * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) |
|
| 1750 | + * @param string $arrayType as namespace:name (xsd:string) |
|
| 1751 | + * @see nusoap_xmlschema |
|
| 1752 | + * @access public |
|
| 1753 | + */ |
|
| 1754 | 1754 | public function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { |
| 1755 | 1755 | if (count($elements) > 0) { |
| 1756 | 1756 | $eElements = array(); |
| 1757 | - foreach($elements as $n => $e){ |
|
| 1758 | - // expand each element |
|
| 1759 | - $ee = array(); |
|
| 1760 | - foreach ($e as $k => $v) { |
|
| 1761 | - $k = strpos($k,':') ? $this->expandQname($k) : $k; |
|
| 1762 | - $v = strpos($v,':') ? $this->expandQname($v) : $v; |
|
| 1763 | - $ee[$k] = $v; |
|
| 1764 | - } |
|
| 1765 | - $eElements[$n] = $ee; |
|
| 1766 | - } |
|
| 1767 | - $elements = $eElements; |
|
| 1757 | + foreach($elements as $n => $e){ |
|
| 1758 | + // expand each element |
|
| 1759 | + $ee = array(); |
|
| 1760 | + foreach ($e as $k => $v) { |
|
| 1761 | + $k = strpos($k,':') ? $this->expandQname($k) : $k; |
|
| 1762 | + $v = strpos($v,':') ? $this->expandQname($v) : $v; |
|
| 1763 | + $ee[$k] = $v; |
|
| 1764 | + } |
|
| 1765 | + $eElements[$n] = $ee; |
|
| 1766 | + } |
|
| 1767 | + $elements = $eElements; |
|
| 1768 | 1768 | } |
| 1769 | 1769 | |
| 1770 | 1770 | if (count($attrs) > 0) { |
| 1771 | - foreach($attrs as $n => $a){ |
|
| 1772 | - // expand each attribute |
|
| 1773 | - foreach ($a as $k => $v) { |
|
| 1774 | - $k = strpos($k,':') ? $this->expandQname($k) : $k; |
|
| 1775 | - $v = strpos($v,':') ? $this->expandQname($v) : $v; |
|
| 1776 | - $aa[$k] = $v; |
|
| 1777 | - } |
|
| 1778 | - $eAttrs[$n] = $aa; |
|
| 1779 | - } |
|
| 1780 | - $attrs = $eAttrs; |
|
| 1771 | + foreach($attrs as $n => $a){ |
|
| 1772 | + // expand each attribute |
|
| 1773 | + foreach ($a as $k => $v) { |
|
| 1774 | + $k = strpos($k,':') ? $this->expandQname($k) : $k; |
|
| 1775 | + $v = strpos($v,':') ? $this->expandQname($v) : $v; |
|
| 1776 | + $aa[$k] = $v; |
|
| 1777 | + } |
|
| 1778 | + $eAttrs[$n] = $aa; |
|
| 1779 | + } |
|
| 1780 | + $attrs = $eAttrs; |
|
| 1781 | 1781 | } |
| 1782 | 1782 | |
| 1783 | 1783 | $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; |
@@ -1788,16 +1788,16 @@ discard block |
||
| 1788 | 1788 | } |
| 1789 | 1789 | |
| 1790 | 1790 | /** |
| 1791 | - * adds an XML Schema simple type to the WSDL types |
|
| 1792 | - * |
|
| 1793 | - * @param string $name |
|
| 1794 | - * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) |
|
| 1795 | - * @param string $typeClass (should always be simpleType) |
|
| 1796 | - * @param string $phpType (should always be scalar) |
|
| 1797 | - * @param array $enumeration array of values |
|
| 1798 | - * @see nusoap_xmlschema |
|
| 1799 | - * @access public |
|
| 1800 | - */ |
|
| 1791 | + * adds an XML Schema simple type to the WSDL types |
|
| 1792 | + * |
|
| 1793 | + * @param string $name |
|
| 1794 | + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) |
|
| 1795 | + * @param string $typeClass (should always be simpleType) |
|
| 1796 | + * @param string $phpType (should always be scalar) |
|
| 1797 | + * @param array $enumeration array of values |
|
| 1798 | + * @see nusoap_xmlschema |
|
| 1799 | + * @access public |
|
| 1800 | + */ |
|
| 1801 | 1801 | public function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { |
| 1802 | 1802 | $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; |
| 1803 | 1803 | |
@@ -1806,31 +1806,31 @@ discard block |
||
| 1806 | 1806 | } |
| 1807 | 1807 | |
| 1808 | 1808 | /** |
| 1809 | - * adds an element to the WSDL types |
|
| 1810 | - * |
|
| 1811 | - * @param array $attrs attributes that must include name and type |
|
| 1812 | - * @see nusoap_xmlschema |
|
| 1813 | - * @access public |
|
| 1814 | - */ |
|
| 1809 | + * adds an element to the WSDL types |
|
| 1810 | + * |
|
| 1811 | + * @param array $attrs attributes that must include name and type |
|
| 1812 | + * @see nusoap_xmlschema |
|
| 1813 | + * @access public |
|
| 1814 | + */ |
|
| 1815 | 1815 | public function addElement($attrs) { |
| 1816 | 1816 | $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; |
| 1817 | 1817 | $this->schemas[$typens][0]->addElement($attrs); |
| 1818 | 1818 | } |
| 1819 | 1819 | |
| 1820 | 1820 | /** |
| 1821 | - * register an operation with the server |
|
| 1822 | - * |
|
| 1823 | - * @param string $name operation (method) name |
|
| 1824 | - * @param array $in assoc array of input values: key = param name, value = param type |
|
| 1825 | - * @param array $out assoc array of output values: key = param name, value = param type |
|
| 1826 | - * @param string $namespace optional The namespace for the operation |
|
| 1827 | - * @param string $soapaction optional The soapaction for the operation |
|
| 1828 | - * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically |
|
| 1829 | - * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) |
|
| 1830 | - * @param string $documentation optional The description to include in the WSDL |
|
| 1831 | - * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) |
|
| 1832 | - * @access public |
|
| 1833 | - */ |
|
| 1821 | + * register an operation with the server |
|
| 1822 | + * |
|
| 1823 | + * @param string $name operation (method) name |
|
| 1824 | + * @param array $in assoc array of input values: key = param name, value = param type |
|
| 1825 | + * @param array $out assoc array of output values: key = param name, value = param type |
|
| 1826 | + * @param string $namespace optional The namespace for the operation |
|
| 1827 | + * @param string $soapaction optional The soapaction for the operation |
|
| 1828 | + * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically |
|
| 1829 | + * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) |
|
| 1830 | + * @param string $documentation optional The description to include in the WSDL |
|
| 1831 | + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) |
|
| 1832 | + * @access public |
|
| 1833 | + */ |
|
| 1834 | 1834 | public function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ |
| 1835 | 1835 | if ($use == 'encoded' && $encodingStyle == '') { |
| 1836 | 1836 | $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; |
@@ -1889,8 +1889,8 @@ discard block |
||
| 1889 | 1889 | $this->messages[$name.'Request'][$pName] = $pType; |
| 1890 | 1890 | } |
| 1891 | 1891 | } else { |
| 1892 | - $this->messages[$name.'Request']= '0'; |
|
| 1893 | - } |
|
| 1892 | + $this->messages[$name.'Request']= '0'; |
|
| 1893 | + } |
|
| 1894 | 1894 | if($out) |
| 1895 | 1895 | { |
| 1896 | 1896 | foreach($out as $pName => $pType) |
@@ -1901,8 +1901,8 @@ discard block |
||
| 1901 | 1901 | $this->messages[$name.'Response'][$pName] = $pType; |
| 1902 | 1902 | } |
| 1903 | 1903 | } else { |
| 1904 | - $this->messages[$name.'Response']= '0'; |
|
| 1905 | - } |
|
| 1904 | + $this->messages[$name.'Response']= '0'; |
|
| 1905 | + } |
|
| 1906 | 1906 | return true; |
| 1907 | 1907 | } |
| 1908 | 1908 | } |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | namespace Sabre\VObject; |
| 4 | 4 | |
| 5 | 5 | use |
| 6 | - InvalidArgumentException; |
|
| 6 | + InvalidArgumentException; |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * This is the CLI interface for sabre-vobject. |
@@ -14,759 +14,759 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class Cli { |
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * No output. |
|
| 19 | - * |
|
| 20 | - * @var bool |
|
| 21 | - */ |
|
| 22 | - protected $quiet = false; |
|
| 23 | - |
|
| 24 | - /** |
|
| 25 | - * Help display. |
|
| 26 | - * |
|
| 27 | - * @var bool |
|
| 28 | - */ |
|
| 29 | - protected $showHelp = false; |
|
| 30 | - |
|
| 31 | - /** |
|
| 32 | - * Wether to spit out 'mimedir' or 'json' format. |
|
| 33 | - * |
|
| 34 | - * @var string |
|
| 35 | - */ |
|
| 36 | - protected $format; |
|
| 37 | - |
|
| 38 | - /** |
|
| 39 | - * JSON pretty print. |
|
| 40 | - * |
|
| 41 | - * @var bool |
|
| 42 | - */ |
|
| 43 | - protected $pretty; |
|
| 44 | - |
|
| 45 | - /** |
|
| 46 | - * Source file. |
|
| 47 | - * |
|
| 48 | - * @var string |
|
| 49 | - */ |
|
| 50 | - protected $inputPath; |
|
| 51 | - |
|
| 52 | - /** |
|
| 53 | - * Destination file. |
|
| 54 | - * |
|
| 55 | - * @var string |
|
| 56 | - */ |
|
| 57 | - protected $outputPath; |
|
| 58 | - |
|
| 59 | - /** |
|
| 60 | - * output stream. |
|
| 61 | - * |
|
| 62 | - * @var resource |
|
| 63 | - */ |
|
| 64 | - protected $stdout; |
|
| 65 | - |
|
| 66 | - /** |
|
| 67 | - * stdin. |
|
| 68 | - * |
|
| 69 | - * @var resource |
|
| 70 | - */ |
|
| 71 | - protected $stdin; |
|
| 72 | - |
|
| 73 | - /** |
|
| 74 | - * stderr. |
|
| 75 | - * |
|
| 76 | - * @var resource |
|
| 77 | - */ |
|
| 78 | - protected $stderr; |
|
| 79 | - |
|
| 80 | - /** |
|
| 81 | - * Input format (one of json or mimedir). |
|
| 82 | - * |
|
| 83 | - * @var string |
|
| 84 | - */ |
|
| 85 | - protected $inputFormat; |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * Makes the parser less strict. |
|
| 89 | - * |
|
| 90 | - * @var bool |
|
| 91 | - */ |
|
| 92 | - protected $forgiving = false; |
|
| 93 | - |
|
| 94 | - /** |
|
| 95 | - * Main function. |
|
| 96 | - * |
|
| 97 | - * @return int |
|
| 98 | - */ |
|
| 99 | - public function main(array $argv) { |
|
| 100 | - |
|
| 101 | - // @codeCoverageIgnoreStart |
|
| 102 | - // We cannot easily test this, so we'll skip it. Pretty basic anyway. |
|
| 103 | - |
|
| 104 | - if (!$this->stderr) { |
|
| 105 | - $this->stderr = fopen('php://stderr', 'w'); |
|
| 106 | - } |
|
| 107 | - if (!$this->stdout) { |
|
| 108 | - $this->stdout = fopen('php://stdout', 'w'); |
|
| 109 | - } |
|
| 110 | - if (!$this->stdin) { |
|
| 111 | - $this->stdin = fopen('php://stdin', 'r'); |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - // @codeCoverageIgnoreEnd |
|
| 115 | - |
|
| 116 | - |
|
| 117 | - try { |
|
| 118 | - |
|
| 119 | - list($options, $positional) = $this->parseArguments($argv); |
|
| 120 | - |
|
| 121 | - if (isset($options['q'])) { |
|
| 122 | - $this->quiet = true; |
|
| 123 | - } |
|
| 124 | - $this->log($this->colorize('green', "sabre/vobject ") . $this->colorize('yellow', Version::VERSION)); |
|
| 125 | - |
|
| 126 | - foreach ($options as $name => $value) { |
|
| 127 | - |
|
| 128 | - switch ($name) { |
|
| 129 | - |
|
| 130 | - case 'q' : |
|
| 131 | - // Already handled earlier. |
|
| 132 | - break; |
|
| 133 | - case 'h' : |
|
| 134 | - case 'help' : |
|
| 135 | - $this->showHelp(); |
|
| 136 | - return 0; |
|
| 137 | - break; |
|
| 138 | - case 'format' : |
|
| 139 | - switch ($value) { |
|
| 140 | - |
|
| 141 | - // jcard/jcal documents |
|
| 142 | - case 'jcard' : |
|
| 143 | - case 'jcal' : |
|
| 144 | - |
|
| 145 | - // specific document versions |
|
| 146 | - case 'vcard21' : |
|
| 147 | - case 'vcard30' : |
|
| 148 | - case 'vcard40' : |
|
| 149 | - case 'icalendar20' : |
|
| 150 | - |
|
| 151 | - // specific formats |
|
| 152 | - case 'json' : |
|
| 153 | - case 'mimedir' : |
|
| 154 | - |
|
| 155 | - // icalendar/vcad |
|
| 156 | - case 'icalendar' : |
|
| 157 | - case 'vcard' : |
|
| 158 | - $this->format = $value; |
|
| 159 | - break; |
|
| 160 | - |
|
| 161 | - default : |
|
| 162 | - throw new InvalidArgumentException('Unknown format: ' . $value); |
|
| 163 | - |
|
| 164 | - } |
|
| 165 | - break; |
|
| 166 | - case 'pretty' : |
|
| 167 | - if (version_compare(PHP_VERSION, '5.4.0') >= 0) { |
|
| 168 | - $this->pretty = true; |
|
| 169 | - } |
|
| 170 | - break; |
|
| 171 | - case 'forgiving' : |
|
| 172 | - $this->forgiving = true; |
|
| 173 | - break; |
|
| 174 | - case 'inputformat' : |
|
| 175 | - switch ($value) { |
|
| 176 | - // json formats |
|
| 177 | - case 'jcard' : |
|
| 178 | - case 'jcal' : |
|
| 179 | - case 'json' : |
|
| 180 | - $this->inputFormat = 'json'; |
|
| 181 | - break; |
|
| 182 | - |
|
| 183 | - // mimedir formats |
|
| 184 | - case 'mimedir' : |
|
| 185 | - case 'icalendar' : |
|
| 186 | - case 'vcard' : |
|
| 187 | - case 'vcard21' : |
|
| 188 | - case 'vcard30' : |
|
| 189 | - case 'vcard40' : |
|
| 190 | - case 'icalendar20' : |
|
| 191 | - |
|
| 192 | - $this->inputFormat = 'mimedir'; |
|
| 193 | - break; |
|
| 194 | - |
|
| 195 | - default : |
|
| 196 | - throw new InvalidArgumentException('Unknown format: ' . $value); |
|
| 197 | - |
|
| 198 | - } |
|
| 199 | - break; |
|
| 200 | - default : |
|
| 201 | - throw new InvalidArgumentException('Unknown option: ' . $name); |
|
| 202 | - |
|
| 203 | - } |
|
| 204 | - |
|
| 205 | - } |
|
| 206 | - |
|
| 207 | - if (count($positional) === 0) { |
|
| 208 | - $this->showHelp(); |
|
| 209 | - return 1; |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - if (count($positional) === 1) { |
|
| 213 | - throw new InvalidArgumentException('Inputfile is a required argument'); |
|
| 214 | - } |
|
| 215 | - |
|
| 216 | - if (count($positional) > 3) { |
|
| 217 | - throw new InvalidArgumentException('Too many arguments'); |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - if (!in_array($positional[0], ['validate', 'repair', 'convert', 'color'])) { |
|
| 221 | - throw new InvalidArgumentException('Uknown command: ' . $positional[0]); |
|
| 222 | - } |
|
| 223 | - |
|
| 224 | - } catch (InvalidArgumentException $e) { |
|
| 225 | - $this->showHelp(); |
|
| 226 | - $this->log('Error: ' . $e->getMessage(), 'red'); |
|
| 227 | - return 1; |
|
| 228 | - } |
|
| 229 | - |
|
| 230 | - $command = $positional[0]; |
|
| 231 | - |
|
| 232 | - $this->inputPath = $positional[1]; |
|
| 233 | - $this->outputPath = isset($positional[2]) ? $positional[2] : '-'; |
|
| 234 | - |
|
| 235 | - if ($this->outputPath !== '-') { |
|
| 236 | - $this->stdout = fopen($this->outputPath, 'w'); |
|
| 237 | - } |
|
| 238 | - |
|
| 239 | - if (!$this->inputFormat) { |
|
| 240 | - if (substr($this->inputPath, -5) === '.json') { |
|
| 241 | - $this->inputFormat = 'json'; |
|
| 242 | - } else { |
|
| 243 | - $this->inputFormat = 'mimedir'; |
|
| 244 | - } |
|
| 245 | - } |
|
| 246 | - if (!$this->format) { |
|
| 247 | - if (substr($this->outputPath, -5) === '.json') { |
|
| 248 | - $this->format = 'json'; |
|
| 249 | - } else { |
|
| 250 | - $this->format = 'mimedir'; |
|
| 251 | - } |
|
| 252 | - } |
|
| 253 | - |
|
| 254 | - |
|
| 255 | - $realCode = 0; |
|
| 256 | - |
|
| 257 | - try { |
|
| 258 | - |
|
| 259 | - while ($input = $this->readInput()) { |
|
| 260 | - |
|
| 261 | - $returnCode = $this->$command($input); |
|
| 262 | - if ($returnCode !== 0) $realCode = $returnCode; |
|
| 263 | - |
|
| 264 | - } |
|
| 265 | - |
|
| 266 | - } catch (EofException $e) { |
|
| 267 | - // end of file |
|
| 268 | - } catch (\Exception $e) { |
|
| 269 | - $this->log('Error: ' . $e->getMessage(), 'red'); |
|
| 270 | - return 2; |
|
| 271 | - } |
|
| 272 | - |
|
| 273 | - return $realCode; |
|
| 274 | - |
|
| 275 | - } |
|
| 276 | - |
|
| 277 | - /** |
|
| 278 | - * Shows the help message. |
|
| 279 | - * |
|
| 280 | - * @return void |
|
| 281 | - */ |
|
| 282 | - protected function showHelp() { |
|
| 283 | - |
|
| 284 | - $this->log('Usage:', 'yellow'); |
|
| 285 | - $this->log(" vobject [options] command [arguments]"); |
|
| 286 | - $this->log(''); |
|
| 287 | - $this->log('Options:', 'yellow'); |
|
| 288 | - $this->log($this->colorize('green', ' -q ') . "Don't output anything."); |
|
| 289 | - $this->log($this->colorize('green', ' -help -h ') . "Display this help message."); |
|
| 290 | - $this->log($this->colorize('green', ' --format ') . "Convert to a specific format. Must be one of: vcard, vcard21,"); |
|
| 291 | - $this->log($this->colorize('green', ' --forgiving ') . "Makes the parser less strict."); |
|
| 292 | - $this->log(" vcard30, vcard40, icalendar20, jcal, jcard, json, mimedir."); |
|
| 293 | - $this->log($this->colorize('green', ' --inputformat ') . "If the input format cannot be guessed from the extension, it"); |
|
| 294 | - $this->log(" must be specified here."); |
|
| 295 | - // Only PHP 5.4 and up |
|
| 296 | - if (version_compare(PHP_VERSION, '5.4.0') >= 0) { |
|
| 297 | - $this->log($this->colorize('green', ' --pretty ') . "json pretty-print."); |
|
| 298 | - } |
|
| 299 | - $this->log(''); |
|
| 300 | - $this->log('Commands:', 'yellow'); |
|
| 301 | - $this->log($this->colorize('green', ' validate') . ' source_file Validates a file for correctness.'); |
|
| 302 | - $this->log($this->colorize('green', ' repair') . ' source_file [output_file] Repairs a file.'); |
|
| 303 | - $this->log($this->colorize('green', ' convert') . ' source_file [output_file] Converts a file.'); |
|
| 304 | - $this->log($this->colorize('green', ' color') . ' source_file Colorize a file, useful for debbugging.'); |
|
| 305 | - $this->log( |
|
| 306 | - <<<HELP |
|
| 17 | + /** |
|
| 18 | + * No output. |
|
| 19 | + * |
|
| 20 | + * @var bool |
|
| 21 | + */ |
|
| 22 | + protected $quiet = false; |
|
| 23 | + |
|
| 24 | + /** |
|
| 25 | + * Help display. |
|
| 26 | + * |
|
| 27 | + * @var bool |
|
| 28 | + */ |
|
| 29 | + protected $showHelp = false; |
|
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * Wether to spit out 'mimedir' or 'json' format. |
|
| 33 | + * |
|
| 34 | + * @var string |
|
| 35 | + */ |
|
| 36 | + protected $format; |
|
| 37 | + |
|
| 38 | + /** |
|
| 39 | + * JSON pretty print. |
|
| 40 | + * |
|
| 41 | + * @var bool |
|
| 42 | + */ |
|
| 43 | + protected $pretty; |
|
| 44 | + |
|
| 45 | + /** |
|
| 46 | + * Source file. |
|
| 47 | + * |
|
| 48 | + * @var string |
|
| 49 | + */ |
|
| 50 | + protected $inputPath; |
|
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * Destination file. |
|
| 54 | + * |
|
| 55 | + * @var string |
|
| 56 | + */ |
|
| 57 | + protected $outputPath; |
|
| 58 | + |
|
| 59 | + /** |
|
| 60 | + * output stream. |
|
| 61 | + * |
|
| 62 | + * @var resource |
|
| 63 | + */ |
|
| 64 | + protected $stdout; |
|
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * stdin. |
|
| 68 | + * |
|
| 69 | + * @var resource |
|
| 70 | + */ |
|
| 71 | + protected $stdin; |
|
| 72 | + |
|
| 73 | + /** |
|
| 74 | + * stderr. |
|
| 75 | + * |
|
| 76 | + * @var resource |
|
| 77 | + */ |
|
| 78 | + protected $stderr; |
|
| 79 | + |
|
| 80 | + /** |
|
| 81 | + * Input format (one of json or mimedir). |
|
| 82 | + * |
|
| 83 | + * @var string |
|
| 84 | + */ |
|
| 85 | + protected $inputFormat; |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * Makes the parser less strict. |
|
| 89 | + * |
|
| 90 | + * @var bool |
|
| 91 | + */ |
|
| 92 | + protected $forgiving = false; |
|
| 93 | + |
|
| 94 | + /** |
|
| 95 | + * Main function. |
|
| 96 | + * |
|
| 97 | + * @return int |
|
| 98 | + */ |
|
| 99 | + public function main(array $argv) { |
|
| 100 | + |
|
| 101 | + // @codeCoverageIgnoreStart |
|
| 102 | + // We cannot easily test this, so we'll skip it. Pretty basic anyway. |
|
| 103 | + |
|
| 104 | + if (!$this->stderr) { |
|
| 105 | + $this->stderr = fopen('php://stderr', 'w'); |
|
| 106 | + } |
|
| 107 | + if (!$this->stdout) { |
|
| 108 | + $this->stdout = fopen('php://stdout', 'w'); |
|
| 109 | + } |
|
| 110 | + if (!$this->stdin) { |
|
| 111 | + $this->stdin = fopen('php://stdin', 'r'); |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + // @codeCoverageIgnoreEnd |
|
| 115 | + |
|
| 116 | + |
|
| 117 | + try { |
|
| 118 | + |
|
| 119 | + list($options, $positional) = $this->parseArguments($argv); |
|
| 120 | + |
|
| 121 | + if (isset($options['q'])) { |
|
| 122 | + $this->quiet = true; |
|
| 123 | + } |
|
| 124 | + $this->log($this->colorize('green', "sabre/vobject ") . $this->colorize('yellow', Version::VERSION)); |
|
| 125 | + |
|
| 126 | + foreach ($options as $name => $value) { |
|
| 127 | + |
|
| 128 | + switch ($name) { |
|
| 129 | + |
|
| 130 | + case 'q' : |
|
| 131 | + // Already handled earlier. |
|
| 132 | + break; |
|
| 133 | + case 'h' : |
|
| 134 | + case 'help' : |
|
| 135 | + $this->showHelp(); |
|
| 136 | + return 0; |
|
| 137 | + break; |
|
| 138 | + case 'format' : |
|
| 139 | + switch ($value) { |
|
| 140 | + |
|
| 141 | + // jcard/jcal documents |
|
| 142 | + case 'jcard' : |
|
| 143 | + case 'jcal' : |
|
| 144 | + |
|
| 145 | + // specific document versions |
|
| 146 | + case 'vcard21' : |
|
| 147 | + case 'vcard30' : |
|
| 148 | + case 'vcard40' : |
|
| 149 | + case 'icalendar20' : |
|
| 150 | + |
|
| 151 | + // specific formats |
|
| 152 | + case 'json' : |
|
| 153 | + case 'mimedir' : |
|
| 154 | + |
|
| 155 | + // icalendar/vcad |
|
| 156 | + case 'icalendar' : |
|
| 157 | + case 'vcard' : |
|
| 158 | + $this->format = $value; |
|
| 159 | + break; |
|
| 160 | + |
|
| 161 | + default : |
|
| 162 | + throw new InvalidArgumentException('Unknown format: ' . $value); |
|
| 163 | + |
|
| 164 | + } |
|
| 165 | + break; |
|
| 166 | + case 'pretty' : |
|
| 167 | + if (version_compare(PHP_VERSION, '5.4.0') >= 0) { |
|
| 168 | + $this->pretty = true; |
|
| 169 | + } |
|
| 170 | + break; |
|
| 171 | + case 'forgiving' : |
|
| 172 | + $this->forgiving = true; |
|
| 173 | + break; |
|
| 174 | + case 'inputformat' : |
|
| 175 | + switch ($value) { |
|
| 176 | + // json formats |
|
| 177 | + case 'jcard' : |
|
| 178 | + case 'jcal' : |
|
| 179 | + case 'json' : |
|
| 180 | + $this->inputFormat = 'json'; |
|
| 181 | + break; |
|
| 182 | + |
|
| 183 | + // mimedir formats |
|
| 184 | + case 'mimedir' : |
|
| 185 | + case 'icalendar' : |
|
| 186 | + case 'vcard' : |
|
| 187 | + case 'vcard21' : |
|
| 188 | + case 'vcard30' : |
|
| 189 | + case 'vcard40' : |
|
| 190 | + case 'icalendar20' : |
|
| 191 | + |
|
| 192 | + $this->inputFormat = 'mimedir'; |
|
| 193 | + break; |
|
| 194 | + |
|
| 195 | + default : |
|
| 196 | + throw new InvalidArgumentException('Unknown format: ' . $value); |
|
| 197 | + |
|
| 198 | + } |
|
| 199 | + break; |
|
| 200 | + default : |
|
| 201 | + throw new InvalidArgumentException('Unknown option: ' . $name); |
|
| 202 | + |
|
| 203 | + } |
|
| 204 | + |
|
| 205 | + } |
|
| 206 | + |
|
| 207 | + if (count($positional) === 0) { |
|
| 208 | + $this->showHelp(); |
|
| 209 | + return 1; |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + if (count($positional) === 1) { |
|
| 213 | + throw new InvalidArgumentException('Inputfile is a required argument'); |
|
| 214 | + } |
|
| 215 | + |
|
| 216 | + if (count($positional) > 3) { |
|
| 217 | + throw new InvalidArgumentException('Too many arguments'); |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + if (!in_array($positional[0], ['validate', 'repair', 'convert', 'color'])) { |
|
| 221 | + throw new InvalidArgumentException('Uknown command: ' . $positional[0]); |
|
| 222 | + } |
|
| 223 | + |
|
| 224 | + } catch (InvalidArgumentException $e) { |
|
| 225 | + $this->showHelp(); |
|
| 226 | + $this->log('Error: ' . $e->getMessage(), 'red'); |
|
| 227 | + return 1; |
|
| 228 | + } |
|
| 229 | + |
|
| 230 | + $command = $positional[0]; |
|
| 231 | + |
|
| 232 | + $this->inputPath = $positional[1]; |
|
| 233 | + $this->outputPath = isset($positional[2]) ? $positional[2] : '-'; |
|
| 234 | + |
|
| 235 | + if ($this->outputPath !== '-') { |
|
| 236 | + $this->stdout = fopen($this->outputPath, 'w'); |
|
| 237 | + } |
|
| 238 | + |
|
| 239 | + if (!$this->inputFormat) { |
|
| 240 | + if (substr($this->inputPath, -5) === '.json') { |
|
| 241 | + $this->inputFormat = 'json'; |
|
| 242 | + } else { |
|
| 243 | + $this->inputFormat = 'mimedir'; |
|
| 244 | + } |
|
| 245 | + } |
|
| 246 | + if (!$this->format) { |
|
| 247 | + if (substr($this->outputPath, -5) === '.json') { |
|
| 248 | + $this->format = 'json'; |
|
| 249 | + } else { |
|
| 250 | + $this->format = 'mimedir'; |
|
| 251 | + } |
|
| 252 | + } |
|
| 253 | + |
|
| 254 | + |
|
| 255 | + $realCode = 0; |
|
| 256 | + |
|
| 257 | + try { |
|
| 258 | + |
|
| 259 | + while ($input = $this->readInput()) { |
|
| 260 | + |
|
| 261 | + $returnCode = $this->$command($input); |
|
| 262 | + if ($returnCode !== 0) $realCode = $returnCode; |
|
| 263 | + |
|
| 264 | + } |
|
| 265 | + |
|
| 266 | + } catch (EofException $e) { |
|
| 267 | + // end of file |
|
| 268 | + } catch (\Exception $e) { |
|
| 269 | + $this->log('Error: ' . $e->getMessage(), 'red'); |
|
| 270 | + return 2; |
|
| 271 | + } |
|
| 272 | + |
|
| 273 | + return $realCode; |
|
| 274 | + |
|
| 275 | + } |
|
| 276 | + |
|
| 277 | + /** |
|
| 278 | + * Shows the help message. |
|
| 279 | + * |
|
| 280 | + * @return void |
|
| 281 | + */ |
|
| 282 | + protected function showHelp() { |
|
| 283 | + |
|
| 284 | + $this->log('Usage:', 'yellow'); |
|
| 285 | + $this->log(" vobject [options] command [arguments]"); |
|
| 286 | + $this->log(''); |
|
| 287 | + $this->log('Options:', 'yellow'); |
|
| 288 | + $this->log($this->colorize('green', ' -q ') . "Don't output anything."); |
|
| 289 | + $this->log($this->colorize('green', ' -help -h ') . "Display this help message."); |
|
| 290 | + $this->log($this->colorize('green', ' --format ') . "Convert to a specific format. Must be one of: vcard, vcard21,"); |
|
| 291 | + $this->log($this->colorize('green', ' --forgiving ') . "Makes the parser less strict."); |
|
| 292 | + $this->log(" vcard30, vcard40, icalendar20, jcal, jcard, json, mimedir."); |
|
| 293 | + $this->log($this->colorize('green', ' --inputformat ') . "If the input format cannot be guessed from the extension, it"); |
|
| 294 | + $this->log(" must be specified here."); |
|
| 295 | + // Only PHP 5.4 and up |
|
| 296 | + if (version_compare(PHP_VERSION, '5.4.0') >= 0) { |
|
| 297 | + $this->log($this->colorize('green', ' --pretty ') . "json pretty-print."); |
|
| 298 | + } |
|
| 299 | + $this->log(''); |
|
| 300 | + $this->log('Commands:', 'yellow'); |
|
| 301 | + $this->log($this->colorize('green', ' validate') . ' source_file Validates a file for correctness.'); |
|
| 302 | + $this->log($this->colorize('green', ' repair') . ' source_file [output_file] Repairs a file.'); |
|
| 303 | + $this->log($this->colorize('green', ' convert') . ' source_file [output_file] Converts a file.'); |
|
| 304 | + $this->log($this->colorize('green', ' color') . ' source_file Colorize a file, useful for debbugging.'); |
|
| 305 | + $this->log( |
|
| 306 | + <<<HELP |
|
| 307 | 307 | |
| 308 | 308 | If source_file is set as '-', STDIN will be used. |
| 309 | 309 | If output_file is omitted, STDOUT will be used. |
| 310 | 310 | All other output is sent to STDERR. |
| 311 | 311 | |
| 312 | 312 | HELP |
| 313 | - ); |
|
| 314 | - |
|
| 315 | - $this->log('Examples:', 'yellow'); |
|
| 316 | - $this->log(' vobject convert contact.vcf contact.json'); |
|
| 317 | - $this->log(' vobject convert --format=vcard40 old.vcf new.vcf'); |
|
| 318 | - $this->log(' vobject convert --inputformat=json --format=mimedir - -'); |
|
| 319 | - $this->log(' vobject color calendar.ics'); |
|
| 320 | - $this->log(''); |
|
| 321 | - $this->log('https://github.com/fruux/sabre-vobject', 'purple'); |
|
| 322 | - |
|
| 323 | - } |
|
| 324 | - |
|
| 325 | - /** |
|
| 326 | - * Validates a VObject file. |
|
| 327 | - * |
|
| 328 | - * @param Component $vObj |
|
| 329 | - * |
|
| 330 | - * @return int |
|
| 331 | - */ |
|
| 332 | - protected function validate(Component $vObj) { |
|
| 333 | - |
|
| 334 | - $returnCode = 0; |
|
| 335 | - |
|
| 336 | - switch ($vObj->name) { |
|
| 337 | - case 'VCALENDAR' : |
|
| 338 | - $this->log("iCalendar: " . (string)$vObj->VERSION); |
|
| 339 | - break; |
|
| 340 | - case 'VCARD' : |
|
| 341 | - $this->log("vCard: " . (string)$vObj->VERSION); |
|
| 342 | - break; |
|
| 343 | - } |
|
| 344 | - |
|
| 345 | - $warnings = $vObj->validate(); |
|
| 346 | - if (!count($warnings)) { |
|
| 347 | - $this->log(" No warnings!"); |
|
| 348 | - } else { |
|
| 349 | - |
|
| 350 | - $levels = [ |
|
| 351 | - 1 => 'REPAIRED', |
|
| 352 | - 2 => 'WARNING', |
|
| 353 | - 3 => 'ERROR', |
|
| 354 | - ]; |
|
| 355 | - $returnCode = 2; |
|
| 356 | - foreach ($warnings as $warn) { |
|
| 357 | - |
|
| 358 | - $extra = ''; |
|
| 359 | - if ($warn['node'] instanceof Property) { |
|
| 360 | - $extra = ' (property: "' . $warn['node']->name . '")'; |
|
| 361 | - } |
|
| 362 | - $this->log(" [" . $levels[$warn['level']] . '] ' . $warn['message'] . $extra); |
|
| 363 | - |
|
| 364 | - } |
|
| 365 | - |
|
| 366 | - } |
|
| 367 | - |
|
| 368 | - return $returnCode; |
|
| 369 | - |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - /** |
|
| 373 | - * Repairs a VObject file. |
|
| 374 | - * |
|
| 375 | - * @param Component $vObj |
|
| 376 | - * |
|
| 377 | - * @return int |
|
| 378 | - */ |
|
| 379 | - protected function repair(Component $vObj) { |
|
| 380 | - |
|
| 381 | - $returnCode = 0; |
|
| 382 | - |
|
| 383 | - switch ($vObj->name) { |
|
| 384 | - case 'VCALENDAR' : |
|
| 385 | - $this->log("iCalendar: " . (string)$vObj->VERSION); |
|
| 386 | - break; |
|
| 387 | - case 'VCARD' : |
|
| 388 | - $this->log("vCard: " . (string)$vObj->VERSION); |
|
| 389 | - break; |
|
| 390 | - } |
|
| 391 | - |
|
| 392 | - $warnings = $vObj->validate(Node::REPAIR); |
|
| 393 | - if (!count($warnings)) { |
|
| 394 | - $this->log(" No warnings!"); |
|
| 395 | - } else { |
|
| 396 | - |
|
| 397 | - $levels = [ |
|
| 398 | - 1 => 'REPAIRED', |
|
| 399 | - 2 => 'WARNING', |
|
| 400 | - 3 => 'ERROR', |
|
| 401 | - ]; |
|
| 402 | - $returnCode = 2; |
|
| 403 | - foreach ($warnings as $warn) { |
|
| 404 | - |
|
| 405 | - $extra = ''; |
|
| 406 | - if ($warn['node'] instanceof Property) { |
|
| 407 | - $extra = ' (property: "' . $warn['node']->name . '")'; |
|
| 408 | - } |
|
| 409 | - $this->log(" [" . $levels[$warn['level']] . '] ' . $warn['message'] . $extra); |
|
| 410 | - |
|
| 411 | - } |
|
| 412 | - |
|
| 413 | - } |
|
| 414 | - fwrite($this->stdout, $vObj->serialize()); |
|
| 415 | - |
|
| 416 | - return $returnCode; |
|
| 417 | - |
|
| 418 | - } |
|
| 419 | - |
|
| 420 | - /** |
|
| 421 | - * Converts a vObject file to a new format. |
|
| 422 | - * |
|
| 423 | - * @param Component $vObj |
|
| 424 | - * |
|
| 425 | - * @return int |
|
| 426 | - */ |
|
| 427 | - protected function convert($vObj) { |
|
| 428 | - |
|
| 429 | - $json = false; |
|
| 430 | - $convertVersion = null; |
|
| 431 | - $forceInput = null; |
|
| 432 | - |
|
| 433 | - switch ($this->format) { |
|
| 434 | - case 'json' : |
|
| 435 | - $json = true; |
|
| 436 | - if ($vObj->name === 'VCARD') { |
|
| 437 | - $convertVersion = Document::VCARD40; |
|
| 438 | - } |
|
| 439 | - break; |
|
| 440 | - case 'jcard' : |
|
| 441 | - $json = true; |
|
| 442 | - $forceInput = 'VCARD'; |
|
| 443 | - $convertVersion = Document::VCARD40; |
|
| 444 | - break; |
|
| 445 | - case 'jcal' : |
|
| 446 | - $json = true; |
|
| 447 | - $forceInput = 'VCALENDAR'; |
|
| 448 | - break; |
|
| 449 | - case 'mimedir' : |
|
| 450 | - case 'icalendar' : |
|
| 451 | - case 'icalendar20' : |
|
| 452 | - case 'vcard' : |
|
| 453 | - break; |
|
| 454 | - case 'vcard21' : |
|
| 455 | - $convertVersion = Document::VCARD21; |
|
| 456 | - break; |
|
| 457 | - case 'vcard30' : |
|
| 458 | - $convertVersion = Document::VCARD30; |
|
| 459 | - break; |
|
| 460 | - case 'vcard40' : |
|
| 461 | - $convertVersion = Document::VCARD40; |
|
| 462 | - break; |
|
| 463 | - |
|
| 464 | - } |
|
| 465 | - |
|
| 466 | - if ($forceInput && $vObj->name !== $forceInput) { |
|
| 467 | - throw new \Exception('You cannot convert a ' . strtolower($vObj->name) . ' to ' . $this->format); |
|
| 468 | - } |
|
| 469 | - if ($convertVersion) { |
|
| 470 | - $vObj = $vObj->convert($convertVersion); |
|
| 471 | - } |
|
| 472 | - if ($json) { |
|
| 473 | - $jsonOptions = 0; |
|
| 474 | - if ($this->pretty) { |
|
| 475 | - $jsonOptions = JSON_PRETTY_PRINT; |
|
| 476 | - } |
|
| 477 | - fwrite($this->stdout, json_encode($vObj->jsonSerialize(), $jsonOptions)); |
|
| 478 | - } else { |
|
| 479 | - fwrite($this->stdout, $vObj->serialize()); |
|
| 480 | - } |
|
| 481 | - |
|
| 482 | - return 0; |
|
| 483 | - |
|
| 484 | - } |
|
| 485 | - |
|
| 486 | - /** |
|
| 487 | - * Colorizes a file. |
|
| 488 | - * |
|
| 489 | - * @param Component $vObj |
|
| 490 | - * |
|
| 491 | - * @return int |
|
| 492 | - */ |
|
| 493 | - protected function color($vObj) { |
|
| 494 | - |
|
| 495 | - fwrite($this->stdout, $this->serializeComponent($vObj)); |
|
| 496 | - |
|
| 497 | - } |
|
| 498 | - |
|
| 499 | - /** |
|
| 500 | - * Returns an ansi color string for a color name. |
|
| 501 | - * |
|
| 502 | - * @param string $color |
|
| 503 | - * |
|
| 504 | - * @return string |
|
| 505 | - */ |
|
| 506 | - protected function colorize($color, $str, $resetTo = 'default') { |
|
| 507 | - |
|
| 508 | - $colors = [ |
|
| 509 | - 'cyan' => '1;36', |
|
| 510 | - 'red' => '1;31', |
|
| 511 | - 'yellow' => '1;33', |
|
| 512 | - 'blue' => '0;34', |
|
| 513 | - 'green' => '0;32', |
|
| 514 | - 'default' => '0', |
|
| 515 | - 'purple' => '0;35', |
|
| 516 | - ]; |
|
| 517 | - return "\033[" . $colors[$color] . 'm' . $str . "\033[" . $colors[$resetTo] . "m"; |
|
| 518 | - |
|
| 519 | - } |
|
| 520 | - |
|
| 521 | - /** |
|
| 522 | - * Writes out a string in specific color. |
|
| 523 | - * |
|
| 524 | - * @param string $color |
|
| 525 | - * @param string $str |
|
| 526 | - * |
|
| 527 | - * @return void |
|
| 528 | - */ |
|
| 529 | - protected function cWrite($color, $str) { |
|
| 530 | - |
|
| 531 | - fwrite($this->stdout, $this->colorize($color, $str)); |
|
| 532 | - |
|
| 533 | - } |
|
| 534 | - |
|
| 535 | - protected function serializeComponent(Component $vObj) { |
|
| 536 | - |
|
| 537 | - $this->cWrite('cyan', 'BEGIN'); |
|
| 538 | - $this->cWrite('red', ':'); |
|
| 539 | - $this->cWrite('yellow', $vObj->name . "\n"); |
|
| 540 | - |
|
| 541 | - /** |
|
| 542 | - * Gives a component a 'score' for sorting purposes. |
|
| 543 | - * |
|
| 544 | - * This is solely used by the childrenSort method. |
|
| 545 | - * |
|
| 546 | - * A higher score means the item will be lower in the list. |
|
| 547 | - * To avoid score collisions, each "score category" has a reasonable |
|
| 548 | - * space to accomodate elements. The $key is added to the $score to |
|
| 549 | - * preserve the original relative order of elements. |
|
| 550 | - * |
|
| 551 | - * @param int $key |
|
| 552 | - * @param array $array |
|
| 553 | - * |
|
| 554 | - * @return int |
|
| 555 | - */ |
|
| 556 | - $sortScore = function($key, $array) { |
|
| 557 | - |
|
| 558 | - if ($array[$key] instanceof Component) { |
|
| 559 | - |
|
| 560 | - // We want to encode VTIMEZONE first, this is a personal |
|
| 561 | - // preference. |
|
| 562 | - if ($array[$key]->name === 'VTIMEZONE') { |
|
| 563 | - $score = 300000000; |
|
| 564 | - return $score + $key; |
|
| 565 | - } else { |
|
| 566 | - $score = 400000000; |
|
| 567 | - return $score + $key; |
|
| 568 | - } |
|
| 569 | - } else { |
|
| 570 | - // Properties get encoded first |
|
| 571 | - // VCARD version 4.0 wants the VERSION property to appear first |
|
| 572 | - if ($array[$key] instanceof Property) { |
|
| 573 | - if ($array[$key]->name === 'VERSION') { |
|
| 574 | - $score = 100000000; |
|
| 575 | - return $score + $key; |
|
| 576 | - } else { |
|
| 577 | - // All other properties |
|
| 578 | - $score = 200000000; |
|
| 579 | - return $score + $key; |
|
| 580 | - } |
|
| 581 | - } |
|
| 582 | - } |
|
| 583 | - |
|
| 584 | - }; |
|
| 585 | - |
|
| 586 | - $children = $vObj->children(); |
|
| 587 | - $tmp = $children; |
|
| 588 | - uksort( |
|
| 589 | - $children, |
|
| 590 | - function($a, $b) use ($sortScore, $tmp) { |
|
| 591 | - |
|
| 592 | - $sA = $sortScore($a, $tmp); |
|
| 593 | - $sB = $sortScore($b, $tmp); |
|
| 594 | - |
|
| 595 | - return $sA - $sB; |
|
| 596 | - |
|
| 597 | - } |
|
| 598 | - ); |
|
| 599 | - |
|
| 600 | - foreach ($children as $child) { |
|
| 601 | - if ($child instanceof Component) { |
|
| 602 | - $this->serializeComponent($child); |
|
| 603 | - } else { |
|
| 604 | - $this->serializeProperty($child); |
|
| 605 | - } |
|
| 606 | - } |
|
| 607 | - |
|
| 608 | - $this->cWrite('cyan', 'END'); |
|
| 609 | - $this->cWrite('red', ':'); |
|
| 610 | - $this->cWrite('yellow', $vObj->name . "\n"); |
|
| 611 | - |
|
| 612 | - } |
|
| 613 | - |
|
| 614 | - /** |
|
| 615 | - * Colorizes a property. |
|
| 616 | - * |
|
| 617 | - * @param Property $property |
|
| 618 | - * |
|
| 619 | - * @return void |
|
| 620 | - */ |
|
| 621 | - protected function serializeProperty(Property $property) { |
|
| 622 | - |
|
| 623 | - if ($property->group) { |
|
| 624 | - $this->cWrite('default', $property->group); |
|
| 625 | - $this->cWrite('red', '.'); |
|
| 626 | - } |
|
| 627 | - |
|
| 628 | - $this->cWrite('yellow', $property->name); |
|
| 629 | - |
|
| 630 | - foreach ($property->parameters as $param) { |
|
| 631 | - |
|
| 632 | - $this->cWrite('red', ';'); |
|
| 633 | - $this->cWrite('blue', $param->serialize()); |
|
| 634 | - |
|
| 635 | - } |
|
| 636 | - $this->cWrite('red', ':'); |
|
| 637 | - |
|
| 638 | - if ($property instanceof Property\Binary) { |
|
| 639 | - |
|
| 640 | - $this->cWrite('default', 'embedded binary stripped. (' . strlen($property->getValue()) . ' bytes)'); |
|
| 641 | - |
|
| 642 | - } else { |
|
| 643 | - |
|
| 644 | - $parts = $property->getParts(); |
|
| 645 | - $first1 = true; |
|
| 646 | - // Looping through property values |
|
| 647 | - foreach ($parts as $part) { |
|
| 648 | - if ($first1) { |
|
| 649 | - $first1 = false; |
|
| 650 | - } else { |
|
| 651 | - $this->cWrite('red', $property->delimiter); |
|
| 652 | - } |
|
| 653 | - $first2 = true; |
|
| 654 | - // Looping through property sub-values |
|
| 655 | - foreach ((array)$part as $subPart) { |
|
| 656 | - if ($first2) { |
|
| 657 | - $first2 = false; |
|
| 658 | - } else { |
|
| 659 | - // The sub-value delimiter is always comma |
|
| 660 | - $this->cWrite('red', ','); |
|
| 661 | - } |
|
| 662 | - |
|
| 663 | - $subPart = strtr( |
|
| 664 | - $subPart, |
|
| 665 | - [ |
|
| 666 | - '\\' => $this->colorize('purple', '\\\\', 'green'), |
|
| 667 | - ';' => $this->colorize('purple', '\;', 'green'), |
|
| 668 | - ',' => $this->colorize('purple', '\,', 'green'), |
|
| 669 | - "\n" => $this->colorize('purple', "\\n\n\t", 'green'), |
|
| 670 | - "\r" => "", |
|
| 671 | - ] |
|
| 672 | - ); |
|
| 673 | - |
|
| 674 | - $this->cWrite('green', $subPart); |
|
| 675 | - } |
|
| 676 | - } |
|
| 677 | - |
|
| 678 | - } |
|
| 679 | - $this->cWrite("default", "\n"); |
|
| 680 | - |
|
| 681 | - } |
|
| 682 | - |
|
| 683 | - /** |
|
| 684 | - * Parses the list of arguments. |
|
| 685 | - * |
|
| 686 | - * @param array $argv |
|
| 687 | - * |
|
| 688 | - * @return void |
|
| 689 | - */ |
|
| 690 | - protected function parseArguments(array $argv) { |
|
| 691 | - |
|
| 692 | - $positional = []; |
|
| 693 | - $options = []; |
|
| 313 | + ); |
|
| 314 | + |
|
| 315 | + $this->log('Examples:', 'yellow'); |
|
| 316 | + $this->log(' vobject convert contact.vcf contact.json'); |
|
| 317 | + $this->log(' vobject convert --format=vcard40 old.vcf new.vcf'); |
|
| 318 | + $this->log(' vobject convert --inputformat=json --format=mimedir - -'); |
|
| 319 | + $this->log(' vobject color calendar.ics'); |
|
| 320 | + $this->log(''); |
|
| 321 | + $this->log('https://github.com/fruux/sabre-vobject', 'purple'); |
|
| 322 | + |
|
| 323 | + } |
|
| 324 | + |
|
| 325 | + /** |
|
| 326 | + * Validates a VObject file. |
|
| 327 | + * |
|
| 328 | + * @param Component $vObj |
|
| 329 | + * |
|
| 330 | + * @return int |
|
| 331 | + */ |
|
| 332 | + protected function validate(Component $vObj) { |
|
| 333 | + |
|
| 334 | + $returnCode = 0; |
|
| 335 | + |
|
| 336 | + switch ($vObj->name) { |
|
| 337 | + case 'VCALENDAR' : |
|
| 338 | + $this->log("iCalendar: " . (string)$vObj->VERSION); |
|
| 339 | + break; |
|
| 340 | + case 'VCARD' : |
|
| 341 | + $this->log("vCard: " . (string)$vObj->VERSION); |
|
| 342 | + break; |
|
| 343 | + } |
|
| 344 | + |
|
| 345 | + $warnings = $vObj->validate(); |
|
| 346 | + if (!count($warnings)) { |
|
| 347 | + $this->log(" No warnings!"); |
|
| 348 | + } else { |
|
| 349 | + |
|
| 350 | + $levels = [ |
|
| 351 | + 1 => 'REPAIRED', |
|
| 352 | + 2 => 'WARNING', |
|
| 353 | + 3 => 'ERROR', |
|
| 354 | + ]; |
|
| 355 | + $returnCode = 2; |
|
| 356 | + foreach ($warnings as $warn) { |
|
| 357 | + |
|
| 358 | + $extra = ''; |
|
| 359 | + if ($warn['node'] instanceof Property) { |
|
| 360 | + $extra = ' (property: "' . $warn['node']->name . '")'; |
|
| 361 | + } |
|
| 362 | + $this->log(" [" . $levels[$warn['level']] . '] ' . $warn['message'] . $extra); |
|
| 363 | + |
|
| 364 | + } |
|
| 365 | + |
|
| 366 | + } |
|
| 367 | + |
|
| 368 | + return $returnCode; |
|
| 369 | + |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + /** |
|
| 373 | + * Repairs a VObject file. |
|
| 374 | + * |
|
| 375 | + * @param Component $vObj |
|
| 376 | + * |
|
| 377 | + * @return int |
|
| 378 | + */ |
|
| 379 | + protected function repair(Component $vObj) { |
|
| 380 | + |
|
| 381 | + $returnCode = 0; |
|
| 382 | + |
|
| 383 | + switch ($vObj->name) { |
|
| 384 | + case 'VCALENDAR' : |
|
| 385 | + $this->log("iCalendar: " . (string)$vObj->VERSION); |
|
| 386 | + break; |
|
| 387 | + case 'VCARD' : |
|
| 388 | + $this->log("vCard: " . (string)$vObj->VERSION); |
|
| 389 | + break; |
|
| 390 | + } |
|
| 391 | + |
|
| 392 | + $warnings = $vObj->validate(Node::REPAIR); |
|
| 393 | + if (!count($warnings)) { |
|
| 394 | + $this->log(" No warnings!"); |
|
| 395 | + } else { |
|
| 396 | + |
|
| 397 | + $levels = [ |
|
| 398 | + 1 => 'REPAIRED', |
|
| 399 | + 2 => 'WARNING', |
|
| 400 | + 3 => 'ERROR', |
|
| 401 | + ]; |
|
| 402 | + $returnCode = 2; |
|
| 403 | + foreach ($warnings as $warn) { |
|
| 404 | + |
|
| 405 | + $extra = ''; |
|
| 406 | + if ($warn['node'] instanceof Property) { |
|
| 407 | + $extra = ' (property: "' . $warn['node']->name . '")'; |
|
| 408 | + } |
|
| 409 | + $this->log(" [" . $levels[$warn['level']] . '] ' . $warn['message'] . $extra); |
|
| 410 | + |
|
| 411 | + } |
|
| 412 | + |
|
| 413 | + } |
|
| 414 | + fwrite($this->stdout, $vObj->serialize()); |
|
| 415 | + |
|
| 416 | + return $returnCode; |
|
| 417 | + |
|
| 418 | + } |
|
| 419 | + |
|
| 420 | + /** |
|
| 421 | + * Converts a vObject file to a new format. |
|
| 422 | + * |
|
| 423 | + * @param Component $vObj |
|
| 424 | + * |
|
| 425 | + * @return int |
|
| 426 | + */ |
|
| 427 | + protected function convert($vObj) { |
|
| 428 | + |
|
| 429 | + $json = false; |
|
| 430 | + $convertVersion = null; |
|
| 431 | + $forceInput = null; |
|
| 432 | + |
|
| 433 | + switch ($this->format) { |
|
| 434 | + case 'json' : |
|
| 435 | + $json = true; |
|
| 436 | + if ($vObj->name === 'VCARD') { |
|
| 437 | + $convertVersion = Document::VCARD40; |
|
| 438 | + } |
|
| 439 | + break; |
|
| 440 | + case 'jcard' : |
|
| 441 | + $json = true; |
|
| 442 | + $forceInput = 'VCARD'; |
|
| 443 | + $convertVersion = Document::VCARD40; |
|
| 444 | + break; |
|
| 445 | + case 'jcal' : |
|
| 446 | + $json = true; |
|
| 447 | + $forceInput = 'VCALENDAR'; |
|
| 448 | + break; |
|
| 449 | + case 'mimedir' : |
|
| 450 | + case 'icalendar' : |
|
| 451 | + case 'icalendar20' : |
|
| 452 | + case 'vcard' : |
|
| 453 | + break; |
|
| 454 | + case 'vcard21' : |
|
| 455 | + $convertVersion = Document::VCARD21; |
|
| 456 | + break; |
|
| 457 | + case 'vcard30' : |
|
| 458 | + $convertVersion = Document::VCARD30; |
|
| 459 | + break; |
|
| 460 | + case 'vcard40' : |
|
| 461 | + $convertVersion = Document::VCARD40; |
|
| 462 | + break; |
|
| 463 | + |
|
| 464 | + } |
|
| 465 | + |
|
| 466 | + if ($forceInput && $vObj->name !== $forceInput) { |
|
| 467 | + throw new \Exception('You cannot convert a ' . strtolower($vObj->name) . ' to ' . $this->format); |
|
| 468 | + } |
|
| 469 | + if ($convertVersion) { |
|
| 470 | + $vObj = $vObj->convert($convertVersion); |
|
| 471 | + } |
|
| 472 | + if ($json) { |
|
| 473 | + $jsonOptions = 0; |
|
| 474 | + if ($this->pretty) { |
|
| 475 | + $jsonOptions = JSON_PRETTY_PRINT; |
|
| 476 | + } |
|
| 477 | + fwrite($this->stdout, json_encode($vObj->jsonSerialize(), $jsonOptions)); |
|
| 478 | + } else { |
|
| 479 | + fwrite($this->stdout, $vObj->serialize()); |
|
| 480 | + } |
|
| 481 | + |
|
| 482 | + return 0; |
|
| 483 | + |
|
| 484 | + } |
|
| 485 | + |
|
| 486 | + /** |
|
| 487 | + * Colorizes a file. |
|
| 488 | + * |
|
| 489 | + * @param Component $vObj |
|
| 490 | + * |
|
| 491 | + * @return int |
|
| 492 | + */ |
|
| 493 | + protected function color($vObj) { |
|
| 494 | + |
|
| 495 | + fwrite($this->stdout, $this->serializeComponent($vObj)); |
|
| 496 | + |
|
| 497 | + } |
|
| 498 | + |
|
| 499 | + /** |
|
| 500 | + * Returns an ansi color string for a color name. |
|
| 501 | + * |
|
| 502 | + * @param string $color |
|
| 503 | + * |
|
| 504 | + * @return string |
|
| 505 | + */ |
|
| 506 | + protected function colorize($color, $str, $resetTo = 'default') { |
|
| 507 | + |
|
| 508 | + $colors = [ |
|
| 509 | + 'cyan' => '1;36', |
|
| 510 | + 'red' => '1;31', |
|
| 511 | + 'yellow' => '1;33', |
|
| 512 | + 'blue' => '0;34', |
|
| 513 | + 'green' => '0;32', |
|
| 514 | + 'default' => '0', |
|
| 515 | + 'purple' => '0;35', |
|
| 516 | + ]; |
|
| 517 | + return "\033[" . $colors[$color] . 'm' . $str . "\033[" . $colors[$resetTo] . "m"; |
|
| 518 | + |
|
| 519 | + } |
|
| 520 | + |
|
| 521 | + /** |
|
| 522 | + * Writes out a string in specific color. |
|
| 523 | + * |
|
| 524 | + * @param string $color |
|
| 525 | + * @param string $str |
|
| 526 | + * |
|
| 527 | + * @return void |
|
| 528 | + */ |
|
| 529 | + protected function cWrite($color, $str) { |
|
| 530 | + |
|
| 531 | + fwrite($this->stdout, $this->colorize($color, $str)); |
|
| 532 | + |
|
| 533 | + } |
|
| 534 | + |
|
| 535 | + protected function serializeComponent(Component $vObj) { |
|
| 536 | + |
|
| 537 | + $this->cWrite('cyan', 'BEGIN'); |
|
| 538 | + $this->cWrite('red', ':'); |
|
| 539 | + $this->cWrite('yellow', $vObj->name . "\n"); |
|
| 540 | + |
|
| 541 | + /** |
|
| 542 | + * Gives a component a 'score' for sorting purposes. |
|
| 543 | + * |
|
| 544 | + * This is solely used by the childrenSort method. |
|
| 545 | + * |
|
| 546 | + * A higher score means the item will be lower in the list. |
|
| 547 | + * To avoid score collisions, each "score category" has a reasonable |
|
| 548 | + * space to accomodate elements. The $key is added to the $score to |
|
| 549 | + * preserve the original relative order of elements. |
|
| 550 | + * |
|
| 551 | + * @param int $key |
|
| 552 | + * @param array $array |
|
| 553 | + * |
|
| 554 | + * @return int |
|
| 555 | + */ |
|
| 556 | + $sortScore = function($key, $array) { |
|
| 557 | + |
|
| 558 | + if ($array[$key] instanceof Component) { |
|
| 559 | + |
|
| 560 | + // We want to encode VTIMEZONE first, this is a personal |
|
| 561 | + // preference. |
|
| 562 | + if ($array[$key]->name === 'VTIMEZONE') { |
|
| 563 | + $score = 300000000; |
|
| 564 | + return $score + $key; |
|
| 565 | + } else { |
|
| 566 | + $score = 400000000; |
|
| 567 | + return $score + $key; |
|
| 568 | + } |
|
| 569 | + } else { |
|
| 570 | + // Properties get encoded first |
|
| 571 | + // VCARD version 4.0 wants the VERSION property to appear first |
|
| 572 | + if ($array[$key] instanceof Property) { |
|
| 573 | + if ($array[$key]->name === 'VERSION') { |
|
| 574 | + $score = 100000000; |
|
| 575 | + return $score + $key; |
|
| 576 | + } else { |
|
| 577 | + // All other properties |
|
| 578 | + $score = 200000000; |
|
| 579 | + return $score + $key; |
|
| 580 | + } |
|
| 581 | + } |
|
| 582 | + } |
|
| 583 | + |
|
| 584 | + }; |
|
| 585 | + |
|
| 586 | + $children = $vObj->children(); |
|
| 587 | + $tmp = $children; |
|
| 588 | + uksort( |
|
| 589 | + $children, |
|
| 590 | + function($a, $b) use ($sortScore, $tmp) { |
|
| 591 | + |
|
| 592 | + $sA = $sortScore($a, $tmp); |
|
| 593 | + $sB = $sortScore($b, $tmp); |
|
| 594 | + |
|
| 595 | + return $sA - $sB; |
|
| 596 | + |
|
| 597 | + } |
|
| 598 | + ); |
|
| 599 | + |
|
| 600 | + foreach ($children as $child) { |
|
| 601 | + if ($child instanceof Component) { |
|
| 602 | + $this->serializeComponent($child); |
|
| 603 | + } else { |
|
| 604 | + $this->serializeProperty($child); |
|
| 605 | + } |
|
| 606 | + } |
|
| 607 | + |
|
| 608 | + $this->cWrite('cyan', 'END'); |
|
| 609 | + $this->cWrite('red', ':'); |
|
| 610 | + $this->cWrite('yellow', $vObj->name . "\n"); |
|
| 611 | + |
|
| 612 | + } |
|
| 613 | + |
|
| 614 | + /** |
|
| 615 | + * Colorizes a property. |
|
| 616 | + * |
|
| 617 | + * @param Property $property |
|
| 618 | + * |
|
| 619 | + * @return void |
|
| 620 | + */ |
|
| 621 | + protected function serializeProperty(Property $property) { |
|
| 622 | + |
|
| 623 | + if ($property->group) { |
|
| 624 | + $this->cWrite('default', $property->group); |
|
| 625 | + $this->cWrite('red', '.'); |
|
| 626 | + } |
|
| 627 | + |
|
| 628 | + $this->cWrite('yellow', $property->name); |
|
| 629 | + |
|
| 630 | + foreach ($property->parameters as $param) { |
|
| 631 | + |
|
| 632 | + $this->cWrite('red', ';'); |
|
| 633 | + $this->cWrite('blue', $param->serialize()); |
|
| 634 | + |
|
| 635 | + } |
|
| 636 | + $this->cWrite('red', ':'); |
|
| 637 | + |
|
| 638 | + if ($property instanceof Property\Binary) { |
|
| 639 | + |
|
| 640 | + $this->cWrite('default', 'embedded binary stripped. (' . strlen($property->getValue()) . ' bytes)'); |
|
| 641 | + |
|
| 642 | + } else { |
|
| 643 | + |
|
| 644 | + $parts = $property->getParts(); |
|
| 645 | + $first1 = true; |
|
| 646 | + // Looping through property values |
|
| 647 | + foreach ($parts as $part) { |
|
| 648 | + if ($first1) { |
|
| 649 | + $first1 = false; |
|
| 650 | + } else { |
|
| 651 | + $this->cWrite('red', $property->delimiter); |
|
| 652 | + } |
|
| 653 | + $first2 = true; |
|
| 654 | + // Looping through property sub-values |
|
| 655 | + foreach ((array)$part as $subPart) { |
|
| 656 | + if ($first2) { |
|
| 657 | + $first2 = false; |
|
| 658 | + } else { |
|
| 659 | + // The sub-value delimiter is always comma |
|
| 660 | + $this->cWrite('red', ','); |
|
| 661 | + } |
|
| 662 | + |
|
| 663 | + $subPart = strtr( |
|
| 664 | + $subPart, |
|
| 665 | + [ |
|
| 666 | + '\\' => $this->colorize('purple', '\\\\', 'green'), |
|
| 667 | + ';' => $this->colorize('purple', '\;', 'green'), |
|
| 668 | + ',' => $this->colorize('purple', '\,', 'green'), |
|
| 669 | + "\n" => $this->colorize('purple', "\\n\n\t", 'green'), |
|
| 670 | + "\r" => "", |
|
| 671 | + ] |
|
| 672 | + ); |
|
| 673 | + |
|
| 674 | + $this->cWrite('green', $subPart); |
|
| 675 | + } |
|
| 676 | + } |
|
| 677 | + |
|
| 678 | + } |
|
| 679 | + $this->cWrite("default", "\n"); |
|
| 680 | + |
|
| 681 | + } |
|
| 682 | + |
|
| 683 | + /** |
|
| 684 | + * Parses the list of arguments. |
|
| 685 | + * |
|
| 686 | + * @param array $argv |
|
| 687 | + * |
|
| 688 | + * @return void |
|
| 689 | + */ |
|
| 690 | + protected function parseArguments(array $argv) { |
|
| 691 | + |
|
| 692 | + $positional = []; |
|
| 693 | + $options = []; |
|
| 694 | 694 | |
| 695 | 695 | $countArgv = count($argv); |
| 696 | - for ($ii = 0; $ii < $countArgv; $ii++) { |
|
| 696 | + for ($ii = 0; $ii < $countArgv; $ii++) { |
|
| 697 | 697 | |
| 698 | - // Skipping the first argument. |
|
| 699 | - if ($ii === 0) continue; |
|
| 698 | + // Skipping the first argument. |
|
| 699 | + if ($ii === 0) continue; |
|
| 700 | 700 | |
| 701 | - $v = $argv[$ii]; |
|
| 701 | + $v = $argv[$ii]; |
|
| 702 | 702 | |
| 703 | - if (substr($v, 0, 2) === '--') { |
|
| 704 | - // This is a long-form option. |
|
| 705 | - $optionName = substr($v, 2); |
|
| 706 | - $optionValue = true; |
|
| 707 | - if (strpos($optionName, '=')) { |
|
| 708 | - list($optionName, $optionValue) = explode('=', $optionName); |
|
| 709 | - } |
|
| 710 | - $options[$optionName] = $optionValue; |
|
| 711 | - } elseif (substr($v, 0, 1) === '-' && strlen($v) > 1) { |
|
| 712 | - // This is a short-form option. |
|
| 713 | - foreach (str_split(substr($v, 1)) as $option) { |
|
| 714 | - $options[$option] = true; |
|
| 715 | - } |
|
| 703 | + if (substr($v, 0, 2) === '--') { |
|
| 704 | + // This is a long-form option. |
|
| 705 | + $optionName = substr($v, 2); |
|
| 706 | + $optionValue = true; |
|
| 707 | + if (strpos($optionName, '=')) { |
|
| 708 | + list($optionName, $optionValue) = explode('=', $optionName); |
|
| 709 | + } |
|
| 710 | + $options[$optionName] = $optionValue; |
|
| 711 | + } elseif (substr($v, 0, 1) === '-' && strlen($v) > 1) { |
|
| 712 | + // This is a short-form option. |
|
| 713 | + foreach (str_split(substr($v, 1)) as $option) { |
|
| 714 | + $options[$option] = true; |
|
| 715 | + } |
|
| 716 | 716 | |
| 717 | - } else { |
|
| 717 | + } else { |
|
| 718 | 718 | |
| 719 | - $positional[] = $v; |
|
| 719 | + $positional[] = $v; |
|
| 720 | 720 | |
| 721 | - } |
|
| 721 | + } |
|
| 722 | 722 | |
| 723 | - } |
|
| 723 | + } |
|
| 724 | 724 | |
| 725 | - return [$options, $positional]; |
|
| 725 | + return [$options, $positional]; |
|
| 726 | 726 | |
| 727 | - } |
|
| 727 | + } |
|
| 728 | 728 | |
| 729 | - protected $parser; |
|
| 729 | + protected $parser; |
|
| 730 | 730 | |
| 731 | - /** |
|
| 732 | - * Reads the input file. |
|
| 733 | - * |
|
| 734 | - * @return Component |
|
| 735 | - */ |
|
| 736 | - protected function readInput() { |
|
| 731 | + /** |
|
| 732 | + * Reads the input file. |
|
| 733 | + * |
|
| 734 | + * @return Component |
|
| 735 | + */ |
|
| 736 | + protected function readInput() { |
|
| 737 | 737 | |
| 738 | - if (!$this->parser) { |
|
| 739 | - if ($this->inputPath !== '-') { |
|
| 740 | - $this->stdin = fopen($this->inputPath, 'r'); |
|
| 741 | - } |
|
| 738 | + if (!$this->parser) { |
|
| 739 | + if ($this->inputPath !== '-') { |
|
| 740 | + $this->stdin = fopen($this->inputPath, 'r'); |
|
| 741 | + } |
|
| 742 | 742 | |
| 743 | - if ($this->inputFormat === 'mimedir') { |
|
| 744 | - $this->parser = new Parser\MimeDir($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0)); |
|
| 745 | - } else { |
|
| 746 | - $this->parser = new Parser\Json($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0)); |
|
| 747 | - } |
|
| 748 | - } |
|
| 743 | + if ($this->inputFormat === 'mimedir') { |
|
| 744 | + $this->parser = new Parser\MimeDir($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0)); |
|
| 745 | + } else { |
|
| 746 | + $this->parser = new Parser\Json($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0)); |
|
| 747 | + } |
|
| 748 | + } |
|
| 749 | 749 | |
| 750 | - return $this->parser->parse(); |
|
| 750 | + return $this->parser->parse(); |
|
| 751 | 751 | |
| 752 | - } |
|
| 752 | + } |
|
| 753 | 753 | |
| 754 | - /** |
|
| 755 | - * Sends a message to STDERR. |
|
| 756 | - * |
|
| 757 | - * @param string $msg |
|
| 758 | - * |
|
| 759 | - * @return void |
|
| 760 | - */ |
|
| 761 | - protected function log($msg, $color = 'default') { |
|
| 754 | + /** |
|
| 755 | + * Sends a message to STDERR. |
|
| 756 | + * |
|
| 757 | + * @param string $msg |
|
| 758 | + * |
|
| 759 | + * @return void |
|
| 760 | + */ |
|
| 761 | + protected function log($msg, $color = 'default') { |
|
| 762 | 762 | |
| 763 | - if (!$this->quiet) { |
|
| 764 | - if ($color !== 'default') { |
|
| 765 | - $msg = $this->colorize($color, $msg); |
|
| 766 | - } |
|
| 767 | - fwrite($this->stderr, $msg . "\n"); |
|
| 768 | - } |
|
| 763 | + if (!$this->quiet) { |
|
| 764 | + if ($color !== 'default') { |
|
| 765 | + $msg = $this->colorize($color, $msg); |
|
| 766 | + } |
|
| 767 | + fwrite($this->stderr, $msg . "\n"); |
|
| 768 | + } |
|
| 769 | 769 | |
| 770 | - } |
|
| 770 | + } |
|
| 771 | 771 | |
| 772 | 772 | } |