PHP_LexerGenerator |
[ class tree: PHP_LexerGenerator ] [ index: PHP_LexerGenerator ] [ all elements ] |
Packages: PHP_LexerGenerator Tutorials/Manuals: Package-level: Classes: Files:
cli.php
Exception.php Lexer.php Lexer.php Lexer.php LexerGenerator.php longestfirst.php Parser.php Parser.php TestLexer.php usage.php |
[ Top ] $yyerrcnt =[line 799]
[ Top ] $yyExpectedTokens = array(
|
Type: | mixed |
[line 742]
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 795]
Type: | int |
[line 1268]
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 1223]
The following table contains information about every rule that is used during the reduce.array( array( int $lhs; Symbol on the left-hand side of the rule int $nrhs; Number of right-hand side symbols in the rule ),... );
Type: | mixed |
[line 823]
For tracing reduce actions, the names of all rules are required.Type: | array |
[line 803]
Type: | array |
[line 810]
For tracing shifts, the names of all terminals and nonterminalsare required. The following table supplies these names
Type: | array |
[line 786]
Type: | resource|0 |
[line 791]
String to prepend to debug outputType: | string|0 |
[line 600]
Type: | mixed |
[line 701]
Type: | mixed |
[line 612]
Type: | mixed |
[line 634]
Type: | mixed |
[line 626]
Type: | mixed |
|
|
$rules | — | ||
$statename | — | ||
$ruleindex | — |
|
$rules | — | ||
$statename | — | ||
$ruleindex | — |
|
The first argument is the major token number. The second is the token value string as scanned from the input.
mixed | 2 | — | any extra arguments that should be passed to handlers |
int | $yymajor | — | the token number |
mixed | $yytokenvalue | — | the token value |
|
int | $tokenType | — |
|
Inputs:
resource | $TraceFILE | — | |
string | $zTracePrompt | — |
|
%parse_accept code is inserted here
|
int | $yymajor | — | the symbol code |
mixed | $yypminor | — | the symbol's value |
|
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 | $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 |
|
possible lookahead tokens
int | $token | — |
|
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 | $token | — |
|
Code from %parse_fail is inserted here
|
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 |
|
%syntax_error code is inserted here
int | $yymajor | — | The major type of the error token |
mixed | $TOKEN | — | The minor type of the error token |