class Pegasus::Elements::NonterminalId
- Pegasus::Elements::NonterminalId
- Reference
- Object
Overview
A nonterminal, as specified by the user. Nonterminals are on the left of production rules (though they can also appear on the right).
Included Modules
- JSON::Serializable
Defined in:
pegasus/elements.crpegasus/json.cr
Constructors
-
.new(id : Int64, start : Bool = false)
Creates a new NonterminalId with the given ID.
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#==(other : NonterminalId)
Compares this nonterminal to another nonterminal.
-
#hash(hasher)
Creates a hash of this NonterminalId.
-
#raw_id
Gets the raw ID of this nonterminal.
-
#start?
Checks if this nonterminal is a "start" nonterminal (i.e., a potentially top level node)
-
#table_index
Gets the table index of this nonterminal.
- #to_s(io)
Constructor Detail
Instance Method Detail
def start?
#
Checks if this nonterminal is a "start" nonterminal (i.e., a potentially top level node)