<?php
/* Driver template for the PHP_CSS_ParserrGenerator parser generator. (PHP port of LEMON)
*/
/**
* This can be used to store both the string representation of
* a token, and any useful meta-data associated with the token.
*
* meta-data should be stored as an array
*/
class CSS_ParseryyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
function __construct($s, $m = array())
{
if ($s instanceof CSS_ParseryyToken) {
$this->string = $s->string;
$this->metadata = $s->metadata;
} else {
$this->string = (string) $s;
if ($m instanceof CSS_ParseryyToken) {
$this->metadata = $m->metadata;
} elseif (is_array($m)) {
$this->metadata = $m;
}
}
}
function __toString()
{
return $this->_string;
}
function offsetExists($offset)
{
return isset($this->metadata[$offset]);
}
function offsetGet($offset)
{
return $this->metadata[$offset];
}
function offsetSet($offset, $value)
{
if ($offset === null) {
if (isset($value[0])) {
$x = ($value instanceof CSS_ParseryyToken) ?
$value->metadata : $value;
$this->metadata = array_merge($this->metadata, $x);
return;
}
$offset = count($this->metadata);
}
if ($value === null) {
return;
}
if ($value instanceof CSS_ParseryyToken) {
if ($value->metadata) {
$this->metadata[$offset] = $value->metadata;
}
} elseif ($value) {
$this->metadata[$offset] = $value;
}
}
function offsetUnset($offset)
{
unset($this->metadata[$offset]);
}
}
/** The following structure represents a single element of the
* parser's stack. Information stored includes:
*
* + The state number for the parser at this level of the stack.
*
* + The value of the token stored at this level of the stack.
* (In other words, the "major" token.)
*
* + The semantic value stored at this level of the stack. This is
* the information used by the action routines in the grammar.
* It is sometimes called the "minor" token.
*/
class CSS_ParseryyStackEntry
{
public $stateno; /* The state-number */
public $major; /* The major token value. This is the code
** number for the token at this stack level */
public $minor; /* The user-supplied minor token value. This
** is the value of the token */
};
// code external to the class is included here
#line 4 "Parser.y"
/*
require_once('CSS/DOM/CSSCharsetRule.php');
require_once('CSS/DOM/CSSImportRule.php');
require_once('CSS/DOM/CSSMediaRule.php');
*/
require_once('Structures/CSS.php');
require_once('Structures/CSS/Value/Generic.php');
require_once('Structures/CSS/Value/Numeric.php');
require_once('Structures/CSS/Value/Unit.php');
require_once('Structures/CSS/Value/Color.php');
require_once('Structures/CSS/Value/Function.php');
require_once('Structures/CSS/Value/Uri.php');
require_once('Structures/CSS/Declaration.php');
require_once('Structures/CSS/Rule/Set.php');
require_once('Structures/CSS/Rule/AtPage.php');
require_once('Structures/CSS/Rule/AtMedia.php');
require_once('Structures/CSS/Rule/AtImport.php');
require_once('Structures/CSS/Selector.php');
require_once('CSS/Parser/Exception/Syntax.php');
#line 120 "Parser.php"
// declare_class is output here
#line 24 "Parser.y"
class CSS_Parser#line 125 "Parser.php"
{
/* First off, code is included which follows the "include_class" declaration
** in the input file. */
#line 31 "Parser.y"
public $result;
public function tokenizeAndParse($lexer, $input)
{
$lexer->setInput($input);
try {
$lastTokenLength = 0;
while ($token = $lexer->nextToken()) {
$this->doParse($token['token'], $token['value']);
$lastTokenLength = strlen($token['value']); // We may need this for error reporting
}
$unexpectedEOF = true;
$this->doParse(0,0);
unset($unexpectedEOF);
return $this->result;
} catch (Exception $e) {
// We have a parsing error. Collect some usefull info
// 1. Was this an EOF error?
if (isset($unexpectedEOF) && $unexpectedEOF) {
require_once('CSS/Parser/Exception/EOF.php');
throw new CSS_Parser_Exception_EOF;
} else {
require_once('CSS/Parser/Exception/Syntax.php');
// 2. No eof error, find out which line/column it ocurred in
$rows = explode("\n", $input);
$errorCharacter = $lexer->_cursor - $lastTokenLength;
$line = 0;
$marker = 0;
while ($marker <= $errorCharacter) {
$marker += strlen($rows[$line]) + 1; // explode removed the \n so we add 1 phantom character
$line++;
}
$line--; // The cycle overshoots the line, so go back one line
$marker -= strlen($rows[$line]) + 1; // and reset the marker
$column = $errorCharacter - $marker; // What's leftover in the marker is the column
$line++; $column++; // Humans tend to start counting by 1, not 0
// 3. Let's grab contextual input for presentation purposes
$contextual = array();
for ($i = 0; $i < 3; $i++) if (array_key_exists($line - 2 + $i, $rows)) $contextual[$i] = $rows[$line - 2 + $i]; else $contextual[$i] = null;
throw new CSS_Parser_Exception_Syntax($line, $column, $lastTokenLength, $contextual);
}
}
}
#line 177 "Parser.php"
/* Next is all token values, as class constants
*/
/*
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands.
**
** Each symbol here is a terminal symbol in the grammar.
*/
const SEMICOLON = 1;
const CHARSET_SYM = 2;
const SS = 3;
const STRING = 4;
const CDO = 5;
const CDC = 6;
const IMPORT_SYM = 7;
const URI = 8;
const COMMA = 9;
const LBRACE = 10;
const RBRACE = 11;
const MEDIA_SYM = 12;
const IDENT = 13;
const PAGE_SYM = 14;
const COLON = 15;
const SLASH = 16;
const GREATER = 17;
const PLUS = 18;
const MINUS = 19;
const HASH = 20;
const DOT = 21;
const STAR = 22;
const LBRACKET = 23;
const RBRACKET = 24;
const INCLUDES = 25;
const DASHMATCH = 26;
const EQUAL = 27;
const CSSFUNCTION = 28;
const RPAREN = 29;
const IMPORTANT_SYM = 30;
const NUMBER = 31;
const PERCENTAGE = 32;
const LENGTH = 33;
const EMS = 34;
const EXS = 35;
const ANGLE = 36;
const TIME = 37;
const FREQ = 38;
const DIMENSION = 39;
const COMMENT = 40;
const YY_NO_ACTION = 399;
const YY_ACCEPT_ACTION = 398;
const YY_ERROR_ACTION = 397;
/* Next are that tables used to determine what action to take based on the
** current state and lookahead token. These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.
**
** Suppose the action integer is N. Then the action is determined as
** follows
**
** 0 <= N < self::YYNSTATE Shift N. That is,
** push the lookahead
** token onto the stack
** and goto state N.
**
** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE.
**
** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred.
**
** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its
** input. (and concludes parsing)
**
** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused
** slots in the yy_action[] table.
**
** The action table is constructed as a single large static array $yy_action.
** Given state S and lookahead X, the action is computed as
**
** self::$yy_action[self::$yy_shift_ofst[S] + X ]
**
** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value
** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if
** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that
** the action is not in the table and that self::$yy_default[S] should be used instead.
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
** a reduce action) then the static $yy_reduce_ofst array is used in place of
** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of
** self::YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
** self::$yy_action A single table containing all actions.
** self::$yy_lookahead A table containing the lookahead for each entry in
** yy_action. Used to detect hash collisions.
** self::$yy_shift_ofst For each state, the offset into self::$yy_action for
** shifting terminals.
** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for
** shifting non-terminals after a reduce.
** self::$yy_default Default action for each state.
*/
const YY_SZ_ACTTAB = 495;
static public $yy_action = array(
/* 0 */ 398, 218, 1, 129, 32, 42, 81, 83, 15, 146,
/* 10 */ 2, 3, 30, 143, 135, 134, 36, 63, 170, 120,
/* 20 */ 38, 98, 138, 49, 102, 21, 193, 108, 118, 35,
/* 30 */ 153, 152, 185, 48, 116, 55, 45, 20, 23, 119,
/* 40 */ 194, 195, 192, 174, 39, 22, 119, 194, 195, 192,
/* 50 */ 2, 3, 30, 143, 135, 134, 36, 44, 131, 111,
/* 60 */ 38, 146, 138, 49, 96, 172, 150, 151, 157, 187,
/* 70 */ 211, 210, 185, 48, 116, 82, 45, 20, 23, 119,
/* 80 */ 194, 195, 192, 58, 82, 80, 4, 31, 143, 135,
/* 90 */ 134, 36, 62, 126, 120, 38, 98, 138, 49, 84,
/* 100 */ 82, 193, 108, 118, 35, 84, 219, 185, 48, 116,
/* 110 */ 79, 45, 20, 23, 119, 194, 195, 192, 82, 57,
/* 120 */ 60, 59, 18, 53, 85, 181, 114, 104, 56, 61,
/* 130 */ 120, 64, 98, 154, 167, 52, 78, 193, 108, 118,
/* 140 */ 35, 169, 144, 10, 144, 144, 94, 71, 93, 89,
/* 150 */ 90, 91, 73, 51, 50, 57, 105, 224, 12, 53,
/* 160 */ 205, 194, 195, 192, 56, 61, 120, 64, 98, 154,
/* 170 */ 167, 52, 33, 193, 108, 118, 35, 95, 16, 10,
/* 180 */ 39, 177, 94, 71, 93, 89, 90, 91, 73, 51,
/* 190 */ 50, 175, 176, 173, 188, 202, 201, 198, 38, 25,
/* 200 */ 138, 49, 208, 151, 157, 187, 211, 210, 34, 5,
/* 210 */ 185, 48, 116, 21, 45, 20, 23, 119, 194, 195,
/* 220 */ 192, 87, 144, 69, 144, 144, 85, 97, 172, 75,
/* 230 */ 75, 61, 120, 64, 98, 21, 72, 72, 6, 193,
/* 240 */ 108, 118, 35, 117, 66, 68, 120, 82, 98, 70,
/* 250 */ 67, 8, 125, 193, 108, 118, 35, 117, 88, 130,
/* 260 */ 34, 178, 185, 48, 116, 7, 45, 20, 23, 119,
/* 270 */ 194, 195, 192, 184, 113, 78, 185, 48, 116, 74,
/* 280 */ 45, 20, 23, 119, 194, 195, 192, 15, 82, 11,
/* 290 */ 171, 128, 185, 48, 116, 19, 45, 20, 23, 119,
/* 300 */ 194, 195, 192, 43, 27, 127, 65, 146, 80, 216,
/* 310 */ 152, 39, 94, 71, 93, 89, 90, 91, 73, 51,
/* 320 */ 50, 100, 183, 179, 39, 46, 29, 110, 77, 146,
/* 330 */ 40, 122, 197, 208, 151, 157, 187, 211, 210, 39,
/* 340 */ 106, 203, 92, 24, 168, 21, 208, 151, 157, 187,
/* 350 */ 211, 210, 190, 156, 149, 54, 204, 124, 41, 109,
/* 360 */ 123, 208, 151, 157, 187, 211, 210, 199, 133, 220,
/* 370 */ 37, 45, 20, 23, 119, 194, 195, 192, 206, 115,
/* 380 */ 45, 20, 23, 119, 194, 195, 192, 86, 27, 120,
/* 390 */ 82, 98, 82, 351, 28, 27, 193, 108, 118, 35,
/* 400 */ 84, 75, 80, 351, 164, 103, 183, 179, 72, 353,
/* 410 */ 189, 110, 101, 183, 179, 98, 82, 75, 110, 353,
/* 420 */ 193, 108, 76, 35, 72, 17, 79, 26, 168, 27,
/* 430 */ 88, 9, 120, 180, 98, 168, 191, 110, 76, 193,
/* 440 */ 108, 118, 35, 160, 99, 183, 179, 182, 179, 166,
/* 450 */ 110, 163, 110, 200, 168, 162, 196, 121, 15, 159,
/* 460 */ 132, 214, 207, 158, 141, 80, 14, 168, 212, 168,
/* 470 */ 213, 137, 186, 13, 275, 145, 107, 161, 275, 112,
/* 480 */ 155, 223, 209, 221, 136, 215, 222, 165, 139, 217,
/* 490 */ 148, 47, 140, 142, 147,
);
static public $yy_lookahead = array(
/* 0 */ 42, 43, 44, 45, 46, 47, 48, 50, 70, 51,
/* 10 */ 52, 53, 54, 55, 56, 57, 58, 11, 61, 13,
/* 20 */ 62, 15, 64, 65, 50, 1, 20, 21, 22, 23,
/* 30 */ 92, 93, 74, 75, 76, 11, 78, 79, 80, 81,
/* 40 */ 82, 83, 84, 45, 72, 80, 81, 82, 83, 84,
/* 50 */ 52, 53, 54, 55, 56, 57, 58, 47, 100, 85,
/* 60 */ 62, 51, 64, 65, 60, 61, 94, 95, 96, 97,
/* 70 */ 98, 99, 74, 75, 76, 3, 78, 79, 80, 81,
/* 80 */ 82, 83, 84, 11, 3, 13, 53, 54, 55, 56,
/* 90 */ 57, 58, 11, 1, 13, 62, 15, 64, 65, 13,
/* 100 */ 3, 20, 21, 22, 23, 13, 3, 74, 75, 76,
/* 110 */ 13, 78, 79, 80, 81, 82, 83, 84, 3, 4,
/* 120 */ 17, 18, 10, 8, 7, 50, 29, 15, 13, 12,
/* 130 */ 13, 14, 15, 18, 19, 20, 4, 20, 21, 22,
/* 140 */ 23, 50, 3, 28, 5, 6, 31, 32, 33, 34,
/* 150 */ 35, 36, 37, 38, 39, 4, 49, 13, 50, 8,
/* 160 */ 81, 82, 83, 84, 13, 12, 13, 14, 15, 18,
/* 170 */ 19, 20, 28, 20, 21, 22, 23, 9, 10, 28,
/* 180 */ 72, 50, 31, 32, 33, 34, 35, 36, 37, 38,
/* 190 */ 39, 55, 56, 57, 24, 25, 26, 27, 62, 91,
/* 200 */ 64, 65, 94, 95, 96, 97, 98, 99, 9, 10,
/* 210 */ 74, 75, 76, 1, 78, 79, 80, 81, 82, 83,
/* 220 */ 84, 2, 3, 11, 5, 6, 7, 60, 61, 9,
/* 230 */ 9, 12, 13, 14, 15, 1, 16, 16, 50, 20,
/* 240 */ 21, 22, 23, 55, 11, 11, 13, 3, 15, 29,
/* 250 */ 29, 63, 1, 20, 21, 22, 23, 55, 13, 40,
/* 260 */ 9, 50, 74, 75, 76, 63, 78, 79, 80, 81,
/* 270 */ 82, 83, 84, 55, 29, 4, 74, 75, 76, 8,
/* 280 */ 78, 79, 80, 81, 82, 83, 84, 70, 3, 50,
/* 290 */ 61, 50, 74, 75, 76, 10, 78, 79, 80, 81,
/* 300 */ 82, 83, 84, 47, 50, 50, 11, 51, 13, 92,
/* 310 */ 93, 72, 31, 32, 33, 34, 35, 36, 37, 38,
/* 320 */ 39, 67, 68, 69, 72, 47, 86, 73, 88, 51,
/* 330 */ 91, 13, 4, 94, 95, 96, 97, 98, 99, 72,
/* 340 */ 87, 13, 89, 91, 90, 1, 94, 95, 96, 97,
/* 350 */ 98, 99, 24, 50, 50, 11, 50, 50, 91, 50,
/* 360 */ 49, 94, 95, 96, 97, 98, 99, 50, 1, 76,
/* 370 */ 59, 78, 79, 80, 81, 82, 83, 84, 76, 50,
/* 380 */ 78, 79, 80, 81, 82, 83, 84, 11, 50, 13,
/* 390 */ 3, 15, 3, 1, 85, 50, 20, 21, 22, 23,
/* 400 */ 13, 9, 13, 11, 50, 67, 68, 69, 16, 1,
/* 410 */ 24, 73, 67, 68, 69, 15, 3, 9, 73, 11,
/* 420 */ 20, 21, 30, 23, 16, 10, 13, 50, 90, 50,
/* 430 */ 13, 15, 13, 69, 15, 90, 13, 73, 30, 20,
/* 440 */ 21, 22, 23, 50, 67, 68, 69, 68, 69, 50,
/* 450 */ 73, 50, 73, 50, 90, 50, 50, 29, 70, 50,
/* 460 */ 50, 50, 50, 97, 50, 13, 71, 90, 50, 90,
/* 470 */ 50, 50, 50, 77, 101, 51, 50, 50, 101, 50,
/* 480 */ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
/* 490 */ 50, 66, 50, 50, 50,
);
const YY_SHIFT_USE_DFLT = -1;
const YY_SHIFT_MAX = 111;
static public $yy_shift_ofst = array(
/* 0 */ 219, 117, 117, 153, 153, 81, 233, 376, 6, 115,
/* 10 */ 115, 151, 151, 419, 419, 151, 72, 389, 389, 389,
/* 20 */ 400, 389, 400, 400, 392, 408, 295, 452, 170, 328,
/* 30 */ 139, 139, 139, 97, 387, 413, 271, 92, 86, 281,
/* 40 */ 220, 221, 139, 139, 139, 103, 139, 285, 168, 112,
/* 50 */ 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
/* 60 */ 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
/* 70 */ 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
/* 80 */ 244, 132, 244, 86, 244, 244, 244, 244, 244, 244,
/* 90 */ 244, 244, 244, 244, 244, 244, 199, 251, 144, 212,
/* 100 */ 24, 344, 245, 234, 318, 367, 386, 415, 423, 417,
/* 110 */ 416, 428,
);
const YY_REDUCE_USE_DFLT = -63;
const YY_REDUCE_MAX = 95;
static public $yy_reduce_ofst = array(
/* 0 */ -42, -2, 33, 136, 136, 188, 202, 218, 218, 108,
/* 10 */ 239, 267, 252, 293, 302, -28, 377, 338, 345, 254,
/* 20 */ -35, 379, 79, 79, -62, 217, 364, 364, 240, 253,
/* 30 */ 256, 10, 278, -26, -43, 309, 311, 167, 4, 366,
/* 40 */ 388, 388, 424, 424, 424, 395, 424, 426, 396, 425,
/* 50 */ 422, 427, 412, 411, 414, 421, 420, 418, 433, 440,
/* 60 */ 439, 438, 442, 444, 443, 431, 429, 435, 434, 436,
/* 70 */ 432, 437, 430, 393, 307, 303, 304, 306, 255, 317,
/* 80 */ 75, 107, 91, 229, 131, 241, 211, 410, 403, 401,
/* 90 */ 405, 409, 406, 399, 354, 329,
);
static public $yyExpectedTokens = array(
/* 0 */ array(2, 3, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 40, ),
/* 1 */ array(7, 12, 13, 14, 15, 20, 21, 22, 23, ),
/* 2 */ array(7, 12, 13, 14, 15, 20, 21, 22, 23, ),
/* 3 */ array(12, 13, 14, 15, 20, 21, 22, 23, ),
/* 4 */ array(12, 13, 14, 15, 20, 21, 22, 23, ),
/* 5 */ array(3, 11, 13, 15, 20, 21, 22, 23, ),
/* 6 */ array(11, 13, 15, 20, 21, 22, 23, ),
/* 7 */ array(11, 13, 15, 20, 21, 22, 23, ),
/* 8 */ array(11, 13, 15, 20, 21, 22, 23, ),
/* 9 */ array(3, 4, 8, 13, 18, 19, 20, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 10 */ array(3, 4, 8, 13, 18, 19, 20, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 11 */ array(4, 8, 13, 18, 19, 20, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 12 */ array(4, 8, 13, 18, 19, 20, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 13 */ array(13, 15, 20, 21, 22, 23, ),
/* 14 */ array(13, 15, 20, 21, 22, 23, ),
/* 15 */ array(4, 8, 13, 18, 19, 20, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 16 */ array(3, 11, 13, ),
/* 17 */ array(3, 13, ),
/* 18 */ array(3, 13, ),
/* 19 */ array(3, 13, ),
/* 20 */ array(15, 20, 21, 23, ),
/* 21 */ array(3, 13, ),
/* 22 */ array(15, 20, 21, 23, ),
/* 23 */ array(15, 20, 21, 23, ),
/* 24 */ array(1, 9, 11, 16, 30, ),
/* 25 */ array(1, 9, 11, 16, 30, ),
/* 26 */ array(11, 13, ),
/* 27 */ array(13, ),
/* 28 */ array(24, 25, 26, 27, ),
/* 29 */ array(4, 13, 24, ),
/* 30 */ array(3, 5, 6, ),
/* 31 */ array(3, 5, 6, ),
/* 32 */ array(3, 5, 6, ),
/* 33 */ array(3, 13, 29, ),
/* 34 */ array(3, 13, ),
/* 35 */ array(3, 13, ),
/* 36 */ array(4, 8, ),
/* 37 */ array(1, 13, ),
/* 38 */ array(13, ),
/* 39 */ array(31, 32, 33, 34, 35, 36, 37, 38, 39, ),
/* 40 */ array(9, 16, 29, ),
/* 41 */ array(9, 16, 29, ),
/* 42 */ array(3, 5, 6, ),
/* 43 */ array(3, 5, 6, ),
/* 44 */ array(3, 5, 6, ),
/* 45 */ array(3, 17, 18, ),
/* 46 */ array(3, 5, 6, ),
/* 47 */ array(3, 10, ),
/* 48 */ array(9, 10, ),
/* 49 */ array(10, 15, ),
/* 50 */ array(3, ),
/* 51 */ array(3, ),
/* 52 */ array(3, ),
/* 53 */ array(3, ),
/* 54 */ array(3, ),
/* 55 */ array(3, ),
/* 56 */ array(3, ),
/* 57 */ array(3, ),
/* 58 */ array(3, ),
/* 59 */ array(3, ),
/* 60 */ array(3, ),
/* 61 */ array(3, ),
/* 62 */ array(3, ),
/* 63 */ array(3, ),
/* 64 */ array(3, ),
/* 65 */ array(3, ),
/* 66 */ array(3, ),
/* 67 */ array(3, ),
/* 68 */ array(3, ),
/* 69 */ array(3, ),
/* 70 */ array(3, ),
/* 71 */ array(3, ),
/* 72 */ array(3, ),
/* 73 */ array(3, ),
/* 74 */ array(3, ),
/* 75 */ array(3, ),
/* 76 */ array(3, ),
/* 77 */ array(3, ),
/* 78 */ array(3, ),
/* 79 */ array(3, ),
/* 80 */ array(3, ),
/* 81 */ array(4, ),
/* 82 */ array(3, ),
/* 83 */ array(13, ),
/* 84 */ array(3, ),
/* 85 */ array(3, ),
/* 86 */ array(3, ),
/* 87 */ array(3, ),
/* 88 */ array(3, ),
/* 89 */ array(3, ),
/* 90 */ array(3, ),
/* 91 */ array(3, ),
/* 92 */ array(3, ),
/* 93 */ array(3, ),
/* 94 */ array(3, ),
/* 95 */ array(3, ),
/* 96 */ array(9, 10, ),
/* 97 */ array(1, 9, ),
/* 98 */ array(13, 28, ),
/* 99 */ array(1, 11, ),
/* 100 */ array(1, 11, ),
/* 101 */ array(1, 11, ),
/* 102 */ array(13, 29, ),
/* 103 */ array(1, 11, ),
/* 104 */ array(13, ),
/* 105 */ array(1, ),
/* 106 */ array(24, ),
/* 107 */ array(10, ),
/* 108 */ array(13, ),
/* 109 */ array(13, ),
/* 110 */ array(15, ),
/* 111 */ array(29, ),
/* 112 */ array(),
/* 113 */ array(),
/* 114 */ array(),
/* 115 */ array(),
/* 116 */ array(),
/* 117 */ array(),
/* 118 */ array(),
/* 119 */ array(),
/* 120 */ array(),
/* 121 */ array(),
/* 122 */ array(),
/* 123 */ array(),
/* 124 */ array(),
/* 125 */ array(),
/* 126 */ array(),
/* 127 */ array(),
/* 128 */ array(),
/* 129 */ array(),
/* 130 */ array(),
/* 131 */ array(),
/* 132 */ array(),
/* 133 */ array(),
/* 134 */ array(),
/* 135 */ array(),
/* 136 */ array(),
/* 137 */ array(),
/* 138 */ array(),
/* 139 */ array(),
/* 140 */ array(),
/* 141 */ array(),
/* 142 */ array(),
/* 143 */ array(),
/* 144 */ array(),
/* 145 */ array(),
/* 146 */ array(),
/* 147 */ array(),
/* 148 */ array(),
/* 149 */ array(),
/* 150 */ array(),
/* 151 */ array(),
/* 152 */ array(),
/* 153 */ array(),
/* 154 */ array(),
/* 155 */ array(),
/* 156 */ array(),
/* 157 */ array(),
/* 158 */ array(),
/* 159 */ array(),
/* 160 */ array(),
/* 161 */ array(),
/* 162 */ array(),
/* 163 */ array(),
/* 164 */ array(),
/* 165 */ array(),
/* 166 */ array(),
/* 167 */ array(),
/* 168 */ array(),
/* 169 */ array(),
/* 170 */ array(),
/* 171 */ array(),
/* 172 */ array(),
/* 173 */ array(),
/* 174 */ array(),
/* 175 */ array(),
/* 176 */ array(),
/* 177 */ array(),
/* 178 */ array(),
/* 179 */ array(),
/* 180 */ array(),
/* 181 */ array(),
/* 182 */ array(),
/* 183 */ array(),
/* 184 */ array(),
/* 185 */ array(),
/* 186 */ array(),
/* 187 */ array(),
/* 188 */ array(),
/* 189 */ array(),
/* 190 */ array(),
/* 191 */ array(),
/* 192 */ array(),
/* 193 */ array(),
/* 194 */ array(),
/* 195 */ array(),
/* 196 */ array(),
/* 197 */ array(),
/* 198 */ array(),
/* 199 */ array(),
/* 200 */ array(),
/* 201 */ array(),
/* 202 */ array(),
/* 203 */ array(),
/* 204 */ array(),
/* 205 */ array(),
/* 206 */ array(),
/* 207 */ array(),
/* 208 */ array(),
/* 209 */ array(),
/* 210 */ array(),
/* 211 */ array(),
/* 212 */ array(),
/* 213 */ array(),
/* 214 */ array(),
/* 215 */ array(),
/* 216 */ array(),
/* 217 */ array(),
/* 218 */ array(),
/* 219 */ array(),
/* 220 */ array(),
/* 221 */ array(),
/* 222 */ array(),
/* 223 */ array(),
/* 224 */ array(),
);
static public $yy_default = array(
/* 0 */ 229, 227, 397, 243, 242, 397, 397, 397, 397, 397,
/* 10 */ 397, 397, 397, 397, 397, 397, 397, 397, 397, 397,
/* 20 */ 317, 397, 318, 319, 296, 296, 397, 397, 397, 397,
/* 30 */ 245, 247, 397, 397, 397, 397, 397, 397, 397, 397,
/* 40 */ 296, 296, 231, 244, 246, 315, 230, 397, 397, 397,
/* 50 */ 379, 377, 389, 385, 283, 281, 383, 381, 311, 397,
/* 60 */ 397, 272, 270, 266, 285, 312, 268, 392, 279, 306,
/* 70 */ 394, 365, 292, 375, 260, 294, 355, 336, 237, 332,
/* 80 */ 302, 397, 235, 397, 276, 256, 264, 233, 333, 369,
/* 90 */ 371, 373, 341, 367, 363, 309, 397, 397, 397, 397,
/* 100 */ 397, 397, 397, 397, 397, 397, 397, 397, 397, 397,
/* 110 */ 397, 397, 269, 347, 348, 310, 307, 274, 328, 320,
/* 120 */ 327, 346, 291, 258, 259, 255, 254, 238, 257, 228,
/* 130 */ 396, 395, 234, 232, 250, 249, 280, 282, 278, 273,
/* 140 */ 271, 284, 286, 248, 241, 240, 239, 267, 298, 356,
/* 150 */ 358, 359, 354, 350, 301, 293, 295, 360, 361, 374,
/* 160 */ 376, 378, 372, 370, 364, 366, 368, 300, 349, 236,
/* 170 */ 262, 263, 261, 253, 226, 251, 252, 277, 265, 289,
/* 180 */ 290, 303, 288, 287, 275, 304, 380, 362, 329, 330,
/* 190 */ 331, 326, 325, 322, 323, 324, 342, 343, 340, 334,
/* 200 */ 335, 339, 338, 344, 337, 321, 316, 390, 357, 393,
/* 210 */ 388, 387, 382, 384, 386, 391, 352, 297, 225, 299,
/* 220 */ 308, 313, 305, 314, 345,
);
/* The next thing included is series of defines which control
** various aspects of the generated parser.
** self::YYNOCODE is a number which corresponds
** to no legal terminal or nonterminal number. This
** number is used to fill in empty slots of the hash
** table.
** self::YYFALLBACK If defined, this indicates that one or more tokens
** have fall-back values which should be used if the
** original value of the token will not parse.
** self::YYSTACKDEPTH is the maximum depth of the parser's stack.
** self::YYNSTATE the combined number of states.
** self::YYNRULE the number of rules in the grammar
** self::YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
*/
const YYNOCODE = 102;
const YYSTACKDEPTH = 100;
const YYNSTATE = 225;
const YYNRULE = 172;
const YYERRORSYMBOL = 41;
const YYERRSYMDT = 'yy0';
const YYFALLBACK = 0;
/** The next table maps tokens into fallback tokens. If a construct
* like the following:
*
* %fallback ID X Y Z.
*
* appears in the grammer, then ID becomes a fallback token for X, Y,
* and Z. Whenever one of the tokens X, Y, or Z is input to the parser
* but it does not parse, the type of the token is changed to ID and
* the parse is retried before an error is thrown.
*/
static public $yyFallback = array(
);
/**
* Turn parser tracing on by giving a stream to which to write the trace
* and a prompt to preface each trace message. Tracing is turned off
* by making either argument NULL
*
* Inputs:
*
* - A stream resource to which trace output should be written.
* If NULL, then tracing is turned off.
* - A prefix string written at the beginning of every
* line of trace output. If NULL, then tracing is
* turned off.
*
* Outputs:
*
* - None.
* @param resource
* @param string
*/
static function Trace($TraceFILE, $zTracePrompt)
{
if (!$TraceFILE) {
$zTracePrompt = 0;
} elseif (!$zTracePrompt) {
$TraceFILE = 0;
}
self::$yyTraceFILE = $TraceFILE;
self::$yyTracePrompt = $zTracePrompt;
}
/**
* Output debug information to output (php://output stream)
*/
static function PrintTrace()
{
self::$yyTraceFILE = fopen('php://output', 'w');
self::$yyTracePrompt = '';
}
/**
* @var resource|0
*/
static public $yyTraceFILE;
/**
* String to prepend to debug output
* @var string|0
*/
static public $yyTracePrompt;
/**
* @var int
*/
public $yyidx; /* Index of top element in stack */
/**
* @var int
*/
public $yyerrcnt; /* Shifts left before out of the error */
/**
* @var array
*/
public $yystack = array(); /* The parser's stack */
/**
* For tracing shifts, the names of all terminals and nonterminals
* are required. The following table supplies these names
* @var array
*/
static public $yyTokenName = array(
'$', 'SEMICOLON', 'CHARSET_SYM', 'SS',
'STRING', 'CDO', 'CDC', 'IMPORT_SYM',
'URI', 'COMMA', 'LBRACE', 'RBRACE',
'MEDIA_SYM', 'IDENT', 'PAGE_SYM', 'COLON',
'SLASH', 'GREATER', 'PLUS', 'MINUS',
'HASH', 'DOT', 'STAR', 'LBRACKET',
'RBRACKET', 'INCLUDES', 'DASHMATCH', 'EQUAL',
'CSSFUNCTION', 'RPAREN', 'IMPORTANT_SYM', 'NUMBER',
'PERCENTAGE', 'LENGTH', 'EMS', 'EXS',
'ANGLE', 'TIME', 'FREQ', 'DIMENSION',
'COMMENT', 'error', 'start', 'stylesheet',
'stylesheet_1', 'stylesheet_2', 'stylesheet_charset', 's_cdo_cdc_plus',
'charset_sym_sstar', 'string_sstar', 'splus', 's_cdo_cdc',
'stylesheet_import', 'stylesheet_ruleset_media_page', 'import', 'ruleset',
'media', 'page', 'import_sym_sstar', 'string_or_uri_sstar',
'medialist', 'medium', 'media_sym_sstar', 'rulesetplus',
'ppage', 'pagesym_sstar', 'pseudo_page', 'declarations',
'sstar_declaration', 'declaration', 'operator', 'combinator',
'unary_operator', 'property', 'rruleset', 'selectors',
'selector', 'comma_sstar', 'simple_selector', 'element_name',
'hash_class_attrib_pseudo_plus', 'hash_class_attrib_pseudo', 'class', 'attrib',
'pseudo', 'trimmed_ident', 'attrib_operator_sstar', 'attrib_operator_rhand_sstar',
'attrib_operator', 'attrib_operator_rhand', 'ddeclaration', 'expr',
'prio', 'important_sym_sstar', 'term', 'term_numeric',
'term_nonnumeric', 'term_numeric_number', 'hexcolor', 'function',
'placeholder',
);
/**
* For tracing reduce actions, the names of all rules are required.
* @var array
*/
static public $yyRuleName = array(
/* 0 */ "start ::= stylesheet",
/* 1 */ "stylesheet ::= stylesheet_1 stylesheet_2",
/* 2 */ "stylesheet ::= stylesheet_1",
/* 3 */ "stylesheet ::= stylesheet_2",
/* 4 */ "stylesheet ::=",
/* 5 */ "stylesheet_1 ::= stylesheet_charset s_cdo_cdc_plus",
/* 6 */ "stylesheet_1 ::= s_cdo_cdc_plus",
/* 7 */ "stylesheet_charset ::= charset_sym_sstar string_sstar SEMICOLON",
/* 8 */ "charset_sym_sstar ::= CHARSET_SYM",
/* 9 */ "charset_sym_sstar ::= CHARSET_SYM splus",
/* 10 */ "splus ::= SS",
/* 11 */ "splus ::= SS splus",
/* 12 */ "string_sstar ::= STRING",
/* 13 */ "string_sstar ::= STRING splus",
/* 14 */ "s_cdo_cdc_plus ::= s_cdo_cdc",
/* 15 */ "s_cdo_cdc_plus ::= s_cdo_cdc_plus s_cdo_cdc",
/* 16 */ "s_cdo_cdc ::= SS|CDO|CDC",
/* 17 */ "stylesheet_2 ::= stylesheet_import stylesheet_ruleset_media_page",
/* 18 */ "stylesheet_2 ::= stylesheet_ruleset_media_page",
/* 19 */ "stylesheet_import ::= import s_cdo_cdc_plus",
/* 20 */ "stylesheet_import ::= import",
/* 21 */ "stylesheet_import ::= stylesheet_import import s_cdo_cdc_plus",
/* 22 */ "stylesheet_import ::= stylesheet_import import",
/* 23 */ "stylesheet_ruleset_media_page ::= ruleset",
/* 24 */ "stylesheet_ruleset_media_page ::= media",
/* 25 */ "stylesheet_ruleset_media_page ::= page",
/* 26 */ "stylesheet_ruleset_media_page ::= stylesheet_ruleset_media_page ruleset",
/* 27 */ "stylesheet_ruleset_media_page ::= stylesheet_ruleset_media_page media",
/* 28 */ "stylesheet_ruleset_media_page ::= stylesheet_ruleset_media_page page",
/* 29 */ "import ::= import_sym_sstar string_or_uri_sstar SEMICOLON",
/* 30 */ "import ::= import_sym_sstar string_or_uri_sstar medialist SEMICOLON",
/* 31 */ "import_sym_sstar ::= IMPORT_SYM",
/* 32 */ "import_sym_sstar ::= IMPORT_SYM splus",
/* 33 */ "string_or_uri_sstar ::= string_sstar",
/* 34 */ "string_or_uri_sstar ::= URI splus",
/* 35 */ "string_or_uri_sstar ::= URI",
/* 36 */ "medialist ::= medium",
/* 37 */ "medialist ::= medialist COMMA medium",
/* 38 */ "medialist ::= medialist COMMA splus medium",
/* 39 */ "media ::= media_sym_sstar medialist LBRACE splus rulesetplus RBRACE",
/* 40 */ "media ::= media_sym_sstar medialist LBRACE splus rulesetplus RBRACE splus",
/* 41 */ "media ::= media_sym_sstar medialist LBRACE rulesetplus RBRACE",
/* 42 */ "media ::= media_sym_sstar medialist LBRACE rulesetplus RBRACE splus",
/* 43 */ "media ::= media_sym_sstar medialist LBRACE splus RBRACE",
/* 44 */ "media ::= media_sym_sstar medialist LBRACE splus RBRACE splus",
/* 45 */ "media ::= media_sym_sstar medialist LBRACE RBRACE",
/* 46 */ "media ::= media_sym_sstar medialist LBRACE RBRACE splus",
/* 47 */ "media_sym_sstar ::= MEDIA_SYM",
/* 48 */ "media_sym_sstar ::= MEDIA_SYM splus",
/* 49 */ "rulesetplus ::= ruleset",
/* 50 */ "rulesetplus ::= rulesetplus ruleset",
/* 51 */ "medium ::= IDENT",
/* 52 */ "medium ::= IDENT splus",
/* 53 */ "page ::= ppage",
/* 54 */ "ppage ::= pagesym_sstar pseudo_page splus LBRACE declarations RBRACE",
/* 55 */ "ppage ::= pagesym_sstar pseudo_page splus LBRACE declarations RBRACE splus",
/* 56 */ "ppage ::= pagesym_sstar pseudo_page LBRACE declarations RBRACE",
/* 57 */ "ppage ::= pagesym_sstar pseudo_page LBRACE declarations RBRACE splus",
/* 58 */ "ppage ::= pagesym_sstar LBRACE declarations RBRACE",
/* 59 */ "ppage ::= pagesym_sstar LBRACE declarations RBRACE splus",
/* 60 */ "pagesym_sstar ::= PAGE_SYM",
/* 61 */ "pagesym_sstar ::= PAGE_SYM splus",
/* 62 */ "declarations ::= sstar_declaration",
/* 63 */ "declarations ::= declarations SEMICOLON sstar_declaration",
/* 64 */ "sstar_declaration ::= declaration",
/* 65 */ "sstar_declaration ::= splus declaration",
/* 66 */ "pseudo_page ::= COLON IDENT",
/* 67 */ "operator ::= SLASH",
/* 68 */ "operator ::= SLASH splus",
/* 69 */ "operator ::= COMMA",
/* 70 */ "operator ::= COMMA splus",
/* 71 */ "operator ::=",
/* 72 */ "combinator ::= GREATER splus",
/* 73 */ "combinator ::= PLUS splus",
/* 74 */ "combinator ::= SS",
/* 75 */ "unary_operator ::= MINUS",
/* 76 */ "unary_operator ::= PLUS",
/* 77 */ "property ::= IDENT",
/* 78 */ "property ::= IDENT splus",
/* 79 */ "ruleset ::= rruleset",
/* 80 */ "rruleset ::= selectors LBRACE declarations RBRACE splus",
/* 81 */ "rruleset ::= selectors LBRACE declarations RBRACE",
/* 82 */ "selectors ::= selector",
/* 83 */ "selectors ::= selectors comma_sstar selector",
/* 84 */ "comma_sstar ::= COMMA",
/* 85 */ "comma_sstar ::= COMMA splus",
/* 86 */ "rruleset ::= selectors LBRACE RBRACE",
/* 87 */ "rruleset ::= selectors LBRACE splus RBRACE",
/* 88 */ "rruleset ::= selectors LBRACE RBRACE splus",
/* 89 */ "rruleset ::= selectors LBRACE splus RBRACE splus",
/* 90 */ "selector ::= simple_selector",
/* 91 */ "selector ::= simple_selector combinator selector",
/* 92 */ "simple_selector ::= element_name",
/* 93 */ "simple_selector ::= element_name hash_class_attrib_pseudo_plus",
/* 94 */ "simple_selector ::= hash_class_attrib_pseudo_plus",
/* 95 */ "hash_class_attrib_pseudo_plus ::= hash_class_attrib_pseudo",
/* 96 */ "hash_class_attrib_pseudo_plus ::= hash_class_attrib_pseudo_plus hash_class_attrib_pseudo",
/* 97 */ "hash_class_attrib_pseudo ::= HASH",
/* 98 */ "hash_class_attrib_pseudo ::= class",
/* 99 */ "hash_class_attrib_pseudo ::= attrib",
/* 100 */ "hash_class_attrib_pseudo ::= pseudo",
/* 101 */ "class ::= DOT IDENT",
/* 102 */ "element_name ::= IDENT",
/* 103 */ "element_name ::= STAR",
/* 104 */ "attrib ::= LBRACKET trimmed_ident RBRACKET",
/* 105 */ "attrib ::= LBRACKET trimmed_ident attrib_operator_sstar attrib_operator_rhand_sstar RBRACKET",
/* 106 */ "attrib ::= LBRACKET trimmed_ident attrib_operator_sstar RBRACKET",
/* 107 */ "trimmed_ident ::= IDENT",
/* 108 */ "trimmed_ident ::= splus IDENT",
/* 109 */ "trimmed_ident ::= IDENT splus",
/* 110 */ "trimmed_ident ::= splus IDENT splus",
/* 111 */ "attrib_operator_sstar ::= attrib_operator",
/* 112 */ "attrib_operator_sstar ::= attrib_operator splus",
/* 113 */ "attrib_operator ::= INCLUDES",
/* 114 */ "attrib_operator ::= DASHMATCH",
/* 115 */ "attrib_operator ::= EQUAL",
/* 116 */ "attrib_operator_rhand_sstar ::= attrib_operator_rhand",
/* 117 */ "attrib_operator_rhand_sstar ::= attrib_operator_rhand splus",
/* 118 */ "attrib_operator_rhand ::= STRING",
/* 119 */ "attrib_operator_rhand ::= IDENT",
/* 120 */ "pseudo ::= COLON IDENT",
/* 121 */ "pseudo ::= COLON CSSFUNCTION trimmed_ident RPAREN",
/* 122 */ "pseudo ::= COLON CSSFUNCTION splus RPAREN",
/* 123 */ "pseudo ::= COLON CSSFUNCTION RPAREN",
/* 124 */ "declaration ::= ddeclaration",
/* 125 */ "ddeclaration ::= property COLON splus expr prio",
/* 126 */ "ddeclaration ::= property COLON splus expr",
/* 127 */ "ddeclaration ::= property COLON expr prio",
/* 128 */ "ddeclaration ::= property COLON expr",
/* 129 */ "prio ::= important_sym_sstar",
/* 130 */ "important_sym_sstar ::= IMPORTANT_SYM",
/* 131 */ "important_sym_sstar ::= IMPORTANT_SYM splus",
/* 132 */ "expr ::= term",
/* 133 */ "expr ::= expr operator term",
/* 134 */ "term ::= term_numeric",
/* 135 */ "term ::= term_nonnumeric",
/* 136 */ "term_numeric ::= unary_operator term_numeric_number",
/* 137 */ "term_numeric ::= term_numeric_number",
/* 138 */ "term_numeric_number ::= NUMBER",
/* 139 */ "term_numeric_number ::= NUMBER splus",
/* 140 */ "term_numeric_number ::= PERCENTAGE",
/* 141 */ "term_numeric_number ::= PERCENTAGE splus",
/* 142 */ "term_numeric_number ::= LENGTH",
/* 143 */ "term_numeric_number ::= LENGTH splus",
/* 144 */ "term_numeric_number ::= EMS",
/* 145 */ "term_numeric_number ::= EMS splus",
/* 146 */ "term_numeric_number ::= EXS",
/* 147 */ "term_numeric_number ::= EXS splus",
/* 148 */ "term_numeric_number ::= ANGLE",
/* 149 */ "term_numeric_number ::= ANGLE splus",
/* 150 */ "term_numeric_number ::= TIME",
/* 151 */ "term_numeric_number ::= TIME splus",
/* 152 */ "term_numeric_number ::= FREQ",
/* 153 */ "term_numeric_number ::= FREQ splus",
/* 154 */ "term_numeric_number ::= DIMENSION",
/* 155 */ "term_numeric_number ::= DIMENSION splus",
/* 156 */ "term_nonnumeric ::= STRING",
/* 157 */ "term_nonnumeric ::= STRING splus",
/* 158 */ "term_nonnumeric ::= IDENT",
/* 159 */ "term_nonnumeric ::= IDENT splus",
/* 160 */ "term_nonnumeric ::= URI",
/* 161 */ "term_nonnumeric ::= URI splus",
/* 162 */ "term_nonnumeric ::= hexcolor",
/* 163 */ "term_nonnumeric ::= function",
/* 164 */ "hexcolor ::= HASH",
/* 165 */ "hexcolor ::= HASH splus",
/* 166 */ "function ::= CSSFUNCTION splus expr RPAREN splus",
/* 167 */ "function ::= CSSFUNCTION splus expr RPAREN",
/* 168 */ "function ::= CSSFUNCTION expr RPAREN splus",
/* 169 */ "function ::= CSSFUNCTION expr RPAREN",
/* 170 */ "stylesheet ::= placeholder",
/* 171 */ "placeholder ::= COMMENT",
);
/**
* This function returns the symbolic name associated with a token
* value.
* @param int
* @return string
*/
function tokenName($tokenType)
{
if ($tokenType === 0) {
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count(self::$yyTokenName)) {
return self::$yyTokenName[$tokenType];
} else {
return "Unknown";
}
}
/**
* The following function deletes the value associated with a
* symbol. The symbol can be either a terminal or nonterminal.
* @param int the symbol code
* @param mixed the symbol's value
*/
static function yy_destructor($yymajor, $yypminor)
{
switch ($yymajor) {
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
** when the symbol is popped from the stack during a
** reduce or during error processing or when a parser is
** being destroyed before it is finished parsing.
**
** Note: during a reduce, the only symbols destroyed are those
** which appear on the RHS of the rule, but which are not used
** inside the C code.
*/
default: break; /* If no destructor action specified: do nothing */
}
}
/**
* Pop the parser's stack once.
*
* If there is a destructor routine associated with the token which
* is popped from the stack, then call it.
*
* Return the major token number for the symbol popped.
* @param CSS_ParseryyParser
* @return int
*/
function yy_pop_parser_stack()
{
if (!count($this->yystack)) {
return;
}
$yytos = array_pop($this->yystack);
if (self::$yyTraceFILE && $this->yyidx >= 0) {
fwrite(self::$yyTraceFILE,
self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] .
"\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
$this->yyidx--;
return $yymajor;
}
/**
* Deallocate and destroy a parser. Destructors are all called for
* all stack elements before shutting the parser down.
*/
function __destruct()
{
if (is_null($this->yyidx)) return;
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
if (is_resource(self::$yyTraceFILE)) {
fclose(self::$yyTraceFILE);
}
}
/**
* Based on the current state and parser stack, get a list of all
* possible lookahead tokens
* @param int
* @return array
*/
function yy_get_expected_tokens($token)
{
$state = $this->yystack[$this->yyidx]->stateno;
$expected = self::$yyExpectedTokens[$state];
if (in_array($token, self::$yyExpectedTokens[$state], true)) {
return $expected;
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
do {
$yyact = $this->yy_find_shift_action($token);
if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
// reduce action
$done = 0;
do {
if ($done++ == 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
// so give up
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
$this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
$nextstate = $this->yy_find_reduce_action(
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate])) {
$expected += self::$yyExpectedTokens[$nextstate];
if (in_array($token,
self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
}
if ($nextstate < self::YYNSTATE) {
// we need to shift a non-terminal
$this->yyidx++;
$x = new CSS_ParseryyStackEntry;
$x->stateno = $nextstate;
$x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
$this->yystack[$this->yyidx] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// the last token was just ignored, we can't accept
// by ignoring input, this is in essence ignoring a
// syntax error!
return array_unique($expected);
} elseif ($nextstate === self::YY_NO_ACTION) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// input accepted, but not shifted (I guess)
return $expected;
} else {
$yyact = $nextstate;
}
} while (true);
}
break;
} while (true);
return array_unique($expected);
}
/**
* Based on the parser state and current parser stack, determine whether
* the lookahead token is possible.
*
* The parser will convert the token value to an error token if not. This
* catches some unusual edge cases where the parser would fail.
* @param int
* @return bool
*/
function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
$state = $this->yystack[$this->yyidx]->stateno;
if (in_array($token, self::$yyExpectedTokens[$state], true)) {
return true;
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
do {
$yyact = $this->yy_find_shift_action($token);
if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
// reduce action
$done = 0;
do {
if ($done++ == 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
// so give up
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
$this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
$nextstate = $this->yy_find_reduce_action(
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate]) &&
in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
if ($nextstate < self::YYNSTATE) {
// we need to shift a non-terminal
$this->yyidx++;
$x = new CSS_ParseryyStackEntry;
$x->stateno = $nextstate;
$x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
$this->yystack[$this->yyidx] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
if (!$token) {
// end of input: this is valid
return true;
}
// the last token was just ignored, we can't accept
// by ignoring input, this is in essence ignoring a
// syntax error!
return false;
} elseif ($nextstate === self::YY_NO_ACTION) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// input accepted, but not shifted (I guess)
return true;
} else {
$yyact = $nextstate;
}
} while (true);
}
break;
} while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
/**
* Find the appropriate action for a parser given the terminal
* look-ahead token iLookAhead.
*
* If the look-ahead token is YYNOCODE, then check to see if the action is
* independent of the look-ahead. If it is, return the action, otherwise
* return YY_NO_ACTION.
* @param int The look-ahead token
*/
function yy_find_shift_action($iLookAhead)
{
$stateno = $this->yystack[$this->yyidx]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
if (!isset(self::$yy_shift_ofst[$stateno])) {
// no shift actions
return self::$yy_default[$stateno];
}
$i = self::$yy_shift_ofst[$stateno];
if ($i === self::YY_SHIFT_USE_DFLT) {
return self::$yy_default[$stateno];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
self::$yy_lookahead[$i] != $iLookAhead) {
if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
&& ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
if (self::$yyTraceFILE) {
fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
self::$yyTokenName[$iLookAhead] . " => " .
self::$yyTokenName[$iFallback] . "\n");
}
return $this->yy_find_shift_action($iFallback);
}
return self::$yy_default[$stateno];
} else {
return self::$yy_action[$i];
}
}
/**
* Find the appropriate action for a parser given the non-terminal
* look-ahead token $iLookAhead.
*
* If the look-ahead token is self::YYNOCODE, then check to see if the action is
* independent of the look-ahead. If it is, return the action, otherwise
* return self::YY_NO_ACTION.
* @param int Current state number
* @param int The look-ahead token
*/
function yy_find_reduce_action($stateno, $iLookAhead)
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
if (!isset(self::$yy_reduce_ofst[$stateno])) {
return self::$yy_default[$stateno];
}
$i = self::$yy_reduce_ofst[$stateno];
if ($i == self::YY_REDUCE_USE_DFLT) {
return self::$yy_default[$stateno];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
self::$yy_lookahead[$i] != $iLookAhead) {
return self::$yy_default[$stateno];
} else {
return self::$yy_action[$i];
}
}
/**
* Perform a shift action.
* @param int The new state to shift in
* @param int The major token to shift in
* @param mixed the minor token to shift in
*/
function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
if ($this->yyidx >= self::YYSTACKDEPTH) {
$this->yyidx--;
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
}
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
/* Here code is inserted which will execute if the parser
** stack ever overflows */
return;
}
$yytos = new CSS_ParseryyStackEntry;
$yytos->stateno = $yyNewState;
$yytos->major = $yyMajor;
$yytos->minor = $yypMinor;
array_push($this->yystack, $yytos);
if (self::$yyTraceFILE && $this->yyidx > 0) {
fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
$yyNewState);
fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
for($i = 1; $i <= $this->yyidx; $i++) {
fprintf(self::$yyTraceFILE, " %s",
self::$yyTokenName[$this->yystack[$i]->major]);
}
fwrite(self::$yyTraceFILE,"\n");
}
}
/**
* The following table contains information about every rule that
* is used during the reduce.
*
* <pre>
* array(
* array(
* int $lhs; Symbol on the left-hand side of the rule
* int $nrhs; Number of right-hand side symbols in the rule
* ),...
* );
* </pre>
*/
static public $yyRuleInfo = array(
array( 'lhs' => 42, 'rhs' => 1 ),
array( 'lhs' => 43, 'rhs' => 2 ),
array( 'lhs' => 43, 'rhs' => 1 ),
array( 'lhs' => 43, 'rhs' => 1 ),
array( 'lhs' => 43, 'rhs' => 0 ),
array( 'lhs' => 44, 'rhs' => 2 ),
array( 'lhs' => 44, 'rhs' => 1 ),
array( 'lhs' => 46, 'rhs' => 3 ),
array( 'lhs' => 48, 'rhs' => 1 ),
array( 'lhs' => 48, 'rhs' => 2 ),
array( 'lhs' => 50, 'rhs' => 1 ),
array( 'lhs' => 50, 'rhs' => 2 ),
array( 'lhs' => 49, 'rhs' => 1 ),
array( 'lhs' => 49, 'rhs' => 2 ),
array( 'lhs' => 47, 'rhs' => 1 ),
array( 'lhs' => 47, 'rhs' => 2 ),
array( 'lhs' => 51, 'rhs' => 1 ),
array( 'lhs' => 45, 'rhs' => 2 ),
array( 'lhs' => 45, 'rhs' => 1 ),
array( 'lhs' => 52, 'rhs' => 2 ),
array( 'lhs' => 52, 'rhs' => 1 ),
array( 'lhs' => 52, 'rhs' => 3 ),
array( 'lhs' => 52, 'rhs' => 2 ),
array( 'lhs' => 53, 'rhs' => 1 ),
array( 'lhs' => 53, 'rhs' => 1 ),
array( 'lhs' => 53, 'rhs' => 1 ),
array( 'lhs' => 53, 'rhs' => 2 ),
array( 'lhs' => 53, 'rhs' => 2 ),
array( 'lhs' => 53, 'rhs' => 2 ),
array( 'lhs' => 54, 'rhs' => 3 ),
array( 'lhs' => 54, 'rhs' => 4 ),
array( 'lhs' => 58, 'rhs' => 1 ),
array( 'lhs' => 58, 'rhs' => 2 ),
array( 'lhs' => 59, 'rhs' => 1 ),
array( 'lhs' => 59, 'rhs' => 2 ),
array( 'lhs' => 59, 'rhs' => 1 ),
array( 'lhs' => 60, 'rhs' => 1 ),
array( 'lhs' => 60, 'rhs' => 3 ),
array( 'lhs' => 60, 'rhs' => 4 ),
array( 'lhs' => 56, 'rhs' => 6 ),
array( 'lhs' => 56, 'rhs' => 7 ),
array( 'lhs' => 56, 'rhs' => 5 ),
array( 'lhs' => 56, 'rhs' => 6 ),
array( 'lhs' => 56, 'rhs' => 5 ),
array( 'lhs' => 56, 'rhs' => 6 ),
array( 'lhs' => 56, 'rhs' => 4 ),
array( 'lhs' => 56, 'rhs' => 5 ),
array( 'lhs' => 62, 'rhs' => 1 ),
array( 'lhs' => 62, 'rhs' => 2 ),
array( 'lhs' => 63, 'rhs' => 1 ),
array( 'lhs' => 63, 'rhs' => 2 ),
array( 'lhs' => 61, 'rhs' => 1 ),
array( 'lhs' => 61, 'rhs' => 2 ),
array( 'lhs' => 57, 'rhs' => 1 ),
array( 'lhs' => 64, 'rhs' => 6 ),
array( 'lhs' => 64, 'rhs' => 7 ),
array( 'lhs' => 64, 'rhs' => 5 ),
array( 'lhs' => 64, 'rhs' => 6 ),
array( 'lhs' => 64, 'rhs' => 4 ),
array( 'lhs' => 64, 'rhs' => 5 ),
array( 'lhs' => 65, 'rhs' => 1 ),
array( 'lhs' => 65, 'rhs' => 2 ),
array( 'lhs' => 67, 'rhs' => 1 ),
array( 'lhs' => 67, 'rhs' => 3 ),
array( 'lhs' => 68, 'rhs' => 1 ),
array( 'lhs' => 68, 'rhs' => 2 ),
array( 'lhs' => 66, 'rhs' => 2 ),
array( 'lhs' => 70, 'rhs' => 1 ),
array( 'lhs' => 70, 'rhs' => 2 ),
array( 'lhs' => 70, 'rhs' => 1 ),
array( 'lhs' => 70, 'rhs' => 2 ),
array( 'lhs' => 70, 'rhs' => 0 ),
array( 'lhs' => 71, 'rhs' => 2 ),
array( 'lhs' => 71, 'rhs' => 2 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 72, 'rhs' => 1 ),
array( 'lhs' => 72, 'rhs' => 1 ),
array( 'lhs' => 73, 'rhs' => 1 ),
array( 'lhs' => 73, 'rhs' => 2 ),
array( 'lhs' => 55, 'rhs' => 1 ),
array( 'lhs' => 74, 'rhs' => 5 ),
array( 'lhs' => 74, 'rhs' => 4 ),
array( 'lhs' => 75, 'rhs' => 1 ),
array( 'lhs' => 75, 'rhs' => 3 ),
array( 'lhs' => 77, 'rhs' => 1 ),
array( 'lhs' => 77, 'rhs' => 2 ),
array( 'lhs' => 74, 'rhs' => 3 ),
array( 'lhs' => 74, 'rhs' => 4 ),
array( 'lhs' => 74, 'rhs' => 4 ),
array( 'lhs' => 74, 'rhs' => 5 ),
array( 'lhs' => 76, 'rhs' => 1 ),
array( 'lhs' => 76, 'rhs' => 3 ),
array( 'lhs' => 78, 'rhs' => 1 ),
array( 'lhs' => 78, 'rhs' => 2 ),
array( 'lhs' => 78, 'rhs' => 1 ),
array( 'lhs' => 80, 'rhs' => 1 ),
array( 'lhs' => 80, 'rhs' => 2 ),
array( 'lhs' => 81, 'rhs' => 1 ),
array( 'lhs' => 81, 'rhs' => 1 ),
array( 'lhs' => 81, 'rhs' => 1 ),
array( 'lhs' => 81, 'rhs' => 1 ),
array( 'lhs' => 82, 'rhs' => 2 ),
array( 'lhs' => 79, 'rhs' => 1 ),
array( 'lhs' => 79, 'rhs' => 1 ),
array( 'lhs' => 83, 'rhs' => 3 ),
array( 'lhs' => 83, 'rhs' => 5 ),
array( 'lhs' => 83, 'rhs' => 4 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 2 ),
array( 'lhs' => 85, 'rhs' => 2 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 86, 'rhs' => 1 ),
array( 'lhs' => 86, 'rhs' => 2 ),
array( 'lhs' => 88, 'rhs' => 1 ),
array( 'lhs' => 88, 'rhs' => 1 ),
array( 'lhs' => 88, 'rhs' => 1 ),
array( 'lhs' => 87, 'rhs' => 1 ),
array( 'lhs' => 87, 'rhs' => 2 ),
array( 'lhs' => 89, 'rhs' => 1 ),
array( 'lhs' => 89, 'rhs' => 1 ),
array( 'lhs' => 84, 'rhs' => 2 ),
array( 'lhs' => 84, 'rhs' => 4 ),
array( 'lhs' => 84, 'rhs' => 4 ),
array( 'lhs' => 84, 'rhs' => 3 ),
array( 'lhs' => 69, 'rhs' => 1 ),
array( 'lhs' => 90, 'rhs' => 5 ),
array( 'lhs' => 90, 'rhs' => 4 ),
array( 'lhs' => 90, 'rhs' => 4 ),
array( 'lhs' => 90, 'rhs' => 3 ),
array( 'lhs' => 92, 'rhs' => 1 ),
array( 'lhs' => 93, 'rhs' => 1 ),
array( 'lhs' => 93, 'rhs' => 2 ),
array( 'lhs' => 91, 'rhs' => 1 ),
array( 'lhs' => 91, 'rhs' => 3 ),
array( 'lhs' => 94, 'rhs' => 1 ),
array( 'lhs' => 94, 'rhs' => 1 ),
array( 'lhs' => 95, 'rhs' => 2 ),
array( 'lhs' => 95, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 1 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 96, 'rhs' => 1 ),
array( 'lhs' => 96, 'rhs' => 2 ),
array( 'lhs' => 96, 'rhs' => 1 ),
array( 'lhs' => 96, 'rhs' => 2 ),
array( 'lhs' => 96, 'rhs' => 1 ),
array( 'lhs' => 96, 'rhs' => 2 ),
array( 'lhs' => 96, 'rhs' => 1 ),
array( 'lhs' => 96, 'rhs' => 1 ),
array( 'lhs' => 98, 'rhs' => 1 ),
array( 'lhs' => 98, 'rhs' => 2 ),
array( 'lhs' => 99, 'rhs' => 5 ),
array( 'lhs' => 99, 'rhs' => 4 ),
array( 'lhs' => 99, 'rhs' => 4 ),
array( 'lhs' => 99, 'rhs' => 3 ),
array( 'lhs' => 43, 'rhs' => 1 ),
array( 'lhs' => 100, 'rhs' => 1 ),
);
/**
* The following table contains a mapping of reduce action to method name
* that handles the reduction.
*
* If a rule is not set, it has no handler.
*/
static public $yyReduceMap = array(
0 => 0,
1 => 1,
2 => 2,
3 => 3,
4 => 4,
5 => 5,
7 => 5,
19 => 5,
78 => 5,
109 => 5,
110 => 5,
112 => 5,
117 => 5,
123 => 5,
6 => 6,
12 => 12,
13 => 13,
17 => 17,
18 => 18,
20 => 18,
23 => 18,
24 => 18,
25 => 18,
49 => 18,
64 => 18,
65 => 18,
77 => 18,
90 => 18,
94 => 18,
95 => 18,
102 => 18,
103 => 18,
107 => 18,
108 => 18,
111 => 18,
113 => 18,
114 => 18,
115 => 18,
116 => 18,
118 => 18,
119 => 18,
134 => 18,
135 => 18,
137 => 18,
162 => 18,
21 => 21,
22 => 22,
26 => 22,
27 => 22,
28 => 22,
29 => 29,
30 => 30,
33 => 33,
35 => 33,
51 => 33,
34 => 34,
52 => 34,
36 => 36,
62 => 36,
82 => 36,
132 => 36,
37 => 37,
63 => 37,
83 => 37,
38 => 38,
39 => 39,
40 => 40,
41 => 41,
42 => 42,
43 => 43,
46 => 43,
44 => 44,
45 => 45,
50 => 50,
53 => 53,
54 => 54,
55 => 55,
56 => 56,
57 => 57,
58 => 58,
59 => 59,
66 => 66,
67 => 67,
68 => 67,
69 => 69,
70 => 69,
71 => 71,
72 => 72,
73 => 73,
76 => 73,
74 => 74,
75 => 75,
79 => 79,
80 => 80,
81 => 81,
86 => 86,
87 => 87,
88 => 87,
89 => 89,
91 => 91,
92 => 92,
93 => 93,
96 => 96,
97 => 97,
98 => 98,
99 => 98,
100 => 98,
101 => 101,
104 => 104,
105 => 105,
106 => 106,
120 => 120,
121 => 121,
122 => 122,
124 => 124,
125 => 125,
126 => 126,
127 => 127,
128 => 128,
133 => 133,
136 => 136,
138 => 138,
139 => 139,
140 => 140,
142 => 140,
144 => 140,
146 => 140,
148 => 140,
150 => 140,
152 => 140,
141 => 141,
143 => 141,
145 => 141,
147 => 141,
149 => 141,
151 => 141,
153 => 141,
154 => 154,
155 => 155,
156 => 156,
158 => 156,
157 => 157,
159 => 157,
160 => 160,
161 => 161,
163 => 163,
164 => 164,
165 => 165,
166 => 166,
167 => 167,
168 => 168,
169 => 169,
);
/* Beginning here are the reduction cases. A typical example
** follows:
** #line <lineno> <grammarfile>
** function yy_r0($yymsp){ ... } // User supplied code
** #line <lineno> <thisfile>
*/
#line 78 "Parser.y"
function yy_r0(){ $this->result = $this->yystack[$this->yyidx + 0]->minor; }
#line 1684 "Parser.php"
#line 85 "Parser.y"
function yy_r1(){
$this->_retvalue = new Structures_CSS($this->yystack[$this->yyidx + 0]->minor, $this->yystack[$this->yyidx + -1]->minor);
}
#line 1689 "Parser.php"
#line 88 "Parser.y"
function yy_r2(){
$a = array();
$this->_retvalue = new Structures_CSS($a, $this->yystack[$this->yyidx + 0]->minor);
}
#line 1695 "Parser.php"
#line 92 "Parser.y"
function yy_r3(){
$this->_retvalue = new Structures_CSS($this->yystack[$this->yyidx + 0]->minor);
}
#line 1700 "Parser.php"
#line 95 "Parser.y"
function yy_r4(){
$this->_retvalue = new Structures_CSS();
}
#line 1705 "Parser.php"
#line 98 "Parser.y"
function yy_r5(){ $this->_retvalue =& $this->yystack[$this->yyidx + -1]->minor; }
#line 1708 "Parser.php"
#line 99 "Parser.y"
function yy_r6(){ $this->_retvalue = null; }
#line 1711 "Parser.php"
#line 105 "Parser.y"
function yy_r12(){ $this->_retvalue = substr(substr($this->yystack[$this->yyidx + 0]->minor, 0, strlen($this->yystack[$this->yyidx + 0]->minor)-1), 1); }
#line 1714 "Parser.php"
#line 106 "Parser.y"
function yy_r13(){ $this->_retvalue = substr(substr($this->yystack[$this->yyidx + -1]->minor, 0, strlen($this->yystack[$this->yyidx + -1]->minor)-1), 1); }
#line 1717 "Parser.php"
#line 110 "Parser.y"
function yy_r17(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); }
#line 1720 "Parser.php"
#line 111 "Parser.y"
function yy_r18(){ $this->_retvalue =& $this->yystack[$this->yyidx + 0]->minor; }
#line 1723 "Parser.php"
#line 114 "Parser.y"
function yy_r21(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor); }
#line 1726 "Parser.php"
#line 115 "Parser.y"
function yy_r22(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx