API Enable namespaced-localisation keys in templates

BUG Fix whitespaces in SSTemplateParser.peg
This commit is contained in:
Damian Mooyman 2017-04-10 14:11:58 +12:00
parent d294709aec
commit f2768c85b1
5 changed files with 3886 additions and 5457 deletions

View File

@ -79,6 +79,9 @@ script:
- if [[ $BEHAT_TEST == framework ]]; then vendor/bin/behat --config tests/behat/config.yml .; fi - if [[ $BEHAT_TEST == framework ]]; then vendor/bin/behat --config tests/behat/config.yml .; fi
- if [[ $BEHAT_TEST == cms ]]; then vendor/bin/behat @cms --config tests/behat/cms-config.yml; fi - if [[ $BEHAT_TEST == cms ]]; then vendor/bin/behat @cms --config tests/behat/cms-config.yml; fi
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi - if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
- if [[ $PHPCS_TEST ]]; then composer run-script php-peg; fi
- if [[ $PHPCS_TEST ]]; then git diff-files --quiet -w --relative=src; fi
- if [[ $PHPCS_TEST ]]; then git diff -w --no-color --relative=src; fi
after_success: after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

View File

@ -72,7 +72,8 @@
"thirdparty/" "thirdparty/"
], ],
"scripts": { "scripts": {
"lint": "phpcs --standard=tests/phpcs/ruleset.xml src/ tests/php" "lint": "phpcs --standard=tests/phpcs/ruleset.xml src/ tests/php",
"php-peg": "php thirdparty/php-peg/cli.php src/View/SSTemplateParser.peg > src/View/SSTemplateParser.php"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"prefer-stable": true "prefer-stable": true

View File

@ -10,9 +10,9 @@ It gets run through the php-peg parser compiler to have those comments turned in
template language, producing the executable version SSTemplateParser.php template language, producing the executable version SSTemplateParser.php
To recompile after changing this file, run this from the 'framework/View' directory via command line (in most cases To recompile after changing this file, run this from the 'framework/View' directory via command line (in most cases
this is: sapphire/view): this is: framework/src/View):
php ../thirdparty/php-peg/cli.php SSTemplateParser.peg > SSTemplateParser.php php ../../thirdparty/php-peg/cli.php SSTemplateParser.peg > SSTemplateParser.php
See the php-peg docs for more information on the parser format, and how to convert this file into SSTemplateParser.php See the php-peg docs for more information on the parser format, and how to convert this file into SSTemplateParser.php
@ -311,7 +311,7 @@ class SSTemplateParser extends Parser implements TemplateParser
Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? < Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? <
(InjectionVariables)? > "%>" (InjectionVariables)? > "%>"
InjectionVariables: (< InjectionName:Word "=" Argument)+ InjectionVariables: (< InjectionName:Word "=" Argument)+
Entity: / [A-Za-z_] [\w\.]* / Entity: / [A-Za-z_\\] [\w\.\\]* /
*/ */
function Translate__construct(&$res) function Translate__construct(&$res)

View File

@ -191,317 +191,240 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | /* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock |
OpenBlock | MalformedBlock | Injection | Text)+ */ 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_50 = $result; $res_50 = $result;
$pos_50 = $this->pos; $pos_50 = $this->pos;
$_49 = null; $_49 = NULL;
do { do {
$_47 = null; $_47 = NULL;
do { do {
$res_0 = $result; $res_0 = $result;
$pos_0 = $this->pos; $pos_0 = $this->pos;
$matcher = 'match_'.'Comment'; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$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 );
$_47 = true; $_47 = TRUE; break;
break;
} }
$result = $res_0; $result = $res_0;
$this->pos = $pos_0; $this->pos = $pos_0;
$_45 = null; $_45 = NULL;
do { do {
$res_2 = $result; $res_2 = $result;
$pos_2 = $this->pos; $pos_2 = $this->pos;
$matcher = 'match_'.'Translate'; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$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 );
$_45 = true; $_45 = TRUE; break;
break;
} }
$result = $res_2; $result = $res_2;
$this->pos = $pos_2; $this->pos = $pos_2;
$_43 = null; $_43 = NULL;
do { do {
$res_4 = $result; $res_4 = $result;
$pos_4 = $this->pos; $pos_4 = $this->pos;
$matcher = 'match_'.'If'; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$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 );
$_43 = true; $_43 = TRUE; break;
break;
} }
$result = $res_4; $result = $res_4;
$this->pos = $pos_4; $this->pos = $pos_4;
$_41 = null; $_41 = NULL;
do { do {
$res_6 = $result; $res_6 = $result;
$pos_6 = $this->pos; $pos_6 = $this->pos;
$matcher = 'match_'.'Require'; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$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 );
$_41 = true; $_41 = TRUE; break;
break;
} }
$result = $res_6; $result = $res_6;
$this->pos = $pos_6; $this->pos = $pos_6;
$_39 = null; $_39 = NULL;
do { do {
$res_8 = $result; $res_8 = $result;
$pos_8 = $this->pos; $pos_8 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_39 = true; $_39 = TRUE; break;
break;
} }
$result = $res_8; $result = $res_8;
$this->pos = $pos_8; $this->pos = $pos_8;
$_37 = null; $_37 = NULL;
do { do {
$res_10 = $result; $res_10 = $result;
$pos_10 = $this->pos; $pos_10 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_37 = true; $_37 = TRUE; break;
break;
} }
$result = $res_10; $result = $res_10;
$this->pos = $pos_10; $this->pos = $pos_10;
$_35 = null; $_35 = NULL;
do { do {
$res_12 = $result; $res_12 = $result;
$pos_12 = $this->pos; $pos_12 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_35 = true; $_35 = TRUE; break;
break;
} }
$result = $res_12; $result = $res_12;
$this->pos = $pos_12; $this->pos = $pos_12;
$_33 = null; $_33 = NULL;
do { do {
$res_14 = $result; $res_14 = $result;
$pos_14 = $this->pos; $pos_14 = $this->pos;
$matcher = 'match_'.'Include'; $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos;
$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 );
$_33 = true; $_33 = TRUE; break;
break;
} }
$result = $res_14; $result = $res_14;
$this->pos = $pos_14; $this->pos = $pos_14;
$_31 = null; $_31 = NULL;
do { do {
$res_16 = $result; $res_16 = $result;
$pos_16 = $this->pos; $pos_16 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_31 = true; $_31 = TRUE; break;
break;
} }
$result = $res_16; $result = $res_16;
$this->pos = $pos_16; $this->pos = $pos_16;
$_29 = null; $_29 = NULL;
do { do {
$res_18 = $result; $res_18 = $result;
$pos_18 = $this->pos; $pos_18 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$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; $_29 = TRUE; break;
break;
} }
$result = $res_18; $result = $res_18;
$this->pos = $pos_18; $this->pos = $pos_18;
$_27 = null; $_27 = NULL;
do { do {
$res_20 = $result; $res_20 = $result;
$pos_20 = $this->pos; $pos_20 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$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; $_27 = TRUE; break;
break;
} }
$result = $res_20; $result = $res_20;
$this->pos = $pos_20; $this->pos = $pos_20;
$_25 = null; $_25 = NULL;
do { do {
$res_22 = $result; $res_22 = $result;
$pos_22 = $this->pos; $pos_22 = $this->pos;
$matcher = 'match_'.'Injection'; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$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; $_25 = TRUE; break;
break;
} }
$result = $res_22; $result = $res_22;
$this->pos = $pos_22; $this->pos = $pos_22;
$matcher = 'match_'.'Text'; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$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; $_25 = TRUE; break;
break;
} }
$result = $res_22; $result = $res_22;
$this->pos = $pos_22; $this->pos = $pos_22;
$_25 = false; $_25 = FALSE; break;
break;
} while (0);
if ($_25 === true) {
$_27 = true;
break;
} }
while(0);
if( $_25 === TRUE ) { $_27 = TRUE; break; }
$result = $res_20; $result = $res_20;
$this->pos = $pos_20; $this->pos = $pos_20;
$_27 = false; $_27 = FALSE; break;
break;
} while (0);
if ($_27 === true) {
$_29 = true;
break;
} }
while(0);
if( $_27 === TRUE ) { $_29 = TRUE; break; }
$result = $res_18; $result = $res_18;
$this->pos = $pos_18; $this->pos = $pos_18;
$_29 = false; $_29 = FALSE; break;
break;
} while (0);
if ($_29 === true) {
$_31 = true;
break;
} }
while(0);
if( $_29 === TRUE ) { $_31 = TRUE; break; }
$result = $res_16; $result = $res_16;
$this->pos = $pos_16; $this->pos = $pos_16;
$_31 = false; $_31 = FALSE; break;
break;
} while (0);
if ($_31 === true) {
$_33 = true;
break;
} }
while(0);
if( $_31 === TRUE ) { $_33 = TRUE; break; }
$result = $res_14; $result = $res_14;
$this->pos = $pos_14; $this->pos = $pos_14;
$_33 = false; $_33 = FALSE; break;
break;
} while (0);
if ($_33 === true) {
$_35 = true;
break;
} }
while(0);
if( $_33 === TRUE ) { $_35 = TRUE; break; }
$result = $res_12; $result = $res_12;
$this->pos = $pos_12; $this->pos = $pos_12;
$_35 = false; $_35 = FALSE; break;
break;
} while (0);
if ($_35 === true) {
$_37 = true;
break;
} }
while(0);
if( $_35 === TRUE ) { $_37 = TRUE; break; }
$result = $res_10; $result = $res_10;
$this->pos = $pos_10; $this->pos = $pos_10;
$_37 = false; $_37 = FALSE; break;
break;
} while (0);
if ($_37 === true) {
$_39 = true;
break;
} }
while(0);
if( $_37 === TRUE ) { $_39 = TRUE; break; }
$result = $res_8; $result = $res_8;
$this->pos = $pos_8; $this->pos = $pos_8;
$_39 = false; $_39 = FALSE; break;
break;
} while (0);
if ($_39 === true) {
$_41 = true;
break;
} }
while(0);
if( $_39 === TRUE ) { $_41 = TRUE; break; }
$result = $res_6; $result = $res_6;
$this->pos = $pos_6; $this->pos = $pos_6;
$_41 = false; $_41 = FALSE; break;
break;
} while (0);
if ($_41 === true) {
$_43 = true;
break;
} }
while(0);
if( $_41 === TRUE ) { $_43 = TRUE; break; }
$result = $res_4; $result = $res_4;
$this->pos = $pos_4; $this->pos = $pos_4;
$_43 = false; $_43 = FALSE; break;
break;
} while (0);
if ($_43 === true) {
$_45 = true;
break;
} }
while(0);
if( $_43 === TRUE ) { $_45 = TRUE; break; }
$result = $res_2; $result = $res_2;
$this->pos = $pos_2; $this->pos = $pos_2;
$_45 = false; $_45 = FALSE; break;
break;
} while (0);
if ($_45 === true) {
$_47 = true;
break;
} }
while(0);
if( $_45 === TRUE ) { $_47 = TRUE; break; }
$result = $res_0; $result = $res_0;
$this->pos = $pos_0; $this->pos = $pos_0;
$_47 = false; $_47 = FALSE; break;
break;
} while (0);
if ($_47 === false) {
$_49 = false;
break;
} }
$_49 = true; while(0);
break; if( $_47 === FALSE) { $_49 = FALSE; break; }
} while (0); $_49 = TRUE; break;
if ($_49 === false) { }
while(0);
if( $_49 === FALSE) {
$result = $res_50; $result = $res_50;
$this->pos = $pos_50; $this->pos = $pos_50;
unset( $res_50 ); unset( $res_50 );
@ -510,11 +433,8 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }
@ -526,114 +446,86 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Word: / [A-Za-z_] [A-Za-z0-9_]* / */ /* Word: / [A-Za-z_] [A-Za-z0-9_]* / */
protected $match_Word_typestack = array('Word'); protected $match_Word_typestack = array('Word');
function match_Word($stack = array()) function match_Word ($stack = array()) {
{ $matchrule = "Word"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "Word"; if (( $subres = $this->rx( '/ [A-Za-z_] [A-Za-z0-9_]* /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [A-Za-z_] [A-Za-z0-9_]* /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
/* NamespacedWord: / [A-Za-z_\/\\] [A-Za-z0-9_\/\\]* / */ /* NamespacedWord: / [A-Za-z_\/\\] [A-Za-z0-9_\/\\]* / */
protected $match_NamespacedWord_typestack = array('NamespacedWord'); protected $match_NamespacedWord_typestack = array('NamespacedWord');
function match_NamespacedWord($stack = array()) function match_NamespacedWord ($stack = array()) {
{ $matchrule = "NamespacedWord"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "NamespacedWord"; if (( $subres = $this->rx( '/ [A-Za-z_\/\\\\] [A-Za-z0-9_\/\\\\]* /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [A-Za-z_\/\\\\] [A-Za-z0-9_\/\\\\]* /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
/* Number: / [0-9]+ / */ /* Number: / [0-9]+ / */
protected $match_Number_typestack = array('Number'); protected $match_Number_typestack = array('Number');
function match_Number($stack = array()) function match_Number ($stack = array()) {
{ $matchrule = "Number"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "Number"; if (( $subres = $this->rx( '/ [0-9]+ /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [0-9]+ /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
/* Value: / [A-Za-z0-9_]+ / */ /* Value: / [A-Za-z0-9_]+ / */
protected $match_Value_typestack = array('Value'); protected $match_Value_typestack = array('Value');
function match_Value($stack = array()) function match_Value ($stack = array()) {
{ $matchrule = "Value"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "Value"; if (( $subres = $this->rx( '/ [A-Za-z0-9_]+ /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [A-Za-z0-9_]+ /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
/* CallArguments: :Argument ( < "," < :Argument )* */ /* CallArguments: :Argument ( < "," < :Argument )* */
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"; $_62 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_62 = null;
do { do {
$matcher = 'match_'.'Argument'; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_62 = false;
break;
} }
else { $_62 = FALSE; break; }
while (true) { while (true) {
$res_61 = $result; $res_61 = $result;
$pos_61 = $this->pos; $pos_61 = $this->pos;
$_60 = null; $_60 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 {
$_60 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_60 = FALSE; break; }
$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 {
$_60 = false;
break;
} }
$_60 = true; else { $_60 = FALSE; break; }
break; $_60 = TRUE; break;
} while (0); }
if ($_60 === false) { while(0);
if( $_60 === FALSE) {
$result = $res_61; $result = $res_61;
$this->pos = $pos_61; $this->pos = $pos_61;
unset( $res_61 ); unset( $res_61 );
@ -641,15 +533,11 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
$_62 = true; $_62 = TRUE; break;
break;
} while (0);
if ($_62 === true) {
return $this->finalise($result);
}
if ($_62 === false) {
return false;
} }
while(0);
if( $_62 === TRUE ) { return $this->finalise($result); }
if( $_62 === FALSE) { return FALSE; }
} }
@ -671,99 +559,74 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Call: Method:Word ( "(" < :CallArguments? > ")" )? */ /* Call: Method:Word ( "(" < :CallArguments? > ")" )? */
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"; $_72 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_72 = null;
do { do {
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_72 = false;
break;
} }
else { $_72 = FALSE; break; }
$res_71 = $result; $res_71 = $result;
$pos_71 = $this->pos; $pos_71 = $this->pos;
$_70 = null; $_70 = 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 {
$_70 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_70 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_67 = $result; $res_67 = $result;
$pos_67 = $this->pos; $pos_67 = $this->pos;
$matcher = 'match_'.'CallArguments'; $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos;
$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_67; $result = $res_67;
$this->pos = $pos_67; $this->pos = $pos_67;
unset( $res_67 ); unset( $res_67 );
unset( $pos_67 ); unset( $pos_67 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 {
$_70 = false;
break;
} }
$_70 = true; else { $_70 = FALSE; break; }
break; $_70 = TRUE; break;
} while (0); }
if ($_70 === false) { while(0);
if( $_70 === FALSE) {
$result = $res_71; $result = $res_71;
$this->pos = $pos_71; $this->pos = $pos_71;
unset( $res_71 ); unset( $res_71 );
unset( $pos_71 ); unset( $pos_71 );
} }
$_72 = true; $_72 = TRUE; break;
break;
} while (0);
if ($_72 === true) {
return $this->finalise($result);
}
if ($_72 === false) {
return false;
} }
while(0);
if( $_72 === TRUE ) { return $this->finalise($result); }
if( $_72 === FALSE) { return FALSE; }
} }
/* LookupStep: :Call &"." */ /* LookupStep: :Call &"." */
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"; $_76 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_76 = null;
do { do {
$matcher = 'match_'.'Call'; $matcher = 'match_'.'Call'; $key = $matcher; $pos = $this->pos;
$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 {
$_76 = false;
break;
} }
else { $_76 = FALSE; break; }
$res_75 = $result; $res_75 = $result;
$pos_75 = $this->pos; $pos_75 = $this->pos;
if (substr($this->string,$this->pos,1) == '.') { if (substr($this->string,$this->pos,1) == '.') {
@ -771,91 +634,70 @@ class SSTemplateParser extends Parser implements TemplateParser
$result["text"] .= '.'; $result["text"] .= '.';
$result = $res_75; $result = $res_75;
$this->pos = $pos_75; $this->pos = $pos_75;
} else { }
else {
$result = $res_75; $result = $res_75;
$this->pos = $pos_75; $this->pos = $pos_75;
$_76 = false; $_76 = FALSE; break;
break;
} }
$_76 = true; $_76 = TRUE; break;
break;
} while (0);
if ($_76 === true) {
return $this->finalise($result);
}
if ($_76 === false) {
return false;
} }
while(0);
if( $_76 === TRUE ) { return $this->finalise($result); }
if( $_76 === FALSE) { return FALSE; }
} }
/* LastLookupStep: :Call */ /* LastLookupStep: :Call */
protected $match_LastLookupStep_typestack = array('LastLookupStep'); protected $match_LastLookupStep_typestack = array('LastLookupStep');
function match_LastLookupStep($stack = array()) function match_LastLookupStep ($stack = array()) {
{ $matchrule = "LastLookupStep"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "LastLookupStep"; $matcher = 'match_'.'Call'; $key = $matcher; $pos = $this->pos;
$result = $this->construct($matchrule, $matchrule, null);
$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" );
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
/* Lookup: LookupStep ("." LookupStep)* "." LastLookupStep | LastLookupStep */ /* Lookup: LookupStep ("." LookupStep)* "." LastLookupStep | LastLookupStep */
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"; $_90 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_90 = null;
do { do {
$res_79 = $result; $res_79 = $result;
$pos_79 = $this->pos; $pos_79 = $this->pos;
$_87 = null; $_87 = NULL;
do { do {
$matcher = 'match_'.'LookupStep'; $matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos;
$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 {
$_87 = false;
break;
} }
else { $_87 = FALSE; break; }
while (true) { while (true) {
$res_84 = $result; $res_84 = $result;
$pos_84 = $this->pos; $pos_84 = $this->pos;
$_83 = null; $_83 = 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 {
$_83 = false;
break;
} }
$matcher = 'match_'.'LookupStep'; else { $_83 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos;
$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 {
$_83 = false;
break;
} }
$_83 = true; else { $_83 = FALSE; break; }
break; $_83 = TRUE; break;
} while (0); }
if ($_83 === false) { while(0);
if( $_83 === FALSE) {
$result = $res_84; $result = $res_84;
$this->pos = $pos_84; $this->pos = $pos_84;
unset( $res_84 ); unset( $res_84 );
@ -866,49 +708,33 @@ class SSTemplateParser extends Parser implements TemplateParser
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 {
$_87 = false;
break;
} }
$matcher = 'match_'.'LastLookupStep'; else { $_87 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'LastLookupStep'; $key = $matcher; $pos = $this->pos;
$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 {
$_87 = false;
break;
} }
$_87 = true; else { $_87 = FALSE; break; }
break; $_87 = TRUE; break;
} while (0); }
if ($_87 === true) { while(0);
$_90 = true; if( $_87 === TRUE ) { $_90 = TRUE; break; }
break; $result = $res_79;
$this->pos = $pos_79;
$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))) ) );
if ($subres !== FALSE) {
$this->store( $result, $subres );
$_90 = TRUE; break;
} }
$result = $res_79; $result = $res_79;
$this->pos = $pos_79; $this->pos = $pos_79;
$matcher = 'match_'.'LastLookupStep'; $_90 = FALSE; break;
$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);
$_90 = true;
break;
}
$result = $res_79;
$this->pos = $pos_79;
$_90 = false;
break;
} while (0);
if ($_90 === true) {
return $this->finalise($result);
}
if ($_90 === false) {
return false;
} }
while(0);
if( $_90 === TRUE ) { return $this->finalise($result); }
if( $_90 === FALSE) { return FALSE; }
} }
@ -952,218 +778,149 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? < /* Translate: "<%t" < Entity < (Default:QuotedString)? < (!("is" "=") < "is" < Context:QuotedString)? <
(InjectionVariables)? > "%>" */ (InjectionVariables)? > "%>" */
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"; $_116 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_116 = null;
do { do {
if (( $subres = $this->literal('<%t') ) !== false) { if (( $subres = $this->literal( '<%t' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_116 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_116 = false; $matcher = 'match_'.'Entity'; $key = $matcher; $pos = $this->pos;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$matcher = 'match_'.'Entity';
$key = $matcher;
$pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $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 {
$_116 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_116 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_98 = $result; $res_98 = $result;
$pos_98 = $this->pos; $pos_98 = $this->pos;
$_97 = null; $_97 = NULL;
do { do {
$matcher = 'match_'.'QuotedString'; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$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 {
$_97 = false;
break;
} }
$_97 = true; else { $_97 = FALSE; break; }
break; $_97 = TRUE; break;
} while (0); }
if ($_97 === false) { while(0);
if( $_97 === FALSE) {
$result = $res_98; $result = $res_98;
$this->pos = $pos_98; $this->pos = $pos_98;
unset( $res_98 ); unset( $res_98 );
unset( $pos_98 ); unset( $pos_98 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres;
}
$res_109 = $result; $res_109 = $result;
$pos_109 = $this->pos; $pos_109 = $this->pos;
$_108 = null; $_108 = NULL;
do { do {
$res_103 = $result; $res_103 = $result;
$pos_103 = $this->pos; $pos_103 = $this->pos;
$_102 = null; $_102 = NULL;
do { do {
if (( $subres = $this->literal('is') ) !== false) { if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_102 = FALSE; break; }
} else {
$_102 = 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 {
$_102 = false;
break;
} }
$_102 = true; else { $_102 = FALSE; break; }
break; $_102 = TRUE; break;
} while (0); }
if ($_102 === true) { while(0);
if( $_102 === TRUE ) {
$result = $res_103; $result = $res_103;
$this->pos = $pos_103; $this->pos = $pos_103;
$_108 = false; $_108 = FALSE; break;
break;
} }
if ($_102 === false) { if( $_102 === FALSE) {
$result = $res_103; $result = $res_103;
$this->pos = $pos_103; $this->pos = $pos_103;
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_108 = FALSE; break; }
if (( $subres = $this->literal('is') ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
} else {
$_108 = 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) { if ($subres !== FALSE) {
$this->store( $result, $subres, "Context" ); $this->store( $result, $subres, "Context" );
} else {
$_108 = false;
break;
} }
$_108 = true; else { $_108 = FALSE; break; }
break; $_108 = TRUE; break;
} while (0); }
if ($_108 === false) { while(0);
if( $_108 === FALSE) {
$result = $res_109; $result = $res_109;
$this->pos = $pos_109; $this->pos = $pos_109;
unset( $res_109 ); unset( $res_109 );
unset( $pos_109 ); unset( $pos_109 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres;
}
$res_113 = $result; $res_113 = $result;
$pos_113 = $this->pos; $pos_113 = $this->pos;
$_112 = null; $_112 = NULL;
do { do {
$matcher = 'match_'.'InjectionVariables'; $matcher = 'match_'.'InjectionVariables'; $key = $matcher; $pos = $this->pos;
$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 {
$_112 = false;
break;
} }
$_112 = true; else { $_112 = FALSE; break; }
break; $_112 = TRUE; break;
} while (0); }
if ($_112 === false) { while(0);
if( $_112 === FALSE) {
$result = $res_113; $result = $res_113;
$this->pos = $pos_113; $this->pos = $pos_113;
unset( $res_113 ); unset( $res_113 );
unset( $pos_113 ); unset( $pos_113 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_116 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) { $_116 = TRUE; break;
$result["text"] .= $subres;
} else {
$_116 = false;
break;
}
$_116 = true;
break;
} while (0);
if ($_116 === true) {
return $this->finalise($result);
}
if ($_116 === false) {
return false;
} }
while(0);
if( $_116 === TRUE ) { return $this->finalise($result); }
if( $_116 === FALSE) { return FALSE; }
} }
/* InjectionVariables: (< InjectionName:Word "=" Argument)+ */ /* InjectionVariables: (< InjectionName:Word "=" Argument)+ */
protected $match_InjectionVariables_typestack = array('InjectionVariables'); protected $match_InjectionVariables_typestack = array('InjectionVariables');
function match_InjectionVariables($stack = array()) function match_InjectionVariables ($stack = array()) {
{ $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_123 = $result; $res_123 = $result;
$pos_123 = $this->pos; $pos_123 = $this->pos;
$_122 = null; $_122 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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, "InjectionName" ); $this->store( $result, $subres, "InjectionName" );
} else {
$_122 = false;
break;
} }
else { $_122 = 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 {
$_122 = false;
break;
} }
$matcher = 'match_'.'Argument'; else { $_122 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_122 = false;
break;
} }
$_122 = true; else { $_122 = FALSE; break; }
break; $_122 = TRUE; break;
} while (0); }
if ($_122 === false) { while(0);
if( $_122 === FALSE) {
$result = $res_123; $result = $res_123;
$this->pos = $pos_123; $this->pos = $pos_123;
unset( $res_123 ); unset( $res_123 );
@ -1172,26 +929,20 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }
/* Entity: / [A-Za-z_] [\w\.]* / */ /* Entity: / [A-Za-z_\\] [\w\.\\]* / */
protected $match_Entity_typestack = array('Entity'); protected $match_Entity_typestack = array('Entity');
function match_Entity($stack = array()) function match_Entity ($stack = array()) {
{ $matchrule = "Entity"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "Entity"; if (( $subres = $this->rx( '/ [A-Za-z_\\\\] [\w\.\\\\]* /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [A-Za-z_] [\w\.]* /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
@ -1253,125 +1004,85 @@ class SSTemplateParser extends Parser implements TemplateParser
/* SimpleInjection: '$' :Lookup */ /* SimpleInjection: '$' :Lookup */
protected $match_SimpleInjection_typestack = array('SimpleInjection'); protected $match_SimpleInjection_typestack = array('SimpleInjection');
function match_SimpleInjection($stack = array()) function match_SimpleInjection ($stack = array()) {
{ $matchrule = "SimpleInjection"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "SimpleInjection"; $_127 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_127 = 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 {
$_127 = false;
break;
} }
$matcher = 'match_'.'Lookup'; else { $_127 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$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;
} }
$_127 = true; else { $_127 = FALSE; break; }
break; $_127 = TRUE; break;
} while (0);
if ($_127 === true) {
return $this->finalise($result);
}
if ($_127 === false) {
return false;
} }
while(0);
if( $_127 === TRUE ) { return $this->finalise($result); }
if( $_127 === FALSE) { return FALSE; }
} }
/* BracketInjection: '{$' :Lookup "}" */ /* BracketInjection: '{$' :Lookup "}" */
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"; $_132 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_132 = null;
do { do {
if (( $subres = $this->literal('{$') ) !== false) { if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_132 = FALSE; break; }
} else { $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$_132 = false;
break;
}
$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 {
$_132 = false;
break;
} }
else { $_132 = 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 {
$_132 = false;
break;
} }
$_132 = true; else { $_132 = FALSE; break; }
break; $_132 = TRUE; break;
} while (0);
if ($_132 === true) {
return $this->finalise($result);
}
if ($_132 === false) {
return false;
} }
while(0);
if( $_132 === TRUE ) { return $this->finalise($result); }
if( $_132 === FALSE) { return FALSE; }
} }
/* Injection: BracketInjection | SimpleInjection */ /* Injection: BracketInjection | SimpleInjection */
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"; $_137 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_137 = null;
do { do {
$res_134 = $result; $res_134 = $result;
$pos_134 = $this->pos; $pos_134 = $this->pos;
$matcher = 'match_'.'BracketInjection'; $matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos;
$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 );
$_137 = true; $_137 = TRUE; break;
break;
} }
$result = $res_134; $result = $res_134;
$this->pos = $pos_134; $this->pos = $pos_134;
$matcher = 'match_'.'SimpleInjection'; $matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos;
$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 );
$_137 = true; $_137 = TRUE; break;
break;
} }
$result = $res_134; $result = $res_134;
$this->pos = $pos_134; $this->pos = $pos_134;
$_137 = false; $_137 = FALSE; break;
break;
} while (0);
if ($_137 === true) {
return $this->finalise($result);
}
if ($_137 === false) {
return false;
} }
while(0);
if( $_137 === TRUE ) { return $this->finalise($result); }
if( $_137 === FALSE) { return FALSE; }
} }
@ -1383,20 +1094,15 @@ class SSTemplateParser extends Parser implements TemplateParser
/* DollarMarkedLookup: SimpleInjection */ /* DollarMarkedLookup: SimpleInjection */
protected $match_DollarMarkedLookup_typestack = array('DollarMarkedLookup'); protected $match_DollarMarkedLookup_typestack = array('DollarMarkedLookup');
function match_DollarMarkedLookup($stack = array()) function match_DollarMarkedLookup ($stack = array()) {
{ $matchrule = "DollarMarkedLookup"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "DollarMarkedLookup"; $matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos;
$result = $this->construct($matchrule, $matchrule, null);
$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 );
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
@ -1408,66 +1114,49 @@ class SSTemplateParser extends Parser implements TemplateParser
/* QuotedString: q:/['"]/ String:/ (\\\\ | \\. | [^$q\\])* / '$q' */ /* QuotedString: q:/['"]/ String:/ (\\\\ | \\. | [^$q\\])* / '$q' */
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"; $_143 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_143 = null;
do { do {
$stack[] = $result; $stack[] = $result; $result = $this->construct( $matchrule, "q" );
$result = $this->construct($matchrule, "q"); if (( $subres = $this->rx( '/[\'"]/' ) ) !== FALSE) {
if (( $subres = $this->rx('/[\'"]/') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
$subres = $result; $subres = $result; $result = array_pop($stack);
$result = array_pop($stack);
$this->store( $result, $subres, 'q' ); $this->store( $result, $subres, 'q' );
} else {
$result = array_pop($stack);
$_143 = false;
break;
} }
$stack[] = $result; else {
$result = $this->construct($matchrule, "String");
if (( $subres = $this->rx('/ (\\\\\\\\ | \\\\. | [^'.$this->expression($result, $stack, 'q').'\\\\])* /') ) !== false) {
$result["text"] .= $subres;
$subres = $result;
$result = array_pop($stack); $result = array_pop($stack);
$_143 = FALSE; break;
}
$stack[] = $result; $result = $this->construct( $matchrule, "String" );
if (( $subres = $this->rx( '/ (\\\\\\\\ | \\\\. | [^'.$this->expression($result, $stack, 'q').'\\\\])* /' ) ) !== FALSE) {
$result["text"] .= $subres;
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'String' ); $this->store( $result, $subres, 'String' );
} else { }
else {
$result = array_pop($stack); $result = array_pop($stack);
$_143 = false; $_143 = FALSE; break;
break;
} }
if (( $subres = $this->literal(''.$this->expression($result, $stack, 'q').'') ) !== false) { if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'q').'' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_143 = FALSE; break; }
} else { $_143 = TRUE; break;
$_143 = false;
break;
}
$_143 = true;
break;
} while (0);
if ($_143 === true) {
return $this->finalise($result);
}
if ($_143 === false) {
return false;
} }
while(0);
if( $_143 === TRUE ) { return $this->finalise($result); }
if( $_143 === FALSE) { return FALSE; }
} }
/* FreeString: /[^,)%!=><|&]+/ */ /* FreeString: /[^,)%!=><|&]+/ */
protected $match_FreeString_typestack = array('FreeString'); protected $match_FreeString_typestack = array('FreeString');
function match_FreeString($stack = array()) function match_FreeString ($stack = array()) {
{ $matchrule = "FreeString"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "FreeString"; if (( $subres = $this->rx( '/[^,)%!=><|&]+/' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/[^,)%!=><|&]+/') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
@ -1477,133 +1166,98 @@ class SSTemplateParser extends Parser implements TemplateParser
:Lookup !(< FreeString)| :Lookup !(< FreeString)|
:FreeString */ :FreeString */
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"; $_163 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_163 = null;
do { do {
$res_146 = $result; $res_146 = $result;
$pos_146 = $this->pos; $pos_146 = $this->pos;
$matcher = 'match_'.'DollarMarkedLookup'; $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos;
$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" );
$_163 = true; $_163 = TRUE; break;
break;
} }
$result = $res_146; $result = $res_146;
$this->pos = $pos_146; $this->pos = $pos_146;
$_161 = null; $_161 = NULL;
do { do {
$res_148 = $result; $res_148 = $result;
$pos_148 = $this->pos; $pos_148 = $this->pos;
$matcher = 'match_'.'QuotedString'; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$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" );
$_161 = true; $_161 = TRUE; break;
break;
} }
$result = $res_148; $result = $res_148;
$this->pos = $pos_148; $this->pos = $pos_148;
$_159 = null; $_159 = NULL;
do { do {
$res_150 = $result; $res_150 = $result;
$pos_150 = $this->pos; $pos_150 = $this->pos;
$_156 = null; $_156 = NULL;
do { do {
$matcher = 'match_'.'Lookup'; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$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 {
$_156 = false;
break;
} }
else { $_156 = FALSE; break; }
$res_155 = $result; $res_155 = $result;
$pos_155 = $this->pos; $pos_155 = $this->pos;
$_154 = null; $_154 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $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 ); $this->store( $result, $subres );
} else {
$_154 = false;
break;
} }
$_154 = true; else { $_154 = FALSE; break; }
break; $_154 = TRUE; break;
} while (0); }
if ($_154 === true) { while(0);
if( $_154 === TRUE ) {
$result = $res_155; $result = $res_155;
$this->pos = $pos_155; $this->pos = $pos_155;
$_156 = false; $_156 = FALSE; break;
break;
} }
if ($_154 === false) { if( $_154 === FALSE) {
$result = $res_155; $result = $res_155;
$this->pos = $pos_155; $this->pos = $pos_155;
} }
$_156 = true; $_156 = TRUE; break;
break;
} while (0);
if ($_156 === true) {
$_159 = true;
break;
} }
while(0);
if( $_156 === TRUE ) { $_159 = TRUE; break; }
$result = $res_150; $result = $res_150;
$this->pos = $pos_150; $this->pos = $pos_150;
$matcher = 'match_'.'FreeString'; $matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos;
$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" );
$_159 = true; $_159 = TRUE; break;
break;
} }
$result = $res_150; $result = $res_150;
$this->pos = $pos_150; $this->pos = $pos_150;
$_159 = false; $_159 = FALSE; break;
break;
} while (0);
if ($_159 === true) {
$_161 = true;
break;
} }
while(0);
if( $_159 === TRUE ) { $_161 = TRUE; break; }
$result = $res_148; $result = $res_148;
$this->pos = $pos_148; $this->pos = $pos_148;
$_161 = false; $_161 = FALSE; break;
break;
} while (0);
if ($_161 === true) {
$_163 = true;
break;
} }
while(0);
if( $_161 === TRUE ) { $_163 = TRUE; break; }
$result = $res_146; $result = $res_146;
$this->pos = $pos_146; $this->pos = $pos_146;
$_163 = false; $_163 = FALSE; break;
break;
} while (0);
if ($_163 === true) {
return $this->finalise($result);
}
if ($_163 === false) {
return false;
} }
while(0);
if( $_163 === TRUE ) { return $this->finalise($result); }
if( $_163 === FALSE) { return FALSE; }
} }
@ -1655,196 +1309,146 @@ class SSTemplateParser extends Parser implements TemplateParser
/* ComparisonOperator: "!=" | "==" | ">=" | ">" | "<=" | "<" | "=" */ /* ComparisonOperator: "!=" | "==" | ">=" | ">" | "<=" | "<" | "=" */
protected $match_ComparisonOperator_typestack = array('ComparisonOperator'); protected $match_ComparisonOperator_typestack = array('ComparisonOperator');
function match_ComparisonOperator($stack = array()) function match_ComparisonOperator ($stack = array()) {
{ $matchrule = "ComparisonOperator"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "ComparisonOperator"; $_188 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_188 = null;
do { do {
$res_165 = $result; $res_165 = $result;
$pos_165 = $this->pos; $pos_165 = $this->pos;
if (( $subres = $this->literal('!=') ) !== false) { if (( $subres = $this->literal( '!=' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_188 = true; $_188 = TRUE; break;
break;
} }
$result = $res_165; $result = $res_165;
$this->pos = $pos_165; $this->pos = $pos_165;
$_186 = null; $_186 = NULL;
do { do {
$res_167 = $result; $res_167 = $result;
$pos_167 = $this->pos; $pos_167 = $this->pos;
if (( $subres = $this->literal('==') ) !== false) { if (( $subres = $this->literal( '==' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_186 = true; $_186 = TRUE; break;
break;
} }
$result = $res_167; $result = $res_167;
$this->pos = $pos_167; $this->pos = $pos_167;
$_184 = null; $_184 = NULL;
do { do {
$res_169 = $result; $res_169 = $result;
$pos_169 = $this->pos; $pos_169 = $this->pos;
if (( $subres = $this->literal('>=') ) !== false) { if (( $subres = $this->literal( '>=' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_184 = true; $_184 = TRUE; break;
break;
} }
$result = $res_169; $result = $res_169;
$this->pos = $pos_169; $this->pos = $pos_169;
$_182 = null; $_182 = NULL;
do { do {
$res_171 = $result; $res_171 = $result;
$pos_171 = $this->pos; $pos_171 = $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"] .= '>';
$_182 = true; $_182 = TRUE; break;
break;
} }
$result = $res_171; $result = $res_171;
$this->pos = $pos_171; $this->pos = $pos_171;
$_180 = null; $_180 = NULL;
do { do {
$res_173 = $result; $res_173 = $result;
$pos_173 = $this->pos; $pos_173 = $this->pos;
if (( $subres = $this->literal('<=') ) !== false) { if (( $subres = $this->literal( '<=' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_180 = true; $_180 = TRUE; break;
break;
} }
$result = $res_173; $result = $res_173;
$this->pos = $pos_173; $this->pos = $pos_173;
$_178 = null; $_178 = NULL;
do { do {
$res_175 = $result; $res_175 = $result;
$pos_175 = $this->pos; $pos_175 = $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"] .= '<';
$_178 = true; $_178 = TRUE; break;
break;
} }
$result = $res_175; $result = $res_175;
$this->pos = $pos_175; $this->pos = $pos_175;
if (substr($this->string,$this->pos,1) == '=') { if (substr($this->string,$this->pos,1) == '=') {
$this->pos += 1; $this->pos += 1;
$result["text"] .= '='; $result["text"] .= '=';
$_178 = true; $_178 = TRUE; break;
break;
} }
$result = $res_175; $result = $res_175;
$this->pos = $pos_175; $this->pos = $pos_175;
$_178 = false; $_178 = FALSE; break;
break;
} while (0);
if ($_178 === true) {
$_180 = true;
break;
} }
while(0);
if( $_178 === TRUE ) { $_180 = TRUE; break; }
$result = $res_173; $result = $res_173;
$this->pos = $pos_173; $this->pos = $pos_173;
$_180 = false; $_180 = FALSE; break;
break;
} while (0);
if ($_180 === true) {
$_182 = true;
break;
} }
while(0);
if( $_180 === TRUE ) { $_182 = TRUE; break; }
$result = $res_171; $result = $res_171;
$this->pos = $pos_171; $this->pos = $pos_171;
$_182 = false; $_182 = FALSE; break;
break;
} while (0);
if ($_182 === true) {
$_184 = true;
break;
} }
while(0);
if( $_182 === TRUE ) { $_184 = TRUE; break; }
$result = $res_169; $result = $res_169;
$this->pos = $pos_169; $this->pos = $pos_169;
$_184 = false; $_184 = FALSE; break;
break;
} while (0);
if ($_184 === true) {
$_186 = true;
break;
} }
while(0);
if( $_184 === TRUE ) { $_186 = TRUE; break; }
$result = $res_167; $result = $res_167;
$this->pos = $pos_167; $this->pos = $pos_167;
$_186 = false; $_186 = FALSE; break;
break;
} while (0);
if ($_186 === true) {
$_188 = true;
break;
} }
while(0);
if( $_186 === TRUE ) { $_188 = TRUE; break; }
$result = $res_165; $result = $res_165;
$this->pos = $pos_165; $this->pos = $pos_165;
$_188 = false; $_188 = FALSE; break;
break;
} while (0);
if ($_188 === true) {
return $this->finalise($result);
}
if ($_188 === false) {
return false;
} }
while(0);
if( $_188 === TRUE ) { return $this->finalise($result); }
if( $_188 === FALSE) { return FALSE; }
} }
/* Comparison: Argument < ComparisonOperator > Argument */ /* Comparison: Argument < ComparisonOperator > Argument */
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"; $_195 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_195 = null;
do { do {
$matcher = 'match_'.'Argument'; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_195 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_195 = FALSE; break; }
$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) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} else {
$_195 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_195 = FALSE; break; }
$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 ); $this->store( $result, $subres );
} else {
$_195 = false;
break;
} }
$_195 = true; else { $_195 = FALSE; break; }
break; $_195 = TRUE; break;
} while (0);
if ($_195 === true) {
return $this->finalise($result);
}
if ($_195 === false) {
return false;
} }
while(0);
if( $_195 === TRUE ) { return $this->finalise($result); }
if( $_195 === FALSE) { return FALSE; }
} }
@ -1869,59 +1473,45 @@ class SSTemplateParser extends Parser implements TemplateParser
/* PresenceCheck: (Not:'not' <)? Argument */ /* PresenceCheck: (Not:'not' <)? Argument */
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"; $_202 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_202 = null;
do { do {
$res_200 = $result; $res_200 = $result;
$pos_200 = $this->pos; $pos_200 = $this->pos;
$_199 = null; $_199 = NULL;
do { do {
$stack[] = $result; $stack[] = $result; $result = $this->construct( $matchrule, "Not" );
$result = $this->construct($matchrule, "Not"); if (( $subres = $this->literal( 'not' ) ) !== FALSE) {
if (( $subres = $this->literal('not') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
$subres = $result; $subres = $result; $result = array_pop($stack);
$result = array_pop($stack);
$this->store( $result, $subres, 'Not' ); $this->store( $result, $subres, 'Not' );
} else { }
else {
$result = array_pop($stack); $result = array_pop($stack);
$_199 = false; $_199 = FALSE; break;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $_199 = TRUE; break;
} }
$_199 = true; while(0);
break; if( $_199 === FALSE) {
} while (0);
if ($_199 === false) {
$result = $res_200; $result = $res_200;
$this->pos = $pos_200; $this->pos = $pos_200;
unset( $res_200 ); unset( $res_200 );
unset( $pos_200 ); unset( $pos_200 );
} }
$matcher = 'match_'.'Argument'; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_202 = false;
break;
} }
$_202 = true; else { $_202 = FALSE; break; }
break; $_202 = TRUE; break;
} while (0);
if ($_202 === true) {
return $this->finalise($result);
}
if ($_202 === false) {
return false;
} }
while(0);
if( $_202 === TRUE ) { return $this->finalise($result); }
if( $_202 === FALSE) { return FALSE; }
} }
@ -1945,45 +1535,33 @@ class SSTemplateParser extends Parser implements TemplateParser
/* IfArgumentPortion: Comparison | PresenceCheck */ /* IfArgumentPortion: Comparison | PresenceCheck */
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"; $_207 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_207 = null;
do { do {
$res_204 = $result; $res_204 = $result;
$pos_204 = $this->pos; $pos_204 = $this->pos;
$matcher = 'match_'.'Comparison'; $matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos;
$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 );
$_207 = true; $_207 = TRUE; break;
break;
} }
$result = $res_204; $result = $res_204;
$this->pos = $pos_204; $this->pos = $pos_204;
$matcher = 'match_'.'PresenceCheck'; $matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos;
$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 );
$_207 = true; $_207 = TRUE; break;
break;
} }
$result = $res_204; $result = $res_204;
$this->pos = $pos_204; $this->pos = $pos_204;
$_207 = false; $_207 = FALSE; break;
break;
} while (0);
if ($_207 === true) {
return $this->finalise($result);
}
if ($_207 === false) {
return false;
} }
while(0);
if( $_207 === TRUE ) { return $this->finalise($result); }
if( $_207 === FALSE) { return FALSE; }
} }
@ -1995,93 +1573,67 @@ class SSTemplateParser extends Parser implements TemplateParser
/* BooleanOperator: "||" | "&&" */ /* BooleanOperator: "||" | "&&" */
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"; $_212 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_212 = null;
do { do {
$res_209 = $result; $res_209 = $result;
$pos_209 = $this->pos; $pos_209 = $this->pos;
if (( $subres = $this->literal('||') ) !== false) { if (( $subres = $this->literal( '||' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_212 = true; $_212 = TRUE; break;
break;
} }
$result = $res_209; $result = $res_209;
$this->pos = $pos_209; $this->pos = $pos_209;
if (( $subres = $this->literal('&&') ) !== false) { if (( $subres = $this->literal( '&&' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_212 = true; $_212 = TRUE; break;
break;
} }
$result = $res_209; $result = $res_209;
$this->pos = $pos_209; $this->pos = $pos_209;
$_212 = false; $_212 = FALSE; break;
break;
} while (0);
if ($_212 === true) {
return $this->finalise($result);
}
if ($_212 === false) {
return false;
} }
while(0);
if( $_212 === TRUE ) { return $this->finalise($result); }
if( $_212 === FALSE) { return FALSE; }
} }
/* IfArgument: :IfArgumentPortion ( < :BooleanOperator < :IfArgumentPortion )* */ /* IfArgument: :IfArgumentPortion ( < :BooleanOperator < :IfArgumentPortion )* */
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"; $_221 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_221 = null;
do { do {
$matcher = 'match_'.'IfArgumentPortion'; $matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos;
$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 {
$_221 = false;
break;
} }
else { $_221 = FALSE; break; }
while (true) { while (true) {
$res_220 = $result; $res_220 = $result;
$pos_220 = $this->pos; $pos_220 = $this->pos;
$_219 = null; $_219 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $matcher = 'match_'.'BooleanOperator'; $key = $matcher; $pos = $this->pos;
}
$matcher = 'match_'.'BooleanOperator';
$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, "BooleanOperator" ); $this->store( $result, $subres, "BooleanOperator" );
} else {
$_219 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_219 = FALSE; break; }
$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 {
$_219 = false;
break;
} }
$_219 = true; else { $_219 = FALSE; break; }
break; $_219 = TRUE; break;
} while (0); }
if ($_219 === false) { while(0);
if( $_219 === FALSE) {
$result = $res_220; $result = $res_220;
$this->pos = $pos_220; $this->pos = $pos_220;
unset( $res_220 ); unset( $res_220 );
@ -2089,15 +1641,11 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
$_221 = true; $_221 = TRUE; break;
break;
} while (0);
if ($_221 === true) {
return $this->finalise($result);
}
if ($_221 === false) {
return false;
} }
while(0);
if( $_221 === TRUE ) { return $this->finalise($result); }
if( $_221 === FALSE) { return FALSE; }
} }
@ -2114,238 +1662,146 @@ class SSTemplateParser extends Parser implements TemplateParser
/* IfPart: '<%' < 'if' [ :IfArgument > '%>' Template:$TemplateMatcher? */ /* IfPart: '<%' < 'if' [ :IfArgument > '%>' Template:$TemplateMatcher? */
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"; $_231 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_231 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_231 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_231 = false; if (( $subres = $this->literal( 'if' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_231 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { else { $_231 = FALSE; break; }
$result["text"] .= $subres; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
}
if (( $subres = $this->literal('if') ) !== false) {
$result["text"] .= $subres;
} else {
$_231 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} else {
$_231 = false;
break;
}
$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 {
$_231 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_231 = false;
break;
} }
else { $_231 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_231 = FALSE; break; }
$res_230 = $result; $res_230 = $result;
$pos_230 = $this->pos; $pos_230 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$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_230; $result = $res_230;
$this->pos = $pos_230; $this->pos = $pos_230;
unset( $res_230 ); unset( $res_230 );
unset( $pos_230 ); unset( $pos_230 );
} }
$_231 = true; $_231 = TRUE; break;
break;
} while (0);
if ($_231 === true) {
return $this->finalise($result);
}
if ($_231 === false) {
return false;
} }
while(0);
if( $_231 === TRUE ) { return $this->finalise($result); }
if( $_231 === FALSE) { return FALSE; }
} }
/* ElseIfPart: '<%' < 'else_if' [ :IfArgument > '%>' Template:$TemplateMatcher? */ /* ElseIfPart: '<%' < 'else_if' [ :IfArgument > '%>' Template:$TemplateMatcher? */
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"; $_241 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_241 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_241 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_241 = false; if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_241 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { else { $_241 = FALSE; break; }
$result["text"] .= $subres; $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
}
if (( $subres = $this->literal('else_if') ) !== false) {
$result["text"] .= $subres;
} else {
$_241 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} else {
$_241 = false;
break;
}
$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 {
$_241 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_241 = false;
break;
} }
else { $_241 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_241 = FALSE; break; }
$res_240 = $result; $res_240 = $result;
$pos_240 = $this->pos; $pos_240 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$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_240; $result = $res_240;
$this->pos = $pos_240; $this->pos = $pos_240;
unset( $res_240 ); unset( $res_240 );
unset( $pos_240 ); unset( $pos_240 );
} }
$_241 = true; $_241 = TRUE; break;
break;
} while (0);
if ($_241 === true) {
return $this->finalise($result);
}
if ($_241 === false) {
return false;
} }
while(0);
if( $_241 === TRUE ) { return $this->finalise($result); }
if( $_241 === FALSE) { return FALSE; }
} }
/* ElsePart: '<%' < 'else' > '%>' Template:$TemplateMatcher? */ /* ElsePart: '<%' < 'else' > '%>' Template:$TemplateMatcher? */
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"; $_249 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_249 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_249 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_249 = false; if (( $subres = $this->literal( 'else' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_249 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_249 = FALSE; break; }
}
if (( $subres = $this->literal('else') ) !== false) {
$result["text"] .= $subres;
} else {
$_249 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_249 = false;
break;
}
$res_248 = $result; $res_248 = $result;
$pos_248 = $this->pos; $pos_248 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$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_248; $result = $res_248;
$this->pos = $pos_248; $this->pos = $pos_248;
unset( $res_248 ); unset( $res_248 );
unset( $pos_248 ); unset( $pos_248 );
} }
$_249 = true; $_249 = TRUE; break;
break;
} while (0);
if ($_249 === true) {
return $this->finalise($result);
}
if ($_249 === false) {
return false;
} }
while(0);
if( $_249 === TRUE ) { return $this->finalise($result); }
if( $_249 === FALSE) { return FALSE; }
} }
/* If: IfPart ElseIfPart* ElsePart? '<%' < 'end_if' > '%>' */ /* If: IfPart ElseIfPart* ElsePart? '<%' < 'end_if' > '%>' */
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"; $_259 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_259 = null;
do { do {
$matcher = 'match_'.'IfPart'; $matcher = 'match_'.'IfPart'; $key = $matcher; $pos = $this->pos;
$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 {
$_259 = false;
break;
} }
else { $_259 = FALSE; break; }
while (true) { while (true) {
$res_252 = $result; $res_252 = $result;
$pos_252 = $this->pos; $pos_252 = $this->pos;
$matcher = 'match_'.'ElseIfPart'; $matcher = 'match_'.'ElseIfPart'; $key = $matcher; $pos = $this->pos;
$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 { }
else {
$result = $res_252; $result = $res_252;
$this->pos = $pos_252; $this->pos = $pos_252;
unset( $res_252 ); unset( $res_252 );
@ -2355,51 +1811,30 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$res_253 = $result; $res_253 = $result;
$pos_253 = $this->pos; $pos_253 = $this->pos;
$matcher = 'match_'.'ElsePart'; $matcher = 'match_'.'ElsePart'; $key = $matcher; $pos = $this->pos;
$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 { }
else {
$result = $res_253; $result = $res_253;
$this->pos = $pos_253; $this->pos = $pos_253;
unset( $res_253 ); unset( $res_253 );
unset( $pos_253 ); unset( $pos_253 );
} }
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_259 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_259 = false; if (( $subres = $this->literal( 'end_if' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_259 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_259 = FALSE; break; }
} $_259 = TRUE; break;
if (( $subres = $this->literal('end_if') ) !== false) {
$result["text"] .= $subres;
} else {
$_259 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_259 = false;
break;
}
$_259 = true;
break;
} while (0);
if ($_259 === true) {
return $this->finalise($result);
}
if ($_259 === false) {
return false;
} }
while(0);
if( $_259 === TRUE ) { return $this->finalise($result); }
if( $_259 === FALSE) { return FALSE; }
} }
@ -2430,108 +1865,63 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Require: '<%' < 'require' [ Call:(Method:Word "(" < :CallArguments > ")") > '%>' */ /* Require: '<%' < 'require' [ Call:(Method:Word "(" < :CallArguments > ")") > '%>' */
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"; $_275 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_275 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_275 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_275 = false; if (( $subres = $this->literal( 'require' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_275 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { else { $_275 = FALSE; break; }
$result["text"] .= $subres; $stack[] = $result; $result = $this->construct( $matchrule, "Call" );
} $_271 = NULL;
if (( $subres = $this->literal('require') ) !== false) {
$result["text"] .= $subres;
} else {
$_275 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} else {
$_275 = false;
break;
}
$stack[] = $result;
$result = $this->construct($matchrule, "Call");
$_271 = null;
do { do {
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_271 = false;
break;
} }
else { $_271 = 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 {
$_271 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_271 = FALSE; break; }
$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 {
$_271 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_271 = FALSE; break; }
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 {
$_271 = false;
break;
} }
$_271 = true; else { $_271 = FALSE; break; }
break; $_271 = TRUE; break;
} while (0); }
if ($_271 === true) { while(0);
$subres = $result; if( $_271 === TRUE ) {
$result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Call' ); $this->store( $result, $subres, 'Call' );
} }
if ($_271 === false) { if( $_271 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_275 = false; $_275 = FALSE; break;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_275 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) { $_275 = TRUE; break;
$result["text"] .= $subres;
} else {
$_275 = false;
break;
}
$_275 = true;
break;
} while (0);
if ($_275 === true) {
return $this->finalise($result);
}
if ($_275 === false) {
return false;
} }
while(0);
if( $_275 === TRUE ) { return $this->finalise($result); }
if( $_275 === FALSE) { return FALSE; }
} }
@ -2551,129 +1941,99 @@ class SSTemplateParser extends Parser implements TemplateParser
:Lookup :Lookup
) */ ) */
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"; $_295 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_295 = null;
do { do {
$res_283 = $result; $res_283 = $result;
$pos_283 = $this->pos; $pos_283 = $this->pos;
$_282 = null; $_282 = NULL;
do { do {
$_280 = null; $_280 = NULL;
do { do {
$res_277 = $result; $res_277 = $result;
$pos_277 = $this->pos; $pos_277 = $this->pos;
if (( $subres = $this->literal('if ') ) !== false) { if (( $subres = $this->literal( 'if ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_280 = true; $_280 = TRUE; break;
break;
} }
$result = $res_277; $result = $res_277;
$this->pos = $pos_277; $this->pos = $pos_277;
if (( $subres = $this->literal('unless ') ) !== false) { if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_280 = true; $_280 = TRUE; break;
break;
} }
$result = $res_277; $result = $res_277;
$this->pos = $pos_277; $this->pos = $pos_277;
$_280 = false; $_280 = FALSE; break;
break;
} while (0);
if ($_280 === false) {
$_282 = false;
break;
} }
$_282 = true; while(0);
break; if( $_280 === FALSE) { $_282 = FALSE; break; }
} while (0); $_282 = TRUE; break;
if ($_282 === true) { }
while(0);
if( $_282 === TRUE ) {
$result = $res_283; $result = $res_283;
$this->pos = $pos_283; $this->pos = $pos_283;
$_295 = false; $_295 = FALSE; break;
break;
} }
if ($_282 === false) { if( $_282 === FALSE) {
$result = $res_283; $result = $res_283;
$this->pos = $pos_283; $this->pos = $pos_283;
} }
$_293 = null; $_293 = NULL;
do { do {
$_291 = null; $_291 = NULL;
do { do {
$res_284 = $result; $res_284 = $result;
$pos_284 = $this->pos; $pos_284 = $this->pos;
$matcher = 'match_'.'DollarMarkedLookup'; $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos;
$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" );
$_291 = true; $_291 = TRUE; break;
break;
} }
$result = $res_284; $result = $res_284;
$this->pos = $pos_284; $this->pos = $pos_284;
$_289 = null; $_289 = NULL;
do { do {
$res_286 = $result; $res_286 = $result;
$pos_286 = $this->pos; $pos_286 = $this->pos;
$matcher = 'match_'.'QuotedString'; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$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" );
$_289 = true; $_289 = TRUE; break;
break;
} }
$result = $res_286; $result = $res_286;
$this->pos = $pos_286; $this->pos = $pos_286;
$matcher = 'match_'.'Lookup'; $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos;
$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" );
$_289 = true; $_289 = TRUE; break;
break;
} }
$result = $res_286; $result = $res_286;
$this->pos = $pos_286; $this->pos = $pos_286;
$_289 = false; $_289 = FALSE; break;
break;
} while (0);
if ($_289 === true) {
$_291 = true;
break;
} }
while(0);
if( $_289 === TRUE ) { $_291 = TRUE; break; }
$result = $res_284; $result = $res_284;
$this->pos = $pos_284; $this->pos = $pos_284;
$_291 = false; $_291 = FALSE; break;
break;
} while (0);
if ($_291 === false) {
$_293 = false;
break;
} }
$_293 = true; while(0);
break; if( $_291 === FALSE) { $_293 = FALSE; break; }
} while (0); $_293 = TRUE; break;
if ($_293 === false) {
$_295 = false;
break;
} }
$_295 = true; while(0);
break; if( $_293 === FALSE) { $_295 = FALSE; break; }
} while (0); $_295 = TRUE; break;
if ($_295 === true) {
return $this->finalise($result);
}
if ($_295 === false) {
return false;
} }
while(0);
if( $_295 === TRUE ) { return $this->finalise($result); }
if( $_295 === FALSE) { return FALSE; }
} }
@ -2695,54 +2055,38 @@ class SSTemplateParser extends Parser implements TemplateParser
/* CacheBlockArguments: CacheBlockArgument ( < "," < CacheBlockArgument )* */ /* CacheBlockArguments: CacheBlockArgument ( < "," < CacheBlockArgument )* */
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"; $_304 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_304 = null;
do { do {
$matcher = 'match_'.'CacheBlockArgument'; $matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
$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 {
$_304 = false;
break;
} }
else { $_304 = FALSE; break; }
while (true) { while (true) {
$res_303 = $result; $res_303 = $result;
$pos_303 = $this->pos; $pos_303 = $this->pos;
$_302 = null; $_302 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 {
$_302 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_302 = FALSE; break; }
$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) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} else {
$_302 = false;
break;
} }
$_302 = true; else { $_302 = FALSE; break; }
break; $_302 = TRUE; break;
} while (0); }
if ($_302 === false) { while(0);
if( $_302 === FALSE) {
$result = $res_303; $result = $res_303;
$this->pos = $pos_303; $this->pos = $pos_303;
unset( $res_303 ); unset( $res_303 );
@ -2750,15 +2094,11 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
$_304 = true; $_304 = TRUE; break;
break;
} while (0);
if ($_304 === true) {
return $this->finalise($result);
}
if ($_304 === false) {
return false;
} }
while(0);
if( $_304 === TRUE ) { return $this->finalise($result); }
if( $_304 === FALSE) { return FALSE; }
} }
@ -2777,269 +2117,204 @@ class SSTemplateParser extends Parser implements TemplateParser
/* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | Include | ClosedBlock | /* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | Include | ClosedBlock |
OpenBlock | MalformedBlock | Injection | Text)+ */ 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_348 = $result; $res_348 = $result;
$pos_348 = $this->pos; $pos_348 = $this->pos;
$_347 = null; $_347 = NULL;
do { do {
$_345 = null; $_345 = NULL;
do { do {
$res_306 = $result; $res_306 = $result;
$pos_306 = $this->pos; $pos_306 = $this->pos;
$matcher = 'match_'.'Comment'; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$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 );
$_345 = true; $_345 = TRUE; break;
break;
} }
$result = $res_306; $result = $res_306;
$this->pos = $pos_306; $this->pos = $pos_306;
$_343 = null; $_343 = NULL;
do { do {
$res_308 = $result; $res_308 = $result;
$pos_308 = $this->pos; $pos_308 = $this->pos;
$matcher = 'match_'.'Translate'; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$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 );
$_343 = true; $_343 = TRUE; break;
break;
} }
$result = $res_308; $result = $res_308;
$this->pos = $pos_308; $this->pos = $pos_308;
$_341 = null; $_341 = NULL;
do { do {
$res_310 = $result; $res_310 = $result;
$pos_310 = $this->pos; $pos_310 = $this->pos;
$matcher = 'match_'.'If'; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$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 );
$_341 = true; $_341 = TRUE; break;
break;
} }
$result = $res_310; $result = $res_310;
$this->pos = $pos_310; $this->pos = $pos_310;
$_339 = null; $_339 = NULL;
do { do {
$res_312 = $result; $res_312 = $result;
$pos_312 = $this->pos; $pos_312 = $this->pos;
$matcher = 'match_'.'Require'; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$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 );
$_339 = true; $_339 = TRUE; break;
break;
} }
$result = $res_312; $result = $res_312;
$this->pos = $pos_312; $this->pos = $pos_312;
$_337 = null; $_337 = NULL;
do { do {
$res_314 = $result; $res_314 = $result;
$pos_314 = $this->pos; $pos_314 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_337 = true; $_337 = TRUE; break;
break;
} }
$result = $res_314; $result = $res_314;
$this->pos = $pos_314; $this->pos = $pos_314;
$_335 = null; $_335 = NULL;
do { do {
$res_316 = $result; $res_316 = $result;
$pos_316 = $this->pos; $pos_316 = $this->pos;
$matcher = 'match_'.'Include'; $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos;
$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 );
$_335 = true; $_335 = TRUE; break;
break;
} }
$result = $res_316; $result = $res_316;
$this->pos = $pos_316; $this->pos = $pos_316;
$_333 = null; $_333 = NULL;
do { do {
$res_318 = $result; $res_318 = $result;
$pos_318 = $this->pos; $pos_318 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_333 = true; $_333 = TRUE; break;
break;
} }
$result = $res_318; $result = $res_318;
$this->pos = $pos_318; $this->pos = $pos_318;
$_331 = null; $_331 = NULL;
do { do {
$res_320 = $result; $res_320 = $result;
$pos_320 = $this->pos; $pos_320 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_331 = true; $_331 = TRUE; break;
break;
} }
$result = $res_320; $result = $res_320;
$this->pos = $pos_320; $this->pos = $pos_320;
$_329 = null; $_329 = NULL;
do { do {
$res_322 = $result; $res_322 = $result;
$pos_322 = $this->pos; $pos_322 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_329 = true; $_329 = TRUE; break;
break;
} }
$result = $res_322; $result = $res_322;
$this->pos = $pos_322; $this->pos = $pos_322;
$_327 = null; $_327 = NULL;
do { do {
$res_324 = $result; $res_324 = $result;
$pos_324 = $this->pos; $pos_324 = $this->pos;
$matcher = 'match_'.'Injection'; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$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 );
$_327 = true; $_327 = TRUE; break;
break;
} }
$result = $res_324; $result = $res_324;
$this->pos = $pos_324; $this->pos = $pos_324;
$matcher = 'match_'.'Text'; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$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 );
$_327 = true; $_327 = TRUE; break;
break;
} }
$result = $res_324; $result = $res_324;
$this->pos = $pos_324; $this->pos = $pos_324;
$_327 = false; $_327 = FALSE; break;
break;
} while (0);
if ($_327 === true) {
$_329 = true;
break;
} }
while(0);
if( $_327 === TRUE ) { $_329 = TRUE; break; }
$result = $res_322; $result = $res_322;
$this->pos = $pos_322; $this->pos = $pos_322;
$_329 = false; $_329 = FALSE; break;
break;
} while (0);
if ($_329 === true) {
$_331 = true;
break;
} }
while(0);
if( $_329 === TRUE ) { $_331 = TRUE; break; }
$result = $res_320; $result = $res_320;
$this->pos = $pos_320; $this->pos = $pos_320;
$_331 = false; $_331 = FALSE; break;
break;
} while (0);
if ($_331 === true) {
$_333 = true;
break;
} }
while(0);
if( $_331 === TRUE ) { $_333 = TRUE; break; }
$result = $res_318; $result = $res_318;
$this->pos = $pos_318; $this->pos = $pos_318;
$_333 = false; $_333 = FALSE; break;
break;
} while (0);
if ($_333 === true) {
$_335 = true;
break;
} }
while(0);
if( $_333 === TRUE ) { $_335 = TRUE; break; }
$result = $res_316; $result = $res_316;
$this->pos = $pos_316; $this->pos = $pos_316;
$_335 = false; $_335 = FALSE; break;
break;
} while (0);
if ($_335 === true) {
$_337 = true;
break;
} }
while(0);
if( $_335 === TRUE ) { $_337 = TRUE; break; }
$result = $res_314; $result = $res_314;
$this->pos = $pos_314; $this->pos = $pos_314;
$_337 = false; $_337 = FALSE; break;
break;
} while (0);
if ($_337 === true) {
$_339 = true;
break;
} }
while(0);
if( $_337 === TRUE ) { $_339 = TRUE; break; }
$result = $res_312; $result = $res_312;
$this->pos = $pos_312; $this->pos = $pos_312;
$_339 = false; $_339 = FALSE; break;
break;
} while (0);
if ($_339 === true) {
$_341 = true;
break;
} }
while(0);
if( $_339 === TRUE ) { $_341 = TRUE; break; }
$result = $res_310; $result = $res_310;
$this->pos = $pos_310; $this->pos = $pos_310;
$_341 = false; $_341 = FALSE; break;
break;
} while (0);
if ($_341 === true) {
$_343 = true;
break;
} }
while(0);
if( $_341 === TRUE ) { $_343 = TRUE; break; }
$result = $res_308; $result = $res_308;
$this->pos = $pos_308; $this->pos = $pos_308;
$_343 = false; $_343 = FALSE; break;
break;
} while (0);
if ($_343 === true) {
$_345 = true;
break;
} }
while(0);
if( $_343 === TRUE ) { $_345 = TRUE; break; }
$result = $res_306; $result = $res_306;
$this->pos = $pos_306; $this->pos = $pos_306;
$_345 = false; $_345 = FALSE; break;
break;
} while (0);
if ($_345 === false) {
$_347 = false;
break;
} }
$_347 = true; while(0);
break; if( $_345 === FALSE) { $_347 = FALSE; break; }
} while (0); $_347 = TRUE; break;
if ($_347 === false) { }
while(0);
if( $_347 === FALSE) {
$result = $res_348; $result = $res_348;
$this->pos = $pos_348; $this->pos = $pos_348;
unset( $res_348 ); unset( $res_348 );
@ -3048,11 +2323,8 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }
@ -3063,39 +2335,24 @@ class SSTemplateParser extends Parser implements TemplateParser
Template:$TemplateMatcher? Template:$TemplateMatcher?
'<%' < 'end_' ("uncached"|"cached"|"cacheblock") > '%>' */ '<%' < 'end_' ("uncached"|"cached"|"cacheblock") > '%>' */
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"; $_385 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_385 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_385 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_385 = false; if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_385 = 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;
} else {
$_385 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$res_353 = $result; $res_353 = $result;
$pos_353 = $this->pos; $pos_353 = $this->pos;
$matcher = 'match_'.'CacheBlockArguments'; $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos;
$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 { }
else {
$result = $res_353; $result = $res_353;
$this->pos = $pos_353; $this->pos = $pos_353;
unset( $res_353 ); unset( $res_353 );
@ -3103,185 +2360,130 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$res_365 = $result; $res_365 = $result;
$pos_365 = $this->pos; $pos_365 = $this->pos;
$_364 = null; $_364 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
} $_360 = NULL;
$stack[] = $result;
$result = $this->construct($matchrule, "Conditional");
$_360 = null;
do { do {
$_358 = null; $_358 = NULL;
do { do {
$res_355 = $result; $res_355 = $result;
$pos_355 = $this->pos; $pos_355 = $this->pos;
if (( $subres = $this->literal('if') ) !== false) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_358 = true; $_358 = TRUE; break;
break;
} }
$result = $res_355; $result = $res_355;
$this->pos = $pos_355; $this->pos = $pos_355;
if (( $subres = $this->literal('unless') ) !== false) { if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_358 = true; $_358 = TRUE; break;
break;
} }
$result = $res_355; $result = $res_355;
$this->pos = $pos_355; $this->pos = $pos_355;
$_358 = false; $_358 = FALSE; break;
break;
} while (0);
if ($_358 === false) {
$_360 = false;
break;
} }
$_360 = true; while(0);
break; if( $_358 === FALSE) { $_360 = FALSE; break; }
} while (0); $_360 = TRUE; break;
if ($_360 === true) { }
$subres = $result; while(0);
$result = array_pop($stack); if( $_360 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' ); $this->store( $result, $subres, 'Conditional' );
} }
if ($_360 === false) { if( $_360 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_364 = false; $_364 = FALSE; break;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $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, "Condition" ); $this->store( $result, $subres, "Condition" );
} else {
$_364 = false;
break;
} }
$_364 = true; else { $_364 = FALSE; break; }
break; $_364 = TRUE; break;
} while (0); }
if ($_364 === false) { while(0);
if( $_364 === FALSE) {
$result = $res_365; $result = $res_365;
$this->pos = $pos_365; $this->pos = $pos_365;
unset( $res_365 ); unset( $res_365 );
unset( $pos_365 ); unset( $pos_365 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_385 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_385 = false;
break;
}
$res_368 = $result; $res_368 = $result;
$pos_368 = $this->pos; $pos_368 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$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_368; $result = $res_368;
$this->pos = $pos_368; $this->pos = $pos_368;
unset( $res_368 ); unset( $res_368 );
unset( $pos_368 ); unset( $pos_368 );
} }
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_385 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_385 = false; if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_385 = FALSE; break; }
} $_381 = NULL;
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('end_') ) !== false) {
$result["text"] .= $subres;
} else {
$_385 = false;
break;
}
$_381 = null;
do { do {
$_379 = null; $_379 = NULL;
do { do {
$res_372 = $result; $res_372 = $result;
$pos_372 = $this->pos; $pos_372 = $this->pos;
if (( $subres = $this->literal('uncached') ) !== false) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_379 = true; $_379 = TRUE; break;
break;
} }
$result = $res_372; $result = $res_372;
$this->pos = $pos_372; $this->pos = $pos_372;
$_377 = null; $_377 = NULL;
do { do {
$res_374 = $result; $res_374 = $result;
$pos_374 = $this->pos; $pos_374 = $this->pos;
if (( $subres = $this->literal('cached') ) !== false) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_377 = true; $_377 = TRUE; break;
break;
} }
$result = $res_374; $result = $res_374;
$this->pos = $pos_374; $this->pos = $pos_374;
if (( $subres = $this->literal('cacheblock') ) !== false) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_377 = true; $_377 = TRUE; break;
break;
} }
$result = $res_374; $result = $res_374;
$this->pos = $pos_374; $this->pos = $pos_374;
$_377 = false; $_377 = FALSE; break;
break;
} while (0);
if ($_377 === true) {
$_379 = true;
break;
} }
while(0);
if( $_377 === TRUE ) { $_379 = TRUE; break; }
$result = $res_372; $result = $res_372;
$this->pos = $pos_372; $this->pos = $pos_372;
$_379 = false; $_379 = FALSE; break;
break;
} while (0);
if ($_379 === false) {
$_381 = false;
break;
} }
$_381 = true; while(0);
break; if( $_379 === FALSE) { $_381 = FALSE; break; }
} while (0); $_381 = TRUE; break;
if ($_381 === false) {
$_385 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { while(0);
$result["text"] .= $subres; if( $_381 === FALSE) { $_385 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('%>') ) !== false) { if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_385 = FALSE; break; }
} else { $_385 = TRUE; break;
$_385 = false;
break;
}
$_385 = true;
break;
} while (0);
if ($_385 === true) {
return $this->finalise($result);
}
if ($_385 === false) {
return false;
} }
while(0);
if( $_385 === TRUE ) { return $this->finalise($result); }
if( $_385 === FALSE) { return FALSE; }
} }
@ -3294,317 +2496,240 @@ class SSTemplateParser extends Parser implements TemplateParser
/* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | /* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock |
OpenBlock | MalformedBlock | Injection | Text)+ */ 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_437 = $result; $res_437 = $result;
$pos_437 = $this->pos; $pos_437 = $this->pos;
$_436 = null; $_436 = NULL;
do { do {
$_434 = null; $_434 = NULL;
do { do {
$res_387 = $result; $res_387 = $result;
$pos_387 = $this->pos; $pos_387 = $this->pos;
$matcher = 'match_'.'Comment'; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$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 );
$_434 = true; $_434 = TRUE; break;
break;
} }
$result = $res_387; $result = $res_387;
$this->pos = $pos_387; $this->pos = $pos_387;
$_432 = null; $_432 = NULL;
do { do {
$res_389 = $result; $res_389 = $result;
$pos_389 = $this->pos; $pos_389 = $this->pos;
$matcher = 'match_'.'Translate'; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$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 );
$_432 = true; $_432 = TRUE; break;
break;
} }
$result = $res_389; $result = $res_389;
$this->pos = $pos_389; $this->pos = $pos_389;
$_430 = null; $_430 = NULL;
do { do {
$res_391 = $result; $res_391 = $result;
$pos_391 = $this->pos; $pos_391 = $this->pos;
$matcher = 'match_'.'If'; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$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 );
$_430 = true; $_430 = TRUE; break;
break;
} }
$result = $res_391; $result = $res_391;
$this->pos = $pos_391; $this->pos = $pos_391;
$_428 = null; $_428 = NULL;
do { do {
$res_393 = $result; $res_393 = $result;
$pos_393 = $this->pos; $pos_393 = $this->pos;
$matcher = 'match_'.'Require'; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$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 );
$_428 = true; $_428 = TRUE; break;
break;
} }
$result = $res_393; $result = $res_393;
$this->pos = $pos_393; $this->pos = $pos_393;
$_426 = null; $_426 = NULL;
do { do {
$res_395 = $result; $res_395 = $result;
$pos_395 = $this->pos; $pos_395 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_426 = true; $_426 = TRUE; break;
break;
} }
$result = $res_395; $result = $res_395;
$this->pos = $pos_395; $this->pos = $pos_395;
$_424 = null; $_424 = NULL;
do { do {
$res_397 = $result; $res_397 = $result;
$pos_397 = $this->pos; $pos_397 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_424 = true; $_424 = TRUE; break;
break;
} }
$result = $res_397; $result = $res_397;
$this->pos = $pos_397; $this->pos = $pos_397;
$_422 = null; $_422 = NULL;
do { do {
$res_399 = $result; $res_399 = $result;
$pos_399 = $this->pos; $pos_399 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_422 = true; $_422 = TRUE; break;
break;
} }
$result = $res_399; $result = $res_399;
$this->pos = $pos_399; $this->pos = $pos_399;
$_420 = null; $_420 = NULL;
do { do {
$res_401 = $result; $res_401 = $result;
$pos_401 = $this->pos; $pos_401 = $this->pos;
$matcher = 'match_'.'Include'; $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos;
$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 );
$_420 = true; $_420 = TRUE; break;
break;
} }
$result = $res_401; $result = $res_401;
$this->pos = $pos_401; $this->pos = $pos_401;
$_418 = null; $_418 = NULL;
do { do {
$res_403 = $result; $res_403 = $result;
$pos_403 = $this->pos; $pos_403 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_418 = true; $_418 = TRUE; break;
break;
} }
$result = $res_403; $result = $res_403;
$this->pos = $pos_403; $this->pos = $pos_403;
$_416 = null; $_416 = NULL;
do { do {
$res_405 = $result; $res_405 = $result;
$pos_405 = $this->pos; $pos_405 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_416 = true; $_416 = TRUE; break;
break;
} }
$result = $res_405; $result = $res_405;
$this->pos = $pos_405; $this->pos = $pos_405;
$_414 = null; $_414 = NULL;
do { do {
$res_407 = $result; $res_407 = $result;
$pos_407 = $this->pos; $pos_407 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_414 = true; $_414 = TRUE; break;
break;
} }
$result = $res_407; $result = $res_407;
$this->pos = $pos_407; $this->pos = $pos_407;
$_412 = null; $_412 = NULL;
do { do {
$res_409 = $result; $res_409 = $result;
$pos_409 = $this->pos; $pos_409 = $this->pos;
$matcher = 'match_'.'Injection'; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$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 );
$_412 = true; $_412 = TRUE; break;
break;
} }
$result = $res_409; $result = $res_409;
$this->pos = $pos_409; $this->pos = $pos_409;
$matcher = 'match_'.'Text'; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$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 );
$_412 = true; $_412 = TRUE; break;
break;
} }
$result = $res_409; $result = $res_409;
$this->pos = $pos_409; $this->pos = $pos_409;
$_412 = false; $_412 = FALSE; break;
break;
} while (0);
if ($_412 === true) {
$_414 = true;
break;
} }
while(0);
if( $_412 === TRUE ) { $_414 = TRUE; break; }
$result = $res_407; $result = $res_407;
$this->pos = $pos_407; $this->pos = $pos_407;
$_414 = false; $_414 = FALSE; break;
break;
} while (0);
if ($_414 === true) {
$_416 = true;
break;
} }
while(0);
if( $_414 === TRUE ) { $_416 = TRUE; break; }
$result = $res_405; $result = $res_405;
$this->pos = $pos_405; $this->pos = $pos_405;
$_416 = false; $_416 = FALSE; break;
break;
} while (0);
if ($_416 === true) {
$_418 = true;
break;
} }
while(0);
if( $_416 === TRUE ) { $_418 = TRUE; break; }
$result = $res_403; $result = $res_403;
$this->pos = $pos_403; $this->pos = $pos_403;
$_418 = false; $_418 = FALSE; break;
break;
} while (0);
if ($_418 === true) {
$_420 = true;
break;
} }
while(0);
if( $_418 === TRUE ) { $_420 = TRUE; break; }
$result = $res_401; $result = $res_401;
$this->pos = $pos_401; $this->pos = $pos_401;
$_420 = false; $_420 = FALSE; break;
break;
} while (0);
if ($_420 === true) {
$_422 = true;
break;
} }
while(0);
if( $_420 === TRUE ) { $_422 = TRUE; break; }
$result = $res_399; $result = $res_399;
$this->pos = $pos_399; $this->pos = $pos_399;
$_422 = false; $_422 = FALSE; break;
break;
} while (0);
if ($_422 === true) {
$_424 = true;
break;
} }
while(0);
if( $_422 === TRUE ) { $_424 = TRUE; break; }
$result = $res_397; $result = $res_397;
$this->pos = $pos_397; $this->pos = $pos_397;
$_424 = false; $_424 = FALSE; break;
break;
} while (0);
if ($_424 === true) {
$_426 = true;
break;
} }
while(0);
if( $_424 === TRUE ) { $_426 = TRUE; break; }
$result = $res_395; $result = $res_395;
$this->pos = $pos_395; $this->pos = $pos_395;
$_426 = false; $_426 = FALSE; break;
break;
} while (0);
if ($_426 === true) {
$_428 = true;
break;
} }
while(0);
if( $_426 === TRUE ) { $_428 = TRUE; break; }
$result = $res_393; $result = $res_393;
$this->pos = $pos_393; $this->pos = $pos_393;
$_428 = false; $_428 = FALSE; break;
break;
} while (0);
if ($_428 === true) {
$_430 = true;
break;
} }
while(0);
if( $_428 === TRUE ) { $_430 = TRUE; break; }
$result = $res_391; $result = $res_391;
$this->pos = $pos_391; $this->pos = $pos_391;
$_430 = false; $_430 = FALSE; break;
break;
} while (0);
if ($_430 === true) {
$_432 = true;
break;
} }
while(0);
if( $_430 === TRUE ) { $_432 = TRUE; break; }
$result = $res_389; $result = $res_389;
$this->pos = $pos_389; $this->pos = $pos_389;
$_432 = false; $_432 = FALSE; break;
break;
} while (0);
if ($_432 === true) {
$_434 = true;
break;
} }
while(0);
if( $_432 === TRUE ) { $_434 = TRUE; break; }
$result = $res_387; $result = $res_387;
$this->pos = $pos_387; $this->pos = $pos_387;
$_434 = false; $_434 = FALSE; break;
break;
} while (0);
if ($_434 === false) {
$_436 = false;
break;
} }
$_436 = true; while(0);
break; if( $_434 === FALSE) { $_436 = FALSE; break; }
} while (0); $_436 = TRUE; break;
if ($_436 === false) { }
while(0);
if( $_436 === FALSE) {
$result = $res_437; $result = $res_437;
$this->pos = $pos_437; $this->pos = $pos_437;
unset( $res_437 ); unset( $res_437 );
@ -3613,11 +2738,8 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }
@ -3640,84 +2762,62 @@ class SSTemplateParser extends Parser implements TemplateParser
(CacheBlock | UncachedBlock | CacheBlockTemplate)* (CacheBlock | UncachedBlock | CacheBlockTemplate)*
'<%' < 'end_' ("cached"|"uncached"|"cacheblock") > '%>' */ '<%' < 'end_' ("cached"|"uncached"|"cacheblock") > '%>' */
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"; $_492 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_492 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_492 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_492 = false; $stack[] = $result; $result = $this->construct( $matchrule, "CacheTag" );
break; $_445 = NULL;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$stack[] = $result;
$result = $this->construct($matchrule, "CacheTag");
$_445 = null;
do { do {
$_443 = null; $_443 = NULL;
do { do {
$res_440 = $result; $res_440 = $result;
$pos_440 = $this->pos; $pos_440 = $this->pos;
if (( $subres = $this->literal('cached') ) !== false) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_443 = true; $_443 = TRUE; break;
break;
} }
$result = $res_440; $result = $res_440;
$this->pos = $pos_440; $this->pos = $pos_440;
if (( $subres = $this->literal('cacheblock') ) !== false) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_443 = true; $_443 = TRUE; break;
break;
} }
$result = $res_440; $result = $res_440;
$this->pos = $pos_440; $this->pos = $pos_440;
$_443 = false; $_443 = FALSE; break;
break;
} while (0);
if ($_443 === false) {
$_445 = false;
break;
} }
$_445 = true; while(0);
break; if( $_443 === FALSE) { $_445 = FALSE; break; }
} while (0); $_445 = TRUE; break;
if ($_445 === true) { }
$subres = $result; while(0);
$result = array_pop($stack); if( $_445 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'CacheTag' ); $this->store( $result, $subres, 'CacheTag' );
} }
if ($_445 === false) { if( $_445 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_492 = false; $_492 = FALSE; break;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_450 = $result; $res_450 = $result;
$pos_450 = $this->pos; $pos_450 = $this->pos;
$_449 = null; $_449 = NULL;
do { do {
$matcher = 'match_'.'CacheBlockArguments'; $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos;
$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 {
$_449 = false;
break;
} }
$_449 = true; else { $_449 = FALSE; break; }
break; $_449 = TRUE; break;
} while (0); }
if ($_449 === false) { while(0);
if( $_449 === FALSE) {
$result = $res_450; $result = $res_450;
$this->pos = $pos_450; $this->pos = $pos_450;
unset( $res_450 ); unset( $res_450 );
@ -3725,150 +2825,113 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$res_462 = $result; $res_462 = $result;
$pos_462 = $this->pos; $pos_462 = $this->pos;
$_461 = null; $_461 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
} $_457 = NULL;
$stack[] = $result;
$result = $this->construct($matchrule, "Conditional");
$_457 = null;
do { do {
$_455 = null; $_455 = NULL;
do { do {
$res_452 = $result; $res_452 = $result;
$pos_452 = $this->pos; $pos_452 = $this->pos;
if (( $subres = $this->literal('if') ) !== false) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_455 = true; $_455 = TRUE; break;
break;
} }
$result = $res_452; $result = $res_452;
$this->pos = $pos_452; $this->pos = $pos_452;
if (( $subres = $this->literal('unless') ) !== false) { if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_455 = true; $_455 = TRUE; break;
break;
} }
$result = $res_452; $result = $res_452;
$this->pos = $pos_452; $this->pos = $pos_452;
$_455 = false; $_455 = FALSE; break;
break;
} while (0);
if ($_455 === false) {
$_457 = false;
break;
} }
$_457 = true; while(0);
break; if( $_455 === FALSE) { $_457 = FALSE; break; }
} while (0); $_457 = TRUE; break;
if ($_457 === true) { }
$subres = $result; while(0);
$result = array_pop($stack); if( $_457 === TRUE ) {
$subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Conditional' ); $this->store( $result, $subres, 'Conditional' );
} }
if ($_457 === false) { if( $_457 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_461 = false; $_461 = FALSE; break;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; $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, "Condition" ); $this->store( $result, $subres, "Condition" );
} else {
$_461 = false;
break;
} }
$_461 = true; else { $_461 = FALSE; break; }
break; $_461 = TRUE; break;
} while (0); }
if ($_461 === false) { while(0);
if( $_461 === FALSE) {
$result = $res_462; $result = $res_462;
$this->pos = $pos_462; $this->pos = $pos_462;
unset( $res_462 ); unset( $res_462 );
unset( $pos_462 ); unset( $pos_462 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_492 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_492 = false;
break;
}
while (true) { while (true) {
$res_475 = $result; $res_475 = $result;
$pos_475 = $this->pos; $pos_475 = $this->pos;
$_474 = null; $_474 = NULL;
do { do {
$_472 = null; $_472 = NULL;
do { do {
$res_465 = $result; $res_465 = $result;
$pos_465 = $this->pos; $pos_465 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_472 = true; $_472 = TRUE; break;
break;
} }
$result = $res_465; $result = $res_465;
$this->pos = $pos_465; $this->pos = $pos_465;
$_470 = null; $_470 = NULL;
do { do {
$res_467 = $result; $res_467 = $result;
$pos_467 = $this->pos; $pos_467 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_470 = true; $_470 = TRUE; break;
break;
} }
$result = $res_467; $result = $res_467;
$this->pos = $pos_467; $this->pos = $pos_467;
$matcher = 'match_'.'CacheBlockTemplate'; $matcher = 'match_'.'CacheBlockTemplate'; $key = $matcher; $pos = $this->pos;
$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 );
$_470 = true; $_470 = TRUE; break;
break;
} }
$result = $res_467; $result = $res_467;
$this->pos = $pos_467; $this->pos = $pos_467;
$_470 = false; $_470 = FALSE; break;
break;
} while (0);
if ($_470 === true) {
$_472 = true;
break;
} }
while(0);
if( $_470 === TRUE ) { $_472 = TRUE; break; }
$result = $res_465; $result = $res_465;
$this->pos = $pos_465; $this->pos = $pos_465;
$_472 = false; $_472 = FALSE; break;
break;
} while (0);
if ($_472 === false) {
$_474 = false;
break;
} }
$_474 = true; while(0);
break; if( $_472 === FALSE) { $_474 = FALSE; break; }
} while (0); $_474 = TRUE; break;
if ($_474 === false) { }
while(0);
if( $_474 === FALSE) {
$result = $res_475; $result = $res_475;
$this->pos = $pos_475; $this->pos = $pos_475;
unset( $res_475 ); unset( $res_475 );
@ -3876,93 +2939,61 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_492 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_492 = false; if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_492 = FALSE; break; }
} $_488 = NULL;
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('end_') ) !== false) {
$result["text"] .= $subres;
} else {
$_492 = false;
break;
}
$_488 = null;
do { do {
$_486 = null; $_486 = NULL;
do { do {
$res_479 = $result; $res_479 = $result;
$pos_479 = $this->pos; $pos_479 = $this->pos;
if (( $subres = $this->literal('cached') ) !== false) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_486 = true; $_486 = TRUE; break;
break;
} }
$result = $res_479; $result = $res_479;
$this->pos = $pos_479; $this->pos = $pos_479;
$_484 = null; $_484 = NULL;
do { do {
$res_481 = $result; $res_481 = $result;
$pos_481 = $this->pos; $pos_481 = $this->pos;
if (( $subres = $this->literal('uncached') ) !== false) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_484 = true; $_484 = TRUE; break;
break;
} }
$result = $res_481; $result = $res_481;
$this->pos = $pos_481; $this->pos = $pos_481;
if (( $subres = $this->literal('cacheblock') ) !== false) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_484 = true; $_484 = TRUE; break;
break;
} }
$result = $res_481; $result = $res_481;
$this->pos = $pos_481; $this->pos = $pos_481;
$_484 = false; $_484 = FALSE; break;
break;
} while (0);
if ($_484 === true) {
$_486 = true;
break;
} }
while(0);
if( $_484 === TRUE ) { $_486 = TRUE; break; }
$result = $res_479; $result = $res_479;
$this->pos = $pos_479; $this->pos = $pos_479;
$_486 = false; $_486 = FALSE; break;
break;
} while (0);
if ($_486 === false) {
$_488 = false;
break;
} }
$_488 = true; while(0);
break; if( $_486 === FALSE) { $_488 = FALSE; break; }
} while (0); $_488 = TRUE; break;
if ($_488 === false) {
$_492 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { while(0);
$result["text"] .= $subres; if( $_488 === FALSE) { $_492 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('%>') ) !== false) { if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_492 = FALSE; break; }
} else { $_492 = TRUE; break;
$_492 = false;
break;
}
$_492 = true;
break;
} while (0);
if ($_492 === true) {
return $this->finalise($result);
}
if ($_492 === false) {
return false;
} }
while(0);
if( $_492 === TRUE ) { return $this->finalise($result); }
if( $_492 === FALSE) { return FALSE; }
} }
@ -4000,7 +3031,7 @@ class SSTemplateParser extends Parser implements TemplateParser
// the passed cache key, the block index, and the sha hash of the template. // the passed cache key, the block index, and the sha hash of the template.
$res['php'] .= '$keyExpression = function() use ($scope, $cache) {' . PHP_EOL; $res['php'] .= '$keyExpression = function() use ($scope, $cache) {' . PHP_EOL;
$res['php'] .= '$val = \'\';' . PHP_EOL; $res['php'] .= '$val = \'\';' . PHP_EOL;
if ($globalKey = SSViewer::config()->uninherited('global_key')) { if ($globalKey = SSViewer::config()->get('global_key')) {
// Embed the code necessary to evaluate the globalKey directly into the template, // Embed the code necessary to evaluate the globalKey directly into the template,
// so that SSTemplateParser only needs to be called during template regeneration. // so that SSTemplateParser only needs to be called during template regeneration.
// Warning: If the global key is changed, it's necessary to flush the template cache. // Warning: If the global key is changed, it's necessary to flush the template cache.
@ -4029,176 +3060,123 @@ class SSTemplateParser extends Parser implements TemplateParser
/* OldTPart: "_t" N "(" N QuotedString (N "," N CallArguments)? N ")" N (";")? */ /* OldTPart: "_t" N "(" N QuotedString (N "," N CallArguments)? N ")" N (";")? */
protected $match_OldTPart_typestack = array('OldTPart'); protected $match_OldTPart_typestack = array('OldTPart');
function match_OldTPart($stack = array()) function match_OldTPart ($stack = array()) {
{ $matchrule = "OldTPart"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "OldTPart"; $_511 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_511 = null;
do { do {
if (( $subres = $this->literal('_t') ) !== false) { if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_511 = FALSE; break; }
} else { $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$_511 = false;
break;
}
$matcher = 'match_'.'N';
$key = $matcher;
$pos = $this->pos;
$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); $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 {
$_511 = false;
break;
} }
else { $_511 = 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 {
$_511 = false;
break;
} }
$matcher = 'match_'.'N'; else { $_511 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$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 {
$_511 = false;
break;
} }
$matcher = 'match_'.'QuotedString'; else { $_511 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos;
$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 {
$_511 = false;
break;
} }
else { $_511 = FALSE; break; }
$res_504 = $result; $res_504 = $result;
$pos_504 = $this->pos; $pos_504 = $this->pos;
$_503 = null; $_503 = NULL;
do { do {
$matcher = 'match_'.'N'; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$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 {
$_503 = false;
break;
} }
else { $_503 = 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 {
$_503 = false;
break;
} }
$matcher = 'match_'.'N'; else { $_503 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$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 {
$_503 = false;
break;
} }
$matcher = 'match_'.'CallArguments'; else { $_503 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos;
$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 {
$_503 = false;
break;
} }
$_503 = true; else { $_503 = FALSE; break; }
break; $_503 = TRUE; break;
} while (0); }
if ($_503 === false) { while(0);
if( $_503 === FALSE) {
$result = $res_504; $result = $res_504;
$this->pos = $pos_504; $this->pos = $pos_504;
unset( $res_504 ); unset( $res_504 );
unset( $pos_504 ); unset( $pos_504 );
} }
$matcher = 'match_'.'N'; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$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 {
$_511 = false;
break;
} }
else { $_511 = 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 {
$_511 = false;
break;
} }
$matcher = 'match_'.'N'; else { $_511 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos;
$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 {
$_511 = false;
break;
} }
else { $_511 = FALSE; break; }
$res_510 = $result; $res_510 = $result;
$pos_510 = $this->pos; $pos_510 = $this->pos;
$_509 = null; $_509 = 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 {
$_509 = false;
break;
} }
$_509 = true; else { $_509 = FALSE; break; }
break; $_509 = TRUE; break;
} while (0); }
if ($_509 === false) { while(0);
if( $_509 === FALSE) {
$result = $res_510; $result = $res_510;
$this->pos = $pos_510; $this->pos = $pos_510;
unset( $res_510 ); unset( $res_510 );
unset( $pos_510 ); unset( $pos_510 );
} }
$_511 = true; $_511 = TRUE; break;
break;
} while (0);
if ($_511 === true) {
return $this->finalise($result);
}
if ($_511 === false) {
return false;
} }
while(0);
if( $_511 === TRUE ) { return $this->finalise($result); }
if( $_511 === FALSE) { return FALSE; }
} }
/* N: / [\s\n]* / */ /* N: / [\s\n]* / */
protected $match_N_typestack = array('N'); protected $match_N_typestack = array('N');
function match_N($stack = array()) function match_N ($stack = array()) {
{ $matchrule = "N"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "N"; if (( $subres = $this->rx( '/ [\s\n]* /' ) ) !== FALSE) {
$result = $this->construct($matchrule, $matchrule, null);
if (( $subres = $this->rx('/ [\s\n]* /') ) !== false) {
$result["text"] .= $subres; $result["text"] .= $subres;
return $this->finalise($result); return $this->finalise($result);
} else {
return false;
} }
else { return FALSE; }
} }
@ -4230,49 +3208,27 @@ class SSTemplateParser extends Parser implements TemplateParser
/* OldTTag: "<%" < OldTPart > "%>" */ /* OldTTag: "<%" < OldTPart > "%>" */
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"; $_519 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_519 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_519 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_519 = false; $matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$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) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} else {
$_519 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_519 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('%>') ) !== false) { else { $_519 = FALSE; break; }
$result["text"] .= $subres; $_519 = TRUE; break;
} else {
$_519 = false;
break;
}
$_519 = true;
break;
} while (0);
if ($_519 === true) {
return $this->finalise($result);
}
if ($_519 === false) {
return false;
} }
while(0);
if( $_519 === TRUE ) { return $this->finalise($result); }
if( $_519 === FALSE) { return FALSE; }
} }
@ -4284,101 +3240,55 @@ class SSTemplateParser extends Parser implements TemplateParser
/* OldSprintfTag: "<%" < "sprintf" < "(" < OldTPart < "," < CallArguments > ")" > "%>" */ /* OldSprintfTag: "<%" < "sprintf" < "(" < OldTPart < "," < CallArguments > ")" > "%>" */
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"; $_536 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_536 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_536 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_536 = false; if (( $subres = $this->literal( 'sprintf' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_536 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('sprintf') ) !== false) {
$result["text"] .= $subres;
} else {
$_536 = false;
break;
}
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 {
$_536 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_536 = FALSE; break; }
$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) { if ($subres !== FALSE) {
$this->store( $result, $subres ); $this->store( $result, $subres );
} else {
$_536 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_536 = FALSE; break; }
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 {
$_536 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_536 = FALSE; break; }
$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 ); $this->store( $result, $subres );
} else {
$_536 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_536 = FALSE; break; }
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 {
$_536 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_536 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('%>') ) !== false) { else { $_536 = FALSE; break; }
$result["text"] .= $subres; $_536 = TRUE; break;
} else {
$_536 = false;
break;
}
$_536 = true;
break;
} while (0);
if ($_536 === true) {
return $this->finalise($result);
}
if ($_536 === false) {
return false;
} }
while(0);
if( $_536 === TRUE ) { return $this->finalise($result); }
if( $_536 === FALSE) { return FALSE; }
} }
@ -4400,45 +3310,33 @@ class SSTemplateParser extends Parser implements TemplateParser
/* OldI18NTag: OldSprintfTag | OldTTag */ /* OldI18NTag: OldSprintfTag | OldTTag */
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"; $_541 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_541 = null;
do { do {
$res_538 = $result; $res_538 = $result;
$pos_538 = $this->pos; $pos_538 = $this->pos;
$matcher = 'match_'.'OldSprintfTag'; $matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_541 = true; $_541 = TRUE; break;
break;
} }
$result = $res_538; $result = $res_538;
$this->pos = $pos_538; $this->pos = $pos_538;
$matcher = 'match_'.'OldTTag'; $matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_541 = true; $_541 = TRUE; break;
break;
} }
$result = $res_538; $result = $res_538;
$this->pos = $pos_538; $this->pos = $pos_538;
$_541 = false; $_541 = FALSE; break;
break;
} while (0);
if ($_541 === true) {
return $this->finalise($result);
}
if ($_541 === false) {
return false;
} }
while(0);
if( $_541 === TRUE ) { return $this->finalise($result); }
if( $_541 === FALSE) { return FALSE; }
} }
@ -4450,48 +3348,32 @@ class SSTemplateParser extends Parser implements TemplateParser
/* NamedArgument: Name:Word "=" Value:Argument */ /* NamedArgument: Name:Word "=" Value:Argument */
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"; $_546 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_546 = null;
do { do {
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_546 = false;
break;
} }
else { $_546 = 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 {
$_546 = false;
break;
} }
$matcher = 'match_'.'Argument'; else { $_546 = FALSE; break; }
$key = $matcher; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_546 = false;
break;
} }
$_546 = true; else { $_546 = FALSE; break; }
break; $_546 = TRUE; break;
} while (0);
if ($_546 === true) {
return $this->finalise($result);
}
if ($_546 === false) {
return false;
} }
while(0);
if( $_546 === TRUE ) { return $this->finalise($result); }
if( $_546 === FALSE) { return FALSE; }
} }
@ -4520,89 +3402,55 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Include: "<%" < "include" < Template:NamespacedWord < (NamedArgument ( < "," < NamedArgument )*)? > "%>" */ /* Include: "<%" < "include" < Template:NamespacedWord < (NamedArgument ( < "," < NamedArgument )*)? > "%>" */
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"; $_565 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_565 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_565 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_565 = false; if (( $subres = $this->literal( 'include' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_565 = FALSE; break; }
} if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { $matcher = 'match_'.'NamespacedWord'; $key = $matcher; $pos = $this->pos;
$result["text"] .= $subres;
}
if (( $subres = $this->literal('include') ) !== false) {
$result["text"] .= $subres;
} else {
$_565 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$matcher = 'match_'.'NamespacedWord';
$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 {
$_565 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
} }
else { $_565 = FALSE; break; }
if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$res_562 = $result; $res_562 = $result;
$pos_562 = $this->pos; $pos_562 = $this->pos;
$_561 = null; $_561 = NULL;
do { do {
$matcher = 'match_'.'NamedArgument'; $matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos;
$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 {
$_561 = false;
break;
} }
else { $_561 = FALSE; break; }
while (true) { while (true) {
$res_560 = $result; $res_560 = $result;
$pos_560 = $this->pos; $pos_560 = $this->pos;
$_559 = null; $_559 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 {
$_559 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_559 = FALSE; break; }
$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 {
$_559 = false;
break;
} }
$_559 = true; else { $_559 = FALSE; break; }
break; $_559 = TRUE; break;
} while (0); }
if ($_559 === false) { while(0);
if( $_559 === FALSE) {
$result = $res_560; $result = $res_560;
$this->pos = $pos_560; $this->pos = $pos_560;
unset( $res_560 ); unset( $res_560 );
@ -4610,33 +3458,23 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
$_561 = true; $_561 = TRUE; break;
break; }
} while (0); while(0);
if ($_561 === false) { if( $_561 === FALSE) {
$result = $res_562; $result = $res_562;
$this->pos = $pos_562; $this->pos = $pos_562;
unset( $res_562 ); unset( $res_562 );
unset( $pos_562 ); unset( $pos_562 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_565 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) { $_565 = TRUE; break;
$result["text"] .= $subres;
} else {
$_565 = false;
break;
}
$_565 = true;
break;
} while (0);
if ($_565 === true) {
return $this->finalise($result);
}
if ($_565 === false) {
return false;
} }
while(0);
if( $_565 === TRUE ) { return $this->finalise($result); }
if( $_565 === FALSE) { return FALSE; }
} }
@ -4674,54 +3512,38 @@ class SSTemplateParser extends Parser implements TemplateParser
/* BlockArguments: :Argument ( < "," < :Argument)* */ /* BlockArguments: :Argument ( < "," < :Argument)* */
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"; $_574 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_574 = null;
do { do {
$matcher = 'match_'.'Argument'; $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
$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 {
$_574 = false;
break;
} }
else { $_574 = FALSE; break; }
while (true) { while (true) {
$res_573 = $result; $res_573 = $result;
$pos_573 = $this->pos; $pos_573 = $this->pos;
$_572 = null; $_572 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$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 {
$_572 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_572 = FALSE; break; }
$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 {
$_572 = false;
break;
} }
$_572 = true; else { $_572 = FALSE; break; }
break; $_572 = TRUE; break;
} while (0); }
if ($_572 === false) { while(0);
if( $_572 === FALSE) {
$result = $res_573; $result = $res_573;
$this->pos = $pos_573; $this->pos = $pos_573;
unset( $res_573 ); unset( $res_573 );
@ -4729,365 +3551,260 @@ class SSTemplateParser extends Parser implements TemplateParser
break; break;
} }
} }
$_574 = true; $_574 = TRUE; break;
break;
} while (0);
if ($_574 === true) {
return $this->finalise($result);
}
if ($_574 === false) {
return false;
} }
while(0);
if( $_574 === TRUE ) { return $this->finalise($result); }
if( $_574 === FALSE) { return FALSE; }
} }
/* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include")]) */ /* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include")]) */
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"; $_612 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_612 = null;
do { do {
$res_576 = $result; $res_576 = $result;
$pos_576 = $this->pos; $pos_576 = $this->pos;
if (( $subres = $this->literal('end_') ) !== false) { if (( $subres = $this->literal( 'end_' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_612 = true; $_612 = TRUE; break;
break;
} }
$result = $res_576; $result = $res_576;
$this->pos = $pos_576; $this->pos = $pos_576;
$_610 = null; $_610 = NULL;
do { do {
$_607 = null; $_607 = NULL;
do { do {
$_605 = null; $_605 = NULL;
do { do {
$res_578 = $result; $res_578 = $result;
$pos_578 = $this->pos; $pos_578 = $this->pos;
if (( $subres = $this->literal('if') ) !== false) { if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_605 = true; $_605 = TRUE; break;
break;
} }
$result = $res_578; $result = $res_578;
$this->pos = $pos_578; $this->pos = $pos_578;
$_603 = null; $_603 = NULL;
do { do {
$res_580 = $result; $res_580 = $result;
$pos_580 = $this->pos; $pos_580 = $this->pos;
if (( $subres = $this->literal('else_if') ) !== false) { if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_603 = true; $_603 = TRUE; break;
break;
} }
$result = $res_580; $result = $res_580;
$this->pos = $pos_580; $this->pos = $pos_580;
$_601 = null; $_601 = NULL;
do { do {
$res_582 = $result; $res_582 = $result;
$pos_582 = $this->pos; $pos_582 = $this->pos;
if (( $subres = $this->literal('else') ) !== false) { if (( $subres = $this->literal( 'else' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_601 = true; $_601 = TRUE; break;
break;
} }
$result = $res_582; $result = $res_582;
$this->pos = $pos_582; $this->pos = $pos_582;
$_599 = null; $_599 = NULL;
do { do {
$res_584 = $result; $res_584 = $result;
$pos_584 = $this->pos; $pos_584 = $this->pos;
if (( $subres = $this->literal('require') ) !== false) { if (( $subres = $this->literal( 'require' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_599 = true; $_599 = TRUE; break;
break;
} }
$result = $res_584; $result = $res_584;
$this->pos = $pos_584; $this->pos = $pos_584;
$_597 = null; $_597 = NULL;
do { do {
$res_586 = $result; $res_586 = $result;
$pos_586 = $this->pos; $pos_586 = $this->pos;
if (( $subres = $this->literal('cached') ) !== false) { if (( $subres = $this->literal( 'cached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_597 = true; $_597 = TRUE; break;
break;
} }
$result = $res_586; $result = $res_586;
$this->pos = $pos_586; $this->pos = $pos_586;
$_595 = null; $_595 = NULL;
do { do {
$res_588 = $result; $res_588 = $result;
$pos_588 = $this->pos; $pos_588 = $this->pos;
if (( $subres = $this->literal('uncached') ) !== false) { if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_595 = true; $_595 = TRUE; break;
break;
} }
$result = $res_588; $result = $res_588;
$this->pos = $pos_588; $this->pos = $pos_588;
$_593 = null; $_593 = NULL;
do { do {
$res_590 = $result; $res_590 = $result;
$pos_590 = $this->pos; $pos_590 = $this->pos;
if (( $subres = $this->literal('cacheblock') ) !== false) { if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_593 = true; $_593 = TRUE; break;
break;
} }
$result = $res_590; $result = $res_590;
$this->pos = $pos_590; $this->pos = $pos_590;
if (( $subres = $this->literal('include') ) !== false) { if (( $subres = $this->literal( 'include' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_593 = true; $_593 = TRUE; break;
break;
} }
$result = $res_590; $result = $res_590;
$this->pos = $pos_590; $this->pos = $pos_590;
$_593 = false; $_593 = FALSE; break;
break;
} while (0);
if ($_593 === true) {
$_595 = true;
break;
} }
while(0);
if( $_593 === TRUE ) { $_595 = TRUE; break; }
$result = $res_588; $result = $res_588;
$this->pos = $pos_588; $this->pos = $pos_588;
$_595 = false; $_595 = FALSE; break;
break;
} while (0);
if ($_595 === true) {
$_597 = true;
break;
} }
while(0);
if( $_595 === TRUE ) { $_597 = TRUE; break; }
$result = $res_586; $result = $res_586;
$this->pos = $pos_586; $this->pos = $pos_586;
$_597 = false; $_597 = FALSE; break;
break;
} while (0);
if ($_597 === true) {
$_599 = true;
break;
} }
while(0);
if( $_597 === TRUE ) { $_599 = TRUE; break; }
$result = $res_584; $result = $res_584;
$this->pos = $pos_584; $this->pos = $pos_584;
$_599 = false; $_599 = FALSE; break;
break;
} while (0);
if ($_599 === true) {
$_601 = true;
break;
} }
while(0);
if( $_599 === TRUE ) { $_601 = TRUE; break; }
$result = $res_582; $result = $res_582;
$this->pos = $pos_582; $this->pos = $pos_582;
$_601 = false; $_601 = FALSE; break;
break;
} while (0);
if ($_601 === true) {
$_603 = true;
break;
} }
while(0);
if( $_601 === TRUE ) { $_603 = TRUE; break; }
$result = $res_580; $result = $res_580;
$this->pos = $pos_580; $this->pos = $pos_580;
$_603 = false; $_603 = FALSE; break;
break;
} while (0);
if ($_603 === true) {
$_605 = true;
break;
} }
while(0);
if( $_603 === TRUE ) { $_605 = TRUE; break; }
$result = $res_578; $result = $res_578;
$this->pos = $pos_578; $this->pos = $pos_578;
$_605 = false; $_605 = FALSE; break;
break;
} while (0);
if ($_605 === false) {
$_607 = false;
break;
} }
$_607 = true; while(0);
break; if( $_605 === FALSE) { $_607 = FALSE; break; }
} while (0); $_607 = TRUE; break;
if ($_607 === false) {
$_610 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { while(0);
$result["text"] .= $subres; if( $_607 === FALSE) { $_610 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_610 = false; else { $_610 = FALSE; break; }
break; $_610 = TRUE; break;
}
$_610 = true;
break;
} while (0);
if ($_610 === true) {
$_612 = true;
break;
} }
while(0);
if( $_610 === TRUE ) { $_612 = TRUE; break; }
$result = $res_576; $result = $res_576;
$this->pos = $pos_576; $this->pos = $pos_576;
$_612 = false; $_612 = FALSE; break;
break;
} while (0);
if ($_612 === true) {
return $this->finalise($result);
}
if ($_612 === false) {
return false;
} }
while(0);
if( $_612 === TRUE ) { return $this->finalise($result); }
if( $_612 === FALSE) { return FALSE; }
} }
/* ClosedBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > Zap:'%>' Template:$TemplateMatcher? /* ClosedBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > Zap:'%>' Template:$TemplateMatcher?
'<%' < 'end_' '$BlockName' > '%>' */ '<%' < 'end_' '$BlockName' > '%>' */
protected $match_ClosedBlock_typestack = array('ClosedBlock'); protected $match_ClosedBlock_typestack = array('ClosedBlock');
function match_ClosedBlock($stack = array()) function match_ClosedBlock ($stack = array()) {
{ $matchrule = "ClosedBlock"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "ClosedBlock"; $_632 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_632 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_632 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_632 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$res_616 = $result; $res_616 = $result;
$pos_616 = $this->pos; $pos_616 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$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_616; $result = $res_616;
$this->pos = $pos_616; $this->pos = $pos_616;
$_632 = false; $_632 = FALSE; break;
break; }
} else { else {
$result = $res_616; $result = $res_616;
$this->pos = $pos_616; $this->pos = $pos_616;
} }
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_632 = false;
break;
} }
else { $_632 = FALSE; break; }
$res_622 = $result; $res_622 = $result;
$pos_622 = $this->pos; $pos_622 = $this->pos;
$_621 = null; $_621 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_621 = FALSE; break; }
} else { $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$_621 = false;
break;
}
$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 {
$_621 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_621 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} else { else { $_621 = FALSE; break; }
$_621 = false; $_621 = TRUE; break;
break;
} }
$_621 = true; while(0);
break; if( $_621 === FALSE) {
} while (0);
if ($_621 === false) {
$result = $res_622; $result = $res_622;
$this->pos = $pos_622; $this->pos = $pos_622;
unset( $res_622 ); unset( $res_622 );
unset( $pos_622 ); unset( $pos_622 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$stack[] = $result; $result = $this->construct( $matchrule, "Zap" );
if (( $subres = $this->literal( '%>' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
} $subres = $result; $result = array_pop($stack);
$stack[] = $result;
$result = $this->construct($matchrule, "Zap");
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
$subres = $result;
$result = array_pop($stack);
$this->store( $result, $subres, 'Zap' ); $this->store( $result, $subres, 'Zap' );
} else { }
else {
$result = array_pop($stack); $result = array_pop($stack);
$_632 = false; $_632 = FALSE; break;
break;
} }
$res_625 = $result; $res_625 = $result;
$pos_625 = $this->pos; $pos_625 = $this->pos;
$matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos;
$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_625; $result = $res_625;
$this->pos = $pos_625; $this->pos = $pos_625;
unset( $res_625 ); unset( $res_625 );
unset( $pos_625 ); unset( $pos_625 );
} }
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_632 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_632 = false; if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_632 = FALSE; break; }
} if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'BlockName').'' ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->whitespace() ) !== false) { else { $_632 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('end_') ) !== false) { else { $_632 = FALSE; break; }
$result["text"] .= $subres; $_632 = TRUE; break;
} else {
$_632 = false;
break;
}
if (( $subres = $this->literal(''.$this->expression($result, $stack, 'BlockName').'') ) !== false) {
$result["text"] .= $subres;
} else {
$_632 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_632 = false;
break;
}
$_632 = true;
break;
} while (0);
if ($_632 === true) {
return $this->finalise($result);
}
if ($_632 === false) {
return false;
} }
while(0);
if( $_632 === TRUE ) { return $this->finalise($result); }
if( $_632 === FALSE) { return FALSE; }
} }
@ -5193,100 +3910,64 @@ class SSTemplateParser extends Parser implements TemplateParser
/* OpenBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > '%>' */ /* OpenBlock: '<%' < !NotBlockTag BlockName:Word ( [ :BlockArguments ] )? > '%>' */
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"; $_645 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_645 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_645 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_645 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$res_636 = $result; $res_636 = $result;
$pos_636 = $this->pos; $pos_636 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$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_636; $result = $res_636;
$this->pos = $pos_636; $this->pos = $pos_636;
$_645 = false; $_645 = FALSE; break;
break; }
} else { else {
$result = $res_636; $result = $res_636;
$this->pos = $pos_636; $this->pos = $pos_636;
} }
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_645 = false;
break;
} }
else { $_645 = FALSE; break; }
$res_642 = $result; $res_642 = $result;
$pos_642 = $this->pos; $pos_642 = $this->pos;
$_641 = null; $_641 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_641 = FALSE; break; }
} else { $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$_641 = false;
break;
}
$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 {
$_641 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_641 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} else { else { $_641 = FALSE; break; }
$_641 = false; $_641 = TRUE; break;
break;
} }
$_641 = true; while(0);
break; if( $_641 === FALSE) {
} while (0);
if ($_641 === false) {
$result = $res_642; $result = $res_642;
$this->pos = $pos_642; $this->pos = $pos_642;
unset( $res_642 ); unset( $res_642 );
unset( $pos_642 ); unset( $pos_642 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
} else { $_645 = FALSE; break; }
if (( $subres = $this->literal('%>') ) !== false) { $_645 = TRUE; break;
$result["text"] .= $subres;
} else {
$_645 = false;
break;
}
$_645 = true;
break;
} while (0);
if ($_645 === true) {
return $this->finalise($result);
}
if ($_645 === false) {
return false;
} }
while(0);
if( $_645 === TRUE ) { return $this->finalise($result); }
if( $_645 === FALSE) { return FALSE; }
} }
@ -5367,55 +4048,29 @@ class SSTemplateParser extends Parser implements TemplateParser
/* MismatchedEndBlock: '<%' < 'end_' :Word > '%>' */ /* MismatchedEndBlock: '<%' < 'end_' :Word > '%>' */
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"; $_653 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_653 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_653 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_653 = false; if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_653 = FALSE; break; }
} $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
if (( $subres = $this->literal('end_') ) !== false) {
$result["text"] .= $subres;
} else {
$_653 = 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))) ) ); $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 {
$_653 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_653 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
if (( $subres = $this->literal('%>') ) !== false) { else { $_653 = FALSE; break; }
$result["text"] .= $subres; $_653 = TRUE; break;
} else {
$_653 = false;
break;
}
$_653 = true;
break;
} while (0);
if ($_653 === true) {
return $this->finalise($result);
}
if ($_653 === false) {
return false;
} }
while(0);
if( $_653 === TRUE ) { return $this->finalise($result); }
if( $_653 === FALSE) { return FALSE; }
} }
@ -5429,117 +4084,80 @@ class SSTemplateParser extends Parser implements TemplateParser
/* MalformedOpenTag: '<%' < !NotBlockTag Tag:Word !( ( [ :BlockArguments ] )? > '%>' ) */ /* MalformedOpenTag: '<%' < !NotBlockTag Tag:Word !( ( [ :BlockArguments ] )? > '%>' ) */
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"; $_668 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_668 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_668 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_668 = false;
break;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$res_657 = $result; $res_657 = $result;
$pos_657 = $this->pos; $pos_657 = $this->pos;
$matcher = 'match_'.'NotBlockTag'; $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos;
$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_657; $result = $res_657;
$this->pos = $pos_657; $this->pos = $pos_657;
$_668 = false; $_668 = FALSE; break;
break; }
} else { else {
$result = $res_657; $result = $res_657;
$this->pos = $pos_657; $this->pos = $pos_657;
} }
$matcher = 'match_'.'Word'; $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$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 {
$_668 = false;
break;
} }
else { $_668 = FALSE; break; }
$res_667 = $result; $res_667 = $result;
$pos_667 = $this->pos; $pos_667 = $this->pos;
$_666 = null; $_666 = NULL;
do { do {
$res_663 = $result; $res_663 = $result;
$pos_663 = $this->pos; $pos_663 = $this->pos;
$_662 = null; $_662 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_662 = FALSE; break; }
} else { $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos;
$_662 = false;
break;
}
$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 {
$_662 = false;
break;
} }
if (( $subres = $this->whitespace() ) !== false) { else { $_662 = FALSE; break; }
$result["text"] .= $subres; if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
} else { else { $_662 = FALSE; break; }
$_662 = false; $_662 = TRUE; break;
break;
} }
$_662 = true; while(0);
break; if( $_662 === FALSE) {
} while (0);
if ($_662 === false) {
$result = $res_663; $result = $res_663;
$this->pos = $pos_663; $this->pos = $pos_663;
unset( $res_663 ); unset( $res_663 );
unset( $pos_663 ); unset( $pos_663 );
} }
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_666 = FALSE; break; }
$_666 = TRUE; break;
} }
if (( $subres = $this->literal('%>') ) !== false) { while(0);
$result["text"] .= $subres; if( $_666 === TRUE ) {
} else {
$_666 = false;
break;
}
$_666 = true;
break;
} while (0);
if ($_666 === true) {
$result = $res_667; $result = $res_667;
$this->pos = $pos_667; $this->pos = $pos_667;
$_668 = false; $_668 = FALSE; break;
break;
} }
if ($_666 === false) { if( $_666 === FALSE) {
$result = $res_667; $result = $res_667;
$this->pos = $pos_667; $this->pos = $pos_667;
} }
$_668 = true; $_668 = TRUE; break;
break;
} while (0);
if ($_668 === true) {
return $this->finalise($result);
}
if ($_668 === false) {
return false;
} }
while(0);
if( $_668 === TRUE ) { return $this->finalise($result); }
if( $_668 === FALSE) { return FALSE; }
} }
@ -5552,89 +4170,59 @@ class SSTemplateParser extends Parser implements TemplateParser
/* MalformedCloseTag: '<%' < Tag:('end_' :Word ) !( > '%>' ) */ /* MalformedCloseTag: '<%' < Tag:('end_' :Word ) !( > '%>' ) */
protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag'); protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag');
function match_MalformedCloseTag($stack = array()) function match_MalformedCloseTag ($stack = array()) {
{ $matchrule = "MalformedCloseTag"; $result = $this->construct($matchrule, $matchrule, null);
$matchrule = "MalformedCloseTag"; $_680 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_680 = null;
do { do {
if (( $subres = $this->literal('<%') ) !== false) { if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_680 = FALSE; break; }
} else { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$_680 = false; $stack[] = $result; $result = $this->construct( $matchrule, "Tag" );
break; $_674 = NULL;
}
if (( $subres = $this->whitespace() ) !== false) {
$result["text"] .= $subres;
}
$stack[] = $result;
$result = $this->construct($matchrule, "Tag");
$_674 = null;
do { do {
if (( $subres = $this->literal('end_') ) !== false) { if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_674 = FALSE; break; }
} else { $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos;
$_674 = 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))) ) ); $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 {
$_674 = false;
break;
} }
$_674 = true; else { $_674 = FALSE; break; }
break; $_674 = TRUE; break;
} while (0); }
if ($_674 === true) { while(0);
$subres = $result; if( $_674 === TRUE ) {
$result = array_pop($stack); $subres = $result; $result = array_pop($stack);
$this->store( $result, $subres, 'Tag' ); $this->store( $result, $subres, 'Tag' );
} }
if ($_674 === false) { if( $_674 === FALSE) {
$result = array_pop($stack); $result = array_pop($stack);
$_680 = false; $_680 = FALSE; break;
break;
} }
$res_679 = $result; $res_679 = $result;
$pos_679 = $this->pos; $pos_679 = $this->pos;
$_678 = null; $_678 = NULL;
do { do {
if (( $subres = $this->whitespace() ) !== false) { if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result["text"] .= $subres; }
else { $_678 = FALSE; break; }
$_678 = TRUE; break;
} }
if (( $subres = $this->literal('%>') ) !== false) { while(0);
$result["text"] .= $subres; if( $_678 === TRUE ) {
} else {
$_678 = false;
break;
}
$_678 = true;
break;
} while (0);
if ($_678 === true) {
$result = $res_679; $result = $res_679;
$this->pos = $pos_679; $this->pos = $pos_679;
$_680 = false; $_680 = FALSE; break;
break;
} }
if ($_678 === false) { if( $_678 === FALSE) {
$result = $res_679; $result = $res_679;
$this->pos = $pos_679; $this->pos = $pos_679;
} }
$_680 = true; $_680 = TRUE; break;
break;
} while (0);
if ($_680 === true) {
return $this->finalise($result);
}
if ($_680 === false) {
return false;
} }
while(0);
if( $_680 === TRUE ) { return $this->finalise($result); }
if( $_680 === FALSE) { return FALSE; }
} }
@ -5648,45 +4236,33 @@ class SSTemplateParser extends Parser implements TemplateParser
/* MalformedBlock: MalformedOpenTag | MalformedCloseTag */ /* MalformedBlock: MalformedOpenTag | MalformedCloseTag */
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"; $_685 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_685 = null;
do { do {
$res_682 = $result; $res_682 = $result;
$pos_682 = $this->pos; $pos_682 = $this->pos;
$matcher = 'match_'.'MalformedOpenTag'; $matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_685 = true; $_685 = TRUE; break;
break;
} }
$result = $res_682; $result = $res_682;
$this->pos = $pos_682; $this->pos = $pos_682;
$matcher = 'match_'.'MalformedCloseTag'; $matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_685 = true; $_685 = TRUE; break;
break;
} }
$result = $res_682; $result = $res_682;
$this->pos = $pos_682; $this->pos = $pos_682;
$_685 = false; $_685 = FALSE; break;
break;
} while (0);
if ($_685 === true) {
return $this->finalise($result);
}
if ($_685 === false) {
return false;
} }
while(0);
if( $_685 === TRUE ) { return $this->finalise($result); }
if( $_685 === FALSE) { return FALSE; }
} }
@ -5694,46 +4270,36 @@ class SSTemplateParser extends Parser implements TemplateParser
/* Comment: "<%--" (!"--%>" /(?s)./)+ "--%>" */ /* Comment: "<%--" (!"--%>" /(?s)./)+ "--%>" */
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"; $_693 = NULL;
$result = $this->construct($matchrule, $matchrule, null);
$_693 = null;
do { do {
if (( $subres = $this->literal('<%--') ) !== false) { if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_693 = FALSE; break; }
} else {
$_693 = false;
break;
}
$count = 0; $count = 0;
while (true) { while (true) {
$res_691 = $result; $res_691 = $result;
$pos_691 = $this->pos; $pos_691 = $this->pos;
$_690 = null; $_690 = NULL;
do { do {
$res_688 = $result; $res_688 = $result;
$pos_688 = $this->pos; $pos_688 = $this->pos;
if (( $subres = $this->literal('--%>') ) !== false) { if (( $subres = $this->literal( '--%>' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$result = $res_688; $result = $res_688;
$this->pos = $pos_688; $this->pos = $pos_688;
$_690 = false; $_690 = FALSE; break;
break; }
} else { else {
$result = $res_688; $result = $res_688;
$this->pos = $pos_688; $this->pos = $pos_688;
} }
if (( $subres = $this->rx('/(?s)./') ) !== false) { if (( $subres = $this->rx( '/(?s)./' ) ) !== FALSE) { $result["text"] .= $subres; }
$result["text"] .= $subres; else { $_690 = FALSE; break; }
} else { $_690 = TRUE; break;
$_690 = false;
break;
} }
$_690 = true; while(0);
break; if( $_690 === FALSE) {
} while (0);
if ($_690 === false) {
$result = $res_691; $result = $res_691;
$this->pos = $pos_691; $this->pos = $pos_691;
unset( $res_691 ); unset( $res_691 );
@ -5742,26 +4308,15 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { }
} else { else { $_693 = FALSE; break; }
$_693 = false; if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result["text"] .= $subres; }
break; else { $_693 = FALSE; break; }
} $_693 = TRUE; break;
if (( $subres = $this->literal('--%>') ) !== false) {
$result["text"] .= $subres;
} else {
$_693 = false;
break;
}
$_693 = true;
break;
} while (0);
if ($_693 === true) {
return $this->finalise($result);
}
if ($_693 === false) {
return false;
} }
while(0);
if( $_693 === TRUE ) { return $this->finalise($result); }
if( $_693 === FALSE) { return FALSE; }
} }
@ -5774,341 +4329,260 @@ class SSTemplateParser extends Parser implements TemplateParser
/* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | /* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock |
OpenBlock | MalformedBlock | MismatchedEndBlock | Injection | Text)+ */ 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_749 = $result; $res_749 = $result;
$pos_749 = $this->pos; $pos_749 = $this->pos;
$_748 = null; $_748 = NULL;
do { do {
$_746 = null; $_746 = NULL;
do { do {
$res_695 = $result; $res_695 = $result;
$pos_695 = $this->pos; $pos_695 = $this->pos;
$matcher = 'match_'.'Comment'; $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos;
$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 );
$_746 = true; $_746 = TRUE; break;
break;
} }
$result = $res_695; $result = $res_695;
$this->pos = $pos_695; $this->pos = $pos_695;
$_744 = null; $_744 = NULL;
do { do {
$res_697 = $result; $res_697 = $result;
$pos_697 = $this->pos; $pos_697 = $this->pos;
$matcher = 'match_'.'Translate'; $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos;
$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 );
$_744 = true; $_744 = TRUE; break;
break;
} }
$result = $res_697; $result = $res_697;
$this->pos = $pos_697; $this->pos = $pos_697;
$_742 = null; $_742 = NULL;
do { do {
$res_699 = $result; $res_699 = $result;
$pos_699 = $this->pos; $pos_699 = $this->pos;
$matcher = 'match_'.'If'; $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos;
$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 );
$_742 = true; $_742 = TRUE; break;
break;
} }
$result = $res_699; $result = $res_699;
$this->pos = $pos_699; $this->pos = $pos_699;
$_740 = null; $_740 = NULL;
do { do {
$res_701 = $result; $res_701 = $result;
$pos_701 = $this->pos; $pos_701 = $this->pos;
$matcher = 'match_'.'Require'; $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos;
$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 );
$_740 = true; $_740 = TRUE; break;
break;
} }
$result = $res_701; $result = $res_701;
$this->pos = $pos_701; $this->pos = $pos_701;
$_738 = null; $_738 = NULL;
do { do {
$res_703 = $result; $res_703 = $result;
$pos_703 = $this->pos; $pos_703 = $this->pos;
$matcher = 'match_'.'CacheBlock'; $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_738 = true; $_738 = TRUE; break;
break;
} }
$result = $res_703; $result = $res_703;
$this->pos = $pos_703; $this->pos = $pos_703;
$_736 = null; $_736 = NULL;
do { do {
$res_705 = $result; $res_705 = $result;
$pos_705 = $this->pos; $pos_705 = $this->pos;
$matcher = 'match_'.'UncachedBlock'; $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_736 = true; $_736 = TRUE; break;
break;
} }
$result = $res_705; $result = $res_705;
$this->pos = $pos_705; $this->pos = $pos_705;
$_734 = null; $_734 = NULL;
do { do {
$res_707 = $result; $res_707 = $result;
$pos_707 = $this->pos; $pos_707 = $this->pos;
$matcher = 'match_'.'OldI18NTag'; $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos;
$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 );
$_734 = true; $_734 = TRUE; break;
break;
} }
$result = $res_707; $result = $res_707;
$this->pos = $pos_707; $this->pos = $pos_707;
$_732 = null; $_732 = NULL;
do { do {
$res_709 = $result; $res_709 = $result;
$pos_709 = $this->pos; $pos_709 = $this->pos;
$matcher = 'match_'.'Include'; $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos;
$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 );
$_732 = true; $_732 = TRUE; break;
break;
} }
$result = $res_709; $result = $res_709;
$this->pos = $pos_709; $this->pos = $pos_709;
$_730 = null; $_730 = NULL;
do { do {
$res_711 = $result; $res_711 = $result;
$pos_711 = $this->pos; $pos_711 = $this->pos;
$matcher = 'match_'.'ClosedBlock'; $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_730 = true; $_730 = TRUE; break;
break;
} }
$result = $res_711; $result = $res_711;
$this->pos = $pos_711; $this->pos = $pos_711;
$_728 = null; $_728 = NULL;
do { do {
$res_713 = $result; $res_713 = $result;
$pos_713 = $this->pos; $pos_713 = $this->pos;
$matcher = 'match_'.'OpenBlock'; $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_728 = true; $_728 = TRUE; break;
break;
} }
$result = $res_713; $result = $res_713;
$this->pos = $pos_713; $this->pos = $pos_713;
$_726 = null; $_726 = NULL;
do { do {
$res_715 = $result; $res_715 = $result;
$pos_715 = $this->pos; $pos_715 = $this->pos;
$matcher = 'match_'.'MalformedBlock'; $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_726 = true; $_726 = TRUE; break;
break;
} }
$result = $res_715; $result = $res_715;
$this->pos = $pos_715; $this->pos = $pos_715;
$_724 = null; $_724 = NULL;
do { do {
$res_717 = $result; $res_717 = $result;
$pos_717 = $this->pos; $pos_717 = $this->pos;
$matcher = 'match_'.'MismatchedEndBlock'; $matcher = 'match_'.'MismatchedEndBlock'; $key = $matcher; $pos = $this->pos;
$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 );
$_724 = true; $_724 = TRUE; break;
break;
} }
$result = $res_717; $result = $res_717;
$this->pos = $pos_717; $this->pos = $pos_717;
$_722 = null; $_722 = NULL;
do { do {
$res_719 = $result; $res_719 = $result;
$pos_719 = $this->pos; $pos_719 = $this->pos;
$matcher = 'match_'.'Injection'; $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos;
$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 );
$_722 = true; $_722 = TRUE; break;
break;
} }
$result = $res_719; $result = $res_719;
$this->pos = $pos_719; $this->pos = $pos_719;
$matcher = 'match_'.'Text'; $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos;
$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 );
$_722 = true; $_722 = TRUE; break;
break;
} }
$result = $res_719; $result = $res_719;
$this->pos = $pos_719; $this->pos = $pos_719;
$_722 = false; $_722 = FALSE; break;
break; }
} while (0); while(0);
if ($_722 === true) { if( $_722 === TRUE ) {
$_724 = true; $_724 = TRUE; break;
break;
} }
$result = $res_717; $result = $res_717;
$this->pos = $pos_717; $this->pos = $pos_717;
$_724 = false; $_724 = FALSE; break;
break;
} while (0);
if ($_724 === true) {
$_726 = true;
break;
} }
while(0);
if( $_724 === TRUE ) { $_726 = TRUE; break; }
$result = $res_715; $result = $res_715;
$this->pos = $pos_715; $this->pos = $pos_715;
$_726 = false; $_726 = FALSE; break;
break;
} while (0);
if ($_726 === true) {
$_728 = true;
break;
} }
while(0);
if( $_726 === TRUE ) { $_728 = TRUE; break; }
$result = $res_713; $result = $res_713;
$this->pos = $pos_713; $this->pos = $pos_713;
$_728 = false; $_728 = FALSE; break;
break;
} while (0);
if ($_728 === true) {
$_730 = true;
break;
} }
while(0);
if( $_728 === TRUE ) { $_730 = TRUE; break; }
$result = $res_711; $result = $res_711;
$this->pos = $pos_711; $this->pos = $pos_711;
$_730 = false; $_730 = FALSE; break;
break;
} while (0);
if ($_730 === true) {
$_732 = true;
break;
} }
while(0);
if( $_730 === TRUE ) { $_732 = TRUE; break; }
$result = $res_709; $result = $res_709;
$this->pos = $pos_709; $this->pos = $pos_709;
$_732 = false; $_732 = FALSE; break;
break;
} while (0);
if ($_732 === true) {
$_734 = true;
break;
} }
while(0);
if( $_732 === TRUE ) { $_734 = TRUE; break; }
$result = $res_707; $result = $res_707;
$this->pos = $pos_707; $this->pos = $pos_707;
$_734 = false; $_734 = FALSE; break;
break;
} while (0);
if ($_734 === true) {
$_736 = true;
break;
} }
while(0);
if( $_734 === TRUE ) { $_736 = TRUE; break; }
$result = $res_705; $result = $res_705;
$this->pos = $pos_705; $this->pos = $pos_705;
$_736 = false; $_736 = FALSE; break;
break;
} while (0);
if ($_736 === true) {
$_738 = true;
break;
} }
while(0);
if( $_736 === TRUE ) { $_738 = TRUE; break; }
$result = $res_703; $result = $res_703;
$this->pos = $pos_703; $this->pos = $pos_703;
$_738 = false; $_738 = FALSE; break;
break;
} while (0);
if ($_738 === true) {
$_740 = true;
break;
} }
while(0);
if( $_738 === TRUE ) { $_740 = TRUE; break; }
$result = $res_701; $result = $res_701;
$this->pos = $pos_701; $this->pos = $pos_701;
$_740 = false; $_740 = FALSE; break;
break;
} while (0);
if ($_740 === true) {
$_742 = true;
break;
} }
while(0);
if( $_740 === TRUE ) { $_742 = TRUE; break; }
$result = $res_699; $result = $res_699;
$this->pos = $pos_699; $this->pos = $pos_699;
$_742 = false; $_742 = FALSE; break;
break;
} while (0);
if ($_742 === true) {
$_744 = true;
break;
} }
while(0);
if( $_742 === TRUE ) { $_744 = TRUE; break; }
$result = $res_697; $result = $res_697;
$this->pos = $pos_697; $this->pos = $pos_697;
$_744 = false; $_744 = FALSE; break;
break;
} while (0);
if ($_744 === true) {
$_746 = true;
break;
} }
while(0);
if( $_744 === TRUE ) { $_746 = TRUE; break; }
$result = $res_695; $result = $res_695;
$this->pos = $pos_695; $this->pos = $pos_695;
$_746 = false; $_746 = FALSE; break;
break;
} while (0);
if ($_746 === false) {
$_748 = false;
break;
} }
$_748 = true; while(0);
break; if( $_746 === FALSE) { $_748 = FALSE; break; }
} while (0); $_748 = TRUE; break;
if ($_748 === false) { }
while(0);
if( $_748 === FALSE) {
$result = $res_749; $result = $res_749;
$this->pos = $pos_749; $this->pos = $pos_749;
unset( $res_749 ); unset( $res_749 );
@ -6117,11 +4591,8 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }
@ -6144,51 +4615,45 @@ class SSTemplateParser extends Parser implements TemplateParser
'{$' !(/[A-Za-z_]/) '{$' !(/[A-Za-z_]/)
)+ */ )+ */
protected $match_Text_typestack = array('Text'); protected $match_Text_typestack = array('Text');
function match_Text($stack = array()) function match_Text ($stack = array()) {
{ $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_788 = $result; $res_788 = $result;
$pos_788 = $this->pos; $pos_788 = $this->pos;
$_787 = null; $_787 = NULL;
do { do {
$_785 = null; $_785 = NULL;
do { do {
$res_750 = $result; $res_750 = $result;
$pos_750 = $this->pos; $pos_750 = $this->pos;
if (( $subres = $this->rx('/ [^<${\\\\]+ /') ) !== false) { if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_785 = true; $_785 = TRUE; break;
break;
} }
$result = $res_750; $result = $res_750;
$this->pos = $pos_750; $this->pos = $pos_750;
$_783 = null; $_783 = NULL;
do { do {
$res_752 = $result; $res_752 = $result;
$pos_752 = $this->pos; $pos_752 = $this->pos;
if (( $subres = $this->rx('/ (\\\\.) /') ) !== false) { if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
$_783 = true; $_783 = TRUE; break;
break;
} }
$result = $res_752; $result = $res_752;
$this->pos = $pos_752; $this->pos = $pos_752;
$_781 = null; $_781 = NULL;
do { do {
$res_754 = $result; $res_754 = $result;
$pos_754 = $this->pos; $pos_754 = $this->pos;
$_757 = null; $_757 = 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 {
$_757 = false;
break;
} }
else { $_757 = FALSE; break; }
$res_756 = $result; $res_756 = $result;
$pos_756 = $this->pos; $pos_756 = $this->pos;
if (substr($this->string,$this->pos,1) == '%') { if (substr($this->string,$this->pos,1) == '%') {
@ -6196,79 +4661,66 @@ class SSTemplateParser extends Parser implements TemplateParser
$result["text"] .= '%'; $result["text"] .= '%';
$result = $res_756; $result = $res_756;
$this->pos = $pos_756; $this->pos = $pos_756;
$_757 = false; $_757 = FALSE; break;
break; }
} else { else {
$result = $res_756; $result = $res_756;
$this->pos = $pos_756; $this->pos = $pos_756;
} }
$_757 = true; $_757 = TRUE; break;
break;
} while (0);
if ($_757 === true) {
$_781 = true;
break;
} }
while(0);
if( $_757 === TRUE ) { $_781 = TRUE; break; }
$result = $res_754; $result = $res_754;
$this->pos = $pos_754; $this->pos = $pos_754;
$_779 = null; $_779 = NULL;
do { do {
$res_759 = $result; $res_759 = $result;
$pos_759 = $this->pos; $pos_759 = $this->pos;
$_764 = null; $_764 = 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 {
$_764 = false;
break;
} }
else { $_764 = FALSE; break; }
$res_763 = $result; $res_763 = $result;
$pos_763 = $this->pos; $pos_763 = $this->pos;
$_762 = null; $_762 = NULL;
do { do {
if (( $subres = $this->rx('/[A-Za-z_]/') ) !== false) { if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
} else {
$_762 = false;
break;
} }
$_762 = true; else { $_762 = FALSE; break; }
break; $_762 = TRUE; break;
} while (0); }
if ($_762 === true) { while(0);
if( $_762 === TRUE ) {
$result = $res_763; $result = $res_763;
$this->pos = $pos_763; $this->pos = $pos_763;
$_764 = false; $_764 = FALSE; break;
break;
} }
if ($_762 === false) { if( $_762 === FALSE) {
$result = $res_763; $result = $res_763;
$this->pos = $pos_763; $this->pos = $pos_763;
} }
$_764 = true; $_764 = TRUE; break;
break;
} while (0);
if ($_764 === true) {
$_779 = true;
break;
} }
while(0);
if( $_764 === TRUE ) { $_779 = TRUE; break; }
$result = $res_759; $result = $res_759;
$this->pos = $pos_759; $this->pos = $pos_759;
$_777 = null; $_777 = NULL;
do { do {
$res_766 = $result; $res_766 = $result;
$pos_766 = $this->pos; $pos_766 = $this->pos;
$_769 = null; $_769 = 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 {
$_769 = false;
break;
} }
else { $_769 = FALSE; break; }
$res_768 = $result; $res_768 = $result;
$pos_768 = $this->pos; $pos_768 = $this->pos;
if (substr($this->string,$this->pos,1) == '$') { if (substr($this->string,$this->pos,1) == '$') {
@ -6276,108 +4728,82 @@ class SSTemplateParser extends Parser implements TemplateParser
$result["text"] .= '$'; $result["text"] .= '$';
$result = $res_768; $result = $res_768;
$this->pos = $pos_768; $this->pos = $pos_768;
$_769 = false; $_769 = FALSE; break;
break; }
} else { else {
$result = $res_768; $result = $res_768;
$this->pos = $pos_768; $this->pos = $pos_768;
} }
$_769 = true; $_769 = TRUE; break;
break;
} while (0);
if ($_769 === true) {
$_777 = true;
break;
} }
while(0);
if( $_769 === TRUE ) { $_777 = TRUE; break; }
$result = $res_766; $result = $res_766;
$this->pos = $pos_766; $this->pos = $pos_766;
$_775 = null; $_775 = NULL;
do { do {
if (( $subres = $this->literal('{$') ) !== false) { if (( $subres = $this->literal( '{$' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
} else {
$_775 = false;
break;
} }
else { $_775 = FALSE; break; }
$res_774 = $result; $res_774 = $result;
$pos_774 = $this->pos; $pos_774 = $this->pos;
$_773 = null; $_773 = NULL;
do { do {
if (( $subres = $this->rx('/[A-Za-z_]/') ) !== false) { if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) {
$result["text"] .= $subres; $result["text"] .= $subres;
} else {
$_773 = false;
break;
} }
$_773 = true; else { $_773 = FALSE; break; }
break; $_773 = TRUE; break;
} while (0); }
if ($_773 === true) { while(0);
if( $_773 === TRUE ) {
$result = $res_774; $result = $res_774;
$this->pos = $pos_774; $this->pos = $pos_774;
$_775 = false; $_775 = FALSE; break;
break;
} }
if ($_773 === false) { if( $_773 === FALSE) {
$result = $res_774; $result = $res_774;
$this->pos = $pos_774; $this->pos = $pos_774;
} }
$_775 = true; $_775 = TRUE; break;
break;
} while (0);
if ($_775 === true) {
$_777 = true;
break;
} }
while(0);
if( $_775 === TRUE ) { $_777 = TRUE; break; }
$result = $res_766; $result = $res_766;
$this->pos = $pos_766; $this->pos = $pos_766;
$_777 = false; $_777 = FALSE; break;
break;
} while (0);
if ($_777 === true) {
$_779 = true;
break;
} }
while(0);
if( $_777 === TRUE ) { $_779 = TRUE; break; }
$result = $res_759; $result = $res_759;
$this->pos = $pos_759; $this->pos = $pos_759;
$_779 = false; $_779 = FALSE; break;
break;
} while (0);
if ($_779 === true) {
$_781 = true;
break;
} }
while(0);
if( $_779 === TRUE ) { $_781 = TRUE; break; }
$result = $res_754; $result = $res_754;
$this->pos = $pos_754; $this->pos = $pos_754;
$_781 = false; $_781 = FALSE; break;
break;
} while (0);
if ($_781 === true) {
$_783 = true;
break;
} }
while(0);
if( $_781 === TRUE ) { $_783 = TRUE; break; }
$result = $res_752; $result = $res_752;
$this->pos = $pos_752; $this->pos = $pos_752;
$_783 = false; $_783 = FALSE; break;
break;
} while (0);
if ($_783 === true) {
$_785 = true;
break;
} }
while(0);
if( $_783 === TRUE ) { $_785 = TRUE; break; }
$result = $res_750; $result = $res_750;
$this->pos = $pos_750; $this->pos = $pos_750;
$_785 = false; $_785 = FALSE; break;
break;
} while (0);
if ($_785 === false) {
$_787 = false;
break;
} }
$_787 = true; while(0);
break; if( $_785 === FALSE) { $_787 = FALSE; break; }
} while (0); $_787 = TRUE; break;
if ($_787 === false) { }
while(0);
if( $_787 === FALSE) {
$result = $res_788; $result = $res_788;
$this->pos = $pos_788; $this->pos = $pos_788;
unset( $res_788 ); unset( $res_788 );
@ -6386,11 +4812,8 @@ class SSTemplateParser extends Parser implements TemplateParser
} }
$count += 1; $count += 1;
} }
if ($count > 0) { if ($count > 0) { return $this->finalise($result); }
return $this->finalise($result); else { return FALSE; }
} else {
return false;
}
} }

