API-CHANGE: parser for new i18n syntax

This commit is contained in:
Julian Seidenberg 2012-04-16 16:59:56 +12:00
parent 45c7dfd9f5
commit 189c305c83
3 changed files with 1699 additions and 1441 deletions

View File

@ -171,14 +171,10 @@ class i18nTest extends SapphireTest {
i18n::set_locale('en_US'); i18n::set_locale('en_US');
i18n::get_translator('core')->getAdapter()->addTranslation(array( i18n::get_translator('core')->getAdapter()->addTranslation(array(
'i18nTestModule.MAINTEMPLATE' => 'Main Template', 'i18nTestModule.MAINTEMPLATE' => 'Main Template',
'i18nTestModule.ss.SPRINTFNONAMESPACE' => 'My replacement no namespace: %s',
'i18nTestModule.LAYOUTTEMPLATE' => 'Layout Template', 'i18nTestModule.LAYOUTTEMPLATE' => 'Layout Template',
'i18nTestModule.ss.LAYOUTTEMPLATENONAMESPACE' => 'Layout Template no namespace',
'i18nTestModule.SPRINTFNAMESPACE' => 'My replacement: %s', 'i18nTestModule.SPRINTFNAMESPACE' => 'My replacement: %s',
'i18nTestModule.WITHNAMESPACE' => 'Include Entity with Namespace', 'i18nTestModule.WITHNAMESPACE' => 'Include Entity with Namespace',
'i18nTestModuleInclude.ss.NONAMESPACE' => 'Include Entity without Namespace',
'i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE' => 'My include replacement: %s', 'i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE' => 'My include replacement: %s',
'i18nTestModuleInclude.ss.SPRINTFINCLUDENONAMESPACE' => 'My include replacement no namespace: %s'
), 'en_US'); ), 'en_US');
$viewer = new SSViewer('i18nTestModule'); $viewer = new SSViewer('i18nTestModule');
@ -187,22 +183,14 @@ class i18nTest extends SapphireTest {
"Layout Template\n", "Layout Template\n",
$parsedHtml $parsedHtml
); );
$this->assertContains(
"Layout Template no namespace\n",
$parsedHtml
);
i18n::set_locale('de_DE'); i18n::set_locale('de_DE');
i18n::get_translator('core')->getAdapter()->addTranslation(array( i18n::get_translator('core')->getAdapter()->addTranslation(array(
'i18nTestModule.MAINTEMPLATE' => 'TRANS Main Template', 'i18nTestModule.MAINTEMPLATE' => 'TRANS Main Template',
'i18nTestModule.ss.SPRINTFNONAMESPACE' => 'TRANS My replacement no namespace: %s',
'i18nTestModule.LAYOUTTEMPLATE' => 'TRANS Layout Template', 'i18nTestModule.LAYOUTTEMPLATE' => 'TRANS Layout Template',
'i18nTestModule.ss.LAYOUTTEMPLATENONAMESPACE' => 'TRANS Layout Template no namespace',
'i18nTestModule.SPRINTFNAMESPACE' => 'TRANS My replacement: %s', 'i18nTestModule.SPRINTFNAMESPACE' => 'TRANS My replacement: %s',
'i18nTestModule.WITHNAMESPACE' => 'TRANS Include Entity with Namespace', 'i18nTestModule.WITHNAMESPACE' => 'TRANS Include Entity with Namespace',
'i18nTestModuleInclude.ss.NONAMESPACE' => 'TRANS Include Entity without Namespace',
'i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE' => 'TRANS My include replacement: %s', 'i18nTestModuleInclude.ss.SPRINTFINCLUDENAMESPACE' => 'TRANS My include replacement: %s',
'i18nTestModuleInclude.ss.SPRINTFINCLUDENONAMESPACE' => 'TRANS My include replacement no namespace: %s'
), 'de_DE'); ), 'de_DE');
$viewer = new SSViewer('i18nTestModule'); $viewer = new SSViewer('i18nTestModule');
@ -215,10 +203,6 @@ class i18nTest extends SapphireTest {
"TRANS Layout Template\n", "TRANS Layout Template\n",
$parsedHtml $parsedHtml
); );
$this->assertContains(
"TRANS Layout Template no namespace",
$parsedHtml
);
$this->assertContains( $this->assertContains(
"TRANS My replacement: TestPropertyValue", "TRANS My replacement: TestPropertyValue",
$parsedHtml $parsedHtml
@ -227,19 +211,11 @@ class i18nTest extends SapphireTest {
"TRANS Include Entity with Namespace", "TRANS Include Entity with Namespace",
$parsedHtml $parsedHtml
); );
$this->assertContains(
"TRANS Include Entity without Namespace",
$parsedHtml
);
$this->assertContains( $this->assertContains(
"TRANS My include replacement: TestPropertyValue", "TRANS My include replacement: TestPropertyValue",
$parsedHtml $parsedHtml
); );
$this->assertContains(
"TRANS My include replacement no namespace: TestPropertyValue",
$parsedHtml
);
i18n::set_locale($oldLocale); i18n::set_locale($oldLocale);
} }

View File

