Class: RLTK::Parser::Reduce
Overview
The Reduce class indicates to the parser that it should reduce the input stack by the rule specified by Reduce.id.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(production) ⇒ Reduce
constructor
A new instance of Reduce.
-
#to_s ⇒ String
String representation of this action.
Constructor Details
#initialize(production) ⇒ Reduce
Returns a new instance of Reduce.
1661 1662 1663 1664 1665 |
# File 'lib/rltk/parser.rb', line 1661 def initialize(production) super(production.id) @production = production end |
Instance Method Details
#to_s ⇒ String
Returns String representation of this action.
1668 1669 1670 |
# File 'lib/rltk/parser.rb', line 1668 def to_s "Reduce by Production #{self.id} : #{@production}" end |