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 1QoyRK-0007DO-9s for garchives@archives.gentoo.org; Thu, 04 Aug 2011 13:58:22 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B8F521C20F; Thu, 4 Aug 2011 13:53:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0C8F021C209 for ; Thu, 4 Aug 2011 13:53:45 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AE4102AC012 for ; Thu, 4 Aug 2011 13:53:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 09A7A80048 for ; Thu, 4 Aug 2011 13:53:45 +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: <2bcc4ed9ea1b78036807a4c914003922343e7b04.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/process_substitution.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 2bcc4ed9ea1b78036807a4c914003922343e7b04 Date: Thu, 4 Aug 2011 13:53:45 +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: fdaaf5fb8c05714b34c325d8ebe8c3b3 commit: 2bcc4ed9ea1b78036807a4c914003922343e7b04 Author: Mu Qiao gentoo org> AuthorDate: Thu Jul 28 08:00:11 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Tue Aug 2 07:52:18 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D2bcc4ed9 Parser: support process sub as redirection dest --- bashast/bashast.g | 9 +++++---- bashast/gunit/process_substitution.gunit | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 818a598..d09138a 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -275,8 +275,8 @@ time_posix redirection : redirection_atom+; redirection_atom - : redirection_operator BLANK? redirection_destination -> ^(REDIR redire= ction_operator redirection_destination) - | BLANK!? process_substitution + : redirection_operator redirection_destination -> ^(REDIR redirection_o= perator redirection_destination) + | BLANK! process_substitution | here_string; =20 process_substitution @@ -284,8 +284,9 @@ process_substitution -> ^(PROCESS_SUBSTITUTION $dir command_list); =20 redirection_destination - : (file_descriptor) =3D> file_descriptor - | string_expr; + : (BLANK? file_descriptor) =3D> BLANK!? file_descriptor + | BLANK! process_substitution + | BLANK!? string_expr; file_descriptor : DIGIT -> ^(FILE_DESCRIPTOR DIGIT) | DIGIT MINUS -> ^(FILE_DESCRIPTOR_MOVE DIGIT); diff --git a/bashast/gunit/process_substitution.gunit b/bashast/gunit/pro= cess_substitution.gunit index b0d2754..f7e0ec2 100644 --- a/bashast/gunit/process_substitution.gunit +++ b/bashast/gunit/process_substitution.gunit @@ -21,3 +21,9 @@ gunit java_libbash; process_substitution: "<( true )" -> (PROCESS_SUBSTITUTION < (LIST (COMMAND (STRING true)))) ">(false)" -> (PROCESS_SUBSTITUTION > (LIST (COMMAND (STRING false)))) + +command: +"while read -d $'\0' -r nspkg_pth_file; do = =20 + nspkg_pth_files+=3D(\"${nspkg_pth_file}\") +done < <(find \"${ED}\" -name \"*-nspkg.pth\" -type f -print0)" -> (COMM= AND (while (LIST (COMMAND (STRING read) (STRING - d) (STRING (ANSI_C_QUOT= ING '\0')) (STRING - r) (STRING nspkg_pth_file))) (LIST (COMMAND (VARIABL= E_DEFINITIONS (PLUS_ASSIGN nspkg_pth_files (ARRAY (STRING (DOUBLE_QUOTED_= STRING (VAR_REF nspkg_pth_file))))))))) (REDIR < (PROCESS_SUBSTITUTION < = (LIST (COMMAND (STRING find) (STRING (DOUBLE_QUOTED_STRING (VAR_REF ED)))= (STRING - name) (STRING (DOUBLE_QUOTED_STRING * - nspkg . pth)) (STRING = - type) (STRING f) (STRING - print0)))))) +"echo<(cat)" FAIL