class Cabbage::Grammar(T)

Defined in:

cabbage/grammar.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(start : Char | Symbol, terminal : Char -> T, rules : Hash(Symbol, Array(Cabbage::Rule(T)))) #

[View source]

Instance Method Detail

def lr0(key : Tuple(Rule(T), UInt8)) #

[View source]
def parse(input) #

[View source]
def rules : Hash(Nonterminal, Array(Rule(T))) #

[View source]
def rules=(rules : Hash(Nonterminal, Array(Rule(T)))) #

[View source]
def start : GrammarSymbol #

[View source]
def start=(start : GrammarSymbol) #

[View source]
def terminal : Proc(Terminal, T) #

[View source]
def terminal=(terminal : Proc(Terminal, T)) #

[View source]