Method: Racc::LogFileGenerator#output_useless
- Defined in:
- lib/racc/logfilegenerator.rb
#output_useless(out) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/racc/logfilegenerator.rb', line 49 def output_useless(out) @grammar.each do |rl| if rl.useless? out.printf "rule %d (%s) never reduced\n", rl.ident, rl.target.to_s end end @grammar.each_nonterminal do |t| if t.useless? out.printf "useless nonterminal %s\n", t.to_s end end end |