> There's also the cut operator which I didn't see mentioned in the RFC.
> It blocks backtracking so that something like this:
>
> B1 andthen B2 andthen cut B3 andthen B4 andthen B5
> wouldn't backtrack to B2 once it forwardtracked to B3.

]- I tried minimalistic approach as small as possible additions to the Perl
language, we get only the "backtrack" mechanism i.e. something that is
harder or slower to be done outside of the perl core.
The rest should be done outside ..... (I too want all in the core)
Example :

my $cutState = 0;
{
  { block1 } andthen { block2 } andthen { block3 } andthen


         if ($cutState) { last AFTER}
              else { $cutState = 1}; 1;
     }
    andthen { block4 } andthen { block5 };
}
AFTER:
 .... code ....

not sure will this also do the job :
.... { $cutState = $cutState ? last AFTER : 1 } .....

So the CUT is candidate for module. Offcourse I preffer all syntax to be
embeeded, cut,fail ... but if I tried in this way there is smaller chance
this to get in the core ..
Think, it is only around 10 lines of code to be added in perly.y i.e. 10
lines C code in Perl-core.
Mainwhile CUT is small too :")

> Okay, the more I think about it, the more I think it should be a
> module.
]- How this can be done as module ?....
=====
iVAN
[EMAIL PROTECTED]
=====

Reply via email to