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