scala.util.automata

class BaseBerrySethi

[source: scala/util/automata/BaseBerrySethi.scala]

abstract class BaseBerrySethi
extends AnyRef
this turns a regexp over A into a NondetWorkAutom over A using the celebrated position automata construction (also called Berry-Sethi or Glushkov)
Direct Known Subclasses:
WordBerrySethi

Value Summary
final val emptySet : Set[Int]
protected var finalTag : Int
protected var finals : TreeMap[Int, Int]
protected var follow : HashMap[Int, Set[Int]]
protected var globalFirst : Set[Int]
abstract val lang : Base
protected var pos : Int
Method Summary
protected def compFirst (r : RegExp) : Set[Int]
computes first( r ) for the word regexp r
protected def compFollow (r : Seq[RegExp]) : Set[Int]
Starts from the right-to-left precondition: pos is final pats are successor patterns of a Sequence node
protected def compFollow1 (fol1 : Set[Int], r : RegExp) : Set[Int]
returns the first set of an expression, setting the follow set along the way.
protected def compLast (r : RegExp) : Set[Int]
computes last( r ) for the regexp r
protected def traverse (r : RegExp) : Unit
returns "Sethi-length" of a pattern, creating the set of position along the way.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
abstract val lang : Base

protected var pos : Int

protected var globalFirst : Set[Int]

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

protected var finalTag : Int

protected var finals : TreeMap[Int, Int]

final val emptySet : Set[Int]

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

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

protected def compFollow(r : Seq[RegExp]) : Set[Int]
Starts from the right-to-left precondition: pos is final pats are successor patterns of a Sequence node
Parameters
r - ...
Returns
...

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

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