Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Update nqp-rx to recent parrot trunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek authored and moritz committed Apr 28, 2010
1 parent d893061 commit 695e31a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Regex/Cursor-protoregex-peek.pir
Expand Up @@ -82,7 +82,7 @@ Perform a match for protoregex C<name>.
cand_done:
token_next:
unless token > '' goto fail
chopn token, 1
token = chopn token, 1
goto token_loop

done:
Expand Down
2 changes: 1 addition & 1 deletion src/Regex/P6Regex/Actions.pm
Expand Up @@ -383,7 +383,7 @@ method assertion:sym<name>($/) {
$I0 = index $S0, ':sym<'
add $I0, 5
$S0 = substr $S0, $I0
chopn $S0, 1
$S0 = chopn $S0, 1
%r = box $S0
};
$past := PAST::Regex.new(
Expand Down
2 changes: 1 addition & 1 deletion src/cheats/hll-compiler.pir
Expand Up @@ -81,7 +81,7 @@
sigil = substr $S0, 0, 1
$I0 = index '$@%&', sigil
if $I0 < 0 goto sigil_done
substr $S0, 0, 1, ''
$S0 = replace $S0, 0, 1, ''
ns[0] = $S0
$S0 = ns[-1]
$S0 = concat sigil, $S0
Expand Down
2 changes: 1 addition & 1 deletion src/cheats/hll-grammar.pir
Expand Up @@ -337,7 +337,7 @@ position C<pos>.
.end


.sub 'quotemod_check' :method
.sub 'quotemod_check' :method :nsentry
.param string mod

$P0 = find_dynamic_lex '%*QUOTEMOD'
Expand Down
22 changes: 11 additions & 11 deletions t/p6regex/01-regex.t
Expand Up @@ -237,8 +237,8 @@ Description of the test.
# remove /'s
$S0 = substr result, 0, 1
if $S0 != "/" goto bad_line
substr result, 0, 1, ''
substr result, -1, 1, ''
replace result, result, 0, 1, ''
replace result, result, -1, 1, ''

$I0 = index $S1, result
if $I0 == -1 goto is_nok
Expand Down Expand Up @@ -280,8 +280,8 @@ Description of the test.
# remove /'s
$S0 = substr result, 0, 1
if $S0 != "/" goto bad_error
substr result, 0, 1, ''
substr result, -1, 1, ''
replace result, result, 0, 1, ''
replace result, result, -1, 1, ''
$I0 = index message, result
if $I0 == -1 goto bad_error
ok = 1
Expand Down Expand Up @@ -313,7 +313,7 @@ Description of the test.
# NOTE: there can be multiple tabs between entries, so skip until
# we have something.
# remove the trailing newline from record
chopn test_line, 1
chopn test_line, test_line, 1

$P1 = split "\t", test_line
$I0 = elements $P1 # length of array
Expand Down Expand Up @@ -442,27 +442,27 @@ bad_digit:
target1:
$I0 = index target, '\n'
if $I0 == -1 goto target2
substr target, $I0, 2, "\n"
replace target, target, $I0, 2, "\n"
goto target1
target2:
$I0 = index target, '\r'
if $I0 == -1 goto target3
substr target, $I0, 2, "\r"
replace target, target, $I0, 2, "\r"
goto target2
target3:
$I0 = index target, '\e'
if $I0 == -1 goto target4
substr target, $I0, 2, "\e"
replace target, target, $I0, 2, "\e"
goto target3
target4:
$I0 = index target, '\t'
if $I0 == -1 goto target5
substr target, $I0, 2, "\t"
replace target, target, $I0, 2, "\t"
goto target4
target5:
$I0 = index target, '\f'
if $I0 == -1 goto target6
substr target, $I0, 2, "\f"
replace target, target, $I0, 2, "\f"
goto target5
target6:
# handle \xHH, hex escape.
Expand All @@ -475,7 +475,7 @@ bad_digit:
($S0, $I2) = $P0(target, 'x', $I1)
$S3 = substr target, $I1, $I2
$I2 += 2
substr target, $I0, $I2, $S0
replace target, target, $I0, $I2, $S0
goto target6
target7:
.return (target)
Expand Down

0 comments on commit 695e31a

Please sign in to comment.