# File lib/racc/state.rb, line 850 850: def each_reduce(&block) 851: @reduce.each(&block) 852: end
# File lib/racc/state.rb, line 869 869: def each_shift(&block) 870: @shift.each(&block) 871: end
# File lib/racc/state.rb, line 822 822: def init 823: @grammar.each do |rule| 824: @reduce.push Reduce.new(rule) 825: end 826: @statetable.each do |state| 827: @shift.push Shift.new(state) 828: end 829: @accept = Accept.new 830: @error = Error.new 831: end
# File lib/racc/state.rb, line 837 837: def reduce(i) 838: case i 839: when Rule then i = i.ident 840: when Integer then ; 841: else 842: raise "racc: fatal: wrong class #{i.class} for reduce" 843: end 844: 845: r = @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" 846: r.incref 847: r 848: end
# File lib/racc/state.rb, line 833 833: def reduce_n 834: @reduce.size 835: end
# File lib/racc/state.rb, line 858 858: def shift(i) 859: case i 860: when State then i = i.ident 861: when Integer then ; 862: else 863: raise "racc: fatal: wrong class #{i.class} for shift" 864: end 865: 866: @shift[i] or raise "racc: fatal: shift action #{i} does not exist" 867: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.