Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

simplifies a couple of regexps

  • Loading branch information...
commit 01c50c6d47b173fba1ea8222b128a6792387efbc 1 parent 38dd4ee
@fxn fxn authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/journey/gtg/simulator.rb
  2. +1 −1  lib/journey/nfa/simulator.rb
View
2  lib/journey/gtg/simulator.rb
@@ -21,7 +21,7 @@ def simulate string
input = StringScanner.new string
state = [0]
until input.eos?
- sym = input.scan(/[\/\.\?]|[^\/\.\?]+/)
+ sym = input.scan(%r([/.?]|[^/.?]+))
state = tt.move(state, sym)
end
View
2  lib/journey/nfa/simulator.rb
@@ -21,7 +21,7 @@ def simulate string
input = StringScanner.new string
state = tt.eclosure 0
until input.eos?
- sym = input.scan(/[\/\.\?]|[^\/\.\?]+/)
+ sym = input.scan(%r([/.?]|[^/.?]+))
# FIXME: tt.eclosure is not needed for the GTG
state = tt.eclosure tt.move(state, sym)
Please sign in to comment.
Something went wrong with that request. Please try again.