Class: ABNF::Parser::Compiler::RuleList::Rule
- Inherits:
-
ABNF::Parser::Compiler::RuleBuilder
- Object
- ABNF::Parser::Compiler::RuleBuilder
- ABNF::Parser::Compiler::RuleList::Rule
- Defined in:
- lib/abnf/parser/compiler/rule_list.rb
Instance Attribute Summary collapse
-
#inner_rule ⇒ Object
Returns the value of attribute inner_rule.
-
#operator ⇒ Object
Returns the value of attribute operator.
Attributes inherited from ABNF::Parser::Compiler::RuleBuilder
Instance Method Summary collapse
Methods inherited from ABNF::Parser::Compiler::RuleBuilder
Constructor Details
This class inherits a constructor from ABNF::Parser::Compiler::RuleBuilder
Instance Attribute Details
#inner_rule ⇒ Object
Returns the value of attribute inner_rule.
48 49 50 |
# File 'lib/abnf/parser/compiler/rule_list.rb', line 48 def inner_rule @inner_rule end |
#operator ⇒ Object
Returns the value of attribute operator.
47 48 49 |
# File 'lib/abnf/parser/compiler/rule_list.rb', line 47 def operator @operator end |
Instance Method Details
#c_wsp(_) ⇒ Object
50 51 |
# File 'lib/abnf/parser/compiler/rule_list.rb', line 50 def c_wsp _ end |
#defined_as(token) ⇒ Object
53 54 55 |
# File 'lib/abnf/parser/compiler/rule_list.rb', line 53 def defined_as token self.operator = token.lexeme end |
#start_rule(token) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/abnf/parser/compiler/rule_list.rb', line 57 def start_rule token compiler.push Alternation do |rule| self.inner_rule = rule compiler.pop self end end |