30 self::instance($this);
31 $this->data =
$data .
"\n";
34 $this->smarty = $smarty;
35 $this->mbstring_overload = ini_get(
'mbstring.func_overload') & 2;
37 public static function &
instance($new_instance = null)
39 static $instance = null;
40 if (isset($new_instance) && is_object($new_instance))
41 $instance = $new_instance;
47 private $_yy_state = 1;
48 private $_yy_stack = array();
52 return $this->{
'yylex' . $this->_yy_state}();
57 array_push($this->_yy_stack, $this->_yy_state);
58 $this->_yy_state = $state;
63 $this->_yy_state = array_pop($this->_yy_stack);
68 $this->_yy_state = $state;
86 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
89 $yy_global_pattern =
"/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/iS";
92 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
93 $yysubmatches = $yymatches;
94 $yymatches = array_filter($yymatches,
'strlen');
95 if (!count($yymatches)) {
96 throw new Exception(
'Error: lexing failed because a rule matched' .
97 ' an empty string. Input "' . substr($this->data,
98 $this->counter, 5) .
'... state START');
101 $this->token = key($yymatches);
102 if ($tokenMap[$this->token]) {
104 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
105 $tokenMap[$this->token]);
107 $yysubmatches = array();
109 $this->value = current($yymatches);
110 $r = $this->{
'yy_r1_' . $this->token}($yysubmatches);
112 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
113 $this->
line += substr_count($this->value,
"\n");
119 return $this->
yylex();
121 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
122 $this->
line += substr_count($this->value,
"\n");
123 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
129 throw new Exception(
'Unexpected input at line' . $this->
line .
130 ': ' . $this->data[$this->counter]);
198 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
201 $yy_global_pattern =
"/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS";
204 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
205 $yysubmatches = $yymatches;
206 $yymatches = array_filter($yymatches,
'strlen');
207 if (!count($yymatches)) {
208 throw new Exception(
'Error: lexing failed because a rule matched' .
209 ' an empty string. Input "' . substr($this->data,
210 $this->counter, 5) .
'... state VALUE');
213 $this->token = key($yymatches);
214 if ($tokenMap[$this->token]) {
216 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
217 $tokenMap[$this->token]);
219 $yysubmatches = array();
221 $this->value = current($yymatches);
222 $r = $this->{
'yy_r2_' . $this->token}($yysubmatches);
224 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
225 $this->
line += substr_count($this->value,
"\n");
231 return $this->
yylex();
233 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
234 $this->
line += substr_count($this->value,
"\n");
235 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
241 throw new Exception(
'Unexpected input at line' . $this->
line .
242 ': ' . $this->data[$this->counter]);
289 if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array(
"true",
"false",
"on",
"off",
"yes",
"no")) ) {
319 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
322 $yy_global_pattern =
"/\G([^\n]+?(?=[ \t\r]*\n))/iS";
325 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
326 $yysubmatches = $yymatches;
327 $yymatches = array_filter($yymatches,
'strlen');
328 if (!count($yymatches)) {
329 throw new Exception(
'Error: lexing failed because a rule matched' .
330 ' an empty string. Input "' . substr($this->data,
331 $this->counter, 5) .
'... state NAKED_STRING_VALUE');
334 $this->token = key($yymatches);
335 if ($tokenMap[$this->token]) {
337 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
338 $tokenMap[$this->token]);
340 $yysubmatches = array();
342 $this->value = current($yymatches);
343 $r = $this->{
'yy_r3_' . $this->token}($yysubmatches);
345 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
346 $this->
line += substr_count($this->value,
"\n");
352 return $this->
yylex();
354 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
355 $this->
line += substr_count($this->value,
"\n");
356 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
362 throw new Exception(
'Unexpected input at line' . $this->
line .
363 ': ' . $this->data[$this->counter]);
388 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
391 $yy_global_pattern =
"/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS";
394 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
395 $yysubmatches = $yymatches;
396 $yymatches = array_filter($yymatches,
'strlen');
397 if (!count($yymatches)) {
398 throw new Exception(
'Error: lexing failed because a rule matched' .
399 ' an empty string. Input "' . substr($this->data,
400 $this->counter, 5) .
'... state COMMENT');
403 $this->token = key($yymatches);
404 if ($tokenMap[$this->token]) {
406 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
407 $tokenMap[$this->token]);
409 $yysubmatches = array();
411 $this->value = current($yymatches);
412 $r = $this->{
'yy_r4_' . $this->token}($yysubmatches);
414 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
415 $this->
line += substr_count($this->value,
"\n");
421 return $this->
yylex();
423 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
424 $this->
line += substr_count($this->value,
"\n");
425 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
431 throw new Exception(
'Unexpected input at line' . $this->
line .
432 ': ' . $this->data[$this->counter]);
466 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
469 $yy_global_pattern =
"/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/iS";
472 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
473 $yysubmatches = $yymatches;
474 $yymatches = array_filter($yymatches,
'strlen');
475 if (!count($yymatches)) {
476 throw new Exception(
'Error: lexing failed because a rule matched' .
477 ' an empty string. Input "' . substr($this->data,
478 $this->counter, 5) .
'... state SECTION');
481 $this->token = key($yymatches);
482 if ($tokenMap[$this->token]) {
484 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
485 $tokenMap[$this->token]);
487 $yysubmatches = array();
489 $this->value = current($yymatches);
490 $r = $this->{
'yy_r5_' . $this->token}($yysubmatches);
492 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
493 $this->
line += substr_count($this->value,
"\n");
499 return $this->
yylex();
501 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
502 $this->
line += substr_count($this->value,
"\n");
503 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
509 throw new Exception(
'Unexpected input at line' . $this->
line .
510 ': ' . $this->data[$this->counter]);
538 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
541 $yy_global_pattern =
"/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/iS";
544 if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,
'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
545 $yysubmatches = $yymatches;
546 $yymatches = array_filter($yymatches,
'strlen');
547 if (!count($yymatches)) {
548 throw new Exception(
'Error: lexing failed because a rule matched' .
549 ' an empty string. Input "' . substr($this->data,
550 $this->counter, 5) .
'... state TRIPPLE');
553 $this->token = key($yymatches);
554 if ($tokenMap[$this->token]) {
556 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
557 $tokenMap[$this->token]);
559 $yysubmatches = array();
561 $this->value = current($yymatches);
562 $r = $this->{
'yy_r6_' . $this->token}($yysubmatches);
564 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
565 $this->
line += substr_count($this->value,
"\n");
571 return $this->
yylex();
573 $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,
'latin1'): strlen($this->value));
574 $this->
line += substr_count($this->value,
"\n");
575 if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,
'latin1'): strlen($this->data))) {
581 throw new Exception(
'Unexpected input at line' . $this->
line .
582 ': ' . $this->data[$this->counter]);
601 if ($this->mbstring_overload) {
602 $to = mb_strlen($this->data,
'latin1');
604 $to = strlen($this->data);
606 preg_match(
"/\"\"\"[ \t\r]*[\n#;]/",$this->data,
$match,PREG_OFFSET_CAPTURE,$this->counter);
607 if (isset(
$match[0][1])) {
610 $this->compiler->trigger_template_error (
"missing or misspelled literal closing tag");
612 if ($this->mbstring_overload) {
613 $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,
'latin1');
615 $this->value = substr($this->data,$this->counter,$to-$this->counter);
__construct($data, $smarty)
const TPC_SINGLE_QUOTED_STRING
const TPC_DOUBLE_QUOTED_STRING
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
Smarty Internal Plugin Configfilelexer.
const TPC_TRIPPLE_QUOTES_END
static & instance($new_instance=null)