- update of template and config file parser because of minor parser generator bugs

This commit is contained in:
Uwe.Tews
2010-05-09 16:48:03 +00:00
parent 25ea3dd1de
commit cf11940bf7
3 changed files with 939 additions and 931 deletions

View File

@@ -1,3 +1,6 @@
09/05/2010
- update of template and config file parser because of minor parser generator bugs
07/05/2010
- bugfix on {insert}

View File

@@ -368,7 +368,7 @@ static public $yy_action = array(
function __destruct()
{
while ($this->yyidx >= 0) {
while ($this->yystack !== Array()) {
$this->yy_pop_parser_stack();
}
if (is_resource(self::$yyTraceFILE)) {
@@ -404,7 +404,7 @@ static public $yy_action = array(
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate])) {
$expected += self::$yyExpectedTokens[$nextstate];
$expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
if (in_array($token,
self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
@@ -439,6 +439,8 @@ static public $yy_action = array(
}
break;
} while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
@@ -581,6 +583,11 @@ static public $yy_action = array(
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
#line 127 "smarty_internal_configfileparser.y"
$this->internalError = true;
$this->compiler->trigger_config_file_error("Stack overflow in configfile parser");
#line 586 "smarty_internal_configfileparser.php"
return;
}
$yytos = new TPC_yyStackEntry;
@@ -645,51 +652,51 @@ static public $yy_action = array(
15 => 15,
16 => 16,
);
#line 127 "smarty_internal_configfileparser.y"
#line 133 "smarty_internal_configfileparser.y"
function yy_r0(){ $this->_retvalue = null; }
#line 645 "smarty_internal_configfileparser.php"
#line 130 "smarty_internal_configfileparser.y"
function yy_r1(){ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
#line 648 "smarty_internal_configfileparser.php"
#line 653 "smarty_internal_configfileparser.php"
#line 136 "smarty_internal_configfileparser.y"
function yy_r4(){ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
#line 651 "smarty_internal_configfileparser.php"
#line 137 "smarty_internal_configfileparser.y"
function yy_r5(){ if ($this->smarty->config_read_hidden) { $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); } $this->_retvalue = null; }
#line 654 "smarty_internal_configfileparser.php"
#line 140 "smarty_internal_configfileparser.y"
function yy_r6(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
#line 657 "smarty_internal_configfileparser.php"
#line 141 "smarty_internal_configfileparser.y"
function yy_r7(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor)); }
#line 660 "smarty_internal_configfileparser.php"
function yy_r1(){ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
#line 656 "smarty_internal_configfileparser.php"
#line 142 "smarty_internal_configfileparser.y"
function yy_r8(){ $this->_retvalue = Array(); }
#line 663 "smarty_internal_configfileparser.php"
function yy_r4(){ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
#line 659 "smarty_internal_configfileparser.php"
#line 143 "smarty_internal_configfileparser.y"
function yy_r5(){ if ($this->smarty->config_read_hidden) { $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); } $this->_retvalue = null; }
#line 662 "smarty_internal_configfileparser.php"
#line 146 "smarty_internal_configfileparser.y"
function yy_r9(){ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor); }
#line 666 "smarty_internal_configfileparser.php"
function yy_r6(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
#line 665 "smarty_internal_configfileparser.php"
#line 147 "smarty_internal_configfileparser.y"
function yy_r7(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor)); }
#line 668 "smarty_internal_configfileparser.php"
#line 148 "smarty_internal_configfileparser.y"
function yy_r10(){ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor; }
#line 669 "smarty_internal_configfileparser.php"
#line 149 "smarty_internal_configfileparser.y"
function yy_r11(){ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor; }
#line 672 "smarty_internal_configfileparser.php"
#line 150 "smarty_internal_configfileparser.y"
function yy_r12(){ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor); }
#line 675 "smarty_internal_configfileparser.php"
#line 151 "smarty_internal_configfileparser.y"
function yy_r13(){ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 678 "smarty_internal_configfileparser.php"
function yy_r8(){ $this->_retvalue = Array(); }
#line 671 "smarty_internal_configfileparser.php"
#line 152 "smarty_internal_configfileparser.y"
function yy_r14(){ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 681 "smarty_internal_configfileparser.php"
#line 153 "smarty_internal_configfileparser.y"
function yy_r15(){ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 684 "smarty_internal_configfileparser.php"
function yy_r9(){ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor); }
#line 674 "smarty_internal_configfileparser.php"
#line 154 "smarty_internal_configfileparser.y"
function yy_r10(){ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor; }
#line 677 "smarty_internal_configfileparser.php"
#line 155 "smarty_internal_configfileparser.y"
function yy_r11(){ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor; }
#line 680 "smarty_internal_configfileparser.php"
#line 156 "smarty_internal_configfileparser.y"
function yy_r12(){ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor); }
#line 683 "smarty_internal_configfileparser.php"
#line 157 "smarty_internal_configfileparser.y"
function yy_r13(){ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 686 "smarty_internal_configfileparser.php"
#line 158 "smarty_internal_configfileparser.y"
function yy_r14(){ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 689 "smarty_internal_configfileparser.php"
#line 159 "smarty_internal_configfileparser.y"
function yy_r15(){ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
#line 692 "smarty_internal_configfileparser.php"
#line 160 "smarty_internal_configfileparser.y"
function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
#line 687 "smarty_internal_configfileparser.php"
#line 695 "smarty_internal_configfileparser.php"
private $_retvalue;
@@ -751,7 +758,7 @@ static public $yy_action = array(
$this->internalError = true;
$this->yymajor = $yymajor;
$this->compiler->trigger_config_file_error();
#line 750 "smarty_internal_configfileparser.php"
#line 758 "smarty_internal_configfileparser.php"
}
function yy_accept()
@@ -768,7 +775,7 @@ static public $yy_action = array(
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
#line 768 "smarty_internal_configfileparser.php"
#line 776 "smarty_internal_configfileparser.php"
}
function doParse($yymajor, $yytokenvalue)
@@ -861,4 +868,4 @@ static public $yy_action = array(
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
}
?>
?>

File diff suppressed because it is too large Load Diff