class Arborist::Apply

Overview

Apply represents the application of a named rule

Defined in:

arborist.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(rule_name : String) #

[View source]

Instance Method Detail

def eval(matcher) : ParseTree | Nil #

this started out as an implementation of Tratt's Algorithm 2 in section 6.4 of https://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/


[View source]
def label(label : String) : Apply #

[View source]
def label : String | Nil #

[View source]
def label=(label : String | Nil) #

[View source]
def parse_tree_is_larger_than_seed_parse_tree?(parse_tree : ParseTree | Nil, seed_parse_tree : ParseTree | Nil) : Bool #

[View source]
def pop_rule_application(matcher, successfully_parsed) : ApplyCall #

[View source]
def preorder_traverse(matcher, visit : Expr -> _, visited_nodes : Set(Expr)) #

[View source]
def push_rule_application(matcher, rule, pos, is_this_application_left_recursive_at_pos) #

[View source]
def rule_name : String #

[View source]
def syntactic_rule? #

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