Hi,

"Jason Meade" <[EMAIL PROTECTED]> 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...

Thanks,
Ludovic.

[0] http://www-sop.inria.fr/mimosa/fp/Bigloo/doc/bigloo.pdf
[1] http://www.ccs.neu.edu/home/dorai/pregexp/pregexp.html


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to