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 1Q99Z0-0004AB-8L for garchives@archives.gentoo.org; Mon, 11 Apr 2011 05:21:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D203A1C041; Mon, 11 Apr 2011 05:21:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9A6821C040 for ; Mon, 11 Apr 2011 05:21:17 +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 08EDA1B40CF for ; Mon, 11 Apr 2011 05:21:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id F17DB80074 for ; Mon, 11 Apr 2011 05:21:15 +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: <8f6a482aeb3abf9538ce9a0ae0e55fab9fbfb105.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: 8f6a482aeb3abf9538ce9a0ae0e55fab9fbfb105 Date: Mon, 11 Apr 2011 05:21:15 +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: 0255bbb7f563ab77f608e47651a18147 commit: 8f6a482aeb3abf9538ce9a0ae0e55fab9fbfb105 Author: Mu Qiao gentoo org> AuthorDate: Sun Apr 10 08:07:35 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Mon Apr 11 01:39:01 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D8f6a482a Make space after while/until keyword optional Space is optional between while/until keyword and the test-commands so we make it optional in the grammar. Bug #362795 --- bashast/bashast.g | 4 ++-- bashast/gunit/compound.gunit | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 2418a81..210912c 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -183,10 +183,10 @@ if_expr : IF wspace+ ag=3Dclist BLANK* semiel THEN = wspace+ iflist=3Dclist BLANK? sem elif_expr : ELIF BLANK+ ag=3Dclist BLANK* semiel THEN wspace+ iflist=3Dclist BLAN= K* semiel -> ^(IF["if"] $ag $iflist); while_expr - : WHILE wspace istrue=3Dclist semiel DO wspace dothis=3Dclist semiel DO= NE -> ^(WHILE $istrue $dothis) + : WHILE wspace? istrue=3Dclist semiel DO wspace dothis=3Dclist semiel D= ONE -> ^(WHILE $istrue $dothis) ; until_expr - : UNTIL wspace istrue=3Dclist semiel DO wspace dothis=3Dclist semiel DO= NE -> ^(UNTIL $istrue $dothis) + : UNTIL wspace? istrue=3Dclist semiel DO wspace dothis=3Dclist semiel D= ONE -> ^(UNTIL $istrue $dothis) ; case_expr : CASE^ BLANK!+ word wspace! IN! wspace! (case_stmt wspace!)* last_case= ? ESAC!; diff --git a/bashast/gunit/compound.gunit b/bashast/gunit/compound.gunit index b8e8ef6..531e0ff 100644 --- a/bashast/gunit/compound.gunit +++ b/bashast/gunit/compound.gunit @@ -120,6 +120,7 @@ while_expr: echo \"file found\" done" -> (while (LIST (COMMAND (STRING echo) (STRING true))) (LIST (COMM= AND (STRING echo) (STRING (DOUBLE_QUOTED_STRING file found))))) "while echo true; do echo \"file found\"; done" -> (while (LIST (COMMAND= (STRING echo) (STRING true))) (LIST (COMMAND (STRING echo) (STRING (DOUB= LE_QUOTED_STRING file found))))) +"while(( 1>0 )); do echo ok; done" -> (while (LIST (COMPOUND_ARITH (> 1 = 0))) (LIST (COMMAND (STRING echo) (STRING ok)))) "while echo true`; do echo file done" FAIL =20 until_expr: