class Pegasus::Pda::LookaheadItem

Overview

A superclass of the DottedItem which also keeps a lookahead set to further distinguish it in LR(1) parser construction.

Defined in:

pegasus/items.cr
pegasus/table.cr

Constructors

Instance Method Summary

Instance methods inherited from class Pegasus::Pda::DottedItem

==(other : DottedItem) ==, done? done?, hash(hasher) hash, index : Int64 index, item : Item item, next_item next_item, next_item! next_item!, to_s(io) to_s

Constructor methods inherited from class Pegasus::Pda::DottedItem

new(item : Pegasus::Pda::Item, index : Int64 = 0_i64) new

Constructor Detail

def self.new(item, lookahead : Set(Pegasus::Elements::LookaheadElement), index = 0_i64) #

Creates a new lookahead dotted item.


[View source]

Instance Method Detail

def ==(other : LookaheadItem) #

Compares this dotted item to another dotted item.


[View source]
def hash(hasher) #

Hashes this dotted item.


[View source]
def insert_reduce?(action_table, state, self_index) #

[View source]
def insert_shift?(action_table, state) #

[View source]
def lookahead : Set(Elements::LookaheadElement) #

The lookahead set of this dotted item.


[View source]
def to_s(io) #

[View source]