scsh-users
[Top] [All Lists]

Re: if-match on 0.5.3

To: walter@pelissero.org (Walter C. Pelissero)
Subject: Re: if-match on 0.5.3
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: 12 Nov 2001 10:44:15 +0100
Cc: scsh-news@zurich.ai.mit.edu
Sender: gasbichl@informatik.uni-tuebingen.de
>>>>> "WP" == Walter C Pelissero <walter@pelissero.org> writes:

WP> I was wondering if I got the sre manual right.
WP> According to the only example I could find in it

WP> (let-match (regexp-search date s) (whole-date month day year)
WP>   ... body ...)

WP> if-match should bind variables like this

WP> (whole-matched-string substring-1 substring-2 ...)

WP> while according to my test it's like this

WP> (match-structure whole-matched-string substring-1 substring-2 ...)

WP> It's the first time I use if-match, though.

Documentation and implementation already differ for let-match:

In 

(let-match (regexp-search date s) (whole-date month day year)
  ... body ...)

according to the manual whole-date is bound to the matching string
whereas the implementation binds it to the match value itself. ifmatch
somewhat inherits this behaviour as you observed.

Unfortunately the implementation for let-match and if-match don't work
together very well, so I suspect we have to change implementation and
documentation.

The only one who knows the intended behaviour is Olin. Maybe he will
tell us what to do, maybe not. I predict that the latter will
happen...


-- 
Martin

<Prev in Thread] Current Thread [Next in Thread>
  • if-match on 0.5.3, Walter C. Pelissero
    • Re: if-match on 0.5.3, Martin Gasbichler <=