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 1QVJUt-0005Kf-6r for garchives@archives.gentoo.org; Sat, 11 Jun 2011 08:24:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F9221C040; Sat, 11 Jun 2011 08:24:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E431F1C040 for ; Sat, 11 Jun 2011 08:24:29 +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 634DE1B4035 for ; Sat, 11 Jun 2011 08:24:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5228780040 for ; Sat, 11 Jun 2011 08:24:28 +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: Subject: [gentoo-commits] proj/libbash:master commit in: bashast/, bashast/gunit/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g bashast/gunit/list.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: aeb660f97b84a58a2afb9925f9321c55f406236a Date: Sat, 11 Jun 2011 08:24:28 +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: b22af7d5f8db684b9789791f89ae9448 commit: aeb660f97b84a58a2afb9925f9321c55f406236a Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Thu Jun 9 21:02:57 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Fri Jun 10 14:44:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Daeb660f9 Parser: builtin test doesn't do && or || && and || are only available with [[. --- bashast/bashast.g | 3 ++- bashast/gunit/list.gunit | 1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 269fcfd..2115620 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -360,7 +360,8 @@ builtin_cond_unary keyword_cond : (negate_primary|cond_primary) (BLANK!* (LOGICOR^|LOGICAND^) BLANK!* k= eyword_cond)?; builtin_cond - : (negate_builtin_primary|builtin_cond_primary) (BLANK!* (LOGICOR^|LOGI= CAND^) BLANK!* builtin_cond)?; + : negate_builtin_primary + | builtin_cond_primary; negate_primary : BANG BLANK+ cond_primary -> ^(NEGATION cond_primary); negate_builtin_primary diff --git a/bashast/gunit/list.gunit b/bashast/gunit/list.gunit index 4beb325..edfc053 100644 --- a/bashast/gunit/list.gunit +++ b/bashast/gunit/list.gunit @@ -43,3 +43,4 @@ echo \"a b\"" -> (LIST (VARIABLE_DEFINITIONS (=3D a (ST= RING asdf))) (VARIABLE_DEFI true" -> (LIST (COMMAND (STRING true)) (COMMAND (STRING true))) "(echo hi > /dev/null) >> 1" -> (LIST (SUBSHELL (LIST (COMMAND (STRING e= cho) (STRING hi) (REDIR > (STRING / dev / null)))) (REDIR >> (FILE_DESCRI= PTOR 1)))) "{ echo hi > /dev/null; } >> 1" -> (LIST (CURRENT_SHELL (LIST (COMMAND (= STRING echo) (STRING hi) (REDIR > (STRING / dev / null)))) (REDIR >> (FIL= E_DESCRIPTOR 1)))) +"test 1 -gt 0 || return 0" -> (LIST (|| (COMPOUND_COND (BUILTIN_TEST (gt= (STRING 1) (STRING 0)))) (COMMAND (STRING return) (STRING 0))))