object Rx
- Alphabetic
- By Inheritance
- Rx
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class Choice(r1: Rx, r2: Rx) extends Rx with Product with Serializable
- case class Concat(r1: Rx, r2: Rx) extends Rx with Product with Serializable
- case class Letter(c: Char) extends Rx with Product with Serializable
- case class Letters(ls: LetterSet) extends Rx with Product with Serializable
- case class Repeat(r: Rx, m: Int, n: Int) extends Rx with Product with Serializable
- case class Star(r: Rx) extends Rx with Product with Serializable
- case class Var extends Rx with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
Universe: Rx
The regular expression that matches all possible strings.
The regular expression that matches all possible strings.
The expression for the universe is: '.*'
-
def
apply(s: String): Rx
Construct a regular expression that matches the string
s
. -
def
apply(cs: NumericRange[Char]): Rx
Construct a regular expression that matches one character from the given set
cs
, expressed as a range (e.g.Construct a regular expression that matches one character from the given set
cs
, expressed as a range (e.g. c1 to c2). -
def
apply(cs: Set[Char]): Rx
Construct a regular expression that matches one character from the given set
cs
. -
def
apply(cs: LetterSet): Rx
Construct a regular expression that matches one character from the given set
cs
. -
def
apply(c: Char): Rx
Construct a regular expression that matches the given character
c
. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canonicalize(r: Rx): Rx
- def cardinalityOf(r: Rx): Size
-
def
choice(rs: Iterable[Rx]): Rx
Construct a regular expression from the union of
rs
.Construct a regular expression from the union of
rs
.If
rs
is empty, this method returns ϕ. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
closure(alphabet: LetterSet): Rx
Compute the closure for the given alphabet.
Compute the closure for the given alphabet.
The closure is the set of all possible strings using characters from the alphabet. The closure of '.' is the universe.
-
def
concat(rs: Iterable[Rx]): Rx
Construct a regular expression from the concatenation of
rs
.Construct a regular expression from the concatenation of
rs
.If
rs
is empty, this method returns ε. - def difference(r1: Rx, r2: Rx): Rx
-
val
dot: Rx
Dot (.) matches any single character.
Dot (.) matches any single character.
This is equivalent (and represented internally) as the character group [-].
-
def
empty: Rx
Empty (ε) is the empty regular expression.
Empty (ε) is the empty regular expression.
Empty corresponds to the 'one' element of the Kleene algebra of regular expressions:
ε * x = x * ε = x ε.star = ε
Its set of accepted strings contains only the empty string. Most regular expression syntaxes denote this with an empty string, for example in 'a(b|)'.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
equiv(lhs: Rx, rhs: Rx): Boolean
Semantic equivalence for regular expressions.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def intersect(r1: Rx, r2: Rx): Rx
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lexCompare(lhs: Rx, rhs: Rx): Int
Lexicographic ordering for Rx.
Lexicographic ordering for Rx.
To compare two sets, the comparison considers the union of all strings accepted by either in lexicographic ordering and finds the "last" string (lexicographically) that is accepted by one but not the other. The regex that doesn't accept this string comes first.
For example /b/ < /[ac]/, but /[bc]/ > /[ac]/.
Facts about this ordering:
- Phi comes first and .* comes last
- if x is a subset of y, then lexCompare(x, y) <= 0
- if x is a superset of y, then lexCompare(x, y) >= 0
- x <= y and y <= z implies x <= y
- val lexicographicOrdering: Ordering[Rx]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parse(s: String): Rx
Parse the given string into a regular expression.
Parse the given string into a regular expression.
The syntax used is a subset of the Java Regex syntax.
-
def
phi: Rx
Phi (ϕ) is the unmatchable regular expression.
Phi (ϕ) is the unmatchable regular expression.
Phi corresponds to the 'zero' element of the Kleene algebra of regular expressions:
ϕ + x = x * ϕ = x ϕ * x = x * ϕ = ϕ ϕ.star = ε
Its set of accepted strings is the empty set. Most regular expression syntaxes do not support ϕ.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def xor(r1: Rx, r2: Rx): Rx
- object Empty extends Rx with Product with Serializable
- object Phi extends Rx with Product with Serializable