PerCederberg.Grammatica.Runtime
Class GrammaticaRE
System.Object
|
+--REHandler
|
+--GrammaticaRE
in Tokenizer.cs
- internal class GrammaticaRE
- extends REHandler
The Grammatica built-in regular expression handler.
|
Constructor Summary |
GrammaticaRE( string regex, bool ignoreCase )
Creates a new Grammatica regular expression handler. |
|
Method Summary |
override int |
Match( ReaderBuffer buffer )
Checks if the start of the input stream matches this
regular expression. |
GrammaticaRE
public GrammaticaRE( string regex, bool ignoreCase );
- Creates a new Grammatica regular expression handler.
- Parameters:
regex - the regular expression text
ignoreCase - the character case ignore flag
- Throws:
Exception - if the regular expression contained
invalid syntax
Match
public override int Match( ReaderBuffer buffer );
- Checks if the start of the input stream matches this
regular expression.
- Parameters:
buffer - the input buffer to check
- Returns:
- the longest match found, or
zero (0) if no match was found
- Throws:
IOException - if an I/O error occurred