in reply to Re: Re: Flattening REs into opcodes for Perl 6
in thread Flattening REs into opcodes for Perl 6
I should point out that I haven't optimized find_o out for readability purposes, and that in "real life", this would look like:start: exactf "f", find_o advance quit goto start find_o: # non-greedy, by the way goto find_bar find_o_real: exactf "o", find_o goto start find_bar: exactf "bar", done goto find_o_real done: end quit: fail
This feels like drawing a DFA... honestly. I'm not sure where save and restore are going to come into play in this particular example -- it seems not at all.start: exactf "f", find_bar advance quit goto start find_o_real: exactf "o", find_bar goto start find_bar: exactf "bar", done goto find_o_real done: end quit: fail
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Flattening REs into opcodes for Perl 6
by BrentDax (Hermit) on Nov 03, 2001 at 09:41 UTC | |
by japhy (Canon) on Nov 03, 2001 at 09:49 UTC | |
by BrentDax (Hermit) on Nov 07, 2001 at 11:11 UTC | |
by japhy (Canon) on Nov 07, 2001 at 18:52 UTC |