Method: Racc::LogFileGenerator#outact
- Defined in:
- lib/racc/logfilegenerator.rb
#outact(f, t, act) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/racc/logfilegenerator.rb', line 133 def outact(f, t, act) case act when Shift f.printf " %-12s shift, and go to state %d\n", t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", t.to_s, act.ruleid, act.rule.target.to_s when Accept f.printf " %-12s accept\n", t.to_s when Error f.printf " %-12s error\n", t.to_s else raise "racc: fatal: wrong act for outact: act=#{act}(#{act.class})" end end |