Changeset 21905 for src/perl6

Show
Ignore:
Timestamp:
08/16/08 06:48:21 (3 months ago)
Author:
lwall
Message:

[Cursor] buglet from incomplete transition on semantics

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/Cursor.pmc

    r21904 r21905  
    564564                        my @result; 
    565565                        while (not @result and $$trylen >= 0) { 
     566                            $self->deb("Trying at length $$trylen\n") if $DEBUG & DEBUG::fixed_length; 
    566567                            for my $px (0..@pats-1) { 
    567568                                next if vec($$tried,$px,1);     # already tried this one 
    568569                                my $l = $$rxlens[$px]; 
    569570                                if ($l == -1) { 
    570                                     my $p = '^' . $pats[$px]; 
     571                                    my $p = $pats[$px]; 
    571572                                    pos($$buf) = $P; 
    572                                     if (($$buf =~ m/$p/xgc)) { 
     573                                    if (($$buf =~ m/\G$p/gc)) { 
    573574                                        $$rxlens[$px] = $l = pos($$buf) - $P; 
    574575                                        if ($l == $$trylen) { 
     
    589590                                    } 
    590591                                    else { 
    591                                         my $p = '^' . $pats[$px]; 
     592                                        my $p = $pats[$px]; 
    592593                                        pos($$buf) = $P; 
    593                                         if ($$buf =~ m/$p/xgc) { 
     594                                        if ($$buf =~ m/\G$p/gc) { 
    594595                                            push @result, $fates->[$px]; 
    595596                                        }