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.

Field Summary
  val hedgeInitials: ResizableBitSet
     inv: hedgeInitials.length == nHedgeNT
  val hedgeTransitions: Map[Int,Set[HedgeRHS]]
  val isNullable: ResizableBitSet
     inv: hedgeIsNullable.length == nHedgeNT
  val treeInitials: ResizableBitSet
     inv: treeInitials.length == nTreeNT
  val treeTransitions: Map[Int,Set[TreeRHS]]

Method Summary
  def addAnyHedgeRule(hnt: Int): Unit
  def addAnyTreeRule(tnt: Int): Unit
  def addConsRule(hnt1: Int, tnt: Int, hnt2: Int): Unit
  def addEmptyHedgeRule(hnt: Int): Unit
  def addHedgeRule(hnt: Int, rhs: HedgeRHS): Unit
  def addTreeRule(tnt: Int, label: A, hnt: Int): Unit
  def addTreeRule(tnt: Int, rhs: TreeRHS): Unit
  def makeHedgeNT: Int
  def makeTreeNT: Int
  var nHedgeNT: Int
     number of hedge nonterminals
  var nTreeNT: Int
     number of tree nonterminals

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

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]]
Method Detail

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