Package pylilac :: Module Symbol :: Class Alternation
[frames | no frames]

Class Alternation

 _Symbol --+    
           |    
_Aggregation --+
               |
              Alternation


Method Summary
  __init__(self, concatenations)
  __add__(self, b)
Concatenate with another symbol.
  __eq__(self, other)
  __hash__(self)
  __nonzero__(self)
  __or__(self, b)
Alternate with another symbol.
  __repr__(self)
Build up a verbose representation according to BNF.
  dependencies(self)
Compute the non-terminals the symbol depends on.
  insert_fsa(self, grammar, fsa, initial, final, tag)
Inserts a sub-FSA in a FSA according to the rules in a grammar.
  to_BNF(self)
Convert the symbol into an alternative of concatenations.

Method Details

__add__(self, b)
(Addition operator)

Concatenate with another symbol. (A|BC)+(X|YZ) ⇔ A+X | BC+X | A+YZ | BC+YZ ≡ AX | BCX | AYZ | BCYZ
Overrides:
pylilac.Symbol._Symbol.__add__

__or__(self, b)
(Or operator)

Alternate with another symbol. (A|BC)|(X|YZ) ⇔ A | BC | Y | YZ
Overrides:
pylilac.Symbol._Symbol.__or__

__repr__(self)
(Representation operator)

Build up a verbose representation according to BNF.
Overrides:
pylilac.Symbol._Symbol.__repr__ (inherited documentation)

dependencies(self)

Compute the non-terminals the symbol depends on.
Overrides:
pylilac.Symbol._Symbol.dependencies (inherited documentation)

insert_fsa(self, grammar, fsa, initial, final, tag=None)

Inserts a sub-FSA in a FSA according to the rules in a grammar.
Overrides:
pylilac.Symbol._Symbol.insert_fsa (inherited documentation)

to_BNF(self)

Convert the symbol into an alternative of concatenations.
Overrides:
pylilac.Symbol._Symbol.to_BNF (inherited documentation)

Generated by Epydoc 2.1 on Sat Aug 26 09:33:46 2006 http://epydoc.sf.net