summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:07:00 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:07:00 +0000
commit8725079938ea1a29b3c5fc0c6bbda347bc3f7602 (patch)
tree31031e636a9fda1fcb603050ce6e06aa879f77a9 /x2p
parent79220ce3ebd9c9ac4a99caf508dadef88c26a4e6 (diff)
downloadperl-8725079938ea1a29b3c5fc0c6bbda347bc3f7602.tar.gz
perl 3.0 patch #20 patch #19, continued
See patch #19.
Diffstat (limited to 'x2p')
-rw-r--r--x2p/a2p.y9
-rw-r--r--x2p/a2py.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/x2p/a2p.y b/x2p/a2p.y
index 6a6604d501..13c68b8625 100644
--- a/x2p/a2p.y
+++ b/x2p/a2p.y
@@ -1,5 +1,5 @@
%{
-/* $Header: a2p.y,v 3.0.1.1 90/03/01 10:30:08 lwall Locked $
+/* $Header: a2p.y,v 3.0.1.2 90/08/09 05:47:26 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
@@ -7,6 +7,9 @@
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: a2p.y,v $
+ * Revision 3.0.1.2 90/08/09 05:47:26 lwall
+ * patch19: a2p didn't handle {foo = (bar == 123)}
+ *
* Revision 3.0.1.1 90/03/01 10:30:08 lwall
* patch9: a2p didn't allow logical expressions everywhere it should
*
@@ -137,7 +140,7 @@ expr : term
{ $$ = $1; }
| expr term
{ $$ = oper2(OCONCAT,$1,$2); }
- | variable ASGNOP expr
+ | variable ASGNOP cond
{ $$ = oper3(OASSIGN,$2,$1,$3);
if ((ops[$1].ival & 255) == OFLD)
lval_field = TRUE;
@@ -167,7 +170,7 @@ term : variable
| term IN VAR
{ $$ = oper2(ODEFINED,aryrefarg($3),$1); }
| term '?' term ':' term
- { $$ = oper2(OCOND,$1,$3,$5); }
+ { $$ = oper3(OCOND,$1,$3,$5); }
| variable INCR
{ $$ = oper1(OPOSTINCR,$1); }
| variable DECR
diff --git a/x2p/a2py.c b/x2p/a2py.c
index e17c542a4a..d53fb16216 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -1,4 +1,4 @@
-/* $Header: a2py.c,v 3.0 89/10/18 15:34:35 lwall Locked $
+/* $Header: a2py.c,v 3.0.1.1 90/08/09 05:48:53 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: a2py.c,v $
+ * Revision 3.0.1.1 90/08/09 05:48:53 lwall
+ * patch19: a2p didn't emit a chop when NF was referenced though split needs it
+ *
* Revision 3.0 89/10/18 15:34:35 lwall
* 3.0 baseline
*
@@ -578,7 +581,7 @@ yylex()
case 'n': case 'N':
SNARFWORD;
if (strEQ(d,"NF"))
- do_split = split_to_array = set_array_base = TRUE;
+ do_chop = do_split = split_to_array = set_array_base = TRUE;
if (strEQ(d,"next")) {
saw_line_op = TRUE;
XTERM(NEXT);