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

Class: PHP_ParserGenerator_Rule

Source Location: /PHP_ParserGenerator-0.1.7/ParserGenerator/Rule.php

Class Overview


Each production rule in the grammar is stored in this class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2006 Gregory Beaver

Variables


Inherited Variables

Inherited Methods


Class Details

[line 61]
Each production rule in the grammar is stored in this class


[ Top ]


Class Variables

$canReduce =

[line 133]

True if this rule is ever reduced
  • Access: public

Type:   boolean


[ Top ]

$code =

[line 115]

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;"

  • Access: public

Type:   string|0


[ Top ]

$index =

[line 128]

An index number for this rule

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

  • Access: public

Type:   int


[ Top ]

$lhs =

[line 67]

Left-hand side of the rule

Type:   array


[ Top ]

$lhsalias = array()

[line 73]

Alias for the LHS (NULL if none)
  • Access: public

Type:   array


[ Top ]

$line =

[line 104]

Line number at which code begins
  • Access: public

Type:   int


[ Top ]

$next =

[line 143]

Next rule in the global list
  • Access: public



[ Top ]

$nextlhs =

[line 138]

Next rule with the same left-hand side
  • Access: public



[ Top ]

$nrhs =

[line 82]

Number of right-hand side symbols
  • Access: public

Type:   mixed


[ Top ]

$precsym =

[line 120]

Precedence symbol for this rule
  • Access: public



[ Top ]

$rhs =

[line 87]

The right-hand side symbols

Type:   array


[ Top ]

$rhsalias = array()

[line 99]

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.

  • Var: aliases are indexed by the right-hand side symbol index.
  • Access: public

Type:   array


[ Top ]

$ruleline =

[line 78]

Line number for the rule
  • Access: public

Type:   int


[ Top ]



Documentation generated on Mon, 11 Mar 2019 15:41:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.