class Cabbage::Rule(T)
- Cabbage::Rule(T)
- Reference
- Object
Defined in:
cabbage/rule.crConstructors
Instance Method Summary
- #action : Proc(Item(T) | DerivationNode(T), T)
- #action=(action : Proc(Item(T) | DerivationNode(T), T))
- #lhs
- #pretty_production(start = 0, stop = rule.size)
- #production : Array(GrammarSymbol)
- #production=(production : Array(GrammarSymbol))
- #size
- #symbol : Nonterminal
- #symbol=(symbol : Nonterminal)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
def self.new(symbol : Symbol, production : Array(Char | Symbol), action : Cabbage::DerivationNode(T) | Cabbage::Item(T) -> T)
#
Instance Method Detail
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
.