summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-10 16:20:57 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-10 16:20:57 +0000
commitae98613044a1084886d80b8283b25bad38cfd171 (patch)
tree7dfe17f2ae5835a17db41a0bb4d7ef903d6ff3d9 /x2p
parentbf38876a182e0df9dd73362f56cf0ab8b43aa789 (diff)
downloadperl-ae98613044a1084886d80b8283b25bad38cfd171.tar.gz
perl 3.0 patch #4 Patch #2 continued
Diffstat (limited to 'x2p')
-rw-r--r--x2p/s2p.SH13
-rw-r--r--x2p/walk.c7
2 files changed, 12 insertions, 8 deletions
diff --git a/x2p/s2p.SH b/x2p/s2p.SH
index 35ee9e2870..e428d41910 100644
--- a/x2p/s2p.SH
+++ b/x2p/s2p.SH
@@ -28,9 +28,13 @@ $spitshell >s2p <<!GROK!THIS!
: In the following dollars and backticks do not need the extra backslash.
$spitshell >>s2p <<'!NO!SUBS!'
-# $Header: s2p.SH,v 3.0 89/10/18 15:35:02 lwall Locked $
+# $Header: s2p.SH,v 3.0.1.1 89/11/11 05:08:25 lwall Locked $
#
# $Log: s2p.SH,v $
+# Revision 3.0.1.1 89/11/11 05:08:25 lwall
+# patch2: in s2p, + within patterns needed backslashing
+# patch2: s2p was printing out some debugging info to the output file
+#
# Revision 3.0 89/10/18 15:35:02 lwall
# 3.0 baseline
#
@@ -418,7 +422,7 @@ ${space}next line;";
elsif ($c eq ']') {
$inbracket = 0;
}
- elsif (!$repl && index("()",$c) >= 0) {
+ elsif (!$repl && index("()+",$c) >= 0) {
$_ = substr($_,0,$i) . '\\' . substr($_,$i,10000);
$i++;
$len++;
@@ -583,10 +587,9 @@ sub fetchpat {
local($inbracket);
local($prefix,$delim,$ch);
- delim: while (s:^([^\](|)[\\/]*)([](|)[\\/])::) {
+ delim: while (s:^([^\]+(|)[\\/]*)([]+(|)[\\/])::) {
$prefix = $1;
$delim = $2;
- print "$prefix\t$delim\t$_\n";
if ($delim eq '\\') {
s/(.)//;
$ch = $1;
@@ -597,13 +600,11 @@ sub fetchpat {
$inbracket = 1;
s/^\^// && ($delim .= '^');
s/^]// && ($delim .= ']');
- print "$prefix\t$delim\t$_\n";
}
elsif ($delim eq ']') {
$inbracket = 0;
}
elsif ($inbracket || $delim ne $outer) {
- print "Adding\n";
$delim = '\\' . $delim;
}
$addr .= $prefix;
diff --git a/x2p/walk.c b/x2p/walk.c
index 959527de3a..d0ea34112c 100644
--- a/x2p/walk.c
+++ b/x2p/walk.c
@@ -1,4 +1,4 @@
-/* $Header: walk.c,v 3.0 89/10/18 15:35:48 lwall Locked $
+/* $Header: walk.c,v 3.0.1.1 89/11/11 05:09:33 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
@@ -6,6 +6,9 @@
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: walk.c,v $
+ * Revision 3.0.1.1 89/11/11 05:09:33 lwall
+ * patch2: in a2p, awk script with no line actions still needs main loop
+ *
* Revision 3.0 89/10/18 15:35:48 lwall
* 3.0 baseline
*
@@ -139,7 +142,7 @@ int minprec; /* minimum precedence without parens */
str_cat(str,"continue {\n $FNRbase = $. if eof;\n}\n");
}
else
- str_cat(str,"# (no line actions)\n");
+ str_cat(str,"while (<>) { } # (no line actions)\n");
if (ops[node+4].ival) {
realexit = TRUE;
str_cat(str,"\n");