summaryrefslogtreecommitdiff
path: root/x2p/a2p.y
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1996-11-18 18:22:52 +1200
committerChip Salzenberg <chip@atlantic.net>1996-11-19 14:16:00 +1200
commitc822f08a5087943f7d9e2c36ce42ea035f03ab97 (patch)
treea806f815a785c0e37ae503595e9738afe96c366c /x2p/a2p.y
parenta89d8a78dff47ec38c74499f0534e21e544ac9a1 (diff)
downloadperl-c822f08a5087943f7d9e2c36ce42ea035f03ab97.tar.gz
Fix a2p translation of '{print "a" "b" "c"}'
Diffstat (limited to 'x2p/a2p.y')
-rw-r--r--x2p/a2p.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/x2p/a2p.y b/x2p/a2p.y
index 961e2f280f..6dd340c1df 100644
--- a/x2p/a2p.y
+++ b/x2p/a2p.y
@@ -133,6 +133,8 @@ expr : term
{ $$ = $1; }
| expr term
{ $$ = oper2(OCONCAT,$1,$2); }
+ | expr '?' expr ':' expr
+ { $$ = oper3(OCOND,$1,$3,$5); }
| variable ASGNOP cond
{ $$ = oper3(OASSIGN,$2,$1,$3);
if ((ops[$1].ival & 255) == OFLD)
@@ -162,8 +164,6 @@ term : variable
{ $$ = oper2(OPOW,$1,$3); }
| term IN VAR
{ $$ = oper2(ODEFINED,aryrefarg($3),$1); }
- | cond '?' expr ':' expr
- { $$ = oper3(OCOND,$1,$3,$5); }
| variable INCR
{ $$ = oper1(OPOSTINCR,$1); }
| variable DECR