@ -58,6 +58,9 @@ forbidden)
Closed Block: An SS template block that wraps content, and requires a counterpart <% end_blockname %> tag Closed Block: An SS template block that wraps content, and requires a counterpart <% end_blockname %> tag
Angle Bracket: angle brackets "<" and ">" are used to eat whitespace between template elements
N: eats white space including newlines (using in legacy _t support)
*/ */
class SSTemplateParser extends Parser { class SSTemplateParser extends Parser {
@ -76,7 +79,7 @@ class SSTemplateParser extends Parser {
return $res; return $res;
} }
/* Template: (Comment | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */
protected $match_Template_typestack = array('Template'); protected $match_Template_typestack = array('Template');
function match_Template ($stack = array()) { function match_Template ($stack = array()) {
$matchrule = "Template"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Template"; $result = $this->construct($matchrule, $matchrule, null);
@ -102,7 +105,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_2 = $result; $res_2 = $result;
$pos_2 = $this->pos; $pos_2 = $this->pos;
$matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -114,7 +117,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_4 = $result; $res_4 = $result;
$pos_4 = $this->pos; $pos_4 = $this->pos;
$matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -126,7 +129,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_6 = $result; $res_6 = $result;
$pos_6 = $this->pos; $pos_6 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -138,7 +141,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_8 = $result; $res_8 = $result;
$pos_8 = $this->pos; $pos_8 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -150,7 +153,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_10 = $result; $res_10 = $result;
$pos_10 = $this->pos; $pos_10 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -162,7 +165,7 @@ class SSTemplateParser extends Parser {
do { do {
$res_12 = $result; $res_12 = $result;
$pos_12 = $this->pos; $pos_12 = $this->pos;
$matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
@ -619,28 +622,237 @@ class SSTemplateParser extends Parser {
$this->Lookup_AddLookupStep($res, $sub, '$$FINAL'); $this->Lookup_AddLookupStep($res, $sub, '$$FINAL');
} }
/* Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? < (InjectionVariables)? > "%>" */
protected $match_Translate_typestack = array('Translate');
function match_Translate ($stack = array()) {
$matchrule = "Translate"; $result = $this->construct($matchrule, $matchrule, null);
$_111 = NULL;
do {
if (( $subres = $this->literal( '<%t' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_111 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Entity'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_111 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_93 = $result;
$pos_93 = $this->pos;
$_92 = NULL;
do {
$matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres, "Default" );
}
else { $_92 = FALSE; break; }
$_92 = TRUE; break;
}
while(0);
if( $_92 === FALSE) {
$result = $res_93;
$this->pos = $pos_93;
unset( $res_93 );
unset( $pos_93 );
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_104 = $result;
$pos_104 = $this->pos;
$_103 = NULL;
do {
$res_98 = $result;
$pos_98 = $this->pos;
$_97 = NULL;
do {
if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_97 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1;
$result["text"] .= '=';
}
else { $_97 = FALSE; break; }
$_97 = TRUE; break;
}
while(0);
if( $_97 === TRUE ) {
$result = $res_98;
$this->pos = $pos_98;
$_103 = FALSE; break;
}
if( $_97 === FALSE) {
$result = $res_98;
$this->pos = $pos_98;
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_103 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres, "Context" );
}
else { $_103 = FALSE; break; }
$_103 = TRUE; break;
}
while(0);
if( $_103 === FALSE) {
$result = $res_104;
$this->pos = $pos_104;
unset( $res_104 );
unset( $pos_104 );
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_108 = $result;
$pos_108 = $this->pos;
$_107 = NULL;
do {
$matcher = 'match_'.'InjectionVariables'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_107 = FALSE; break; }
$_107 = TRUE; break;
}
while(0);
if( $_107 === FALSE) {
$result = $res_108;
$this->pos = $pos_108;
unset( $res_108 );
unset( $pos_108 );
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_111 = FALSE; break; }
$_111 = TRUE; break;
}
while(0);
if( $_111 === TRUE ) { return $this->finalise($result); }
if( $_111 === FALSE) { return FALSE; }
}
/* InjectionVariables: (< InjectionName:Word "=" Argument)+ */
protected $match_InjectionVariables_typestack = array('InjectionVariables');
function match_InjectionVariables ($stack = array()) {
$matchrule = "InjectionVariables"; $result = $this->construct($matchrule, $matchrule, null);
$count = 0;
while (true) {
$res_118 = $result;
$pos_118 = $this->pos;
$_117 = NULL;
do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres, "InjectionName" );
}
else { $_117 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1;
$result["text"] .= '=';
}
else { $_117 = FALSE; break; }
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_117 = FALSE; break; }
$_117 = TRUE; break;
}
while(0);
if( $_117 === FALSE) {
$result = $res_118;
$this->pos = $pos_118;
unset( $res_118 );
unset( $pos_118 );
break;
}
$count += 1;
}
if ($count > 0) { return $this->finalise($result); }
else { return FALSE; }
}
/* Entity: / [A-Za-z_] [\w\.]* / */
protected $match_Entity_typestack = array('Entity');
function match_Entity ($stack = array()) {
$matchrule = "Entity"; $result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx( '/ [A-Za-z_] [\w\.]* /' ) ) !== FALSE) {
$result["text"] .= $subres;
return $this->finalise($result);
}
else { return FALSE; }
}
function Translate__construct(&$res) {
$res['php'] = '$val .= _t(';
}
function Translate_Entity(&$res, $sub) {
$res['php'] .= "'$sub[text]'";
}
function Translate_Default(&$res, $sub) {
$res['php'] .= ",$sub[text]";
}
function Translate_Context(&$res, $sub) {
$res['php'] .= ",$sub[text]";
}
function Translate_InjectionVariables(&$res, $sub) {
$res['php'] .= ",$sub[php]";
}
function Translate__finalise(&$res) {
$res['php'] .= ');';
}
function InjectionVariables__construct(&$res) {
$res['php'] = "array(";
}
function InjectionVariables_InjectionName(&$res, $sub) {
$res['php'] .= "'$sub[text]'=>";
}
function InjectionVariables_Argument(&$res, $sub) {
$res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']) . ',';
}
function InjectionVariables__finalise(&$res) {
if (substr($res['php'], -1) == ',') $res['php'] = substr($res['php'], 0, -1); //remove last comma in the array
$res['php'] .= ')';
}
/* SimpleInjection: '$' :Lookup */ /* SimpleInjection: '$' :Lookup */
protected $match_SimpleInjection_typestack = array('SimpleInjection'); protected $match_SimpleInjection_typestack = array('SimpleInjection');
function match_SimpleInjection ($stack = array()) { function match_SimpleInjection ($stack = array()) {
$matchrule = "SimpleInjection"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "SimpleInjection"; $result = $this->construct($matchrule, $matchrule, null);
$_89 = NULL; $_122 = NULL;
do { do {
if (substr($this->string,$this->pos,1) == '$') { if (substr($this->string,$this->pos,1) == '$') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '$'; $result["text"] .= '$';
} }
else { $_89 = FALSE; break; } else { $_122 = FALSE; break; }
$matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Lookup" ); $this->store( $result, $subres, "Lookup" );
} }
else { $_89 = FALSE; break; } else { $_122 = FALSE; break; }
$_89 = TRUE; break; $_122 = TRUE; break;
} }
while(0); while(0);
if( $_89 === TRUE ) { return $this->finalise($result); } if( $_122 === TRUE ) { return $this->finalise($result); }
if( $_89 === FALSE) { return FALSE; } if( $_122 === FALSE) { return FALSE; }
} }
@ -648,26 +860,26 @@ class SSTemplateParser extends Parser {
protected $match_BracketInjection_typestack = array('BracketInjection'); protected $match_BracketInjection_typestack = array('BracketInjection');
function match_BracketInjection ($stack = array()) { function match_BracketInjection ($stack = array()) {
$matchrule = "BracketInjection"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "BracketInjection"; $result = $this->construct($matchrule, $matchrule, null);
$_94 = NULL; $_127 = NULL;
do { do {
if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_94 = FALSE; break; } else { $_127 = FALSE; break; }
$matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Lookup" ); $this->store( $result, $subres, "Lookup" );
} }
else { $_94 = FALSE; break; } else { $_127 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '}') { if (substr($this->string,$this->pos,1) == '}') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '}'; $result["text"] .= '}';
} }
else { $_94 = FALSE; break; } else { $_127 = FALSE; break; }
$_94 = TRUE; break; $_127 = TRUE; break;
} }
while(0); while(0);
if( $_94 === TRUE ) { return $this->finalise($result); } if( $_127 === TRUE ) { return $this->finalise($result); }
if( $_94 === FALSE) { return FALSE; } if( $_127 === FALSE) { return FALSE; }
} }
@ -675,31 +887,31 @@ class SSTemplateParser extends Parser {
protected $match_Injection_typestack = array('Injection'); protected $match_Injection_typestack = array('Injection');
function match_Injection ($stack = array()) { function match_Injection ($stack = array()) {
$matchrule = "Injection"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Injection"; $result = $this->construct($matchrule, $matchrule, null);
$_99 = NULL; $_132 = NULL;
do { do {
$res_96 = $result; $res_129 = $result;
$pos_96 = $this->pos; $pos_129 = $this->pos;
$matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_99 = TRUE; break; $_132 = TRUE; break;
} }
$result = $res_96; $result = $res_129;
$this->pos = $pos_96; $this->pos = $pos_129;
$matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_99 = TRUE; break; $_132 = TRUE; break;
} }
$result = $res_96; $result = $res_129;
$this->pos = $pos_96; $this->pos = $pos_129;
$_99 = FALSE; break; $_132 = FALSE; break;
} }
while(0); while(0);
if( $_99 === TRUE ) { return $this->finalise($result); } if( $_132 === TRUE ) { return $this->finalise($result); }
if( $_99 === FALSE) { return FALSE; } if( $_132 === FALSE) { return FALSE; }
} }
@ -731,7 +943,7 @@ class SSTemplateParser extends Parser {
protected $match_QuotedString_typestack = array('QuotedString'); protected $match_QuotedString_typestack = array('QuotedString');
function match_QuotedString ($stack = array()) { function match_QuotedString ($stack = array()) {
$matchrule = "QuotedString"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "QuotedString"; $result = $this->construct($matchrule, $matchrule, null);
$_105 = NULL; $_138 = NULL;
do { do {
$stack[] = $result; $result = $this->construct( $matchrule, "q" ); $stack[] = $result; $result = $this->construct( $matchrule, "q" );
if (( $subres = $this->rx( '/[\'"]/' ) ) !== FALSE) { if (( $subres = $this->rx( '/[\'"]/' ) ) !== FALSE) {
@ -741,7 +953,7 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_105 = FALSE; break; $_138 = FALSE; break;
} }
$stack[] = $result; $result = $this->construct( $matchrule, "String" ); $stack[] = $result; $result = $this->construct( $matchrule, "String" );
if (( $subres = $this->rx( '/ (\\\\\\\\ | \\\\. | [^'.$this->expression($result, $stack, 'q').'\\\\])* /' ) ) !== FALSE) { if (( $subres = $this->rx( '/ (\\\\\\\\ | \\\\. | [^'.$this->expression($result, $stack, 'q').'\\\\])* /' ) ) !== FALSE) {
@ -751,15 +963,15 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_105 = FALSE; break; $_138 = FALSE; break;
} }
if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'q').'' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'q').'' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_105 = FALSE; break; } else { $_138 = FALSE; break; }
$_105 = TRUE; break; $_138 = TRUE; break;
} }
while(0); while(0);
if( $_105 === TRUE ) { return $this->finalise($result); } if( $_138 === TRUE ) { return $this->finalise($result); }
if( $_105 === FALSE) { return FALSE; } if( $_138 === FALSE) { return FALSE; }
} }
@ -783,45 +995,45 @@ class SSTemplateParser extends Parser {
protected $match_Argument_typestack = array('Argument'); protected $match_Argument_typestack = array('Argument');
function match_Argument ($stack = array()) { function match_Argument ($stack = array()) {
$matchrule = "Argument"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Argument"; $result = $this->construct($matchrule, $matchrule, null);
$_125 = NULL; $_158 = NULL;
do { do {
$res_108 = $result; $res_141 = $result;
$pos_108 = $this->pos; $pos_141 = $this->pos;
$matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "DollarMarkedLookup" ); $this->store( $result, $subres, "DollarMarkedLookup" );
$_125 = TRUE; break; $_158 = TRUE; break;
} }
$result = $res_108; $result = $res_141;
$this->pos = $pos_108; $this->pos = $pos_141;
$_123 = NULL; $_156 = NULL;
do { do {
$res_110 = $result; $res_143 = $result;
$pos_110 = $this->pos; $pos_143 = $this->pos;
$matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "QuotedString" ); $this->store( $result, $subres, "QuotedString" );
$_123 = TRUE; break; $_156 = TRUE; break;
} }
$result = $res_110; $result = $res_143;
$this->pos = $pos_110; $this->pos = $pos_143;
$_121 = NULL; $_154 = NULL;
do { do {
$res_112 = $result; $res_145 = $result;
$pos_112 = $this->pos; $pos_145 = $this->pos;
$_118 = NULL; $_151 = NULL;
do { do {
$matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Lookup" ); $this->store( $result, $subres, "Lookup" );
} }
else { $_118 = FALSE; break; } else { $_151 = FALSE; break; }
$res_117 = $result; $res_150 = $result;
$pos_117 = $this->pos; $pos_150 = $this->pos;
$_116 = NULL; $_149 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos;
@ -829,50 +1041,50 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} }
else { $_116 = FALSE; break; } else { $_149 = FALSE; break; }
$_116 = TRUE; break; $_149 = TRUE; break;
} }
while(0); while(0);
if( $_116 === TRUE ) { if( $_149 === TRUE ) {
$result = $res_117; $result = $res_150;
$this->pos = $pos_117; $this->pos = $pos_150;
$_118 = FALSE; break; $_151 = FALSE; break;
} }
if( $_116 === FALSE) { if( $_149 === FALSE) {
$result = $res_117; $result = $res_150;
$this->pos = $pos_117; $this->pos = $pos_150;
} }
$_118 = TRUE; break; $_151 = TRUE; break;
} }
while(0); while(0);
if( $_118 === TRUE ) { $_121 = TRUE; break; } if( $_151 === TRUE ) { $_154 = TRUE; break; }
$result = $res_112; $result = $res_145;
$this->pos = $pos_112; $this->pos = $pos_145;
$matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "FreeString" ); $this->store( $result, $subres, "FreeString" );
$_121 = TRUE; break; $_154 = TRUE; break;
} }
$result = $res_112; $result = $res_145;
$this->pos = $pos_112; $this->pos = $pos_145;
$_121 = FALSE; break; $_154 = FALSE; break;
} }
while(0); while(0);
if( $_121 === TRUE ) { $_123 = TRUE; break; } if( $_154 === TRUE ) { $_156 = TRUE; break; }
$result = $res_110; $result = $res_143;
$this->pos = $pos_110; $this->pos = $pos_143;
$_123 = FALSE; break; $_156 = FALSE; break;
} }
while(0); while(0);
if( $_123 === TRUE ) { $_125 = TRUE; break; } if( $_156 === TRUE ) { $_158 = TRUE; break; }
$result = $res_108; $result = $res_141;
$this->pos = $pos_108; $this->pos = $pos_141;
$_125 = FALSE; break; $_158 = FALSE; break;
} }
while(0); while(0);
if( $_125 === TRUE ) { return $this->finalise($result); } if( $_158 === TRUE ) { return $this->finalise($result); }
if( $_125 === FALSE) { return FALSE; } if( $_158 === FALSE) { return FALSE; }
} }
@ -916,51 +1128,51 @@ class SSTemplateParser extends Parser {
function Argument_FreeString(&$res, $sub) { function Argument_FreeString(&$res, $sub) {
$res['ArgumentMode'] = 'string'; $res['ArgumentMode'] = 'string';
$res['php'] = "'" . str_replace("'", "\\'", rtrim($sub['text'])) . "'"; $res['php'] = "'" . str_replace("'", "\\'", $sub['text']) . "'";
} }
/* ComparisonOperator: "==" | "!=" | "=" */ /* ComparisonOperator: "==" | "!=" | "=" */
protected $match_ComparisonOperator_typestack = array('ComparisonOperator'); protected $match_ComparisonOperator_typestack = array('ComparisonOperator');
function match_ComparisonOperator ($stack = array()) { function match_ComparisonOperator ($stack = array()) {
$matchrule = "ComparisonOperator"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "ComparisonOperator"; $result = $this->construct($matchrule, $matchrule, null);
$_134 = NULL; $_167 = NULL;
do { do {
$res_127 = $result; $res_160 = $result;
$pos_127 = $this->pos; $pos_160 = $this->pos;
if (( $subres = $this->literal( '==' ) ) !== FALSE) { if (( $subres = $this->literal( '==' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_134 = TRUE; break; $_167 = TRUE; break;
} }
$result = $res_127; $result = $res_160;
$this->pos = $pos_127; $this->pos = $pos_160;
$_132 = NULL; $_165 = NULL;
do { do {
$res_129 = $result; $res_162 = $result;
$pos_129 = $this->pos; $pos_162 = $this->pos;
if (( $subres = $this->literal( '!=' ) ) !== FALSE) { if (( $subres = $this->literal( '!=' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_132 = TRUE; break; $_165 = TRUE; break;
} }
$result = $res_129; $result = $res_162;
$this->pos = $pos_129; $this->pos = $pos_162;
if (substr($this->string,$this->pos,1) == '=') { if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '='; $result["text"] .= '=';
$_132 = TRUE; break; $_165 = TRUE; break;
} }
$result = $res_129; $result = $res_162;
$this->pos = $pos_129; $this->pos = $pos_162;
$_132 = FALSE; break; $_165 = FALSE; break;
} }
while(0); while(0);
if( $_132 === TRUE ) { $_134 = TRUE; break; } if( $_165 === TRUE ) { $_167 = TRUE; break; }
$result = $res_127; $result = $res_160;
$this->pos = $pos_127; $this->pos = $pos_160;
$_134 = FALSE; break; $_167 = FALSE; break;
} }
while(0); while(0);
if( $_134 === TRUE ) { return $this->finalise($result); } if( $_167 === TRUE ) { return $this->finalise($result); }
if( $_134 === FALSE) { return FALSE; } if( $_167 === FALSE) { return FALSE; }
} }
@ -968,27 +1180,27 @@ class SSTemplateParser extends Parser {
protected $match_Comparison_typestack = array('Comparison'); protected $match_Comparison_typestack = array('Comparison');
function match_Comparison ($stack = array()) { function match_Comparison ($stack = array()) {
$matchrule = "Comparison"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Comparison"; $result = $this->construct($matchrule, $matchrule, null);
$_141 = NULL; $_174 = NULL;
do { do {
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_141 = FALSE; break; } else { $_174 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'ComparisonOperator'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ComparisonOperator'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_141 = FALSE; break; } else { $_174 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_141 = FALSE; break; } else { $_174 = FALSE; break; }
$_141 = TRUE; break; $_174 = TRUE; break;
} }
while(0); while(0);
if( $_141 === TRUE ) { return $this->finalise($result); } if( $_174 === TRUE ) { return $this->finalise($result); }
if( $_141 === FALSE) { return FALSE; } if( $_174 === FALSE) { return FALSE; }
} }
@ -1011,11 +1223,11 @@ class SSTemplateParser extends Parser {
protected $match_PresenceCheck_typestack = array('PresenceCheck'); protected $match_PresenceCheck_typestack = array('PresenceCheck');
function match_PresenceCheck ($stack = array()) { function match_PresenceCheck ($stack = array()) {
$matchrule = "PresenceCheck"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "PresenceCheck"; $result = $this->construct($matchrule, $matchrule, null);
$_148 = NULL; $_181 = NULL;
do { do {
$res_146 = $result; $res_179 = $result;
$pos_146 = $this->pos; $pos_179 = $this->pos;
$_145 = NULL; $_178 = NULL;
do { do {
$stack[] = $result; $result = $this->construct( $matchrule, "Not" ); $stack[] = $result; $result = $this->construct( $matchrule, "Not" );
if (( $subres = $this->literal( 'not' ) ) !== FALSE) { if (( $subres = $this->literal( 'not' ) ) !== FALSE) {
@ -1025,27 +1237,27 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_145 = FALSE; break; $_178 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_145 = TRUE; break; $_178 = TRUE; break;
} }
while(0); while(0);
if( $_145 === FALSE) { if( $_178 === FALSE) {
$result = $res_146; $result = $res_179;
$this->pos = $pos_146; $this->pos = $pos_179;
unset( $res_146 ); unset( $res_179 );
unset( $pos_146 ); unset( $pos_179 );
} }
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_148 = FALSE; break; } else { $_181 = FALSE; break; }
$_148 = TRUE; break; $_181 = TRUE; break;
} }
while(0); while(0);
if( $_148 === TRUE ) { return $this->finalise($result); } if( $_181 === TRUE ) { return $this->finalise($result); }
if( $_148 === FALSE) { return FALSE; } if( $_181 === FALSE) { return FALSE; }
} }
@ -1070,31 +1282,31 @@ class SSTemplateParser extends Parser {
protected $match_IfArgumentPortion_typestack = array('IfArgumentPortion'); protected $match_IfArgumentPortion_typestack = array('IfArgumentPortion');
function match_IfArgumentPortion ($stack = array()) { function match_IfArgumentPortion ($stack = array()) {
$matchrule = "IfArgumentPortion"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "IfArgumentPortion"; $result = $this->construct($matchrule, $matchrule, null);
$_153 = NULL; $_186 = NULL;
do { do {
$res_150 = $result; $res_183 = $result;
$pos_150 = $this->pos; $pos_183 = $this->pos;
$matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_153 = TRUE; break; $_186 = TRUE; break;
} }
$result = $res_150; $result = $res_183;
$this->pos = $pos_150; $this->pos = $pos_183;
$matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_153 = TRUE; break; $_186 = TRUE; break;
} }
$result = $res_150; $result = $res_183;
$this->pos = $pos_150; $this->pos = $pos_183;
$_153 = FALSE; break; $_186 = FALSE; break;
} }
while(0); while(0);
if( $_153 === TRUE ) { return $this->finalise($result); } if( $_186 === TRUE ) { return $this->finalise($result); }
if( $_153 === FALSE) { return FALSE; } if( $_186 === FALSE) { return FALSE; }
} }
@ -1107,27 +1319,27 @@ class SSTemplateParser extends Parser {
protected $match_BooleanOperator_typestack = array('BooleanOperator'); protected $match_BooleanOperator_typestack = array('BooleanOperator');
function match_BooleanOperator ($stack = array()) { function match_BooleanOperator ($stack = array()) {
$matchrule = "BooleanOperator"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "BooleanOperator"; $result = $this->construct($matchrule, $matchrule, null);
$_158 = NULL; $_191 = NULL;
do { do {
$res_155 = $result; $res_188 = $result;
$pos_155 = $this->pos; $pos_188 = $this->pos;
if (( $subres = $this->literal( '||' ) ) !== FALSE) { if (( $subres = $this->literal( '||' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_158 = TRUE; break; $_191 = TRUE; break;
} }
$result = $res_155; $result = $res_188;
$this->pos = $pos_155; $this->pos = $pos_188;
if (( $subres = $this->literal( '&&' ) ) !== FALSE) { if (( $subres = $this->literal( '&&' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_158 = TRUE; break; $_191 = TRUE; break;
} }
$result = $res_155; $result = $res_188;
$this->pos = $pos_155; $this->pos = $pos_188;
$_158 = FALSE; break; $_191 = FALSE; break;
} }
while(0); while(0);
if( $_158 === TRUE ) { return $this->finalise($result); } if( $_191 === TRUE ) { return $this->finalise($result); }
if( $_158 === FALSE) { return FALSE; } if( $_191 === FALSE) { return FALSE; }
} }
@ -1135,18 +1347,18 @@ class SSTemplateParser extends Parser {
protected $match_IfArgument_typestack = array('IfArgument'); protected $match_IfArgument_typestack = array('IfArgument');
function match_IfArgument ($stack = array()) { function match_IfArgument ($stack = array()) {
$matchrule = "IfArgument"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "IfArgument"; $result = $this->construct($matchrule, $matchrule, null);
$_167 = NULL; $_200 = NULL;
do { do {
$matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "IfArgumentPortion" ); $this->store( $result, $subres, "IfArgumentPortion" );
} }
else { $_167 = FALSE; break; } else { $_200 = FALSE; break; }
while (true) { while (true) {
$res_166 = $result; $res_199 = $result;
$pos_166 = $this->pos; $pos_199 = $this->pos;
$_165 = NULL; $_198 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'BooleanOperator'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'BooleanOperator'; $key = $matcher; $pos = $this->pos;
@ -1154,30 +1366,30 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BooleanOperator" ); $this->store( $result, $subres, "BooleanOperator" );
} }
else { $_165 = FALSE; break; } else { $_198 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "IfArgumentPortion" ); $this->store( $result, $subres, "IfArgumentPortion" );
} }
else { $_165 = FALSE; break; } else { $_198 = FALSE; break; }
$_165 = TRUE; break; $_198 = TRUE; break;
} }
while(0); while(0);
if( $_165 === FALSE) { if( $_198 === FALSE) {
$result = $res_166; $result = $res_199;
$this->pos = $pos_166; $this->pos = $pos_199;
unset( $res_166 ); unset( $res_199 );
unset( $pos_166 ); unset( $pos_199 );
break; break;
} }
} }
$_167 = TRUE; break; $_200 = TRUE; break;
} }
while(0); while(0);
if( $_167 === TRUE ) { return $this->finalise($result); } if( $_200 === TRUE ) { return $this->finalise($result); }
if( $_167 === FALSE) { return FALSE; } if( $_200 === FALSE) { return FALSE; }
} }
@ -1194,42 +1406,42 @@ class SSTemplateParser extends Parser {
protected $match_IfPart_typestack = array('IfPart'); protected $match_IfPart_typestack = array('IfPart');
function match_IfPart ($stack = array()) { function match_IfPart ($stack = array()) {
$matchrule = "IfPart"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "IfPart"; $result = $this->construct($matchrule, $matchrule, null);
$_177 = NULL; $_210 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_177 = FALSE; break; } else { $_210 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'if' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'if' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_177 = FALSE; break; } else { $_210 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_177 = FALSE; break; } else { $_210 = FALSE; break; }
$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "IfArgument" ); $this->store( $result, $subres, "IfArgument" );
} }
else { $_177 = FALSE; break; } else { $_210 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_177 = FALSE; break; } else { $_210 = FALSE; break; }
$res_176 = $result; $res_209 = $result;
$pos_176 = $this->pos; $pos_209 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { else {
$result = $res_176; $result = $res_209;
$this->pos = $pos_176; $this->pos = $pos_209;
unset( $res_176 ); unset( $res_209 );
unset( $pos_176 ); unset( $pos_209 );
} }
$_177 = TRUE; break; $_210 = TRUE; break;
} }
while(0); while(0);
if( $_177 === TRUE ) { return $this->finalise($result); } if( $_210 === TRUE ) { return $this->finalise($result); }
if( $_177 === FALSE) { return FALSE; } if( $_210 === FALSE) { return FALSE; }
} }
@ -1237,35 +1449,35 @@ class SSTemplateParser extends Parser {
protected $match_ElseIfPart_typestack = array('ElseIfPart'); protected $match_ElseIfPart_typestack = array('ElseIfPart');
function match_ElseIfPart ($stack = array()) { function match_ElseIfPart ($stack = array()) {
$matchrule = "ElseIfPart"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "ElseIfPart"; $result = $this->construct($matchrule, $matchrule, null);
$_187 = NULL; $_220 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "IfArgument" ); $this->store( $result, $subres, "IfArgument" );
} }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { $_187 = FALSE; break; } else { $_220 = FALSE; break; }
$_187 = TRUE; break; $_220 = TRUE; break;
} }
while(0); while(0);
if( $_187 === TRUE ) { return $this->finalise($result); } if( $_220 === TRUE ) { return $this->finalise($result); }
if( $_187 === FALSE) { return FALSE; } if( $_220 === FALSE) { return FALSE; }
} }
@ -1273,27 +1485,27 @@ class SSTemplateParser extends Parser {
protected $match_ElsePart_typestack = array('ElsePart'); protected $match_ElsePart_typestack = array('ElsePart');
function match_ElsePart ($stack = array()) { function match_ElsePart ($stack = array()) {
$matchrule = "ElsePart"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "ElsePart"; $result = $this->construct($matchrule, $matchrule, null);
$_195 = NULL; $_228 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_195 = FALSE; break; } else { $_228 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'else' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'else' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_195 = FALSE; break; } else { $_228 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_195 = FALSE; break; } else { $_228 = FALSE; break; }
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { $_195 = FALSE; break; } else { $_228 = FALSE; break; }
$_195 = TRUE; break; $_228 = TRUE; break;
} }
while(0); while(0);
if( $_195 === TRUE ) { return $this->finalise($result); } if( $_228 === TRUE ) { return $this->finalise($result); }
if( $_195 === FALSE) { return FALSE; } if( $_228 === FALSE) { return FALSE; }
} }
@ -1301,50 +1513,50 @@ class SSTemplateParser extends Parser {
protected $match_If_typestack = array('If'); protected $match_If_typestack = array('If');
function match_If ($stack = array()) { function match_If ($stack = array()) {
$matchrule = "If"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "If"; $result = $this->construct($matchrule, $matchrule, null);
$_205 = NULL; $_238 = NULL;
do { do {
$matcher = 'match_'.'IfPart'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfPart'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_205 = FALSE; break; } else { $_238 = FALSE; break; }
while (true) { while (true) {
$res_198 = $result; $res_231 = $result;
$pos_198 = $this->pos; $pos_231 = $this->pos;
$matcher = 'match_'.'ElseIfPart'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ElseIfPart'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { else {
$result = $res_198; $result = $res_231;
$this->pos = $pos_198; $this->pos = $pos_231;
unset( $res_198 ); unset( $res_231 );
unset( $pos_198 ); unset( $pos_231 );
break; break;
} }
} }
$res_199 = $result; $res_232 = $result;
$pos_199 = $this->pos; $pos_232 = $this->pos;
$matcher = 'match_'.'ElsePart'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ElsePart'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { else {
$result = $res_199; $result = $res_232;
$this->pos = $pos_199; $this->pos = $pos_232;
unset( $res_199 ); unset( $res_232 );
unset( $pos_199 ); unset( $pos_232 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_205 = FALSE; break; } else { $_238 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'end_if' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_if' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_205 = FALSE; break; } else { $_238 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_205 = FALSE; break; } else { $_238 = FALSE; break; }
$_205 = TRUE; break; $_238 = TRUE; break;
} }
while(0); while(0);
if( $_205 === TRUE ) { return $this->finalise($result); } if( $_238 === TRUE ) { return $this->finalise($result); }
if( $_205 === FALSE) { return FALSE; } if( $_238 === FALSE) { return FALSE; }
} }
@ -1374,61 +1586,61 @@ class SSTemplateParser extends Parser {
protected $match_Require_typestack = array('Require'); protected $match_Require_typestack = array('Require');
function match_Require ($stack = array()) { function match_Require ($stack = array()) {
$matchrule = "Require"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Require"; $result = $this->construct($matchrule, $matchrule, null);
$_221 = NULL; $_254 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_221 = FALSE; break; } else { $_254 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'require' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'require' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_221 = FALSE; break; } else { $_254 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_221 = FALSE; break; } else { $_254 = FALSE; break; }
$stack[] = $result; $result = $this->construct( $matchrule, "Call" ); $stack[] = $result; $result = $this->construct( $matchrule, "Call" );
$_217 = NULL; $_250 = NULL;
do { do {
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Method" ); $this->store( $result, $subres, "Method" );
} }
else { $_217 = FALSE; break; } else { $_250 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '(') { if (substr($this->string,$this->pos,1) == '(') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '('; $result["text"] .= '(';
} }
else { $_217 = FALSE; break; } else { $_250 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "CallArguments" ); $this->store( $result, $subres, "CallArguments" );
} }
else { $_217 = FALSE; break; } else { $_250 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ')') { if (substr($this->string,$this->pos,1) == ')') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ')'; $result["text"] .= ')';
} }
else { $_217 = FALSE; break; } else { $_250 = FALSE; break; }
$_217 = TRUE; break; $_250 = TRUE; break;
} }
while(0); while(0);
if( $_217 === TRUE ) { if( $_250 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Call' ); $this->store( $result, $subres, 'Call' );
} }
if( $_217 === FALSE) { if( $_250 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_221 = FALSE; break; $_254 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_221 = FALSE; break; } else { $_254 = FALSE; break; }
$_221 = TRUE; break; $_254 = TRUE; break;
} }
while(0); while(0);
if( $_221 === TRUE ) { return $this->finalise($result); } if( $_254 === TRUE ) { return $this->finalise($result); }
if( $_221 === FALSE) { return FALSE; } if( $_254 === FALSE) { return FALSE; }
} }
@ -1448,97 +1660,97 @@ class SSTemplateParser extends Parser {
protected $match_CacheBlockArgument_typestack = array('CacheBlockArgument'); protected $match_CacheBlockArgument_typestack = array('CacheBlockArgument');
function match_CacheBlockArgument ($stack = array()) { function match_CacheBlockArgument ($stack = array()) {
$matchrule = "CacheBlockArgument"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "CacheBlockArgument"; $result = $this->construct($matchrule, $matchrule, null);
$_241 = NULL; $_274 = NULL;
do { do {
$res_229 = $result; $res_262 = $result;
$pos_229 = $this->pos; $pos_262 = $this->pos;
$_228 = NULL; $_261 = NULL;
do { do {
$_226 = NULL; $_259 = NULL;
do { do {
$res_223 = $result; $res_256 = $result;
$pos_223 = $this->pos; $pos_256 = $this->pos;
if (( $subres = $this->literal( 'if ' ) ) !== FALSE) { if (( $subres = $this->literal( 'if ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_226 = TRUE; break; $_259 = TRUE; break;
} }
$result = $res_223; $result = $res_256;
$this->pos = $pos_223; $this->pos = $pos_256;
if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) { if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_226 = TRUE; break; $_259 = TRUE; break;
} }
$result = $res_223; $result = $res_256;
$this->pos = $pos_223; $this->pos = $pos_256;
$_226 = FALSE; break; $_259 = FALSE; break;
} }
while(0); while(0);
if( $_226 === FALSE) { $_228 = FALSE; break; } if( $_259 === FALSE) { $_261 = FALSE; break; }
$_228 = TRUE; break; $_261 = TRUE; break;
} }
while(0); while(0);
if( $_228 === TRUE ) { if( $_261 === TRUE ) {
$result = $res_229; $result = $res_262;
$this->pos = $pos_229; $this->pos = $pos_262;
$_241 = FALSE; break; $_274 = FALSE; break;
} }
if( $_228 === FALSE) { if( $_261 === FALSE) {
$result = $res_229; $result = $res_262;
$this->pos = $pos_229; $this->pos = $pos_262;
} }
$_239 = NULL; $_272 = NULL;
do { do {
$_237 = NULL; $_270 = NULL;
do { do {
$res_230 = $result; $res_263 = $result;
$pos_230 = $this->pos; $pos_263 = $this->pos;
$matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "DollarMarkedLookup" ); $this->store( $result, $subres, "DollarMarkedLookup" );
$_237 = TRUE; break; $_270 = TRUE; break;
} }
$result = $res_230; $result = $res_263;
$this->pos = $pos_230; $this->pos = $pos_263;
$_235 = NULL; $_268 = NULL;
do { do {
$res_232 = $result; $res_265 = $result;
$pos_232 = $this->pos; $pos_265 = $this->pos;
$matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "QuotedString" ); $this->store( $result, $subres, "QuotedString" );
$_235 = TRUE; break; $_268 = TRUE; break;
} }
$result = $res_232; $result = $res_265;
$this->pos = $pos_232; $this->pos = $pos_265;
$matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Lookup" ); $this->store( $result, $subres, "Lookup" );
$_235 = TRUE; break; $_268 = TRUE; break;
} }
$result = $res_232; $result = $res_265;
$this->pos = $pos_232; $this->pos = $pos_265;
$_235 = FALSE; break; $_268 = FALSE; break;
} }
while(0); while(0);
if( $_235 === TRUE ) { $_237 = TRUE; break; } if( $_268 === TRUE ) { $_270 = TRUE; break; }
$result = $res_230; $result = $res_263;
$this->pos = $pos_230; $this->pos = $pos_263;
$_237 = FALSE; break; $_270 = FALSE; break;
} }
while(0); while(0);
if( $_237 === FALSE) { $_239 = FALSE; break; } if( $_270 === FALSE) { $_272 = FALSE; break; }
$_239 = TRUE; break; $_272 = TRUE; break;
} }
while(0); while(0);
if( $_239 === FALSE) { $_241 = FALSE; break; } if( $_272 === FALSE) { $_274 = FALSE; break; }
$_241 = TRUE; break; $_274 = TRUE; break;
} }
while(0); while(0);
if( $_241 === TRUE ) { return $this->finalise($result); } if( $_274 === TRUE ) { return $this->finalise($result); }
if( $_241 === FALSE) { return FALSE; } if( $_274 === FALSE) { return FALSE; }
} }
@ -1559,44 +1771,44 @@ class SSTemplateParser extends Parser {
protected $match_CacheBlockArguments_typestack = array('CacheBlockArguments'); protected $match_CacheBlockArguments_typestack = array('CacheBlockArguments');
function match_CacheBlockArguments ($stack = array()) { function match_CacheBlockArguments ($stack = array()) {
$matchrule = "CacheBlockArguments"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "CacheBlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
$_250 = NULL; $_283 = NULL;
do { do {
$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_250 = FALSE; break; } else { $_283 = FALSE; break; }
while (true) { while (true) {
$res_249 = $result; $res_282 = $result;
$pos_249 = $this->pos; $pos_282 = $this->pos;
$_248 = NULL; $_281 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ',') { if (substr($this->string,$this->pos,1) == ',') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ','; $result["text"] .= ',';
} }
else { $_248 = FALSE; break; } else { $_281 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_248 = FALSE; break; } else { $_281 = FALSE; break; }
$_248 = TRUE; break; $_281 = TRUE; break;
} }
while(0); while(0);
if( $_248 === FALSE) { if( $_281 === FALSE) {
$result = $res_249; $result = $res_282;
$this->pos = $pos_249; $this->pos = $pos_282;
unset( $res_249 ); unset( $res_282 );
unset( $pos_249 ); unset( $pos_282 );
break; break;
} }
} }
$_250 = TRUE; break; $_283 = TRUE; break;
} }
while(0); while(0);
if( $_250 === TRUE ) { return $this->finalise($result); } if( $_283 === TRUE ) { return $this->finalise($result); }
if( $_250 === FALSE) { return FALSE; } if( $_283 === FALSE) { return FALSE; }
} }
@ -1608,192 +1820,192 @@ class SSTemplateParser extends Parser {
$res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']); $res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']);
} }
/* CacheBlockTemplate: (Comment | If | Require | OldI18NTag | Include | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */
protected $match_CacheBlockTemplate_typestack = array('CacheBlockTemplate','Template'); protected $match_CacheBlockTemplate_typestack = array('CacheBlockTemplate','Template');
function match_CacheBlockTemplate ($stack = array()) { function match_CacheBlockTemplate ($stack = array()) {
$matchrule = "CacheBlockTemplate"; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'CacheRestrictedTemplate')); $matchrule = "CacheBlockTemplate"; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'CacheRestrictedTemplate'));
$count = 0; $count = 0;
while (true) { while (true) {
$res_290 = $result; $res_323 = $result;
$pos_290 = $this->pos; $pos_323 = $this->pos;
$_289 = NULL; $_322 = NULL;
do { do {
$_287 = NULL; $_320 = NULL;
do { do {
$res_252 = $result; $res_285 = $result;
$pos_252 = $this->pos; $pos_285 = $this->pos;
$matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_287 = TRUE; break; $_320 = TRUE; break;
} }
$result = $res_252; $result = $res_285;
$this->pos = $pos_252; $this->pos = $pos_285;
$_285 = NULL; $_318 = NULL;
do { do {
$res_254 = $result; $res_287 = $result;
$pos_254 = $this->pos; $pos_287 = $this->pos;
$matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_285 = TRUE; break; $_318 = TRUE; break;
} }
$result = $res_254; $result = $res_287;
$this->pos = $pos_254; $this->pos = $pos_287;
$_283 = NULL; $_316 = NULL;
do { do {
$res_256 = $result; $res_289 = $result;
$pos_256 = $this->pos; $pos_289 = $this->pos;
$matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_283 = TRUE; break; $_316 = TRUE; break;
} }
$result = $res_256; $result = $res_289;
$this->pos = $pos_256; $this->pos = $pos_289;
$_281 = NULL; $_314 = NULL;
do { do {
$res_258 = $result; $res_291 = $result;
$pos_258 = $this->pos; $pos_291 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_281 = TRUE; break; $_314 = TRUE; break;
} }
$result = $res_258; $result = $res_291;
$this->pos = $pos_258; $this->pos = $pos_291;
$_279 = NULL; $_312 = NULL;
do { do {
$res_260 = $result; $res_293 = $result;
$pos_260 = $this->pos; $pos_293 = $this->pos;
$matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_279 = TRUE; break; $_312 = TRUE; break;
} }
$result = $res_260; $result = $res_293;
$this->pos = $pos_260; $this->pos = $pos_293;
$_277 = NULL; $_310 = NULL;
do { do {
$res_262 = $result; $res_295 = $result;
$pos_262 = $this->pos; $pos_295 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_277 = TRUE; break; $_310 = TRUE; break;
} }
$result = $res_262; $result = $res_295;
$this->pos = $pos_262; $this->pos = $pos_295;
$_275 = NULL; $_308 = NULL;
do { do {
$res_264 = $result; $res_297 = $result;
$pos_264 = $this->pos; $pos_297 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_275 = TRUE; break; $_308 = TRUE; break;
} }
$result = $res_264; $result = $res_297;
$this->pos = $pos_264; $this->pos = $pos_297;
$_273 = NULL; $_306 = NULL;
do { do {
$res_266 = $result; $res_299 = $result;
$pos_266 = $this->pos; $pos_299 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_273 = TRUE; break; $_306 = TRUE; break;
} }
$result = $res_266; $result = $res_299;
$this->pos = $pos_266; $this->pos = $pos_299;
$_271 = NULL; $_304 = NULL;
do { do {
$res_268 = $result; $res_301 = $result;
$pos_268 = $this->pos; $pos_301 = $this->pos;
$matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_271 = TRUE; break; $_304 = TRUE; break;
} }
$result = $res_268; $result = $res_301;
$this->pos = $pos_268; $this->pos = $pos_301;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_271 = TRUE; break; $_304 = TRUE; break;
} }
$result = $res_268; $result = $res_301;
$this->pos = $pos_268; $this->pos = $pos_301;
$_271 = FALSE; break; $_304 = FALSE; break;
} }
while(0); while(0);
if( $_271 === TRUE ) { $_273 = TRUE; break; } if( $_304 === TRUE ) { $_306 = TRUE; break; }
$result = $res_266; $result = $res_299;
$this->pos = $pos_266; $this->pos = $pos_299;
$_273 = FALSE; break; $_306 = FALSE; break;
} }
while(0); while(0);
if( $_273 === TRUE ) { $_275 = TRUE; break; } if( $_306 === TRUE ) { $_308 = TRUE; break; }
$result = $res_264; $result = $res_297;
$this->pos = $pos_264; $this->pos = $pos_297;
$_275 = FALSE; break; $_308 = FALSE; break;
} }
while(0); while(0);
if( $_275 === TRUE ) { $_277 = TRUE; break; } if( $_308 === TRUE ) { $_310 = TRUE; break; }
$result = $res_262; $result = $res_295;
$this->pos = $pos_262; $this->pos = $pos_295;
$_277 = FALSE; break; $_310 = FALSE; break;
} }
while(0); while(0);
if( $_277 === TRUE ) { $_279 = TRUE; break; } if( $_310 === TRUE ) { $_312 = TRUE; break; }
$result = $res_260; $result = $res_293;
$this->pos = $pos_260; $this->pos = $pos_293;
$_279 = FALSE; break; $_312 = FALSE; break;
} }
while(0); while(0);
if( $_279 === TRUE ) { $_281 = TRUE; break; } if( $_312 === TRUE ) { $_314 = TRUE; break; }
$result = $res_258; $result = $res_291;
$this->pos = $pos_258; $this->pos = $pos_291;
$_281 = FALSE; break; $_314 = FALSE; break;
} }
while(0); while(0);
if( $_281 === TRUE ) { $_283 = TRUE; break; } if( $_314 === TRUE ) { $_316 = TRUE; break; }
$result = $res_256; $result = $res_289;
$this->pos = $pos_256; $this->pos = $pos_289;
$_283 = FALSE; break; $_316 = FALSE; break;
} }
while(0); while(0);
if( $_283 === TRUE ) { $_285 = TRUE; break; } if( $_316 === TRUE ) { $_318 = TRUE; break; }
$result = $res_254; $result = $res_287;
$this->pos = $pos_254; $this->pos = $pos_287;
$_285 = FALSE; break; $_318 = FALSE; break;
} }
while(0); while(0);
if( $_285 === TRUE ) { $_287 = TRUE; break; } if( $_318 === TRUE ) { $_320 = TRUE; break; }
$result = $res_252; $result = $res_285;
$this->pos = $pos_252; $this->pos = $pos_285;
$_287 = FALSE; break; $_320 = FALSE; break;
} }
while(0); while(0);
if( $_287 === FALSE) { $_289 = FALSE; break; } if( $_320 === FALSE) { $_322 = FALSE; break; }
$_289 = TRUE; break; $_322 = TRUE; break;
} }
while(0); while(0);
if( $_289 === FALSE) { if( $_322 === FALSE) {
$result = $res_290; $result = $res_323;
$this->pos = $pos_290; $this->pos = $pos_323;
unset( $res_290 ); unset( $res_323 );
unset( $pos_290 ); unset( $pos_323 );
break; break;
} }
$count += 1; $count += 1;
@ -1812,63 +2024,63 @@ class SSTemplateParser extends Parser {
protected $match_UncachedBlock_typestack = array('UncachedBlock'); protected $match_UncachedBlock_typestack = array('UncachedBlock');
function match_UncachedBlock ($stack = array()) { function match_UncachedBlock ($stack = array()) {
$matchrule = "UncachedBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "UncachedBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_327 = NULL; $_360 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_295 = $result; $res_328 = $result;
$pos_295 = $this->pos; $pos_328 = $this->pos;
$matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { else {
$result = $res_295; $result = $res_328;
$this->pos = $pos_295; $this->pos = $pos_328;
unset( $res_295 ); unset( $res_328 );
unset( $pos_295 ); unset( $pos_328 );
} }
$res_307 = $result; $res_340 = $result;
$pos_307 = $this->pos; $pos_340 = $this->pos;
$_306 = NULL; $_339 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" ); $stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
$_302 = NULL; $_335 = NULL;
do { do {
$_300 = NULL; $_333 = NULL;
do { do {
$res_297 = $result; $res_330 = $result;
$pos_297 = $this->pos; $pos_330 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_300 = TRUE; break; $_333 = TRUE; break;
} }
$result = $res_297; $result = $res_330;
$this->pos = $pos_297; $this->pos = $pos_330;
if (( $subres = $this->literal( 'unless' ) ) !== FALSE) { if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_300 = TRUE; break; $_333 = TRUE; break;
} }
$result = $res_297; $result = $res_330;
$this->pos = $pos_297; $this->pos = $pos_330;
$_300 = FALSE; break; $_333 = FALSE; break;
} }
while(0); while(0);
if( $_300 === FALSE) { $_302 = FALSE; break; } if( $_333 === FALSE) { $_335 = FALSE; break; }
$_302 = TRUE; break; $_335 = TRUE; break;
} }
while(0); while(0);
if( $_302 === TRUE ) { if( $_335 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' ); $this->store( $result, $subres, 'Conditional' );
} }
if( $_302 === FALSE) { if( $_335 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_306 = FALSE; break; $_339 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
@ -1876,87 +2088,87 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Condition" ); $this->store( $result, $subres, "Condition" );
} }
else { $_306 = FALSE; break; } else { $_339 = FALSE; break; }
$_306 = TRUE; break; $_339 = TRUE; break;
} }
while(0); while(0);
if( $_306 === FALSE) { if( $_339 === FALSE) {
$result = $res_307; $result = $res_340;
$this->pos = $pos_307; $this->pos = $pos_340;
unset( $res_307 ); unset( $res_340 );
unset( $pos_307 ); unset( $pos_340 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
$res_310 = $result; $res_343 = $result;
$pos_310 = $this->pos; $pos_343 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { else {
$result = $res_310; $result = $res_343;
$this->pos = $pos_310; $this->pos = $pos_343;
unset( $res_310 ); unset( $res_343 );
unset( $pos_310 ); unset( $pos_343 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
$_323 = NULL; $_356 = NULL;
do { do {
$_321 = NULL; $_354 = NULL;
do { do {
$res_314 = $result; $res_347 = $result;
$pos_314 = $this->pos; $pos_347 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_321 = TRUE; break; $_354 = TRUE; break;
} }
$result = $res_314; $result = $res_347;
$this->pos = $pos_314; $this->pos = $pos_347;
$_319 = NULL; $_352 = NULL;
do { do {
$res_316 = $result; $res_349 = $result;
$pos_316 = $this->pos; $pos_349 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_319 = TRUE; break; $_352 = TRUE; break;
} }
$result = $res_316; $result = $res_349;
$this->pos = $pos_316; $this->pos = $pos_349;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_319 = TRUE; break; $_352 = TRUE; break;
} }
$result = $res_316; $result = $res_349;
$this->pos = $pos_316; $this->pos = $pos_349;
$_319 = FALSE; break; $_352 = FALSE; break;
} }
while(0); while(0);
if( $_319 === TRUE ) { $_321 = TRUE; break; } if( $_352 === TRUE ) { $_354 = TRUE; break; }
$result = $res_314; $result = $res_347;
$this->pos = $pos_314; $this->pos = $pos_347;
$_321 = FALSE; break; $_354 = FALSE; break;
} }
while(0); while(0);
if( $_321 === FALSE) { $_323 = FALSE; break; } if( $_354 === FALSE) { $_356 = FALSE; break; }
$_323 = TRUE; break; $_356 = TRUE; break;
} }
while(0); while(0);
if( $_323 === FALSE) { $_327 = FALSE; break; } if( $_356 === FALSE) { $_360 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_327 = FALSE; break; } else { $_360 = FALSE; break; }
$_327 = TRUE; break; $_360 = TRUE; break;
} }
while(0); while(0);
if( $_327 === TRUE ) { return $this->finalise($result); } if( $_360 === TRUE ) { return $this->finalise($result); }
if( $_327 === FALSE) { return FALSE; } if( $_360 === FALSE) { return FALSE; }
} }
@ -1965,228 +2177,228 @@ class SSTemplateParser extends Parser {
$res['php'] = $sub['php']; $res['php'] = $sub['php'];
} }
/* CacheRestrictedTemplate: (Comment | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */
protected $match_CacheRestrictedTemplate_typestack = array('CacheRestrictedTemplate','Template'); protected $match_CacheRestrictedTemplate_typestack = array('CacheRestrictedTemplate','Template');
function match_CacheRestrictedTemplate ($stack = array()) { function match_CacheRestrictedTemplate ($stack = array()) {
$matchrule = "CacheRestrictedTemplate"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "CacheRestrictedTemplate"; $result = $this->construct($matchrule, $matchrule, null);
$count = 0; $count = 0;
while (true) { while (true) {
$res_375 = $result; $res_408 = $result;
$pos_375 = $this->pos; $pos_408 = $this->pos;
$_374 = NULL; $_407 = NULL;
do { do {
$_372 = NULL; $_405 = NULL;
do { do {
$res_329 = $result; $res_362 = $result;
$pos_329 = $this->pos; $pos_362 = $this->pos;
$matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_372 = TRUE; break; $_405 = TRUE; break;
} }
$result = $res_329; $result = $res_362;
$this->pos = $pos_329; $this->pos = $pos_362;
$_370 = NULL; $_403 = NULL;
do { do {
$res_331 = $result; $res_364 = $result;
$pos_331 = $this->pos; $pos_364 = $this->pos;
$matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_370 = TRUE; break; $_403 = TRUE; break;
} }
$result = $res_331; $result = $res_364;
$this->pos = $pos_331; $this->pos = $pos_364;
$_368 = NULL; $_401 = NULL;
do { do {
$res_333 = $result; $res_366 = $result;
$pos_333 = $this->pos; $pos_366 = $this->pos;
$matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_368 = TRUE; break; $_401 = TRUE; break;
} }
$result = $res_333; $result = $res_366;
$this->pos = $pos_333; $this->pos = $pos_366;
$_366 = NULL; $_399 = NULL;
do { do {
$res_335 = $result; $res_368 = $result;
$pos_335 = $this->pos; $pos_368 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_366 = TRUE; break; $_399 = TRUE; break;
} }
$result = $res_335; $result = $res_368;
$this->pos = $pos_335; $this->pos = $pos_368;
$_364 = NULL; $_397 = NULL;
do { do {
$res_337 = $result; $res_370 = $result;
$pos_337 = $this->pos; $pos_370 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_364 = TRUE; break; $_397 = TRUE; break;
} }
$result = $res_337; $result = $res_370;
$this->pos = $pos_337; $this->pos = $pos_370;
$_362 = NULL; $_395 = NULL;
do { do {
$res_339 = $result; $res_372 = $result;
$pos_339 = $this->pos; $pos_372 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_362 = TRUE; break; $_395 = TRUE; break;
} }
$result = $res_339; $result = $res_372;
$this->pos = $pos_339; $this->pos = $pos_372;
$_360 = NULL; $_393 = NULL;
do { do {
$res_341 = $result; $res_374 = $result;
$pos_341 = $this->pos; $pos_374 = $this->pos;
$matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_360 = TRUE; break; $_393 = TRUE; break;
} }
$result = $res_341; $result = $res_374;
$this->pos = $pos_341; $this->pos = $pos_374;
$_358 = NULL; $_391 = NULL;
do { do {
$res_343 = $result; $res_376 = $result;
$pos_343 = $this->pos; $pos_376 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_358 = TRUE; break; $_391 = TRUE; break;
} }
$result = $res_343; $result = $res_376;
$this->pos = $pos_343; $this->pos = $pos_376;
$_356 = NULL; $_389 = NULL;
do { do {
$res_345 = $result; $res_378 = $result;
$pos_345 = $this->pos; $pos_378 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_356 = TRUE; break; $_389 = TRUE; break;
} }
$result = $res_345; $result = $res_378;
$this->pos = $pos_345; $this->pos = $pos_378;
$_354 = NULL; $_387 = NULL;
do { do {
$res_347 = $result; $res_380 = $result;
$pos_347 = $this->pos; $pos_380 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_354 = TRUE; break; $_387 = TRUE; break;
} }
$result = $res_347; $result = $res_380;
$this->pos = $pos_347; $this->pos = $pos_380;
$_352 = NULL; $_385 = NULL;
do { do {
$res_349 = $result; $res_382 = $result;
$pos_349 = $this->pos; $pos_382 = $this->pos;
$matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_352 = TRUE; break; $_385 = TRUE; break;
} }
$result = $res_349; $result = $res_382;
$this->pos = $pos_349; $this->pos = $pos_382;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_352 = TRUE; break; $_385 = TRUE; break;
} }
$result = $res_349; $result = $res_382;
$this->pos = $pos_349; $this->pos = $pos_382;
$_352 = FALSE; break; $_385 = FALSE; break;
} }
while(0); while(0);
if( $_352 === TRUE ) { $_354 = TRUE; break; } if( $_385 === TRUE ) { $_387 = TRUE; break; }
$result = $res_347; $result = $res_380;
$this->pos = $pos_347; $this->pos = $pos_380;
$_354 = FALSE; break; $_387 = FALSE; break;
} }
while(0); while(0);
if( $_354 === TRUE ) { $_356 = TRUE; break; } if( $_387 === TRUE ) { $_389 = TRUE; break; }
$result = $res_345; $result = $res_378;
$this->pos = $pos_345; $this->pos = $pos_378;
$_356 = FALSE; break; $_389 = FALSE; break;
} }
while(0); while(0);
if( $_356 === TRUE ) { $_358 = TRUE; break; } if( $_389 === TRUE ) { $_391 = TRUE; break; }
$result = $res_343; $result = $res_376;
$this->pos = $pos_343; $this->pos = $pos_376;
$_358 = FALSE; break; $_391 = FALSE; break;
} }
while(0); while(0);
if( $_358 === TRUE ) { $_360 = TRUE; break; } if( $_391 === TRUE ) { $_393 = TRUE; break; }
$result = $res_341; $result = $res_374;
$this->pos = $pos_341; $this->pos = $pos_374;
$_360 = FALSE; break; $_393 = FALSE; break;
} }
while(0); while(0);
if( $_360 === TRUE ) { $_362 = TRUE; break; } if( $_393 === TRUE ) { $_395 = TRUE; break; }
$result = $res_339; $result = $res_372;
$this->pos = $pos_339; $this->pos = $pos_372;
$_362 = FALSE; break; $_395 = FALSE; break;
} }
while(0); while(0);
if( $_362 === TRUE ) { $_364 = TRUE; break; } if( $_395 === TRUE ) { $_397 = TRUE; break; }
$result = $res_337; $result = $res_370;
$this->pos = $pos_337; $this->pos = $pos_370;
$_364 = FALSE; break; $_397 = FALSE; break;
} }
while(0); while(0);
if( $_364 === TRUE ) { $_366 = TRUE; break; } if( $_397 === TRUE ) { $_399 = TRUE; break; }
$result = $res_335; $result = $res_368;
$this->pos = $pos_335; $this->pos = $pos_368;
$_366 = FALSE; break; $_399 = FALSE; break;
} }
while(0); while(0);
if( $_366 === TRUE ) { $_368 = TRUE; break; } if( $_399 === TRUE ) { $_401 = TRUE; break; }
$result = $res_333; $result = $res_366;
$this->pos = $pos_333; $this->pos = $pos_366;
$_368 = FALSE; break; $_401 = FALSE; break;
} }
while(0); while(0);
if( $_368 === TRUE ) { $_370 = TRUE; break; } if( $_401 === TRUE ) { $_403 = TRUE; break; }
$result = $res_331; $result = $res_364;
$this->pos = $pos_331; $this->pos = $pos_364;
$_370 = FALSE; break; $_403 = FALSE; break;
} }
while(0); while(0);
if( $_370 === TRUE ) { $_372 = TRUE; break; } if( $_403 === TRUE ) { $_405 = TRUE; break; }
$result = $res_329; $result = $res_362;
$this->pos = $pos_329; $this->pos = $pos_362;
$_372 = FALSE; break; $_405 = FALSE; break;
} }
while(0); while(0);
if( $_372 === FALSE) { $_374 = FALSE; break; } if( $_405 === FALSE) { $_407 = FALSE; break; }
$_374 = TRUE; break; $_407 = TRUE; break;
} }
while(0); while(0);
if( $_374 === FALSE) { if( $_407 === FALSE) {
$result = $res_375; $result = $res_408;
$this->pos = $pos_375; $this->pos = $pos_408;
unset( $res_375 ); unset( $res_408 );
unset( $pos_375 ); unset( $pos_408 );
break; break;
} }
$count += 1; $count += 1;
@ -2212,101 +2424,101 @@ class SSTemplateParser extends Parser {
protected $match_CacheBlock_typestack = array('CacheBlock'); protected $match_CacheBlock_typestack = array('CacheBlock');
function match_CacheBlock ($stack = array()) { function match_CacheBlock ($stack = array()) {
$matchrule = "CacheBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "CacheBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_430 = NULL; $_463 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_430 = FALSE; break; } else { $_463 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "CacheTag" ); $stack[] = $result; $result = $this->construct( $matchrule, "CacheTag" );
$_383 = NULL; $_416 = NULL;
do { do {
$_381 = NULL; $_414 = NULL;
do { do {
$res_378 = $result; $res_411 = $result;
$pos_378 = $this->pos; $pos_411 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_381 = TRUE; break; $_414 = TRUE; break;
} }
$result = $res_378; $result = $res_411;
$this->pos = $pos_378; $this->pos = $pos_411;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_381 = TRUE; break; $_414 = TRUE; break;
} }
$result = $res_378; $result = $res_411;
$this->pos = $pos_378; $this->pos = $pos_411;
$_381 = FALSE; break; $_414 = FALSE; break;
} }
while(0); while(0);
if( $_381 === FALSE) { $_383 = FALSE; break; } if( $_414 === FALSE) { $_416 = FALSE; break; }
$_383 = TRUE; break; $_416 = TRUE; break;
} }
while(0); while(0);
if( $_383 === TRUE ) { if( $_416 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'CacheTag' ); $this->store( $result, $subres, 'CacheTag' );
} }
if( $_383 === FALSE) { if( $_416 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_430 = FALSE; break; $_463 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_388 = $result; $res_421 = $result;
$pos_388 = $this->pos; $pos_421 = $this->pos;
$_387 = NULL; $_420 = NULL;
do { do {
$matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_387 = FALSE; break; } else { $_420 = FALSE; break; }
$_387 = TRUE; break; $_420 = TRUE; break;
} }
while(0); while(0);
if( $_387 === FALSE) { if( $_420 === FALSE) {
$result = $res_388; $result = $res_421;
$this->pos = $pos_388; $this->pos = $pos_421;
unset( $res_388 ); unset( $res_421 );
unset( $pos_388 ); unset( $pos_421 );
} }
$res_400 = $result; $res_433 = $result;
$pos_400 = $this->pos; $pos_433 = $this->pos;
$_399 = NULL; $_432 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" ); $stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
$_395 = NULL; $_428 = NULL;
do { do {
$_393 = NULL; $_426 = NULL;
do { do {
$res_390 = $result; $res_423 = $result;
$pos_390 = $this->pos; $pos_423 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_393 = TRUE; break; $_426 = TRUE; break;
} }
$result = $res_390; $result = $res_423;
$this->pos = $pos_390; $this->pos = $pos_423;
if (( $subres = $this->literal( 'unless' ) ) !== FALSE) { if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_393 = TRUE; break; $_426 = TRUE; break;
} }
$result = $res_390; $result = $res_423;
$this->pos = $pos_390; $this->pos = $pos_423;
$_393 = FALSE; break; $_426 = FALSE; break;
} }
while(0); while(0);
if( $_393 === FALSE) { $_395 = FALSE; break; } if( $_426 === FALSE) { $_428 = FALSE; break; }
$_395 = TRUE; break; $_428 = TRUE; break;
} }
while(0); while(0);
if( $_395 === TRUE ) { if( $_428 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' ); $this->store( $result, $subres, 'Conditional' );
} }
if( $_395 === FALSE) { if( $_428 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_399 = FALSE; break; $_432 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
@ -2314,132 +2526,132 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Condition" ); $this->store( $result, $subres, "Condition" );
} }
else { $_399 = FALSE; break; } else { $_432 = FALSE; break; }
$_399 = TRUE; break; $_432 = TRUE; break;
} }
while(0); while(0);
if( $_399 === FALSE) { if( $_432 === FALSE) {
$result = $res_400; $result = $res_433;
$this->pos = $pos_400; $this->pos = $pos_433;
unset( $res_400 ); unset( $res_433 );
unset( $pos_400 ); unset( $pos_433 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_430 = FALSE; break; } else { $_463 = FALSE; break; }
while (true) { while (true) {
$res_413 = $result; $res_446 = $result;
$pos_413 = $this->pos; $pos_446 = $this->pos;
$_412 = NULL; $_445 = NULL;
do { do {
$_410 = NULL; $_443 = NULL;
do { do {
$res_403 = $result; $res_436 = $result;
$pos_403 = $this->pos; $pos_436 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_410 = TRUE; break; $_443 = TRUE; break;
} }
$result = $res_403; $result = $res_436;
$this->pos = $pos_403; $this->pos = $pos_436;
$_408 = NULL; $_441 = NULL;
do { do {
$res_405 = $result; $res_438 = $result;
$pos_405 = $this->pos; $pos_438 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_408 = TRUE; break; $_441 = TRUE; break;
} }
$result = $res_405; $result = $res_438;
$this->pos = $pos_405; $this->pos = $pos_438;
$matcher = 'match_'.'CacheBlockTemplate'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlockTemplate'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_408 = TRUE; break; $_441 = TRUE; break;
} }
$result = $res_405; $result = $res_438;
$this->pos = $pos_405; $this->pos = $pos_438;
$_408 = FALSE; break; $_441 = FALSE; break;
} }
while(0); while(0);
if( $_408 === TRUE ) { $_410 = TRUE; break; } if( $_441 === TRUE ) { $_443 = TRUE; break; }
$result = $res_403; $result = $res_436;
$this->pos = $pos_403; $this->pos = $pos_436;
$_410 = FALSE; break; $_443 = FALSE; break;
} }
while(0); while(0);
if( $_410 === FALSE) { $_412 = FALSE; break; } if( $_443 === FALSE) { $_445 = FALSE; break; }
$_412 = TRUE; break; $_445 = TRUE; break;
} }
while(0); while(0);
if( $_412 === FALSE) { if( $_445 === FALSE) {
$result = $res_413; $result = $res_446;
$this->pos = $pos_413; $this->pos = $pos_446;
unset( $res_413 ); unset( $res_446 );
unset( $pos_413 ); unset( $pos_446 );
break; break;
} }
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_430 = FALSE; break; } else { $_463 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_430 = FALSE; break; } else { $_463 = FALSE; break; }
$_426 = NULL; $_459 = NULL;
do { do {
$_424 = NULL; $_457 = NULL;
do { do {
$res_417 = $result; $res_450 = $result;
$pos_417 = $this->pos; $pos_450 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_424 = TRUE; break; $_457 = TRUE; break;
} }
$result = $res_417; $result = $res_450;
$this->pos = $pos_417; $this->pos = $pos_450;
$_422 = NULL; $_455 = NULL;
do { do {
$res_419 = $result; $res_452 = $result;
$pos_419 = $this->pos; $pos_452 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_422 = TRUE; break; $_455 = TRUE; break;
} }
$result = $res_419; $result = $res_452;
$this->pos = $pos_419; $this->pos = $pos_452;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_422 = TRUE; break; $_455 = TRUE; break;
} }
$result = $res_419; $result = $res_452;
$this->pos = $pos_419; $this->pos = $pos_452;
$_422 = FALSE; break; $_455 = FALSE; break;
} }
while(0); while(0);
if( $_422 === TRUE ) { $_424 = TRUE; break; } if( $_455 === TRUE ) { $_457 = TRUE; break; }
$result = $res_417; $result = $res_450;
$this->pos = $pos_417; $this->pos = $pos_450;
$_424 = FALSE; break; $_457 = FALSE; break;
} }
while(0); while(0);
if( $_424 === FALSE) { $_426 = FALSE; break; } if( $_457 === FALSE) { $_459 = FALSE; break; }
$_426 = TRUE; break; $_459 = TRUE; break;
} }
while(0); while(0);
if( $_426 === FALSE) { $_430 = FALSE; break; } if( $_459 === FALSE) { $_463 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_430 = FALSE; break; } else { $_463 = FALSE; break; }
$_430 = TRUE; break; $_463 = TRUE; break;
} }
while(0); while(0);
if( $_430 === TRUE ) { return $this->finalise($result); } if( $_463 === TRUE ) { return $this->finalise($result); }
if( $_430 === FALSE) { return FALSE; } if( $_463 === FALSE) { return FALSE; }
} }
@ -2479,60 +2691,109 @@ class SSTemplateParser extends Parser {
$res['php'] .= '}'; $res['php'] .= '}';
} }
/* OldTPart: "_t" < "(" < QuotedString (< "," < CallArguments)? > ")" */ /* OldTPart: "_t" N "(" N QuotedString (N "," N CallArguments)? N ")" N (";")? */
protected $match_OldTPart_typestack = array('OldTPart'); protected $match_OldTPart_typestack = array('OldTPart');
function match_OldTPart ($stack = array()) { function match_OldTPart ($stack = array()) {
$matchrule = "OldTPart"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "OldTPart"; $result = $this->construct($matchrule, $matchrule, null);
$_445 = NULL; $_482 = NULL;
do { do {
if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_445 = FALSE; break; } else { $_482 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_482 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '(') { if (substr($this->string,$this->pos,1) == '(') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '('; $result["text"] .= '(';
} }
else { $_445 = FALSE; break; } else { $_482 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_482 = FALSE; break; }
$matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_445 = FALSE; break; } else { $_482 = FALSE; break; }
$res_442 = $result; $res_475 = $result;
$pos_442 = $this->pos; $pos_475 = $this->pos;
$_441 = NULL; $_474 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_474 = FALSE; break; }
if (substr($this->string,$this->pos,1) == ',') { if (substr($this->string,$this->pos,1) == ',') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ','; $result["text"] .= ',';
} }
else { $_441 = FALSE; break; } else { $_474 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_474 = FALSE; break; }
$matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_441 = FALSE; break; } else { $_474 = FALSE; break; }
$_441 = TRUE; break; $_474 = TRUE; break;
} }
while(0); while(0);
if( $_441 === FALSE) { if( $_474 === FALSE) {
$result = $res_442; $result = $res_475;
$this->pos = $pos_442; $this->pos = $pos_475;
unset( $res_442 ); unset( $res_475 );
unset( $pos_442 ); unset( $pos_475 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_482 = FALSE; break; }
if (substr($this->string,$this->pos,1) == ')') { if (substr($this->string,$this->pos,1) == ')') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ')'; $result["text"] .= ')';
} }
else { $_445 = FALSE; break; } else { $_482 = FALSE; break; }
$_445 = TRUE; break; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_482 = FALSE; break; }
$res_481 = $result;
$pos_481 = $this->pos;
$_480 = NULL;
do {
if (substr($this->string,$this->pos,1) == ';') {
$this->pos += 1;
$result["text"] .= ';';
}
else { $_480 = FALSE; break; }
$_480 = TRUE; break;
}
while(0);
if( $_480 === FALSE) {
$result = $res_481;
$this->pos = $pos_481;
unset( $res_481 );
unset( $pos_481 );
}
$_482 = TRUE; break;
} }
while(0); while(0);
if( $_445 === TRUE ) { return $this->finalise($result); } if( $_482 === TRUE ) { return $this->finalise($result); }
if( $_445 === FALSE) { return FALSE; } if( $_482 === FALSE) { return FALSE; }
}
/* N: / [\s\n]* / */
protected $match_N_typestack = array('N');
function match_N ($stack = array()) {
$matchrule = "N"; $result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx( '/ [\s\n]* /' ) ) !== FALSE) {
$result["text"] .= $subres;
return $this->finalise($result);
}
else { return FALSE; }
} }
@ -2563,23 +2824,23 @@ class SSTemplateParser extends Parser {
protected $match_OldTTag_typestack = array('OldTTag'); protected $match_OldTTag_typestack = array('OldTTag');
function match_OldTTag ($stack = array()) { function match_OldTTag ($stack = array()) {
$matchrule = "OldTTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "OldTTag"; $result = $this->construct($matchrule, $matchrule, null);
$_452 = NULL; $_490 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_452 = FALSE; break; } else { $_490 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_452 = FALSE; break; } else { $_490 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_452 = FALSE; break; } else { $_490 = FALSE; break; }
$_452 = TRUE; break; $_490 = TRUE; break;
} }
while(0); while(0);
if( $_452 === TRUE ) { return $this->finalise($result); } if( $_490 === TRUE ) { return $this->finalise($result); }
if( $_452 === FALSE) { return FALSE; } if( $_490 === FALSE) { return FALSE; }
} }
@ -2592,49 +2853,49 @@ class SSTemplateParser extends Parser {
protected $match_OldSprintfTag_typestack = array('OldSprintfTag'); protected $match_OldSprintfTag_typestack = array('OldSprintfTag');
function match_OldSprintfTag ($stack = array()) { function match_OldSprintfTag ($stack = array()) {
$matchrule = "OldSprintfTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "OldSprintfTag"; $result = $this->construct($matchrule, $matchrule, null);
$_469 = NULL; $_507 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'sprintf' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'sprintf' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == '(') { if (substr($this->string,$this->pos,1) == '(') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '('; $result["text"] .= '(';
} }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ',') { if (substr($this->string,$this->pos,1) == ',') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ','; $result["text"] .= ',';
} }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ')') { if (substr($this->string,$this->pos,1) == ')') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ')'; $result["text"] .= ')';
} }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_469 = FALSE; break; } else { $_507 = FALSE; break; }
$_469 = TRUE; break; $_507 = TRUE; break;
} }
while(0); while(0);
if( $_469 === TRUE ) { return $this->finalise($result); } if( $_507 === TRUE ) { return $this->finalise($result); }
if( $_469 === FALSE) { return FALSE; } if( $_507 === FALSE) { return FALSE; }
} }
@ -2655,31 +2916,31 @@ class SSTemplateParser extends Parser {
protected $match_OldI18NTag_typestack = array('OldI18NTag'); protected $match_OldI18NTag_typestack = array('OldI18NTag');
function match_OldI18NTag ($stack = array()) { function match_OldI18NTag ($stack = array()) {
$matchrule = "OldI18NTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "OldI18NTag"; $result = $this->construct($matchrule, $matchrule, null);
$_474 = NULL; $_512 = NULL;
do { do {
$res_471 = $result; $res_509 = $result;
$pos_471 = $this->pos; $pos_509 = $this->pos;
$matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_474 = TRUE; break; $_512 = TRUE; break;
} }
$result = $res_471; $result = $res_509;
$this->pos = $pos_471; $this->pos = $pos_509;
$matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_474 = TRUE; break; $_512 = TRUE; break;
} }
$result = $res_471; $result = $res_509;
$this->pos = $pos_471; $this->pos = $pos_509;
$_474 = FALSE; break; $_512 = FALSE; break;
} }
while(0); while(0);
if( $_474 === TRUE ) { return $this->finalise($result); } if( $_512 === TRUE ) { return $this->finalise($result); }
if( $_474 === FALSE) { return FALSE; } if( $_512 === FALSE) { return FALSE; }
} }
@ -2692,30 +2953,30 @@ class SSTemplateParser extends Parser {
protected $match_NamedArgument_typestack = array('NamedArgument'); protected $match_NamedArgument_typestack = array('NamedArgument');
function match_NamedArgument ($stack = array()) { function match_NamedArgument ($stack = array()) {
$matchrule = "NamedArgument"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "NamedArgument"; $result = $this->construct($matchrule, $matchrule, null);
$_479 = NULL; $_517 = NULL;
do { do {
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Name" ); $this->store( $result, $subres, "Name" );
} }
else { $_479 = FALSE; break; } else { $_517 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '=') { if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '='; $result["text"] .= '=';
} }
else { $_479 = FALSE; break; } else { $_517 = FALSE; break; }
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Value" ); $this->store( $result, $subres, "Value" );
} }
else { $_479 = FALSE; break; } else { $_517 = FALSE; break; }
$_479 = TRUE; break; $_517 = TRUE; break;
} }
while(0); while(0);
if( $_479 === TRUE ) { return $this->finalise($result); } if( $_517 === TRUE ) { return $this->finalise($result); }
if( $_479 === FALSE) { return FALSE; } if( $_517 === FALSE) { return FALSE; }
} }
@ -2732,75 +2993,75 @@ class SSTemplateParser extends Parser {
protected $match_Include_typestack = array('Include'); protected $match_Include_typestack = array('Include');
function match_Include ($stack = array()) { function match_Include ($stack = array()) {
$matchrule = "Include"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Include"; $result = $this->construct($matchrule, $matchrule, null);
$_498 = NULL; $_536 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_498 = FALSE; break; } else { $_536 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'include' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'include' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_498 = FALSE; break; } else { $_536 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { $_498 = FALSE; break; } else { $_536 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_495 = $result; $res_533 = $result;
$pos_495 = $this->pos; $pos_533 = $this->pos;
$_494 = NULL; $_532 = NULL;
do { do {
$matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_494 = FALSE; break; } else { $_532 = FALSE; break; }
while (true) { while (true) {
$res_493 = $result; $res_531 = $result;
$pos_493 = $this->pos; $pos_531 = $this->pos;
$_492 = NULL; $_530 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ',') { if (substr($this->string,$this->pos,1) == ',') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ','; $result["text"] .= ',';
} }
else { $_492 = FALSE; break; } else { $_530 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} }
else { $_492 = FALSE; break; } else { $_530 = FALSE; break; }
$_492 = TRUE; break; $_530 = TRUE; break;
} }
while(0); while(0);
if( $_492 === FALSE) { if( $_530 === FALSE) {
$result = $res_493; $result = $res_531;
$this->pos = $pos_493; $this->pos = $pos_531;
unset( $res_493 ); unset( $res_531 );
unset( $pos_493 ); unset( $pos_531 );
break; break;
} }
} }
$_494 = TRUE; break; $_532 = TRUE; break;
} }
while(0); while(0);
if( $_494 === FALSE) { if( $_532 === FALSE) {
$result = $res_495; $result = $res_533;
$this->pos = $pos_495; $this->pos = $pos_533;
unset( $res_495 ); unset( $res_533 );
unset( $pos_495 ); unset( $pos_533 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_498 = FALSE; break; } else { $_536 = FALSE; break; }
$_498 = TRUE; break; $_536 = TRUE; break;
} }
while(0); while(0);
if( $_498 === TRUE ) { return $this->finalise($result); } if( $_536 === TRUE ) { return $this->finalise($result); }
if( $_498 === FALSE) { return FALSE; } if( $_536 === FALSE) { return FALSE; }
} }
@ -2835,198 +3096,44 @@ class SSTemplateParser extends Parser {
protected $match_BlockArguments_typestack = array('BlockArguments'); protected $match_BlockArguments_typestack = array('BlockArguments');
function match_BlockArguments ($stack = array()) { function match_BlockArguments ($stack = array()) {
$matchrule = "BlockArguments"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "BlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
$_507 = NULL; $_545 = NULL;
do { do {
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Argument" ); $this->store( $result, $subres, "Argument" );
} }
else { $_507 = FALSE; break; } else { $_545 = FALSE; break; }
while (true) { while (true) {
$res_506 = $result; $res_544 = $result;
$pos_506 = $this->pos; $pos_544 = $this->pos;
$_505 = NULL; $_543 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (substr($this->string,$this->pos,1) == ',') { if (substr($this->string,$this->pos,1) == ',') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= ','; $result["text"] .= ',';
} }
else { $_505 = FALSE; break; } else { $_543 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Argument" ); $this->store( $result, $subres, "Argument" );
} }
else { $_505 = FALSE; break; } else { $_543 = FALSE; break; }
$_505 = TRUE; break; $_543 = TRUE; break;
} }
while(0); while(0);
if( $_505 === FALSE) { if( $_543 === FALSE) {
$result = $res_506; $result = $res_544;
$this->pos = $pos_506; $this->pos = $pos_544;
unset( $res_506 ); unset( $res_544 );
unset( $pos_506 ); unset( $pos_544 );
break; break;
} }
} }
$_507 = TRUE; break; $_545 = TRUE; break;
}
while(0);
if( $_507 === TRUE ) { return $this->finalise($result); }
if( $_507 === FALSE) { return FALSE; }
}
/* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include") ] ) */
protected $match_NotBlockTag_typestack = array('NotBlockTag');
function match_NotBlockTag ($stack = array()) {
$matchrule = "NotBlockTag"; $result = $this->construct($matchrule, $matchrule, null);
$_545 = NULL;
do {
$res_509 = $result;
$pos_509 = $this->pos;
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) {
$result["text"] .= $subres;
$_545 = TRUE; break;
}
$result = $res_509;
$this->pos = $pos_509;
$_543 = NULL;
do {
$_540 = NULL;
do {
$_538 = NULL;
do {
$res_511 = $result;
$pos_511 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_538 = TRUE; break;
}
$result = $res_511;
$this->pos = $pos_511;
$_536 = NULL;
do {
$res_513 = $result;
$pos_513 = $this->pos;
if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_536 = TRUE; break;
}
$result = $res_513;
$this->pos = $pos_513;
$_534 = NULL;
do {
$res_515 = $result;
$pos_515 = $this->pos;
if (( $subres = $this->literal( 'else' ) ) !== FALSE) {
$result["text"] .= $subres;
$_534 = TRUE; break;
}
$result = $res_515;
$this->pos = $pos_515;
$_532 = NULL;
do {
$res_517 = $result;
$pos_517 = $this->pos;
if (( $subres = $this->literal( 'require' ) ) !== FALSE) {
$result["text"] .= $subres;
$_532 = TRUE; break;
}
$result = $res_517;
$this->pos = $pos_517;
$_530 = NULL;
do {
$res_519 = $result;
$pos_519 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres;
$_530 = TRUE; break;
}
$result = $res_519;
$this->pos = $pos_519;
$_528 = NULL;
do {
$res_521 = $result;
$pos_521 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres;
$_528 = TRUE; break;
}
$result = $res_521;
$this->pos = $pos_521;
$_526 = NULL;
do {
$res_523 = $result;
$pos_523 = $this->pos;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres;
$_526 = TRUE; break;
}
$result = $res_523;
$this->pos = $pos_523;
if (( $subres = $this->literal( 'include' ) ) !== FALSE) {
$result["text"] .= $subres;
$_526 = TRUE; break;
}
$result = $res_523;
$this->pos = $pos_523;
$_526 = FALSE; break;
}
while(0);
if( $_526 === TRUE ) { $_528 = TRUE; break; }
$result = $res_521;
$this->pos = $pos_521;
$_528 = FALSE; break;
}
while(0);
if( $_528 === TRUE ) { $_530 = TRUE; break; }
$result = $res_519;
$this->pos = $pos_519;
$_530 = FALSE; break;
}
while(0);
if( $_530 === TRUE ) { $_532 = TRUE; break; }
$result = $res_517;
$this->pos = $pos_517;
$_532 = FALSE; break;
}
while(0);
if( $_532 === TRUE ) { $_534 = TRUE; break; }
$result = $res_515;
$this->pos = $pos_515;
$_534 = FALSE; break;
}
while(0);
if( $_534 === TRUE ) { $_536 = TRUE; break; }
$result = $res_513;
$this->pos = $pos_513;
$_536 = FALSE; break;
}
while(0);
if( $_536 === TRUE ) { $_538 = TRUE; break; }
$result = $res_511;
$this->pos = $pos_511;
$_538 = FALSE; break;
}
while(0);
if( $_538 === FALSE) { $_540 = FALSE; break; }
$_540 = TRUE; break;
}
while(0);
if( $_540 === FALSE) { $_543 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_543 = FALSE; break; }
$_543 = TRUE; break;
}
while(0);
if( $_543 === TRUE ) { $_545 = TRUE; break; }
$result = $res_509;
$this->pos = $pos_509;
$_545 = FALSE; break;
} }
while(0); while(0);
if( $_545 === TRUE ) { return $this->finalise($result); } if( $_545 === TRUE ) { return $this->finalise($result); }
@ -3034,57 +3141,211 @@ class SSTemplateParser extends Parser {
} }
/* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include") ] ) */
protected $match_NotBlockTag_typestack = array('NotBlockTag');
function match_NotBlockTag ($stack = array()) {
$matchrule = "NotBlockTag"; $result = $this->construct($matchrule, $matchrule, null);
$_583 = NULL;
do {
$res_547 = $result;
$pos_547 = $this->pos;
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) {
$result["text"] .= $subres;
$_583 = TRUE; break;
}
$result = $res_547;
$this->pos = $pos_547;
$_581 = NULL;
do {
$_578 = NULL;
do {
$_576 = NULL;
do {
$res_549 = $result;
$pos_549 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_576 = TRUE; break;
}
$result = $res_549;
$this->pos = $pos_549;
$_574 = NULL;
do {
$res_551 = $result;
$pos_551 = $this->pos;
if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_574 = TRUE; break;
}
$result = $res_551;
$this->pos = $pos_551;
$_572 = NULL;
do {
$res_553 = $result;
$pos_553 = $this->pos;
if (( $subres = $this->literal( 'else' ) ) !== FALSE) {
$result["text"] .= $subres;
$_572 = TRUE; break;
}
$result = $res_553;
$this->pos = $pos_553;
$_570 = NULL;
do {
$res_555 = $result;
$pos_555 = $this->pos;
if (( $subres = $this->literal( 'require' ) ) !== FALSE) {
$result["text"] .= $subres;
$_570 = TRUE; break;
}
$result = $res_555;
$this->pos = $pos_555;
$_568 = NULL;
do {
$res_557 = $result;
$pos_557 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres;
$_568 = TRUE; break;
}
$result = $res_557;
$this->pos = $pos_557;
$_566 = NULL;
do {
$res_559 = $result;
$pos_559 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres;
$_566 = TRUE; break;
}
$result = $res_559;
$this->pos = $pos_559;
$_564 = NULL;
do {
$res_561 = $result;
$pos_561 = $this->pos;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres;
$_564 = TRUE; break;
}
$result = $res_561;
$this->pos = $pos_561;
if (( $subres = $this->literal( 'include' ) ) !== FALSE) {
$result["text"] .= $subres;
$_564 = TRUE; break;
}
$result = $res_561;
$this->pos = $pos_561;
$_564 = FALSE; break;
}
while(0);
if( $_564 === TRUE ) { $_566 = TRUE; break; }
$result = $res_559;
$this->pos = $pos_559;
$_566 = FALSE; break;
}
while(0);
if( $_566 === TRUE ) { $_568 = TRUE; break; }
$result = $res_557;
$this->pos = $pos_557;
$_568 = FALSE; break;
}
while(0);
if( $_568 === TRUE ) { $_570 = TRUE; break; }
$result = $res_555;
$this->pos = $pos_555;
$_570 = FALSE; break;
}
while(0);
if( $_570 === TRUE ) { $_572 = TRUE; break; }
$result = $res_553;
$this->pos = $pos_553;
$_572 = FALSE; break;
}
while(0);
if( $_572 === TRUE ) { $_574 = TRUE; break; }
$result = $res_551;
$this->pos = $pos_551;
$_574 = FALSE; break;
}
while(0);
if( $_574 === TRUE ) { $_576 = TRUE; break; }
$result = $res_549;
$this->pos = $pos_549;
$_576 = FALSE; break;
}
while(0);
if( $_576 === FALSE) { $_578 = FALSE; break; }
$_578 = TRUE; break;
}
while(0);
if( $_578 === FALSE) { $_581 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_581 = FALSE; break; }
$_581 = TRUE; break;
}
while(0);
if( $_581 === TRUE ) { $_583 = TRUE; break; }
$result = $res_547;
$this->pos = $pos_547;
$_583 = FALSE; break;
}
while(0);
if( $_583 === TRUE ) { return $this->finalise($result); }
if( $_583 === FALSE) { return FALSE; }
}
/* ClosedBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > Zap:'%>' Template:$TemplateMatcher? '<%' < 'end_' '$BlockName' > '%>' */ /* ClosedBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > Zap:'%>' Template:$TemplateMatcher? '<%' < 'end_' '$BlockName' > '%>' */
protected $match_ClosedBlock_typestack = array('ClosedBlock'); protected $match_ClosedBlock_typestack = array('ClosedBlock');
function match_ClosedBlock ($stack = array()) { function match_ClosedBlock ($stack = array()) {
$matchrule = "ClosedBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "ClosedBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_565 = NULL; $_603 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_549 = $result; $res_587 = $result;
$pos_549 = $this->pos; $pos_587 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$result = $res_549; $result = $res_587;
$this->pos = $pos_549; $this->pos = $pos_587;
$_565 = FALSE; break; $_603 = FALSE; break;
} }
else { else {
$result = $res_549; $result = $res_587;
$this->pos = $pos_549; $this->pos = $pos_587;
} }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BlockName" ); $this->store( $result, $subres, "BlockName" );
} }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
$res_555 = $result; $res_593 = $result;
$pos_555 = $this->pos; $pos_593 = $this->pos;
$_554 = NULL; $_592 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_554 = FALSE; break; } else { $_592 = FALSE; break; }
$matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BlockArguments" ); $this->store( $result, $subres, "BlockArguments" );
} }
else { $_554 = FALSE; break; } else { $_592 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_554 = FALSE; break; } else { $_592 = FALSE; break; }
$_554 = TRUE; break; $_592 = TRUE; break;
} }
while(0); while(0);
if( $_554 === FALSE) { if( $_592 === FALSE) {
$result = $res_555; $result = $res_593;
$this->pos = $pos_555; $this->pos = $pos_593;
unset( $res_555 ); unset( $res_593 );
unset( $pos_555 ); unset( $pos_593 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Zap" ); $stack[] = $result; $result = $this->construct( $matchrule, "Zap" );
@ -3095,36 +3356,36 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_565 = FALSE; break; $_603 = FALSE; break;
} }
$res_558 = $result; $res_596 = $result;
$pos_558 = $this->pos; $pos_596 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Template" ); $this->store( $result, $subres, "Template" );
} }
else { else {
$result = $res_558; $result = $res_596;
$this->pos = $pos_558; $this->pos = $pos_596;
unset( $res_558 ); unset( $res_596 );
unset( $pos_558 ); unset( $pos_596 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'BlockName').'' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'BlockName').'' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_565 = FALSE; break; } else { $_603 = FALSE; break; }
$_565 = TRUE; break; $_603 = TRUE; break;
} }
while(0); while(0);
if( $_565 === TRUE ) { return $this->finalise($result); } if( $_603 === TRUE ) { return $this->finalise($result); }
if( $_565 === FALSE) { return FALSE; } if( $_603 === FALSE) { return FALSE; }
} }
@ -3227,62 +3488,62 @@ class SSTemplateParser extends Parser {
protected $match_OpenBlock_typestack = array('OpenBlock'); protected $match_OpenBlock_typestack = array('OpenBlock');
function match_OpenBlock ($stack = array()) { function match_OpenBlock ($stack = array()) {
$matchrule = "OpenBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "OpenBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_578 = NULL; $_616 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_578 = FALSE; break; } else { $_616 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_569 = $result; $res_607 = $result;
$pos_569 = $this->pos; $pos_607 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$result = $res_569; $result = $res_607;
$this->pos = $pos_569; $this->pos = $pos_607;
$_578 = FALSE; break; $_616 = FALSE; break;
} }
else { else {
$result = $res_569; $result = $res_607;
$this->pos = $pos_569; $this->pos = $pos_607;
} }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BlockName" ); $this->store( $result, $subres, "BlockName" );
} }
else { $_578 = FALSE; break; } else { $_616 = FALSE; break; }
$res_575 = $result; $res_613 = $result;
$pos_575 = $this->pos; $pos_613 = $this->pos;
$_574 = NULL; $_612 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_574 = FALSE; break; } else { $_612 = FALSE; break; }
$matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BlockArguments" ); $this->store( $result, $subres, "BlockArguments" );
} }
else { $_574 = FALSE; break; } else { $_612 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_574 = FALSE; break; } else { $_612 = FALSE; break; }
$_574 = TRUE; break; $_612 = TRUE; break;
} }
while(0); while(0);
if( $_574 === FALSE) { if( $_612 === FALSE) {
$result = $res_575; $result = $res_613;
$this->pos = $pos_575; $this->pos = $pos_613;
unset( $res_575 ); unset( $res_613 );
unset( $pos_575 ); unset( $pos_613 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_578 = FALSE; break; } else { $_616 = FALSE; break; }
$_578 = TRUE; break; $_616 = TRUE; break;
} }
while(0); while(0);
if( $_578 === TRUE ) { return $this->finalise($result); } if( $_616 === TRUE ) { return $this->finalise($result); }
if( $_578 === FALSE) { return FALSE; } if( $_616 === FALSE) { return FALSE; }
} }
@ -3350,27 +3611,27 @@ class SSTemplateParser extends Parser {
protected $match_MismatchedEndBlock_typestack = array('MismatchedEndBlock'); protected $match_MismatchedEndBlock_typestack = array('MismatchedEndBlock');
function match_MismatchedEndBlock ($stack = array()) { function match_MismatchedEndBlock ($stack = array()) {
$matchrule = "MismatchedEndBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "MismatchedEndBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_586 = NULL; $_624 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_586 = FALSE; break; } else { $_624 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_586 = FALSE; break; } else { $_624 = FALSE; break; }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Word" ); $this->store( $result, $subres, "Word" );
} }
else { $_586 = FALSE; break; } else { $_624 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_586 = FALSE; break; } else { $_624 = FALSE; break; }
$_586 = TRUE; break; $_624 = TRUE; break;
} }
while(0); while(0);
if( $_586 === TRUE ) { return $this->finalise($result); } if( $_624 === TRUE ) { return $this->finalise($result); }
if( $_586 === FALSE) { return FALSE; } if( $_624 === FALSE) { return FALSE; }
} }
@ -3384,78 +3645,78 @@ class SSTemplateParser extends Parser {
protected $match_MalformedOpenTag_typestack = array('MalformedOpenTag'); protected $match_MalformedOpenTag_typestack = array('MalformedOpenTag');
function match_MalformedOpenTag ($stack = array()) { function match_MalformedOpenTag ($stack = array()) {
$matchrule = "MalformedOpenTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "MalformedOpenTag"; $result = $this->construct($matchrule, $matchrule, null);
$_601 = NULL; $_639 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_601 = FALSE; break; } else { $_639 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_590 = $result; $res_628 = $result;
$pos_590 = $this->pos; $pos_628 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$result = $res_590; $result = $res_628;
$this->pos = $pos_590; $this->pos = $pos_628;
$_601 = FALSE; break; $_639 = FALSE; break;
} }
else { else {
$result = $res_590; $result = $res_628;
$this->pos = $pos_590; $this->pos = $pos_628;
} }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Tag" ); $this->store( $result, $subres, "Tag" );
} }
else { $_601 = FALSE; break; } else { $_639 = FALSE; break; }
$res_600 = $result; $res_638 = $result;
$pos_600 = $this->pos; $pos_638 = $this->pos;
$_599 = NULL; $_637 = NULL;
do { do {
$res_596 = $result; $res_634 = $result;
$pos_596 = $this->pos; $pos_634 = $this->pos;
$_595 = NULL; $_633 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_595 = FALSE; break; } else { $_633 = FALSE; break; }
$matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BlockArguments" ); $this->store( $result, $subres, "BlockArguments" );
} }
else { $_595 = FALSE; break; } else { $_633 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_595 = FALSE; break; } else { $_633 = FALSE; break; }
$_595 = TRUE; break; $_633 = TRUE; break;
} }
while(0); while(0);
if( $_595 === FALSE) { if( $_633 === FALSE) {
$result = $res_596; $result = $res_634;
$this->pos = $pos_596; $this->pos = $pos_634;
unset( $res_596 ); unset( $res_634 );
unset( $pos_596 ); unset( $pos_634 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_599 = FALSE; break; } else { $_637 = FALSE; break; }
$_599 = TRUE; break; $_637 = TRUE; break;
} }
while(0); while(0);
if( $_599 === TRUE ) { if( $_637 === TRUE ) {
$result = $res_600; $result = $res_638;
$this->pos = $pos_600; $this->pos = $pos_638;
$_601 = FALSE; break; $_639 = FALSE; break;
} }
if( $_599 === FALSE) { if( $_637 === FALSE) {
$result = $res_600; $result = $res_638;
$this->pos = $pos_600; $this->pos = $pos_638;
} }
$_601 = TRUE; break; $_639 = TRUE; break;
} }
while(0); while(0);
if( $_601 === TRUE ) { return $this->finalise($result); } if( $_639 === TRUE ) { return $this->finalise($result); }
if( $_601 === FALSE) { return FALSE; } if( $_639 === FALSE) { return FALSE; }
} }
@ -3469,57 +3730,57 @@ class SSTemplateParser extends Parser {
protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag'); protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag');
function match_MalformedCloseTag ($stack = array()) { function match_MalformedCloseTag ($stack = array()) {
$matchrule = "MalformedCloseTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "MalformedCloseTag"; $result = $this->construct($matchrule, $matchrule, null);
$_613 = NULL; $_651 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_613 = FALSE; break; } else { $_651 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Tag" ); $stack[] = $result; $result = $this->construct( $matchrule, "Tag" );
$_607 = NULL; $_645 = NULL;
do { do {
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_607 = FALSE; break; } else { $_645 = FALSE; break; }
$matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Word" ); $this->store( $result, $subres, "Word" );
} }
else { $_607 = FALSE; break; } else { $_645 = FALSE; break; }
$_607 = TRUE; break; $_645 = TRUE; break;
} }
while(0); while(0);
if( $_607 === TRUE ) { if( $_645 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Tag' ); $this->store( $result, $subres, 'Tag' );
} }
if( $_607 === FALSE) { if( $_645 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_613 = FALSE; break; $_651 = FALSE; break;
} }
$res_612 = $result; $res_650 = $result;
$pos_612 = $this->pos; $pos_650 = $this->pos;
$_611 = NULL; $_649 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_611 = FALSE; break; } else { $_649 = FALSE; break; }
$_611 = TRUE; break; $_649 = TRUE; break;
} }
while(0); while(0);
if( $_611 === TRUE ) { if( $_649 === TRUE ) {
$result = $res_612; $result = $res_650;
$this->pos = $pos_612; $this->pos = $pos_650;
$_613 = FALSE; break; $_651 = FALSE; break;
} }
if( $_611 === FALSE) { if( $_649 === FALSE) {
$result = $res_612; $result = $res_650;
$this->pos = $pos_612; $this->pos = $pos_650;
} }
$_613 = TRUE; break; $_651 = TRUE; break;
} }
while(0); while(0);
if( $_613 === TRUE ) { return $this->finalise($result); } if( $_651 === TRUE ) { return $this->finalise($result); }
if( $_613 === FALSE) { return FALSE; } if( $_651 === FALSE) { return FALSE; }
} }
@ -3533,31 +3794,31 @@ class SSTemplateParser extends Parser {
protected $match_MalformedBlock_typestack = array('MalformedBlock'); protected $match_MalformedBlock_typestack = array('MalformedBlock');
function match_MalformedBlock ($stack = array()) { function match_MalformedBlock ($stack = array()) {
$matchrule = "MalformedBlock"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "MalformedBlock"; $result = $this->construct($matchrule, $matchrule, null);
$_618 = NULL; $_656 = NULL;
do { do {
$res_615 = $result; $res_653 = $result;
$pos_615 = $this->pos; $pos_653 = $this->pos;
$matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_618 = TRUE; break; $_656 = TRUE; break;
} }
$result = $res_615; $result = $res_653;
$this->pos = $pos_615; $this->pos = $pos_653;
$matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_618 = TRUE; break; $_656 = TRUE; break;
} }
$result = $res_615; $result = $res_653;
$this->pos = $pos_615; $this->pos = $pos_653;
$_618 = FALSE; break; $_656 = FALSE; break;
} }
while(0); while(0);
if( $_618 === TRUE ) { return $this->finalise($result); } if( $_656 === TRUE ) { return $this->finalise($result); }
if( $_618 === FALSE) { return FALSE; } if( $_656 === FALSE) { return FALSE; }
} }
@ -3567,51 +3828,51 @@ class SSTemplateParser extends Parser {
protected $match_Comment_typestack = array('Comment'); protected $match_Comment_typestack = array('Comment');
function match_Comment ($stack = array()) { function match_Comment ($stack = array()) {
$matchrule = "Comment"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Comment"; $result = $this->construct($matchrule, $matchrule, null);
$_626 = NULL; $_664 = NULL;
do { do {
if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_626 = FALSE; break; } else { $_664 = FALSE; break; }
$count = 0; $count = 0;
while (true) { while (true) {
$res_624 = $result; $res_662 = $result;
$pos_624 = $this->pos; $pos_662 = $this->pos;
$_623 = NULL; $_661 = NULL;
do { do {
$res_621 = $result; $res_659 = $result;
$pos_621 = $this->pos; $pos_659 = $this->pos;
if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { if (( $subres = $this->literal( '--%>' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$result = $res_621; $result = $res_659;
$this->pos = $pos_621; $this->pos = $pos_659;
$_623 = FALSE; break; $_661 = FALSE; break;
} }
else { else {
$result = $res_621; $result = $res_659;
$this->pos = $pos_621; $this->pos = $pos_659;
} }
if (( $subres = $this->rx( '/./' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->rx( '/./' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_623 = FALSE; break; } else { $_661 = FALSE; break; }
$_623 = TRUE; break; $_661 = TRUE; break;
} }
while(0); while(0);
if( $_623 === FALSE) { if( $_661 === FALSE) {
$result = $res_624; $result = $res_662;
$this->pos = $pos_624; $this->pos = $pos_662;
unset( $res_624 ); unset( $res_662 );
unset( $pos_624 ); unset( $pos_662 );
break; break;
} }
$count += 1; $count += 1;
} }
if ($count > 0) { } if ($count > 0) { }
else { $_626 = FALSE; break; } else { $_664 = FALSE; break; }
if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_626 = FALSE; break; } else { $_664 = FALSE; break; }
$_626 = TRUE; break; $_664 = TRUE; break;
} }
while(0); while(0);
if( $_626 === TRUE ) { return $this->finalise($result); } if( $_664 === TRUE ) { return $this->finalise($result); }
if( $_626 === FALSE) { return FALSE; } if( $_664 === FALSE) { return FALSE; }
} }
@ -3620,246 +3881,246 @@ class SSTemplateParser extends Parser {
$res['php'] = ''; $res['php'] = '';
} }
/* TopTemplate: (Comment | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | OpenBlock | MalformedBlock | MismatchedEndBlock | Injection | Text)+ */ /* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | MismatchedEndBlock | Injection | Text)+ */
protected $match_TopTemplate_typestack = array('TopTemplate','Template'); protected $match_TopTemplate_typestack = array('TopTemplate','Template');
function match_TopTemplate ($stack = array()) { function match_TopTemplate ($stack = array()) {
$matchrule = "TopTemplate"; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'Template')); $matchrule = "TopTemplate"; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'Template'));
$count = 0; $count = 0;
while (true) { while (true) {
$res_678 = $result; $res_716 = $result;
$pos_678 = $this->pos; $pos_716 = $this->pos;
$_677 = NULL; $_715 = NULL;
do { do {
$_675 = NULL; $_713 = NULL;
do { do {
$res_628 = $result; $res_666 = $result;
$pos_628 = $this->pos; $pos_666 = $this->pos;
$matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_675 = TRUE; break; $_713 = TRUE; break;
} }
$result = $res_628; $result = $res_666;
$this->pos = $pos_628; $this->pos = $pos_666;
$_673 = NULL; $_711 = NULL;
do { do {
$res_630 = $result; $res_668 = $result;
$pos_630 = $this->pos; $pos_668 = $this->pos;
$matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_673 = TRUE; break; $_711 = TRUE; break;
} }
$result = $res_630; $result = $res_668;
$this->pos = $pos_630; $this->pos = $pos_668;
$_671 = NULL; $_709 = NULL;
do { do {
$res_632 = $result; $res_670 = $result;
$pos_632 = $this->pos; $pos_670 = $this->pos;
$matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_671 = TRUE; break; $_709 = TRUE; break;
} }
$result = $res_632; $result = $res_670;
$this->pos = $pos_632; $this->pos = $pos_670;
$_669 = NULL; $_707 = NULL;
do { do {
$res_634 = $result; $res_672 = $result;
$pos_634 = $this->pos; $pos_672 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_669 = TRUE; break; $_707 = TRUE; break;
} }
$result = $res_634; $result = $res_672;
$this->pos = $pos_634; $this->pos = $pos_672;
$_667 = NULL; $_705 = NULL;
do { do {
$res_636 = $result; $res_674 = $result;
$pos_636 = $this->pos; $pos_674 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_667 = TRUE; break; $_705 = TRUE; break;
} }
$result = $res_636; $result = $res_674;
$this->pos = $pos_636; $this->pos = $pos_674;
$_665 = NULL; $_703 = NULL;
do { do {
$res_638 = $result; $res_676 = $result;
$pos_638 = $this->pos; $pos_676 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_665 = TRUE; break; $_703 = TRUE; break;
} }
$result = $res_638; $result = $res_676;
$this->pos = $pos_638; $this->pos = $pos_676;
$_663 = NULL; $_701 = NULL;
do { do {
$res_640 = $result; $res_678 = $result;
$pos_640 = $this->pos; $pos_678 = $this->pos;
$matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_663 = TRUE; break; $_701 = TRUE; break;
} }
$result = $res_640; $result = $res_678;
$this->pos = $pos_640; $this->pos = $pos_678;
$_661 = NULL; $_699 = NULL;
do { do {
$res_642 = $result; $res_680 = $result;
$pos_642 = $this->pos; $pos_680 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_661 = TRUE; break; $_699 = TRUE; break;
} }
$result = $res_642; $result = $res_680;
$this->pos = $pos_642; $this->pos = $pos_680;
$_659 = NULL; $_697 = NULL;
do { do {
$res_644 = $result; $res_682 = $result;
$pos_644 = $this->pos; $pos_682 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_659 = TRUE; break; $_697 = TRUE; break;
} }
$result = $res_644; $result = $res_682;
$this->pos = $pos_644; $this->pos = $pos_682;
$_657 = NULL; $_695 = NULL;
do { do {
$res_646 = $result; $res_684 = $result;
$pos_646 = $this->pos; $pos_684 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_657 = TRUE; break; $_695 = TRUE; break;
} }
$result = $res_646; $result = $res_684;
$this->pos = $pos_646; $this->pos = $pos_684;
$_655 = NULL; $_693 = NULL;
do { do {
$res_648 = $result; $res_686 = $result;
$pos_648 = $this->pos; $pos_686 = $this->pos;
$matcher = 'match_'.'MismatchedEndBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'MismatchedEndBlock'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_655 = TRUE; break; $_693 = TRUE; break;
} }
$result = $res_648; $result = $res_686;
$this->pos = $pos_648; $this->pos = $pos_686;
$_653 = NULL; $_691 = NULL;
do { do {
$res_650 = $result; $res_688 = $result;
$pos_650 = $this->pos; $pos_688 = $this->pos;
$matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_653 = TRUE; break; $_691 = TRUE; break;
} }
$result = $res_650; $result = $res_688;
$this->pos = $pos_650; $this->pos = $pos_688;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
$_653 = TRUE; break; $_691 = TRUE; break;
} }
$result = $res_650; $result = $res_688;
$this->pos = $pos_650; $this->pos = $pos_688;
$_653 = FALSE; break; $_691 = FALSE; break;
} }
while(0); while(0);
if( $_653 === TRUE ) { $_655 = TRUE; break; } if( $_691 === TRUE ) { $_693 = TRUE; break; }
$result = $res_648; $result = $res_686;
$this->pos = $pos_648; $this->pos = $pos_686;
$_655 = FALSE; break; $_693 = FALSE; break;
} }
while(0); while(0);
if( $_655 === TRUE ) { $_657 = TRUE; break; } if( $_693 === TRUE ) { $_695 = TRUE; break; }
$result = $res_646; $result = $res_684;
$this->pos = $pos_646; $this->pos = $pos_684;
$_657 = FALSE; break; $_695 = FALSE; break;
} }
while(0); while(0);
if( $_657 === TRUE ) { $_659 = TRUE; break; } if( $_695 === TRUE ) { $_697 = TRUE; break; }
$result = $res_644; $result = $res_682;
$this->pos = $pos_644; $this->pos = $pos_682;
$_659 = FALSE; break; $_697 = FALSE; break;
} }
while(0); while(0);
if( $_659 === TRUE ) { $_661 = TRUE; break; } if( $_697 === TRUE ) { $_699 = TRUE; break; }
$result = $res_642; $result = $res_680;
$this->pos = $pos_642; $this->pos = $pos_680;
$_661 = FALSE; break; $_699 = FALSE; break;
} }
while(0); while(0);
if( $_661 === TRUE ) { $_663 = TRUE; break; } if( $_699 === TRUE ) { $_701 = TRUE; break; }
$result = $res_640; $result = $res_678;
$this->pos = $pos_640; $this->pos = $pos_678;
$_663 = FALSE; break; $_701 = FALSE; break;
} }
while(0); while(0);
if( $_663 === TRUE ) { $_665 = TRUE; break; } if( $_701 === TRUE ) { $_703 = TRUE; break; }
$result = $res_638; $result = $res_676;
$this->pos = $pos_638; $this->pos = $pos_676;
$_665 = FALSE; break; $_703 = FALSE; break;
} }
while(0); while(0);
if( $_665 === TRUE ) { $_667 = TRUE; break; } if( $_703 === TRUE ) { $_705 = TRUE; break; }
$result = $res_636; $result = $res_674;
$this->pos = $pos_636; $this->pos = $pos_674;
$_667 = FALSE; break; $_705 = FALSE; break;
} }
while(0); while(0);
if( $_667 === TRUE ) { $_669 = TRUE; break; } if( $_705 === TRUE ) { $_707 = TRUE; break; }
$result = $res_634; $result = $res_672;
$this->pos = $pos_634; $this->pos = $pos_672;
$_669 = FALSE; break; $_707 = FALSE; break;
} }
while(0); while(0);
if( $_669 === TRUE ) { $_671 = TRUE; break; } if( $_707 === TRUE ) { $_709 = TRUE; break; }
$result = $res_632; $result = $res_670;
$this->pos = $pos_632; $this->pos = $pos_670;
$_671 = FALSE; break; $_709 = FALSE; break;
} }
while(0); while(0);
if( $_671 === TRUE ) { $_673 = TRUE; break; } if( $_709 === TRUE ) { $_711 = TRUE; break; }
$result = $res_630; $result = $res_668;
$this->pos = $pos_630; $this->pos = $pos_668;
$_673 = FALSE; break; $_711 = FALSE; break;
} }
while(0); while(0);
if( $_673 === TRUE ) { $_675 = TRUE; break; } if( $_711 === TRUE ) { $_713 = TRUE; break; }
$result = $res_628; $result = $res_666;
$this->pos = $pos_628; $this->pos = $pos_666;
$_675 = FALSE; break; $_713 = FALSE; break;
} }
while(0); while(0);
if( $_675 === FALSE) { $_677 = FALSE; break; } if( $_713 === FALSE) { $_715 = FALSE; break; }
$_677 = TRUE; break; $_715 = TRUE; break;
} }
while(0); while(0);
if( $_677 === FALSE) { if( $_715 === FALSE) {
$result = $res_678; $result = $res_716;
$this->pos = $pos_678; $this->pos = $pos_716;
unset( $res_678 ); unset( $res_716 );
unset( $pos_678 ); unset( $pos_716 );
break; break;
} }
$count += 1; $count += 1;
@ -3891,189 +4152,189 @@ class SSTemplateParser extends Parser {
$matchrule = "Text"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Text"; $result = $this->construct($matchrule, $matchrule, null);
$count = 0; $count = 0;
while (true) { while (true) {
$res_717 = $result; $res_755 = $result;
$pos_717 = $this->pos; $pos_755 = $this->pos;
$_716 = NULL; $_754 = NULL;
do { do {
$_714 = NULL; $_752 = NULL;
do { do {
$res_679 = $result; $res_717 = $result;
$pos_679 = $this->pos; $pos_717 = $this->pos;
if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) { if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_714 = TRUE; break; $_752 = TRUE; break;
} }
$result = $res_679; $result = $res_717;
$this->pos = $pos_679; $this->pos = $pos_717;
$_712 = NULL; $_750 = NULL;
do { do {
$res_681 = $result; $res_719 = $result;
$pos_681 = $this->pos; $pos_719 = $this->pos;
if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) { if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_712 = TRUE; break; $_750 = TRUE; break;
} }
$result = $res_681; $result = $res_719;
$this->pos = $pos_681; $this->pos = $pos_719;
$_710 = NULL; $_748 = NULL;
do { do {
$res_683 = $result; $res_721 = $result;
$pos_683 = $this->pos; $pos_721 = $this->pos;
$_686 = NULL; $_724 = NULL;
do { do {
if (substr($this->string,$this->pos,1) == '<') { if (substr($this->string,$this->pos,1) == '<') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '<'; $result["text"] .= '<';
} }
else { $_686 = FALSE; break; } else { $_724 = FALSE; break; }
$res_685 = $result; $res_723 = $result;
$pos_685 = $this->pos; $pos_723 = $this->pos;
if (substr($this->string,$this->pos,1) == '%') { if (substr($this->string,$this->pos,1) == '%') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '%'; $result["text"] .= '%';
$result = $res_685; $result = $res_723;
$this->pos = $pos_685; $this->pos = $pos_723;
$_686 = FALSE; break; $_724 = FALSE; break;
} }
else { else {
$result = $res_685; $result = $res_723;
$this->pos = $pos_685; $this->pos = $pos_723;
} }
$_686 = TRUE; break; $_724 = TRUE; break;
} }
while(0); while(0);
if( $_686 === TRUE ) { $_710 = TRUE; break; } if( $_724 === TRUE ) { $_748 = TRUE; break; }
$result = $res_683; $result = $res_721;
$this->pos = $pos_683; $this->pos = $pos_721;
$_708 = NULL; $_746 = NULL;
do { do {
$res_688 = $result; $res_726 = $result;
$pos_688 = $this->pos; $pos_726 = $this->pos;
$_693 = NULL; $_731 = NULL;
do { do {
if (substr($this->string,$this->pos,1) == '$') { if (substr($this->string,$this->pos,1) == '$') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '$'; $result["text"] .= '$';
} }
else { $_693 = FALSE; break; } else { $_731 = FALSE; break; }
$res_692 = $result; $res_730 = $result;
$pos_692 = $this->pos; $pos_730 = $this->pos;
$_691 = NULL; $_729 = NULL;
do { do {
if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_691 = FALSE; break; } else { $_729 = FALSE; break; }
$_691 = TRUE; break; $_729 = TRUE; break;
} }
while(0); while(0);
if( $_691 === TRUE ) { if( $_729 === TRUE ) {
$result = $res_692; $result = $res_730;
$this->pos = $pos_692; $this->pos = $pos_730;
$_693 = FALSE; break; $_731 = FALSE; break;
} }
if( $_691 === FALSE) { if( $_729 === FALSE) {
$result = $res_692; $result = $res_730;
$this->pos = $pos_692; $this->pos = $pos_730;
} }
$_693 = TRUE; break; $_731 = TRUE; break;
} }
while(0); while(0);
if( $_693 === TRUE ) { $_708 = TRUE; break; } if( $_731 === TRUE ) { $_746 = TRUE; break; }
$result = $res_688; $result = $res_726;
$this->pos = $pos_688; $this->pos = $pos_726;
$_706 = NULL; $_744 = NULL;
do { do {
$res_695 = $result; $res_733 = $result;
$pos_695 = $this->pos; $pos_733 = $this->pos;
$_698 = NULL; $_736 = NULL;
do { do {
if (substr($this->string,$this->pos,1) == '{') { if (substr($this->string,$this->pos,1) == '{') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '{'; $result["text"] .= '{';
} }
else { $_698 = FALSE; break; } else { $_736 = FALSE; break; }
$res_697 = $result; $res_735 = $result;
$pos_697 = $this->pos; $pos_735 = $this->pos;
if (substr($this->string,$this->pos,1) == '$') { if (substr($this->string,$this->pos,1) == '$') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '$'; $result["text"] .= '$';
$result = $res_697; $result = $res_735;
$this->pos = $pos_697; $this->pos = $pos_735;
$_698 = FALSE; break; $_736 = FALSE; break;
} }
else { else {
$result = $res_697; $result = $res_735;
$this->pos = $pos_697; $this->pos = $pos_735;
} }
$_698 = TRUE; break; $_736 = TRUE; break;
} }
while(0); while(0);
if( $_698 === TRUE ) { $_706 = TRUE; break; } if( $_736 === TRUE ) { $_744 = TRUE; break; }
$result = $res_695; $result = $res_733;
$this->pos = $pos_695; $this->pos = $pos_733;
$_704 = NULL; $_742 = NULL;
do { do {
if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_704 = FALSE; break; } else { $_742 = FALSE; break; }
$res_703 = $result; $res_741 = $result;
$pos_703 = $this->pos; $pos_741 = $this->pos;
$_702 = NULL; $_740 = NULL;
do { do {
if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_702 = FALSE; break; } else { $_740 = FALSE; break; }
$_702 = TRUE; break; $_740 = TRUE; break;
} }
while(0); while(0);
if( $_702 === TRUE ) { if( $_740 === TRUE ) {
$result = $res_703; $result = $res_741;
$this->pos = $pos_703; $this->pos = $pos_741;
$_704 = FALSE; break; $_742 = FALSE; break;
} }
if( $_702 === FALSE) { if( $_740 === FALSE) {
$result = $res_703; $result = $res_741;
$this->pos = $pos_703; $this->pos = $pos_741;
} }
$_704 = TRUE; break; $_742 = TRUE; break;
} }
while(0); while(0);
if( $_704 === TRUE ) { $_706 = TRUE; break; } if( $_742 === TRUE ) { $_744 = TRUE; break; }
$result = $res_695; $result = $res_733;
$this->pos = $pos_695; $this->pos = $pos_733;
$_706 = FALSE; break; $_744 = FALSE; break;
} }
while(0); while(0);
if( $_706 === TRUE ) { $_708 = TRUE; break; } if( $_744 === TRUE ) { $_746 = TRUE; break; }
$result = $res_688; $result = $res_726;
$this->pos = $pos_688; $this->pos = $pos_726;
$_708 = FALSE; break; $_746 = FALSE; break;
} }
while(0); while(0);
if( $_708 === TRUE ) { $_710 = TRUE; break; } if( $_746 === TRUE ) { $_748 = TRUE; break; }
$result = $res_683; $result = $res_721;
$this->pos = $pos_683; $this->pos = $pos_721;
$_710 = FALSE; break; $_748 = FALSE; break;
} }
while(0); while(0);
if( $_710 === TRUE ) { $_712 = TRUE; break; } if( $_748 === TRUE ) { $_750 = TRUE; break; }
$result = $res_681; $result = $res_719;
$this->pos = $pos_681; $this->pos = $pos_719;
$_712 = FALSE; break; $_750 = FALSE; break;
} }
while(0); while(0);
if( $_712 === TRUE ) { $_714 = TRUE; break; } if( $_750 === TRUE ) { $_752 = TRUE; break; }
$result = $res_679; $result = $res_717;
$this->pos = $pos_679; $this->pos = $pos_717;
$_714 = FALSE; break; $_752 = FALSE; break;
} }
while(0); while(0);
if( $_714 === FALSE) { $_716 = FALSE; break; } if( $_752 === FALSE) { $_754 = FALSE; break; }
$_716 = TRUE; break; $_754 = TRUE; break;
} }
while(0); while(0);
if( $_716 === FALSE) { if( $_754 === FALSE) {
$result = $res_717; $result = $res_755;
$this->pos = $pos_717; $this->pos = $pos_755;
unset( $res_717 ); unset( $res_755 );
unset( $pos_717 ); unset( $pos_755 );
break; break;
} }
$count += 1; $count += 1;

