PrintTrace()
Trace()
__destruct()
doParse()
getOutput()
setLineNumber()
tokenName()
yy_accept()
yy_destructor()
yy_find_reduce_action()
yy_find_shift_action()
yy_get_expected_tokens()
yy_is_expected_token()
yy_parse_failed()
yy_pop_parser_stack()
yy_r1()
yy_r12()
yy_r14()
yy_r15()
yy_r18()
yy_r19()
yy_r26()
yy_r28()
yy_r3()
yy_r5()
yy_r7()
yy_r8()
yy_r9()
yy_reduce()
yy_shift()
yy_syntax_error()
_addOp()
_getSimpleVariable()
_popTagContext()
_pushTagContext()
$yyExpectedTokens
$yyFallback
$yyReduceMap
$yyRuleInfo
$yyRuleName
$yyTokenName
$yyTraceFILE
$yyTracePrompt
$yy_action
$yy_default
$yy_lookahead
$yy_reduce_ofst
$yy_shift_ofst
$yyerrcnt
$yyidx
$yystack
$_context
$_contextKey
$_lastPlainText
$_lineNumber
$_tagList
$_retvalue
CURLY_ARG_SEP
CURLY_ARRAY_DIM
CURLY_END
CURLY_FUNCTION
CURLY_VAR
CURLY_VAR_KEY
DOUBLE_QUOTE
LITERAL
PLAIN_TEXT
SIMPLE_VARIABLE
SINGLE_QUOTE
TAG_ATTRIBUTE
TAG_CLOSE
TAG_COMMENT
TAG_END
TAG_OPEN
TAG_SELF_CLOSE
YYERRORSYMBOL
YYERRSYMDT
YYFALLBACK
YYNOCODE
YYNRULE
YYNSTATE
YYSTACKDEPTH
YY_ACCEPT_ACTION
YY_ERROR_ACTION
YY_NO_ACTION
YY_REDUCE_MAX
YY_REDUCE_USE_DFLT
YY_SHIFT_MAX
YY_SHIFT_USE_DFLT
YY_SZ_ACTTAB
PrintTrace()
Trace($TraceFILE, $zTracePrompt)
Tracing is turned off by making either argument NULL
Inputs:
Outputs:
resource
string
__destruct()
Destructors are all called for all stack elements before shutting the parser down.
doParse(int $yymajor, mixed $yytokenvalue) : void
The first argument is the major token number. The second is the token value string as scanned from the input.
int
the token number
mixed
the token value
getOutput()
setLineNumber($lineNumber)
tokenName($tokenType) : string
int
string
yy_accept()
%parse_accept code is inserted here
yy_destructor(int $yymajor, mixed $yypminor)
The symbol can be either a terminal or nonterminal.
int
the symbol code
mixed
the symbol's value
yy_find_reduce_action(int $stateno, int $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.
int
Current state number
int
The look-ahead token
yy_find_shift_action(int $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.
int
The look-ahead token
yy_get_expected_tokens($token) : array
int
array
yy_is_expected_token($token) : bool
The parser will convert the token value to an error token if not. This catches some unusual edge cases where the parser would fail.
int
bool
yy_parse_failed()
Code from %parse_fail is inserted here
yy_pop_parser_stack() : int
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.
int
yy_r1()
yy_r12()
yy_r14()
yy_r15()
yy_r18()
yy_r19()
yy_r26()
yy_r28()
yy_r3()
yy_r5()
yy_r7()
yy_r8()
yy_r9()
yy_reduce(int $yyruleno)
For a rule such as:
A ::= B blah C. { dosomething(); }
This function will first call the action, if any, ("dosomething();" in our example), and then it will pop three states from the stack, one for each entry on the right-hand side of the expression (B, blah, and C in our example rule), and then push the result of the action back on to the stack with the resulting state reduced to (as described in the .out file)
int
Number of the rule by which to reduce
yy_shift(int $yyNewState, int $yyMajor, mixed $yypMinor)
int
The new state to shift in
int
The major token to shift in
mixed
the minor token to shift in
yy_syntax_error(int $yymajor, mixed $TOKEN)
%syntax_error code is inserted here
int
The major type of the error token
mixed
The minor type of the error token
_addOp($op)
_getSimpleVariable($var)
_popTagContext($tag)
_pushTagContext($tag)
$yyExpectedTokens
$yyFallback
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.
$yyReduceMap
If a rule is not set, it has no handler.
$yyRuleInfo
array( array( int $lhs; Symbol on the left-hand side of the rule int $nrhs; Number of right-hand side symbols in the rule ),... );
$yyRuleName : array
$yyTokenName : array
The following table supplies these names
$yyTraceFILE : resource | \global\0
$yyTracePrompt : string | \global\0
$yy_action
$yy_default
$yy_lookahead
$yy_reduce_ofst
$yy_shift_ofst
$yyerrcnt : int
$yyidx : int
$yystack : array
$_context
$_contextKey
$_lastPlainText
$_lineNumber
$_tagList
$_retvalue
For a parser with a rule like this:
rule(A) ::= B. { A = 1; }
The parser will translate to something like:
function yy_r0(){$this->_retvalue = 1;}
CURLY_ARG_SEP
CURLY_ARRAY_DIM
CURLY_END
CURLY_FUNCTION
CURLY_VAR
CURLY_VAR_KEY
DOUBLE_QUOTE
LITERAL
PLAIN_TEXT
SIMPLE_VARIABLE
SINGLE_QUOTE
TAG_ATTRIBUTE
TAG_CLOSE
TAG_COMMENT
TAG_END
TAG_OPEN
TAG_SELF_CLOSE
YYERRORSYMBOL
YYERRSYMDT
YYFALLBACK
YYNOCODE
YYNRULE
YYNSTATE
YYSTACKDEPTH
YY_ACCEPT_ACTION
YY_ERROR_ACTION
YY_NO_ACTION
YY_REDUCE_MAX
YY_REDUCE_USE_DFLT
YY_SHIFT_MAX
YY_SHIFT_USE_DFLT
YY_SZ_ACTTAB