[racket-dev] Missing pregexp syntax in Racket

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Nov 29 16:50:16 EST 2011

Matthias Felleisen wrote at 11/29/2011 03:43 PM:
> On Nov 29, 2011, at 3:41 PM, Norman Gray wrote:
>    
>> What Neil said _and_ what Shivers said!
>>
>> Implementing Shivers-style SREs would be a much bigger win than any alternate pregexp syntax with differently funky backslash rules from everything else.
>>      
> So, any volunteers?
>    

This sounds fun to do, but I might not get to it in a timely manner, so 
it would be better if someone else was ready to tackle this.

I think that this work ideally includes at least three additions: (1) a 
procedure that translates an SRE to a Racket regexp string; (2) for 
convenience, a procedure that translates an SRE to a Racket regexp 
object; and (3) a "#rx(" or "#sre(" reader extension.  Note: I said a 
reader extension rather than macro form, just to be consistent with 
Racket's existing regexp support, but perhaps a macro would make a 
little more sense for SREs.

-- 
http://www.neilvandyke.org/


Posted on the dev mailing list.