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)
Methods inherited from java/lang/Object-class
|
clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, toString, wait, wait, wait |
lang
abstract val lang: Base
emptySet
final val emptySet: Set[Int]
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