X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fa2p.y;h=2d3f23923e540227af7485b500ef67b6ef61b28a;hb=1b979e0af6d73985fab5b12b2e2d182e270d6642;hp=961e2f280f089292de37c612cdb7460f03ec9da8;hpb=a0d0e21ea6ea90a22318550944fe6cb09ae10cda;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/a2p.y b/x2p/a2p.y index 961e2f2..2d3f239 100644 --- a/x2p/a2p.y +++ b/x2p/a2p.y @@ -1,7 +1,7 @@ %{ /* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $ * - * Copyright (c) 1991, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -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 @@ -393,4 +393,7 @@ compound ; %% + +int yyparse _((void)); + #include "a2py.c"