class Pegasus::Pda::Item
- Pegasus::Pda::Item
- Reference
- Object
Overview
An single production item, without a dot or any kind of state.
Included Modules
- JSON::Serializable
Defined in:
pegasus/items.crpegasus/json.cr
Constructors
-
.new(head : Pegasus::Elements::NonterminalId, body : Array(Pegasus::Elements::NonterminalId | Pegasus::Elements::TerminalId))
Creates a new item with the given head and body.
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#==(other : Item)
Compares equality with the given other item.
-
#body : Array(Elements::TerminalId | Elements::NonterminalId)
The body of terminals and nonterminals on the right of the production rule.
-
#hash(hasher)
Hashes this item.
-
#head : Elements::NonterminalId
The nonterminal on the left of the production rule, into which the right hand side is converted.
- #to_s(io)
Constructor Detail
def self.new(head : Pegasus::Elements::NonterminalId, body : Array(Pegasus::Elements::NonterminalId | Pegasus::Elements::TerminalId))
#
Creates a new item with the given head and body.
Instance Method Detail
The body of terminals and nonterminals on the right of the production rule.
def head : Elements::NonterminalId
#
The nonterminal on the left of the production rule, into which the right hand side is converted.