Overview   Project   Class   Tree   Deprecated   Index 
Grammatica 1.4 Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

PerCederberg.Grammatica.Parser
Class AutomatonTree

System.Object
   |
   +--AutomatonTree

   in Tokenizer.cs

class AutomatonTree
extends System.Object

An automaton state transition tree. This class contains a binary search tree for the automaton transitions from one state to another. All transitions are linked to a single character.


Constructor Summary
AutomatonTree()
          Creates a new empty automaton transition tree.
 
Method Summary
 void Add( char c, Automaton state )
          Adds a transition to this tree.
 Automaton Find( char c )
          Finds an automaton state from the specified transition character.
 

Constructor Detail

AutomatonTree

public AutomatonTree();
Creates a new empty automaton transition tree.


Method Detail

Add

public void Add( char c, Automaton state );
Adds a transition to this tree.
Parameters:
c - the character to transition for
state - the state to transition to

Find

public Automaton Find( char c );
Finds an automaton state from the specified transition character. This method searches this transition tree for a matching transition.
Parameters:
c - the character to search for
Returns:
the automaton state found, or null if no transition exists

 Overview   Project   Class   Tree   Deprecated   Index 
Grammatica 1.4 Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD