On May 25, Mark A. Biggar said:

Jonathan Scott Duff wrote:
On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote:

I wish <!prop X> was allowed. I don't see why <!...> has to be confined to zero-width assertions.

I don't either actually. One thing that occurred to me while responding
to your original email was that <!foo> might have slightly wrong
huffmanization.  Is zero-width the common case?  If not, we could use
character doubling for emphasis:  <!foo> consumes, while <!!foo> is
zero-width.

Now <prop X> is a character class just like <+digit> and so
under the new character class syntax, would probably be written
<+prop X> or if the white space is a problem, then maybe <+prop:X>
(or <+prop(X)> as Larry gets the colon :-), but that is a pretty
adverbial case so ':' maybe okay) with the complemented case being
<-prop:X>.  Actually the 'prop' may be unnecessary at all, as we know
we're in the character class sub-language because we saw the '<+', '<-'
or '<[', so we could just define the various Unicode character property
codes (I.e., Lu, Ll, Zs, etc) as pre-defined character class names just
like 'digit' or 'letter'.

Yeah, that was going to be my next step, except that the unknowing person might make a sub-rule of their own called, say, "Zs", and then which would take precedence? Perhaps <prop:X> is a good way of writing it.

BTW, as a matter of terminology, <-digit> should probably be called the
complement of <+digit> instead of the negation so as not to confuse it with the <!...> negative zero-width assertion case.

Yeah, I just wrote that in my recent reply to Scott. I realized the nomenclature would be a point of confusion.

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

Reply via email to