in scala/util/automata
class BaseBerrySethi

abstract class BaseBerrySethi()
extends Object
with ScalaObject
Implementing classes or objects:
class WordBerrySethi[A <: Alphabet]()

this turns a regexp over A into a NondetWorkAutom over A using the celebrated position automata construction (also called Berry-Sethi or Glushkov)

Field Summary
final val emptySet: Set[Int]
abstract val lang: Base

Method Summary
protected def compFirst(r: lang.RegExp): Set[Int]
     computes first( r ) for the word regexp r
protected def compFollow(r: Seq[lang.RegExp]): Set[Int]
protected def compFollow1(fol1: Set[Int], r: lang.RegExp): Set[Int]
     returns the first set of an expression, setting the follow set along the way
protected def compLast(r: lang.RegExp): Set[Int]
     computes last( r ) for the regexp r
protected var finalTag: Int
protected var finals: TreeMap[Int,Int]
protected var follow: HashMap[Int,Set[Int]]
protected var globalFirst: Set[Int]
protected var pos: Int
protected var posMap: HashMap[lang.RegExp,Int]
protected def traverse(r: lang.RegExp): Unit
     returns "Sethi-length" of a pattern, creating the set of position along the way

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Field Detail

lang

  abstract val lang: Base

emptySet

  final val emptySet: Set[Int]
Method Detail

pos

  protected var pos: Int

posMap

  protected var posMap: HashMap[lang.RegExp,Int]

globalFirst

  protected var globalFirst: Set[Int]

follow

  protected var follow: HashMap[Int,Set[Int]]

finalTag

  protected var finalTag: Int

finals

  protected var finals: TreeMap[Int,Int]

compFirst

  protected def compFirst(r: lang.RegExp): Set[Int]
computes first( r ) for the word regexp r

compLast

  protected def compLast(r: lang.RegExp): Set[Int]
computes last( r ) for the regexp r

compFollow

  protected def compFollow(r: Seq[lang.RegExp]): Set[Int]

compFollow1

  protected def compFollow1(fol1: Set[Int], r: lang.RegExp): Set[Int]
returns the first set of an expression, setting the follow set along the way

traverse

  protected def traverse(r: lang.RegExp): Unit
returns "Sethi-length" of a pattern, creating the set of position along the way