[Python-Dev] Re: Automatic flex interface for Python?

Martin Sjögren md9ms@mdstud.chalmers.se
22 Aug 2002 10:55:37 +0200


--=-FIrrKwwWlzNvPZonsSzc
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

tor 2002-08-22 klockan 03.13 skrev Tim Peters:
> Seems more to me that lexing is convenient and fast only when expressed i=
n 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 an=
d
> slow in SNOBOL4 and Icon, despite that they excel at higher-level
> pattern-matching tasks.  IOW, lexing is in a world by itself, almost noth=
ing
> 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

--=-FIrrKwwWlzNvPZonsSzc
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad
	meddelandedel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA9ZKcJGpBPiZwE9FYRAt3BAJ9osD6UL0Ai6SDaKPv8eupnzASqigCgqJhV
LtEKvmTv0SXwdzPA/YsPyeI=
=r8i7
-----END PGP SIGNATURE-----

--=-FIrrKwwWlzNvPZonsSzc--