class WordExp

[source: scala/util/regexp/WordExp.scala]

abstract class WordExp
extends Base

The class WordExp provides regular word expressions. Users have to instantiate type member _regexpT <: RegExp (from class Base) and a type member _labelT <: Label. Here is a short example:

  import scala.util.regexp._
  import scala.util.automata._
  object MyLang extends WordExp {
    type _regexpT = RegExp
    type _labelT = MyChar

    case class MyChar(c:Char) extends Label
  import MyLang._
  // (a* | b)*
  val rex = Star(Alt(Star(Letter(MyChar('a'))),Letter(MyChar('b'))))
  object MyBerriSethi extends WordBerrySethi {
    override val lang = MyLang
  val nfa = MyBerriSethi.automatonFrom(Sequ(rex), 1)
Burak Emir
Direct Known Subclasses:

Type Summary
abstract type _labelT <: Label
abstract type _regexpT <: RegExp
Methods inherited from Base
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Class Summary
abstract class Label extends AnyRef
case class Letter (val a : _labelT) extends RegExp with Product
case class Wildcard extends RegExp with Product
Type Details
abstract type _regexpT <: RegExp

abstract type _labelT <: Label