From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Sb6ow-0001HS-El for garchives@archives.gentoo.org; Sun, 03 Jun 2012 09:09:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 74014E07D0; Sun, 3 Jun 2012 09:08:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 45B59E07D0 for ; Sun, 3 Jun 2012 09:08:41 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A77161B400C for ; Sun, 3 Jun 2012 09:08:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7E8B4E5438 for ; Sun, 3 Jun 2012 09:08:38 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <1330502884.d418891be2a8428a4b1edc82a7b964b0c6b34d6e.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g scripts/binary_arithmetic.bash scripts/compound_command.bash X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: d418891be2a8428a4b1edc82a7b964b0c6b34d6e X-VCS-Branch: master Date: Sun, 3 Jun 2012 09:08:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4e5d27bc-7d55-45ca-86da-84ade3c90865 X-Archives-Hash: 635fca2dae09b31f4b25ca452270af48 commit: d418891be2a8428a4b1edc82a7b964b0c6b34d6e Author: Mu Qiao gentoo org> AuthorDate: Wed Feb 29 08:08:04 2012 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Wed Feb 29 08:08:04 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Dd418891b Parser: allow double quotes in arithmetic expression --- bashast/bashast.g | 2 +- scripts/binary_arithmetic.bash | 6 ++++++ scripts/compound_command.bash | 5 +++++ 3 files changed, 12 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index ded2fab..0be9b46 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -1005,7 +1005,7 @@ primary | arithmetic_expansion | LPAREN! (arithmetics) RPAREN!; pre_post_primary - : primary; + : DQUOTE!? primary DQUOTE!?; post_inc_dec : pre_post_primary ((BLANK) =3D> BLANK)? ( diff --git a/scripts/binary_arithmetic.bash b/scripts/binary_arithmetic.b= ash index c5f018c..db7dcb7 100644 --- a/scripts/binary_arithmetic.bash +++ b/scripts/binary_arithmetic.bash @@ -70,3 +70,9 @@ echo "$((0&&FOO059++))" echo "$(( 1 =3D=3D 2))" echo "$(( 1 =3D=3D 1))" echo $(($((1)))) +(( a=3D "1+ 1"*2)) +echo $a +FOO=3D"3 * 2" +echo $(( $FOO + 1 )) +FOO=3D"3, b =3D 2" +echo $(( $FOO + 1 )) diff --git a/scripts/compound_command.bash b/scripts/compound_command.bas= h index 0db8ff8..0d3321e 100644 --- a/scripts/compound_command.bash +++ b/scripts/compound_command.bash @@ -356,3 +356,8 @@ for((i=3D1,j=3D2;i!=3D2&&j!=3D4;++i)) do echo $i $j done +python_versions=3D(2.6 2.7 3.0 3.1) +for ((i =3D "${#python_versions[@]}"; i >=3D 0; i--)) +do + echo $i +done