Skip to content

Commit

Permalink
simplifies a couple of regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Feb 14, 2012
1 parent 38dd4ee commit 01c50c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/journey/gtg/simulator.rb
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/journey/nfa/simulator.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 01c50c6

Please sign in to comment.