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 1Sb6pH-0001Oa-M2 for garchives@archives.gentoo.org; Sun, 03 Jun 2012 09:10:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B6CD0E07E0; Sun, 3 Jun 2012 09:08:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8322AE07E0 for ; Sun, 3 Jun 2012 09:08:42 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E13A21B4019 for ; Sun, 3 Jun 2012 09:08:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 24650E53EC for ; Sun, 3 Jun 2012 09:08:39 +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: <1330584619.85f4b6d5d9f671ab5d51023f9734ff577d70d9ac.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/, bashast/gunit/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g bashast/gunit/expansions.gunit scripts/command_execution.bash X-VCS-Directories: scripts/ bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 85f4b6d5d9f671ab5d51023f9734ff577d70d9ac X-VCS-Branch: master Date: Sun, 3 Jun 2012 09:08:39 +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: 79a38f9f-4309-47e4-9efd-952bc7339d1e X-Archives-Hash: 8843657af9d327e8fdb557010c4163ad commit: 85f4b6d5d9f671ab5d51023f9734ff577d70d9ac Author: Mu Qiao gentoo org> AuthorDate: Thu Mar 1 06:50:19 2012 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Thu Mar 1 06:50:19 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D85f4b6d5 Parser: allow ANSI C quoting in expansion values --- bashast/bashast.g | 2 ++ bashast/gunit/expansions.gunit | 2 +- scripts/command_execution.bash | 1 + 3 files changed, 4 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 98da5e7..700f865 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -746,6 +746,8 @@ expansion_base | (ESC TICK) =3D> ESC TICK -> TICK | (ESC DOLLAR) =3D> ESC DOLLAR -> DOLLAR | (brace_expansion) =3D> brace_expansion + | (DOLLAR SINGLE_QUOTED_STRING_TOKEN) =3D> DOLLAR SINGLE_QUOTED_STRING_= TOKEN + -> ^(ANSI_C_QUOTING SINGLE_QUOTED_STRING_TOKEN) | .; =20 all_expansions diff --git a/bashast/gunit/expansions.gunit b/bashast/gunit/expansions.gu= nit index 543012e..39acfa9 100644 --- a/bashast/gunit/expansions.gunit +++ b/bashast/gunit/expansions.gunit @@ -30,4 +30,4 @@ done" -> (LIST (COMMAND (for each (STRING (COMMAND_SUB = `ls |grep output`)) (LIST "wc <(cat /usr/share/dict/linux.words)" -> (LIST (COMMAND (STRING wc) (P= ROCESS_SUBSTITUTION < (LIST (COMMAND (STRING cat) (STRING / usr / share /= dict / linux . words)))))) =20 all_expansions: -"abc $(ab) ${ab} $((ab)) `ab` \"ab\" 'ab'" -> (STRING abc (COMMAND_SUB= $(ab)) (VAR_REF ab) (ARITHMETIC_EXPRESSION (ARITHMETIC (VAR_REF ab))= ) (COMMAND_SUB `ab`) (DOUBLE_QUOTED_STRING ab) 'ab') +"$'abc' abc $(ab) ${ab} $((ab)) `ab` \"ab\" 'ab'" -> (STRING (ANSI_C_QUO= TING 'abc') abc (COMMAND_SUB $(ab)) (VAR_REF ab) (ARITHMETIC_EXPR= ESSION (ARITHMETIC (VAR_REF ab))) (COMMAND_SUB `ab`) (DOUBLE_QUOTED_S= TRING ab) 'ab') diff --git a/scripts/command_execution.bash b/scripts/command_execution.b= ash index 06d6676..615b13f 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -84,3 +84,4 @@ variable=3Da echo "${!variable// /_}" echo "${!#// /_}" echo "${!1// /_}" +echo "${!variable// /$'\n'}"