develooper Front page | perl.perl5.porters | Postings from September 2014

Re: RFC: implementing script runs

Thread Previous | Thread Next
From:
Abigail
Date:
September 29, 2014 14:19
Subject:
Re: RFC: implementing script runs
Message ID:
20140929141851.GC24558@almanda.fritz.box
On Mon, Sep 29, 2014 at 07:48:31AM -0600, Tom Christiansen wrote:
> Abigail <abigail@abigail.be> wrote on Mon, 29 Sep 2014 15:08:56 +0200:
> 
> >On Mon, Sep 29, 2014 at 08:41:30AM -0400, Ricardo Signes wrote:
> 
> >> * Abigail <abigail@abigail.be> [2014-09-29T04:59:16]
> 
> >> I wonder if, rather than affecting the previous atom, it wouldn't be more
> >> useful to set a scope for single-script matching.
> >> 
> >>   (?«onescript»:\w+\d+\.\d+)
> >> 
> >> I really haven't given this deep thought.  It just popped into my head<SNIP>
> >> heading out, so I'm getting it written down before I forget to think a<SNIP>
> >> more.
> 
> Too bad /o was long ago already taken.
> 
> > I think that's a better syntax that either the proposed quantifier
> > modifier, or the escape sequences, as you can enforce longer (sub)patterns
> > to be in one script than just a run.
> 
> > It's on par with the modifier proposal when it comes to usefulness, except
> > that your proposal doesn't use a single letter modifier (another thing we
> > won't have an endless supply off either), but uses a full word.
> 
> I again wonder about collecting multiples of the long modifiers, maybe:
> 
>     (?{onescript,insensitive}:...)
> 
> Except that (?{ is taken.  So is (?< and IIRC also now (?[.   We've run
> out of opening/closing paired ASCII stuff.  (?(  is just not reasonable.

I think that of (?<, only (?<!, (?<=, and (?<ALPHA are taken. So, there
is some room left, for instance:

    (?<:onescript,insenstive,!comment,ignorespace>PAT)

> 
> > The non-ASCII characters, I just consider them to be typos ;-)
> 
> They might be, if I could remember how to typo them.
> 
> Be that as it may, we're still stuck with the not-enough-pairs problem.
> 
> C trigraphs were always a mistake to many people's minds, but I guess 
> we could perhaps digraph that into (?<<onescript,insensitive>>:...).
> 
> Of course, that already means something, which is trouble.

I do not think so. I get an error message when I try to use (?<<onescript>>).

> 
> No, those are not intended to be emotica.  I think. ;-{
> 


Abigail

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About