A simple lexical analyzer written in Ruby