apidoc |
[ class tree: apidoc ] [ index: apidoc ] [ all elements ] |
Packages: PHP_ParserGenerator Classes:
PHP_ParserGenerator
Lemon LemonAction LemonActtab LemonConfig LemonData LemonParser LemonPlink LemonRule LemonState LemonStateNode LemonSymbol ParseyyParser ParseyyStackEntry ParseyyToken PHPyyParser PHPyyStackEntry PHPyyToken PHP_LexerGenerator_Parser PHP_LexerGenerator_ParseryyStackEntry PHP_LexerGenerator_ParseryyToken PHP_Parser_Tokenizer |
[ Top ] $yyerrcnt =[line 578]
[ Top ] $yyExpectedTokens = array(
|
Type: | mixed |
[line 531]
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.
Type: | mixed |
[line 574]
Type: | int |
[line 1009]
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.
Type: | mixed |
[line 969]
The following table contains information about every rule that is used during the reduce.static const struct { YYCODETYPE lhs; Symbol on the left-hand side of the rule unsigned char nrhs; Number of right-hand side symbols in the rule }
Type: | mixed |
[line 602]
For tracing reduce actions, the names of all rules are required.Type: | array |
[line 583]
Type: | array |
[line 590]
For tracing shifts, the names of all terminals and nonterminalsare required. The following table supplies these names
Type: | array |
[line 569]
Type: | mixed |
[line 570]
Type: | mixed |
[line 375]
Type: | mixed |
[line 474]
Type: | mixed |
[line 386]
Type: | mixed |
[line 407]
Type: | mixed |
[line 399]
Type: | mixed |
|
The first argument is a pointer to a structure obtained from "PHP_LexerGenerator_ParserAlloc" which describes the current state of the parser. The second argument is the major token number. The third is the minor token. The fourth optional argument is whatever the user wants (and specified in the grammar) and is available for use by the action routines.
Inputs:
int | $yymajor | — | the token number |
mixed | $yytokenvalue | — | the token value |
mixed | $extraargument | — | any extra arguments that should be passed to handlers |
|
|
int | $tokenType | — |
|
Inputs:
resource | $TraceFILE | — | |
string | $zTracePrompt | — |
|
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 | $stateno | — | Current state number |
int | $iLookAhead | — | The look-ahead token |
|
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 | $iLookAhead | — | The look-ahead token |
|
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.
PHP_LexerGenerator_ParseryyParser | 0 | — |
|
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 | $yyruleno | — | Number of the rule by which to reduce |
|
int | $yyNewState | — | The new state to shift in |
int | $yyMajor | — | The major token to shift in |
mixed | $yypMinor | — | the minor token to shift in |
|
int | $yymajor | — | The major type of the error token |
mixed | $TOKEN | — | The minor type of the error token |