class Cabbage::Item(T)

Overview

Fixme: Change to struct when derivations are known to work. Requires pointer magic to avoid recursive structs.

Included Modules

Defined in:

cabbage/item.cr

Constructors

Instance Method Summary

Instance methods inherited from module Cabbage::Derivation(T)

add_another_derivation(previous, child) add_another_derivation, add_derivation(previous, child) add_derivation, add_second_derivation(previous, child) add_second_derivation, child : Item(T) | DerivationNode(T) | Nil child, child=(child : Item(T) | DerivationNode(T) | Nil) child=, derivation_list? derivation_list?, evaluate(prev, &) evaluate, next_derivation : Item(T) | DerivationNode(T) | Nil next_derivation, next_derivation=(next_derivation : Item(T) | DerivationNode(T) | Nil) next_derivation=, previous : Item(T) | DerivationNode(T) | Nil previous, previous=(previous : Item(T) | DerivationNode(T) | Nil) previous=, rhs rhs, same?(previous, child) same?, walk walk

Constructor Detail

def self.new(tag : Cabbage::LR0(T) | Char | Symbol, start : Cabbage::Set(T), stop : Cabbage::Set(T)) #

[View source]

Instance Method Detail

def complete #

[View source]
def lhs #

[View source]
def lr0! #

[View source]
def nonterminal_action(item) #

[View source]
def predict(current) #

[View source]
def rule! #

[View source]
def start : Set(T) #

[View source]
def start=(start : Set(T)) #

[View source]
def stop : Set(T) #

[View source]
def stop=(stop : Set(T)) #

[View source]
def tag : LR0(T) | GrammarSymbol #

[View source]
def tag=(tag : LR0(T) | GrammarSymbol) #

[View source]
def terminal_action(char) #

[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]