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

PerCederberg.Grammatica.Runtime
Class TokenRegExpParser

System.Object
   |
   +--TokenRegExpParser

   in TokenRegExpParser.cs

internal class TokenRegExpParser
extends System.Object

A regular expression parser. The parser creates an NFA for the regular expression having a single start and acceptance states.

Since:
1.5

Field Summary
 internal NFAState end
          The end NFA state for this regular expression.
 internal NFAState start
          The start NFA state for this regular expression.
 
Constructor Summary
TokenRegExpParser( string pattern )
          Creates a new case-sensitive regular expression parser.
TokenRegExpParser( string pattern, bool ignoreCase )
          Creates a new regular expression parser.
 
Method Summary
 string GetDebugInfo()
          Returns the debug information for the generated NFA.
 

Field Detail

end

 internal NFAState end;
The end NFA state for this regular expression.

start

 internal NFAState start;
The start NFA state for this regular expression.


Constructor Detail

TokenRegExpParser

public TokenRegExpParser( string pattern );
Creates a new case-sensitive regular expression parser. Note that this will trigger the parsing of the regular expression.
Parameters:
pattern - the regular expression pattern
Throws:
RegExpException - if the regular expression couldn't be parsed correctly

TokenRegExpParser

public TokenRegExpParser( string pattern, bool ignoreCase );
Creates a new regular expression parser. The regular expression can be either case-sensitive or case-insensitive. Note that this will trigger the parsing of the regular expression.
Parameters:
pattern - the regular expression pattern
ignoreCase - the character case ignore flag
Throws:
RegExpException - if the regular expression couldn't be parsed correctly


Method Detail

GetDebugInfo

public string GetDebugInfo();
Returns the debug information for the generated NFA.
Returns:
the debug information for the generated NFA

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