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 1QQJJA-0003C3-Sg for garchives@archives.gentoo.org; Sat, 28 May 2011 13:12:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9932B1C152; Sat, 28 May 2011 13:11:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6DB161C152 for ; Sat, 28 May 2011 13:11:50 +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 98EFE1B401D for ; Sat, 28 May 2011 13:11:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 064E78050A for ; Sat, 28 May 2011 13:11:49 +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: <1434467973035473d51ad3f8c0955e363fc0df17.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/libbashWalker.g scripts/command_execution.bash scripts/command_execution.bash.result X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 1434467973035473d51ad3f8c0955e363fc0df17 Date: Sat, 28 May 2011 13:11:49 +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: 9ead2a0e41d32871baea9027985cbee3 commit: 1434467973035473d51ad3f8c0955e363fc0df17 Author: Mu Qiao gentoo org> AuthorDate: Sat May 28 08:19:29 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sat May 28 12:10:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D14344679 Walker: support command substitution in double quoted string --- bashast/libbashWalker.g | 3 +++ scripts/command_execution.bash | 2 ++ scripts/command_execution.bash.result | 2 ++ 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index 67886a0..d5522fc 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -320,6 +320,9 @@ double_quoted_string returns[std::string libbash_valu= e] |(ARITHMETIC_EXPRESSION) =3D> ^(ARITHMETIC_EXPRESSION value=3Darithmeti= cs) { $libbash_value =3D boost::lexical_cast(value); } + |libbash_string=3Dcommand_substitution { + $libbash_value =3D libbash_string; + } |libbash_string=3Dany_string { $libbash_value =3D libbash_string; }; =20 any_string returns[std::string libbash_value] diff --git a/scripts/command_execution.bash b/scripts/command_execution.b= ash index b9b1c82..95401b4 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -44,3 +44,5 @@ declare -F unset_outer unset -f unset_outer declare -F unset_outer echo '$FOO006 "abc" $(( 1 + 2 )) $(echo hi) ...' +echo "abc $(echo def) ghi" +FOO008=3D"abc $(echo def) ghi" diff --git a/scripts/command_execution.bash.result b/scripts/command_exec= ution.bash.result index d7642f5..d47650d 100644 --- a/scripts/command_execution.bash.result +++ b/scripts/command_execution.bash.result @@ -14,9 +14,11 @@ FOO006=3D0 in global FOO006=3D in global unset_outer $FOO006 "abc" $(( 1 + 2 )) $(echo hi) ... +abc def ghi DEFAULTED=3Dyes FOO001=3Dhello FOO002=3DHello World FOO003=3D1 FOO004=3Dabc FOO005=3D1 2 3 +FOO008=3Dabc def ghi