parse

For the Compleat Fan
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

parse

Post by newdep »

Hello Lutz,

Not using regexp.
Is it possible to extend 'parse with an 'or 'and 'between selector?
I might be nagging here because the Regex lib is there
to catch these, still a more lispy version might be prefered
by others too i can emagine?

>(parse "once twice once one ounce once" (or "once" "one") )
( "twice ounce" )

>(parse "once twice once one tripple ounce once" (and "once" "tripple" ) )
( "twice one ounce" )

or a 'from/to (between), but i prefer the 'or and 'and more

>(parse "once twice once tripple one ounce once" (between "twice" - "tripple"))
( "once twice tripple one ounce once" )


I tried the trick above (never know :-) but did unfortunatly not work ..

Regards,
Norman.

Locked