View File

@ -7,7 +7,7 @@ This is the uncompiled parser for the SilverStripe template language, PHP with s
It gets run through the php-peg parser compiler to have those comments turned into code that match parts of the template language, It gets run through the php-peg parser compiler to have those comments turned into code that match parts of the template language,
producing the executable version SSTemplateParser.php producing the executable version SSTemplateParser.php
To recompile after changing this file, run this from the 'framework/core' directory via command line: To recompile after changing this file, run this from the 'framework/view' directory via command line (in most cases this is: sapphire/view):
php ../thirdparty/php-peg/cli.php SSTemplateParser.php.inc > SSTemplateParser.php php ../thirdparty/php-peg/cli.php SSTemplateParser.php.inc > SSTemplateParser.php
@ -76,6 +76,9 @@ forbidden)
Closed Block: An SS template block that wraps content, and requires a counterpart <% end_blockname %> tag Closed Block: An SS template block that wraps content, and requires a counterpart <% end_blockname %> tag
Angle Bracket: angle brackets "<" and ">" are used to eat whitespace between template elements
N: eats white space including newlines (using in legacy _t support)
*/ */
class SSTemplateParser extends Parser { class SSTemplateParser extends Parser {
@ -97,9 +100,10 @@ class SSTemplateParser extends Parser {
/*!* SSTemplateParser /*!* SSTemplateParser
# Template is any structurally-complete portion of template (a full nested level in other words). It's the primary matcher, # Template is any structurally-complete portion of template (a full nested level in other words). It's the primary matcher,
# and is used by all enclosing blocks, as well as a base for the top level # and is used by all enclosing blocks, as well as a base for the top level.
# Any new template elements need to be included in this list, if they are to work.
Template: (Comment | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+
*/ */
function Template_STR(&$res, $sub) { function Template_STR(&$res, $sub) {
$res['php'] .= $sub['php'] . PHP_EOL ; $res['php'] .= $sub['php'] . PHP_EOL ;
@ -177,40 +181,55 @@ class SSTemplateParser extends Parser {
/*!* /*!*
# Translatable call
Translate: "<%t" Entity (Default)? (!("is" "=") "is" Context)? (InjectionVariables)* "%>" # New Translatable Syntax
InjectionVariables: InjectionName:Word "=" Argument # <%t Entity DefaultString is Context name1=string name2=$functionCall
# (This is a new way to call translatable strings. The parser transforms this into a call to the _t() method)
Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? < (InjectionVariables)? > "%>"
InjectionVariables: (< InjectionName:Word "=" Argument)+
Entity: / [A-Za-z_] [\w\.]* /
*/ */
function Translate__construct(&$res) { function Translate__construct(&$res) {
$res['php'] = "_t("; $res['php'] = '$val .= _t(';
} }
function Translate_Entity(&$res, $sub) { function Translate_Entity(&$res, $sub) {
$res['php'] .= $sub['php']; $res['php'] .= "'$sub[text]'";
Debug::show($sub);
} }
function Translate_Default(&$res, $sub) { function Translate_Default(&$res, $sub) {
Debug::show($sub); $res['php'] .= ",$sub[text]";
} }
function Translate_Context(&$res, $sub) { function Translate_Context(&$res, $sub) {
Debug::show($sub); $res['php'] .= ",$sub[text]";
}
function Translate_InjectionVariables(&$res, $sub) {
$res['php'] .= ",$sub[php]";
} }
function Translate__finalise(&$res) { function Translate__finalise(&$res) {
$res['php'] .= ')'; $res['php'] .= ');';
} }
function InjectionVariables__construct(&$res) { function InjectionVariables__construct(&$res) {
$res['php'] = "array(";
} }
function InjectionVariables_InjectionName(&$res, $sub) { function InjectionVariables_InjectionName(&$res, $sub) {
$res['php'] .= "'$sub[text]'=>";
} }
function InjectionVariables_Argument(&$res, $sub) { function InjectionVariables_Argument(&$res, $sub) {
$res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']) . ',';
}
function InjectionVariables__finalise(&$res) {
if (substr($res['php'], -1) == ',') $res['php'] = substr($res['php'], 0, -1); //remove last comma in the array
$res['php'] .= ')';
} }
@ -303,7 +322,7 @@ class SSTemplateParser extends Parser {
function Argument_FreeString(&$res, $sub) { function Argument_FreeString(&$res, $sub) {
$res['ArgumentMode'] = 'string'; $res['ArgumentMode'] = 'string';
$res['php'] = "'" . str_replace("'", "\\'", rtrim($sub['text'])) . "'"; $res['php'] = "'" . str_replace("'", "\\'", $sub['text']) . "'";
} }
/*!* /*!*
@ -546,8 +565,10 @@ class SSTemplateParser extends Parser {
# This is the core used by both syntaxes, without the block start & end tags # This is the core used by both syntaxes, without the block start & end tags
OldTPart: "_t" < "(" < QuotedString (< "," < CallArguments)? > ")" OldTPart: "_t" N "(" N QuotedString (N "," N CallArguments)? N ")" N (";")?
# whitespace with a newline
N: / [\s\n]* /
*/ */
function OldTPart__construct(&$res) { function OldTPart__construct(&$res) {
$res['php'] = "_t("; $res['php'] = "_t(";