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 1QCY1h-0002b8-9y for garchives@archives.gentoo.org; Wed, 20 Apr 2011 14:05:05 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71C5B1C09F; Wed, 20 Apr 2011 14:04:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2C0181C09F for ; Wed, 20 Apr 2011 14:04: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 99BE71B4070 for ; Wed, 20 Apr 2011 14:04:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E8F7280256 for ; Wed, 20 Apr 2011 14:04:14 +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: Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/libbashWalker.g scripts/var_def.ebuild scripts/var_def.ebuild.result X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: a46ef6a3de34ee796cd3274079e6e5b91fd99cfc Date: Wed, 20 Apr 2011 14:04:14 +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: 3245aa0dd29facc5f5123cf8e3d37c69 commit: a46ef6a3de34ee796cd3274079e6e5b91fd99cfc Author: Mu Qiao gentoo org> AuthorDate: Tue Apr 19 09:14:22 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Wed Apr 20 13:44:29 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Da46ef6a3 Walker: support multiple atoms of string_expr Expression like "${PN}-${PV}" will be parsed as var_ref, '-', var_ref. Multiple atoms could not be handled by previous walker grammar but now it's fixed. --- bashast/libbashWalker.g | 17 +++++++++-------- scripts/var_def.ebuild | 3 +++ scripts/var_def.ebuild.result | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index 182f6c3..b6c9a7f 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -132,18 +132,19 @@ var_def }; =20 string_expr returns[std::string libbash_value, bool quoted] - :^(STRING( +@init { + $quoted =3D true; +} + :^(STRING ( (DOUBLE_QUOTED_STRING) =3D> - ^(DOUBLE_QUOTED_STRING (libbash_string=3Ddouble_quoted_string { $libb= ash_value +=3D libbash_string; })*) { - $quoted =3D true; - } + ^(DOUBLE_QUOTED_STRING (libbash_string=3Ddouble_quoted_string { $libb= ash_value +=3D libbash_string; })*) |(ARITHMETIC_EXPRESSION) =3D> ^(ARITHMETIC_EXPRESSION value=3Darithmetics { - $libbash_value =3D boost::lexical_cast(value); $quoted = =3D false; + $libbash_value +=3D boost::lexical_cast(value); $quoted= =3D false; }) - |(var_ref[false]) =3D> libbash_string=3Dvar_ref[false] { $libbash_valu= e =3D libbash_string; $quoted =3D false; } - |(libbash_string=3Dany_string { $libbash_value +=3D libbash_string; $q= uoted =3D false; })+ - )); + |(var_ref[false]) =3D> libbash_string=3Dvar_ref[false] { $libbash_valu= e +=3D libbash_string; $quoted =3D false; } + |(libbash_string=3Dany_string { $libbash_value +=3D libbash_string; $q= uoted =3D false; }) + )+); =20 //double quoted string rule, allows expansions double_quoted_string returns[std::string libbash_value] diff --git a/scripts/var_def.ebuild b/scripts/var_def.ebuild index c93a6de..56f8f8d 100644 --- a/scripts/var_def.ebuild +++ b/scripts/var_def.ebuild @@ -32,3 +32,6 @@ ARRAY08=3D"${ARRAY05[@]}" ARRAY09=3D"${ARRAY05[*]}" IFS=3D";,:" ARRAY10=3D"${ARRAY05[*]}" +FOO001=3D"networkmanager" +FOO002=3D"0.8.2" +FOO003=3D${FOO001}-${FOO002} diff --git a/scripts/var_def.ebuild.result b/scripts/var_def.ebuild.resul= t index 058bd98..292b9c7 100644 --- a/scripts/var_def.ebuild.result +++ b/scripts/var_def.ebuild.result @@ -15,6 +15,9 @@ DESCRIPTION=3DSunPinyin is a SLM (Statistical Language = Model) based IME EAPI=3D1 EMPTY=3D EMPTY_ARRAY=3D +FOO001=3Dnetworkmanager +FOO002=3D0.8.2 +FOO003=3Dnetworkmanager-0.8.2 HOMEPAGE=3Dhttp://sunpinyin.googlecode.com IUSE=3D KEYWORDS=3D~amd64 ~x86