benefits of SRE syntax Michael Montague (16 Oct 2013 18:44 UTC)
Re: benefits of SRE syntax Roderic Morris (16 Oct 2013 19:23 UTC)
Re: benefits of SRE syntax Alex Shinn (20 Oct 2013 07:13 UTC)
Re: benefits of SRE syntax Per Bothner (16 Oct 2013 19:34 UTC)
Re: benefits of SRE syntax Alex Shinn (20 Oct 2013 14:21 UTC)
Re: benefits of SRE syntax John Cowan (20 Oct 2013 16:30 UTC)
Re: benefits of SRE syntax Per Bothner (20 Oct 2013 17:16 UTC)
Re: benefits of SRE syntax John Cowan (20 Oct 2013 17:50 UTC)
Re: benefits of SRE syntax Alex Shinn (20 Oct 2013 21:17 UTC)
Re: benefits of SRE syntax John David Stone (16 Oct 2013 20:39 UTC)
Re: benefits of SRE syntax Peter Bex (16 Oct 2013 20:50 UTC)
Re: benefits of SRE syntax Alex Shinn (17 Oct 2013 08:41 UTC)

Re: benefits of SRE syntax Per Bothner 20 Oct 2013 17:15 UTC

On 10/20/2013 07:21 AM, Alex Shinn wrote:
> On Thu, Oct 17, 2013 at 4:14 AM, Per Bothner <xxxxxx@bothner.com
>     I think structured regular expressions make sense when integrated
>     with a general pattern-matching framework (by which I mean something
>     like http://docs.racket-lang.org/__reference/match.html
>     <http://docs.racket-lang.org/reference/match.html>). Also,
>     sub-matches should produce variable bindings.
>
> I think it would be strange to provide regexp
> matching as part of a general matching framework
> without providing access to the underlying regexp
> library.

You're assuming there is an underlying regexp library
for handling strings regexps.  But that assumes a
separate syntax and operators for strings regexp matching.
However, a more integrated approach is possible and IMO
preferable, where regexps are matched against general
sequences, not just strings.

I suggest taking a look at CDuce (or its precursor XDuce)
http://www.cduce.org/papers/cduce-design.ps.gz
http://www.cduce.org/manual_types_patterns.html

I think this is a much more elegant approach, and much more
in the "spirit of Scheme" (if you take away the static typing
aspect - which of course I like).

If "structured regular expressions" are to be part of the
language, we should think about how they apply to sequences
(lists and vectors) in general, not just strings.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/