# File lib/journey/gtg/simulator.rb, line 20 20: def simulate string 21: input = StringScanner.new string 22: state = [0] 23: while sym = input.scan(/[\/\.\?]|[^\/\.\?]+/) 24: state = tt.move(state, sym) 25: end 26: 27: acceptance_states = state.find_all { |s| 28: tt.accepting? s 29: } 30: 31: return if acceptance_states.empty? 32: 33: memos = acceptance_states.map { |x| tt.memo x }.flatten.compact 34: 35: MatchData.new memos 36: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.