Author: pmichaud
Date: Wed Aug 10 13:33:13 2005
New Revision: 8909

Modified:
   trunk/runtime/parrot/library/PGE/Glob.pir
Log:
Added backslash escapes for glob metacharacters (perl #36820).


Modified: trunk/runtime/parrot/library/PGE/Glob.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Glob.pir   (original)
+++ trunk/runtime/parrot/library/PGE/Glob.pir   Wed Aug 10 13:33:13 2005
@@ -112,11 +112,18 @@ Parse alternations of the form {a,b,c} w
   next_char:
     unless $I0 < $I1 goto lit_end
     c = substr pattern, $I0, 1
+    if c == "\\" goto backslash
     $I2 = index STOPCHARS, c
     if $I2 >= 0 goto lit_end
     inc $I0
     concat lit,c
     goto next_char
+  backslash:
+    inc $I0
+    c = substr pattern, $I0, 1
+    inc $I0
+    concat lit, c
+    goto next_char
   lit_end:
     lex['pos'] = $I0
     $P0 = find_global "PGE::Exp", "new"

Reply via email to