Class: Rattler::Runtime::ExtendedPackratParser::Head

Inherits:
Object
  • Object
show all
Defined in:
lib/rattler/runtime/extended_packrat_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule_name) ⇒ Head

:nodoc:



124
125
126
127
128
# File 'lib/rattler/runtime/extended_packrat_parser.rb', line 124

def initialize(rule_name)
  @rule_name = rule_name
  @involved_set = {}
  @eval_set = {}
end

Instance Attribute Details

#eval_setObject

Returns the value of attribute eval_set.



129
130
131
# File 'lib/rattler/runtime/extended_packrat_parser.rb', line 129

def eval_set
  @eval_set
end

#involved_setObject

Returns the value of attribute involved_set.



129
130
131
# File 'lib/rattler/runtime/extended_packrat_parser.rb', line 129

def involved_set
  @involved_set
end

#rule_nameObject

Returns the value of attribute rule_name.



129
130
131
# File 'lib/rattler/runtime/extended_packrat_parser.rb', line 129

def rule_name
  @rule_name
end

Instance Method Details

#involves?(rule_name) ⇒ Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/rattler/runtime/extended_packrat_parser.rb', line 130

def involves?(rule_name)
  rule_name == self.rule_name or involved_set.has_key? rule_name
end