class Pegasus::Elements::NonterminalId

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

Defined in:

pegasus/elements.cr
pegasus/json.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : Int64, start : Bool = false) #

Creates a new NonterminalId with the given ID.


[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def ==(other : NonterminalId) #

Compares this nonterminal to another nonterminal.


[View source]
def hash(hasher) #

Creates a hash of this NonterminalId.


[View source]
def raw_id #

Gets the raw ID of this nonterminal. This should be used with caution.


[View source]
def start? #

Checks if this nonterminal is a "start" nonterminal (i.e., a potentially top level node)


[View source]
def table_index #

Gets the table index of this nonterminal.


[View source]
def to_s(io) #

[View source]