Class: Racc::Reduce
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/racc/state.rb |
Class Method Summary
- .new(rule) ⇒ Reduce constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(rule) ⇒ Reduce
Instance Attribute Details
#refn (readonly)
[ GitHub ]# File 'lib/racc/state.rb', line 908
attr_reader :refn
#rule (readonly)
[ GitHub ]# File 'lib/racc/state.rb', line 907
attr_reader :rule
Instance Method Details
#decref
[ GitHub ]# File 'lib/racc/state.rb', line 922
def decref @refn -= 1 raise 'racc: fatal: act.refn < 0' if @refn < 0 end
#incref
[ GitHub ]# File 'lib/racc/state.rb', line 918
def incref @refn += 1 end
#inspect
[ GitHub ]# File 'lib/racc/state.rb', line 914
def inspect "<reduce #{@rule.ident}>" end
#ruleid
[ GitHub ]# File 'lib/racc/state.rb', line 910
def ruleid @rule.ident end