Skip to content

Commit 93744c1

Browse files
committed
Revert "add backtracking support to subrule (captures included). Tested, barely. :)"
This reverts commit 035ecba.
1 parent 035ecba commit 93744c1

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/QAST/Compiler.nqp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ class QAST::Compiler is HLL::Compiler {
396396
my $ops := self.post_new('Ops', :result(%*REG<cur>));
397397
my $name := $*PASTCOMPILER.as_post($node.name, :rtype<*>);
398398
my $subtype := $node.subtype;
399-
my $backtrack := $node.backtrack;
400399
my $cpn := self.post_children($node[0]);
401400
my @pargs := $cpn[1] // [];
402401
my @nargs := $cpn[2] // [];
@@ -410,21 +409,6 @@ class QAST::Compiler is HLL::Compiler {
410409
$ops.push_pirop('callmethod', '"!cursor_capture"', %*REG<cur>,
411410
'$P11', $name, :result(%*REG<cstack>))
412411
if $subtype eq 'capture';
413-
if $subtype ne 'zerowidth' && $backtrack ne 'r' {
414-
my $prefix := self.unique('rxsubrule');
415-
my $passlabel := self.post_new('Label', :result($prefix ~ '_pass'));
416-
my $backlabel := self.post_new('Label', :result($prefix ~ '_back'));
417-
$ops.push_pirop('goto', $passlabel);
418-
$ops.push($backlabel);
419-
$ops.push_pirop('callmethod', '"!cursor_next"', '$P11', :result('$P11'));
420-
$ops.push_pirop('repr_get_attr_int', '$I11', '$P11', %*REG<curclass>, '"$!pos"');
421-
$ops.push_pirop($testop, '$I11', '0', %*REG<fail>);
422-
$ops.push_pirop('callmethod', '"!cursor_capture"', %*REG<cur>,
423-
'$P11', $name, :result(%*REG<cstack>))
424-
if $subtype eq 'capture';
425-
$ops.push($passlabel);
426-
self.regex_mark($ops, $backlabel, %*REG<pos>, 0);
427-
}
428412
$ops.push_pirop('repr_get_attr_int', %*REG<pos>, '$P11', %*REG<curclass>, '"$!pos"')
429413
unless $subtype eq 'zerowidth';
430414
$ops;

0 commit comments

Comments
 (0)