upload reformatted versions

This commit is contained in:
Uwe.Tews@googlemail.com
2014-06-08 16:00:56 +00:00
parent e5dd155809
commit ee4a77b797
2 changed files with 4736 additions and 3339 deletions

View File

@@ -1,12 +1,13 @@
<?php
/**
* Smarty Internal Plugin Templatelexer
*
* This is the lexer to break the template source into tokens
*
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* Smarty Internal Plugin Templatelexer
*/
@@ -76,7 +77,6 @@
'TO' => 'to',
);
function __construct($data, $compiler)
{
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
@@ -100,7 +100,6 @@
$this->yyTracePrompt = '<br>';
}
private $_yy_state = 1;
private $_yy_stack = array();
@@ -130,7 +129,6 @@
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
}
}
public function yybegin($state)
@@ -141,8 +139,6 @@
}
}
public function yylex1()
{
$tokenMap = array(
@@ -206,27 +202,29 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const TEXT = 1;
function yy_r1_1($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
function yy_r1_2($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_COMMENT;
}
function yy_r1_4($yy_subpatterns)
{
@@ -236,6 +234,7 @@
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
}
}
function yy_r1_5($yy_subpatterns)
{
@@ -245,6 +244,7 @@
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
}
}
function yy_r1_6($yy_subpatterns)
{
@@ -255,6 +255,7 @@
$this->yypushstate(self::LITERAL);
}
}
function yy_r1_7($yy_subpatterns)
{
@@ -266,6 +267,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_9($yy_subpatterns)
{
@@ -277,6 +279,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_10($yy_subpatterns)
{
@@ -288,6 +291,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_11($yy_subpatterns)
{
@@ -299,6 +303,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_12($yy_subpatterns)
{
@@ -310,6 +315,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_13($yy_subpatterns)
{
@@ -321,6 +327,7 @@
$this->taglineno = $this->line;
}
}
function yy_r1_14($yy_subpatterns)
{
@@ -333,26 +340,31 @@
$this->value = substr($this->value, 0, 2);
}
}
function yy_r1_15($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
}
function yy_r1_16($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
function yy_r1_17($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
}
function yy_r1_18($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}
function yy_r1_19($yy_subpatterns)
{
@@ -373,7 +385,6 @@
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
public function yylex2()
{
$tokenMap = array(
@@ -486,250 +497,296 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const SMARTY = 2;
function yy_r2_1($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
}
function yy_r2_2($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
}
function yy_r2_3($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT;
$this->taglineno = $this->line;
}
function yy_r2_5($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
}
function yy_r2_6($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_RDEL;
$this->yypopstate();
}
function yy_r2_7($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISIN;
}
function yy_r2_8($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_AS;
}
function yy_r2_9($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TO;
}
function yy_r2_10($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_STEP;
}
function yy_r2_11($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
}
function yy_r2_12($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
}
function yy_r2_13($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
}
function yy_r2_14($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_EQUALS;
}
function yy_r2_15($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
}
function yy_r2_17($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
}
function yy_r2_19($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
}
function yy_r2_21($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
}
function yy_r2_22($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
}
function yy_r2_23($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_MOD;
}
function yy_r2_24($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NOT;
}
function yy_r2_25($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LAND;
}
function yy_r2_26($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LOR;
}
function yy_r2_27($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LXOR;
}
function yy_r2_28($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
}
function yy_r2_29($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
}
function yy_r2_30($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISODD;
}
function yy_r2_31($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
}
function yy_r2_32($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
}
function yy_r2_33($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
}
function yy_r2_34($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
}
function yy_r2_35($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
}
function yy_r2_36($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
}
function yy_r2_37($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
}
function yy_r2_38($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
}
function yy_r2_42($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_OPENP;
}
function yy_r2_43($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
}
function yy_r2_44($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_OPENB;
}
function yy_r2_45($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
}
function yy_r2_46($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_PTR;
}
function yy_r2_47($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_APTR;
}
function yy_r2_48($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_EQUAL;
}
function yy_r2_49($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INCDEC;
}
function yy_r2_50($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
}
function yy_r2_52($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_MATH;
}
function yy_r2_54($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_AT;
}
function yy_r2_55($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_HATCH;
}
function yy_r2_56($yy_subpatterns)
{
@@ -742,72 +799,86 @@
$this->token = Smarty_Internal_Templateparser::TP_ATTR;
}
}
function yy_r2_57($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ID;
}
function yy_r2_58($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INTEGER;
}
function yy_r2_59($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
$this->yypopstate();
}
function yy_r2_60($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_VERT;
}
function yy_r2_61($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOT;
}
function yy_r2_62($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_COMMA;
}
function yy_r2_63($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
}
function yy_r2_64($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
}
function yy_r2_65($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_COLON;
}
function yy_r2_66($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
}
function yy_r2_67($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_QMARK;
}
function yy_r2_68($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_HEX;
}
function yy_r2_69($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
}
function yy_r2_70($yy_subpatterns)
{
@@ -819,6 +890,7 @@
$this->taglineno = $this->line;
}
}
function yy_r2_72($yy_subpatterns)
{
@@ -830,6 +902,7 @@
$this->taglineno = $this->line;
}
}
function yy_r2_73($yy_subpatterns)
{
@@ -841,6 +914,7 @@
$this->taglineno = $this->line;
}
}
function yy_r2_74($yy_subpatterns)
{
@@ -852,6 +926,7 @@
$this->taglineno = $this->line;
}
}
function yy_r2_75($yy_subpatterns)
{
@@ -863,14 +938,13 @@
$this->taglineno = $this->line;
}
}
function yy_r2_76($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
public function yylex3()
{
$tokenMap = array(
@@ -924,17 +998,17 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const LITERAL = 3;
function yy_r3_1($yy_subpatterns)
{
@@ -945,6 +1019,7 @@
$this->yypushstate(self::LITERAL);
}
}
function yy_r3_2($yy_subpatterns)
{
@@ -955,6 +1030,7 @@
$this->yypopstate();
}
}
function yy_r3_3($yy_subpatterns)
{
@@ -965,21 +1041,25 @@
$this->value = substr($this->value, 0, 2);
}
}
function yy_r3_4($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
}
function yy_r3_5($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
}
function yy_r3_6($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}
function yy_r3_7($yy_subpatterns)
{
@@ -1002,7 +1082,6 @@
$this->token = Smarty_Internal_Templateparser::TP_LITERAL;
}
public function yylex4()
{
$tokenMap = array(
@@ -1060,17 +1139,17 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const DOUBLEQUOTEDSTRING = 4;
function yy_r4_1($yy_subpatterns)
{
@@ -1082,6 +1161,7 @@
$this->taglineno = $this->line;
}
}
function yy_r4_3($yy_subpatterns)
{
@@ -1093,6 +1173,7 @@
$this->taglineno = $this->line;
}
}
function yy_r4_4($yy_subpatterns)
{
@@ -1104,6 +1185,7 @@
$this->taglineno = $this->line;
}
}
function yy_r4_5($yy_subpatterns)
{
@@ -1115,6 +1197,7 @@
$this->taglineno = $this->line;
}
}
function yy_r4_6($yy_subpatterns)
{
@@ -1126,12 +1209,14 @@
$this->taglineno = $this->line;
}
}
function yy_r4_7($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
$this->yypopstate();
}
function yy_r4_8($yy_subpatterns)
{
@@ -1140,21 +1225,25 @@
$this->yypushstate(self::SMARTY);
$this->taglineno = $this->line;
}
function yy_r4_9($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
}
function yy_r4_10($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
function yy_r4_11($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
function yy_r4_15($yy_subpatterns)
{
@@ -1171,7 +1260,6 @@
$this->token = Smarty_Internal_Templateparser::TP_TEXT;
}
public function yylex5()
{
$tokenMap = array(
@@ -1222,17 +1310,17 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const CHILDBODY = 5;
function yy_r5_1($yy_subpatterns)
{
@@ -1242,6 +1330,7 @@
$this->token = Smarty_Internal_Templateparser::TP_STRIPON;
}
}
function yy_r5_2($yy_subpatterns)
{
@@ -1251,6 +1340,7 @@
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
}
}
function yy_r5_3($yy_subpatterns)
{
@@ -1261,6 +1351,7 @@
return true;
}
}
function yy_r5_4($yy_subpatterns)
{
@@ -1281,7 +1372,6 @@
return false;
}
public function yylex6()
{
$tokenMap = array(
@@ -1333,17 +1423,17 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const CHILDBLOCK = 6;
function yy_r6_1($yy_subpatterns)
{
@@ -1354,6 +1444,7 @@
$this->yypushstate(self::CHILDLITERAL);
}
}
function yy_r6_2($yy_subpatterns)
{
@@ -1364,6 +1455,7 @@
return true;
}
}
function yy_r6_3($yy_subpatterns)
{
@@ -1374,6 +1466,7 @@
return true;
}
}
function yy_r6_4($yy_subpatterns)
{
@@ -1384,6 +1477,7 @@
return true;
}
}
function yy_r6_6($yy_subpatterns)
{
@@ -1404,7 +1498,6 @@
$this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE;
}
public function yylex7()
{
$tokenMap = array(
@@ -1454,17 +1547,17 @@
}
// skip this token
continue;
} } else {
}
} else {
throw new Exception('Unexpected input at line' . $this->line .
': ' . $this->data[$this->counter]);
}
break;
} while (true);
} // end function
const CHILDLITERAL = 7;
function yy_r7_1($yy_subpatterns)
{
@@ -1475,6 +1568,7 @@
$this->yypushstate(self::CHILDLITERAL);
}
}
function yy_r7_2($yy_subpatterns)
{
@@ -1485,6 +1579,7 @@
$this->yypopstate();
}
}
function yy_r7_3($yy_subpatterns)
{
@@ -1506,7 +1601,6 @@
}
$this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE;
}
}

File diff suppressed because it is too large Load Diff