diff --git a/lexer/smarty_internal_configfilelexer.plex b/lexer/smarty_internal_configfilelexer.plex index 2c2e561a..5b494084 100644 --- a/lexer/smarty_internal_configfilelexer.plex +++ b/lexer/smarty_internal_configfilelexer.plex @@ -30,7 +30,7 @@ class Smarty_Internal_Configfilelexer * * @var int */ - public $dataLenght = null; + public $dataLength = null; /** * byte counter * @@ -127,7 +127,7 @@ class Smarty_Internal_Configfilelexer function __construct($data, Smarty_Internal_Config_File_Compiler $compiler) { $this->data = $data . "\n"; //now all lines are \n-terminated - $this->dataLenght = strlen($data); + $this->dataLength = strlen($data); $this->counter = 0; if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) { $this->counter += strlen($match[0]); diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index bf0d97c7..98ff6f40 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -30,7 +30,7 @@ class Smarty_Internal_Templatelexer * * @var int */ - public $dataLenght = null; + public $dataLength = null; /** * byte counter @@ -232,7 +232,7 @@ class Smarty_Internal_Templatelexer function __construct($data, Smarty_Internal_TemplateCompilerBase $compiler) { $this->data = $data; - $this->dataLenght = strlen($data); + $this->dataLength = strlen($data); $this->counter = 0; if (preg_match('/^\xEF\xBB\xBF/i', $this->data, $match)) { $this->counter += strlen($match[0]); @@ -374,7 +374,7 @@ class Smarty_Internal_Templatelexer $this->compiler->getTagCompiler('private_php')->parsePhp($this); } text { - $to = $this->dataLenght; + $to = $this->dataLength; preg_match("/($this->ldel)|(<[?]((php\s+|=)|\s+))|(<[%])|(<[?]xml\s+)|()|([?][>])|([%][>])/i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; @@ -614,7 +614,7 @@ class Smarty_Internal_Templatelexer } } text { - $to = $this->dataLenght; + $to = $this->dataLength; preg_match("/{$this->ldel}[\/]?literal{$this->rdel}/i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; @@ -678,7 +678,7 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_TEXT; } text { - $to = $this->dataLenght; + $to = $this->dataLength; $this->value = substr($this->data,$this->counter,$to-$this->counter); $this->token = Smarty_Internal_Templateparser::TP_TEXT; } diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index 783d95fa..7869ef38 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -33,7 +33,7 @@ class Smarty_Internal_Configfilelexer * * @var int */ - public $dataLenght = null; + public $dataLength = null; /** * byte counter @@ -147,7 +147,7 @@ class Smarty_Internal_Configfilelexer function __construct($data, Smarty_Internal_Config_File_Compiler $compiler) { $this->data = $data . "\n"; //now all lines are \n-terminated - $this->dataLenght = strlen($data); + $this->dataLength = strlen($data); $this->counter = 0; if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) { $this->counter += strlen($match[ 0 ]); @@ -220,10 +220,10 @@ class Smarty_Internal_Configfilelexer $this->yy_global_pattern1 = "/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -254,7 +254,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -327,10 +327,10 @@ class Smarty_Internal_Configfilelexer $this->yy_global_pattern2 = "/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -361,7 +361,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -453,10 +453,10 @@ class Smarty_Internal_Configfilelexer if (!isset($this->yy_global_pattern3)) { $this->yy_global_pattern3 = "/\G([^\n]+?(?=[ \t\r]*\n))/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -487,7 +487,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -515,10 +515,10 @@ class Smarty_Internal_Configfilelexer if (!isset($this->yy_global_pattern4)) { $this->yy_global_pattern4 = "/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -549,7 +549,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -589,10 +589,10 @@ class Smarty_Internal_Configfilelexer if (!isset($this->yy_global_pattern5)) { $this->yy_global_pattern5 = "/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -623,7 +623,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -657,10 +657,10 @@ class Smarty_Internal_Configfilelexer if (!isset($this->yy_global_pattern6)) { $this->yy_global_pattern6 = "/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -691,7 +691,7 @@ class Smarty_Internal_Configfilelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index d3520446..8e870b75 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -30,7 +30,7 @@ class Smarty_Internal_Templatelexer * * @var int */ - public $dataLenght = null; + public $dataLength = null; /** * byte counter @@ -209,7 +209,7 @@ class Smarty_Internal_Templatelexer function __construct($data, Smarty_Internal_TemplateCompilerBase $compiler) { $this->data = $data; - $this->dataLenght = strlen($data); + $this->dataLength = strlen($data); $this->counter = 0; if (preg_match('/^\xEF\xBB\xBF/i', $this->data, $match)) { $this->counter += strlen($match[ 0 ]); @@ -299,10 +299,10 @@ class Smarty_Internal_Templatelexer ")|\G(" . $this->ldel . "\\s*)|\G(\\s*" . $this->rdel . ")|\G((<[?]((php\\s+|=)|\\s+))|(<[%])|(<[?]xml\\s+)|()|([?][>])|([%][>]))|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -333,7 +333,7 @@ class Smarty_Internal_Templatelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -415,7 +415,7 @@ class Smarty_Internal_Templatelexer function yy_r1_19() { - $to = $this->dataLenght; + $to = $this->dataLength; preg_match("/($this->ldel)|(<[?]((php\s+|=)|\s+))|(<[%])|(<[?]xml\s+)|()|([?][>])|([%][>])/i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); if (isset($match[ 0 ][ 1 ])) { @@ -436,10 +436,10 @@ class Smarty_Internal_Templatelexer $this->ldel . "\\s*[$][0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*[\/])|\G(" . $this->ldel . "\\s*)/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -470,7 +470,7 @@ class Smarty_Internal_Templatelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -579,10 +579,10 @@ class Smarty_Internal_Templatelexer $this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor)\\s+)|\G(\\s+(is\\s+(not\\s+)?(odd|even|div)\\s+by)\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -613,7 +613,7 @@ class Smarty_Internal_Templatelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -926,10 +926,10 @@ class Smarty_Internal_Templatelexer "/\G(" . $this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*[\/]literal\\s*" . $this->rdel . ")|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -960,7 +960,7 @@ class Smarty_Internal_Templatelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -998,7 +998,7 @@ class Smarty_Internal_Templatelexer function yy_r4_3() { - $to = $this->dataLenght; + $to = $this->dataLength; preg_match("/{$this->ldel}[\/]?literal{$this->rdel}/i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); if (isset($match[ 0 ][ 1 ])) { @@ -1020,10 +1020,10 @@ class Smarty_Internal_Templatelexer "\\s*)|\G([\"])|\G([`][$])|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(" . $this->ldel . "|\\$|`\\$|\")))|\G([\S\s])/isS"; } - if (!isset($this->dataLenght)) { - $this->dataLenght = strlen($this->data); + if (!isset($this->dataLength)) { + $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } @@ -1054,7 +1054,7 @@ class Smarty_Internal_Templatelexer } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLenght) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token @@ -1159,7 +1159,7 @@ class Smarty_Internal_Templatelexer function yy_r5_14() { - $to = $this->dataLenght; + $to = $this->dataLength; $this->value = substr($this->data, $this->counter, $to - $this->counter); $this->token = Smarty_Internal_Templateparser::TP_TEXT; }