SPPTNodeIdentity

interface SPPTNodeIdentity

The identity of a node in a Shared Packed Parse Forest is composed from:

  • a unique rule number,
  • a starting position indicating the index of a position in the input text of the parse at which this node starts,
  • the length (number of characters) of the input text that is matched by this node

If a grammar is ambiguous, a parse result may contain multiple nodes with the same identity but with different children. An SPPF combines these nodes (to avoid duplication) but supports the alternative lists of children.

Properties

runtimeRuleNumber
Link copied to clipboard
common
abstract val runtimeRuleNumber: Int
the number of the runtime rule used to create the node
startPosition
Link copied to clipboard
common
abstract val startPosition: Int
the start position of the text matched by the node

Inheritors

SPPTNodeIdentityDefault
Link copied to clipboard