[Aeditor-talk] regexp, yet another redesign

Simon Strandgaard neoneye at adslhome.dk
Wed Feb 18 21:55:34 EST 2004


On Wed, 2004-02-18 at 21:46, Mark wrote:
> Simon Strandgaard wrote:
> 
> >When nested quantifiers is working (correct), then I will finish the
> >implementation of perl6 regexp, where Mark Sparshatt already have done
> >some work. Don't know what condition the perl6 implementation is in
> >though.
> >
> >  
> >
> I haven't had time to work on the perl6 regexp lately so it's still at a 
> very basic stage. Over the weekend I'll work on cleaning the code up to 
> make it easier to extend and on documenting what's been done so far and 
> what needs to be done.
> 

Ok, great. :-)

BTW: Some time ago I made a small demosite where regexp can be tried out
online.   I think of extending it, so that you can see how different
engine deals with the regexp-string a visitor may have entered. 

http://neoneye.dk/regexp.rbx
At the moment its just agains Rubys native regexp engine.
Suggestions for improvement is welcome :-)


BTW#2: I think perl has a package named 'explain'? where you can see how
your regexp has been interpreted, and what the meaning is. I think of
doing the same. I already have some pretty printing routines, for
instance /(a.*b){3}/.match("0abababab1"), outputs:

regexp="(a.*b){3}"
+-Repeat greedy{3,3}
  +-Group register=1 
    +-Sequence
      +-Literal "a"
      +-Repeat greedy{0,-1}
      | +-Wildcard NOT["\n"]
      +-Literal "b"
input="0abababab1"

--
Simon Strandgaard



More information about the Aeditor-talk mailing list