Code Duplication    Length = 41-45 lines in 3 locations

view/SSTemplateParser.php 3 locations

@@ 504-548 (lines=45) @@
501
502
	/* CallArguments: :Argument ( < "," < :Argument )* */
503
	protected $match_CallArguments_typestack = array('CallArguments');
504
	function match_CallArguments ($stack = array()) {
505
		$matchrule = "CallArguments"; $result = $this->construct($matchrule, $matchrule, null);
506
		$_62 = NULL;
507
		do {
508
			$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
509
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
510
			if ($subres !== FALSE) {
511
				$this->store( $result, $subres, "Argument" );
512
			}
513
			else { $_62 = FALSE; break; }
514
			while (true) {
515
				$res_61 = $result;
516
				$pos_61 = $this->pos;
517
				$_60 = NULL;
518
				do {
519
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
520
					if (substr($this->string,$this->pos,1) == ',') {
521
						$this->pos += 1;
522
						$result["text"] .= ',';
523
					}
524
					else { $_60 = FALSE; break; }
525
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
526
					$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
527
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
528
					if ($subres !== FALSE) {
529
						$this->store( $result, $subres, "Argument" );
530
					}
531
					else { $_60 = FALSE; break; }
532
					$_60 = TRUE; break;
533
				}
534
				while(0);
535
				if( $_60 === FALSE) {
536
					$result = $res_61;
537
					$this->pos = $pos_61;
538
					unset( $res_61 );
539
					unset( $pos_61 );
540
					break;
541
				}
542
			}
543
			$_62 = TRUE; break;
544
		}
545
		while(0);
546
		if( $_62 === TRUE ) { return $this->finalise($result); }
547
		if( $_62 === FALSE) { return FALSE; }
548
	}
549
550
551
@@ 2002-2042 (lines=41) @@
1999
		
2000
	/* CacheBlockArguments: CacheBlockArgument ( < "," < CacheBlockArgument )* */
2001
	protected $match_CacheBlockArguments_typestack = array('CacheBlockArguments');
2002
	function match_CacheBlockArguments ($stack = array()) {
2003
		$matchrule = "CacheBlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
2004
		$_304 = NULL;
2005
		do {
2006
			$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
2007
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2008
			if ($subres !== FALSE) { $this->store( $result, $subres ); }
2009
			else { $_304 = FALSE; break; }
2010
			while (true) {
2011
				$res_303 = $result;
2012
				$pos_303 = $this->pos;
2013
				$_302 = NULL;
2014
				do {
2015
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2016
					if (substr($this->string,$this->pos,1) == ',') {
2017
						$this->pos += 1;
2018
						$result["text"] .= ',';
2019
					}
2020
					else { $_302 = FALSE; break; }
2021
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2022
					$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
2023
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2024
					if ($subres !== FALSE) { $this->store( $result, $subres ); }
2025
					else { $_302 = FALSE; break; }
2026
					$_302 = TRUE; break;
2027
				}
2028
				while(0);
2029
				if( $_302 === FALSE) {
2030
					$result = $res_303;
2031
					$this->pos = $pos_303;
2032
					unset( $res_303 );
2033
					unset( $pos_303 );
2034
					break;
2035
				}
2036
			}
2037
			$_304 = TRUE; break;
2038
		}
2039
		while(0);
2040
		if( $_304 === TRUE ) { return $this->finalise($result); }
2041
		if( $_304 === FALSE) { return FALSE; }
2042
	}
2043
2044
2045
@@ 3398-3442 (lines=45) @@
3395
3396
	/* BlockArguments: :Argument ( < "," < :Argument)*  */
3397
	protected $match_BlockArguments_typestack = array('BlockArguments');
3398
	function match_BlockArguments ($stack = array()) {
3399
		$matchrule = "BlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
3400
		$_574 = NULL;
3401
		do {
3402
			$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
3403
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3404
			if ($subres !== FALSE) {
3405
				$this->store( $result, $subres, "Argument" );
3406
			}
3407
			else { $_574 = FALSE; break; }
3408
			while (true) {
3409
				$res_573 = $result;
3410
				$pos_573 = $this->pos;
3411
				$_572 = NULL;
3412
				do {
3413
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
3414
					if (substr($this->string,$this->pos,1) == ',') {
3415
						$this->pos += 1;
3416
						$result["text"] .= ',';
3417
					}
3418
					else { $_572 = FALSE; break; }
3419
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
3420
					$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
3421
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3422
					if ($subres !== FALSE) {
3423
						$this->store( $result, $subres, "Argument" );
3424
					}
3425
					else { $_572 = FALSE; break; }
3426
					$_572 = TRUE; break;
3427
				}
3428
				while(0);
3429
				if( $_572 === FALSE) {
3430
					$result = $res_573;
3431
					$this->pos = $pos_573;
3432
					unset( $res_573 );
3433
					unset( $pos_573 );
3434
					break;
3435
				}
3436
			}
3437
			$_574 = TRUE; break;
3438
		}
3439
		while(0);
3440
		if( $_574 === TRUE ) { return $this->finalise($result); }
3441
		if( $_574 === FALSE) { return FALSE; }
3442
	}
3443
3444
3445
	/* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include")]) */