SPPTLeafFromInput

class SPPTLeafFromInput(input: InputFromString, runtimeRule: RuntimeRule, startPosition: Int, nextInputPosition: Int, priority: Int) : SPPTNodeFromInputAbstract, SPPTLeaf

Functions

contains
Link copied to clipboard
common
open override fun contains(other: SPPTNode): Boolean
  • this leaf contains another leaf if they are equal
  • this branch contains another branch if all the children alternatives of the other are contained in this
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
setTags
Link copied to clipboard
common
open override fun setTags(tags: List<String>)
toString
Link copied to clipboard
common
open override fun toString(): String
toStringIndented
Link copied to clipboard
common
fun toStringIndented(indentIncrement: String): String

Properties

asBranch
Link copied to clipboard
common
open override val asBranch: SPPTBranch
this node cast to an ISPPFBranch (or null if the node is not a branch)
asLeaf
Link copied to clipboard
common
open override val asLeaf: SPPTLeaf
this node cast to an ILeaf (or null if the node is not a leaf)
embeddedIn
Link copied to clipboard
common
var embeddedIn: String? = null
eolPositions
Link copied to clipboard
common
open lateinit override var eolPositions: List<Int>
identity
Link copied to clipboard
common
open override val identity: SPPTNodeIdentity
the identity of this node
input
Link copied to clipboard
common
val input: InputFromString
isBranch
Link copied to clipboard
common
open override val isBranch: Boolean
true if this node is a branch
isEmptyLeaf
Link copied to clipboard
common
open override val isEmptyLeaf: Boolean
an Empty Leaf is constructed by a parse by specifically matching nothing, caused by:
  • a rule with no items (for example 'rule = ;')
  • an optional item (for example 'rule = item?
isEmptyMatch
Link copied to clipboard
common
open override val isEmptyMatch: Boolean
isLeaf
Link copied to clipboard
common
open override val isLeaf: Boolean
true if this node is a Leaf
isLiteral
Link copied to clipboard
common
open override val isLiteral: Boolean
Indicates if the leaf was constructed by matching a literal or not.
isPattern
Link copied to clipboard
common
open override val isPattern: Boolean
Indicates if the leaf was constructed by matching a regular expression pattern or not.
isSkip
Link copied to clipboard
common
open override val isSkip: Boolean
a grammar can define some rules as 'skip' rules, for example a rule to match whitespace is commonly a skip rule.
lastLeaf
Link copied to clipboard
common
open override val lastLeaf: SPPTLeaf
location
Link copied to clipboard
common
open override val location: InputLocation
matchedText
Link copied to clipboard
common
open override val matchedText: String
all text matched by this node
matchedTextLength
Link copied to clipboard
common
open override val matchedTextLength: Int
the length of the text (in characters) matched by this node, derived from identity
metaTags
Link copied to clipboard
common
open override val metaTags: List<String>
name
Link copied to clipboard
common
open override val name: String
the name of the runtime rule that caused this node to be constructed
nextInputPosition
Link copied to clipboard
common
open override val nextInputPosition: Int
startPosition + matchedTextLength
nonSkipMatchedText
Link copied to clipboard
common
open override val nonSkipMatchedText: String
all text matched by this node excluding text that was matched by skip rules.
numberOfLines
Link copied to clipboard
common
open override val numberOfLines: Int
the number of lines (end of line markers) covered by the text that this node matches
option
Link copied to clipboard
common
open override val option: Int
parent
Link copied to clipboard
common
open override var parent: SPPTBranch? = null
A parent might be null if the construction of the node has not set it (it is not required)the parent branch of this node.
priority
Link copied to clipboard
common
open override val priority: Int
the priority of this node according to the grammar (0 if no priority defined by parent rule)
runtimeRule
Link copied to clipboard
common
val runtimeRule: RuntimeRule
runtimeRuleNumber
Link copied to clipboard
common
open override val runtimeRuleNumber: Int
the rule number from the runtime grammar that caused this node to be constructed, derived from identity
startPosition
Link copied to clipboard
common
open override val startPosition: Int
the index position of the input text at which this node starts its match, derived from identity
tagList
Link copied to clipboard
common
open override var tagList: List<String>
list of names of all the parent nodes leading to this leaf ( currently populated by TokensByLineVisitor - called by SharedPackedParseTree.