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

Re: comprehensive list of perl6 rule tokens

Thread Previous
Patrick R. Michaud
May 26, 2005 10:05
Re: comprehensive list of perl6 rule tokens
Message ID:
On Wed, May 25, 2005 at 08:28:11AM -0700, Mark A. Biggar wrote:
> Jeff 'japhy' Pinyan wrote:
> >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.
> Well we have the same problem with someone redefining 'digit'.  But 
> character classes are their own sub-language and we may need to
> distinguish between Rule::digit and CharClass::digit in the syntax.  

Larry makes the case that "character classes really are rules of
a sort" in
Essentially, since characters are no longer fixed-width entities,
the distinction between "character class" and "rule" can get pretty
fuzzy, and so we're probably better off not trying to force one.

It may simply be that in general a character class expression like


ends up decomposing into something like

    [ <![aeiou]><?alnum> | <?punct> ]

which doesn't make any assumptions about character widths.  Of course,
the rules engine would (eventually) be written to recognize the common
compositions and "character class" subrules and optimize for them.


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