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 1QUaPJ-0003YC-30 for garchives@archives.gentoo.org; Thu, 09 Jun 2011 08:16:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C7E61C0A3; Thu, 9 Jun 2011 08:15:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CB23E1C0A3 for ; Thu, 9 Jun 2011 08:15:48 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3CC741B4024 for ; Thu, 9 Jun 2011 08:15:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2DE5680040 for ; Thu, 9 Jun 2011 08:15:46 +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: <9bf638ee90ebcfced60a9588228df11cc26813ad.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: 9bf638ee90ebcfced60a9588228df11cc26813ad Date: Thu, 9 Jun 2011 08:15:46 +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: a3fe8a4f5aaaa936538b64916a9baace commit: 9bf638ee90ebcfced60a9588228df11cc26813ad Author: Mu Qiao gentoo org> AuthorDate: Sat Jun 4 10:14:13 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Thu Jun 9 08:38:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D9bf638ee Parser: support !=3D in arithmetic expansion --- bashast/bashast.g | 8 +++++++- bashast/gunit/arith_main.gunit | 1 + 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index f4e43ce..bea3740 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -521,7 +521,13 @@ times_division_modulus : exponential ((TIMES^|SLASH^|PCT^) BLANK!* exponential)*; addsub : times_division_modulus ((PLUS^|MINUS^) BLANK!* times_division_m= odulus)*; shifts : addsub ((LSHIFT^|RSHIFT^) BLANK!* addsub)*; -compare : shifts ((LEQ^|GEQ^|LESS_THAN^|GREATER_THAN^) BLANK!* shifts)?; +compare : shifts (compare_operator^ BLANK!* shifts)?; +compare_operator + : LEQ + | GEQ + | LESS_THAN + | GREATER_THAN + | BANG EQUALS -> NOT_EQUALS; bitwiseand : compare (AMP^ BLANK!* compare)*; bitwisexor diff --git a/bashast/gunit/arith_main.gunit b/bashast/gunit/arith_main.gu= nit index b462450..2a440fc 100644 --- a/bashast/gunit/arith_main.gunit +++ b/bashast/gunit/arith_main.gunit @@ -80,6 +80,7 @@ shifts: compare: "17" ->"17" "19<20" -> (< 19 20) +"19!=3D20" -> (NOT_EQUALS 19 20) =20 bitwiseand: "17" -> "17"