phpDocumentor PHP_ParserGenerator
[ class tree: PHP_ParserGenerator ] [ index: PHP_ParserGenerator ] [ all elements ]

Class: PHP_ParserGenerator_Rule

Source Location: /ParserGenerator/Rule.php

Class PHP_ParserGenerator_Rule

Class Overview

Each production rule in the grammar is stored in this class

Located in /ParserGenerator/Rule.php [line 58]



		
				Author(s):
		
		
		
Information Tags:
Since:  Class available since Release 0.1.0
Version:  @package_version@
License:  New BSD License
Copyright:  2006 Gregory Beaver

Properties

[ Top ]
Property Summary
boolean   $canReduce   True if this rule is ever reduced
string|0   $code   The code executed when this rule is reduced
int   $index   An index number for this rule
array   $lhs   Left-hand side of the rule
array   $lhsalias   Alias for the LHS (NULL if none)
int   $line   Line number at which code begins
PHP_ParserGenerator_Rule|0   $next   Next rule in the global list
PHP_ParserGenerator_Rule|0   $nextlhs   Next rule with the same left-hand side
mixed   $nrhs   Number of right-hand side symbols
PHP_ParserGenerator_Symbol   $precsym   Precedence symbol for this rule
array   $rhs   The right-hand side symbols
array   $rhsalias   Aliases for each right-hand side symbol, or null if no alis.
int   $ruleline   Line number for the rule

[ Top ]
Properties
boolean   $canReduce [line 129]

True if this rule is ever reduced

API Tags:
Access:  public


[ Top ]
string|0   $code [line 111]

The code executed when this rule is reduced

 foo(R) ::= BAR(A) baz(B). {R = A + B;}

In the rule above, the code is "R = A + B;"

API Tags:
Access:  public


[ Top ]
int   $index [line 124]

An index number for this rule

Used in both naming of reduce functions and determining which rule code to use for reduce actions

API Tags:
Access:  public


[ Top ]
array   $lhs [line 63]

Left-hand side of the rule

API Tags:
Access:  public


[ Top ]
array   $lhsalias = array() [line 69]

Alias for the LHS (NULL if none)

API Tags:
Access:  public


[ Top ]
int   $line [line 100]

Line number at which code begins

API Tags:
Access:  public


[ Top ]
PHP_ParserGenerator_Rule|0   $next [line 139]

Next rule in the global list

API Tags:
Access:  public


[ Top ]
PHP_ParserGenerator_Rule|0   $nextlhs [line 134]

Next rule with the same left-hand side

API Tags:
Access:  public


[ Top ]
mixed   $nrhs [line 78]

Number of right-hand side symbols

API Tags:
Access:  public


[ Top ]
PHP_ParserGenerator_Symbol   $precsym [line 116]

Precedence symbol for this rule

API Tags:
Access:  public


[ Top ]
array   $rhs [line 83]

The right-hand side symbols

API Tags:
Access:  public


[ Top ]
array   $rhsalias = array() [line 95]

Aliases for each right-hand side symbol, or null if no alis.

In this rule:

 foo ::= BAR(A) baz(B).

The right-hand side aliases are A for BAR, and B for baz.

API Tags:
Access:  public


[ Top ]
int   $ruleline [line 74]

Line number for the rule

API Tags:
Access:  public


[ Top ]

Documentation generated on Sun, 02 Jul 2006 09:11:11 -0400 by phpDocumentor 1.3.0