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 1Q8ReV-0004sJ-RT for garchives@archives.gentoo.org; Sat, 09 Apr 2011 06:28:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FEC51C033; Sat, 9 Apr 2011 06:27:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4475C1C02A for ; Sat, 9 Apr 2011 06:27:38 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C8DA11B4051 for ; Sat, 9 Apr 2011 06:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0563F8006E for ; Sat, 9 Apr 2011 06:27:37 +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: <77260f935ead93c3ca7ca618841e87cffb321037.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: bashast/, bashast/gunit/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g bashast/gunit/arith_main.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 77260f935ead93c3ca7ca618841e87cffb321037 Date: Sat, 9 Apr 2011 06:27:37 +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: X-Archives-Hash: 0b7d13b02e203212426f9d47aa0cf785 commit: 77260f935ead93c3ca7ca618841e87cffb321037 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Fri Apr 8 19:10:52 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sat Apr 9 06:13:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D77260f93 Remove warning from arithmetic_part There's no need to list both alternatives as the first choice falls through to the second any way. --- bashast/bashast.g | 3 +-- bashast/gunit/arith_main.gunit | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index ec04917..64568c9 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -441,8 +441,7 @@ extended_pattern_match arithmetic_expansion : DOLLAR LLPAREN BLANK* arithmetic_part BLANK* RRPAREN -> ^(ARITHMETIC_= EXPRESSION arithmetic_part); arithmetic_part - : arithmetics - | arithmetic; + : arithmetics; //The comma operator for arithmetic expansions arithmetics : arithmetic (BLANK!* COMMA! BLANK!* arithmetic)*; diff --git a/bashast/gunit/arith_main.gunit b/bashast/gunit/arith_main.gu= nit index 9010822..5a29849 100644 --- a/bashast/gunit/arith_main.gunit +++ b/bashast/gunit/arith_main.gunit @@ -117,8 +117,8 @@ arithmetic_condition: "5?7:2"->(ARITHMETIC_CONDITION 5 7 2) "(4-3)?0:1"->(ARITHMETIC_CONDITION (- 4 3) 0 1) =20 -arithmetics: -"5+4, 3+2, $a*$b" -> (+ 5 4) (+ 3 2) (* (VAR_REF a) (VAR_REF b)) +arithmetic_expansion: +"$((5+4, 3+2, $a*$b))" -> (ARITHMETIC_EXPRESSION (+ 5 4) (+ 3 2) (* (VAR= _REF a) (VAR_REF b))) =20 start: "echo $(( 3 + 2 ))" -> (LIST (COMMAND (STRING echo) (STRING (ARITHMETIC_= EXPRESSION (+ 3 2)))))