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 1QoyPA-0006PU-Pu for garchives@archives.gentoo.org; Thu, 04 Aug 2011 13:56:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9AE1C21C1E0; Thu, 4 Aug 2011 13:53:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6DC6321C1E3 for ; Thu, 4 Aug 2011 13:53:41 +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 183C41B4016 for ; Thu, 4 Aug 2011 13:53:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7422980048 for ; Thu, 4 Aug 2011 13:53:40 +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: <45c86202bd9b8f6df72b58cd977c6ba87c80eeb7.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/compound.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 45c86202bd9b8f6df72b58cd977c6ba87c80eeb7 Date: Thu, 4 Aug 2011 13:53:40 +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: 6018131c075815f8672d84a61b8ef9ab commit: 45c86202bd9b8f6df72b58cd977c6ba87c80eeb7 Author: Mu Qiao gentoo org> AuthorDate: Thu Jul 21 10:13:22 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Tue Aug 2 07:46:29 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D45c86202 Parser: allow blanks before semicolon for for_expr --- bashast/bashast.g | 2 +- bashast/gunit/compound.gunit | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index b380379..6204ed0 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -446,7 +446,7 @@ for_expr ( name wspace ( - IN for_each_value* (SEMIC|EOL) wspace? + IN for_each_value* BLANK? (SEMIC|EOL) wspace? |SEMIC wspace? | ) DO wspace command_list semiel DONE -> ^(FOR name for_each_value* co= mmand_list) diff --git a/bashast/gunit/compound.gunit b/bashast/gunit/compound.gunit index 18314bf..7270246 100644 --- a/bashast/gunit/compound.gunit +++ b/bashast/gunit/compound.gunit @@ -94,6 +94,7 @@ done" -> (for each (STRING (COMMAND_SUB `ls |grep log`)= ) (LIST (COMMAND (STRING "for each in `ls |grep log`;do echo \"file found\"; done" -> (for each (= STRING (COMMAND_SUB `ls |grep log`)) (LIST (COMMAND (STRING echo) (STRING= (DOUBLE_QUOTED_STRING file found))))) "for i in 'foo' 'bar'; do echo $i; done" -> (for i (STRING (SINGLE_QUOTE= D_STRING 'foo')) (STRING (SINGLE_QUOTED_STRING 'bar')) (LIST (COMMAND (ST= RING echo) (STRING (VAR_REF i))))) "for i in foo$var bar; do echo $i; done" -> (for i (STRING foo (VAR_REF = var)) (STRING bar) (LIST (COMMAND (STRING echo) (STRING (VAR_REF i))))) +"for i in foo$var bar ; do echo $i; done" -> (for i (STRING foo (VAR_REF= var)) (STRING bar) (LIST (COMMAND (STRING echo) (STRING (VAR_REF i))))) "for each in `ls |grep log`; do echo file done" FAIL =20 "for ((5+3;5+3;5+3)); do echo yay; done" -> (CFOR (FOR_INIT (+ 5 3)) (FO= R_COND (+ 5 3)) (LIST (COMMAND (STRING echo) (STRING yay))) (FOR_MOD (+ 5= 3)))