#pop(n = 1)
Pop some number of objects off of the inside stacks.
#position
@return [StreamPosition] Position data for the last symbol on the stack.
#push(state, o, node0, position)
Push new state and other information onto the stack.
#result
Fetch the result stored in this ParseStack.
#state
@return [Integer] Current state of this ParseStack.
#state_stack : Array(Int32)
@return [Array] Array of states used when performing {Reduce} actions.
#tree
@return [String] Representation of the parse tree in the DOT langauge.
def self.
new(id : Int32, output_stack : Array(
CLTK::Type) =
[] of Type, state_stack : Array(Int32) = [
0]
of Int32, node_stack : Array(Int32) =
[] of Int32, connections : Array(Tuple(Int32, Int32)) =
[] of ::Tuple(
Int32,
Int32), labels : Array(String) =
[] of String, positions : Array(
CLTK::StreamPosition) =
[] of StreamPosition)
#
Instantiate a new ParserStack object.
@param [Integer] id ID for this parse stack. Used by GLR algorithm.
@param [Array