mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix internal $tmpx variables must be unique over all inheritance templates (Issue 149)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
12.08.2013
|
||||||
|
- bugfix internal $tmpx variables must be unique over all inheritance templates (Issue 149)
|
||||||
|
|
||||||
10.08.2013
|
10.08.2013
|
||||||
- bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482)
|
- bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482)
|
||||||
|
|
||||||
|
@@ -1,393 +1,393 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Templateparser Parsetrees
|
* Smarty Internal Plugin Templateparser Parsetrees
|
||||||
*
|
*
|
||||||
* These are classes to build parsetrees in the template parser
|
* These are classes to build parsetrees in the template parser
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @author Thue Kristensen
|
* @author Thue Kristensen
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
abstract class _smarty_parsetree
|
abstract class _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parser object
|
* Parser object
|
||||||
* @var object
|
* @var object
|
||||||
*/
|
*/
|
||||||
public $parser;
|
public $parser;
|
||||||
/**
|
/**
|
||||||
* Buffer content
|
* Buffer content
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
public $data;
|
public $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return buffer
|
* Return buffer
|
||||||
*
|
*
|
||||||
* @return string buffer content
|
* @return string buffer content
|
||||||
*/
|
*/
|
||||||
abstract public function to_smarty_php();
|
abstract public function to_smarty_php();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A complete smarty tag.
|
* A complete smarty tag.
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_tag extends _smarty_parsetree
|
class _smarty_tag extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Saved block nesting level
|
* Saved block nesting level
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $saved_block_nesting;
|
public $saved_block_nesting;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create parse tree buffer for Smarty tag
|
* Create parse tree buffer for Smarty tag
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param string $data content
|
* @param string $data content
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, $data)
|
public function __construct($parser, $data)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
$this->saved_block_nesting = $parser->block_nesting_level;
|
$this->saved_block_nesting = $parser->block_nesting_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return buffer content
|
* Return buffer content
|
||||||
*
|
*
|
||||||
* @return string content
|
* @return string content
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return complied code that loads the evaluated outout of buffer content into a temporary variable
|
* Return complied code that loads the evaluated outout of buffer content into a temporary variable
|
||||||
*
|
*
|
||||||
* @return string template code
|
* @return string template code
|
||||||
*/
|
*/
|
||||||
public function assign_to_var()
|
public function assign_to_var()
|
||||||
{
|
{
|
||||||
$var = sprintf('$_tmp%d', ++$this->parser->prefix_number);
|
$var = sprintf('$_tmp%d', ++Smarty_Internal_Templateparser::$prefix_number);
|
||||||
$this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);
|
$this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);
|
||||||
|
|
||||||
return $var;
|
return $var;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Code fragment inside a tag.
|
* Code fragment inside a tag.
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_code extends _smarty_parsetree
|
class _smarty_code extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create parse tree buffer for code fragment
|
* Create parse tree buffer for code fragment
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param string $data content
|
* @param string $data content
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, $data)
|
public function __construct($parser, $data)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return buffer content in parentheses
|
* Return buffer content in parentheses
|
||||||
*
|
*
|
||||||
* @return string content
|
* @return string content
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
return sprintf("(%s)", $this->data);
|
return sprintf("(%s)", $this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Double quoted string inside a tag.
|
* Double quoted string inside a tag.
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_doublequoted extends _smarty_parsetree
|
class _smarty_doublequoted extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create parse tree buffer for double quoted string subtrees
|
* Create parse tree buffer for double quoted string subtrees
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param _smarty_parsetree $subtree parsetree buffer
|
* @param _smarty_parsetree $subtree parsetree buffer
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, _smarty_parsetree $subtree)
|
public function __construct($parser, _smarty_parsetree $subtree)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->subtrees[] = $subtree;
|
$this->subtrees[] = $subtree;
|
||||||
if ($subtree instanceof _smarty_tag) {
|
if ($subtree instanceof _smarty_tag) {
|
||||||
$this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
|
$this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append buffer to subtree
|
* Append buffer to subtree
|
||||||
*
|
*
|
||||||
* @param _smarty_parsetree $subtree parsetree buffer
|
* @param _smarty_parsetree $subtree parsetree buffer
|
||||||
*/
|
*/
|
||||||
public function append_subtree(_smarty_parsetree $subtree)
|
public function append_subtree(_smarty_parsetree $subtree)
|
||||||
{
|
{
|
||||||
$last_subtree = count($this->subtrees) - 1;
|
$last_subtree = count($this->subtrees) - 1;
|
||||||
if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {
|
if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {
|
||||||
if ($subtree instanceof _smarty_code) {
|
if ($subtree instanceof _smarty_code) {
|
||||||
$this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
|
$this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
|
||||||
} elseif ($subtree instanceof _smarty_dq_content) {
|
} elseif ($subtree instanceof _smarty_dq_content) {
|
||||||
$this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';
|
$this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';
|
||||||
} else {
|
} else {
|
||||||
$this->subtrees[$last_subtree]->data .= $subtree->data;
|
$this->subtrees[$last_subtree]->data .= $subtree->data;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->subtrees[] = $subtree;
|
$this->subtrees[] = $subtree;
|
||||||
}
|
}
|
||||||
if ($subtree instanceof _smarty_tag) {
|
if ($subtree instanceof _smarty_tag) {
|
||||||
$this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
|
$this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge subtree buffer content together
|
* Merge subtree buffer content together
|
||||||
*
|
*
|
||||||
* @return string compiled template code
|
* @return string compiled template code
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
$code = '';
|
$code = '';
|
||||||
foreach ($this->subtrees as $subtree) {
|
foreach ($this->subtrees as $subtree) {
|
||||||
if ($code !== "") {
|
if ($code !== "") {
|
||||||
$code .= ".";
|
$code .= ".";
|
||||||
}
|
}
|
||||||
if ($subtree instanceof _smarty_tag) {
|
if ($subtree instanceof _smarty_tag) {
|
||||||
$more_php = $subtree->assign_to_var();
|
$more_php = $subtree->assign_to_var();
|
||||||
} else {
|
} else {
|
||||||
$more_php = $subtree->to_smarty_php();
|
$more_php = $subtree->to_smarty_php();
|
||||||
}
|
}
|
||||||
|
|
||||||
$code .= $more_php;
|
$code .= $more_php;
|
||||||
|
|
||||||
if (!$subtree instanceof _smarty_dq_content) {
|
if (!$subtree instanceof _smarty_dq_content) {
|
||||||
$this->parser->compiler->has_variable_string = true;
|
$this->parser->compiler->has_variable_string = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raw chars as part of a double quoted string.
|
* Raw chars as part of a double quoted string.
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_dq_content extends _smarty_parsetree
|
class _smarty_dq_content extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create parse tree buffer with string content
|
* Create parse tree buffer with string content
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param string $data string section
|
* @param string $data string section
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, $data)
|
public function __construct($parser, $data)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return content as double quoted string
|
* Return content as double quoted string
|
||||||
*
|
*
|
||||||
* @return string doubled quoted string
|
* @return string doubled quoted string
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
return '"' . $this->data . '"';
|
return '"' . $this->data . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template element
|
* Template element
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_template_buffer extends _smarty_parsetree
|
class _smarty_template_buffer extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Array of template elements
|
* Array of template elements
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $subtrees = Array();
|
public $subtrees = Array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create root of parse tree for template elements
|
* Create root of parse tree for template elements
|
||||||
*
|
*
|
||||||
* @param object $parser parse object
|
* @param object $parser parse object
|
||||||
*/
|
*/
|
||||||
public function __construct($parser)
|
public function __construct($parser)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append buffer to subtree
|
* Append buffer to subtree
|
||||||
*
|
*
|
||||||
* @param _smarty_parsetree $subtree
|
* @param _smarty_parsetree $subtree
|
||||||
*/
|
*/
|
||||||
public function append_subtree(_smarty_parsetree $subtree)
|
public function append_subtree(_smarty_parsetree $subtree)
|
||||||
{
|
{
|
||||||
$this->subtrees[] = $subtree;
|
$this->subtrees[] = $subtree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitize and merge subtree buffers together
|
* Sanitize and merge subtree buffers together
|
||||||
*
|
*
|
||||||
* @return string template code content
|
* @return string template code content
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
$code = '';
|
$code = '';
|
||||||
for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
|
for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
|
||||||
if ($key + 2 < $cnt) {
|
if ($key + 2 < $cnt) {
|
||||||
if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {
|
if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {
|
||||||
$key = $key + 1;
|
$key = $key + 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {
|
if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {
|
||||||
$key = $key + 2;
|
$key = $key + 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (substr($code, -1) == '<') {
|
if (substr($code, -1) == '<') {
|
||||||
$subtree = $this->subtrees[$key]->to_smarty_php();
|
$subtree = $this->subtrees[$key]->to_smarty_php();
|
||||||
if (substr($subtree, 0, 1) == '?') {
|
if (substr($subtree, 0, 1) == '?') {
|
||||||
$code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1);
|
$code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1);
|
||||||
} elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {
|
} elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {
|
||||||
$code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1);
|
$code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1);
|
||||||
} else {
|
} else {
|
||||||
$code .= $subtree;
|
$code .= $subtree;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($this->parser->asp_tags && substr($code, -1) == '%') {
|
if ($this->parser->asp_tags && substr($code, -1) == '%') {
|
||||||
$subtree = $this->subtrees[$key]->to_smarty_php();
|
$subtree = $this->subtrees[$key]->to_smarty_php();
|
||||||
if (substr($subtree, 0, 1) == '>') {
|
if (substr($subtree, 0, 1) == '>') {
|
||||||
$code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1);
|
$code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1);
|
||||||
} else {
|
} else {
|
||||||
$code .= $subtree;
|
$code .= $subtree;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (substr($code, -1) == '?') {
|
if (substr($code, -1) == '?') {
|
||||||
$subtree = $this->subtrees[$key]->to_smarty_php();
|
$subtree = $this->subtrees[$key]->to_smarty_php();
|
||||||
if (substr($subtree, 0, 1) == '>') {
|
if (substr($subtree, 0, 1) == '>') {
|
||||||
$code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1);
|
$code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1);
|
||||||
} else {
|
} else {
|
||||||
$code .= $subtree;
|
$code .= $subtree;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$code .= $this->subtrees[$key]->to_smarty_php();
|
$code .= $this->subtrees[$key]->to_smarty_php();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* template text
|
* template text
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_text extends _smarty_parsetree
|
class _smarty_text extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create template text buffer
|
* Create template text buffer
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param string $data text
|
* @param string $data text
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, $data)
|
public function __construct($parser, $data)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return buffer content
|
* Return buffer content
|
||||||
*
|
*
|
||||||
* @return strint text
|
* @return strint text
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* template linebreaks
|
* template linebreaks
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
class _smarty_linebreak extends _smarty_parsetree
|
class _smarty_linebreak extends _smarty_parsetree
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create buffer with linebreak content
|
* Create buffer with linebreak content
|
||||||
*
|
*
|
||||||
* @param object $parser parser object
|
* @param object $parser parser object
|
||||||
* @param string $data linebreak string
|
* @param string $data linebreak string
|
||||||
*/
|
*/
|
||||||
public function __construct($parser, $data)
|
public function __construct($parser, $data)
|
||||||
{
|
{
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return linebrak
|
* Return linebrak
|
||||||
*
|
*
|
||||||
* @return string linebreak
|
* @return string linebreak
|
||||||
*/
|
*/
|
||||||
public function to_smarty_php()
|
public function to_smarty_php()
|
||||||
{
|
{
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Templatelexer
|
* Smarty Internal Plugin Templatelexer
|
||||||
*
|
*
|
||||||
* This is the lexer to break the template source into tokens
|
* This is the lexer to break the template source into tokens
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Templatelexer
|
* Smarty Internal Plugin Templatelexer
|
||||||
@@ -22,58 +22,59 @@ class Smarty_Internal_Templatelexer
|
|||||||
public $state = 1;
|
public $state = 1;
|
||||||
private $heredoc_id_stack = Array();
|
private $heredoc_id_stack = Array();
|
||||||
public $smarty_token_names = array ( // Text for parser error messages
|
public $smarty_token_names = array ( // Text for parser error messages
|
||||||
'IDENTITY' => '===',
|
'IDENTITY' => '===',
|
||||||
'NONEIDENTITY' => '!==',
|
'NONEIDENTITY' => '!==',
|
||||||
'EQUALS' => '==',
|
'EQUALS' => '==',
|
||||||
'NOTEQUALS' => '!=',
|
'NOTEQUALS' => '!=',
|
||||||
'GREATEREQUAL' => '(>=,ge)',
|
'GREATEREQUAL' => '(>=,ge)',
|
||||||
'LESSEQUAL' => '(<=,le)',
|
'LESSEQUAL' => '(<=,le)',
|
||||||
'GREATERTHAN' => '(>,gt)',
|
'GREATERTHAN' => '(>,gt)',
|
||||||
'LESSTHAN' => '(<,lt)',
|
'LESSTHAN' => '(<,lt)',
|
||||||
'MOD' => '(%,mod)',
|
'MOD' => '(%,mod)',
|
||||||
'NOT' => '(!,not)',
|
'NOT' => '(!,not)',
|
||||||
'LAND' => '(&&,and)',
|
'LAND' => '(&&,and)',
|
||||||
'LOR' => '(||,or)',
|
'LOR' => '(||,or)',
|
||||||
'LXOR' => 'xor',
|
'LXOR' => 'xor',
|
||||||
'OPENP' => '(',
|
'OPENP' => '(',
|
||||||
'CLOSEP' => ')',
|
'CLOSEP' => ')',
|
||||||
'OPENB' => '[',
|
'OPENB' => '[',
|
||||||
'CLOSEB' => ']',
|
'CLOSEB' => ']',
|
||||||
'PTR' => '->',
|
'PTR' => '->',
|
||||||
'APTR' => '=>',
|
'APTR' => '=>',
|
||||||
'EQUAL' => '=',
|
'EQUAL' => '=',
|
||||||
'NUMBER' => 'number',
|
'NUMBER' => 'number',
|
||||||
'UNIMATH' => '+" , "-',
|
'UNIMATH' => '+" , "-',
|
||||||
'MATH' => '*" , "/" , "%',
|
'MATH' => '*" , "/" , "%',
|
||||||
'INCDEC' => '++" , "--',
|
'INCDEC' => '++" , "--',
|
||||||
'SPACE' => ' ',
|
'SPACE' => ' ',
|
||||||
'DOLLAR' => '$',
|
'DOLLAR' => '$',
|
||||||
'SEMICOLON' => ';',
|
'SEMICOLON' => ';',
|
||||||
'COLON' => ':',
|
'COLON' => ':',
|
||||||
'DOUBLECOLON' => '::',
|
'DOUBLECOLON' => '::',
|
||||||
'AT' => '@',
|
'AT' => '@',
|
||||||
'HATCH' => '#',
|
'HATCH' => '#',
|
||||||
'QUOTE' => '"',
|
'QUOTE' => '"',
|
||||||
'BACKTICK' => '`',
|
'BACKTICK' => '`',
|
||||||
'VERT' => '|',
|
'VERT' => '|',
|
||||||
'DOT' => '.',
|
'DOT' => '.',
|
||||||
'COMMA' => '","',
|
'COMMA' => '","',
|
||||||
'ANDSYM' => '"&"',
|
'ANDSYM' => '"&"',
|
||||||
'QMARK' => '"?"',
|
'QMARK' => '"?"',
|
||||||
'ID' => 'identifier',
|
'ID' => 'identifier',
|
||||||
'TEXT' => 'text',
|
'TEXT' => 'text',
|
||||||
'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
|
'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
|
||||||
'PHPSTARTTAG' => 'PHP start tag',
|
'PHPSTARTTAG' => 'PHP start tag',
|
||||||
'PHPENDTAG' => 'PHP end tag',
|
'PHPENDTAG' => 'PHP end tag',
|
||||||
'LITERALSTART' => 'Literal start',
|
'LITERALSTART' => 'Literal start',
|
||||||
'LITERALEND' => 'Literal end',
|
'LITERALEND' => 'Literal end',
|
||||||
'LDELSLASH' => 'closing tag',
|
'LDELSLASH' => 'closing tag',
|
||||||
'COMMENT' => 'comment',
|
'COMMENT' => 'comment',
|
||||||
'AS' => 'as',
|
'AS' => 'as',
|
||||||
'TO' => 'to',
|
'TO' => 'to',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct($data,$compiler)
|
|
||||||
|
function __construct($data,$compiler)
|
||||||
{
|
{
|
||||||
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
|
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
@@ -81,15 +82,16 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->line = 1;
|
$this->line = 1;
|
||||||
$this->smarty = $compiler->smarty;
|
$this->smarty = $compiler->smarty;
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
$this->ldel = preg_quote($this->smarty->left_delimiter,'/');
|
$this->ldel = preg_quote($this->smarty->left_delimiter,'/');
|
||||||
$this->ldel_length = strlen($this->smarty->left_delimiter);
|
$this->ldel_length = strlen($this->smarty->left_delimiter);
|
||||||
$this->rdel = preg_quote($this->smarty->right_delimiter,'/');
|
$this->rdel = preg_quote($this->smarty->right_delimiter,'/');
|
||||||
$this->rdel_length = strlen($this->smarty->right_delimiter);
|
$this->rdel_length = strlen($this->smarty->right_delimiter);
|
||||||
$this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
|
$this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
|
||||||
$this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
|
$this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
|
||||||
$this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
|
$this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private $_yy_state = 1;
|
private $_yy_state = 1;
|
||||||
private $_yy_stack = array();
|
private $_yy_stack = array();
|
||||||
|
|
||||||
@@ -114,6 +116,8 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->_yy_state = $state;
|
$this->_yy_state = $state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function yylex1()
|
public function yylex1()
|
||||||
{
|
{
|
||||||
$tokenMap = array (
|
$tokenMap = array (
|
||||||
@@ -191,28 +195,29 @@ class Smarty_Internal_Templatelexer
|
|||||||
|
|
||||||
} // end function
|
} // end function
|
||||||
|
|
||||||
|
|
||||||
const TEXT = 1;
|
const TEXT = 1;
|
||||||
public function yy_r1_1($yy_subpatterns)
|
function yy_r1_1($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;
|
$this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;
|
||||||
}
|
}
|
||||||
public function yy_r1_2($yy_subpatterns)
|
function yy_r1_2($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
public function yy_r1_3($yy_subpatterns)
|
function yy_r1_3($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_COMMENT;
|
$this->token = Smarty_Internal_Templateparser::TP_COMMENT;
|
||||||
}
|
}
|
||||||
public function yy_r1_5($yy_subpatterns)
|
function yy_r1_5($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
|
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
|
||||||
}
|
}
|
||||||
public function yy_r1_6($yy_subpatterns)
|
function yy_r1_6($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -221,12 +226,12 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
|
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_7($yy_subpatterns)
|
function yy_r1_7($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
|
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
|
||||||
}
|
}
|
||||||
public function yy_r1_8($yy_subpatterns)
|
function yy_r1_8($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -235,13 +240,13 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
|
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_9($yy_subpatterns)
|
function yy_r1_9($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
|
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
|
||||||
$this->yypushstate(self::LITERAL);
|
$this->yypushstate(self::LITERAL);
|
||||||
}
|
}
|
||||||
public function yy_r1_10($yy_subpatterns)
|
function yy_r1_10($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -252,7 +257,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_11($yy_subpatterns)
|
function yy_r1_11($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -263,7 +268,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_13($yy_subpatterns)
|
function yy_r1_13($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -274,7 +279,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_14($yy_subpatterns)
|
function yy_r1_14($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -285,7 +290,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_15($yy_subpatterns)
|
function yy_r1_15($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -296,7 +301,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_16($yy_subpatterns)
|
function yy_r1_16($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -307,21 +312,21 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_17($yy_subpatterns)
|
function yy_r1_17($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r1_18($yy_subpatterns)
|
function yy_r1_18($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r1_19($yy_subpatterns)
|
function yy_r1_19($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
|
if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
|
||||||
@@ -333,27 +338,27 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->value = substr($this->value, 0, 2);
|
$this->value = substr($this->value, 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r1_20($yy_subpatterns)
|
function yy_r1_20($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
|
||||||
}
|
}
|
||||||
public function yy_r1_21($yy_subpatterns)
|
function yy_r1_21($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
public function yy_r1_22($yy_subpatterns)
|
function yy_r1_22($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
|
||||||
}
|
}
|
||||||
public function yy_r1_23($yy_subpatterns)
|
function yy_r1_23($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
|
||||||
}
|
}
|
||||||
public function yy_r1_24($yy_subpatterns)
|
function yy_r1_24($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->mbstring_overload) {
|
if ($this->mbstring_overload) {
|
||||||
@@ -373,6 +378,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function yylex2()
|
public function yylex2()
|
||||||
{
|
{
|
||||||
$tokenMap = array (
|
$tokenMap = array (
|
||||||
@@ -496,13 +502,14 @@ class Smarty_Internal_Templatelexer
|
|||||||
|
|
||||||
} // end function
|
} // end function
|
||||||
|
|
||||||
|
|
||||||
const SMARTY = 2;
|
const SMARTY = 2;
|
||||||
public function yy_r2_1($yy_subpatterns)
|
function yy_r2_1($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
|
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
|
||||||
}
|
}
|
||||||
public function yy_r2_2($yy_subpatterns)
|
function yy_r2_2($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -513,7 +520,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_3($yy_subpatterns)
|
function yy_r2_3($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -524,7 +531,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_5($yy_subpatterns)
|
function yy_r2_5($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -535,7 +542,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_6($yy_subpatterns)
|
function yy_r2_6($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -546,7 +553,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_7($yy_subpatterns)
|
function yy_r2_7($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -557,300 +564,300 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_8($yy_subpatterns)
|
function yy_r2_8($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
|
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
|
||||||
$this->yypopstate();
|
$this->yypopstate();
|
||||||
}
|
}
|
||||||
public function yy_r2_9($yy_subpatterns)
|
function yy_r2_9($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r2_10($yy_subpatterns)
|
function yy_r2_10($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r2_11($yy_subpatterns)
|
function yy_r2_11($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
|
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
|
||||||
$this->yypopstate();
|
$this->yypopstate();
|
||||||
}
|
}
|
||||||
public function yy_r2_12($yy_subpatterns)
|
function yy_r2_12($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISIN;
|
$this->token = Smarty_Internal_Templateparser::TP_ISIN;
|
||||||
}
|
}
|
||||||
public function yy_r2_13($yy_subpatterns)
|
function yy_r2_13($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_AS;
|
$this->token = Smarty_Internal_Templateparser::TP_AS;
|
||||||
}
|
}
|
||||||
public function yy_r2_14($yy_subpatterns)
|
function yy_r2_14($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TO;
|
$this->token = Smarty_Internal_Templateparser::TP_TO;
|
||||||
}
|
}
|
||||||
public function yy_r2_15($yy_subpatterns)
|
function yy_r2_15($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_STEP;
|
$this->token = Smarty_Internal_Templateparser::TP_STEP;
|
||||||
}
|
}
|
||||||
public function yy_r2_16($yy_subpatterns)
|
function yy_r2_16($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
|
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
|
||||||
}
|
}
|
||||||
public function yy_r2_17($yy_subpatterns)
|
function yy_r2_17($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
|
$this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
|
||||||
}
|
}
|
||||||
public function yy_r2_18($yy_subpatterns)
|
function yy_r2_18($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
|
$this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
|
||||||
}
|
}
|
||||||
public function yy_r2_19($yy_subpatterns)
|
function yy_r2_19($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_EQUALS;
|
$this->token = Smarty_Internal_Templateparser::TP_EQUALS;
|
||||||
}
|
}
|
||||||
public function yy_r2_20($yy_subpatterns)
|
function yy_r2_20($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
|
$this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
|
||||||
}
|
}
|
||||||
public function yy_r2_22($yy_subpatterns)
|
function yy_r2_22($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
|
$this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
|
||||||
}
|
}
|
||||||
public function yy_r2_24($yy_subpatterns)
|
function yy_r2_24($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
|
$this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
|
||||||
}
|
}
|
||||||
public function yy_r2_26($yy_subpatterns)
|
function yy_r2_26($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
|
$this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
|
||||||
}
|
}
|
||||||
public function yy_r2_27($yy_subpatterns)
|
function yy_r2_27($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
|
$this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
|
||||||
}
|
}
|
||||||
public function yy_r2_28($yy_subpatterns)
|
function yy_r2_28($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_MOD;
|
$this->token = Smarty_Internal_Templateparser::TP_MOD;
|
||||||
}
|
}
|
||||||
public function yy_r2_29($yy_subpatterns)
|
function yy_r2_29($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_NOT;
|
$this->token = Smarty_Internal_Templateparser::TP_NOT;
|
||||||
}
|
}
|
||||||
public function yy_r2_30($yy_subpatterns)
|
function yy_r2_30($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LAND;
|
$this->token = Smarty_Internal_Templateparser::TP_LAND;
|
||||||
}
|
}
|
||||||
public function yy_r2_31($yy_subpatterns)
|
function yy_r2_31($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LOR;
|
$this->token = Smarty_Internal_Templateparser::TP_LOR;
|
||||||
}
|
}
|
||||||
public function yy_r2_32($yy_subpatterns)
|
function yy_r2_32($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LXOR;
|
$this->token = Smarty_Internal_Templateparser::TP_LXOR;
|
||||||
}
|
}
|
||||||
public function yy_r2_33($yy_subpatterns)
|
function yy_r2_33($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_34($yy_subpatterns)
|
function yy_r2_34($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_35($yy_subpatterns)
|
function yy_r2_35($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISODD;
|
$this->token = Smarty_Internal_Templateparser::TP_ISODD;
|
||||||
}
|
}
|
||||||
public function yy_r2_36($yy_subpatterns)
|
function yy_r2_36($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
|
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
|
||||||
}
|
}
|
||||||
public function yy_r2_37($yy_subpatterns)
|
function yy_r2_37($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_38($yy_subpatterns)
|
function yy_r2_38($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_39($yy_subpatterns)
|
function yy_r2_39($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
|
$this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
|
||||||
}
|
}
|
||||||
public function yy_r2_40($yy_subpatterns)
|
function yy_r2_40($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
|
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
|
||||||
}
|
}
|
||||||
public function yy_r2_41($yy_subpatterns)
|
function yy_r2_41($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_42($yy_subpatterns)
|
function yy_r2_42($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
|
$this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
|
||||||
}
|
}
|
||||||
public function yy_r2_43($yy_subpatterns)
|
function yy_r2_43($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
|
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
|
||||||
}
|
}
|
||||||
public function yy_r2_47($yy_subpatterns)
|
function yy_r2_47($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_OPENP;
|
$this->token = Smarty_Internal_Templateparser::TP_OPENP;
|
||||||
}
|
}
|
||||||
public function yy_r2_48($yy_subpatterns)
|
function yy_r2_48($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
|
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
|
||||||
}
|
}
|
||||||
public function yy_r2_49($yy_subpatterns)
|
function yy_r2_49($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_OPENB;
|
$this->token = Smarty_Internal_Templateparser::TP_OPENB;
|
||||||
}
|
}
|
||||||
public function yy_r2_50($yy_subpatterns)
|
function yy_r2_50($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
|
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
|
||||||
}
|
}
|
||||||
public function yy_r2_51($yy_subpatterns)
|
function yy_r2_51($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_PTR;
|
$this->token = Smarty_Internal_Templateparser::TP_PTR;
|
||||||
}
|
}
|
||||||
public function yy_r2_52($yy_subpatterns)
|
function yy_r2_52($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_APTR;
|
$this->token = Smarty_Internal_Templateparser::TP_APTR;
|
||||||
}
|
}
|
||||||
public function yy_r2_53($yy_subpatterns)
|
function yy_r2_53($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_EQUAL;
|
$this->token = Smarty_Internal_Templateparser::TP_EQUAL;
|
||||||
}
|
}
|
||||||
public function yy_r2_54($yy_subpatterns)
|
function yy_r2_54($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_INCDEC;
|
$this->token = Smarty_Internal_Templateparser::TP_INCDEC;
|
||||||
}
|
}
|
||||||
public function yy_r2_55($yy_subpatterns)
|
function yy_r2_55($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
|
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
|
||||||
}
|
}
|
||||||
public function yy_r2_57($yy_subpatterns)
|
function yy_r2_57($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_MATH;
|
$this->token = Smarty_Internal_Templateparser::TP_MATH;
|
||||||
}
|
}
|
||||||
public function yy_r2_59($yy_subpatterns)
|
function yy_r2_59($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
|
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
|
||||||
}
|
}
|
||||||
public function yy_r2_60($yy_subpatterns)
|
function yy_r2_60($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
|
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
|
||||||
}
|
}
|
||||||
public function yy_r2_61($yy_subpatterns)
|
function yy_r2_61($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
|
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
|
||||||
}
|
}
|
||||||
public function yy_r2_62($yy_subpatterns)
|
function yy_r2_62($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_COLON;
|
$this->token = Smarty_Internal_Templateparser::TP_COLON;
|
||||||
}
|
}
|
||||||
public function yy_r2_63($yy_subpatterns)
|
function yy_r2_63($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_AT;
|
$this->token = Smarty_Internal_Templateparser::TP_AT;
|
||||||
}
|
}
|
||||||
public function yy_r2_64($yy_subpatterns)
|
function yy_r2_64($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_HATCH;
|
$this->token = Smarty_Internal_Templateparser::TP_HATCH;
|
||||||
}
|
}
|
||||||
public function yy_r2_65($yy_subpatterns)
|
function yy_r2_65($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||||
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
|
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
|
||||||
}
|
}
|
||||||
public function yy_r2_66($yy_subpatterns)
|
function yy_r2_66($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
||||||
$this->yypopstate();
|
$this->yypopstate();
|
||||||
}
|
}
|
||||||
public function yy_r2_67($yy_subpatterns)
|
function yy_r2_67($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_VERT;
|
$this->token = Smarty_Internal_Templateparser::TP_VERT;
|
||||||
}
|
}
|
||||||
public function yy_r2_68($yy_subpatterns)
|
function yy_r2_68($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_DOT;
|
$this->token = Smarty_Internal_Templateparser::TP_DOT;
|
||||||
}
|
}
|
||||||
public function yy_r2_69($yy_subpatterns)
|
function yy_r2_69($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_COMMA;
|
$this->token = Smarty_Internal_Templateparser::TP_COMMA;
|
||||||
}
|
}
|
||||||
public function yy_r2_70($yy_subpatterns)
|
function yy_r2_70($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
|
$this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
|
||||||
}
|
}
|
||||||
public function yy_r2_71($yy_subpatterns)
|
function yy_r2_71($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_QMARK;
|
$this->token = Smarty_Internal_Templateparser::TP_QMARK;
|
||||||
}
|
}
|
||||||
public function yy_r2_72($yy_subpatterns)
|
function yy_r2_72($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_HEX;
|
$this->token = Smarty_Internal_Templateparser::TP_HEX;
|
||||||
}
|
}
|
||||||
public function yy_r2_73($yy_subpatterns)
|
function yy_r2_73($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
// resolve conflicts with shorttag and right_delimiter starting with '='
|
// resolve conflicts with shorttag and right_delimiter starting with '='
|
||||||
@@ -862,27 +869,29 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->token = Smarty_Internal_Templateparser::TP_ATTR;
|
$this->token = Smarty_Internal_Templateparser::TP_ATTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r2_74($yy_subpatterns)
|
function yy_r2_74($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ID;
|
$this->token = Smarty_Internal_Templateparser::TP_ID;
|
||||||
}
|
}
|
||||||
public function yy_r2_75($yy_subpatterns)
|
function yy_r2_75($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_INTEGER;
|
$this->token = Smarty_Internal_Templateparser::TP_INTEGER;
|
||||||
}
|
}
|
||||||
public function yy_r2_76($yy_subpatterns)
|
function yy_r2_76($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
|
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
|
||||||
}
|
}
|
||||||
public function yy_r2_77($yy_subpatterns)
|
function yy_r2_77($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function yylex3()
|
public function yylex3()
|
||||||
{
|
{
|
||||||
$tokenMap = array (
|
$tokenMap = array (
|
||||||
@@ -945,20 +954,21 @@ class Smarty_Internal_Templatelexer
|
|||||||
|
|
||||||
} // end function
|
} // end function
|
||||||
|
|
||||||
|
|
||||||
const LITERAL = 3;
|
const LITERAL = 3;
|
||||||
public function yy_r3_1($yy_subpatterns)
|
function yy_r3_1($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
|
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
|
||||||
$this->yypushstate(self::LITERAL);
|
$this->yypushstate(self::LITERAL);
|
||||||
}
|
}
|
||||||
public function yy_r3_2($yy_subpatterns)
|
function yy_r3_2($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
|
$this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
|
||||||
$this->yypopstate();
|
$this->yypopstate();
|
||||||
}
|
}
|
||||||
public function yy_r3_3($yy_subpatterns)
|
function yy_r3_3($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
|
if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
|
||||||
@@ -968,22 +978,22 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->value = substr($this->value, 0, 2);
|
$this->value = substr($this->value, 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r3_4($yy_subpatterns)
|
function yy_r3_4($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
|
||||||
}
|
}
|
||||||
public function yy_r3_5($yy_subpatterns)
|
function yy_r3_5($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
|
||||||
}
|
}
|
||||||
public function yy_r3_6($yy_subpatterns)
|
function yy_r3_6($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
|
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
|
||||||
}
|
}
|
||||||
public function yy_r3_7($yy_subpatterns)
|
function yy_r3_7($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->mbstring_overload) {
|
if ($this->mbstring_overload) {
|
||||||
@@ -996,7 +1006,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$to = $match[0][1];
|
$to = $match[0][1];
|
||||||
} else {
|
} else {
|
||||||
$this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
|
$this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
|
||||||
}
|
}
|
||||||
if ($this->mbstring_overload) {
|
if ($this->mbstring_overload) {
|
||||||
$this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
|
$this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
|
||||||
} else {
|
} else {
|
||||||
@@ -1005,6 +1015,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
|
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function yylex4()
|
public function yylex4()
|
||||||
{
|
{
|
||||||
$tokenMap = array (
|
$tokenMap = array (
|
||||||
@@ -1073,8 +1084,9 @@ class Smarty_Internal_Templatelexer
|
|||||||
|
|
||||||
} // end function
|
} // end function
|
||||||
|
|
||||||
|
|
||||||
const DOUBLEQUOTEDSTRING = 4;
|
const DOUBLEQUOTEDSTRING = 4;
|
||||||
public function yy_r4_1($yy_subpatterns)
|
function yy_r4_1($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -1085,7 +1097,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r4_2($yy_subpatterns)
|
function yy_r4_2($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -1096,7 +1108,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r4_4($yy_subpatterns)
|
function yy_r4_4($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -1107,7 +1119,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r4_5($yy_subpatterns)
|
function yy_r4_5($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
|
||||||
@@ -1118,7 +1130,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r4_6($yy_subpatterns)
|
function yy_r4_6($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->smarty->auto_literal) {
|
if ($this->smarty->auto_literal) {
|
||||||
@@ -1129,27 +1141,27 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function yy_r4_7($yy_subpatterns)
|
function yy_r4_7($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r4_8($yy_subpatterns)
|
function yy_r4_8($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r4_9($yy_subpatterns)
|
function yy_r4_9($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||||
$this->yypopstate();
|
$this->yypopstate();
|
||||||
}
|
}
|
||||||
public function yy_r4_10($yy_subpatterns)
|
function yy_r4_10($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
||||||
@@ -1157,22 +1169,22 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->yypushstate(self::SMARTY);
|
$this->yypushstate(self::SMARTY);
|
||||||
$this->taglineno = $this->line;
|
$this->taglineno = $this->line;
|
||||||
}
|
}
|
||||||
public function yy_r4_11($yy_subpatterns)
|
function yy_r4_11($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
|
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
|
||||||
}
|
}
|
||||||
public function yy_r4_12($yy_subpatterns)
|
function yy_r4_12($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
public function yy_r4_13($yy_subpatterns)
|
function yy_r4_13($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||||
}
|
}
|
||||||
public function yy_r4_17($yy_subpatterns)
|
function yy_r4_17($yy_subpatterns)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->mbstring_overload) {
|
if ($this->mbstring_overload) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user