a scanner written to learn ruby regexp and other idioms