in scala/util/grammar
class MutableTreeHedgeGrammar
-
class MutableTreeHedgeGrammar[A <: Alphabet]()
- extends TreeHedgeGrammar[A]
- with ScalaObject
-
a mutable representation of hedge grammars. A hedge grammar over an
alphabet consists of tree and hedge nonterminals (consecutive integers),
and tree and hedge productions that relate them. Hedge nonterminals that
can derive the empty hedge are called "nullable". initials tree
or hedge nonterminals.
Methods inherited from java/lang/Object-class
|
clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, toString, wait, wait, wait |
treeInitials
val treeInitials: ResizableBitSet
-
inv: treeInitials.length == nTreeNT
hedgeInitials
val hedgeInitials: ResizableBitSet
-
inv: hedgeInitials.length == nHedgeNT
isNullable
val isNullable: ResizableBitSet
-
inv: hedgeIsNullable.length == nHedgeNT
treeTransitions
val treeTransitions: Map[Int,Set[TreeRHS]]
hedgeTransitions
val hedgeTransitions: Map[Int,Set[HedgeRHS]]
nTreeNT
var nTreeNT: Int
-
number of tree nonterminals
nHedgeNT
var nHedgeNT: Int
-
number of hedge nonterminals
makeTreeNT
def makeTreeNT: Int
makeHedgeNT
def makeHedgeNT: Int
addConsRule
def addConsRule(hnt1: Int, tnt: Int, hnt2: Int): Unit
addAnyHedgeRule
def addAnyHedgeRule(hnt: Int): Unit
addEmptyHedgeRule
def addEmptyHedgeRule(hnt: Int): Unit
addHedgeRule
def addHedgeRule(hnt: Int, rhs: HedgeRHS): Unit
addTreeRule
def addTreeRule(tnt: Int, label: A, hnt: Int): Unit
addTreeRule
def addTreeRule(tnt: Int, rhs: TreeRHS): Unit
addAnyTreeRule
def addAnyTreeRule(tnt: Int): Unit