perl 5.003_01: lib/Carp.pm
[p5sagit/p5-mst-13.2.git] / x2p / a2p.y
index 6136edf..961e2f2 100644 (file)
--- a/x2p/a2p.y
+++ b/x2p/a2p.y
@@ -1,5 +1,5 @@
 %{
-/* $RCSfile: a2p.y,v $$Revision: 4.0.1.2 $$Date: 92/06/08 16:13:03 $
+/* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $
  *
  *    Copyright (c) 1991, Larry Wall
  *
@@ -7,15 +7,6 @@
  *    License or the Artistic License, as specified in the README file.
  *
  * $Log:       a2p.y,v $
- * Revision 4.0.1.2  92/06/08  16:13:03  lwall
- * patch20: in a2p, getline should allow variable to be array element
- * 
- * Revision 4.0.1.1  91/06/07  12:12:41  lwall
- * patch4: new copyright notice
- * 
- * Revision 4.0  91/03/20  01:57:21  lwall
- * 4.0 baseline.
- * 
  */
 
 #include "INTERN.h"
@@ -103,6 +94,8 @@ cond : expr
        | match
        | rel
        | compound_cond
+       | cond '?' expr ':' expr
+               { $$ = oper3(OCOND,$1,$3,$5); }
        ;
 
 compound_cond
@@ -169,7 +162,7 @@ term        : variable
                { $$ = oper2(OPOW,$1,$3); }
        | term IN VAR
                { $$ = oper2(ODEFINED,aryrefarg($3),$1); }
-       | term '?' term ':' term
+       | cond '?' expr ':' expr
                { $$ = oper3(OCOND,$1,$3,$5); }
        | variable INCR
                { $$ = oper1(OPOSTINCR,$1); }
@@ -368,7 +361,7 @@ simple
                { $$ = oper0(ORETURN); }
        | RET expr
                { $$ = oper1(ORETURN,$2); }
-       | DELETE VAR '[' expr ']'
+       | DELETE VAR '[' expr_list ']'
                { $$ = oper2(ODELETE,aryrefarg($2),$4); }
        ;