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 1QBPiM-0002hh-HM for garchives@archives.gentoo.org; Sun, 17 Apr 2011 11:00:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B66C61C0C1; Sun, 17 Apr 2011 10:58:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 829E11C0B3 for ; Sun, 17 Apr 2011 10:58:32 +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 389C51B4090 for ; Sun, 17 Apr 2011 10:58:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9460F80072 for ; Sun, 17 Apr 2011 10:58:31 +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: <919e76b05e08ffeb8cdb34cbd453c0a5fa833276.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: 919e76b05e08ffeb8cdb34cbd453c0a5fa833276 Date: Sun, 17 Apr 2011 10:58:31 +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: ef657ebf0e5621fd866a2d76fe437f0b commit: 919e76b05e08ffeb8cdb34cbd453c0a5fa833276 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Sat Apr 16 14:02:48 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sun Apr 17 10:57:03 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D919e76b0 Parser: handle extra ws at the enf of currshell The parser couldn't handle extra lines with only white space at the end of lists for current shell. --- bashast/bashast.g | 2 +- bashast/gunit/compound.gunit | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index b318f3c..30af37d 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -215,7 +215,7 @@ case_pattern subshell: LPAREN wspace? clist (BLANK* SEMIC)? (BLANK* EOL)* BLANK* RPAR= EN -> ^(SUBSHELL clist); //A grouping of commands executed in the current shell currshell - : LBRACE wspace clist semiel RBRACE -> ^(CURRSHELL clist); + : LBRACE wspace clist semiel wspace* RBRACE -> ^(CURRSHELL clist); //comparison using arithmetic arith_comparison : LLPAREN wspace? arithmetic wspace? RRPAREN -> ^(COMPOUND_ARITH arithm= etic); diff --git a/bashast/gunit/compound.gunit b/bashast/gunit/compound.gunit index 587d869..dfdacc5 100644 --- a/bashast/gunit/compound.gunit +++ b/bashast/gunit/compound.gunit @@ -36,6 +36,11 @@ currshell: "{ time cat; }" -> (CURRSHELL (LIST (COMMAND (STRING cat) time))) "{ time cat }" -> (CURRSHELL (LIST (COMMAND (STRING cat) time))) +// there's a tab on the empty line +"{ + echo +=09 +}" -> (CURRSHELL (LIST (COMMAND (STRING echo)))) "{time cat}" FAIL "{ time cat }" FAIL =20