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

Commit

Permalink
Browse files Browse the repository at this point in the history
More replacing magic numbers with symbolic constants.
  • Loading branch information
pmichaud committed Oct 13, 2009
1 parent 1987a95 commit 105b3e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PAST/Compiler-Regex.pir
Expand Up @@ -706,7 +706,7 @@ second child of this node.
greedy_1:
if min == 0 goto greedy_2
unless needmark goto greedy_loop
self.'!cursorop'(ops, '!mark_push', 0, 0, -1, btreg)
self.'!cursorop'(ops, '!mark_push', 0, 0, CURSOR_FAIL, btreg)
goto greedy_loop
greedy_2:
self.'!cursorop'(ops, '!mark_push', 0, 0, pos, btreg)
Expand Down Expand Up @@ -850,7 +850,7 @@ Perform a subcapture (capture of a portion of a regex).
self.'!cursorop'(ops, '!cursor_start', 1, '$P10')
ops.'push_pirop'('callmethod', '"!cursor_pass"', '$P10', pos, '""')
ops.'push'(name)
self.'!cursorop'(ops, '!mark_push', 0, 0, -1, 0, '$P10')
self.'!cursorop'(ops, '!mark_push', 0, 0, CURSOR_FAIL, 0, '$P10')
ops.'push_pirop'('callmethod', '"!cursor_names"', '$P10', name)
ops.'push_pirop'('goto', donelabel)
ops.'push'(caplabel)
Expand Down Expand Up @@ -897,7 +897,7 @@ Perform a subrule call.
ops.'push_pirop'(testop, '$P10', fail)
if subtype == 'zerowidth' goto done
ops.'push_pirop'('callmethod', '"pos"', '$P10', 'result'=>pos)
self.'!cursorop'(ops, '!mark_push', 0, 0, -1, 0, '$P10')
self.'!cursorop'(ops, '!mark_push', 0, 0, CURSOR_FAIL, 0, '$P10')
if subtype == 'method' goto done
ops.'push'(name)
ops.'push_pirop'('callmethod', '"!cursor_names"', '$P10', name)
Expand Down

0 comments on commit 105b3e0

Please sign in to comment.