You can never go down the drain...

Kragen Sitaker kragen at dnaco.net
Wed Sep 27 18:17:39 EDT 2000


In article <wCgA5.844$d5.51939 at newsb.telia.net>,
Fredrik Lundh <effbot at telia.com> wrote:
>> > imho, regular expressions suck.
>
>. . . nobody can convince me that line noise is the best way to
>talk to a string matching engine -- as soon as you go beyond the
>regular basics (literals, dot, star, ranges), there are better ways
>to express yourself.

Olin Shivers concocted something called SRE --- see

	http://www.ai.mit.edu/~shivers/sre.txt

REBOL also has a human-readable BNF syntax: 

	http://www.rebol.com/faq.html#11550948

And the "Text Machine" someone else pointed to also looks pretty cool:

	http://www.prefab.com/textmachine/docs/chapter5theartof.html

The Perl RE syntax (especially with Python extensions like named match
bits) is a significant advancement over standard Unix-style REs, which
in turn were a huge advancement over their contemporary TECO-style REs,
which used control characters for metacharacters.

I'm sure that the FORTH guys have given some thought to building a
regular-expression engine in FORTH words, but the only thing I can find
is this 1988 BNF parser:

	http://www.zetetics.com/bj/papers/bnfparse.htm

(FORTH is harder to search for on Google than, say, REBOL or Python.
Lots of web pages contain the word 'forth' without being about FORTH.
Useful extra search terms are 'fig', 'sigforth', 'words', 'vocabulary',
'screen', 'stack', 'colon', 'colon-definition',)


-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Perilous to all of us are the devices of an art deeper than we ourselves
possess.
                -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]





More information about the Python-list mailing list