in reply to The "anchor" misnomer in regexes
FWIW, I agree with you that "anchor" is a misnomer. It gives the impression that when you say /foo$/ that the $ is a fixed location that the RE engine revolves around (which, as you say, is only the case under certain optimizations).
Ideally, in Perl 6, we'll have real anchors ...
I'm not quite sure what you mean, but it sounds like you think we'll have a way to tell the rules engine something like "jump to this point in the input stream and work sideways" or something. I don't think that "anchors" will be any different in perl6 than they are in perl5 except that we'll probably have more of them by default and they'll all be called "zero-width assertions" as is appropriate. It could just be my lack of imagination, but I don't foresee the rules engine having a way to easily switch its directionality for instance; it will still be primarily left-to-right.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The "anchor" misnomer in regexes
by TimToady (Parson) on Dec 16, 2005 at 18:11 UTC | |
by tilly (Archbishop) on Dec 17, 2005 at 01:55 UTC | |
by duff (Parson) on Dec 17, 2005 at 03:15 UTC |