Scala 2.6.0-final

API Specification

This document is the API specification for Scala Library Documentation

Class Summary
abstract class Base extends AnyRef
Basic regular expressions.
abstract class PointedHedgeExp extends Base
pointed regular hedge expressions, a useful subclass of regular hedge expressions.
class SyntaxError (e : String) extends RuntimeException with AnyRef
This runtime exception is thrown if an attempt to instantiate a syntactically incorrect expression is detected.
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)