master #6
318
system/vendor/smarty/lexer/smarty_internal_configfilelexer.plex
vendored
Normal file
318
system/vendor/smarty/lexer/smarty_internal_configfilelexer.plex
vendored
Normal file
@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* Smarty Internal Plugin Configfilelexer
|
||||
*
|
||||
* This is the lexer to break the config file source into tokens
|
||||
* @package Smarty
|
||||
* @subpackage Config
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
/**
|
||||
* Smarty_Internal_Configfilelexer
|
||||
*
|
||||
* This is the config file lexer.
|
||||
* It is generated from the smarty_internal_configfilelexer.plex file
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class Smarty_Internal_Configfilelexer
|
||||
{
|
||||
/**
|
||||
* Source
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $data;
|
||||
/**
|
||||
* Source length
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $dataLength = null;
|
||||
/**
|
||||
* byte counter
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $counter;
|
||||
/**
|
||||
* token number
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $token;
|
||||
/**
|
||||
* token value
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
/**
|
||||
* current line
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $line;
|
||||
/**
|
||||
* state number
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $state = 1;
|
||||
/**
|
||||
* Smarty object
|
||||
*
|
||||
* @var Smarty
|
||||
*/
|
||||
public $smarty = null;
|
||||
/**
|
||||
* compiler object
|
||||
*
|
||||
* @var Smarty_Internal_Config_File_Compiler
|
||||
*/
|
||||
private $compiler = null;
|
||||
/**
|
||||
* copy of config_booleanize
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $configBooleanize = false;
|
||||
/**
|
||||
* trace file
|
||||
*
|
||||
* @var resource
|
||||
*/
|
||||
public $yyTraceFILE;
|
||||
/**
|
||||
* trace prompt
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $yyTracePrompt;
|
||||
/**
|
||||
* state names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $state_name = array(1 => 'START', 2 => 'VALUE', 3 => 'NAKED_STRING_VALUE', 4 => 'COMMENT', 5 => 'SECTION', 6 => 'TRIPPLE');
|
||||
|
||||
/**
|
||||
* storage for assembled token patterns
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $yy_global_pattern1 = null;
|
||||
private $yy_global_pattern2 = null;
|
||||
private $yy_global_pattern3 = null;
|
||||
private $yy_global_pattern4 = null;
|
||||
private $yy_global_pattern5 = null;
|
||||
private $yy_global_pattern6 = null;
|
||||
|
||||
/**
|
||||
* token names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $smarty_token_names = array( // Text for parser error messages
|
||||
);
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param string $data template source
|
||||
* @param Smarty_Internal_Config_File_Compiler $compiler
|
||||
*/
|
||||
public function __construct($data, Smarty_Internal_Config_File_Compiler $compiler)
|
||||
{
|
||||
$this->data = $data . "\n"; //now all lines are \n-terminated
|
||||
$this->dataLength = strlen($data);
|
||||
$this->counter = 0;
|
||||
if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) {
|
||||
$this->counter += strlen($match[0]);
|
||||
}
|
||||
$this->line = 1;
|
||||
$this->compiler = $compiler;
|
||||
$this->smarty = $compiler->smarty;
|
||||
$this->configBooleanize = $this->smarty->config_booleanize;
|
||||
}
|
||||
|
||||
public function replace ($input) {
|
||||
return $input;
|
||||
}
|
||||
|
||||
public function PrintTrace()
|
||||
{
|
||||
$this->yyTraceFILE = fopen('php://output', 'w');
|
||||
$this->yyTracePrompt = '<br>';
|
||||
}
|
||||
|
||||
|
||||
/*!lex2php
|
||||
%input $this->data
|
||||
%counter $this->counter
|
||||
%token $this->token
|
||||
%value $this->value
|
||||
%line $this->line
|
||||
commentstart = /#|;/
|
||||
openB = /\[/
|
||||
closeB = /\]/
|
||||
section = /.*?(?=[\.=\[\]\r\n])/
|
||||
equal = /=/
|
||||
whitespace = /[ \t\r]+/
|
||||
dot = /\./
|
||||
id = /[0-9]*[a-zA-Z_]\w*/
|
||||
newline = /\n/
|
||||
single_quoted_string = /'[^'\\]*(?:\\.[^'\\]*)*'(?=[ \t\r]*[\n#;])/
|
||||
double_quoted_string = /"[^"\\]*(?:\\.[^"\\]*)*"(?=[ \t\r]*[\n#;])/
|
||||
tripple_quotes = /"""/
|
||||
tripple_quotes_end = /"""(?=[ \t\r]*[\n#;])/
|
||||
text = /[\S\s]/
|
||||
float = /\d+\.\d+(?=[ \t\r]*[\n#;])/
|
||||
int = /\d+(?=[ \t\r]*[\n#;])/
|
||||
maybe_bool = /[a-zA-Z]+(?=[ \t\r]*[\n#;])/
|
||||
naked_string = /[^\n]+?(?=[ \t\r]*\n)/
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename START
|
||||
|
||||
commentstart {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART;
|
||||
$this->yypushstate(self::COMMENT);
|
||||
}
|
||||
openB {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_OPENB;
|
||||
$this->yypushstate(self::SECTION);
|
||||
}
|
||||
closeB {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB;
|
||||
}
|
||||
equal {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_EQUAL;
|
||||
$this->yypushstate(self::VALUE);
|
||||
}
|
||||
whitespace {
|
||||
return false;
|
||||
}
|
||||
newline {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
|
||||
}
|
||||
id {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_ID;
|
||||
}
|
||||
text {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_OTHER;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename VALUE
|
||||
|
||||
whitespace {
|
||||
return false;
|
||||
}
|
||||
float {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_FLOAT;
|
||||
$this->yypopstate();
|
||||
}
|
||||
int {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_INT;
|
||||
$this->yypopstate();
|
||||
}
|
||||
tripple_quotes {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES;
|
||||
$this->yypushstate(self::TRIPPLE);
|
||||
}
|
||||
single_quoted_string {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING;
|
||||
$this->yypopstate();
|
||||
}
|
||||
double_quoted_string {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING;
|
||||
$this->yypopstate();
|
||||
}
|
||||
maybe_bool {
|
||||
if (!$this->configBooleanize || !in_array(strtolower($this->value), array('true', 'false', 'on', 'off', 'yes', 'no')) ) {
|
||||
$this->yypopstate();
|
||||
$this->yypushstate(self::NAKED_STRING_VALUE);
|
||||
return true; //reprocess in new state
|
||||
} else {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_BOOL;
|
||||
$this->yypopstate();
|
||||
}
|
||||
}
|
||||
naked_string {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
|
||||
$this->yypopstate();
|
||||
}
|
||||
newline {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
|
||||
$this->value = '';
|
||||
$this->yypopstate();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename NAKED_STRING_VALUE
|
||||
|
||||
naked_string {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
|
||||
$this->yypopstate();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename COMMENT
|
||||
|
||||
whitespace {
|
||||
return false;
|
||||
}
|
||||
naked_string {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
|
||||
}
|
||||
newline {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
|
||||
$this->yypopstate();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename SECTION
|
||||
|
||||
dot {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_DOT;
|
||||
}
|
||||
section {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_SECTION;
|
||||
$this->yypopstate();
|
||||
}
|
||||
|
||||
*/
|
||||
/*!lex2php
|
||||
%statename TRIPPLE
|
||||
|
||||
tripple_quotes_end {
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END;
|
||||
$this->yypopstate();
|
||||
$this->yypushstate(self::START);
|
||||
}
|
||||
text {
|
||||
$to = strlen($this->data);
|
||||
preg_match("/\"\"\"[ \t\r]*[\n#;]/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
|
||||
if (isset($match[0][1])) {
|
||||
$to = $match[0][1];
|
||||
} else {
|
||||
$this->compiler->trigger_config_file_error ('missing or misspelled literal closing tag');
|
||||
}
|
||||
$this->value = substr($this->data,$this->counter,$to-$this->counter);
|
||||
$this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
346
system/vendor/smarty/lexer/smarty_internal_configfileparser.y
vendored
Normal file
346
system/vendor/smarty/lexer/smarty_internal_configfileparser.y
vendored
Normal file
@ -0,0 +1,346 @@
|
||||
/**
|
||||
* Smarty Internal Plugin Configfileparser
|
||||
*
|
||||
* This is the config file parser
|
||||
*
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Config
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
%name TPC_
|
||||
%declare_class {
|
||||
/**
|
||||
* Smarty Internal Plugin Configfileparse
|
||||
*
|
||||
* This is the config file parser.
|
||||
* It is generated from the smarty_internal_configfileparser.y file
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class Smarty_Internal_Configfileparser
|
||||
}
|
||||
%include_class
|
||||
{
|
||||
/**
|
||||
* result status
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $successful = true;
|
||||
/**
|
||||
* return value
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
public $retvalue = 0;
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
public $yymajor;
|
||||
/**
|
||||
* lexer object
|
||||
*
|
||||
* @var Smarty_Internal_Configfilelexer
|
||||
*/
|
||||
private $lex;
|
||||
/**
|
||||
* internal error flag
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $internalError = false;
|
||||
/**
|
||||
* compiler object
|
||||
*
|
||||
* @var Smarty_Internal_Config_File_Compiler
|
||||
*/
|
||||
public $compiler = null;
|
||||
/**
|
||||
* smarty object
|
||||
*
|
||||
* @var Smarty
|
||||
*/
|
||||
public $smarty = null;
|
||||
/**
|
||||
* copy of config_overwrite property
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $configOverwrite = false;
|
||||
/**
|
||||
* copy of config_read_hidden property
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $configReadHidden = false;
|
||||
/**
|
||||
* helper map
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $escapes_single = array('\\' => '\\',
|
||||
'\'' => '\'');
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param Smarty_Internal_Configfilelexer $lex
|
||||
* @param Smarty_Internal_Config_File_Compiler $compiler
|
||||
*/
|
||||
public function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler)
|
||||
{
|
||||
$this->lex = $lex;
|
||||
$this->smarty = $compiler->smarty;
|
||||
$this->compiler = $compiler;
|
||||
$this->configOverwrite = $this->smarty->config_overwrite;
|
||||
$this->configReadHidden = $this->smarty->config_read_hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse optional boolean keywords
|
||||
*
|
||||
* @param string $str
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function parse_bool($str)
|
||||
{
|
||||
$str = strtolower($str);
|
||||
if (in_array($str, array('on', 'yes', 'true'))) {
|
||||
$res = true;
|
||||
} else {
|
||||
$res = false;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse single quoted string
|
||||
* remove outer quotes
|
||||
* unescape inner quotes
|
||||
*
|
||||
* @param string $qstr
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function parse_single_quoted_string($qstr)
|
||||
{
|
||||
$escaped_string = substr($qstr, 1, strlen($qstr) - 2); //remove outer quotes
|
||||
|
||||
$ss = preg_split('/(\\\\.)/', $escaped_string, - 1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
$str = '';
|
||||
foreach ($ss as $s) {
|
||||
if (strlen($s) === 2 && $s[0] === '\\') {
|
||||
if (isset(self::$escapes_single[$s[1]])) {
|
||||
$s = self::$escapes_single[$s[1]];
|
||||
}
|
||||
}
|
||||
$str .= $s;
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse double quoted string
|
||||
*
|
||||
* @param string $qstr
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function parse_double_quoted_string($qstr)
|
||||
{
|
||||
$inner_str = substr($qstr, 1, strlen($qstr) - 2);
|
||||
return stripcslashes($inner_str);
|
||||
}
|
||||
|
||||
/**
|
||||
* parse triple quoted string
|
||||
*
|
||||
* @param string $qstr
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function parse_tripple_double_quoted_string($qstr)
|
||||
{
|
||||
return stripcslashes($qstr);
|
||||
}
|
||||
|
||||
/**
|
||||
* set a config variable in target array
|
||||
*
|
||||
* @param array $var
|
||||
* @param array $target_array
|
||||
*/
|
||||
private function set_var(array $var, array &$target_array)
|
||||
{
|
||||
$key = $var['key'];
|
||||
$value = $var['value'];
|
||||
|
||||
if ($this->configOverwrite || !isset($target_array['vars'][$key])) {
|
||||
$target_array['vars'][$key] = $value;
|
||||
} else {
|
||||
settype($target_array['vars'][$key], 'array');
|
||||
$target_array['vars'][$key][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add config variable to global vars
|
||||
*
|
||||
* @param array $vars
|
||||
*/
|
||||
private function add_global_vars(array $vars)
|
||||
{
|
||||
if (!isset($this->compiler->config_data['vars'])) {
|
||||
$this->compiler->config_data['vars'] = array();
|
||||
}
|
||||
foreach ($vars as $var) {
|
||||
$this->set_var($var, $this->compiler->config_data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add config variable to section
|
||||
*
|
||||
* @param string $section_name
|
||||
* @param array $vars
|
||||
*/
|
||||
private function add_section_vars($section_name, array $vars)
|
||||
{
|
||||
if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) {
|
||||
$this->compiler->config_data['sections'][$section_name]['vars'] = array();
|
||||
}
|
||||
foreach ($vars as $var) {
|
||||
$this->set_var($var, $this->compiler->config_data['sections'][$section_name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%token_prefix TPC_
|
||||
|
||||
%parse_accept
|
||||
{
|
||||
$this->successful = !$this->internalError;
|
||||
$this->internalError = false;
|
||||
$this->retvalue = $this->_retvalue;
|
||||
}
|
||||
|
||||
%syntax_error
|
||||
{
|
||||
$this->internalError = true;
|
||||
$this->yymajor = $yymajor;
|
||||
$this->compiler->trigger_config_file_error();
|
||||
}
|
||||
|
||||
%stack_overflow
|
||||
{
|
||||
$this->internalError = true;
|
||||
$this->compiler->trigger_config_file_error('Stack overflow in configfile parser');
|
||||
}
|
||||
|
||||
// Complete config file
|
||||
start(res) ::= global_vars sections. {
|
||||
res = null;
|
||||
}
|
||||
|
||||
// Global vars
|
||||
global_vars(res) ::= var_list(vl). {
|
||||
$this->add_global_vars(vl);
|
||||
res = null;
|
||||
}
|
||||
|
||||
// Sections
|
||||
sections(res) ::= sections section. {
|
||||
res = null;
|
||||
}
|
||||
|
||||
sections(res) ::= . {
|
||||
res = null;
|
||||
}
|
||||
|
||||
section(res) ::= OPENB SECTION(i) CLOSEB newline var_list(vars). {
|
||||
$this->add_section_vars(i, vars);
|
||||
res = null;
|
||||
}
|
||||
|
||||
section(res) ::= OPENB DOT SECTION(i) CLOSEB newline var_list(vars). {
|
||||
if ($this->configReadHidden) {
|
||||
$this->add_section_vars(i, vars);
|
||||
}
|
||||
res = null;
|
||||
}
|
||||
|
||||
// Var list
|
||||
var_list(res) ::= var_list(vl) newline. {
|
||||
res = vl;
|
||||
}
|
||||
|
||||
var_list(res) ::= var_list(vl) var(v). {
|
||||
res = array_merge(vl, array(v));
|
||||
}
|
||||
|
||||
var_list(res) ::= . {
|
||||
res = array();
|
||||
}
|
||||
|
||||
|
||||
// Var
|
||||
var(res) ::= ID(id) EQUAL value(v). {
|
||||
res = array('key' => id, 'value' => v);
|
||||
}
|
||||
|
||||
|
||||
value(res) ::= FLOAT(i). {
|
||||
res = (float) i;
|
||||
}
|
||||
|
||||
value(res) ::= INT(i). {
|
||||
res = (int) i;
|
||||
}
|
||||
|
||||
value(res) ::= BOOL(i). {
|
||||
res = $this->parse_bool(i);
|
||||
}
|
||||
|
||||
value(res) ::= SINGLE_QUOTED_STRING(i). {
|
||||
res = self::parse_single_quoted_string(i);
|
||||
}
|
||||
|
||||
value(res) ::= DOUBLE_QUOTED_STRING(i). {
|
||||
res = self::parse_double_quoted_string(i);
|
||||
}
|
||||
|
||||
value(res) ::= TRIPPLE_QUOTES(i) TRIPPLE_TEXT(c) TRIPPLE_QUOTES_END(ii). {
|
||||
res = self::parse_tripple_double_quoted_string(c);
|
||||
}
|
||||
|
||||
value(res) ::= TRIPPLE_QUOTES(i) TRIPPLE_QUOTES_END(ii). {
|
||||
res = '';
|
||||
}
|
||||
|
||||
value(res) ::= NAKED_STRING(i). {
|
||||
res = i;
|
||||
}
|
||||
|
||||
// NOTE: this is not a valid rule
|
||||
// It is added hier to produce a usefull error message on a missing '=';
|
||||
value(res) ::= OTHER(i). {
|
||||
res = i;
|
||||
}
|
||||
|
||||
|
||||
// Newline and comments
|
||||
newline(res) ::= NEWLINE. {
|
||||
res = null;
|
||||
}
|
||||
|
||||
newline(res) ::= COMMENTSTART NEWLINE. {
|
||||
res = null;
|
||||
}
|
||||
|
||||
newline(res) ::= COMMENTSTART NAKED_STRING NEWLINE. {
|
||||
res = null;
|
||||
}
|
687
system/vendor/smarty/lexer/smarty_internal_templatelexer.plex
vendored
Normal file
687
system/vendor/smarty/lexer/smarty_internal_templatelexer.plex
vendored
Normal file
@ -0,0 +1,687 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Smarty.
|
||||
*
|
||||
* (c) 2015 Uwe Tews
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty_Internal_Templatelexer
|
||||
* This is the template file lexer.
|
||||
* It is generated from the smarty_internal_templatelexer.plex file
|
||||
*
|
||||
*
|
||||
* @author Uwe Tews <uwe.tews@googlemail.com>
|
||||
*/
|
||||
class Smarty_Internal_Templatelexer
|
||||
{
|
||||
/**
|
||||
* Source
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* Source length
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $dataLength = null;
|
||||
|
||||
/**
|
||||
* byte counter
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $counter;
|
||||
|
||||
/**
|
||||
* token number
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $token;
|
||||
|
||||
/**
|
||||
* token value
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
|
||||
/**
|
||||
* current line
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $line;
|
||||
|
||||
/**
|
||||
* tag start line
|
||||
*
|
||||
* @var
|
||||
*/
|
||||
public $taglineno;
|
||||
|
||||
/**
|
||||
* php code type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $phpType = '';
|
||||
|
||||
/**
|
||||
* state number
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $state = 1;
|
||||
|
||||
/**
|
||||
* Smarty object
|
||||
*
|
||||
* @var Smarty
|
||||
*/
|
||||
public $smarty = null;
|
||||
|
||||
/**
|
||||
* compiler object
|
||||
*
|
||||
* @var Smarty_Internal_TemplateCompilerBase
|
||||
*/
|
||||
public $compiler = null;
|
||||
|
||||
/**
|
||||
* trace file
|
||||
*
|
||||
* @var resource
|
||||
*/
|
||||
public $yyTraceFILE;
|
||||
|
||||
/**
|
||||
* trace prompt
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $yyTracePrompt;
|
||||
|
||||
/**
|
||||
* XML flag true while processing xml
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $is_xml = false;
|
||||
|
||||
/**
|
||||
* state names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING',);
|
||||
|
||||
/**
|
||||
* token names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $smarty_token_names = array( // Text for parser error messages
|
||||
'NOT' => '(!,not)',
|
||||
'OPENP' => '(',
|
||||
'CLOSEP' => ')',
|
||||
'OPENB' => '[',
|
||||
'CLOSEB' => ']',
|
||||
'PTR' => '->',
|
||||
'APTR' => '=>',
|
||||
'EQUAL' => '=',
|
||||
'NUMBER' => 'number',
|
||||
'UNIMATH' => '+" , "-',
|
||||
'MATH' => '*" , "/" , "%',
|
||||
'INCDEC' => '++" , "--',
|
||||
'SPACE' => ' ',
|
||||
'DOLLAR' => '$',
|
||||
'SEMICOLON' => ';',
|
||||
'COLON' => ':',
|
||||
'DOUBLECOLON' => '::',
|
||||
'AT' => '@',
|
||||
'HATCH' => '#',
|
||||
'QUOTE' => '"',
|
||||
'BACKTICK' => '`',
|
||||
'VERT' => '"|" modifier',
|
||||
'DOT' => '.',
|
||||
'COMMA' => '","',
|
||||
'QMARK' => '"?"',
|
||||
'ID' => 'id, name',
|
||||
'TEXT' => 'text',
|
||||
'LDELSLASH' => '{/..} closing tag',
|
||||
'LDEL' => '{...} Smarty tag',
|
||||
'COMMENT' => 'comment',
|
||||
'AS' => 'as',
|
||||
'TO' => 'to',
|
||||
'LOGOP' => '"<", "==" ... logical operator',
|
||||
'TLOGOP' => '"lt", "eq" ... logical operator; "is div by" ... if condition',
|
||||
'SCOND' => '"is even" ... if condition',
|
||||
);
|
||||
|
||||
/**
|
||||
* literal tag nesting level
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $literal_cnt = 0;
|
||||
|
||||
/**
|
||||
* preg token pattern for state TEXT
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $yy_global_pattern1 = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for state TAG
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $yy_global_pattern2 = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for state TAGBODY
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $yy_global_pattern3 = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for state LITERAL
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $yy_global_pattern4 = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for state DOUBLEQUOTEDSTRING
|
||||
*
|
||||
* @var null
|
||||
*/
|
||||
private $yy_global_pattern5 = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for text
|
||||
*
|
||||
* @var null
|
||||
*/
|
||||
private $yy_global_text = null;
|
||||
|
||||
/**
|
||||
* preg token pattern for literal
|
||||
*
|
||||
* @var null
|
||||
*/
|
||||
private $yy_global_literal = null;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param string $source template source
|
||||
* @param Smarty_Internal_TemplateCompilerBase $compiler
|
||||
*/
|
||||
public function __construct($source, Smarty_Internal_TemplateCompilerBase $compiler)
|
||||
{
|
||||
$this->data = $source;
|
||||
$this->dataLength = strlen($this->data);
|
||||
$this->counter = 0;
|
||||
if (preg_match('/^\xEF\xBB\xBF/i', $this->data, $match)) {
|
||||
$this->counter += strlen($match[0]);
|
||||
}
|
||||
$this->line = 1;
|
||||
$this->smarty = $compiler->template->smarty;
|
||||
$this->compiler = $compiler;
|
||||
$this->compiler->initDelimiterPreg();
|
||||
$this->smarty_token_names['LDEL'] = $this->smarty->getLeftDelimiter();
|
||||
$this->smarty_token_names['RDEL'] = $this->smarty->getRightDelimiter();
|
||||
}
|
||||
|
||||
/**
|
||||
* open lexer/parser trace file
|
||||
*
|
||||
*/
|
||||
public function PrintTrace()
|
||||
{
|
||||
$this->yyTraceFILE = fopen('php://output', 'w');
|
||||
$this->yyTracePrompt = '<br>';
|
||||
}
|
||||
|
||||
/**
|
||||
* replace placeholders with runtime preg code
|
||||
*
|
||||
* @param string $preg
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function replace($preg)
|
||||
{
|
||||
return $this->compiler->replaceDelimiter($preg);
|
||||
}
|
||||
|
||||
/**
|
||||
* check if current value is an autoliteral left delimiter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isAutoLiteral()
|
||||
{
|
||||
return $this->smarty->getAutoLiteral() && isset($this->value[ $this->compiler->getLdelLength() ]) ?
|
||||
strpos(" \n\t\r", $this->value[ $this->compiler->getLdelLength() ]) !== false : false;
|
||||
}
|
||||
|
||||
/*!lex2php
|
||||
%input $this->data
|
||||
%counter $this->counter
|
||||
%token $this->token
|
||||
%value $this->value
|
||||
%line $this->line
|
||||
userliteral = ~(SMARTYldel)SMARTYautoliteral\s+SMARTYliteral~
|
||||
char = ~[\S\s]~
|
||||
textdoublequoted = ~([^"\\]*?)((?:\\.[^"\\]*?)*?)(?=((SMARTYldel)SMARTYal|\$|`\$|"SMARTYliteral))~
|
||||
namespace = ~([0-9]*[a-zA-Z_]\w*)?(\\[0-9]*[a-zA-Z_]\w*)+~
|
||||
emptyjava = ~[{][}]~
|
||||
slash = ~[/]~
|
||||
ldel = ~(SMARTYldel)SMARTYal~
|
||||
rdel = ~\s*SMARTYrdel~
|
||||
nocacherdel = ~(\s+nocache)?\s*SMARTYrdel~
|
||||
smartyblockchildparent = ~[\$]smarty\.block\.(child|parent)~
|
||||
integer = ~\d+~
|
||||
hex = ~0[xX][0-9a-fA-F]+~
|
||||
math = ~\s*([*]{1,2}|[%/^&]|[<>]{2})\s*~
|
||||
comment = ~(SMARTYldel)SMARTYal[*]~
|
||||
incdec = ~([+]|[-]){2}~
|
||||
unimath = ~\s*([+]|[-])\s*~
|
||||
openP = ~\s*[(]\s*~
|
||||
closeP = ~\s*[)]~
|
||||
openB = ~\[\s*~
|
||||
closeB = ~\s*\]~
|
||||
dollar = ~[$]~
|
||||
dot = ~[.]~
|
||||
comma = ~\s*[,]\s*~
|
||||
doublecolon = ~[:]{2}~
|
||||
colon = ~\s*[:]\s*~
|
||||
at = ~[@]~
|
||||
hatch = ~[#]~
|
||||
semicolon = ~\s*[;]\s*~
|
||||
equal = ~\s*[=]\s*~
|
||||
space = ~\s+~
|
||||
ptr = ~\s*[-][>]\s*~
|
||||
aptr = ~\s*[=][>]\s*~
|
||||
singlequotestring = ~'[^'\\]*(?:\\.[^'\\]*)*'~
|
||||
backtick = ~[`]~
|
||||
vert = ~[|][@]?~
|
||||
qmark = ~\s*[?]\s*~
|
||||
constant = ~[_]+[A-Z0-9][0-9A-Z_]*|[A-Z][0-9A-Z_]*(?![0-9A-Z_]*[a-z])~
|
||||
attr = ~\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\s*[=]\s*~
|
||||
id = ~[0-9]*[a-zA-Z_]\w*~
|
||||
literal = ~literal~
|
||||
strip = ~strip~
|
||||
lop = ~\s*([!=][=]{1,2}|[<][=>]?|[>][=]?|[&|]{2})\s*~
|
||||
slop = ~\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor)\s+~
|
||||
tlop = ~\s+is\s+(not\s+)?(odd|even|div)\s+by\s+~
|
||||
scond = ~\s+is\s+(not\s+)?(odd|even)~
|
||||
isin = ~\s+is\s+in\s+~
|
||||
as = ~\s+as\s+~
|
||||
to = ~\s+to\s+~
|
||||
step = ~\s+step\s+~
|
||||
if = ~(if|elseif|else if|while)\s+~
|
||||
for = ~for\s+~
|
||||
makenocache = ~make_nocache\s+~
|
||||
array = ~array~
|
||||
foreach = ~foreach(?![^\s])~
|
||||
setfilter = ~setfilter\s+~
|
||||
instanceof = ~\s+instanceof\s+~
|
||||
not = ~[!]\s*|not\s+~
|
||||
typecast = ~[(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\s*~
|
||||
double_quote = ~["]~
|
||||
*/
|
||||
/*!lex2php
|
||||
%statename TEXT
|
||||
emptyjava {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
comment {
|
||||
$to = $this->dataLength;
|
||||
preg_match("/[*]{$this->compiler->getRdelPreg()}[\n]?/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
|
||||
if (isset($match[0][1])) {
|
||||
$to = $match[0][1] + strlen($match[0][0]);
|
||||
} else {
|
||||
$this->compiler->trigger_template_error ("missing or misspelled comment closing tag '{$this->smarty->getRightDelimiter()}'");
|
||||
}
|
||||
$this->value = substr($this->data,$this->counter,$to-$this->counter);
|
||||
return false;
|
||||
}
|
||||
userliteral {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
ldel literal rdel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
|
||||
$this->yypushstate(self::LITERAL);
|
||||
}
|
||||
ldel slash literal rdel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
|
||||
$this->yypushstate(self::LITERAL);
|
||||
}
|
||||
ldel {
|
||||
$this->yypushstate(self::TAG);
|
||||
return true;
|
||||
}
|
||||
char {
|
||||
if (!isset($this->yy_global_text)) {
|
||||
$this->yy_global_text = $this->replace('/(SMARTYldel)SMARTYal/isS');
|
||||
}
|
||||
$to = $this->dataLength;
|
||||
preg_match($this->yy_global_text, $this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
|
||||
if (isset($match[0][1])) {
|
||||
$to = $match[0][1];
|
||||
}
|
||||
$this->value = substr($this->data,$this->counter,$to-$this->counter);
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
*/
|
||||
/*!lex2php
|
||||
%statename TAG
|
||||
ldel if {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELIF;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel for {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel foreach {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel setfilter {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel makenocache {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELMAKENOCACHE;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel id nocacherdel {
|
||||
$this->yypopstate();
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SIMPLETAG;
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel smartyblockchildparent rdel {
|
||||
$this->yypopstate();
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT;
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel slash id rdel {
|
||||
$this->yypopstate();
|
||||
$this->token = Smarty_Internal_Templateparser::TP_CLOSETAG;
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel dollar id nocacherdel {
|
||||
if ($this->_yy_stack[count($this->_yy_stack)-1] === self::TEXT) {
|
||||
$this->yypopstate();
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SIMPELOUTPUT;
|
||||
$this->taglineno = $this->line;
|
||||
} else {
|
||||
$this->value = $this->smarty->getLeftDelimiter();
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
}
|
||||
ldel slash {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
ldel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||
$this->yybegin(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
*/
|
||||
/*!lex2php
|
||||
%statename TAGBODY
|
||||
rdel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
|
||||
$this->yypopstate();
|
||||
}
|
||||
ldel {
|
||||
$this->yypushstate(self::TAG);
|
||||
return true;
|
||||
}
|
||||
double_quote {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
|
||||
$this->compiler->enterDoubleQuote();
|
||||
}
|
||||
singlequotestring {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
|
||||
}
|
||||
dollar id {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
|
||||
}
|
||||
dollar {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
|
||||
}
|
||||
isin {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_ISIN;
|
||||
}
|
||||
as {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_AS;
|
||||
}
|
||||
to {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TO;
|
||||
}
|
||||
step {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_STEP;
|
||||
}
|
||||
instanceof {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
|
||||
}
|
||||
lop {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LOGOP;
|
||||
}
|
||||
slop {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SLOGOP;
|
||||
}
|
||||
tlop {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TLOGOP;
|
||||
}
|
||||
scond {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SINGLECOND;
|
||||
}
|
||||
not{
|
||||
$this->token = Smarty_Internal_Templateparser::TP_NOT;
|
||||
}
|
||||
typecast {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
|
||||
}
|
||||
openP {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_OPENP;
|
||||
}
|
||||
closeP {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
|
||||
}
|
||||
openB {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_OPENB;
|
||||
}
|
||||
closeB {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
|
||||
}
|
||||
ptr {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_PTR;
|
||||
}
|
||||
aptr {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_APTR;
|
||||
}
|
||||
equal {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_EQUAL;
|
||||
}
|
||||
incdec {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_INCDEC;
|
||||
}
|
||||
unimath {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
|
||||
}
|
||||
math {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_MATH;
|
||||
}
|
||||
at {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_AT;
|
||||
}
|
||||
array openP {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_ARRAYOPEN;
|
||||
}
|
||||
hatch {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_HATCH;
|
||||
}
|
||||
attr {
|
||||
// resolve conflicts with shorttag and right_delimiter starting with '='
|
||||
if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->compiler->getRdelLength()) === $this->smarty->getRightDelimiter()) {
|
||||
preg_match('/\s+/',$this->value,$match);
|
||||
$this->value = $match[0];
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
|
||||
} else {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_ATTR;
|
||||
}
|
||||
}
|
||||
namespace {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_NAMESPACE;
|
||||
}
|
||||
id {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_ID;
|
||||
}
|
||||
integer {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_INTEGER;
|
||||
}
|
||||
backtick {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
||||
$this->yypopstate();
|
||||
}
|
||||
vert {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_VERT;
|
||||
}
|
||||
dot {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_DOT;
|
||||
}
|
||||
comma {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_COMMA;
|
||||
}
|
||||
semicolon {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
|
||||
}
|
||||
doublecolon {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
|
||||
}
|
||||
colon {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_COLON;
|
||||
}
|
||||
qmark {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QMARK;
|
||||
}
|
||||
hex {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_HEX;
|
||||
}
|
||||
space {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
|
||||
}
|
||||
char {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
*/
|
||||
|
||||
/*!lex2php
|
||||
%statename LITERAL
|
||||
ldel literal rdel {
|
||||
$this->literal_cnt++;
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
|
||||
}
|
||||
ldel slash literal rdel {
|
||||
if ($this->literal_cnt) {
|
||||
$this->literal_cnt--;
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
|
||||
} else {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
|
||||
$this->yypopstate();
|
||||
}
|
||||
}
|
||||
char {
|
||||
if (!isset($this->yy_global_literal)) {
|
||||
$this->yy_global_literal = $this->replace('/(SMARTYldel)SMARTYal[\/]?literalSMARTYrdel/isS');
|
||||
}
|
||||
$to = $this->dataLength;
|
||||
preg_match($this->yy_global_literal, $this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
|
||||
if (isset($match[0][1])) {
|
||||
$to = $match[0][1];
|
||||
} else {
|
||||
$this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
|
||||
}
|
||||
$this->value = substr($this->data,$this->counter,$to-$this->counter);
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
|
||||
}
|
||||
*/
|
||||
/*!lex2php
|
||||
%statename DOUBLEQUOTEDSTRING
|
||||
userliteral {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
ldel literal rdel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
ldel slash literal rdel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
ldel slash {
|
||||
$this->yypushstate(self::TAG);
|
||||
return true;
|
||||
}
|
||||
ldel id {
|
||||
$this->yypushstate(self::TAG);
|
||||
return true;
|
||||
}
|
||||
ldel {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_LDEL;
|
||||
$this->taglineno = $this->line;
|
||||
$this->yypushstate(self::TAGBODY);
|
||||
}
|
||||
double_quote {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
|
||||
$this->yypopstate();
|
||||
}
|
||||
backtick dollar {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
|
||||
$this->value = substr($this->value,0,-1);
|
||||
$this->yypushstate(self::TAGBODY);
|
||||
$this->taglineno = $this->line;
|
||||
}
|
||||
dollar id {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
|
||||
}
|
||||
dollar {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
textdoublequoted {
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
char {
|
||||
$to = $this->dataLength;
|
||||
$this->value = substr($this->data,$this->counter,$to-$this->counter);
|
||||
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
1269
system/vendor/smarty/lexer/smarty_internal_templateparser.y
vendored
Normal file
1269
system/vendor/smarty/lexer/smarty_internal_templateparser.y
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user