SharedPackedParseTree

interface SharedPackedParseTree

A Shared Packed Parse Forest is a collection of parse trees which share Nodes when possible. There is a Root Node. Each Node in a tree is either a Leaf or an Branch. An Branch contains a Set of Lists of child Nodes. Each list of child nodes is an alternative possible list of children for the Branch

A traditional ParseTree would be a special case (sub type) of an SharedPackedParseForest that contains only one tree.

Functions

contains
Link copied to clipboard
abstract fun contains(other: SharedPackedParseTree): Boolean
Determines if there is an equivalent tree in this forest for every tree in the other forest.
tokensByLine
Link copied to clipboard
abstract fun tokensByLine(line: Int): List<SPPTLeaf>
tokensByLineAll
Link copied to clipboard
abstract fun tokensByLineAll(): List<List<SPPTLeaf>>
toStringAllWithIndent
Link copied to clipboard
abstract fun toStringAllWithIndent(indentIncrement: String): String

Properties

asString
Link copied to clipboard
abstract val asString: String
the original input text
countTrees
Link copied to clipboard
abstract val countTrees: Int
count of the trees contained
maxNumHeads
Link copied to clipboard
abstract val maxNumHeads: Int
Diagnostic info.
root
Link copied to clipboard
abstract val root: SPPTNode
The root of the tree
seasons
Link copied to clipboard
abstract val seasons: Int
Diagnostic info.
toStringAll
Link copied to clipboard
abstract val toStringAll: String
a string representation of all contained parse trees

Inheritors

SharedPackedParseTreeDefault
Link copied to clipboard