OWLParser| Variable Summary | |
|---|---|
| static mixed | $yyExpectedTokens |
| static mixed | $yyFallback |
| static mixed | $yyReduceMap |
| static mixed | $yyRuleInfo |
| static array | $yyRuleName |
| static array | $yyTokenName |
| static resource|0 | $yyTraceFILE |
| static string|0 | $yyTracePrompt |
| static mixed | $yy_action |
| static mixed | $yy_default |
| static mixed | $yy_lookahead |
| static mixed | $yy_reduce_ofst |
| static mixed | $yy_shift_ofst |
| int | $yyerrcnt |
| int | $yyidx |
| array | $yystack |
| Method Summary | |
|---|---|
| static void | PrintTrace () |
| static void | Trace (resource $TraceFILE, string $zTracePrompt) |
| static void | yy_destructor (int $yymajor, mixed $yypminor) |
| OWLParser | __construct () |
| void | __destruct () |
| void | doParse (int $yymajor, mixed $yytokenvalue, mixed 2) |
| void | getStructured () |
| void | parseString ( $stringToParse) |
| void | printAsTable () |
| string | tokenName (int $tokenType) |
| void | yy_accept () |
| void | yy_find_reduce_action (int $stateno, int $iLookAhead) |
| void | yy_find_shift_action (int $iLookAhead) |
| array | yy_get_expected_tokens (int $token) |
| bool | yy_is_expected_token (int $token) |
| void | yy_parse_failed () |
| int | yy_pop_parser_stack (OWL_To_Erfurt_yyParser 0) |
| void | yy_r0 () |
| void | yy_r1 () |
| void | yy_r2 () |
| void | yy_r3 () |
| void | yy_r4 () |
| void | yy_r5 () |
| void | yy_r6 () |
| void | yy_r7 () |
| void | yy_r8 () |
| void | yy_r9 () |
| void | yy_r10 () |
| void | yy_r11 () |
| void | yy_r12 () |
| void | yy_r13 () |
| void | yy_r14 () |
| void | yy_r15 () |
| void | yy_r16 () |
| void | yy_r17 () |
| void | yy_r18 () |
| void | yy_r19 () |
| void | yy_r20 () |
| void | yy_reduce (int $yyruleno) |
| void | yy_shift (int $yyNewState, int $yyMajor, mixed $yypMinor) |
| void | yy_syntax_error (int $yymajor, mixed $TOKEN) |
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.
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.
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 ),... );
For tracing reduce actions, the names of all rules are required.
For tracing shifts, the names of all terminals and nonterminals are required. The following table supplies these names
String to prepend to debug output
Output debug information to output (php://output stream)
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:
The following function deletes the value associated with a symbol. The symbol can be either a terminal or nonterminal.
Deallocate and destroy a parser. Destructors are all called for all stack elements before shutting the parser down.
The main parser program. The first argument is the major token number. The second is the token value string as scanned from the input.
This function returns the symbolic name associated with a token value.
The following is executed when the parser accepts %parse_accept code is inserted here
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.
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.
Based on the current state and parser stack, get a list of all possible lookahead tokens
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.
The following code executes when the parse fails Code from %parse_fail is inserted here
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.
Perform a reduce action and the shift that must immediately follow the reduce. 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)
Perform a shift action.
The following code executes when a syntax error first occurs. %syntax_error code is inserted here
ALPHANUMERIC
= 18
(line 156)
AND_OPERATOR
= 2
(line 140)
COMMA
= 19
(line 157)
EXACTLY_OPERATOR
= 6
(line 144)
LBRACE
= 13
(line 151)
LPAREN
= 11
(line 149)
LSQUAREBRACKET
= 15
(line 153)
MAX_OPERATOR
= 5
(line 143)
MIN_OPERATOR
= 4
(line 142)
NOT_OPERATOR
= 1
(line 139)
NUMERIC
= 17
(line 155)
ONLYSOME_OPERATOR
= 8
(line 146)
ONLY_OPERATOR
= 9
(line 147)
OR_OPERATOR
= 3
(line 141)
RBRACE
= 14
(line 152)
RPAREN
= 12
(line 150)
RSQUAREBRACKET
= 16
(line 154)
SOME_OPERATOR
= 10
(line 148)
VALUE_OPERATOR
= 7
(line 145)
YYERRORSYMBOL
= 20
(line 318)
YYERRSYMDT
= 'yy0'
(line 319)
YYFALLBACK
= 0
(line 320)
YYNOCODE
= 28
(line 314)
YYNRULE
= 22
(line 317)
YYNSTATE
= 44
(line 316)
YYSTACKDEPTH
= 100
(line 315)
YY_ACCEPT_ACTION
= 67
(line 159)
YY_ERROR_ACTION
= 66
(line 160)
YY_NO_ACTION
= 68
(line 158)
YY_REDUCE_MAX
= 13
(line 241)
YY_REDUCE_USE_DFLT
= -9
(line 240)
YY_SHIFT_MAX
= 26
(line 234)
YY_SHIFT_USE_DFLT
= -8
(line 233)
YY_SZ_ACTTAB
= 74
(line 212)
Documentation generated on 2009-01-06 at 01:01 by phpDocumentor 1.4.1