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 1QBPhY-0002X7-1f for garchives@archives.gentoo.org; Sun, 17 Apr 2011 10:59:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3986E1C0C2; Sun, 17 Apr 2011 10:58:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 08AEB1C0B9 for ; Sun, 17 Apr 2011 10:58:33 +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 B58261B4093 for ; Sun, 17 Apr 2011 10:58:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1FBB280075 for ; Sun, 17 Apr 2011 10:58:33 +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: <3b1e7cbfed49e4c66e8dc85771003d10d02cbe24.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/array.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 3b1e7cbfed49e4c66e8dc85771003d10d02cbe24 Date: Sun, 17 Apr 2011 10:58:33 +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: 222392381b1b7e351ada5235bb62227e commit: 3b1e7cbfed49e4c66e8dc85771003d10d02cbe24 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Sat Apr 16 17:16:09 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sun Apr 17 10:57:04 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D3b1e7cbf Parser: fix ws handling for array assignment The parser wasn't eating all kinds of white space between atoms of assigning an array to a variable. --- bashast/bashast.g | 4 ++-- bashast/gunit/array.gunit | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 98ef58f..3b1e4ed 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -229,10 +229,10 @@ var_def | name EQUALS^ value?; //Possible values of a variable value : fname - | LPAREN! wspace!? arr_val RPAREN!; + | LPAREN! wspace!* arr_val RPAREN!; //allow the parser to create array variables arr_val : - | (ag+=3Darray_atom wspace?)+ -> ^(ARRAY $ag+); + | (ag+=3Darray_atom wspace*)+ -> ^(ARRAY $ag+); array_atom : LSQUARE! BLANK!* explicit_arithmetic BLANK!? RSQUARE! EQUALS^ fname | fname; diff --git a/bashast/gunit/array.gunit b/bashast/gunit/array.gunit index d44217c..402e707 100644 --- a/bashast/gunit/array.gunit +++ b/bashast/gunit/array.gunit @@ -22,6 +22,10 @@ var_def: "asdf=3D(a b c d)"->(=3D asdf (ARRAY (STRING a) (STRING b) (STRING c) (S= TRING d))) "asdf=3D(`echo 6` b c d)"->(=3D asdf (ARRAY (STRING (COMMAND_SUB (COMMAN= D (STRING echo) (STRING 6)))) (STRING b) (STRING c) (STRING d))) "asdf=3D(${P} b c d)"->(=3D asdf (ARRAY (STRING (VAR_REF P)) (STRING b) = (STRING c) (STRING d))) +"asdf=3D( + --disable-dependency-tracking + ${VAR} +)" -> (=3D asdf (ARRAY (STRING - - disable - dependency - tracking) (STR= ING (VAR_REF VAR)))) =20 var_ref: "$asdf" -> (VAR_REF asdf)