I don't understand this about edits (Re: Unabasheded laziness andthe phone edit)

John Esak john at valar.com
Fri Aug 6 19:29:13 PDT 2004



> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of Fairlight
> Sent: Friday, August 06, 2004 6:41 PM
> To: filePro mailing list
> Subject: I don't understand this about edits (Re: Unabasheded laziness
> andthe phone edit)
>
>
> On Fri, Aug 06, 2004 at 03:56:00AM -0400, Fairlight, the prominent pundit,
> witicized:
> >
> > FLPHONE  \ [<"("> N N N <")"> ([!"-"!]<" ">)] N N N (<"-">[!"
> "!]) N N N N
> >          | N N N <"-">[!" "!] N N N N
>
> I released this, and I did test it, and it works.  There's one thing I
> don't understand, however.
>
> The outermost brackets (match the very first square bracket with its
> closing one right before the prefix section in the long-form side of the
> edit) are apparently extraneous in this.
>
> Originally, I had them there because I was trying to be more elegant than
> having two edits logically OR'd.  The way I wrote it, it was originally:
>
> \ [<"("> N N N <")"> ([!"-"!]<" ">)] N N N (<"-">[!" "!]) N N N N
>
> The outermost brackets there were meant to say, "If the area code and its
> separator are present, fine; if not, don't sweat it, they're an optional
> component of the edit."
>
> The problem was, all short-forms without an area code failed.  So I went
> back to John's short-form OR and modified it so that it was semantically
> equivalent to my own logic with regards to being able to use
> either symbol.
> I then proceded to post it without removing the extraneous brackets.
>
> My question is:  -Why- doesn't it work the way I intuit it should from the
> documentation?
>
> mark->

I would guess it is because these operators work on single characters or
groupings of "connected" characters, not expressions or booleans for that
matter.

For example you can do

     <!x!>

but you can't do

     <!x|y!>

At least, I don't think you can and am not even going to test out whether
I'm right or not.  I'm just guessing.

John



More information about the Filepro-list mailing list