static void PrintTrace(
)
|
|
Output debug information to output (php://output stream)
static void Trace(
resource
$TraceFILE, string
$zTracePrompt
)
|
|
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:
Parameters:
|
resource |
$TraceFILE: |
|
|
string |
$zTracePrompt: |
|
static void yy_destructor(
int
$yymajor, mixed
$yypminor
)
|
|
The following function deletes the value associated with a symbol. The symbol can be either a terminal or nonterminal.
Parameters:
|
int |
$yymajor: |
the symbol code |
|
mixed |
$yypminor: |
the symbol's value |
void doParse(
int
$yymajor, mixed
$yytokenvalue, mixed
2
)
|
|
The main parser program.
The first argument is the major token number. The second is the token value string as scanned from the input.
Parameters:
|
mixed |
2: |
any extra arguments that should be passed to handlers |
|
int |
$yymajor: |
the token number |
|
mixed |
$yytokenvalue: |
the token value |
PHP_LexerGenerator_Regex_Parser __construct(
$lex
)
|
|
Parameters:
Deallocate and destroy a parser. Destructors are all called for all stack elements before shutting the parser down.
void reset(
$patternIndex, [
$updatePattern = false]
)
|
|
Parameters:
|
|
$patternIndex: |
|
|
|
$updatePattern: |
|
string tokenName(
int
$tokenType
)
|
|
This function returns the symbolic name associated with a token value.
Parameters:
The following is executed when the parser accepts
%parse_accept code is inserted here
void yy_find_reduce_action(
int
$stateno, int
$iLookAhead
)
|
|
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.
Parameters:
|
int |
$stateno: |
Current state number |
|
int |
$iLookAhead: |
The look-ahead token |
void yy_find_shift_action(
int
$iLookAhead
)
|
|
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.
Parameters:
|
int |
$iLookAhead: |
The look-ahead token |
array yy_get_expected_tokens(
int
$token
)
|
|
Based on the current state and parser stack, get a list of all
possible lookahead tokens
Parameters:
bool yy_is_expected_token(
int
$token
)
|
|
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.
Parameters:
The following code executes when the parse fails
Code from %parse_fail is inserted here
int yy_pop_parser_stack(
PHP_LexerGenerator_Regex_yyParser
0
)
|
|
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.
Parameters:
|
PHP_LexerGenerator_Regex_yyParser |
0: |
|