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 1QoyOg-0006CZ-NW for garchives@archives.gentoo.org; Thu, 04 Aug 2011 13:55:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C5E3A21C1F9; Thu, 4 Aug 2011 13:53:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9423E21C1F9 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 4732D2AC011 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 A07B180040 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: <48ca9661e8e8f6bab6e37cf912bf1b16e5d742e0.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: 48ca9661e8e8f6bab6e37cf912bf1b16e5d742e0 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: f344d9e50008610f4bddc1022a05258d commit: 48ca9661e8e8f6bab6e37cf912bf1b16e5d742e0 Author: Mu Qiao gentoo org> AuthorDate: Thu Jul 21 13:15:31 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=3D48ca9661 Parser: make the blanks before semicolon optional This fixes case statement. The indentation for the rule is also fixed. Unnecessary syntactic predicate is removed. --- bashast/bashast.g | 6 +++--- bashast/gunit/compound.gunit | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 6204ed0..b4804fa 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -498,10 +498,10 @@ scope { ); case_statement : wspace? (LPAREN BLANK?)? extended_pattern (BLANK? PIPE BLANK? extende= d_pattern)* BLANK? RPAREN - wspace + (wspace command_list)? ( - command_list wspace)? ( (DOUBLE_SEMIC ((wspace ESAC) =3D> wspace ESAC= {$case_body::case_end =3D true;})?) - |(ESAC) =3D> ESAC {$case_body::case_end =3D true;} + wspace? DOUBLE_SEMIC ((wspace ESAC) =3D> wspace ESAC {$case_body::cas= e_end =3D true;})? + |wspace ESAC {$case_body::case_end =3D true;} ) -> ^(CASE_PATTERN extended_pattern+ (CASE_COMMAND command_list)?); =20 diff --git a/bashast/gunit/compound.gunit b/bashast/gunit/compound.gunit index 7270246..c5d6845 100644 --- a/bashast/gunit/compound.gunit +++ b/bashast/gunit/compound.gunit @@ -166,8 +166,7 @@ esac" -> (case (STRING (DOUBLE_QUOTED_STRING (VAR_RE= F 1))) (CASE_PATTERN (BRANC =20 "case $asdf in a) -echo \"yay\" -;; +echo \"yay\";; esac" -> (case (STRING (VAR_REF asdf)) (CASE_PATTERN (BRANCH a) CASE_COM= MAND (LIST (COMMAND (STRING echo) (STRING (DOUBLE_QUOTED_STRING yay)))))) "case asdf in asdf)