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

PerCederberg.Grammatica.Runtime
Class NFAEpsilonTransition

System.Object
   |
   +--NFATransition
         |
         +--NFAEpsilonTransition

   in TokenNFA.cs

internal class NFAEpsilonTransition
extends NFATransition

The special epsilon transition. This transition matches the empty input, i.e. it is an automatic transition that doesn't read any input. As such, it returns false in the match method and is handled specially everywhere.


 
Fields inherited from class NFATransition
state
 
Constructor Summary
NFAEpsilonTransition( NFAState state )
          Creates a new epsilon transition.
 
Method Summary
 override NFATransition Copy( NFAState state )
          Creates a copy of this transition but with another target state.
 override bool IsAscii()
          Checks if this transition only matches ASCII characters.
 override bool Match( char ch )
          Checks if the specified character matches the transition.
   
Methods inherited from class NFATransition
IsAscii, Match, Copy
 

Constructor Detail

NFAEpsilonTransition

public NFAEpsilonTransition( NFAState state );
Creates a new epsilon transition.
Parameters:
state - the target state


Method Detail

Copy

public override NFATransition Copy( NFAState state );
Creates a copy of this transition but with another target state.
Parameters:
state - the new target state
Returns:
an identical copy of this transition

IsAscii

public override bool IsAscii();
Checks if this transition only matches ASCII characters. I.e. characters with numeric values between 0 and 127.
Returns:
true if this transition only matches ASCII, or false otherwise

Match

public override bool Match( char ch );
Checks if the specified character matches the transition.
Parameters:
ch - the character to check
Returns:
true if the character matches, or false otherwise

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