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

PerCederberg.Grammatica.Runtime.RE
Class RegExp

System.Object
   |
   +--RegExp

   in RegExp.cs

public class RegExp
extends System.Object

A regular expression. This class creates and holds an internal data structure representing a regular expression. It also allows creating matchers. This class is thread-safe. Multiple matchers may operate simultanously on the same regular expression.


Constructor Summary
RegExp( string pattern )
          Creates a new case-sensitive regular expression.
RegExp( string pattern, bool ignoreCase )
          Creates a new regular expression.
 
Method Summary
  href="../PerCederberg.Grammatica.Runtime.RE/Matcher.html">Matcher Matcher( string str )
          Creates a new matcher for the specified string.
  href="../PerCederberg.Grammatica.Runtime.RE/Matcher.html">Matcher Matcher( ReaderBuffer buffer )
          Creates a new matcher for the specified look-ahead character input stream.
 override string ToString()
          Returns a string representation of the regular expression.
 

Constructor Detail

RegExp

public RegExp( string pattern );
Creates a new case-sensitive regular expression.
Parameters:
pattern - the regular expression pattern
Throws:
RegExpException - if the regular expression couldn't be parsed correctly

RegExp

public RegExp( string pattern, bool ignoreCase );
Creates a new regular expression. The regular expression can be either case-sensitive or case-insensitive.
Parameters:
pattern - the regular expression pattern
ignoreCase - the character case ignore flag
Throws:
RegExpException - if the regular expression couldn't be parsed correctly
Since:
1.5


Method Detail

Matcher

public Matcher Matcher( string str );
Creates a new matcher for the specified string.
Parameters:
str - the string to work with
Returns:
the regular expresion matcher

Matcher

public Matcher Matcher( ReaderBuffer buffer );
Creates a new matcher for the specified look-ahead character input stream.
Parameters:
buffer - the character input buffer
Returns:
the regular expresion matcher
Since:
1.5

ToString

public override string ToString();
Returns a string representation of the regular expression.
Returns:
a string representation of the regular expression

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