Class: Rattler::Grammar::GrammarParser

Inherits:
Runtime::ExtendedPackratParser show all
Includes:
Metagrammar, Parsers
Defined in:
lib/rattler/grammar/grammar_parser.rb

Instance Attribute Summary

Attributes inherited from Runtime::Parser

#source

Instance Method Summary collapse

Methods included from Parsers

define

Methods included from Metagrammar

#match_attributed, #match_attributed!, #match_attributed_terms, #match_attributed_terms!, #match_expression, #match_expression!, #match_grammar, #match_labelable, #match_labelable!, #match_labeled, #match_labeled!, #match_list, #match_list!, #match_list_term, #match_list_term!, #match_prefixable, #match_prefixable!, #match_prefixed, #match_prefixed!, #match_primary, #match_primary!, #match_suffixed, #match_suffixed!, #match_term, #match_term!, #match_terms, #match_terms!, #match_unattributed, #match_unattributed!, #start_rule

Methods inherited from Runtime::ExtendedPackratParser

#apply

Methods inherited from Runtime::RecursiveDescentParser

#match, #method_missing, #respond_to?

Methods included from GrammarDSL

included

Methods included from Runtime::ParserHelper

#select_captures

Methods inherited from Runtime::Parser

#fail, #fail!, #fail_parse, #failure, #failure?, #parse, #parse!, parse!, #parse_fully, #parse_fully!, parse_fully!, #pos, #pos=

Methods inherited from Util::Node

#==, #[], [], #attrs, #can_equal?, #child, #children, #each, #empty?, #eql?, #inspect, #method_missing, #name, #respond_to?, #same_contents?, #to_graphviz, #with_attrs, #with_attrs!, #with_children

Constructor Details

#initialize(*args) ⇒ GrammarParser

Returns a new instance of GrammarParser.



16
17
18
19
20
21
22
# File 'lib/rattler/grammar/grammar_parser.rb', line 16

def initialize(*args)
  super
  @ws = nil
  @wc = Match[/[[:alnum:]_]/]
  @inline = false
  @directive_stack = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rattler::Runtime::RecursiveDescentParser