PerCederberg.Grammatica.Runtime
Class StringDFAMatcher
System.Object
|
+--TokenMatcher
|
+--StringDFAMatcher
in Tokenizer.cs
- internal class StringDFAMatcher
- extends TokenMatcher
A token pattern matcher using a DFA for string tokens. This
class only supports string tokens and must be complemented
with another matcher for regular expressions. Internally it
uses a DFA to provide high performance.
|
Constructor Summary |
StringDFAMatcher( bool ignoreCase )
Creates a new string token matcher. |
StringDFAMatcher
public StringDFAMatcher( bool ignoreCase );
- Creates a new string token matcher.
- Parameters:
ignoreCase - the character case ignore flag
AddPattern
public override void AddPattern( TokenPattern pattern );
- Adds a string token pattern to this matcher.
- Parameters:
pattern - the pattern to add
Match
public override void Match( ReaderBuffer buffer, TokenMatch match );
- Searches for matching token patterns at the start of the
input stream. If a match is found, the token match object
is updated.
- Parameters:
buffer - the input buffer to check
match - the token match to update
- Throws:
IOException - if an I/O error occurred