[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regular expressions

From: Ludovic Courtès
Subject: Regular expressions
Date: Fri, 19 May 2006 14:12:36 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)


"Jason Meade" <address@hidden> writes:

> Is there a standard for regular expressions somewhere?

Some Scheme implementations (e.g., Bigloo [0]) use S-expressions to
represent regexps.  It has the advantage of being (i)
syntax-independent, (ii) easier to understand, and (iii) it could be
used as a back-end to a variety of different syntaxes.

Actually, Bigloo uses `pregexp' [1] which should work on any R5RS
implementation.  It uses the S-exp representation at its core but can
convert a "typical" regexp string into it.  The issue is that it's
unclear whether this syntax is compatible with POSIX, Perl, or only with
itself.  However, one could implement a converter from any particular
regexp syntax to S-exps.

In practice, `pregexp' on Guile may end up being much slower than the
available native implementations, though...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]