in scala/util/automata
class WordBerrySethi

abstract class WordBerrySethi()
extends BaseBerrySethi
with ScalaObject
Implementing classes or objects:
object Translator in scala/xml/dtd/ContentModel

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

Field Summary
  type _labelT
abstract override val lang: WordExp

Method Summary
  def automatonFrom(pat: lang.RegExp, finalTag: Int): NondetWordAutom[lang._labelT]
protected def collectTransitions(): Unit
protected override def compFirst(r: lang.RegExp): Set[Int]
     computes first( r ) where the word regexp r
protected override 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 override def compLast(r: lang.RegExp): Set[Int]
     computes last( r ) where the word regexp r
protected var defaultq: Array[List[Int]]
protected var deltaq: Array[HashMap[lang._labelT,List[Int]]]
protected def initialize(subexpr: Seq[lang.RegExp]): Unit
protected def initializeAutom(): Unit
protected var initials: Set[Int]
protected var labelAt: TreeMap[Int,lang._labelT]
protected var labels: HashSet[lang._labelT]
protected def makeTransition(src: Int, dest: Int, label: lang._labelT): Unit
protected def seenLabel(r: lang.RegExp, i: Int, label: lang._labelT): Unit
     called at the leaves of the regexp
protected def seenLabel(r: lang.RegExp, label: lang._labelT): Int
override 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, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

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

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/util/automata/BaseBerrySethi-class
compFollow, emptySet, finalTag, finals, follow, globalFirst, pos

Field Detail

lang

  abstract override val lang: WordExp

_labelT

  type _labelT = lang._labelT
Method Detail

labels

  protected var labels: HashSet[lang._labelT]

labelAt

  protected var labelAt: TreeMap[Int,lang._labelT]

deltaq

  protected var deltaq: Array[HashMap[lang._labelT,List[Int]]]

defaultq

  protected var defaultq: Array[List[Int]]

initials

  protected var initials: Set[Int]

compFirst

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

compLast

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

compFollow1

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

seenLabel

  protected def seenLabel(r: lang.RegExp, i: Int, label: lang._labelT): Unit
called at the leaves of the regexp

seenLabel

  protected def seenLabel(r: lang.RegExp, label: lang._labelT): Int

traverse

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

makeTransition

  protected def makeTransition(src: Int, dest: Int, label: lang._labelT): Unit

initialize

  protected def initialize(subexpr: Seq[lang.RegExp]): Unit

initializeAutom

  protected def initializeAutom(): Unit

collectTransitions

  protected def collectTransitions(): Unit

automatonFrom

  def automatonFrom(pat: lang.RegExp, finalTag: Int): NondetWordAutom[lang._labelT]