diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-12 04:13:22 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-03-12 04:13:22 +0000 |
commit | 79a0689e17f959bdb246dc37bbbbfeba4c2b3b56 (patch) | |
tree | 9d9d5ae4fd6a3bc9c009a7aebe90073c900a27a7 /perl.y | |
parent | ff2452de34aca0717369277df00e15764613e5c1 (diff) | |
download | perl-79a0689e17f959bdb246dc37bbbbfeba4c2b3b56.tar.gz |
perl 3.0 patch #14 patch #13, continued
See patch #13.
Diffstat (limited to 'perl.y')
-rw-r--r-- | perl.y | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Header: perl.y,v 3.0.1.4 90/02/28 18:03:23 lwall Locked $ +/* $Header: perl.y,v 3.0.1.5 90/03/12 16:55:56 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,10 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: perl.y,v $ + * Revision 3.0.1.5 90/03/12 16:55:56 lwall + * patch13: added list slice operator (LIST)[LIST] + * patch13: (LIST,) now legal + * * Revision 3.0.1.4 90/02/28 18:03:23 lwall * patch9: line numbers were bogus during certain portions of foreach evaluation * @@ -444,6 +448,8 @@ term : '-' term %prec UMINUS { $$ = l(localize(make_op(O_ASSIGN, 1, localize(listish(make_list($3))), Nullarg,Nullarg))); } + | '(' expr ',' ')' + { $$ = make_list(hide_ary($2)); } | '(' expr ')' { $$ = make_list(hide_ary($2)); } | '(' ')' @@ -474,6 +480,11 @@ term : '-' term %prec UMINUS stab2arg(A_STAB,hadd($1)), jmaybe($3), Nullarg); } + | '(' expr ')' '[' expr ']' %prec '(' + { $$ = make_op(O_LSLICE, 3, + Nullarg, + listish(make_list($5)), + listish(make_list($2))); } | ARY '[' expr ']' %prec '(' { $$ = make_op(O_ASLICE, 2, stab2arg(A_STAB,aadd($1)), |