[svn:parrot] r37869 - trunk/compilers/pge/PGE
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Thu Apr 2 05:35:27 UTC 2009
Author: pmichaud
Date: Thu Apr 2 05:35:24 2009
New Revision: 37869
URL: https://trac.parrot.org/parrot/changeset/37869
Log:
[pge]: Allow \x, \c, and \o in enumerated character classes (incl ranges)
Modified:
trunk/compilers/pge/PGE/Perl6Regex.pir
Modified: trunk/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/Perl6Regex.pir Thu Apr 2 04:29:05 2009 (r37868)
+++ trunk/compilers/pge/PGE/Perl6Regex.pir Thu Apr 2 05:35:24 2009 (r37869)
@@ -984,11 +984,20 @@
## get escaped character
$S0 = substr target, pos, 1
## handle metas such as \n, \t, \r, etc.
- $I0 = index 'nrtfae0', $S0
+ $I0 = index 'nrtfae0xco', $S0
if $I0 == -1 goto enum_addchar
+ if $I0 >= 7 goto enum_xco
$S0 = substr "\n\r\t\f\a\e\0", $I0, 1
+ goto enum_addchar
+ enum_xco:
+ $I0 = pos - 1
+ $P0 = 'p6escapes'(mob, 'pos'=>$I0)
+ $S0 = $P0.'ast'()
+ pos = $P0.'to'()
+ goto enum_addchar_1
enum_addchar:
inc pos
+ enum_addchar_1:
if isrange goto enum_addrange
charlist .= $S0
goto enum_loop
More information about the parrot-commits
mailing list