@ -9,7 +9,7 @@ class TPC_yyStackEntry
** is the value of the token */
** is the value of the token */
}
}
# line 12 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 12 "../smarty/lexer/smarty_internal_configfileparser.y"
/**
/**
* Smarty Internal Plugin Configfileparse
* Smarty Internal Plugin Configfileparse
@ -23,7 +23,7 @@ class TPC_yyStackEntry
*/
*/
class Smarty_Internal_Configfileparser
class Smarty_Internal_Configfileparser
{
{
# line 25 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 25 "../smarty/lexer/smarty_internal_configfileparser.y"
const TPC_OPENB = 1;
const TPC_OPENB = 1;
const TPC_SECTION = 2;
const TPC_SECTION = 2;
const TPC_CLOSEB = 3;
const TPC_CLOSEB = 3;
@ -48,7 +48,7 @@ class Smarty_Internal_Configfileparser
const YY_SZ_ACTTAB = 38;
const YY_SZ_ACTTAB = 38;
const YY_SHIFT_USE_DFLT = -8;
const YY_SHIFT_USE_DFLT = -8;
const YY_SHIFT_MAX = 19;
const YY_SHIFT_MAX = 19;
const YY_REDUCE_USE_DFLT = -2 1;
const YY_REDUCE_USE_DFLT = -17 ;
const YY_REDUCE_MAX = 10;
const YY_REDUCE_MAX = 10;
const YYNOCODE = 29;
const YYNOCODE = 29;
const YYSTACKDEPTH = 100;
const YYSTACKDEPTH = 100;
@ -57,27 +57,32 @@ class Smarty_Internal_Configfileparser
const YYERRORSYMBOL = 19;
const YYERRORSYMBOL = 19;
const YYERRSYMDT = 'yy0';
const YYERRSYMDT = 'yy0';
const YYFALLBACK = 0;
const YYFALLBACK = 0;
static public $yy_action = array(
29, 30, 34, 33, 24, 13, 19, 25, 35, 21,
public static $yy_action = array(
59, 8, 3, 1, 20, 12, 14, 31, 20, 12,
32, 31, 30, 29, 35, 13, 19, 3, 24, 26,
15, 17, 23, 18, 27, 26, 4, 5, 6, 32,
59, 9, 14, 1, 16, 25, 11, 28, 25, 11,
2, 11, 28, 22, 16, 9, 7, 10,
17, 27, 34, 20, 18, 15, 23, 5, 6, 22,
10, 8, 4, 12, 2, 33, 7, 21,
);
);
static public $yy_lookahead = array(
7, 8, 9, 10, 11, 12, 5, 27, 15, 16,
public static $yy_lookahead = array(
20, 21, 23, 23, 17, 18, 13, 14, 17, 18,
7, 8, 9, 10, 11, 12, 5, 23, 15, 16,
15, 2, 17, 4, 25, 26, 6, 3, 3, 14,
20, 21, 2, 23, 4, 17, 18, 14, 17, 18,
23, 1, 24, 17, 2, 25, 22, 25,
13, 14, 25, 26, 15, 2, 17, 3, 3, 17,
25, 25, 6, 1, 23, 27, 22, 24,
);
);
static public $yy_shift_ofst = array(
-8, 1, 1, 1, -7, -3, -3, 30, -8, -8,
public static $yy_shift_ofst = array(
-8, 19, 5, 3, 15, 16, 24, 25, 32, 20,
-8, 1, 1, 1, -7, -2, -2, 32, -8, -8,
-8, 9, 10, 7, 25, 24, 23, 3, 12, 26,
);
);
static public $yy_reduce_ofst = array(
-10, -1, -1, -1, -20, 10, 12, 8, 14, 7,
public static $yy_reduce_ofst = array(
-11,
-10, -3, -3, -3, 8, 6, 5, 13, 11, 14,
-16,
);
);
static public $yyExpectedTokens = array(
public static $yyExpectedTokens = array(
array(),
array(),
array(5, 17, 18,),
array(5, 17, 18,),
array(5, 17, 18,),
array(5, 17, 18,),
@ -89,14 +94,14 @@ class Smarty_Internal_Configfileparser
array(),
array(),
array(),
array(),
array(),
array(),
array(2, 4,),
array(15, 17,),
array(15, 17,),
array(2, 4,),
array(13, 14,),
array(13, 14,),
array(14,),
array(17,),
array(3,),
array(3,),
array(3,),
array(3,),
array(2,),
array(2,),
array(14,),
array(17,),
array(6,),
array(6,),
array(),
array(),
array(),
array(),
@ -115,13 +120,16 @@ class Smarty_Internal_Configfileparser
array(),
array(),
array(),
array(),
);
);
static public $yy_default = array(
44, 37, 41, 40, 58, 58, 58, 36, 39, 44,
public static $yy_default = array(
44, 37, 41, 40, 58, 58, 58, 36, 44, 39,
44, 58, 58, 58, 58, 58, 58, 58, 58, 58,
44, 58, 58, 58, 58, 58, 58, 58, 58, 58,
55, 54, 57, 56, 50, 45, 43, 42, 38, 46 ,
43, 38, 57, 56, 53, 55, 54, 52, 51, 49 ,
47, 52, 51, 49, 48, 53 ,
48, 47, 46, 45, 42, 50 ,
);
);
public static $yyFallback = array();
public static $yyFallback = array();
public static $yyRuleName = array(
public static $yyRuleName = array(
'start ::= global_vars sections',
'start ::= global_vars sections',
'global_vars ::= var_list',
'global_vars ::= var_list',
@ -146,6 +154,7 @@ class Smarty_Internal_Configfileparser
'newline ::= COMMENTSTART NEWLINE',
'newline ::= COMMENTSTART NEWLINE',
'newline ::= COMMENTSTART NAKED_STRING NEWLINE',
'newline ::= COMMENTSTART NAKED_STRING NEWLINE',
);
);
public static $yyRuleInfo = array(
public static $yyRuleInfo = array(
array(0 => 20, 1 => 2),
array(0 => 20, 1 => 2),
array(0 => 21, 1 => 1),
array(0 => 21, 1 => 1),
@ -170,6 +179,7 @@ class Smarty_Internal_Configfileparser
array(0 => 25, 1 => 2),
array(0 => 25, 1 => 2),
array(0 => 25, 1 => 3),
array(0 => 25, 1 => 3),
);
);
public static $yyReduceMap = array(
public static $yyReduceMap = array(
0 => 0,
0 => 0,
2 => 0,
2 => 0,
@ -194,46 +204,60 @@ class Smarty_Internal_Configfileparser
17 => 17,
17 => 17,
18 => 17,
18 => 17,
);
);
/**
/**
* helper map
* helper map
*
*
* @var array
* @var array
*/
*/
private static $escapes_single = array('\\' => '\\',
private static $escapes_single = array(
'\'' => '\'');
'\\' => '\\',
'\'' => '\''
);
/**
/**
* result status
* result status
*
*
* @var bool
* @var bool
*/
*/
public $successful = true;
public $successful = true;
/**
/**
* return value
* return value
*
*
* @var mixed
* @var mixed
*/
*/
public $retvalue = 0;
public $retvalue = 0;
/**
/**
* @var
* @var
*/
*/
public $yymajor;
public $yymajor;
/**
/**
* compiler object
* compiler object
*
*
* @var Smarty_Internal_Config_File_Compiler
* @var Smarty_Internal_Config_File_Compiler
*/
*/
public $compiler = null;
public $compiler = null;
/**
/**
* smarty object
* smarty object
*
*
* @var Smarty
* @var Smarty
*/
*/
public $smarty = null;
public $smarty = null;
public $yyTraceFILE;
public $yyTraceFILE;
public $yyTracePrompt;
public $yyTracePrompt;
public $yyidx;
public $yyidx;
public $yyerrcnt;
public $yyerrcnt;
public $yystack = array();
public $yystack = array();
public $yyTokenName = array(
public $yyTokenName = array(
'$', 'OPENB', 'SECTION', 'CLOSEB',
'$', 'OPENB', 'SECTION', 'CLOSEB',
'DOT', 'ID', 'EQUAL', 'FLOAT',
'DOT', 'ID', 'EQUAL', 'FLOAT',
@ -243,30 +267,35 @@ class Smarty_Internal_Configfileparser
'start', 'global_vars', 'sections', 'var_list',
'start', 'global_vars', 'sections', 'var_list',
'section', 'newline', 'var', 'value',
'section', 'newline', 'var', 'value',
);
);
/**
/**
* lexer object
* lexer object
*
*
* @var Smarty_Internal_Configfilelexer
* @var Smarty_Internal_Configfilelexer
*/
*/
private $lex;
private $lex;
/**
/**
* internal error flag
* internal error flag
*
*
* @var bool
* @var bool
*/
*/
private $internalError = false;
private $internalError = false;
/**
/**
* copy of config_overwrite property
* copy of config_overwrite property
*
*
* @var bool
* @var bool
*/
*/
private $configOverwrite = false;
private $configOverwrite = false;
/**
/**
* copy of config_read_hidden property
* copy of config_read_hidden property
*
*
* @var bool
* @var bool
*/
*/
private $configReadHidden = false;
private $configReadHidden = false;
private $_retvalue;
private $_retvalue;
/**
/**
@ -275,7 +304,7 @@ class Smarty_Internal_Configfileparser
* @param Smarty_Internal_Configfilelexer $lex
* @param Smarty_Internal_Configfilelexer $lex
* @param Smarty_Internal_Config_File_Compiler $compiler
* @param Smarty_Internal_Config_File_Compiler $compiler
*/
*/
function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler)
public function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler)
{
{
$this->lex = $lex;
$this->lex = $lex;
$this->smarty = $compiler->smarty;
$this->smarty = $compiler->smarty;
@ -375,9 +404,11 @@ class Smarty_Internal_Configfileparser
}
}
$yytos = array_pop($this->yystack);
$yytos = array_pop($this->yystack);
if ($this->yyTraceFILE & & $this->yyidx >= 0) {
if ($this->yyTraceFILE & & $this->yyidx >= 0) {
fwrite($this->yyTraceFILE,
fwrite(
$this->yyTraceFILE,
$this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] .
$this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] .
"\n");
"\n"
);
}
}
$yymajor = $yytos->major;
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
self::yy_destructor($yymajor, $yytos->minor);
@ -387,7 +418,7 @@ class Smarty_Internal_Configfileparser
public function __destruct()
public function __destruct()
{
{
while ($this->yystack !== A rray()) {
while ($this->yystack !== a rray()) {
$this->yy_pop_parser_stack();
$this->yy_pop_parser_stack();
}
}
if (is_resource($this->yyTraceFILE)) {
if (is_resource($this->yyTraceFILE)) {
@ -429,7 +460,8 @@ class Smarty_Internal_Configfileparser
$this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$nextstate = $this->yy_find_reduce_action(
$nextstate = $this->yy_find_reduce_action(
$this->yystack[ $this->yyidx ]->stateno,
$this->yystack[ $this->yyidx ]->stateno,
self::$yyRuleInfo[ $yyruleno ][ 0 ]);
self::$yyRuleInfo[ $yyruleno ][ 0 ]
);
if (isset(self::$yyExpectedTokens[ $nextstate ])) {
if (isset(self::$yyExpectedTokens[ $nextstate ])) {
$expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
$expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
if (isset($res4[ $nextstate ][ $token ])) {
if (isset($res4[ $nextstate ][ $token ])) {
@ -515,7 +547,8 @@ class Smarty_Internal_Configfileparser
$this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$nextstate = $this->yy_find_reduce_action(
$nextstate = $this->yy_find_reduce_action(
$this->yystack[ $this->yyidx ]->stateno,
$this->yystack[ $this->yyidx ]->stateno,
self::$yyRuleInfo[ $yyruleno ][ 0 ]);
self::$yyRuleInfo[ $yyruleno ][ 0 ]
);
if (isset($res2[ $nextstate ][ $token ])) {
if (isset($res2[ $nextstate ][ $token ])) {
if ($res2[ $nextstate ][ $token ]) {
if ($res2[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yyidx = $yyidx;
@ -523,10 +556,9 @@ class Smarty_Internal_Configfileparser
return true;
return true;
}
}
} else {
} else {
if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) & &
if ($res2[ $nextstate ][ $token ] =
in_array($token,
(isset(self::$yyExpectedTokens[ $nextstate ]) & &
self::$yyExpectedTokens[ $nextstate ],
in_array($token, self::$yyExpectedTokens[ $nextstate ], true))) {
true))) {
$this->yyidx = $yyidx;
$this->yyidx = $yyidx;
$this->yystack = $stack;
$this->yystack = $stack;
return true;
return true;
@ -589,8 +621,7 @@ class Smarty_Internal_Configfileparser
if (count(self::$yyFallback) & & $iLookAhead < count ( self:: $ yyFallback )
if (count(self::$yyFallback) & & $iLookAhead < count ( self:: $ yyFallback )
& & ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) {
& & ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) {
if ($this->yyTraceFILE) {
if ($this->yyTraceFILE) {
fwrite($this->yyTraceFILE,
fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' .
$this->yyTracePrompt . 'FALLBACK ' .
$this->yyTokenName[ $iLookAhead ] . ' => ' .
$this->yyTokenName[ $iLookAhead ] . ' => ' .
$this->yyTokenName[ $iFallback ] . "\n");
$this->yyTokenName[ $iFallback ] . "\n");
}
}
@ -635,7 +666,7 @@ class Smarty_Internal_Configfileparser
while ($this->yyidx >= 0) {
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
$this->yy_pop_parser_stack();
}
}
# line 239 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 239 "../smarty/lexer/smarty_internal_configfileparser.y"
$this->internalError = true;
$this->internalError = true;
$this->compiler->trigger_config_file_error('Stack overflow in configfile parser');
$this->compiler->trigger_config_file_error('Stack overflow in configfile parser');
return;
return;
@ -646,131 +677,142 @@ class Smarty_Internal_Configfileparser
$yytos->minor = $yypMinor;
$yytos->minor = $yypMinor;
$this->yystack[] = $yytos;
$this->yystack[] = $yytos;
if ($this->yyTraceFILE & & $this->yyidx > 0) {
if ($this->yyTraceFILE & & $this->yyidx > 0) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
"%sShift %d\n",
"%sShift %d\n",
$this->yyTracePrompt,
$this->yyTracePrompt,
$yyNewState);
$yyNewState
);
fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
for ($i = 1; $i < = $this->yyidx; $i++) {
for ($i = 1; $i < = $this->yyidx; $i++) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
" %s",
" %s",
$this->yyTokenName[ $this->yystack[ $i ]->major ]);
$this->yyTokenName[ $this->yystack[ $i ]->major ]
);
}
}
fwrite($this->yyTraceFILE, "\n");
fwrite($this->yyTraceFILE, "\n");
}
}
}
}
function yy_r0()
public function yy_r0()
{
{
$this->_retvalue = null;
$this->_retvalue = null;
}
}
function yy_r1()
public function yy_r1()
{
{
$this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor);
$this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = null;
$this->_retvalue = null;
}
}
function yy_r4()
public function yy_r4()
{
{
$this->add_section_vars($this->yystack[ $this->yyidx + -3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
$this->add_section_vars($this->yystack[ $this->yyidx + -3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = null;
$this->_retvalue = null;
}
}
# line 245 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 245 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r5()
public function yy_r5()
{
{
if ($this->configReadHidden) {
if ($this->configReadHidden) {
$this->add_section_vars($this->yystack[ $this->yyidx + -3 ]->minor,
$this->add_section_vars(
$this->yystack[ $this->yyidx + 0 ]->minor);
$this->yystack[ $this->yyidx + -3 ]->minor,
$this->yystack[ $this->yyidx + 0 ]->minor
);
}
}
$this->_retvalue = null;
$this->_retvalue = null;
}
}
# line 250 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 250 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r6()
public function yy_r6()
{
{
$this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
$this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
}
}
# line 264 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 264 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r7()
public function yy_r7()
{
{
$this->_retvalue =
$this->_retvalue =
array_merge($this->yystack[ $this->yyidx + -1 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
array_merge($this->yystack[ $this->yyidx + -1 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
}
}
# line 269 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 269 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r8()
public function yy_r8()
{
{
$this->_retvalue = array();
$this->_retvalue = array();
}
}
# line 277 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 277 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r9()
public function yy_r9()
{
{
$this->_retvalue = array('key' => $this->yystack[ $this->yyidx + -2 ]->minor,
$this->_retvalue =
'value' => $this->yystack[ $this->yyidx + 0 ]->minor);
array(
'key' => $this->yystack[ $this->yyidx + -2 ]->minor,
'value' => $this->yystack[ $this->yyidx + 0 ]->minor
);
}
}
#line 281 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 281 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r10()
public function yy_r10()
{
{
$this->_retvalue = (float)$this->yystack[ $this->yyidx + 0 ]->minor;
$this->_retvalue = (float)$this->yystack[ $this->yyidx + 0 ]->minor;
}
}
# line 285 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 285 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r11()
public function yy_r11()
{
{
$this->_retvalue = (int)$this->yystack[ $this->yyidx + 0 ]->minor;
$this->_retvalue = (int)$this->yystack[ $this->yyidx + 0 ]->minor;
}
}
# line 291 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 291 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r12()
public function yy_r12()
{
{
$this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor);
}
}
# line 296 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 296 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r13()
public function yy_r13()
{
{
$this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
}
}
# line 300 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 300 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r14()
public function yy_r14()
{
{
$this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
}
}
# line 304 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 304 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r15()
public function yy_r15()
{
{
$this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + -1 ]->minor);
$this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + -1 ]->minor);
}
}
# line 308 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 308 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r16()
public function yy_r16()
{
{
$this->_retvalue = '';
$this->_retvalue = '';
}
}
# line 312 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 312 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r17()
public function yy_r17()
{
{
$this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
$this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
}
# line 316 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 316 "../smarty/lexer/smarty_internal_configfileparser.y"
public function yy_reduce($yyruleno)
public function yy_reduce($yyruleno)
{
{
if ($this->yyTraceFILE & & $yyruleno >= 0
if ($this->yyTraceFILE & & $yyruleno >= 0
& & $yyruleno < count ( self:: $ yyRuleName ) ) {
& & $yyruleno < count ( self:: $ yyRuleName ) ) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
"%sReduce (%d) [%s].\n",
"%sReduce (%d) [%s].\n",
$this->yyTracePrompt,
$this->yyTracePrompt,
$yyruleno,
$yyruleno,
self::$yyRuleName[ $yyruleno ]);
self::$yyRuleName[ $yyruleno ]
);
}
}
$this->_retvalue = $yy_lefthand_side = null;
$this->_retvalue = $yy_lefthand_side = null;
if (isset(self::$yyReduceMap[ $yyruleno ])) {
if (isset(self::$yyReduceMap[ $yyruleno ])) {
@ -803,7 +845,7 @@ class Smarty_Internal_Configfileparser
}
}
}
}
# line 320 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 320 "../smarty/lexer/smarty_internal_configfileparser.y"
public function yy_parse_failed()
public function yy_parse_failed()
{
{
if ($this->yyTraceFILE) {
if ($this->yyTraceFILE) {
@ -814,10 +856,10 @@ class Smarty_Internal_Configfileparser
}
}
}
}
# line 324 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 324 "../smarty/lexer/smarty_internal_configfileparser.y"
public function yy_syntax_error($yymajor, $TOKEN)
public function yy_syntax_error($yymajor, $TOKEN)
{
{
# line 232 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 232 "../smarty/lexer/smarty_internal_configfileparser.y"
$this->internalError = true;
$this->internalError = true;
$this->yymajor = $yymajor;
$this->yymajor = $yymajor;
$this->compiler->trigger_config_file_error();
$this->compiler->trigger_config_file_error();
@ -831,7 +873,7 @@ class Smarty_Internal_Configfileparser
while ($this->yyidx >= 0) {
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
$this->yy_pop_parser_stack();
}
}
# line 225 "../smarty/lexer/smarty_internal_configfileparser.y"
// line 225 "../smarty/lexer/smarty_internal_configfileparser.y"
$this->successful = !$this->internalError;
$this->successful = !$this->internalError;
$this->internalError = false;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
$this->retvalue = $this->_retvalue;
@ -851,10 +893,12 @@ class Smarty_Internal_Configfileparser
}
}
$yyendofinput = ($yymajor == 0);
$yyendofinput = ($yymajor == 0);
if ($this->yyTraceFILE) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
"%sInput %s\n",
"%sInput %s\n",
$this->yyTracePrompt,
$this->yyTracePrompt,
$this->yyTokenName[ $yymajor ]);
$this->yyTokenName[ $yymajor ]
);
}
}
do {
do {
$yyact = $this->yy_find_shift_action($yymajor);
$yyact = $this->yy_find_shift_action($yymajor);
@ -875,9 +919,11 @@ class Smarty_Internal_Configfileparser
$this->yy_reduce($yyact - self::YYNSTATE);
$this->yy_reduce($yyact - self::YYNSTATE);
} elseif ($yyact === self::YY_ERROR_ACTION) {
} elseif ($yyact === self::YY_ERROR_ACTION) {
if ($this->yyTraceFILE) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
"%sSyntax Error!\n",
"%sSyntax Error!\n",
$this->yyTracePrompt);
$this->yyTracePrompt
);
}
}
if (self::YYERRORSYMBOL) {
if (self::YYERRORSYMBOL) {
if ($this->yyerrcnt < 0 ) {
if ($this->yyerrcnt < 0 ) {
@ -886,10 +932,12 @@ class Smarty_Internal_Configfileparser
$yymx = $this->yystack[ $this->yyidx ]->major;
$yymx = $this->yystack[ $this->yyidx ]->major;
if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) {
if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) {
if ($this->yyTraceFILE) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE,
fprintf(
$this->yyTraceFILE,
"%sDiscard input token %s\n",
"%sDiscard input token %s\n",
$this->yyTracePrompt,
$this->yyTracePrompt,
$this->yyTokenName[ $yymajor ]);
$this->yyTokenName[ $yymajor ]
);
}
}
$this->yy_destructor($yymajor, $yytokenvalue);
$this->yy_destructor($yymajor, $yytokenvalue);
$yymajor = self::YYNOCODE;
$yymajor = self::YYNOCODE;
@ -996,4 +1044,3 @@ class Smarty_Internal_Configfileparser
}
}
}
}
}
}