develooper Front page | perl.perl6.language | Postings from May 2005

Re: comprehensive list of perl6 rule tokens

Thread Previous | Thread Next
Jeff 'japhy' Pinyan
May 25, 2005 07:50
Re: comprehensive list of perl6 rule tokens
Message ID:
On May 25, Jonathan Scott Duff said:

> 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.

But that's not even the point.  The ! in <!after ...> is not what makes 
<!after ...> a zero-width assertion, it's the 'after' that does that.  All 
the ! does is negate the boolean sense of the assertion, which seems like 
a useful thing to have.

Hrm, but I think I see the problem.  How does one define "negation" for an 
arbitrary assertion?  Is <!foo> saying "if <foo> matches, fail"?  Because 
then <!prop X> doesn't make mean the same as <-prop X>.  We don't want 
negation, we want complement.

I guess '!' is only well-defined for zero-width assertions.  When you want 
to say <!foo>, I guess <!before <foo>> or <!after <foo>> is the proper way 
to go.

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About