

A non-blocking lexing toolkit for Scala in less than 800 lines of code - adg001
http://matt.might.net/articles/nonblocking-lexing-toolkit-based-on-regex-derivatives/

======
swah
Nice, not as verbose as I thought Scala code was...

~~~
crux_
Scala can be incredibly concise; I'm not sure where you got the "verbose"
impression. Possibly tutorials that transliterated from Java?

(One of Scala's strengths, and weaknesses, is its flexibility: You can write
Haskell-like code in Scala, Java-like code in Scala, or even something Perlish
if you prefer...)

~~~
henning
although Scala has local type inference, you see far more type declarations
than you would in ML or Haskell. if you have a lot of one-line functions
(which might be 5-15 in Java, say), the type decls become a significant
fraction of characters typed.

even with that, on the merits Scala is one of the best languages out there in
my mind.

------
jongraehl
On-the-fly derivative of RE seems like it would offer horrible performance. I
suppose memoization could help, though.