View File

@ -86,6 +86,7 @@ PHP;
<%t i18nTestModule.INJECTIONS_3 name="Cat" greeting='meow' goodbye="meow" %> <%t i18nTestModule.INJECTIONS_3 name="Cat" greeting='meow' goodbye="meow" %>
<%t i18nTestModule.INJECTIONS_4 name=\$absoluteBaseURL greeting=\$get_locale goodbye="global calls" %> <%t i18nTestModule.INJECTIONS_4 name=\$absoluteBaseURL greeting=\$get_locale goodbye="global calls" %>
<%t i18nTestModule.INJECTIONS_9 "An item|{count} items" is "Test Pluralisation" count=4 %> <%t i18nTestModule.INJECTIONS_9 "An item|{count} items" is "Test Pluralisation" count=4 %>
<%t SilverStripe\TestModule\i18nTestModule.INJECTIONS_10 "This string is namespaced" %>
SS; SS;
$c->collectFromTemplate($html, null, $mymodule); $c->collectFromTemplate($html, null, $mymodule);
@ -104,6 +105,7 @@ SS;
'other' => '{count} items', 'other' => '{count} items',
'comment' => 'Test Pluralisation' 'comment' => 'Test Pluralisation'
], ],
'SilverStripe\\TestModule\\i18nTestModule.INJECTIONS_10' => 'This string is namespaced'
], ],
$c->collectFromTemplate($html, null, $mymodule) $c->collectFromTemplate($html, null, $mymodule)
); );