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

Commit

Permalink
Convert to use symbols instead of magic numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 13, 2009
1 parent 348b39f commit 45fcb57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/Makefile.in
Expand Up @@ -53,6 +53,7 @@ P6REGEX_SOURCES = \
src/parrot/p6regex-grammar.pir \
src/PAST/Regex.pir \
src/PAST/Compiler-Regex.pir \
src/Regex/constants.pir \
src/Regex/Cursor.pir \
src/Regex/Cursor-builtins.pir \
src/Regex/Match.pir \
Expand Down
5 changes: 3 additions & 2 deletions src/PAST/Compiler-Regex.pir
Expand Up @@ -24,6 +24,7 @@ Return the POST representation of the regex AST rooted by C<node>.
=cut

.include 'cclass.pasm'
.include 'src/Regex/constants.pir'

.namespace ['PAST';'Compiler']

Expand Down Expand Up @@ -120,8 +121,8 @@ Return the POST representation of the regex AST rooted by C<node>.
ops.'push'($P0)
ops.'push'(faillabel)
self.'!cursorop'(ops, '!mark_fail', 4, rep, pos, '$I10', '$P10', 0)
ops.'push_pirop'('lt', pos, -1, donelabel)
ops.'push_pirop'('eq', pos, -1, faillabel)
ops.'push_pirop'('lt', pos, CURSOR_FAIL, donelabel)
ops.'push_pirop'('eq', pos, CURSOR_FAIL, faillabel)
ops.'push_pirop'('jump', '$I10')
ops.'push'(donelabel)
self.'!cursorop'(ops, '!cursor_fail', 0)
Expand Down

0 comments on commit 45fcb57

Please sign in to comment.