class Rattler::Parsers::Super
Super
parses by applying the rule of the same name inherited from a super-grammar.
Public Class Methods
[](rule_name)
click to toggle source
@param [Symbol] rule_name the name of the referenced rule
@return [Apply] a new parser that parses by applying the rule
referenced by +rule_name+ in a super-grammar
# File lib/rattler/parsers/super.rb, line 13 def self.[](rule_name) self.new(:rule_name => rule_name.to_sym) end
Public Instance Methods
capturing_decidable?()
click to toggle source
(see Parser#capturing_decidable?
)
# File lib/rattler/parsers/super.rb, line 28 def capturing_decidable? false end
parse(scanner, rules, scope = ParserScope.empty)
click to toggle source
Apply
the parse rule of the same name inherited from a super-grammar.
@param (see Match#parse
)
@return the result of applying parse rule of the same name inherited from
a super-grammar
# File lib/rattler/parsers/super.rb, line 23 def parse(scanner, rules, scope = ParserScope.empty) rules.inherited_rule(rule_name).parse(scanner, rules, scope) end