public class RegExp
extends java.lang.Object
We use the following special notation for regular expressions:
Constructor and Description |
---|
RegExp(java.lang.String string,
Alphabet alphabet)
Constructs a regular expression from a string.
|
Modifier and Type | Method and Description |
---|---|
void |
simplify()
Simplifies this regular expression (using some very simple rewrite rules).
|
NFA |
toNFA()
Converts this regular expression to an
NFA . |
java.lang.String |
toString()
Returns a string representation of this regular expression.
|
public RegExp(java.lang.String string, Alphabet alphabet) throws java.lang.IllegalArgumentException
string
- string representation of regular expressionalphabet
- the alphabetjava.lang.IllegalArgumentException
- if an alphabet symbol in the string is not in the alphabet
or the string is not a syntactically correct regular expressionpublic void simplify()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-2015 Anders Møller.