[svn:parrot] r40072 - trunk/compilers/pge/PGE
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Tue Jul 14 00:24:03 UTC 2009
Author: pmichaud
Date: Tue Jul 14 00:24:03 2009
New Revision: 40072
URL: https://trac.parrot.org/parrot/changeset/40072
Log:
[pge]: Remove some deprecated subrules and methods (TT #460)
Modified:
trunk/compilers/pge/PGE/Match.pir
trunk/compilers/pge/PGE/Regex.pir
Modified: trunk/compilers/pge/PGE/Match.pir
==============================================================================
--- trunk/compilers/pge/PGE/Match.pir Tue Jul 14 00:23:00 2009 (r40071)
+++ trunk/compilers/pge/PGE/Match.pir Tue Jul 14 00:24:03 2009 (r40072)
@@ -235,10 +235,6 @@
.return ('')
.end
-.sub 'text' :method
- .tailcall self.'Str'()
-.end
-
=item C<orig()>
@@ -252,23 +248,6 @@
.end
-=item C<item()>
-
-Returns the scalar value of this match -- the "result object"
-if there is one, otherwise the substring matched by this match
-object.
-
-=cut
-
-.sub 'item' :method
- .tailcall self.'ast'()
-.end
-
-.sub 'result_object' :method
- .param pmc obj
- .tailcall self.'!make'(obj)
-.end
-
=item C<!make(pmc obj)>
Sets the "ast object" for the Match invocant.
Modified: trunk/compilers/pge/PGE/Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/Regex.pir Tue Jul 14 00:23:00 2009 (r40071)
+++ trunk/compilers/pge/PGE/Regex.pir Tue Jul 14 00:24:03 2009 (r40072)
@@ -59,33 +59,6 @@
.end
-=item C<null()>
-
-Match a null string (always returns true on first match).
-
-=cut
-
-.sub "null" :method
- .local pmc mob
- .local int pos
- $P0 = get_hll_global ['PGE'], 'Match'
- (mob, pos) = $P0.'new'(self)
- mob.'to'(pos)
- .return (mob)
-.end
-
-=item C<fail()>
-
-Force a backtrack. (Taken from A05.)
-
-=cut
-
-.sub "fail" :method
- $P0 = get_hll_global ['PGE'], 'Match'
- .tailcall $P0.'new'(self)
-.end
-
-
=item C<alpha()>
Match a single alphabetic character.
@@ -226,45 +199,6 @@
.tailcall '!cclass'(self, .CCLASS_ALPHANUMERIC)
.end
-=item C<sp()>
-
-Match a single space character. (Taken from E05.)
-
-=cut
-
-.sub "sp" :method
- .tailcall '!literal'(self, ' ')
-.end
-
-=item C<lt()>
-
-Match a single left angle bracket. (Taken from E05.)
-
-=cut
-
-.sub "lt" :method
- .tailcall '!literal'(self, '<')
-.end
-
-=item C<gt()>
-
-Match a single right angle bracket. (Taken from E05.)
-
-=cut
-
-.sub "gt" :method
- .tailcall '!literal'(self, '>')
-.end
-
-=item C<dot()>
-
-Match a single dot ('.'). (Taken from E05.)
-
-=cut
-
-.sub "dot" :method
- .tailcall '!literal'(self, '.')
-.end
=item C<ws()>
@@ -373,7 +307,7 @@
.local pmc mob, cache, rule
if has_pattern goto lookahead
- mob = 'fail'(self)
+ mob = '!fail'(self)
.return (mob)
lookahead:
cache = get_global '%!cache'
@@ -422,7 +356,7 @@
mob = self
if has_pattern goto lookbehind
- mob = fail(mob)
+ mob = '!fail'(mob)
.return (mob)
lookbehind:
pattern = concat '[', pattern
@@ -483,13 +417,27 @@
=over 4
+
+=item C<!fail>
+
+Force a backtrack. (Taken from A05.)
+
+=cut
+
+.sub "!fail" :anon
+ .param pmc mob
+ $P0 = get_hll_global ['PGE'], 'Match'
+ .tailcall $P0.'new'(mob)
+.end
+
+
=item C<!cclass(mob, cclass)>
Match according to character class C<cclass>.
=cut
-.sub '!cclass'
+.sub '!cclass' :anon
.param pmc mob
.param int cclass
@@ -510,7 +458,7 @@
=cut
-.sub '!literal'
+.sub '!literal' :anon
.param pmc mob
.param string literal
.local string target
More information about the parrot-commits
mailing list