class Pegasus::Pda::LookaheadItem
- Pegasus::Pda::LookaheadItem
- Pegasus::Pda::DottedItem
- Reference
- Object
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.crpegasus/table.cr
Constructors
-
.new(item, lookahead : Set(Pegasus::Elements::LookaheadElement), index = 0_i64)
Creates a new lookahead dotted item.
Instance Method Summary
-
#==(other : LookaheadItem)
Compares this dotted item to another dotted item.
-
#hash(hasher)
Hashes this dotted item.
- #insert_reduce?(action_table, state, self_index)
- #insert_shift?(action_table, state)
-
#lookahead : Set(Elements::LookaheadElement)
The lookahead set of this dotted item.
- #to_s(io)
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
Creates a new lookahead dotted item.