class Marpa::Parser

Defined in:

marpa.cr
marpa/helpers.cr

Instance Method Summary

Instance Method Detail

def metag_grammar #

Internal representation of the BNF language.


[View source]
def parse(rules : Hash(String, Array(Rule)), input : String, tag : Bool = false) #

Parse input given NAIF rules. See #metag_grammar for an example of this format, or the original interface for information on which this is based.


[View source]
def parse(rules : String, input : String, tag : Bool = false) #

Parse input given BNF rules. #parse will output the resulting parse tree, notated here as 'stack'. 'tag' will output each node's value and type separated by "/".


[View source]
def stack_to_rules(stack) #

Convert the output of a succesful parse to NAIF.


[View source]