Class: Parslet::Atoms::Rule::Position::LR::Head
- Inherits:
-
Struct
- Object
- Struct
- Parslet::Atoms::Rule::Position::LR::Head
- Defined in:
- lib/parslet/atoms/rule/position.rb
Instance Attribute Summary collapse
-
#eval_rules ⇒ Object
Returns the value of attribute eval_rules.
-
#involved_rules ⇒ Object
Returns the value of attribute involved_rules.
-
#rule ⇒ Object
Returns the value of attribute rule.
Instance Method Summary collapse
- #eval?(rule) ⇒ Boolean
- #exclude_eval_rule!(rule) ⇒ Object
- #involved?(rule) ⇒ Boolean
- #reset_eval_rules ⇒ Object
Instance Attribute Details
#eval_rules ⇒ Object
Returns the value of attribute eval_rules
12 13 14 |
# File 'lib/parslet/atoms/rule/position.rb', line 12 def eval_rules @eval_rules end |
#involved_rules ⇒ Object
Returns the value of attribute involved_rules
12 13 14 |
# File 'lib/parslet/atoms/rule/position.rb', line 12 def involved_rules @involved_rules end |
#rule ⇒ Object
Returns the value of attribute rule
12 13 14 |
# File 'lib/parslet/atoms/rule/position.rb', line 12 def rule @rule end |
Instance Method Details
#eval?(rule) ⇒ Boolean
17 18 19 |
# File 'lib/parslet/atoms/rule/position.rb', line 17 def eval?(rule) eval_rules.include?(rule) end |
#exclude_eval_rule!(rule) ⇒ Object
21 22 23 |
# File 'lib/parslet/atoms/rule/position.rb', line 21 def exclude_eval_rule!(rule) eval_rules.delete(rule) end |
#involved?(rule) ⇒ Boolean
13 14 15 |
# File 'lib/parslet/atoms/rule/position.rb', line 13 def involved?(rule) self.rule == rule || self.involved_rules.include?(rule) end |
#reset_eval_rules ⇒ Object
25 26 27 |
# File 'lib/parslet/atoms/rule/position.rb', line 25 def reset_eval_rules self.eval_rules = self.involved_rules.dup end |