API-CHANGE: new translatable syntax _t function

This commit is contained in:
Julian Seidenberg 2012-04-16 17:37:57 +12:00
parent c314d0b659
commit 65e3651ff4
3 changed files with 1720 additions and 1627 deletions

View File

@ -1456,25 +1456,39 @@ class i18n extends Object implements TemplateGlobalProvider {
* the class name where this string is used and Entity identifies the string inside the namespace. * the class name where this string is used and Entity identifies the string inside the namespace.
* @param string $string The original string itself. In a usual call this is a mandatory parameter, but if you are reusing a string which * @param string $string The original string itself. In a usual call this is a mandatory parameter, but if you are reusing a string which
* has already been "declared" (using another call to this function, with the same class and entity), you can omit it. * has already been "declared" (using another call to this function, with the same class and entity), you can omit it.
* @param string $context If the string can be difficult to translate by any reason, you can help translators with some more info using this param * @param string $context (optional) If the string can be difficult to translate by any reason, you can help translators with some more info using this param
* @param string injectionArray (optional) array of key value pairs that are used to replace corresponding expressions in {curly brackets} in the $string
* @return string The translated string, according to the currently set locale {@link i18n::set_locale()} * @return string The translated string, according to the currently set locale {@link i18n::set_locale()}
*/ */
static function _t($entity, $string = "", $context = "") { static function _t($entity, $string = "", $context = "", $injection = "") {
if(is_numeric($context) && in_array($context, array(PR_LOW, PR_MEDIUM, PR_HIGH))) { if(is_numeric($context) && in_array($context, array(PR_LOW, PR_MEDIUM, PR_HIGH))) {
$context = func_get_arg(4);
Deprecation::notice( Deprecation::notice(
'3.0', '3.0',
'The $priority argument to _t() is deprecated, please use module inclusion priorities instead' 'The $priority argument to _t() is deprecated, please use module inclusion priorities instead'
); );
} }
//fetch the injection array out of the parameters (if it is present)
$argList = func_get_args();
$argNum = func_num_args();
//_t($entity, $string = "", $context (optional), $injectionArray (optional))
$injectionArray = null;
for($i = 0; $i < $argNum; $i++) {
if (is_array($argList[$i])) { //we have reached the injectionArray
$injectionArray = $argList[$i]; //any array in the args will be the injection array
}
}
// get current locale (either default or user preference) // get current locale (either default or user preference)
$locale = i18n::get_locale(); $locale = i18n::get_locale();
$lang = i18n::get_lang_from_locale($locale); $lang = i18n::get_lang_from_locale($locale);
// Only call getter if static isn't already defined (for performance reasons) // Only call getter if static isn't already defined (for performance reasons)
$translatorsByPrio = self::$translators; $translatorsByPrio = self::$translators;
if(!$translatorsByPrio) $translatorsByPrio = self::get_translators(); if(!$translatorsByPrio) $translatorsByPrio = self::get_translators();
$returnValue = $string; // Fall back to default string argument
foreach($translatorsByPrio as $priority => $translators) { foreach($translatorsByPrio as $priority => $translators) {
foreach($translators as $name => $translator) { foreach($translators as $name => $translator) {
$adapter = $translator->getAdapter(); $adapter = $translator->getAdapter();
@ -1489,14 +1503,21 @@ class i18n extends Object implements TemplateGlobalProvider {
$translation = $adapter->translate($entity, $locale); $translation = $adapter->translate($entity, $locale);
// Return translation only if we found a match thats not the entity itself (Zend fallback) // Return translation only if we found a match thats not the entity itself (Zend fallback)
if($translation && $translation != $entity) return $translation; if($translation && $translation != $entity) $returnValue = $translation;
} }
} }
// Fall back to default string argument // inject the variables from injectionArray (if present)
return $string; if ($injectionArray && count($injectionArray) > 0) {
foreach($injectionArray as $variable => $injection) {
$returnValue = str_replace('{'.$variable.'}', $injection, $returnValue);
}
}
return $returnValue;
} }
/** /**
* @return array Array of priority keys to instances of Zend_Translate, mapped by name. * @return array Array of priority keys to instances of Zend_Translate, mapped by name.
*/ */

View File

@ -79,17 +79,17 @@ class SSTemplateParser extends Parser {
return $res; return $res;
} }
/* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | 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);
$count = 0; $count = 0;
while (true) { while (true) {
$res_46 = $result; $res_50 = $result;
$pos_46 = $this->pos; $pos_50 = $this->pos;
$_45 = NULL; $_49 = NULL;
do { do {
$_43 = NULL; $_47 = NULL;
do { do {
$res_0 = $result; $res_0 = $result;
$pos_0 = $this->pos; $pos_0 = $this->pos;
@ -97,11 +97,11 @@ class SSTemplateParser extends Parser {
$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 );
$_43 = TRUE; break; $_47 = TRUE; break;
} }
$result = $res_0; $result = $res_0;
$this->pos = $pos_0; $this->pos = $pos_0;
$_41 = NULL; $_45 = NULL;
do { do {
$res_2 = $result; $res_2 = $result;
$pos_2 = $this->pos; $pos_2 = $this->pos;
@ -109,11 +109,11 @@ class SSTemplateParser extends Parser {
$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 );
$_41 = TRUE; break; $_45 = TRUE; break;
} }
$result = $res_2; $result = $res_2;
$this->pos = $pos_2; $this->pos = $pos_2;
$_39 = NULL; $_43 = NULL;
do { do {
$res_4 = $result; $res_4 = $result;
$pos_4 = $this->pos; $pos_4 = $this->pos;
@ -121,11 +121,11 @@ class SSTemplateParser extends Parser {
$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 );
$_39 = TRUE; break; $_43 = TRUE; break;
} }
$result = $res_4; $result = $res_4;
$this->pos = $pos_4; $this->pos = $pos_4;
$_37 = NULL; $_41 = NULL;
do { do {
$res_6 = $result; $res_6 = $result;
$pos_6 = $this->pos; $pos_6 = $this->pos;
@ -133,11 +133,11 @@ class SSTemplateParser extends Parser {
$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 );
$_37 = TRUE; break; $_41 = TRUE; break;
} }
$result = $res_6; $result = $res_6;
$this->pos = $pos_6; $this->pos = $pos_6;
$_35 = NULL; $_39 = NULL;
do { do {
$res_8 = $result; $res_8 = $result;
$pos_8 = $this->pos; $pos_8 = $this->pos;
@ -145,11 +145,11 @@ class SSTemplateParser extends Parser {
$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 );
$_35 = TRUE; break; $_39 = TRUE; break;
} }
$result = $res_8; $result = $res_8;
$this->pos = $pos_8; $this->pos = $pos_8;
$_33 = NULL; $_37 = NULL;
do { do {
$res_10 = $result; $res_10 = $result;
$pos_10 = $this->pos; $pos_10 = $this->pos;
@ -157,11 +157,11 @@ class SSTemplateParser extends Parser {
$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 );
$_33 = TRUE; break; $_37 = TRUE; break;
} }
$result = $res_10; $result = $res_10;
$this->pos = $pos_10; $this->pos = $pos_10;
$_31 = NULL; $_35 = NULL;
do { do {
$res_12 = $result; $res_12 = $result;
$pos_12 = $this->pos; $pos_12 = $this->pos;
@ -169,138 +169,156 @@ class SSTemplateParser extends Parser {
$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 );
$_31 = TRUE; break; $_35 = TRUE; break;
} }
$result = $res_12; $result = $res_12;
$this->pos = $pos_12; $this->pos = $pos_12;
$_29 = NULL; $_33 = NULL;
do { do {
$res_14 = $result; $res_14 = $result;
$pos_14 = $this->pos; $pos_14 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Include'; $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 );
$_29 = TRUE; break; $_33 = TRUE; break;
} }
$result = $res_14; $result = $res_14;
$this->pos = $pos_14; $this->pos = $pos_14;
$_27 = NULL; $_31 = NULL;
do { do {
$res_16 = $result; $res_16 = $result;
$pos_16 = $this->pos; $pos_16 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $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 );
$_27 = TRUE; break; $_31 = TRUE; break;
} }
$result = $res_16; $result = $res_16;
$this->pos = $pos_16; $this->pos = $pos_16;
$_25 = NULL; $_29 = NULL;
do { do {
$res_18 = $result; $res_18 = $result;
$pos_18 = $this->pos; $pos_18 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $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 );
$_25 = TRUE; break; $_29 = TRUE; break;
} }
$result = $res_18; $result = $res_18;
$this->pos = $pos_18; $this->pos = $pos_18;
$_23 = NULL; $_27 = NULL;
do { do {
$res_20 = $result; $res_20 = $result;
$pos_20 = $this->pos; $pos_20 = $this->pos;
$matcher = 'match_'.'Injection'; $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 );
$_23 = TRUE; break; $_27 = TRUE; break;
} }
$result = $res_20; $result = $res_20;
$this->pos = $pos_20; $this->pos = $pos_20;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $_25 = NULL;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); do {
if ($subres !== FALSE) { $res_22 = $result;
$this->store( $result, $subres ); $pos_22 = $this->pos;
$_23 = TRUE; break; $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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_25 = TRUE; break;
}
$result = $res_22;
$this->pos = $pos_22;
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_25 = TRUE; break;
}
$result = $res_22;
$this->pos = $pos_22;
$_25 = FALSE; break;
} }
while(0);
if( $_25 === TRUE ) { $_27 = TRUE; break; }
$result = $res_20; $result = $res_20;
$this->pos = $pos_20; $this->pos = $pos_20;
$_23 = FALSE; break; $_27 = FALSE; break;
} }
while(0); while(0);
if( $_23 === TRUE ) { $_25 = TRUE; break; } if( $_27 === TRUE ) { $_29 = TRUE; break; }
$result = $res_18; $result = $res_18;
$this->pos = $pos_18; $this->pos = $pos_18;
$_25 = FALSE; break; $_29 = FALSE; break;
} }
while(0); while(0);
if( $_25 === TRUE ) { $_27 = TRUE; break; } if( $_29 === TRUE ) { $_31 = TRUE; break; }
$result = $res_16; $result = $res_16;
$this->pos = $pos_16; $this->pos = $pos_16;
$_27 = FALSE; break; $_31 = FALSE; break;
} }
while(0); while(0);
if( $_27 === TRUE ) { $_29 = TRUE; break; } if( $_31 === TRUE ) { $_33 = TRUE; break; }
$result = $res_14; $result = $res_14;
$this->pos = $pos_14; $this->pos = $pos_14;
$_29 = FALSE; break; $_33 = FALSE; break;
} }
while(0); while(0);
if( $_29 === TRUE ) { $_31 = TRUE; break; } if( $_33 === TRUE ) { $_35 = TRUE; break; }
$result = $res_12; $result = $res_12;
$this->pos = $pos_12; $this->pos = $pos_12;
$_31 = FALSE; break; $_35 = FALSE; break;
} }
while(0); while(0);
if( $_31 === TRUE ) { $_33 = TRUE; break; } if( $_35 === TRUE ) { $_37 = TRUE; break; }
$result = $res_10; $result = $res_10;
$this->pos = $pos_10; $this->pos = $pos_10;
$_33 = FALSE; break; $_37 = FALSE; break;
} }
while(0); while(0);
if( $_33 === TRUE ) { $_35 = TRUE; break; } if( $_37 === TRUE ) { $_39 = TRUE; break; }
$result = $res_8; $result = $res_8;
$this->pos = $pos_8; $this->pos = $pos_8;
$_35 = FALSE; break; $_39 = FALSE; break;
} }
while(0); while(0);
if( $_35 === TRUE ) { $_37 = TRUE; break; } if( $_39 === TRUE ) { $_41 = TRUE; break; }
$result = $res_6; $result = $res_6;
$this->pos = $pos_6; $this->pos = $pos_6;
$_37 = FALSE; break; $_41 = FALSE; break;
} }
while(0); while(0);
if( $_37 === TRUE ) { $_39 = TRUE; break; } if( $_41 === TRUE ) { $_43 = TRUE; break; }
$result = $res_4; $result = $res_4;
$this->pos = $pos_4; $this->pos = $pos_4;
$_39 = FALSE; break; $_43 = FALSE; break;
} }
while(0); while(0);
if( $_39 === TRUE ) { $_41 = TRUE; break; } if( $_43 === TRUE ) { $_45 = TRUE; break; }
$result = $res_2; $result = $res_2;
$this->pos = $pos_2; $this->pos = $pos_2;
$_41 = FALSE; break; $_45 = FALSE; break;
} }
while(0); while(0);
if( $_41 === TRUE ) { $_43 = TRUE; break; } if( $_45 === TRUE ) { $_47 = TRUE; break; }
$result = $res_0; $result = $res_0;
$this->pos = $pos_0; $this->pos = $pos_0;
$_43 = FALSE; break; $_47 = FALSE; break;
} }
while(0); while(0);
if( $_43 === FALSE) { $_45 = FALSE; break; } if( $_47 === FALSE) { $_49 = FALSE; break; }
$_45 = TRUE; break; $_49 = TRUE; break;
} }
while(0); while(0);
if( $_45 === FALSE) { if( $_49 === FALSE) {
$result = $res_46; $result = $res_50;
$this->pos = $pos_46; $this->pos = $pos_50;
unset( $res_46 ); unset( $res_50 );
unset( $pos_46 ); unset( $pos_50 );
break; break;
} }
$count += 1; $count += 1;
@ -355,48 +373,48 @@ class SSTemplateParser extends Parser {
protected $match_CallArguments_typestack = array('CallArguments'); protected $match_CallArguments_typestack = array('CallArguments');
function match_CallArguments ($stack = array()) { function match_CallArguments ($stack = array()) {
$matchrule = "CallArguments"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "CallArguments"; $result = $this->construct($matchrule, $matchrule, null);
$_57 = NULL; $_61 = 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 { $_57 = FALSE; break; } else { $_61 = FALSE; break; }
while (true) { while (true) {
$res_56 = $result; $res_60 = $result;
$pos_56 = $this->pos; $pos_60 = $this->pos;
$_55 = NULL; $_59 = 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 { $_55 = FALSE; break; } else { $_59 = 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 { $_55 = FALSE; break; } else { $_59 = FALSE; break; }
$_55 = TRUE; break; $_59 = TRUE; break;
} }
while(0); while(0);
if( $_55 === FALSE) { if( $_59 === FALSE) {
$result = $res_56; $result = $res_60;
$this->pos = $pos_56; $this->pos = $pos_60;
unset( $res_56 ); unset( $res_60 );
unset( $pos_56 ); unset( $pos_60 );
break; break;
} }
} }
$_57 = TRUE; break; $_61 = TRUE; break;
} }
while(0); while(0);
if( $_57 === TRUE ) { return $this->finalise($result); } if( $_61 === TRUE ) { return $this->finalise($result); }
if( $_57 === FALSE) { return FALSE; } if( $_61 === FALSE) { return FALSE; }
} }
@ -416,57 +434,57 @@ class SSTemplateParser extends Parser {
protected $match_Call_typestack = array('Call'); protected $match_Call_typestack = array('Call');
function match_Call ($stack = array()) { function match_Call ($stack = array()) {
$matchrule = "Call"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Call"; $result = $this->construct($matchrule, $matchrule, null);
$_67 = NULL; $_71 = 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 { $_67 = FALSE; break; } else { $_71 = FALSE; break; }
$res_66 = $result; $res_70 = $result;
$pos_66 = $this->pos; $pos_70 = $this->pos;
$_65 = NULL; $_69 = 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 { $_65 = FALSE; break; } else { $_69 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_62 = $result; $res_66 = $result;
$pos_62 = $this->pos; $pos_66 = $this->pos;
$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 { else {
$result = $res_62; $result = $res_66;
$this->pos = $pos_62; $this->pos = $pos_66;
unset( $res_62 ); unset( $res_66 );
unset( $pos_62 ); unset( $pos_66 );
} }
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 { $_65 = FALSE; break; } else { $_69 = FALSE; break; }
$_65 = TRUE; break; $_69 = TRUE; break;
} }
while(0); while(0);
if( $_65 === FALSE) { if( $_69 === FALSE) {
$result = $res_66; $result = $res_70;
$this->pos = $pos_66; $this->pos = $pos_70;
unset( $res_66 ); unset( $res_70 );
unset( $pos_66 ); unset( $pos_70 );
} }
$_67 = TRUE; break; $_71 = TRUE; break;
} }
while(0); while(0);
if( $_67 === TRUE ) { return $this->finalise($result); } if( $_71 === TRUE ) { return $this->finalise($result); }
if( $_67 === FALSE) { return FALSE; } if( $_71 === FALSE) { return FALSE; }
} }
@ -474,32 +492,32 @@ class SSTemplateParser extends Parser {
protected $match_LookupStep_typestack = array('LookupStep'); protected $match_LookupStep_typestack = array('LookupStep');
function match_LookupStep ($stack = array()) { function match_LookupStep ($stack = array()) {
$matchrule = "LookupStep"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "LookupStep"; $result = $this->construct($matchrule, $matchrule, null);
$_71 = NULL; $_75 = NULL;
do { do {
$matcher = 'match_'.'Call'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Call'; $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, "Call" ); $this->store( $result, $subres, "Call" );
} }
else { $_71 = FALSE; break; } else { $_75 = FALSE; break; }
$res_70 = $result; $res_74 = $result;
$pos_70 = $this->pos; $pos_74 = $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_70; $result = $res_74;
$this->pos = $pos_70; $this->pos = $pos_74;
} }
else { else {
$result = $res_70; $result = $res_74;
$this->pos = $pos_70; $this->pos = $pos_74;
$_71 = FALSE; break; $_75 = FALSE; break;
} }
$_71 = TRUE; break; $_75 = TRUE; break;
} }
while(0); while(0);
if( $_71 === TRUE ) { return $this->finalise($result); } if( $_75 === TRUE ) { return $this->finalise($result); }
if( $_71 === FALSE) { return FALSE; } if( $_75 === FALSE) { return FALSE; }
} }
@ -521,40 +539,40 @@ class SSTemplateParser extends Parser {
protected $match_Lookup_typestack = array('Lookup'); protected $match_Lookup_typestack = array('Lookup');
function match_Lookup ($stack = array()) { function match_Lookup ($stack = array()) {
$matchrule = "Lookup"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Lookup"; $result = $this->construct($matchrule, $matchrule, null);
$_85 = NULL; $_89 = NULL;
do { do {
$res_74 = $result; $res_78 = $result;
$pos_74 = $this->pos; $pos_78 = $this->pos;
$_82 = NULL; $_86 = NULL;
do { do {
$matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'LookupStep'; $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 { $_82 = FALSE; break; } else { $_86 = FALSE; break; }
while (true) { while (true) {
$res_79 = $result; $res_83 = $result;
$pos_79 = $this->pos; $pos_83 = $this->pos;
$_78 = NULL; $_82 = 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 { $_78 = FALSE; break; } else { $_82 = FALSE; break; }
$matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'LookupStep'; $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 { $_78 = FALSE; break; } else { $_82 = FALSE; break; }
$_78 = TRUE; break; $_82 = TRUE; break;
} }
while(0); while(0);
if( $_78 === FALSE) { if( $_82 === FALSE) {
$result = $res_79; $result = $res_83;
$this->pos = $pos_79; $this->pos = $pos_83;
unset( $res_79 ); unset( $res_83 );
unset( $pos_79 ); unset( $pos_83 );
break; break;
} }
} }
@ -562,30 +580,30 @@ class SSTemplateParser extends Parser {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '.'; $result["text"] .= '.';
} }
else { $_82 = FALSE; break; } else { $_86 = FALSE; break; }
$matcher = 'match_'.'LastLookupStep'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'LastLookupStep'; $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 { $_82 = FALSE; break; } else { $_86 = FALSE; break; }
$_82 = TRUE; break; $_86 = TRUE; break;
} }
while(0); while(0);
if( $_82 === TRUE ) { $_85 = TRUE; break; } if( $_86 === TRUE ) { $_89 = TRUE; break; }
$result = $res_74; $result = $res_78;
$this->pos = $pos_74; $this->pos = $pos_78;
$matcher = 'match_'.'LastLookupStep'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'LastLookupStep'; $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 );
$_85 = TRUE; break; $_89 = TRUE; break;
} }
$result = $res_74; $result = $res_78;
$this->pos = $pos_74; $this->pos = $pos_78;
$_85 = FALSE; break; $_89 = FALSE; break;
} }
while(0); while(0);
if( $_85 === TRUE ) { return $this->finalise($result); } if( $_89 === TRUE ) { return $this->finalise($result); }
if( $_85 === FALSE) { return FALSE; } if( $_89 === FALSE) { return FALSE; }
} }
@ -627,90 +645,72 @@ class SSTemplateParser extends Parser {
protected $match_Translate_typestack = array('Translate'); protected $match_Translate_typestack = array('Translate');
function match_Translate ($stack = array()) { function match_Translate ($stack = array()) {
$matchrule = "Translate"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "Translate"; $result = $this->construct($matchrule, $matchrule, null);
$_111 = NULL; $_115 = NULL;
do { do {
if (( $subres = $this->literal( '<%t' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%t' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_111 = FALSE; break; } else { $_115 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$matcher = 'match_'.'Entity'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_111 = FALSE; break; } else { $_115 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_93 = $result; $res_97 = $result;
$pos_93 = $this->pos; $pos_97 = $this->pos;
$_92 = NULL; $_96 = NULL;
do { do {
$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, "Default" ); $this->store( $result, $subres, "Default" );
} }
else { $_92 = FALSE; break; } else { $_96 = FALSE; break; }
$_92 = TRUE; break; $_96 = TRUE; break;
} }
while(0); while(0);
if( $_92 === FALSE) { if( $_96 === FALSE) {
$result = $res_93; $result = $res_97;
$this->pos = $pos_93; $this->pos = $pos_97;
unset( $res_93 ); unset( $res_97 );
unset( $pos_93 ); unset( $pos_97 );
}
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; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_108 = $result; $res_108 = $result;
$pos_108 = $this->pos; $pos_108 = $this->pos;
$_107 = NULL; $_107 = NULL;
do { do {
$matcher = 'match_'.'InjectionVariables'; $key = $matcher; $pos = $this->pos; $res_102 = $result;
$pos_102 = $this->pos;
$_101 = NULL;
do {
if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_101 = FALSE; break; }
if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1;
$result["text"] .= '=';
}
else { $_101 = FALSE; break; }
$_101 = TRUE; break;
}
while(0);
if( $_101 === TRUE ) {
$result = $res_102;
$this->pos = $pos_102;
$_107 = FALSE; break;
}
if( $_101 === FALSE) {
$result = $res_102;
$this->pos = $pos_102;
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_107 = 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))) ) ); $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, "Context" );
}
else { $_107 = FALSE; break; } else { $_107 = FALSE; break; }
$_107 = TRUE; break; $_107 = TRUE; break;
} }
@ -722,13 +722,31 @@ class SSTemplateParser extends Parser {
unset( $pos_108 ); unset( $pos_108 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_112 = $result;
$pos_112 = $this->pos;
$_111 = 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 { $_111 = FALSE; break; }
$_111 = TRUE; break;
}
while(0);
if( $_111 === FALSE) {
$result = $res_112;
$this->pos = $pos_112;
unset( $res_112 );
unset( $pos_112 );
}
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 { $_111 = FALSE; break; } else { $_115 = FALSE; break; }
$_111 = TRUE; break; $_115 = TRUE; break;
} }
while(0); while(0);
if( $_111 === TRUE ) { return $this->finalise($result); } if( $_115 === TRUE ) { return $this->finalise($result); }
if( $_111 === FALSE) { return FALSE; } if( $_115 === FALSE) { return FALSE; }
} }
@ -738,9 +756,9 @@ class SSTemplateParser extends Parser {
$matchrule = "InjectionVariables"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "InjectionVariables"; $result = $this->construct($matchrule, $matchrule, null);
$count = 0; $count = 0;
while (true) { while (true) {
$res_118 = $result; $res_122 = $result;
$pos_118 = $this->pos; $pos_122 = $this->pos;
$_117 = NULL; $_121 = NULL;
do { do {
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;
@ -748,24 +766,24 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "InjectionName" ); $this->store( $result, $subres, "InjectionName" );
} }
else { $_117 = FALSE; break; } else { $_121 = 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 { $_117 = FALSE; break; } else { $_121 = 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) { $this->store( $result, $subres ); } if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_117 = FALSE; break; } else { $_121 = FALSE; break; }
$_117 = TRUE; break; $_121 = TRUE; break;
} }
while(0); while(0);
if( $_117 === FALSE) { if( $_121 === FALSE) {
$result = $res_118; $result = $res_122;
$this->pos = $pos_118; $this->pos = $pos_122;
unset( $res_118 ); unset( $res_122 );
unset( $pos_118 ); unset( $pos_122 );
break; break;
} }
$count += 1; $count += 1;
@ -835,24 +853,24 @@ class SSTemplateParser extends Parser {
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);
$_122 = NULL; $_126 = 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 { $_122 = FALSE; break; } else { $_126 = 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 { $_122 = FALSE; break; } else { $_126 = FALSE; break; }
$_122 = TRUE; break; $_126 = TRUE; break;
} }
while(0); while(0);
if( $_122 === TRUE ) { return $this->finalise($result); } if( $_126 === TRUE ) { return $this->finalise($result); }
if( $_122 === FALSE) { return FALSE; } if( $_126 === FALSE) { return FALSE; }
} }
@ -860,26 +878,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);
$_127 = NULL; $_131 = NULL;
do { do {
if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_127 = FALSE; break; } else { $_131 = 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 { $_127 = FALSE; break; } else { $_131 = 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 { $_127 = FALSE; break; } else { $_131 = FALSE; break; }
$_127 = TRUE; break; $_131 = TRUE; break;
} }
while(0); while(0);
if( $_127 === TRUE ) { return $this->finalise($result); } if( $_131 === TRUE ) { return $this->finalise($result); }
if( $_127 === FALSE) { return FALSE; } if( $_131 === FALSE) { return FALSE; }
} }
@ -887,31 +905,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);
$_132 = NULL; $_136 = NULL;
do { do {
$res_129 = $result; $res_133 = $result;
$pos_129 = $this->pos; $pos_133 = $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 );
$_132 = TRUE; break; $_136 = TRUE; break;
} }
$result = $res_129; $result = $res_133;
$this->pos = $pos_129; $this->pos = $pos_133;
$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 );
$_132 = TRUE; break; $_136 = TRUE; break;
} }
$result = $res_129; $result = $res_133;
$this->pos = $pos_129; $this->pos = $pos_133;
$_132 = FALSE; break; $_136 = FALSE; break;
} }
while(0); while(0);
if( $_132 === TRUE ) { return $this->finalise($result); } if( $_136 === TRUE ) { return $this->finalise($result); }
if( $_132 === FALSE) { return FALSE; } if( $_136 === FALSE) { return FALSE; }
} }
@ -943,7 +961,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);
$_138 = NULL; $_142 = 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) {
@ -953,7 +971,7 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_138 = FALSE; break; $_142 = 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) {
@ -963,15 +981,15 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_138 = FALSE; break; $_142 = 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 { $_138 = FALSE; break; } else { $_142 = FALSE; break; }
$_138 = TRUE; break; $_142 = TRUE; break;
} }
while(0); while(0);
if( $_138 === TRUE ) { return $this->finalise($result); } if( $_142 === TRUE ) { return $this->finalise($result); }
if( $_138 === FALSE) { return FALSE; } if( $_142 === FALSE) { return FALSE; }
} }
@ -995,45 +1013,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);
$_158 = NULL; $_162 = NULL;
do { do {
$res_141 = $result; $res_145 = $result;
$pos_141 = $this->pos; $pos_145 = $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" );
$_158 = TRUE; break; $_162 = TRUE; break;
} }
$result = $res_141; $result = $res_145;
$this->pos = $pos_141; $this->pos = $pos_145;
$_156 = NULL; $_160 = NULL;
do { do {
$res_143 = $result; $res_147 = $result;
$pos_143 = $this->pos; $pos_147 = $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" );
$_156 = TRUE; break; $_160 = TRUE; break;
} }
$result = $res_143; $result = $res_147;
$this->pos = $pos_143; $this->pos = $pos_147;
$_154 = NULL; $_158 = NULL;
do { do {
$res_145 = $result; $res_149 = $result;
$pos_145 = $this->pos; $pos_149 = $this->pos;
$_151 = NULL; $_155 = 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 { $_151 = FALSE; break; } else { $_155 = FALSE; break; }
$res_150 = $result; $res_154 = $result;
$pos_150 = $this->pos; $pos_154 = $this->pos;
$_149 = NULL; $_153 = 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;
@ -1041,50 +1059,50 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} }
else { $_149 = FALSE; break; } else { $_153 = FALSE; break; }
$_149 = TRUE; break; $_153 = TRUE; break;
} }
while(0); while(0);
if( $_149 === TRUE ) { if( $_153 === TRUE ) {
$result = $res_150; $result = $res_154;
$this->pos = $pos_150; $this->pos = $pos_154;
$_151 = FALSE; break; $_155 = FALSE; break;
} }
if( $_149 === FALSE) { if( $_153 === FALSE) {
$result = $res_150; $result = $res_154;
$this->pos = $pos_150; $this->pos = $pos_154;
} }
$_151 = TRUE; break; $_155 = TRUE; break;
} }
while(0); while(0);
if( $_151 === TRUE ) { $_154 = TRUE; break; } if( $_155 === TRUE ) { $_158 = TRUE; break; }
$result = $res_145; $result = $res_149;
$this->pos = $pos_145; $this->pos = $pos_149;
$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" );
$_154 = TRUE; break; $_158 = TRUE; break;
} }
$result = $res_145; $result = $res_149;
$this->pos = $pos_145; $this->pos = $pos_149;
$_154 = FALSE; break; $_158 = FALSE; break;
} }
while(0); while(0);
if( $_154 === TRUE ) { $_156 = TRUE; break; } if( $_158 === TRUE ) { $_160 = TRUE; break; }
$result = $res_143; $result = $res_147;
$this->pos = $pos_143; $this->pos = $pos_147;
$_156 = FALSE; break; $_160 = FALSE; break;
} }
while(0); while(0);
if( $_156 === TRUE ) { $_158 = TRUE; break; } if( $_160 === TRUE ) { $_162 = TRUE; break; }
$result = $res_141; $result = $res_145;
$this->pos = $pos_141; $this->pos = $pos_145;
$_158 = FALSE; break; $_162 = FALSE; break;
} }
while(0); while(0);
if( $_158 === TRUE ) { return $this->finalise($result); } if( $_162 === TRUE ) { return $this->finalise($result); }
if( $_158 === FALSE) { return FALSE; } if( $_162 === FALSE) { return FALSE; }
} }
@ -1135,44 +1153,44 @@ class SSTemplateParser extends Parser {
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);
$_167 = NULL; $_171 = NULL;
do { do {
$res_160 = $result; $res_164 = $result;
$pos_160 = $this->pos; $pos_164 = $this->pos;
if (( $subres = $this->literal( '==' ) ) !== FALSE) { if (( $subres = $this->literal( '==' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_167 = TRUE; break; $_171 = TRUE; break;
} }
$result = $res_160; $result = $res_164;
$this->pos = $pos_160; $this->pos = $pos_164;
$_165 = NULL; $_169 = NULL;
do { do {
$res_162 = $result; $res_166 = $result;
$pos_162 = $this->pos; $pos_166 = $this->pos;
if (( $subres = $this->literal( '!=' ) ) !== FALSE) { if (( $subres = $this->literal( '!=' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_165 = TRUE; break; $_169 = TRUE; break;
} }
$result = $res_162; $result = $res_166;
$this->pos = $pos_162; $this->pos = $pos_166;
if (substr($this->string,$this->pos,1) == '=') { if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '='; $result["text"] .= '=';
$_165 = TRUE; break; $_169 = TRUE; break;
} }
$result = $res_162; $result = $res_166;
$this->pos = $pos_162; $this->pos = $pos_166;
$_165 = FALSE; break; $_169 = FALSE; break;
} }
while(0); while(0);
if( $_165 === TRUE ) { $_167 = TRUE; break; } if( $_169 === TRUE ) { $_171 = TRUE; break; }
$result = $res_160; $result = $res_164;
$this->pos = $pos_160; $this->pos = $pos_164;
$_167 = FALSE; break; $_171 = FALSE; break;
} }
while(0); while(0);
if( $_167 === TRUE ) { return $this->finalise($result); } if( $_171 === TRUE ) { return $this->finalise($result); }
if( $_167 === FALSE) { return FALSE; } if( $_171 === FALSE) { return FALSE; }
} }
@ -1180,27 +1198,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);
$_174 = NULL; $_178 = 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 { $_174 = FALSE; break; } else { $_178 = 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 { $_174 = FALSE; break; } else { $_178 = 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 { $_174 = FALSE; break; } else { $_178 = FALSE; break; }
$_174 = TRUE; break; $_178 = TRUE; break;
} }
while(0); while(0);
if( $_174 === TRUE ) { return $this->finalise($result); } if( $_178 === TRUE ) { return $this->finalise($result); }
if( $_174 === FALSE) { return FALSE; } if( $_178 === FALSE) { return FALSE; }
} }
@ -1223,11 +1241,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);
$_181 = NULL; $_185 = NULL;
do { do {
$res_179 = $result; $res_183 = $result;
$pos_179 = $this->pos; $pos_183 = $this->pos;
$_178 = NULL; $_182 = 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) {
@ -1237,27 +1255,27 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_178 = FALSE; break; $_182 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_178 = TRUE; break; $_182 = TRUE; break;
} }
while(0); while(0);
if( $_178 === FALSE) { if( $_182 === FALSE) {
$result = $res_179; $result = $res_183;
$this->pos = $pos_179; $this->pos = $pos_183;
unset( $res_179 ); unset( $res_183 );
unset( $pos_179 ); unset( $pos_183 );
} }
$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 { $_181 = FALSE; break; } else { $_185 = FALSE; break; }
$_181 = TRUE; break; $_185 = TRUE; break;
} }
while(0); while(0);
if( $_181 === TRUE ) { return $this->finalise($result); } if( $_185 === TRUE ) { return $this->finalise($result); }
if( $_181 === FALSE) { return FALSE; } if( $_185 === FALSE) { return FALSE; }
} }
@ -1282,31 +1300,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);
$_186 = NULL; $_190 = NULL;
do { do {
$res_183 = $result; $res_187 = $result;
$pos_183 = $this->pos; $pos_187 = $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 );
$_186 = TRUE; break; $_190 = TRUE; break;
} }
$result = $res_183; $result = $res_187;
$this->pos = $pos_183; $this->pos = $pos_187;
$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 );
$_186 = TRUE; break; $_190 = TRUE; break;
} }
$result = $res_183; $result = $res_187;
$this->pos = $pos_183; $this->pos = $pos_187;
$_186 = FALSE; break; $_190 = FALSE; break;
} }
while(0); while(0);
if( $_186 === TRUE ) { return $this->finalise($result); } if( $_190 === TRUE ) { return $this->finalise($result); }
if( $_186 === FALSE) { return FALSE; } if( $_190 === FALSE) { return FALSE; }
} }
@ -1319,27 +1337,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);
$_191 = NULL; $_195 = NULL;
do { do {
$res_188 = $result; $res_192 = $result;
$pos_188 = $this->pos; $pos_192 = $this->pos;
if (( $subres = $this->literal( '||' ) ) !== FALSE) { if (( $subres = $this->literal( '||' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_191 = TRUE; break; $_195 = TRUE; break;
} }
$result = $res_188; $result = $res_192;
$this->pos = $pos_188; $this->pos = $pos_192;
if (( $subres = $this->literal( '&&' ) ) !== FALSE) { if (( $subres = $this->literal( '&&' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_191 = TRUE; break; $_195 = TRUE; break;
} }
$result = $res_188; $result = $res_192;
$this->pos = $pos_188; $this->pos = $pos_192;
$_191 = FALSE; break; $_195 = FALSE; break;
} }
while(0); while(0);
if( $_191 === TRUE ) { return $this->finalise($result); } if( $_195 === TRUE ) { return $this->finalise($result); }
if( $_191 === FALSE) { return FALSE; } if( $_195 === FALSE) { return FALSE; }
} }
@ -1347,18 +1365,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);
$_200 = NULL; $_204 = 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 { $_200 = FALSE; break; } else { $_204 = FALSE; break; }
while (true) { while (true) {
$res_199 = $result; $res_203 = $result;
$pos_199 = $this->pos; $pos_203 = $this->pos;
$_198 = NULL; $_202 = 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;
@ -1366,30 +1384,30 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "BooleanOperator" ); $this->store( $result, $subres, "BooleanOperator" );
} }
else { $_198 = FALSE; break; } else { $_202 = 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 { $_198 = FALSE; break; } else { $_202 = FALSE; break; }
$_198 = TRUE; break; $_202 = TRUE; break;
} }
while(0); while(0);
if( $_198 === FALSE) { if( $_202 === FALSE) {
$result = $res_199; $result = $res_203;
$this->pos = $pos_199; $this->pos = $pos_203;
unset( $res_199 ); unset( $res_203 );
unset( $pos_199 ); unset( $pos_203 );
break; break;
} }
} }
$_200 = TRUE; break; $_204 = TRUE; break;
} }
while(0); while(0);
if( $_200 === TRUE ) { return $this->finalise($result); } if( $_204 === TRUE ) { return $this->finalise($result); }
if( $_200 === FALSE) { return FALSE; } if( $_204 === FALSE) { return FALSE; }
} }
@ -1406,42 +1424,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);
$_210 = NULL; $_214 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_210 = FALSE; break; } else { $_214 = 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 { $_210 = FALSE; break; } else { $_214 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_210 = FALSE; break; } else { $_214 = 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 { $_210 = FALSE; break; } else { $_214 = 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 { $_210 = FALSE; break; } else { $_214 = FALSE; break; }
$res_209 = $result; $res_213 = $result;
$pos_209 = $this->pos; $pos_213 = $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_209; $result = $res_213;
$this->pos = $pos_209; $this->pos = $pos_213;
unset( $res_209 ); unset( $res_213 );
unset( $pos_209 ); unset( $pos_213 );
} }
$_210 = TRUE; break; $_214 = TRUE; break;
} }
while(0); while(0);
if( $_210 === TRUE ) { return $this->finalise($result); } if( $_214 === TRUE ) { return $this->finalise($result); }
if( $_210 === FALSE) { return FALSE; } if( $_214 === FALSE) { return FALSE; }
} }
@ -1449,35 +1467,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);
$_220 = NULL; $_224 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_220 = FALSE; break; } else { $_224 = 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 { $_220 = FALSE; break; } else { $_224 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_220 = FALSE; break; } else { $_224 = 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 { $_220 = FALSE; break; } else { $_224 = 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 { $_220 = FALSE; break; } else { $_224 = 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 { $_220 = FALSE; break; } else { $_224 = FALSE; break; }
$_220 = TRUE; break; $_224 = TRUE; break;
} }
while(0); while(0);
if( $_220 === TRUE ) { return $this->finalise($result); } if( $_224 === TRUE ) { return $this->finalise($result); }
if( $_220 === FALSE) { return FALSE; } if( $_224 === FALSE) { return FALSE; }
} }
@ -1485,27 +1503,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);
$_228 = NULL; $_232 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_228 = FALSE; break; } else { $_232 = 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 { $_228 = FALSE; break; } else { $_232 = 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 { $_228 = FALSE; break; } else { $_232 = 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 { $_228 = FALSE; break; } else { $_232 = FALSE; break; }
$_228 = TRUE; break; $_232 = TRUE; break;
} }
while(0); while(0);
if( $_228 === TRUE ) { return $this->finalise($result); } if( $_232 === TRUE ) { return $this->finalise($result); }
if( $_228 === FALSE) { return FALSE; } if( $_232 === FALSE) { return FALSE; }
} }
@ -1513,50 +1531,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);
$_238 = NULL; $_242 = 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 { $_238 = FALSE; break; } else { $_242 = FALSE; break; }
while (true) { while (true) {
$res_231 = $result; $res_235 = $result;
$pos_231 = $this->pos; $pos_235 = $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_231; $result = $res_235;
$this->pos = $pos_231; $this->pos = $pos_235;
unset( $res_231 ); unset( $res_235 );
unset( $pos_231 ); unset( $pos_235 );
break; break;
} }
} }
$res_232 = $result; $res_236 = $result;
$pos_232 = $this->pos; $pos_236 = $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_232; $result = $res_236;
$this->pos = $pos_232; $this->pos = $pos_236;
unset( $res_232 ); unset( $res_236 );
unset( $pos_232 ); unset( $pos_236 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_238 = FALSE; break; } else { $_242 = 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 { $_238 = FALSE; break; } else { $_242 = 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 { $_238 = FALSE; break; } else { $_242 = FALSE; break; }
$_238 = TRUE; break; $_242 = TRUE; break;
} }
while(0); while(0);
if( $_238 === TRUE ) { return $this->finalise($result); } if( $_242 === TRUE ) { return $this->finalise($result); }
if( $_238 === FALSE) { return FALSE; } if( $_242 === FALSE) { return FALSE; }
} }
@ -1586,61 +1604,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);
$_254 = NULL; $_258 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_254 = FALSE; break; } else { $_258 = 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 { $_254 = FALSE; break; } else { $_258 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_254 = FALSE; break; } else { $_258 = FALSE; break; }
$stack[] = $result; $result = $this->construct( $matchrule, "Call" ); $stack[] = $result; $result = $this->construct( $matchrule, "Call" );
$_250 = NULL; $_254 = 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 { $_250 = FALSE; break; } else { $_254 = 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 { $_250 = FALSE; break; } else { $_254 = 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 { $_250 = FALSE; break; } else { $_254 = 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 { $_250 = FALSE; break; } else { $_254 = FALSE; break; }
$_250 = TRUE; break; $_254 = TRUE; break;
} }
while(0); while(0);
if( $_250 === TRUE ) { if( $_254 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Call' ); $this->store( $result, $subres, 'Call' );
} }
if( $_250 === FALSE) { if( $_254 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_254 = FALSE; break; $_258 = 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 { $_254 = FALSE; break; } else { $_258 = FALSE; break; }
$_254 = TRUE; break; $_258 = TRUE; break;
} }
while(0); while(0);
if( $_254 === TRUE ) { return $this->finalise($result); } if( $_258 === TRUE ) { return $this->finalise($result); }
if( $_254 === FALSE) { return FALSE; } if( $_258 === FALSE) { return FALSE; }
} }
@ -1660,97 +1678,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);
$_274 = NULL; $_278 = NULL;
do { do {
$res_262 = $result; $res_266 = $result;
$pos_262 = $this->pos; $pos_266 = $this->pos;
$_261 = NULL; $_265 = NULL;
do { do {
$_259 = NULL; $_263 = NULL;
do { do {
$res_256 = $result; $res_260 = $result;
$pos_256 = $this->pos; $pos_260 = $this->pos;
if (( $subres = $this->literal( 'if ' ) ) !== FALSE) { if (( $subres = $this->literal( 'if ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_259 = TRUE; break; $_263 = TRUE; break;
} }
$result = $res_256; $result = $res_260;
$this->pos = $pos_256; $this->pos = $pos_260;
if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) { if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_259 = TRUE; break; $_263 = TRUE; break;
} }
$result = $res_256; $result = $res_260;
$this->pos = $pos_256; $this->pos = $pos_260;
$_259 = FALSE; break; $_263 = FALSE; break;
} }
while(0); while(0);
if( $_259 === FALSE) { $_261 = FALSE; break; } if( $_263 === FALSE) { $_265 = FALSE; break; }
$_261 = TRUE; break; $_265 = TRUE; break;
} }
while(0); while(0);
if( $_261 === TRUE ) { if( $_265 === TRUE ) {
$result = $res_262; $result = $res_266;
$this->pos = $pos_262; $this->pos = $pos_266;
$_274 = FALSE; break; $_278 = FALSE; break;
} }
if( $_261 === FALSE) { if( $_265 === FALSE) {
$result = $res_262; $result = $res_266;
$this->pos = $pos_262; $this->pos = $pos_266;
} }
$_272 = NULL; $_276 = NULL;
do { do {
$_270 = NULL; $_274 = NULL;
do { do {
$res_263 = $result; $res_267 = $result;
$pos_263 = $this->pos; $pos_267 = $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" );
$_270 = TRUE; break; $_274 = TRUE; break;
} }
$result = $res_263; $result = $res_267;
$this->pos = $pos_263; $this->pos = $pos_267;
$_268 = NULL; $_272 = NULL;
do { do {
$res_265 = $result; $res_269 = $result;
$pos_265 = $this->pos; $pos_269 = $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" );
$_268 = TRUE; break; $_272 = TRUE; break;
} }
$result = $res_265; $result = $res_269;
$this->pos = $pos_265; $this->pos = $pos_269;
$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" );
$_268 = TRUE; break; $_272 = TRUE; break;
} }
$result = $res_265; $result = $res_269;
$this->pos = $pos_265; $this->pos = $pos_269;
$_268 = FALSE; break; $_272 = FALSE; break;
} }
while(0); while(0);
if( $_268 === TRUE ) { $_270 = TRUE; break; } if( $_272 === TRUE ) { $_274 = TRUE; break; }
$result = $res_263; $result = $res_267;
$this->pos = $pos_263; $this->pos = $pos_267;
$_270 = FALSE; break; $_274 = FALSE; break;
} }
while(0); while(0);
if( $_270 === FALSE) { $_272 = FALSE; break; } if( $_274 === FALSE) { $_276 = FALSE; break; }
$_272 = TRUE; break; $_276 = TRUE; break;
} }
while(0); while(0);
if( $_272 === FALSE) { $_274 = FALSE; break; } if( $_276 === FALSE) { $_278 = FALSE; break; }
$_274 = TRUE; break; $_278 = TRUE; break;
} }
while(0); while(0);
if( $_274 === TRUE ) { return $this->finalise($result); } if( $_278 === TRUE ) { return $this->finalise($result); }
if( $_274 === FALSE) { return FALSE; } if( $_278 === FALSE) { return FALSE; }
} }
@ -1771,44 +1789,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);
$_283 = NULL; $_287 = 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 { $_283 = FALSE; break; } else { $_287 = FALSE; break; }
while (true) { while (true) {
$res_282 = $result; $res_286 = $result;
$pos_282 = $this->pos; $pos_286 = $this->pos;
$_281 = NULL; $_285 = 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 { $_281 = FALSE; break; } else { $_285 = 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 { $_281 = FALSE; break; } else { $_285 = FALSE; break; }
$_281 = TRUE; break; $_285 = TRUE; break;
} }
while(0); while(0);
if( $_281 === FALSE) { if( $_285 === FALSE) {
$result = $res_282; $result = $res_286;
$this->pos = $pos_282; $this->pos = $pos_286;
unset( $res_282 ); unset( $res_286 );
unset( $pos_282 ); unset( $pos_286 );
break; break;
} }
} }
$_283 = TRUE; break; $_287 = TRUE; break;
} }
while(0); while(0);
if( $_283 === TRUE ) { return $this->finalise($result); } if( $_287 === TRUE ) { return $this->finalise($result); }
if( $_283 === FALSE) { return FALSE; } if( $_287 === FALSE) { return FALSE; }
} }
@ -1820,192 +1838,210 @@ class SSTemplateParser extends Parser {
$res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']); $res['php'] .= str_replace('$$FINAL', 'XML_val', $sub['php']);
} }
/* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | Include | 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_323 = $result; $res_331 = $result;
$pos_323 = $this->pos; $pos_331 = $this->pos;
$_322 = NULL; $_330 = NULL;
do { do {
$_320 = NULL; $_328 = NULL;
do { do {
$res_285 = $result; $res_289 = $result;
$pos_285 = $this->pos; $pos_289 = $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 );
$_320 = TRUE; break; $_328 = TRUE; break;
} }
$result = $res_285; $result = $res_289;
$this->pos = $pos_285; $this->pos = $pos_289;
$_318 = NULL; $_326 = NULL;
do { do {
$res_287 = $result; $res_291 = $result;
$pos_287 = $this->pos; $pos_291 = $this->pos;
$matcher = 'match_'.'Translate'; $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 );
$_318 = TRUE; break; $_326 = TRUE; break;
} }
$result = $res_287; $result = $res_291;
$this->pos = $pos_287; $this->pos = $pos_291;
$_316 = NULL; $_324 = NULL;
do { do {
$res_289 = $result; $res_293 = $result;
$pos_289 = $this->pos; $pos_293 = $this->pos;
$matcher = 'match_'.'If'; $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 );
$_316 = TRUE; break; $_324 = TRUE; break;
} }
$result = $res_289; $result = $res_293;
$this->pos = $pos_289; $this->pos = $pos_293;
$_314 = NULL; $_322 = NULL;
do { do {
$res_291 = $result; $res_295 = $result;
$pos_291 = $this->pos; $pos_295 = $this->pos;
$matcher = 'match_'.'Require'; $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 );
$_314 = TRUE; break; $_322 = TRUE; break;
} }
$result = $res_291; $result = $res_295;
$this->pos = $pos_291; $this->pos = $pos_295;
$_312 = NULL; $_320 = NULL;
do { do {
$res_293 = $result; $res_297 = $result;
$pos_293 = $this->pos; $pos_297 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $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 );
$_312 = TRUE; break; $_320 = TRUE; break;
} }
$result = $res_293; $result = $res_297;
$this->pos = $pos_293; $this->pos = $pos_297;
$_310 = NULL; $_318 = NULL;
do { do {
$res_295 = $result; $res_299 = $result;
$pos_295 = $this->pos; $pos_299 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Include'; $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 );
$_310 = TRUE; break; $_318 = TRUE; break;
} }
$result = $res_295; $result = $res_299;
$this->pos = $pos_295; $this->pos = $pos_299;
$_308 = NULL; $_316 = NULL;
do { do {
$res_297 = $result; $res_301 = $result;
$pos_297 = $this->pos; $pos_301 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $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 );
$_308 = TRUE; break; $_316 = TRUE; break;
} }
$result = $res_297; $result = $res_301;
$this->pos = $pos_297; $this->pos = $pos_301;
$_306 = NULL; $_314 = NULL;
do { do {
$res_299 = $result; $res_303 = $result;
$pos_299 = $this->pos; $pos_303 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $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 );
$_306 = TRUE; break; $_314 = TRUE; break;
} }
$result = $res_299; $result = $res_303;
$this->pos = $pos_299; $this->pos = $pos_303;
$_304 = NULL; $_312 = NULL;
do { do {
$res_301 = $result; $res_305 = $result;
$pos_301 = $this->pos; $pos_305 = $this->pos;
$matcher = 'match_'.'Injection'; $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 );
$_304 = TRUE; break; $_312 = TRUE; break;
} }
$result = $res_301; $result = $res_305;
$this->pos = $pos_301; $this->pos = $pos_305;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $_310 = NULL;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); do {
if ($subres !== FALSE) { $res_307 = $result;
$this->store( $result, $subres ); $pos_307 = $this->pos;
$_304 = TRUE; break; $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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_310 = TRUE; break;
}
$result = $res_307;
$this->pos = $pos_307;
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_310 = TRUE; break;
}
$result = $res_307;
$this->pos = $pos_307;
$_310 = FALSE; break;
} }
$result = $res_301; while(0);
$this->pos = $pos_301; if( $_310 === TRUE ) { $_312 = TRUE; break; }
$_304 = FALSE; break; $result = $res_305;
$this->pos = $pos_305;
$_312 = FALSE; break;
} }
while(0); while(0);
if( $_304 === TRUE ) { $_306 = TRUE; break; } if( $_312 === TRUE ) { $_314 = TRUE; break; }
$result = $res_299; $result = $res_303;
$this->pos = $pos_299; $this->pos = $pos_303;
$_306 = FALSE; break; $_314 = FALSE; break;
} }
while(0); while(0);
if( $_306 === TRUE ) { $_308 = TRUE; break; } if( $_314 === TRUE ) { $_316 = TRUE; break; }
$result = $res_297; $result = $res_301;
$this->pos = $pos_297; $this->pos = $pos_301;
$_308 = FALSE; break; $_316 = FALSE; break;
} }
while(0); while(0);
if( $_308 === TRUE ) { $_310 = TRUE; break; } if( $_316 === TRUE ) { $_318 = TRUE; break; }
$result = $res_295; $result = $res_299;
$this->pos = $pos_295; $this->pos = $pos_299;
$_310 = FALSE; break; $_318 = FALSE; break;
} }
while(0); while(0);
if( $_310 === TRUE ) { $_312 = TRUE; break; } if( $_318 === TRUE ) { $_320 = TRUE; break; }
$result = $res_293; $result = $res_297;
$this->pos = $pos_293; $this->pos = $pos_297;
$_312 = FALSE; break; $_320 = FALSE; break;
} }
while(0); while(0);
if( $_312 === TRUE ) { $_314 = TRUE; break; } if( $_320 === TRUE ) { $_322 = TRUE; break; }
$result = $res_291; $result = $res_295;
$this->pos = $pos_291; $this->pos = $pos_295;
$_314 = FALSE; break; $_322 = FALSE; break;
} }
while(0); while(0);
if( $_314 === TRUE ) { $_316 = TRUE; break; } if( $_322 === TRUE ) { $_324 = TRUE; break; }
$result = $res_289; $result = $res_293;
$this->pos = $pos_289; $this->pos = $pos_293;
$_316 = FALSE; break; $_324 = FALSE; break;
} }
while(0); while(0);
if( $_316 === TRUE ) { $_318 = TRUE; break; } if( $_324 === TRUE ) { $_326 = TRUE; break; }
$result = $res_287; $result = $res_291;
$this->pos = $pos_287; $this->pos = $pos_291;
$_318 = FALSE; break; $_326 = FALSE; break;
} }
while(0); while(0);
if( $_318 === TRUE ) { $_320 = TRUE; break; } if( $_326 === TRUE ) { $_328 = TRUE; break; }
$result = $res_285; $result = $res_289;
$this->pos = $pos_285; $this->pos = $pos_289;
$_320 = FALSE; break; $_328 = FALSE; break;
} }
while(0); while(0);
if( $_320 === FALSE) { $_322 = FALSE; break; } if( $_328 === FALSE) { $_330 = FALSE; break; }
$_322 = TRUE; break; $_330 = TRUE; break;
} }
while(0); while(0);
if( $_322 === FALSE) { if( $_330 === FALSE) {
$result = $res_323; $result = $res_331;
$this->pos = $pos_323; $this->pos = $pos_331;
unset( $res_323 ); unset( $res_331 );
unset( $pos_323 ); unset( $pos_331 );
break; break;
} }
$count += 1; $count += 1;
@ -2024,63 +2060,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);
$_360 = NULL; $_368 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_360 = FALSE; break; } else { $_368 = 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 { $_360 = FALSE; break; } else { $_368 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_328 = $result; $res_336 = $result;
$pos_328 = $this->pos; $pos_336 = $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_328; $result = $res_336;
$this->pos = $pos_328; $this->pos = $pos_336;
unset( $res_328 ); unset( $res_336 );
unset( $pos_328 ); unset( $pos_336 );
} }
$res_340 = $result; $res_348 = $result;
$pos_340 = $this->pos; $pos_348 = $this->pos;
$_339 = NULL; $_347 = 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" );
$_335 = NULL; $_343 = NULL;
do { do {
$_333 = NULL; $_341 = NULL;
do { do {
$res_330 = $result; $res_338 = $result;
$pos_330 = $this->pos; $pos_338 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_333 = TRUE; break; $_341 = TRUE; break;
} }
$result = $res_330; $result = $res_338;
$this->pos = $pos_330; $this->pos = $pos_338;
if (( $subres = $this->literal( 'unless' ) ) !== FALSE) { if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_333 = TRUE; break; $_341 = TRUE; break;
} }
$result = $res_330; $result = $res_338;
$this->pos = $pos_330; $this->pos = $pos_338;
$_333 = FALSE; break; $_341 = FALSE; break;
} }
while(0); while(0);
if( $_333 === FALSE) { $_335 = FALSE; break; } if( $_341 === FALSE) { $_343 = FALSE; break; }
$_335 = TRUE; break; $_343 = TRUE; break;
} }
while(0); while(0);
if( $_335 === TRUE ) { if( $_343 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' ); $this->store( $result, $subres, 'Conditional' );
} }
if( $_335 === FALSE) { if( $_343 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_339 = FALSE; break; $_347 = 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;
@ -2088,87 +2124,87 @@ class SSTemplateParser extends Parser {
if ($subres !== FALSE) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Condition" ); $this->store( $result, $subres, "Condition" );
} }
else { $_339 = FALSE; break; } else { $_347 = FALSE; break; }
$_339 = TRUE; break; $_347 = TRUE; break;
} }
while(0); while(0);
if( $_339 === FALSE) { if( $_347 === FALSE) {
$result = $res_340; $result = $res_348;
$this->pos = $pos_340; $this->pos = $pos_348;
unset( $res_340 ); unset( $res_348 );
unset( $pos_340 ); unset( $pos_348 );
} }
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 { $_360 = FALSE; break; } else { $_368 = FALSE; break; }
$res_343 = $result; $res_351 = $result;
$pos_343 = $this->pos; $pos_351 = $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_343; $result = $res_351;
$this->pos = $pos_343; $this->pos = $pos_351;
unset( $res_343 ); unset( $res_351 );
unset( $pos_343 ); unset( $pos_351 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_360 = FALSE; break; } else { $_368 = 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 { $_360 = FALSE; break; } else { $_368 = FALSE; break; }
$_356 = NULL; $_364 = NULL;
do { do {
$_354 = NULL; $_362 = NULL;
do { do {
$res_347 = $result; $res_355 = $result;
$pos_347 = $this->pos; $pos_355 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_354 = TRUE; break; $_362 = TRUE; break;
} }
$result = $res_347; $result = $res_355;
$this->pos = $pos_347; $this->pos = $pos_355;
$_352 = NULL; $_360 = NULL;
do { do {
$res_349 = $result; $res_357 = $result;
$pos_349 = $this->pos; $pos_357 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_352 = TRUE; break; $_360 = TRUE; break;
} }
$result = $res_349; $result = $res_357;
$this->pos = $pos_349; $this->pos = $pos_357;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_352 = TRUE; break; $_360 = TRUE; break;
} }
$result = $res_349; $result = $res_357;
$this->pos = $pos_349; $this->pos = $pos_357;
$_352 = FALSE; break; $_360 = FALSE; break;
} }
while(0); while(0);
if( $_352 === TRUE ) { $_354 = TRUE; break; } if( $_360 === TRUE ) { $_362 = TRUE; break; }
$result = $res_347; $result = $res_355;
$this->pos = $pos_347; $this->pos = $pos_355;
$_354 = FALSE; break; $_362 = FALSE; break;
} }
while(0); while(0);
if( $_354 === FALSE) { $_356 = FALSE; break; } if( $_362 === FALSE) { $_364 = FALSE; break; }
$_356 = TRUE; break; $_364 = TRUE; break;
} }
while(0); while(0);
if( $_356 === FALSE) { $_360 = FALSE; break; } if( $_364 === FALSE) { $_368 = 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 { $_360 = FALSE; break; } else { $_368 = FALSE; break; }
$_360 = TRUE; break; $_368 = TRUE; break;
} }
while(0); while(0);
if( $_360 === TRUE ) { return $this->finalise($result); } if( $_368 === TRUE ) { return $this->finalise($result); }
if( $_360 === FALSE) { return FALSE; } if( $_368 === FALSE) { return FALSE; }
} }
@ -2177,228 +2213,246 @@ class SSTemplateParser extends Parser {
$res['php'] = $sub['php']; $res['php'] = $sub['php'];
} }
/* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ */ /* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | 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_408 = $result; $res_420 = $result;
$pos_408 = $this->pos; $pos_420 = $this->pos;
$_407 = NULL; $_419 = NULL;
do { do {
$_405 = NULL; $_417 = NULL;
do { do {
$res_362 = $result; $res_370 = $result;
$pos_362 = $this->pos; $pos_370 = $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 );
$_405 = TRUE; break; $_417 = TRUE; break;
} }
$result = $res_362; $result = $res_370;
$this->pos = $pos_362; $this->pos = $pos_370;
$_403 = NULL; $_415 = NULL;
do { do {
$res_364 = $result; $res_372 = $result;
$pos_364 = $this->pos; $pos_372 = $this->pos;
$matcher = 'match_'.'Translate'; $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 );
$_403 = TRUE; break; $_415 = TRUE; break;
} }
$result = $res_364; $result = $res_372;
$this->pos = $pos_364; $this->pos = $pos_372;
$_401 = NULL; $_413 = NULL;
do { do {
$res_366 = $result; $res_374 = $result;
$pos_366 = $this->pos; $pos_374 = $this->pos;
$matcher = 'match_'.'If'; $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 );
$_401 = TRUE; break; $_413 = TRUE; break;
} }
$result = $res_366; $result = $res_374;
$this->pos = $pos_366; $this->pos = $pos_374;
$_399 = NULL; $_411 = NULL;
do { do {
$res_368 = $result; $res_376 = $result;
$pos_368 = $this->pos; $pos_376 = $this->pos;
$matcher = 'match_'.'Require'; $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 );
$_399 = TRUE; break; $_411 = TRUE; break;
} }
$result = $res_368; $result = $res_376;
$this->pos = $pos_368; $this->pos = $pos_376;
$_397 = NULL; $_409 = NULL;
do { do {
$res_370 = $result; $res_378 = $result;
$pos_370 = $this->pos; $pos_378 = $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 );
$_397 = TRUE; break; $_409 = TRUE; break;
} }
$result = $res_370; $result = $res_378;
$this->pos = $pos_370; $this->pos = $pos_378;
$_395 = NULL; $_407 = NULL;
do { do {
$res_372 = $result; $res_380 = $result;
$pos_372 = $this->pos; $pos_380 = $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 );
$_395 = TRUE; break; $_407 = TRUE; break;
} }
$result = $res_372; $result = $res_380;
$this->pos = $pos_372; $this->pos = $pos_380;
$_393 = NULL; $_405 = NULL;
do { do {
$res_374 = $result; $res_382 = $result;
$pos_374 = $this->pos; $pos_382 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $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 );
$_393 = TRUE; break; $_405 = TRUE; break;
} }
$result = $res_374; $result = $res_382;
$this->pos = $pos_374; $this->pos = $pos_382;
$_391 = NULL; $_403 = NULL;
do { do {
$res_376 = $result; $res_384 = $result;
$pos_376 = $this->pos; $pos_384 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Include'; $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 );
$_391 = TRUE; break; $_403 = TRUE; break;
} }
$result = $res_376; $result = $res_384;
$this->pos = $pos_376; $this->pos = $pos_384;
$_389 = NULL; $_401 = NULL;
do { do {
$res_378 = $result; $res_386 = $result;
$pos_378 = $this->pos; $pos_386 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $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 );
$_389 = TRUE; break; $_401 = TRUE; break;
} }
$result = $res_378; $result = $res_386;
$this->pos = $pos_378; $this->pos = $pos_386;
$_387 = NULL; $_399 = NULL;
do { do {
$res_380 = $result; $res_388 = $result;
$pos_380 = $this->pos; $pos_388 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $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 );
$_387 = TRUE; break; $_399 = TRUE; break;
} }
$result = $res_380; $result = $res_388;
$this->pos = $pos_380; $this->pos = $pos_388;
$_385 = NULL; $_397 = NULL;
do { do {
$res_382 = $result; $res_390 = $result;
$pos_382 = $this->pos; $pos_390 = $this->pos;
$matcher = 'match_'.'Injection'; $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 );
$_385 = TRUE; break; $_397 = TRUE; break;
} }
$result = $res_382; $result = $res_390;
$this->pos = $pos_382; $this->pos = $pos_390;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $_395 = NULL;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); do {
if ($subres !== FALSE) { $res_392 = $result;
$this->store( $result, $subres ); $pos_392 = $this->pos;
$_385 = TRUE; break; $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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_395 = TRUE; break;
}
$result = $res_392;
$this->pos = $pos_392;
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_395 = TRUE; break;
}
$result = $res_392;
$this->pos = $pos_392;
$_395 = FALSE; break;
} }
$result = $res_382; while(0);
$this->pos = $pos_382; if( $_395 === TRUE ) { $_397 = TRUE; break; }
$_385 = FALSE; break; $result = $res_390;
$this->pos = $pos_390;
$_397 = FALSE; break;
} }
while(0); while(0);
if( $_385 === TRUE ) { $_387 = TRUE; break; } if( $_397 === TRUE ) { $_399 = TRUE; break; }
$result = $res_380; $result = $res_388;
$this->pos = $pos_380; $this->pos = $pos_388;
$_387 = FALSE; break; $_399 = FALSE; break;
} }
while(0); while(0);
if( $_387 === TRUE ) { $_389 = TRUE; break; } if( $_399 === TRUE ) { $_401 = TRUE; break; }
$result = $res_378; $result = $res_386;
$this->pos = $pos_378; $this->pos = $pos_386;
$_389 = FALSE; break; $_401 = FALSE; break;
} }
while(0); while(0);
if( $_389 === TRUE ) { $_391 = TRUE; break; } if( $_401 === TRUE ) { $_403 = TRUE; break; }
$result = $res_376; $result = $res_384;
$this->pos = $pos_376; $this->pos = $pos_384;
$_391 = FALSE; break; $_403 = FALSE; break;
} }
while(0); while(0);
if( $_391 === TRUE ) { $_393 = TRUE; break; } if( $_403 === TRUE ) { $_405 = TRUE; break; }
$result = $res_374; $result = $res_382;
$this->pos = $pos_374; $this->pos = $pos_382;
$_393 = FALSE; break; $_405 = FALSE; break;
} }
while(0); while(0);
if( $_393 === TRUE ) { $_395 = TRUE; break; } if( $_405 === TRUE ) { $_407 = TRUE; break; }
$result = $res_372; $result = $res_380;
$this->pos = $pos_372; $this->pos = $pos_380;
$_395 = FALSE; break; $_407 = FALSE; break;
} }
while(0); while(0);
if( $_395 === TRUE ) { $_397 = TRUE; break; } if( $_407 === TRUE ) { $_409 = TRUE; break; }
$result = $res_370; $result = $res_378;
$this->pos = $pos_370; $this->pos = $pos_378;
$_397 = FALSE; break; $_409 = FALSE; break;
} }
while(0); while(0);
if( $_397 === TRUE ) { $_399 = TRUE; break; } if( $_409 === TRUE ) { $_411 = TRUE; break; }
$result = $res_368; $result = $res_376;
$this->pos = $pos_368; $this->pos = $pos_376;
$_399 = FALSE; break; $_411 = FALSE; break;
} }
while(0); while(0);
if( $_399 === TRUE ) { $_401 = TRUE; break; } if( $_411 === TRUE ) { $_413 = TRUE; break; }
$result = $res_366; $result = $res_374;
$this->pos = $pos_366; $this->pos = $pos_374;
$_401 = FALSE; break; $_413 = FALSE; break;
} }
while(0); while(0);
if( $_401 === TRUE ) { $_403 = TRUE; break; } if( $_413 === TRUE ) { $_415 = TRUE; break; }
$result = $res_364; $result = $res_372;
$this->pos = $pos_364; $this->pos = $pos_372;
$_403 = FALSE; break; $_415 = FALSE; break;
} }
while(0); while(0);
if( $_403 === TRUE ) { $_405 = TRUE; break; } if( $_415 === TRUE ) { $_417 = TRUE; break; }
$result = $res_362; $result = $res_370;
$this->pos = $pos_362; $this->pos = $pos_370;
$_405 = FALSE; break; $_417 = FALSE; break;
} }
while(0); while(0);
if( $_405 === FALSE) { $_407 = FALSE; break; } if( $_417 === FALSE) { $_419 = FALSE; break; }
$_407 = TRUE; break; $_419 = TRUE; break;
} }
while(0); while(0);
if( $_407 === FALSE) { if( $_419 === FALSE) {
$result = $res_408; $result = $res_420;
$this->pos = $pos_408; $this->pos = $pos_420;
unset( $res_408 ); unset( $res_420 );
unset( $pos_408 ); unset( $pos_420 );
break; break;
} }
$count += 1; $count += 1;
@ -2424,108 +2478,53 @@ 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);
$_463 = NULL; $_475 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_463 = FALSE; break; } else { $_475 = 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" );
$_416 = NULL; $_428 = NULL;
do { do {
$_414 = NULL; $_426 = NULL;
do { do {
$res_411 = $result; $res_423 = $result;
$pos_411 = $this->pos; $pos_423 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_414 = TRUE; break; $_426 = TRUE; break;
} }
$result = $res_411; $result = $res_423;
$this->pos = $pos_411; $this->pos = $pos_423;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_414 = TRUE; break; $_426 = TRUE; break;
} }
$result = $res_411; $result = $res_423;
$this->pos = $pos_411; $this->pos = $pos_423;
$_414 = FALSE; break; $_426 = FALSE; break;
} }
while(0); while(0);
if( $_414 === FALSE) { $_416 = FALSE; break; } if( $_426 === FALSE) { $_428 = FALSE; break; }
$_416 = TRUE; break; $_428 = TRUE; break;
} }
while(0); while(0);
if( $_416 === TRUE ) { if( $_428 === TRUE ) {
$subres = $result; $result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'CacheTag' ); $this->store( $result, $subres, 'CacheTag' );
} }
if( $_416 === FALSE) { if( $_428 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_463 = FALSE; break; $_475 = FALSE; break;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_421 = $result;
$pos_421 = $this->pos;
$_420 = NULL;
do {
$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))) ) );
if ($subres !== FALSE) { $this->store( $result, $subres ); }
else { $_420 = FALSE; break; }
$_420 = TRUE; break;
}
while(0);
if( $_420 === FALSE) {
$result = $res_421;
$this->pos = $pos_421;
unset( $res_421 );
unset( $pos_421 );
}
$res_433 = $result; $res_433 = $result;
$pos_433 = $this->pos; $pos_433 = $this->pos;
$_432 = NULL; $_432 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos;
$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
$_428 = NULL;
do {
$_426 = NULL;
do {
$res_423 = $result;
$pos_423 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_426 = TRUE; break;
}
$result = $res_423;
$this->pos = $pos_423;
if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres;
$_426 = TRUE; break;
}
$result = $res_423;
$this->pos = $pos_423;
$_426 = FALSE; break;
}
while(0);
if( $_426 === FALSE) { $_428 = FALSE; break; }
$_428 = TRUE; break;
}
while(0);
if( $_428 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' );
}
if( $_428 === FALSE) {
$result = array_pop($stack);
$_432 = FALSE; break;
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 ); }
$this->store( $result, $subres, "Condition" );
}
else { $_432 = FALSE; break; } else { $_432 = FALSE; break; }
$_432 = TRUE; break; $_432 = TRUE; break;
} }
@ -2536,122 +2535,177 @@ class SSTemplateParser extends Parser {
unset( $res_433 ); unset( $res_433 );
unset( $pos_433 ); unset( $pos_433 );
} }
$res_445 = $result;
$pos_445 = $this->pos;
$_444 = NULL;
do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
$_440 = NULL;
do {
$_438 = NULL;
do {
$res_435 = $result;
$pos_435 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres;
$_438 = TRUE; break;
}
$result = $res_435;
$this->pos = $pos_435;
if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres;
$_438 = TRUE; break;
}
$result = $res_435;
$this->pos = $pos_435;
$_438 = FALSE; break;
}
while(0);
if( $_438 === FALSE) { $_440 = FALSE; break; }
$_440 = TRUE; break;
}
while(0);
if( $_440 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' );
}
if( $_440 === FALSE) {
$result = array_pop($stack);
$_444 = FALSE; break;
}
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres, "Condition" );
}
else { $_444 = FALSE; break; }
$_444 = TRUE; break;
}
while(0);
if( $_444 === FALSE) {
$result = $res_445;
$this->pos = $pos_445;
unset( $res_445 );
unset( $pos_445 );
}
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 { $_463 = FALSE; break; } else { $_475 = FALSE; break; }
while (true) { while (true) {
$res_446 = $result; $res_458 = $result;
$pos_446 = $this->pos; $pos_458 = $this->pos;
$_445 = NULL; $_457 = NULL;
do { do {
$_443 = NULL; $_455 = NULL;
do { do {
$res_436 = $result; $res_448 = $result;
$pos_436 = $this->pos; $pos_448 = $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 );
$_443 = TRUE; break; $_455 = TRUE; break;
} }
$result = $res_436; $result = $res_448;
$this->pos = $pos_436; $this->pos = $pos_448;
$_441 = NULL; $_453 = NULL;
do { do {
$res_438 = $result; $res_450 = $result;
$pos_438 = $this->pos; $pos_450 = $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 );
$_441 = TRUE; break; $_453 = TRUE; break;
} }
$result = $res_438; $result = $res_450;
$this->pos = $pos_438; $this->pos = $pos_450;
$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 );
$_441 = TRUE; break; $_453 = TRUE; break;
} }
$result = $res_438; $result = $res_450;
$this->pos = $pos_438; $this->pos = $pos_450;
$_441 = FALSE; break; $_453 = FALSE; break;
} }
while(0); while(0);
if( $_441 === TRUE ) { $_443 = TRUE; break; } if( $_453 === TRUE ) { $_455 = TRUE; break; }
$result = $res_436; $result = $res_448;
$this->pos = $pos_436; $this->pos = $pos_448;
$_443 = FALSE; break; $_455 = FALSE; break;
} }
while(0); while(0);
if( $_443 === FALSE) { $_445 = FALSE; break; } if( $_455 === FALSE) { $_457 = FALSE; break; }
$_445 = TRUE; break; $_457 = TRUE; break;
} }
while(0); while(0);
if( $_445 === FALSE) { if( $_457 === FALSE) {
$result = $res_446; $result = $res_458;
$this->pos = $pos_446; $this->pos = $pos_458;
unset( $res_446 ); unset( $res_458 );
unset( $pos_446 ); unset( $pos_458 );
break; break;
} }
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_463 = FALSE; break; } else { $_475 = 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 { $_463 = FALSE; break; } else { $_475 = FALSE; break; }
$_459 = NULL; $_471 = NULL;
do { do {
$_457 = NULL; $_469 = NULL;
do { do {
$res_450 = $result; $res_462 = $result;
$pos_450 = $this->pos; $pos_462 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_457 = TRUE; break; $_469 = TRUE; break;
} }
$result = $res_450; $result = $res_462;
$this->pos = $pos_450; $this->pos = $pos_462;
$_455 = NULL; $_467 = NULL;
do { do {
$res_452 = $result; $res_464 = $result;
$pos_452 = $this->pos; $pos_464 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_455 = TRUE; break; $_467 = TRUE; break;
} }
$result = $res_452; $result = $res_464;
$this->pos = $pos_452; $this->pos = $pos_464;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_455 = TRUE; break; $_467 = TRUE; break;
} }
$result = $res_452; $result = $res_464;
$this->pos = $pos_452; $this->pos = $pos_464;
$_455 = FALSE; break; $_467 = FALSE; break;
} }
while(0); while(0);
if( $_455 === TRUE ) { $_457 = TRUE; break; } if( $_467 === TRUE ) { $_469 = TRUE; break; }
$result = $res_450; $result = $res_462;
$this->pos = $pos_450; $this->pos = $pos_462;
$_457 = FALSE; break; $_469 = FALSE; break;
} }
while(0); while(0);
if( $_457 === FALSE) { $_459 = FALSE; break; } if( $_469 === FALSE) { $_471 = FALSE; break; }
$_459 = TRUE; break; $_471 = TRUE; break;
} }
while(0); while(0);
if( $_459 === FALSE) { $_463 = FALSE; break; } if( $_471 === FALSE) { $_475 = 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 { $_463 = FALSE; break; } else { $_475 = FALSE; break; }
$_463 = TRUE; break; $_475 = TRUE; break;
} }
while(0); while(0);
if( $_463 === TRUE ) { return $this->finalise($result); } if( $_475 === TRUE ) { return $this->finalise($result); }
if( $_463 === FALSE) { return FALSE; } if( $_475 === FALSE) { return FALSE; }
} }
@ -2695,93 +2749,93 @@ class SSTemplateParser extends Parser {
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);
$_482 = NULL; $_494 = NULL;
do { do {
if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_482 = FALSE; break; } else { $_494 = FALSE; break; }
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_482 = FALSE; break; } else { $_494 = 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 { $_482 = FALSE; break; } else { $_494 = FALSE; break; }
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_482 = FALSE; break; } else { $_494 = 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 { $_482 = FALSE; break; } else { $_494 = FALSE; break; }
$res_475 = $result; $res_487 = $result;
$pos_475 = $this->pos; $pos_487 = $this->pos;
$_474 = NULL; $_486 = NULL;
do { do {
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_474 = FALSE; break; } else { $_486 = 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 { $_474 = FALSE; break; } else { $_486 = FALSE; break; }
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_474 = FALSE; break; } else { $_486 = 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 { $_474 = FALSE; break; } else { $_486 = FALSE; break; }
$_474 = TRUE; break; $_486 = TRUE; break;
} }
while(0); while(0);
if( $_474 === FALSE) { if( $_486 === FALSE) {
$result = $res_475; $result = $res_487;
$this->pos = $pos_475; $this->pos = $pos_487;
unset( $res_475 ); unset( $res_487 );
unset( $pos_475 ); unset( $pos_487 );
} }
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_482 = FALSE; break; } else { $_494 = 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 { $_482 = FALSE; break; } else { $_494 = FALSE; break; }
$matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; $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))) ) ); $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 { $_482 = FALSE; break; } else { $_494 = FALSE; break; }
$res_481 = $result; $res_493 = $result;
$pos_481 = $this->pos; $pos_493 = $this->pos;
$_480 = NULL; $_492 = 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 { $_480 = FALSE; break; } else { $_492 = FALSE; break; }
$_480 = TRUE; break; $_492 = TRUE; break;
} }
while(0); while(0);
if( $_480 === FALSE) { if( $_492 === FALSE) {
$result = $res_481; $result = $res_493;
$this->pos = $pos_481; $this->pos = $pos_493;
unset( $res_481 ); unset( $res_493 );
unset( $pos_481 ); unset( $pos_493 );
} }
$_482 = TRUE; break; $_494 = TRUE; break;
} }
while(0); while(0);
if( $_482 === TRUE ) { return $this->finalise($result); } if( $_494 === TRUE ) { return $this->finalise($result); }
if( $_482 === FALSE) { return FALSE; } if( $_494 === FALSE) { return FALSE; }
} }
@ -2824,23 +2878,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);
$_490 = NULL; $_502 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_490 = FALSE; break; } else { $_502 = 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 { $_490 = FALSE; break; } else { $_502 = 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 { $_490 = FALSE; break; } else { $_502 = FALSE; break; }
$_490 = TRUE; break; $_502 = TRUE; break;
} }
while(0); while(0);
if( $_490 === TRUE ) { return $this->finalise($result); } if( $_502 === TRUE ) { return $this->finalise($result); }
if( $_490 === FALSE) { return FALSE; } if( $_502 === FALSE) { return FALSE; }
} }
@ -2853,49 +2907,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);
$_507 = NULL; $_519 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = 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 { $_507 = FALSE; break; } else { $_519 = FALSE; break; }
$_507 = TRUE; break; $_519 = TRUE; break;
} }
while(0); while(0);
if( $_507 === TRUE ) { return $this->finalise($result); } if( $_519 === TRUE ) { return $this->finalise($result); }
if( $_507 === FALSE) { return FALSE; } if( $_519 === FALSE) { return FALSE; }
} }
@ -2916,31 +2970,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);
$_512 = NULL; $_524 = NULL;
do { do {
$res_509 = $result; $res_521 = $result;
$pos_509 = $this->pos; $pos_521 = $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 );
$_512 = TRUE; break; $_524 = TRUE; break;
} }
$result = $res_509; $result = $res_521;
$this->pos = $pos_509; $this->pos = $pos_521;
$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 );
$_512 = TRUE; break; $_524 = TRUE; break;
} }
$result = $res_509; $result = $res_521;
$this->pos = $pos_509; $this->pos = $pos_521;
$_512 = FALSE; break; $_524 = FALSE; break;
} }
while(0); while(0);
if( $_512 === TRUE ) { return $this->finalise($result); } if( $_524 === TRUE ) { return $this->finalise($result); }
if( $_512 === FALSE) { return FALSE; } if( $_524 === FALSE) { return FALSE; }
} }
@ -2953,30 +3007,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);
$_517 = NULL; $_529 = 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 { $_517 = FALSE; break; } else { $_529 = 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 { $_517 = FALSE; break; } else { $_529 = 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 { $_517 = FALSE; break; } else { $_529 = FALSE; break; }
$_517 = TRUE; break; $_529 = TRUE; break;
} }
while(0); while(0);
if( $_517 === TRUE ) { return $this->finalise($result); } if( $_529 === TRUE ) { return $this->finalise($result); }
if( $_517 === FALSE) { return FALSE; } if( $_529 === FALSE) { return FALSE; }
} }
@ -2993,75 +3047,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);
$_536 = NULL; $_548 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_536 = FALSE; break; } else { $_548 = 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 { $_536 = FALSE; break; } else { $_548 = 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 { $_536 = FALSE; break; } else { $_548 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_533 = $result; $res_545 = $result;
$pos_533 = $this->pos; $pos_545 = $this->pos;
$_532 = NULL; $_544 = 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 { $_532 = FALSE; break; } else { $_544 = FALSE; break; }
while (true) { while (true) {
$res_531 = $result; $res_543 = $result;
$pos_531 = $this->pos; $pos_543 = $this->pos;
$_530 = NULL; $_542 = 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 { $_530 = FALSE; break; } else { $_542 = 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 { $_530 = FALSE; break; } else { $_542 = FALSE; break; }
$_530 = TRUE; break; $_542 = TRUE; break;
} }
while(0); while(0);
if( $_530 === FALSE) { if( $_542 === FALSE) {
$result = $res_531; $result = $res_543;
$this->pos = $pos_531; $this->pos = $pos_543;
unset( $res_531 ); unset( $res_543 );
unset( $pos_531 ); unset( $pos_543 );
break; break;
} }
} }
$_532 = TRUE; break; $_544 = TRUE; break;
} }
while(0); while(0);
if( $_532 === FALSE) { if( $_544 === FALSE) {
$result = $res_533; $result = $res_545;
$this->pos = $pos_533; $this->pos = $pos_545;
unset( $res_533 ); unset( $res_545 );
unset( $pos_533 ); unset( $pos_545 );
} }
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 { $_536 = FALSE; break; } else { $_548 = FALSE; break; }
$_536 = TRUE; break; $_548 = TRUE; break;
} }
while(0); while(0);
if( $_536 === TRUE ) { return $this->finalise($result); } if( $_548 === TRUE ) { return $this->finalise($result); }
if( $_536 === FALSE) { return FALSE; } if( $_548 === FALSE) { return FALSE; }
} }
@ -3096,48 +3150,48 @@ 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);
$_545 = NULL; $_557 = 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 { $_545 = FALSE; break; } else { $_557 = FALSE; break; }
while (true) { while (true) {
$res_544 = $result; $res_556 = $result;
$pos_544 = $this->pos; $pos_556 = $this->pos;
$_543 = NULL; $_555 = 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 { $_543 = FALSE; break; } else { $_555 = 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 { $_543 = FALSE; break; } else { $_555 = FALSE; break; }
$_543 = TRUE; break; $_555 = TRUE; break;
} }
while(0); while(0);
if( $_543 === FALSE) { if( $_555 === FALSE) {
$result = $res_544; $result = $res_556;
$this->pos = $pos_544; $this->pos = $pos_556;
unset( $res_544 ); unset( $res_556 );
unset( $pos_544 ); unset( $pos_556 );
break; break;
} }
} }
$_545 = TRUE; break; $_557 = TRUE; break;
} }
while(0); while(0);
if( $_545 === TRUE ) { return $this->finalise($result); } if( $_557 === TRUE ) { return $this->finalise($result); }
if( $_545 === FALSE) { return FALSE; } if( $_557 === FALSE) { return FALSE; }
} }
@ -3145,153 +3199,153 @@ class SSTemplateParser extends Parser {
protected $match_NotBlockTag_typestack = array('NotBlockTag'); protected $match_NotBlockTag_typestack = array('NotBlockTag');
function match_NotBlockTag ($stack = array()) { function match_NotBlockTag ($stack = array()) {
$matchrule = "NotBlockTag"; $result = $this->construct($matchrule, $matchrule, null); $matchrule = "NotBlockTag"; $result = $this->construct($matchrule, $matchrule, null);
$_583 = NULL; $_595 = NULL;
do { do {
$res_547 = $result; $res_559 = $result;
$pos_547 = $this->pos; $pos_559 = $this->pos;
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { if (( $subres = $this->literal( 'end_' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_583 = TRUE; break; $_595 = TRUE; break;
} }
$result = $res_547; $result = $res_559;
$this->pos = $pos_547; $this->pos = $pos_559;
$_581 = NULL; $_593 = NULL;
do { do {
$_578 = NULL; $_590 = NULL;
do { do {
$_576 = NULL; $_588 = NULL;
do { do {
$res_549 = $result; $res_561 = $result;
$pos_549 = $this->pos; $pos_561 = $this->pos;
if (( $subres = $this->literal( 'if' ) ) !== FALSE) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_576 = TRUE; break; $_588 = TRUE; break;
} }
$result = $res_549; $result = $res_561;
$this->pos = $pos_549; $this->pos = $pos_561;
$_574 = NULL; $_586 = NULL;
do { do {
$res_551 = $result; $res_563 = $result;
$pos_551 = $this->pos; $pos_563 = $this->pos;
if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_574 = TRUE; break; $_586 = TRUE; break;
} }
$result = $res_551; $result = $res_563;
$this->pos = $pos_551; $this->pos = $pos_563;
$_572 = NULL; $_584 = NULL;
do { do {
$res_553 = $result; $res_565 = $result;
$pos_553 = $this->pos; $pos_565 = $this->pos;
if (( $subres = $this->literal( 'else' ) ) !== FALSE) { if (( $subres = $this->literal( 'else' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_572 = TRUE; break; $_584 = TRUE; break;
} }
$result = $res_553; $result = $res_565;
$this->pos = $pos_553; $this->pos = $pos_565;
$_570 = NULL; $_582 = NULL;
do { do {
$res_555 = $result; $res_567 = $result;
$pos_555 = $this->pos; $pos_567 = $this->pos;
if (( $subres = $this->literal( 'require' ) ) !== FALSE) { if (( $subres = $this->literal( 'require' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_570 = TRUE; break; $_582 = TRUE; break;
} }
$result = $res_555; $result = $res_567;
$this->pos = $pos_555; $this->pos = $pos_567;
$_568 = NULL; $_580 = NULL;
do { do {
$res_557 = $result; $res_569 = $result;
$pos_557 = $this->pos; $pos_569 = $this->pos;
if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_568 = TRUE; break; $_580 = TRUE; break;
} }
$result = $res_557; $result = $res_569;
$this->pos = $pos_557; $this->pos = $pos_569;
$_566 = NULL; $_578 = NULL;
do { do {
$res_559 = $result; $res_571 = $result;
$pos_559 = $this->pos; $pos_571 = $this->pos;
if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_566 = TRUE; break; $_578 = TRUE; break;
} }
$result = $res_559; $result = $res_571;
$this->pos = $pos_559; $this->pos = $pos_571;
$_564 = NULL; $_576 = NULL;
do { do {
$res_561 = $result; $res_573 = $result;
$pos_561 = $this->pos; $pos_573 = $this->pos;
if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_564 = TRUE; break; $_576 = TRUE; break;
} }
$result = $res_561; $result = $res_573;
$this->pos = $pos_561; $this->pos = $pos_573;
if (( $subres = $this->literal( 'include' ) ) !== FALSE) { if (( $subres = $this->literal( 'include' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_564 = TRUE; break; $_576 = TRUE; break;
} }
$result = $res_561; $result = $res_573;
$this->pos = $pos_561; $this->pos = $pos_573;
$_564 = FALSE; break; $_576 = FALSE; break;
} }
while(0); while(0);
if( $_564 === TRUE ) { $_566 = TRUE; break; } if( $_576 === TRUE ) { $_578 = TRUE; break; }
$result = $res_559; $result = $res_571;
$this->pos = $pos_559; $this->pos = $pos_571;
$_566 = FALSE; break; $_578 = FALSE; break;
} }
while(0); while(0);
if( $_566 === TRUE ) { $_568 = TRUE; break; } if( $_578 === TRUE ) { $_580 = TRUE; break; }
$result = $res_557; $result = $res_569;
$this->pos = $pos_557; $this->pos = $pos_569;
$_568 = FALSE; break; $_580 = FALSE; break;
} }
while(0); while(0);
if( $_568 === TRUE ) { $_570 = TRUE; break; } if( $_580 === TRUE ) { $_582 = TRUE; break; }
$result = $res_555; $result = $res_567;
$this->pos = $pos_555; $this->pos = $pos_567;
$_570 = FALSE; break; $_582 = FALSE; break;
} }
while(0); while(0);
if( $_570 === TRUE ) { $_572 = TRUE; break; } if( $_582 === TRUE ) { $_584 = TRUE; break; }
$result = $res_553; $result = $res_565;
$this->pos = $pos_553; $this->pos = $pos_565;
$_572 = FALSE; break; $_584 = FALSE; break;
} }
while(0); while(0);
if( $_572 === TRUE ) { $_574 = TRUE; break; } if( $_584 === TRUE ) { $_586 = TRUE; break; }
$result = $res_551; $result = $res_563;
$this->pos = $pos_551; $this->pos = $pos_563;
$_574 = FALSE; break; $_586 = FALSE; break;
} }
while(0); while(0);
if( $_574 === TRUE ) { $_576 = TRUE; break; } if( $_586 === TRUE ) { $_588 = TRUE; break; }
$result = $res_549; $result = $res_561;
$this->pos = $pos_549; $this->pos = $pos_561;
$_576 = FALSE; break; $_588 = FALSE; break;
} }
while(0); while(0);
if( $_576 === FALSE) { $_578 = FALSE; break; } if( $_588 === FALSE) { $_590 = FALSE; break; }
$_578 = TRUE; break; $_590 = TRUE; break;
} }
while(0); while(0);
if( $_578 === FALSE) { $_581 = FALSE; break; } if( $_590 === FALSE) { $_593 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_581 = FALSE; break; } else { $_593 = FALSE; break; }
$_581 = TRUE; break; $_593 = TRUE; break;
} }
while(0); while(0);
if( $_581 === TRUE ) { $_583 = TRUE; break; } if( $_593 === TRUE ) { $_595 = TRUE; break; }
$result = $res_547; $result = $res_559;
$this->pos = $pos_547; $this->pos = $pos_559;
$_583 = FALSE; break; $_595 = FALSE; break;
} }
while(0); while(0);
if( $_583 === TRUE ) { return $this->finalise($result); } if( $_595 === TRUE ) { return $this->finalise($result); }
if( $_583 === FALSE) { return FALSE; } if( $_595 === FALSE) { return FALSE; }
} }
@ -3299,53 +3353,53 @@ class SSTemplateParser extends Parser {
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);
$_603 = NULL; $_615 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_603 = FALSE; break; } else { $_615 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_587 = $result; $res_599 = $result;
$pos_587 = $this->pos; $pos_599 = $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_587; $result = $res_599;
$this->pos = $pos_587; $this->pos = $pos_599;
$_603 = FALSE; break; $_615 = FALSE; break;
} }
else { else {
$result = $res_587; $result = $res_599;
$this->pos = $pos_587; $this->pos = $pos_599;
} }
$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 { $_603 = FALSE; break; } else { $_615 = FALSE; break; }
$res_593 = $result; $res_605 = $result;
$pos_593 = $this->pos; $pos_605 = $this->pos;
$_592 = NULL; $_604 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_592 = FALSE; break; } else { $_604 = 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 { $_592 = FALSE; break; } else { $_604 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_592 = FALSE; break; } else { $_604 = FALSE; break; }
$_592 = TRUE; break; $_604 = TRUE; break;
} }
while(0); while(0);
if( $_592 === FALSE) { if( $_604 === FALSE) {
$result = $res_593; $result = $res_605;
$this->pos = $pos_593; $this->pos = $pos_605;
unset( $res_593 ); unset( $res_605 );
unset( $pos_593 ); unset( $pos_605 );
} }
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" );
@ -3356,36 +3410,36 @@ class SSTemplateParser extends Parser {
} }
else { else {
$result = array_pop($stack); $result = array_pop($stack);
$_603 = FALSE; break; $_615 = FALSE; break;
} }
$res_596 = $result; $res_608 = $result;
$pos_596 = $this->pos; $pos_608 = $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_596; $result = $res_608;
$this->pos = $pos_596; $this->pos = $pos_608;
unset( $res_596 ); unset( $res_608 );
unset( $pos_596 ); unset( $pos_608 );
} }
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_603 = FALSE; break; } else { $_615 = 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 { $_603 = FALSE; break; } else { $_615 = 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 { $_603 = FALSE; break; } else { $_615 = 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 { $_603 = FALSE; break; } else { $_615 = FALSE; break; }
$_603 = TRUE; break; $_615 = TRUE; break;
} }
while(0); while(0);
if( $_603 === TRUE ) { return $this->finalise($result); } if( $_615 === TRUE ) { return $this->finalise($result); }
if( $_603 === FALSE) { return FALSE; } if( $_615 === FALSE) { return FALSE; }
} }
@ -3488,62 +3542,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);
$_616 = NULL; $_628 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_616 = FALSE; break; } else { $_628 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_607 = $result; $res_619 = $result;
$pos_607 = $this->pos; $pos_619 = $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_607; $result = $res_619;
$this->pos = $pos_607; $this->pos = $pos_619;
$_616 = FALSE; break; $_628 = FALSE; break;
} }
else { else {
$result = $res_607; $result = $res_619;
$this->pos = $pos_607; $this->pos = $pos_619;
} }
$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 { $_616 = FALSE; break; } else { $_628 = FALSE; break; }
$res_613 = $result; $res_625 = $result;
$pos_613 = $this->pos; $pos_625 = $this->pos;
$_612 = NULL; $_624 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_612 = FALSE; break; } else { $_624 = 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 { $_612 = FALSE; break; } else { $_624 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_612 = FALSE; break; } else { $_624 = FALSE; break; }
$_612 = TRUE; break; $_624 = TRUE; break;
} }
while(0); while(0);
if( $_612 === FALSE) { if( $_624 === FALSE) {
$result = $res_613; $result = $res_625;
$this->pos = $pos_613; $this->pos = $pos_625;
unset( $res_613 ); unset( $res_625 );
unset( $pos_613 ); unset( $pos_625 );
} }
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 { $_616 = FALSE; break; } else { $_628 = FALSE; break; }
$_616 = TRUE; break; $_628 = TRUE; break;
} }
while(0); while(0);
if( $_616 === TRUE ) { return $this->finalise($result); } if( $_628 === TRUE ) { return $this->finalise($result); }
if( $_616 === FALSE) { return FALSE; } if( $_628 === FALSE) { return FALSE; }
} }
@ -3611,27 +3665,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);
$_624 = NULL; $_636 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_624 = FALSE; break; } else { $_636 = 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 { $_624 = FALSE; break; } else { $_636 = 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 { $_624 = FALSE; break; } else { $_636 = 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 { $_624 = FALSE; break; } else { $_636 = FALSE; break; }
$_624 = TRUE; break; $_636 = TRUE; break;
} }
while(0); while(0);
if( $_624 === TRUE ) { return $this->finalise($result); } if( $_636 === TRUE ) { return $this->finalise($result); }
if( $_624 === FALSE) { return FALSE; } if( $_636 === FALSE) { return FALSE; }
} }
@ -3645,122 +3699,58 @@ 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);
$_639 = NULL; $_651 = NULL;
do { do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_639 = FALSE; break; } else { $_651 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_628 = $result; $res_640 = $result;
$pos_628 = $this->pos; $pos_640 = $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_628; $result = $res_640;
$this->pos = $pos_628; $this->pos = $pos_640;
$_639 = FALSE; break; $_651 = FALSE; break;
} }
else { else {
$result = $res_628; $result = $res_640;
$this->pos = $pos_628; $this->pos = $pos_640;
} }
$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 { $_639 = FALSE; break; } else { $_651 = FALSE; break; }
$res_638 = $result; $res_650 = $result;
$pos_638 = $this->pos; $pos_650 = $this->pos;
$_637 = NULL; $_649 = NULL;
do { do {
$res_634 = $result; $res_646 = $result;
$pos_634 = $this->pos; $pos_646 = $this->pos;
$_633 = NULL; $_645 = NULL;
do { do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_633 = FALSE; break; } else { $_645 = 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 { $_633 = FALSE; break; } else { $_645 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_633 = FALSE; break; } else { $_645 = FALSE; break; }
$_633 = TRUE; break; $_645 = TRUE; break;
} }
while(0); while(0);
if( $_633 === FALSE) { if( $_645 === FALSE) {
$result = $res_634; $result = $res_646;
$this->pos = $pos_634; $this->pos = $pos_646;
unset( $res_634 ); unset( $res_646 );
unset( $pos_634 ); unset( $pos_646 );
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_637 = FALSE; break; }
$_637 = TRUE; break;
}
while(0);
if( $_637 === TRUE ) {
$result = $res_638;
$this->pos = $pos_638;
$_639 = FALSE; break;
}
if( $_637 === FALSE) {
$result = $res_638;
$this->pos = $pos_638;
}
$_639 = TRUE; break;
}
while(0);
if( $_639 === TRUE ) { return $this->finalise($result); }
if( $_639 === FALSE) { return FALSE; }
}
function MalformedOpenTag__finalise(&$res) {
$tag = $res['Tag']['text'];
throw new SSTemplateParseException("Malformed opening block tag $tag. Perhaps you have tried to use operators?", $this);
}
/* MalformedCloseTag: '<%' < Tag:('end_' :Word ) !( > '%>' ) */
protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag');
function match_MalformedCloseTag ($stack = array()) {
$matchrule = "MalformedCloseTag"; $result = $this->construct($matchrule, $matchrule, null);
$_651 = NULL;
do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_651 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Tag" );
$_645 = NULL;
do {
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_645 = FALSE; break; }
$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, "Word" );
}
else { $_645 = FALSE; break; }
$_645 = TRUE; break;
}
while(0);
if( $_645 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Tag' );
}
if( $_645 === FALSE) {
$result = array_pop($stack);
$_651 = FALSE; break;
}
$res_650 = $result;
$pos_650 = $this->pos;
$_649 = NULL;
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 { $_649 = FALSE; break; } else { $_649 = FALSE; break; }
@ -3785,6 +3775,70 @@ class SSTemplateParser extends Parser {
function MalformedOpenTag__finalise(&$res) {
$tag = $res['Tag']['text'];
throw new SSTemplateParseException("Malformed opening block tag $tag. Perhaps you have tried to use operators?", $this);
}
/* MalformedCloseTag: '<%' < Tag:('end_' :Word ) !( > '%>' ) */
protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag');
function match_MalformedCloseTag ($stack = array()) {
$matchrule = "MalformedCloseTag"; $result = $this->construct($matchrule, $matchrule, null);
$_663 = NULL;
do {
if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_663 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Tag" );
$_657 = NULL;
do {
if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_657 = FALSE; break; }
$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, "Word" );
}
else { $_657 = FALSE; break; }
$_657 = TRUE; break;
}
while(0);
if( $_657 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Tag' );
}
if( $_657 === FALSE) {
$result = array_pop($stack);
$_663 = FALSE; break;
}
$res_662 = $result;
$pos_662 = $this->pos;
$_661 = NULL;
do {
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_661 = FALSE; break; }
$_661 = TRUE; break;
}
while(0);
if( $_661 === TRUE ) {
$result = $res_662;
$this->pos = $pos_662;
$_663 = FALSE; break;
}
if( $_661 === FALSE) {
$result = $res_662;
$this->pos = $pos_662;
}
$_663 = TRUE; break;
}
while(0);
if( $_663 === TRUE ) { return $this->finalise($result); }
if( $_663 === FALSE) { return FALSE; }
}
function MalformedCloseTag__finalise(&$res) { function MalformedCloseTag__finalise(&$res) {
$tag = $res['Tag']['text']; $tag = $res['Tag']['text'];
throw new SSTemplateParseException("Malformed closing block tag $tag. Perhaps you have tried to pass an argument to one?", $this); throw new SSTemplateParseException("Malformed closing block tag $tag. Perhaps you have tried to pass an argument to one?", $this);
@ -3794,31 +3848,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);
$_656 = NULL; $_668 = NULL;
do { do {
$res_653 = $result; $res_665 = $result;
$pos_653 = $this->pos; $pos_665 = $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 );
$_656 = TRUE; break; $_668 = TRUE; break;
} }
$result = $res_653; $result = $res_665;
$this->pos = $pos_653; $this->pos = $pos_665;
$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 );
$_656 = TRUE; break; $_668 = TRUE; break;
} }
$result = $res_653; $result = $res_665;
$this->pos = $pos_653; $this->pos = $pos_665;
$_656 = FALSE; break; $_668 = FALSE; break;
} }
while(0); while(0);
if( $_656 === TRUE ) { return $this->finalise($result); } if( $_668 === TRUE ) { return $this->finalise($result); }
if( $_656 === FALSE) { return FALSE; } if( $_668 === FALSE) { return FALSE; }
} }
@ -3828,51 +3882,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);
$_664 = NULL; $_676 = NULL;
do { do {
if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_664 = FALSE; break; } else { $_676 = FALSE; break; }
$count = 0; $count = 0;
while (true) { while (true) {
$res_662 = $result; $res_674 = $result;
$pos_662 = $this->pos; $pos_674 = $this->pos;
$_661 = NULL; $_673 = NULL;
do { do {
$res_659 = $result; $res_671 = $result;
$pos_659 = $this->pos; $pos_671 = $this->pos;
if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { if (( $subres = $this->literal( '--%>' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$result = $res_659; $result = $res_671;
$this->pos = $pos_659; $this->pos = $pos_671;
$_661 = FALSE; break; $_673 = FALSE; break;
} }
else { else {
$result = $res_659; $result = $res_671;
$this->pos = $pos_659; $this->pos = $pos_671;
} }
if (( $subres = $this->rx( '/./' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->rx( '/./' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_661 = FALSE; break; } else { $_673 = FALSE; break; }
$_661 = TRUE; break; $_673 = TRUE; break;
} }
while(0); while(0);
if( $_661 === FALSE) { if( $_673 === FALSE) {
$result = $res_662; $result = $res_674;
$this->pos = $pos_662; $this->pos = $pos_674;
unset( $res_662 ); unset( $res_674 );
unset( $pos_662 ); unset( $pos_674 );
break; break;
} }
$count += 1; $count += 1;
} }
if ($count > 0) { } if ($count > 0) { }
else { $_664 = FALSE; break; } else { $_676 = FALSE; break; }
if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_664 = FALSE; break; } else { $_676 = FALSE; break; }
$_664 = TRUE; break; $_676 = TRUE; break;
} }
while(0); while(0);
if( $_664 === TRUE ) { return $this->finalise($result); } if( $_676 === TRUE ) { return $this->finalise($result); }
if( $_664 === FALSE) { return FALSE; } if( $_676 === FALSE) { return FALSE; }
} }
@ -3881,246 +3935,264 @@ class SSTemplateParser extends Parser {
$res['php'] = ''; $res['php'] = '';
} }
/* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | MismatchedEndBlock | Injection | Text)+ */ /* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | 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_716 = $result; $res_732 = $result;
$pos_716 = $this->pos; $pos_732 = $this->pos;
$_715 = NULL; $_731 = NULL;
do { do {
$_713 = NULL; $_729 = NULL;
do { do {
$res_666 = $result; $res_678 = $result;
$pos_666 = $this->pos; $pos_678 = $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 );
$_713 = TRUE; break; $_729 = TRUE; break;
} }
$result = $res_666; $result = $res_678;
$this->pos = $pos_666; $this->pos = $pos_678;
$_711 = NULL; $_727 = NULL;
do { do {
$res_668 = $result; $res_680 = $result;
$pos_668 = $this->pos; $pos_680 = $this->pos;
$matcher = 'match_'.'Translate'; $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 );
$_711 = TRUE; break; $_727 = TRUE; break;
} }
$result = $res_668; $result = $res_680;
$this->pos = $pos_668; $this->pos = $pos_680;
$_709 = NULL; $_725 = NULL;
do { do {
$res_670 = $result; $res_682 = $result;
$pos_670 = $this->pos; $pos_682 = $this->pos;
$matcher = 'match_'.'If'; $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 );
$_709 = TRUE; break; $_725 = TRUE; break;
} }
$result = $res_670; $result = $res_682;
$this->pos = $pos_670; $this->pos = $pos_682;
$_707 = NULL; $_723 = NULL;
do { do {
$res_672 = $result; $res_684 = $result;
$pos_672 = $this->pos; $pos_684 = $this->pos;
$matcher = 'match_'.'Require'; $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 );
$_707 = TRUE; break; $_723 = TRUE; break;
} }
$result = $res_672; $result = $res_684;
$this->pos = $pos_672; $this->pos = $pos_684;
$_705 = NULL; $_721 = NULL;
do { do {
$res_674 = $result; $res_686 = $result;
$pos_674 = $this->pos; $pos_686 = $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 );
$_705 = TRUE; break; $_721 = TRUE; break;
} }
$result = $res_674; $result = $res_686;
$this->pos = $pos_674; $this->pos = $pos_686;
$_703 = NULL; $_719 = NULL;
do { do {
$res_676 = $result; $res_688 = $result;
$pos_676 = $this->pos; $pos_688 = $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 );
$_703 = TRUE; break; $_719 = TRUE; break;
} }
$result = $res_676; $result = $res_688;
$this->pos = $pos_676; $this->pos = $pos_688;
$_701 = NULL; $_717 = NULL;
do { do {
$res_678 = $result; $res_690 = $result;
$pos_678 = $this->pos; $pos_690 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $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 );
$_701 = TRUE; break; $_717 = TRUE; break;
} }
$result = $res_678; $result = $res_690;
$this->pos = $pos_678; $this->pos = $pos_690;
$_699 = NULL; $_715 = NULL;
do { do {
$res_680 = $result; $res_692 = $result;
$pos_680 = $this->pos; $pos_692 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; $matcher = 'match_'.'Include'; $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 );
$_699 = TRUE; break; $_715 = TRUE; break;
} }
$result = $res_680; $result = $res_692;
$this->pos = $pos_680; $this->pos = $pos_692;
$_697 = NULL; $_713 = NULL;
do { do {
$res_682 = $result; $res_694 = $result;
$pos_682 = $this->pos; $pos_694 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $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 );
$_697 = TRUE; break; $_713 = TRUE; break;
} }
$result = $res_682; $result = $res_694;
$this->pos = $pos_682; $this->pos = $pos_694;
$_695 = NULL; $_711 = NULL;
do { do {
$res_684 = $result; $res_696 = $result;
$pos_684 = $this->pos; $pos_696 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $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 );
$_695 = TRUE; break; $_711 = TRUE; break;
} }
$result = $res_684; $result = $res_696;
$this->pos = $pos_684; $this->pos = $pos_696;
$_693 = NULL; $_709 = NULL;
do { do {
$res_686 = $result; $res_698 = $result;
$pos_686 = $this->pos; $pos_698 = $this->pos;
$matcher = 'match_'.'MismatchedEndBlock'; $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 );
$_693 = TRUE; break; $_709 = TRUE; break;
} }
$result = $res_686; $result = $res_698;
$this->pos = $pos_686; $this->pos = $pos_698;
$_691 = NULL; $_707 = NULL;
do { do {
$res_688 = $result; $res_700 = $result;
$pos_688 = $this->pos; $pos_700 = $this->pos;
$matcher = 'match_'.'Injection'; $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 );
$_691 = TRUE; break; $_707 = TRUE; break;
} }
$result = $res_688; $result = $res_700;
$this->pos = $pos_688; $this->pos = $pos_700;
$matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; $_705 = NULL;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); do {
if ($subres !== FALSE) { $res_702 = $result;
$this->store( $result, $subres ); $pos_702 = $this->pos;
$_691 = TRUE; break; $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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_705 = TRUE; break;
}
$result = $res_702;
$this->pos = $pos_702;
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_705 = TRUE; break;
}
$result = $res_702;
$this->pos = $pos_702;
$_705 = FALSE; break;
} }
$result = $res_688; while(0);
$this->pos = $pos_688; if( $_705 === TRUE ) { $_707 = TRUE; break; }
$_691 = FALSE; break; $result = $res_700;
$this->pos = $pos_700;
$_707 = FALSE; break;
} }
while(0); while(0);
if( $_691 === TRUE ) { $_693 = TRUE; break; } if( $_707 === TRUE ) { $_709 = TRUE; break; }
$result = $res_686; $result = $res_698;
$this->pos = $pos_686; $this->pos = $pos_698;
$_693 = FALSE; break; $_709 = FALSE; break;
} }
while(0); while(0);
if( $_693 === TRUE ) { $_695 = TRUE; break; } if( $_709 === TRUE ) { $_711 = TRUE; break; }
$result = $res_684; $result = $res_696;
$this->pos = $pos_684; $this->pos = $pos_696;
$_695 = FALSE; break; $_711 = FALSE; break;
} }
while(0); while(0);
if( $_695 === TRUE ) { $_697 = TRUE; break; } if( $_711 === TRUE ) { $_713 = TRUE; break; }
$result = $res_682; $result = $res_694;
$this->pos = $pos_682; $this->pos = $pos_694;
$_697 = FALSE; break; $_713 = FALSE; break;
} }
while(0); while(0);
if( $_697 === TRUE ) { $_699 = TRUE; break; } if( $_713 === TRUE ) { $_715 = TRUE; break; }
$result = $res_680; $result = $res_692;
$this->pos = $pos_680; $this->pos = $pos_692;
$_699 = FALSE; break; $_715 = FALSE; break;
} }
while(0); while(0);
if( $_699 === TRUE ) { $_701 = TRUE; break; } if( $_715 === TRUE ) { $_717 = TRUE; break; }
$result = $res_678; $result = $res_690;
$this->pos = $pos_678; $this->pos = $pos_690;
$_701 = FALSE; break; $_717 = FALSE; break;
} }
while(0); while(0);
if( $_701 === TRUE ) { $_703 = TRUE; break; } if( $_717 === TRUE ) { $_719 = TRUE; break; }
$result = $res_676; $result = $res_688;
$this->pos = $pos_676; $this->pos = $pos_688;
$_703 = FALSE; break; $_719 = FALSE; break;
} }
while(0); while(0);
if( $_703 === TRUE ) { $_705 = TRUE; break; } if( $_719 === TRUE ) { $_721 = TRUE; break; }
$result = $res_674; $result = $res_686;
$this->pos = $pos_674; $this->pos = $pos_686;
$_705 = FALSE; break; $_721 = FALSE; break;
} }
while(0); while(0);
if( $_705 === TRUE ) { $_707 = TRUE; break; } if( $_721 === TRUE ) { $_723 = TRUE; break; }
$result = $res_672; $result = $res_684;
$this->pos = $pos_672; $this->pos = $pos_684;
$_707 = FALSE; break; $_723 = FALSE; break;
} }
while(0); while(0);
if( $_707 === TRUE ) { $_709 = TRUE; break; } if( $_723 === TRUE ) { $_725 = TRUE; break; }
$result = $res_670; $result = $res_682;
$this->pos = $pos_670; $this->pos = $pos_682;
$_709 = FALSE; break; $_725 = FALSE; break;
} }
while(0); while(0);
if( $_709 === TRUE ) { $_711 = TRUE; break; } if( $_725 === TRUE ) { $_727 = TRUE; break; }
$result = $res_668; $result = $res_680;
$this->pos = $pos_668; $this->pos = $pos_680;
$_711 = FALSE; break; $_727 = FALSE; break;
} }
while(0); while(0);
if( $_711 === TRUE ) { $_713 = TRUE; break; } if( $_727 === TRUE ) { $_729 = TRUE; break; }
$result = $res_666; $result = $res_678;
$this->pos = $pos_666; $this->pos = $pos_678;
$_713 = FALSE; break; $_729 = FALSE; break;
} }
while(0); while(0);
if( $_713 === FALSE) { $_715 = FALSE; break; } if( $_729 === FALSE) { $_731 = FALSE; break; }
$_715 = TRUE; break; $_731 = TRUE; break;
} }
while(0); while(0);
if( $_715 === FALSE) { if( $_731 === FALSE) {
$result = $res_716; $result = $res_732;
$this->pos = $pos_716; $this->pos = $pos_732;
unset( $res_716 ); unset( $res_732 );
unset( $pos_716 ); unset( $pos_732 );
break; break;
} }
$count += 1; $count += 1;
@ -4152,189 +4224,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_755 = $result; $res_771 = $result;
$pos_755 = $this->pos; $pos_771 = $this->pos;
$_754 = NULL; $_770 = NULL;
do { do {
$_752 = NULL; $_768 = NULL;
do { do {
$res_717 = $result; $res_733 = $result;
$pos_717 = $this->pos; $pos_733 = $this->pos;
if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) { if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_752 = TRUE; break; $_768 = TRUE; break;
} }
$result = $res_717; $result = $res_733;
$this->pos = $pos_717; $this->pos = $pos_733;
$_750 = NULL; $_766 = NULL;
do { do {
$res_719 = $result; $res_735 = $result;
$pos_719 = $this->pos; $pos_735 = $this->pos;
if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) { if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_750 = TRUE; break; $_766 = TRUE; break;
} }
$result = $res_719; $result = $res_735;
$this->pos = $pos_719; $this->pos = $pos_735;
$_748 = NULL; $_764 = NULL;
do { do {
$res_721 = $result; $res_737 = $result;
$pos_721 = $this->pos; $pos_737 = $this->pos;
$_724 = NULL; $_740 = 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 { $_724 = FALSE; break; } else { $_740 = FALSE; break; }
$res_723 = $result; $res_739 = $result;
$pos_723 = $this->pos; $pos_739 = $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_723; $result = $res_739;
$this->pos = $pos_723; $this->pos = $pos_739;
$_724 = FALSE; break; $_740 = FALSE; break;
} }
else { else {
$result = $res_723; $result = $res_739;
$this->pos = $pos_723; $this->pos = $pos_739;
} }
$_724 = TRUE; break; $_740 = TRUE; break;
} }
while(0); while(0);
if( $_724 === TRUE ) { $_748 = TRUE; break; } if( $_740 === TRUE ) { $_764 = TRUE; break; }
$result = $res_721; $result = $res_737;
$this->pos = $pos_721; $this->pos = $pos_737;
$_746 = NULL; $_762 = NULL;
do { do {
$res_726 = $result; $res_742 = $result;
$pos_726 = $this->pos; $pos_742 = $this->pos;
$_731 = NULL; $_747 = 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 { $_731 = FALSE; break; } else { $_747 = FALSE; break; }
$res_730 = $result; $res_746 = $result;
$pos_730 = $this->pos; $pos_746 = $this->pos;
$_729 = NULL; $_745 = 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 { $_729 = FALSE; break; } else { $_745 = FALSE; break; }
$_729 = TRUE; break; $_745 = TRUE; break;
} }
while(0); while(0);
if( $_729 === TRUE ) { if( $_745 === TRUE ) {
$result = $res_730; $result = $res_746;
$this->pos = $pos_730; $this->pos = $pos_746;
$_731 = FALSE; break; $_747 = FALSE; break;
} }
if( $_729 === FALSE) { if( $_745 === FALSE) {
$result = $res_730; $result = $res_746;
$this->pos = $pos_730; $this->pos = $pos_746;
} }
$_731 = TRUE; break; $_747 = TRUE; break;
} }
while(0); while(0);
if( $_731 === TRUE ) { $_746 = TRUE; break; } if( $_747 === TRUE ) { $_762 = TRUE; break; }
$result = $res_726; $result = $res_742;
$this->pos = $pos_726; $this->pos = $pos_742;
$_744 = NULL; $_760 = NULL;
do { do {
$res_733 = $result; $res_749 = $result;
$pos_733 = $this->pos; $pos_749 = $this->pos;
$_736 = NULL; $_752 = 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 { $_736 = FALSE; break; } else { $_752 = FALSE; break; }
$res_735 = $result; $res_751 = $result;
$pos_735 = $this->pos; $pos_751 = $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_735; $result = $res_751;
$this->pos = $pos_735; $this->pos = $pos_751;
$_736 = FALSE; break; $_752 = FALSE; break;
} }
else { else {
$result = $res_735; $result = $res_751;
$this->pos = $pos_735; $this->pos = $pos_751;
} }
$_736 = TRUE; break; $_752 = TRUE; break;
} }
while(0); while(0);
if( $_736 === TRUE ) { $_744 = TRUE; break; } if( $_752 === TRUE ) { $_760 = TRUE; break; }
$result = $res_733; $result = $res_749;
$this->pos = $pos_733; $this->pos = $pos_749;
$_742 = NULL; $_758 = NULL;
do { do {
if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; } if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_742 = FALSE; break; } else { $_758 = FALSE; break; }
$res_741 = $result; $res_757 = $result;
$pos_741 = $this->pos; $pos_757 = $this->pos;
$_740 = NULL; $_756 = 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 { $_740 = FALSE; break; } else { $_756 = FALSE; break; }
$_740 = TRUE; break; $_756 = TRUE; break;
} }
while(0); while(0);
if( $_740 === TRUE ) { if( $_756 === TRUE ) {
$result = $res_741; $result = $res_757;
$this->pos = $pos_741; $this->pos = $pos_757;
$_742 = FALSE; break; $_758 = FALSE; break;
} }
if( $_740 === FALSE) { if( $_756 === FALSE) {
$result = $res_741; $result = $res_757;
$this->pos = $pos_741; $this->pos = $pos_757;
} }
$_742 = TRUE; break; $_758 = TRUE; break;
} }
while(0); while(0);
if( $_742 === TRUE ) { $_744 = TRUE; break; } if( $_758 === TRUE ) { $_760 = TRUE; break; }
$result = $res_733; $result = $res_749;
$this->pos = $pos_733; $this->pos = $pos_749;
$_744 = FALSE; break; $_760 = FALSE; break;
} }
while(0); while(0);
if( $_744 === TRUE ) { $_746 = TRUE; break; } if( $_760 === TRUE ) { $_762 = TRUE; break; }
$result = $res_726; $result = $res_742;
$this->pos = $pos_726; $this->pos = $pos_742;
$_746 = FALSE; break; $_762 = FALSE; break;
} }
while(0); while(0);
if( $_746 === TRUE ) { $_748 = TRUE; break; } if( $_762 === TRUE ) { $_764 = TRUE; break; }
$result = $res_721; $result = $res_737;
$this->pos = $pos_721; $this->pos = $pos_737;
$_748 = FALSE; break; $_764 = FALSE; break;
} }
while(0); while(0);
if( $_748 === TRUE ) { $_750 = TRUE; break; } if( $_764 === TRUE ) { $_766 = TRUE; break; }
$result = $res_719; $result = $res_735;
$this->pos = $pos_719; $this->pos = $pos_735;
$_750 = FALSE; break; $_766 = FALSE; break;
} }
while(0); while(0);
if( $_750 === TRUE ) { $_752 = TRUE; break; } if( $_766 === TRUE ) { $_768 = TRUE; break; }
$result = $res_717; $result = $res_733;
$this->pos = $pos_717; $this->pos = $pos_733;
$_752 = FALSE; break; $_768 = FALSE; break;
} }
while(0); while(0);
if( $_752 === FALSE) { $_754 = FALSE; break; } if( $_768 === FALSE) { $_770 = FALSE; break; }
$_754 = TRUE; break; $_770 = TRUE; break;
} }
while(0); while(0);
if( $_754 === FALSE) { if( $_770 === FALSE) {
$result = $res_755; $result = $res_771;
$this->pos = $pos_755; $this->pos = $pos_771;
unset( $res_755 ); unset( $res_771 );
unset( $pos_755 ); unset( $pos_771 );
break; break;
} }
$count += 1; $count += 1;

View File

@ -103,7 +103,7 @@ class SSTemplateParser extends Parser {
# 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. # Any new template elements need to be included in this list, if they are to work.
Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | ClosedBlock | OpenBlock | MalformedBlock | Injection | Text)+ Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | 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 ;