summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-06-26 22:55:26 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-28 21:09:48 +0000
commitb85d18e97b6ae9e0cc168f99b999fd3fd33104bd (patch)
treefba77924a69fae7095030b314eb5e20f98b74006 /regcomp.c
parentb174585de5ccc9973ba572393b2b34e1a6a5b749 (diff)
downloadperl-b85d18e97b6ae9e0cc168f99b999fd3fd33104bd.tar.gz
applied patch, tweaked doc, and regen regnodes.h
Message-Id: <199806270655.CAA29144@monk.mps.ohio-state.edu> Subject: [PATCH 5.004_68] \z in RE p4raw-id: //depot/perl@1250
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 2b71d99a40..5475d7897f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1539,6 +1539,12 @@ tryagain:
*flagp |= SIMPLE;
nextchar();
break;
+ case 'z':
+ ret = reg_node(EOS);
+ *flagp |= SIMPLE;
+ seen_zerolen++; /* Do not optimize RE away */
+ nextchar();
+ break;
case 'w':
ret = reg_node((regflags & PMf_LOCALE) ? ALNUML : ALNUM);
*flagp |= HASWIDTH|SIMPLE;
@@ -1665,6 +1671,7 @@ tryagain:
case 'A':
case 'G':
case 'Z':
+ case 'z':
case 'w':
case 'W':
case 'b':
@@ -2329,6 +2336,9 @@ regprop(SV *sv, regnode *o)
case EOL:
p = "EOL";
break;
+ case EOS:
+ p = "EOS";
+ break;
case MEOL:
p = "MEOL";
break;