From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 007FD13800E for ; Tue, 7 Aug 2012 02:39:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B448FE0655; Tue, 7 Aug 2012 02:38:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8709BE05EF for ; Tue, 7 Aug 2012 02:38:48 +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 E52821B4013 for ; Tue, 7 Aug 2012 02:38:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 91903E543F for ; Tue, 7 Aug 2012 02:38:46 +0000 (UTC) From: "Mu Qiao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mu Qiao" Message-ID: <1343952221.6404756744b9230da6d755b456c6922c1693301a.qiaomuf@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g bashast/libbashWalker.g scripts/command_execution.bash X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: qiaomuf X-VCS-Committer-Name: Mu Qiao X-VCS-Revision: 6404756744b9230da6d755b456c6922c1693301a X-VCS-Branch: master Date: Tue, 7 Aug 2012 02:38:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f6c8c02b-ea5f-435a-82c5-1ee6f573507e X-Archives-Hash: 02765ab862b77f21b9da6264accceb6e commit: 6404756744b9230da6d755b456c6922c1693301a Author: André Aparício gmail com> AuthorDate: Thu Jul 12 21:30:48 2012 +0000 Commit: Mu Qiao gentoo org> CommitDate: Fri Aug 3 00:03:41 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=64047567 Parser&Walker: Escape '[' and ']' --- bashast/bashast.g | 4 +++- bashast/libbashWalker.g | 2 ++ scripts/command_execution.bash | 1 + 3 files changed, 6 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 3ce2c8e..61c7e57 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -786,7 +786,7 @@ ns_string_part |OTHER|EQUALS|PCT|PCTPCT|PLUS|MINUS|DOT|DOTDOT|COLON |TILDE|LSQUARE|RSQUARE|CARET|POUND|COMMA|EXPORT|LOCAL|DECLARE|AT // Escaped characters - |ESC_RPAREN|ESC_LPAREN|ESC_DOLLAR|ESC_GT|ESC_LT|ESC_TICK|ESC_DQUOTE + |ESC_RPAREN|ESC_LPAREN|ESC_RSQUARE|ESC_LSQUARE|ESC_DOLLAR|ESC_GT|ESC_LT|ESC_TICK|ESC_DQUOTE // The following is for filename expansion |TIMES|QMARK; @@ -1160,6 +1160,8 @@ LOGICOR : '||'; CONTINUE_LINE : (ESC EOL)+{$channel=HIDDEN;}; ESC_RPAREN : ESC RPAREN; ESC_LPAREN : ESC LPAREN; +ESC_RSQUARE : ESC RSQUARE; +ESC_LSQUARE : ESC LSQUARE; ESC_DOLLAR : ESC DOLLAR; ESC_TICK : ESC TICK; COMMAND_SUBSTITUTION_PAREN diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index 27377de..9c85f9d 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -462,6 +462,8 @@ options {backtrack = true;} } :ESC_RPAREN { $libbash_value = ")"; } |ESC_LPAREN { $libbash_value = "("; } + |ESC_RSQUARE { $libbash_value = "]"; } + |ESC_LSQUARE { $libbash_value = "["; } |ESC_DOLLAR { $libbash_value = "$"; } |ESC_DQUOTE { $libbash_value = "\""; } |ESC_GT { $libbash_value = ">"; } diff --git a/scripts/command_execution.bash b/scripts/command_execution.bash index 3b275ca..1cc837b 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -96,6 +96,7 @@ eval abc+=\( \"\$@\" \) declare MOZILLA_FIVE_HOME="/usr/share/${PN}" declare foo=23 empty bar=42 echo $MOZILLA_FIVE_HOME $foo $lol $bar +echo \(\)\[\]\$\"\> FILE=scripts/input_output_test echo foo > $FILE