class Cabbage::Rule(T)

Defined in:

cabbage/rule.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(symbol : Symbol, production : Array(Char | Symbol), action : Cabbage::DerivationNode(T) | Cabbage::Item(T) -> T) #

[View source]

Instance Method Detail

def action : Proc(Item(T) | DerivationNode(T), T) #

[View source]
def action=(action : Proc(Item(T) | DerivationNode(T), T)) #

[View source]
def lhs #

[View source]
def pretty_production(start = 0, stop = rule.size) #

[View source]
def production : Array(GrammarSymbol) #

[View source]
def production=(production : Array(GrammarSymbol)) #

[View source]
def size #

[View source]
def symbol : Nonterminal #

[View source]
def symbol=(symbol : Nonterminal) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]