
tor 2002-08-22 klockan 03.13 skrev Tim Peters:
Seems more to me that lexing is convenient and fast only when expressed in a language specifically designed for writing lexers, and backed by a specialized execution engine that knows a great deal about fast state-machine implementation. Like, say, Flex. Lexing is also clumsy and slow in SNOBOL4 and Icon, despite that they excel at higher-level pattern-matching tasks. IOW, lexing is in a world by itself, almost nothing is good at it, and the few things that shine at it don't do anything else.
I've actually found that Haskell's pattern matching and lazy evaluation makes it pretty easy to write lexers. Too bad it's too hard to use Haskell together with other languages :( But then, writing a R-D parser in Haskell is piece-of-cake too :-) Martin