Code Duplication    Length = 41-45 lines in 3 locations

view/SSTemplateParser.php 3 locations

@@ 492-536 (lines=45) @@
489
490
	/* CallArguments: :Argument ( < "," < :Argument )* */
491
	protected $match_CallArguments_typestack = array('CallArguments');
492
	function match_CallArguments ($stack = array()) {
493
		$matchrule = "CallArguments"; $result = $this->construct($matchrule, $matchrule, null);
494
		$_61 = NULL;
495
		do {
496
			$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
497
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
498
			if ($subres !== FALSE) {
499
				$this->store( $result, $subres, "Argument" );
500
			}
501
			else { $_61 = FALSE; break; }
502
			while (true) {
503
				$res_60 = $result;
504
				$pos_60 = $this->pos;
505
				$_59 = NULL;
506
				do {
507
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
508
					if (substr($this->string,$this->pos,1) == ',') {
509
						$this->pos += 1;
510
						$result["text"] .= ',';
511
					}
512
					else { $_59 = FALSE; break; }
513
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
514
					$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
515
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
516
					if ($subres !== FALSE) {
517
						$this->store( $result, $subres, "Argument" );
518
					}
519
					else { $_59 = FALSE; break; }
520
					$_59 = TRUE; break;
521
				}
522
				while(0);
523
				if( $_59 === FALSE) {
524
					$result = $res_60;
525
					$this->pos = $pos_60;
526
					unset( $res_60 );
527
					unset( $pos_60 );
528
					break;
529
				}
530
			}
531
			$_61 = TRUE; break;
532
		}
533
		while(0);
534
		if( $_61 === TRUE ) { return $this->finalise($result); }
535
		if( $_61 === FALSE) { return FALSE; }
536
	}
537
538
539
@@ 1990-2030 (lines=41) @@
1987
1988
	/* CacheBlockArguments: CacheBlockArgument ( < "," < CacheBlockArgument )* */
1989
	protected $match_CacheBlockArguments_typestack = array('CacheBlockArguments');
1990
	function match_CacheBlockArguments ($stack = array()) {
1991
		$matchrule = "CacheBlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
1992
		$_303 = NULL;
1993
		do {
1994
			$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
1995
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1996
			if ($subres !== FALSE) { $this->store( $result, $subres ); }
1997
			else { $_303 = FALSE; break; }
1998
			while (true) {
1999
				$res_302 = $result;
2000
				$pos_302 = $this->pos;
2001
				$_301 = NULL;
2002
				do {
2003
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2004
					if (substr($this->string,$this->pos,1) == ',') {
2005
						$this->pos += 1;
2006
						$result["text"] .= ',';
2007
					}
2008
					else { $_301 = FALSE; break; }
2009
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2010
					$matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos;
2011
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2012
					if ($subres !== FALSE) { $this->store( $result, $subres ); }
2013
					else { $_301 = FALSE; break; }
2014
					$_301 = TRUE; break;
2015
				}
2016
				while(0);
2017
				if( $_301 === FALSE) {
2018
					$result = $res_302;
2019
					$this->pos = $pos_302;
2020
					unset( $res_302 );
2021
					unset( $pos_302 );
2022
					break;
2023
				}
2024
			}
2025
			$_303 = TRUE; break;
2026
		}
2027
		while(0);
2028
		if( $_303 === TRUE ) { return $this->finalise($result); }
2029
		if( $_303 === FALSE) { return FALSE; }
2030
	}
2031
2032
2033
@@ 3386-3430 (lines=45) @@
3383
3384
	/* BlockArguments: :Argument ( < "," < :Argument)*  */
3385
	protected $match_BlockArguments_typestack = array('BlockArguments');
3386
	function match_BlockArguments ($stack = array()) {
3387
		$matchrule = "BlockArguments"; $result = $this->construct($matchrule, $matchrule, null);
3388
		$_573 = NULL;
3389
		do {
3390
			$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
3391
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3392
			if ($subres !== FALSE) {
3393
				$this->store( $result, $subres, "Argument" );
3394
			}
3395
			else { $_573 = FALSE; break; }
3396
			while (true) {
3397
				$res_572 = $result;
3398
				$pos_572 = $this->pos;
3399
				$_571 = NULL;
3400
				do {
3401
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
3402
					if (substr($this->string,$this->pos,1) == ',') {
3403
						$this->pos += 1;
3404
						$result["text"] .= ',';
3405
					}
3406
					else { $_571 = FALSE; break; }
3407
					if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
3408
					$matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos;
3409
					$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3410
					if ($subres !== FALSE) {
3411
						$this->store( $result, $subres, "Argument" );
3412
					}
3413
					else { $_571 = FALSE; break; }
3414
					$_571 = TRUE; break;
3415
				}
3416
				while(0);
3417
				if( $_571 === FALSE) {
3418
					$result = $res_572;
3419
					$this->pos = $pos_572;
3420
					unset( $res_572 );
3421
					unset( $pos_572 );
3422
					break;
3423
				}
3424
			}
3425
			$_573 = TRUE; break;
3426
		}
3427
		while(0);
3428
		if( $_573 === TRUE ) { return $this->finalise($result); }
3429
		if( $_573 === FALSE) { return FALSE; }
3430
	}
3431
3432
3433
	/* NotBlockTag: "end_" | (("if" | "else_if" | "else" | "require" | "cached" | "uncached" | "cacheblock" | "include")]) */