159 public $state_name = array(1 =>
'TEXT', 2 =>
'TAG', 3 =>
'TAGBODY', 4 =>
'LITERAL', 5 =>
'DOUBLEQUOTEDSTRING',
160 6 =>
'CHILDBODY', 7 =>
'CHILDBLOCK', 8 =>
'CHILDLITERAL');
189 'NOT' =>
'(!,not)',
'OPENP' =>
'(',
'CLOSEP' =>
')',
'OPENB' =>
'[',
'CLOSEB' =>
']',
'PTR' =>
'->',
190 'APTR' =>
'=>',
'EQUAL' =>
'=',
'NUMBER' =>
'number',
'UNIMATH' =>
'+" , "-',
'MATH' =>
'*" , "/" , "%',
191 'INCDEC' =>
'++" , "--',
'SPACE' =>
' ',
'DOLLAR' =>
'$',
'SEMICOLON' =>
';',
'COLON' =>
':',
192 'DOUBLECOLON' =>
'::',
'AT' =>
'@',
'HATCH' =>
'#',
'QUOTE' =>
'"',
'BACKTICK' =>
'`',
'VERT' =>
'"|" modifier',
193 'DOT' =>
'.',
'COMMA' =>
'","',
'QMARK' =>
'"?"',
'ID' =>
'id, name',
'TEXT' =>
'text',
194 'LDELSLASH' =>
'{/..} closing tag',
'LDEL' =>
'{...} Smarty tag',
'COMMENT' =>
'comment',
'AS' =>
'as',
195 'TO' =>
'to',
'PHP' =>
'"<?php", "<%", "{php}" tag',
'LOGOP' =>
'"<", "==" ... logical operator',
196 'TLOGOP' =>
'"lt", "eq" ... logical operator; "is div by" ... if condition',
197 'SCOND' =>
'"is even" ... if condition',);
209 if (preg_match(
'~^\xEF\xBB\xBF~i', $this->data, $match)) {
210 $this->counter += strlen($match[0]);
213 $this->smarty = $compiler->smarty;
215 $this->ldel = preg_quote($this->smarty->left_delimiter,
'~');
216 $this->ldel_length = strlen($this->smarty->left_delimiter);
217 $this->rdel = preg_quote($this->smarty->right_delimiter,
'~');
218 $this->rdel_length = strlen($this->smarty->right_delimiter);
219 $this->smarty_token_names[
'LDEL'] = $this->smarty->left_delimiter;
220 $this->smarty_token_names[
'RDEL'] = $this->smarty->right_delimiter;
225 $this->yyTraceFILE = fopen(
'php://output',
'w');
226 $this->yyTracePrompt =
'<br>';
234 return $this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false;
243 return $this->{
'yylex' . $this->_yy_state}();
248 if ($this->yyTraceFILE) {
249 fprintf($this->yyTraceFILE,
"%sState push %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
251 array_push($this->_yy_stack, $this->_yy_state);
252 $this->_yy_state =
$state;
253 if ($this->yyTraceFILE) {
254 fprintf($this->yyTraceFILE,
"%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
260 if ($this->yyTraceFILE) {
261 fprintf($this->yyTraceFILE,
"%sState pop %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
263 $this->_yy_state = array_pop($this->_yy_stack);
264 if ($this->yyTraceFILE) {
265 fprintf($this->yyTraceFILE,
"%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
271 $this->_yy_state =
$state;
272 if ($this->yyTraceFILE) {
273 fprintf($this->yyTraceFILE,
"%sState set %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
279 if (!isset($this->yy_global_pattern1)) {
280 $this->yy_global_pattern1 =
"/\G([{][}])|\G(" . $this->ldel .
"[*])|\G((<[?]((php\\s+|=)|\\s+))|(<[%])|(<[?]xml\\s+)|(<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|([?][>])|([%][>])|(" . $this->ldel .
"\\s*php(.*?)" . $this->rdel .
")|(" . $this->ldel .
"\\s*[\/]php" . $this->rdel .
"))|\G(" . $this->ldel .
"\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*)|\G(\\s*" . $this->rdel .
")|\G([\S\s])/isS";
282 if ($this->counter >= strlen($this->data)) {
287 if (preg_match($this->yy_global_pattern1, $this->data, $yymatches, null, $this->counter)) {
288 $yysubmatches = $yymatches;
289 if (strlen($yysubmatches[0]) < 200) {
290 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
292 $yymatches = array_filter($yymatches,
'strlen');
294 if (empty($yymatches)) {
295 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state TEXT');
298 $this->token = key($yymatches);
299 $this->value = current($yymatches);
300 $r = $this->{
'yy_r1_' . $this->token}();
302 $this->counter += strlen($this->value);
303 $this->line += substr_count($this->value,
"\n");
306 } elseif ($r ===
true) {
309 return $this->
yylex();
310 } elseif ($r ===
false) {
311 $this->counter += strlen($this->value);
312 $this->line += substr_count($this->value,
"\n");
313 if ($this->counter >= strlen($this->data)) {
320 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
337 preg_match(
"~[*]{$this->rdel}~", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
338 if (isset($match[0][1])) {
339 $to = $match[0][1] + strlen($match[0][0]);
341 $this->compiler->trigger_template_error(
"missing or misspelled comment closing tag '*{$this->smarty->right_delimiter}'");
343 $this->value = substr($this->data, $this->counter, $to - $this->counter);
351 $obj->parsePhp($this);
357 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
368 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
385 $to = strlen($this->data);
386 preg_match(
"~($this->ldel)|([<]script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*[>])|([<][?])|([<][%])|([?][>])|([%][>])~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
387 if (isset($match[0][1])) {
390 $this->value = substr($this->data, $this->counter, $to - $this->counter);
396 if (!isset($this->yy_global_pattern2)) {
397 $this->yy_global_pattern2 =
"/\G(" . $this->ldel .
"\\s*(if|elseif|else if|while)\\s+)|\G(" . $this->ldel .
"\\s*for\\s+)|\G(" . $this->ldel .
"\\s*foreach(?![^\s]))|\G(" . $this->ldel .
"\\s*setfilter\\s+)|\G(" . $this->ldel .
"\\s*[0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/](?:(?!block)[0-9]*[a-zA-Z_]\\w*)\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[$][0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/])|\G(" . $this->ldel .
"\\s*)/isS";
399 if ($this->counter >= strlen($this->data)) {
404 if (preg_match($this->yy_global_pattern2, $this->data, $yymatches, null, $this->counter)) {
405 $yysubmatches = $yymatches;
406 if (strlen($yysubmatches[0]) < 200) {
407 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
409 $yymatches = array_filter($yymatches,
'strlen');
411 if (empty($yymatches)) {
412 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state TAG');
415 $this->token = key($yymatches);
416 $this->value = current($yymatches);
417 $r = $this->{
'yy_r2_' . $this->token}();
419 $this->counter += strlen($this->value);
420 $this->line += substr_count($this->value,
"\n");
423 } elseif ($r ===
true) {
426 return $this->
yylex();
427 } elseif ($r ===
false) {
428 $this->counter += strlen($this->value);
429 $this->line += substr_count($this->value,
"\n");
430 if ($this->counter >= strlen($this->data)) {
437 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
496 if ($this->_yy_stack[count($this->_yy_stack) - 1] == self::TEXT) {
501 $this->value = $this->smarty->left_delimiter;
526 if (!isset($this->yy_global_pattern3)) {
527 $this->yy_global_pattern3 =
"/\G(\\s*" . $this->rdel .
")|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G(" . $this->ldel .
"\\s*)|\G([\S\s])/isS";
529 if ($this->counter >= strlen($this->data)) {
534 if (preg_match($this->yy_global_pattern3, $this->data, $yymatches, null, $this->counter)) {
535 $yysubmatches = $yymatches;
536 if (strlen($yysubmatches[0]) < 200) {
537 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
539 $yymatches = array_filter($yymatches,
'strlen');
541 if (empty($yymatches)) {
542 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state TAGBODY ');
545 $this->token = key($yymatches);
546 $this->value = current($yymatches);
547 $r = $this->{
'yy_r3_' . $this->token}();
549 $this->counter += strlen($this->value);
550 $this->line += substr_count($this->value,
"\n");
553 } elseif ($r ===
true) {
556 return $this->
yylex();
557 } elseif ($r ===
false) {
558 $this->counter += strlen($this->value);
559 $this->line += substr_count($this->value,
"\n");
560 if ($this->counter >= strlen($this->data)) {
567 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
750 if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->rdel_length) == $this->smarty->right_delimiter) {
751 preg_match(
"~\s+~", $this->value, $match);
752 $this->value = $match[0];
841 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
857 if (!isset($this->yy_global_pattern4)) {
858 $this->yy_global_pattern4 =
"/\G(" . $this->ldel .
"\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/]literal\\s*" . $this->rdel .
")|\G([\S\s])/isS";
860 if ($this->counter >= strlen($this->data)) {
865 if (preg_match($this->yy_global_pattern4, $this->data, $yymatches, null, $this->counter)) {
866 $yysubmatches = $yymatches;
867 if (strlen($yysubmatches[0]) < 200) {
868 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
870 $yymatches = array_filter($yymatches,
'strlen');
872 if (empty($yymatches)) {
873 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state LITERAL');
876 $this->token = key($yymatches);
877 $this->value = current($yymatches);
878 $r = $this->{
'yy_r4_' . $this->token}();
880 $this->counter += strlen($this->value);
881 $this->line += substr_count($this->value,
"\n");
884 } elseif ($r ===
true) {
887 return $this->
yylex();
888 } elseif ($r ===
false) {
889 $this->counter += strlen($this->value);
890 $this->line += substr_count($this->value,
"\n");
891 if ($this->counter >= strlen($this->data)) {
898 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
909 $this->literal_cnt ++;
916 if ($this->literal_cnt) {
917 $this->literal_cnt --;
928 $to = strlen($this->data);
929 preg_match(
"~{$this->ldel}[/]?literal{$this->rdel}~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
930 if (isset($match[0][1])) {
933 $this->compiler->trigger_template_error(
"missing or misspelled literal closing tag");
935 $this->value = substr($this->data, $this->counter, $to - $this->counter);
941 if (!isset($this->yy_global_pattern5)) {
942 $this->yy_global_pattern5 =
"/\G(" . $this->ldel .
"\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/]literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/])|\G(" . $this->ldel .
"\\s*[0-9]*[a-zA-Z_]\\w*)|\G(" . $this->ldel .
"\\s*)|\G([\"])|\G([`][$])|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(" . $this->ldel .
"|\\$|`\\$|\")))|\G([\S\s])/isS";
944 if ($this->counter >= strlen($this->data)) {
949 if (preg_match($this->yy_global_pattern5, $this->data, $yymatches, null, $this->counter)) {
950 $yysubmatches = $yymatches;
951 if (strlen($yysubmatches[0]) < 200) {
952 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
954 $yymatches = array_filter($yymatches,
'strlen');
956 if (empty($yymatches)) {
957 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state DOUBLEQUOTEDSTRING');
960 $this->token = key($yymatches);
961 $this->value = current($yymatches);
962 $r = $this->{
'yy_r5_' . $this->token}();
964 $this->counter += strlen($this->value);
965 $this->line += substr_count($this->value,
"\n");
968 } elseif ($r ===
true) {
971 return $this->
yylex();
972 } elseif ($r ===
false) {
973 $this->counter += strlen($this->value);
974 $this->line += substr_count($this->value,
"\n");
975 if ($this->counter >= strlen($this->data)) {
982 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
1005 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1016 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1027 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1047 $this->value = substr($this->value, 0, - 1);
1073 $to = strlen($this->data);
1074 $this->value = substr($this->data, $this->counter, $to - $this->counter);
1080 if (!isset($this->yy_global_pattern6)) {
1081 $this->yy_global_pattern6 =
"/\G(" . $this->ldel .
"\\s*strip\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/]strip\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*block)|\G([\S\s])/isS";
1083 if ($this->counter >= strlen($this->data)) {
1088 if (preg_match($this->yy_global_pattern6, $this->data, $yymatches, null, $this->counter)) {
1089 $yysubmatches = $yymatches;
1090 if (strlen($yysubmatches[0]) < 200) {
1091 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
1093 $yymatches = array_filter($yymatches,
'strlen');
1095 if (empty($yymatches)) {
1096 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state CHILDBODY');
1099 $this->token = key($yymatches);
1100 $this->value = current($yymatches);
1101 $r = $this->{
'yy_r6_' . $this->token}();
1103 $this->counter += strlen($this->value);
1104 $this->line += substr_count($this->value,
"\n");
1107 } elseif ($r ===
true) {
1110 return $this->
yylex();
1111 } elseif ($r ===
false) {
1112 $this->counter += strlen($this->value);
1113 $this->line += substr_count($this->value,
"\n");
1114 if ($this->counter >= strlen($this->data)) {
1121 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
1132 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1142 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1152 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1163 $to = strlen($this->data);
1164 preg_match(
"~" . $this->ldel .
"\s*(([/])?strip\s*" . $this->rdel .
"|block\s+)~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
1165 if (isset($match[0][1])) {
1168 $this->value = substr($this->data, $this->counter, $to - $this->counter);
1174 if (!isset($this->yy_global_pattern7)) {
1175 $this->yy_global_pattern7 =
"/\G(" . $this->ldel .
"\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*block)|\G(" . $this->ldel .
"\\s*[\/]block)|\G(" . $this->ldel .
"\\s*[$]smarty\\.block\\.(child|parent))|\G([\S\s])/isS";
1177 if ($this->counter >= strlen($this->data)) {
1182 if (preg_match($this->yy_global_pattern7, $this->data, $yymatches, null, $this->counter)) {
1183 $yysubmatches = $yymatches;
1184 if (strlen($yysubmatches[0]) < 200) {
1185 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
1187 $yymatches = array_filter($yymatches,
'strlen');
1189 if (empty($yymatches)) {
1190 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state CHILDBLOCK');
1193 $this->token = key($yymatches);
1194 $this->value = current($yymatches);
1195 $r = $this->{
'yy_r7_' . $this->token}();
1197 $this->counter += strlen($this->value);
1198 $this->line += substr_count($this->value,
"\n");
1201 } elseif ($r ===
true) {
1204 return $this->
yylex();
1205 } elseif ($r ===
false) {
1206 $this->counter += strlen($this->value);
1207 $this->line += substr_count($this->value,
"\n");
1208 if ($this->counter >= strlen($this->data)) {
1215 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
1226 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1237 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1248 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1259 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1270 $to = strlen($this->data);
1271 preg_match(
"~" . $this->ldel .
"\s*(literal\s*" . $this->rdel .
"|([/])?block(\s|" . $this->rdel .
")|[\$]smarty\.block\.(child|parent))~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
1272 if (isset($match[0][1])) {
1275 $this->value = substr($this->data, $this->counter, $to - $this->counter);
1281 if (!isset($this->yy_global_pattern8)) {
1282 $this->yy_global_pattern8 =
"/\G(" . $this->ldel .
"\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel .
"\\s*[\/]literal\\s*" . $this->rdel .
")|\G([\S\s])/isS";
1284 if ($this->counter >= strlen($this->data)) {
1289 if (preg_match($this->yy_global_pattern8, $this->data, $yymatches, null, $this->counter)) {
1290 $yysubmatches = $yymatches;
1291 if (strlen($yysubmatches[0]) < 200) {
1292 $yymatches = preg_grep(
"/(.|\s)+/", $yysubmatches);
1294 $yymatches = array_filter($yymatches,
'strlen');
1296 if (empty($yymatches)) {
1297 throw new Exception(
'Error: lexing failed because a rule matched' .
' an empty string. Input "' . substr($this->data, $this->counter, 5) .
'... state CHILDLITERAL');
1300 $this->token = key($yymatches);
1301 $this->value = current($yymatches);
1302 $r = $this->{
'yy_r8_' . $this->token}();
1304 $this->counter += strlen($this->value);
1305 $this->line += substr_count($this->value,
"\n");
1308 } elseif ($r ===
true) {
1311 return $this->
yylex();
1312 } elseif ($r ===
false) {
1313 $this->counter += strlen($this->value);
1314 $this->line += substr_count($this->value,
"\n");
1315 if ($this->counter >= strlen($this->data)) {
1322 throw new Exception(
'Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
1333 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1344 if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(
" \n\t\r", $this->value[$this->ldel_length]) !==
false :
false) {
1355 $to = strlen($this->data);
1356 preg_match(
"~{$this->ldel}[/]?literal\s*{$this->rdel}~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
1357 if (isset($match[0][1])) {
1360 $this->compiler->trigger_template_error(
"missing or misspelled literal closing tag");
1362 $this->value = substr($this->data, $this->counter, $to - $this->counter);