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
Giving up on cursor NQP port for now - EYAKSHAVETOOBIG. Plan B: just …
…use 6model from PIR. This ground work gives each sub a subid for more easily referencing it.
  • Loading branch information
jnthn committed Jan 22, 2011
1 parent daf5b1e commit ec5a9e6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
38 changes: 19 additions & 19 deletions src/Regex/Cursor-builtins.pir
Expand Up @@ -11,7 +11,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects

.namespace ['Regex';'Cursor']

.sub 'before' :method
.sub 'before' :method :subid('Regex_Cursor_meth_before')
.param pmc regex :optional
.local pmc cur
.local int pos
Expand All @@ -25,7 +25,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.end


.sub 'ident' :method
.sub 'ident' :method :subid('Regex_Cursor_meth_ident')
.local pmc cur
.local int pos, eos
.local string tgt
Expand All @@ -42,7 +42,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.return (cur)
.end

.sub 'wb' :method
.sub 'wb' :method :subid('Regex_Cursor_meth_wb')
.local pmc cur
.local int pos, eos
.local string tgt
Expand All @@ -60,7 +60,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.return (cur)
.end

.sub 'ww' :method
.sub 'ww' :method :subid('Regex_Cursor_meth_ww')
.local pmc cur
.local int pos, eos
.local string tgt
Expand Down Expand Up @@ -90,7 +90,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.return (cur)
.end

.sub 'ws' :method
.sub 'ws' :method :subid('Regex_Cursor_meth_ws')
.local pmc cur
.local int pos, eos
.local string tgt
Expand Down Expand Up @@ -139,7 +139,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.return (cur)
.end

.sub 'alpha' :method
.sub 'alpha' :method :subid('Regex_Cursor_meth_alpha')
.local pmc cur
.local int pos
.local string tgt
Expand Down Expand Up @@ -170,51 +170,51 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
.return (cur)
.end

.sub 'upper' :method
.sub 'upper' :method :subid('Regex_Cursor_meth_upper')
.tailcall '!cclass'(self, 'upper', .CCLASS_UPPERCASE)
.end

.sub 'lower' :method
.sub 'lower' :method :subid('Regex_Cursor_meth_lower')
.tailcall '!cclass'(self, 'lower', .CCLASS_LOWERCASE)
.end

.sub 'digit' :method
.sub 'digit' :method :subid('Regex_Cursor_meth_digit')
.tailcall '!cclass'(self, 'digit', .CCLASS_NUMERIC)
.end

.sub 'xdigit' :method
.sub 'xdigit' :method :subid('Regex_Cursor_meth_xdigit')
.tailcall '!cclass'(self, 'xdigit', .CCLASS_HEXADECIMAL)
.end

.sub 'print' :method
.sub 'print' :method :subid('Regex_Cursor_meth_print')
.tailcall '!cclass'(self, 'print', .CCLASS_PRINTING)
.end

.sub 'graph' :method
.sub 'graph' :method :subid('Regex_Cursor_meth_graph')
.tailcall '!cclass'(self, 'graph', .CCLASS_GRAPHICAL)
.end

.sub 'cntrl' :method
.sub 'cntrl' :method :subid('Regex_Cursor_meth_cntrl')
.tailcall '!cclass'(self, 'cntrl', .CCLASS_CONTROL)
.end

.sub 'punct' :method
.sub 'punct' :method :subid('Regex_Cursor_meth_punct')
.tailcall '!cclass'(self, 'punct', .CCLASS_PUNCTUATION)
.end

.sub 'alnum' :method
.sub 'alnum' :method :subid('Regex_Cursor_meth_alnum')
.tailcall '!cclass'(self, 'alnum', .CCLASS_ALPHANUMERIC)
.end

.sub 'space' :method
.sub 'space' :method :subid('Regex_Cursor_meth_space')
.tailcall '!cclass'(self, 'space', .CCLASS_WHITESPACE)
.end

.sub 'blank' :method
.sub 'blank' :method :subid('Regex_Cursor_meth_blank')
.tailcall '!cclass'(self, 'blank', .CCLASS_BLANK)
.end

.sub 'FAILGOAL' :method
.sub 'FAILGOAL' :method :subid('Regex_Cursor_meth_FAILGOAL')
.param string goal
.local string dba
$P0 = getinterp
Expand All @@ -237,7 +237,7 @@ Regex::Cursor-builtins - builtin regexes for Cursor objects
die message
.end

.sub 'DEBUG' :method
.sub 'DEBUG' :method :subid('Regex_Cursor_meth_DEBUG')
.param pmc arg :optional
.param int has_arg :opt_flag

Expand Down
14 changes: 7 additions & 7 deletions src/Regex/Cursor-protoregex-peek.pir
Expand Up @@ -14,7 +14,7 @@ Perform a match for protoregex C<name>.

=cut

.sub '!protoregex' :method
.sub '!protoregex' :method :subid('Regex_Cursor_meth_!protoregex')
.param string name

.local pmc debug
Expand Down Expand Up @@ -126,7 +126,7 @@ added).

=cut

.sub '!protoregex_generation' :method
.sub '!protoregex_generation' :method :subid('Regex_Cursor_meth_!protoregex_generation')
$P0 = get_global '$!generation'
# don't change this to 'inc' -- we want to ensure new PMC
$P1 = add $P0, 1
Expand All @@ -142,7 +142,7 @@ create a new one and return it.
=cut
.sub '!protoregex_tokrx' :method
.sub '!protoregex_tokrx' :method :subid('Regex_Cursor_meth_!protoregex_tokrx')
.param string name
.local pmc generation
Expand Down Expand Up @@ -327,7 +327,7 @@ recreating it on future calls.

=cut

.sub '!protoregex_gen_table' :method
.sub '!protoregex_gen_table' :method :subid('Regex_Cursor_meth_!protoregex_gen_table')
.param pmc parrotclass

.local pmc prototable
Expand Down Expand Up @@ -363,7 +363,7 @@ tokrx hash.

=cut

.sub '!PREFIX__!protoregex' :method
.sub '!PREFIX__!protoregex' :method :subid('Regex_Cursor_meth_!PREFIX__!protoregex')
.param string name

.local pmc tokrx
Expand All @@ -386,7 +386,7 @@ tokrx hash.
.end


.sub '!PREFIX__!subrule' :method
.sub '!PREFIX__!subrule' :method :subid('Regex_Cursor_meth_!PREFIX__!subrule')
.param string name
.param string prefix

Expand Down Expand Up @@ -439,7 +439,7 @@ tokrx hash.
.end


.sub 'DUMP_TOKRX' :method
.sub 'DUMP_TOKRX' :method :subid('Regex_Cursor_meth_DUMP_TOKRX')
.param string name

.local pmc tokrx
Expand Down

0 comments on commit ec5a9e6

Please sign in to comment.