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 1QZ0yX-0001Oa-Oc for garchives@archives.gentoo.org; Tue, 21 Jun 2011 13:26:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 267831C00C; Tue, 21 Jun 2011 13:26:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EA6071C00C for ; Tue, 21 Jun 2011 13:26:32 +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 79F5B1B4018 for ; Tue, 21 Jun 2011 13:26:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D4C9F8003C for ; Tue, 21 Jun 2011 13:26:31 +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: <37a46717c4ee0585aef243437f6719b28c4d4fc5.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/brace.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 37a46717c4ee0585aef243437f6719b28c4d4fc5 Date: Tue, 21 Jun 2011 13:26:31 +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: 96cb8c244556ae6f065e06046f72cdcc commit: 37a46717c4ee0585aef243437f6719b28c4d4fc5 Author: Mu Qiao gentoo org> AuthorDate: Tue Jun 14 14:17:59 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Tue Jun 21 13:23:27 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D37a46717 Parser: simplify the AST of brace expansion --- bashast/bashast.g | 3 +-- bashast/gunit/brace.gunit | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index b575027..d5ea5e3 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -30,7 +30,6 @@ tokens{ ARRAY; ARRAY_SIZE; BRACE_EXP; - EMPTY_BRACE_EXPANSION_ATOM; COMMAND_SUB; CASE_PATTERN; CASE_COMMAND; @@ -189,7 +188,7 @@ range : DIGIT DOTDOT^ DIGIT | LETTER DOTDOT^ LETTER; brace_expansion_part : (((~COMMA) =3D> fname_part)+ -> ^(STRING fname_part+))+ - | -> EMPTY_BRACE_EXPANSION_ATOM; + | -> ^(STRING); commasep: brace_expansion_part(COMMA! brace_expansion_part)+; command_sub : DOLLAR LPAREN clist BLANK? RPAREN -> ^(COMMAND_SUB clist) diff --git a/bashast/gunit/brace.gunit b/bashast/gunit/brace.gunit index 4d5d6a5..bafb624 100644 --- a/bashast/gunit/brace.gunit +++ b/bashast/gunit/brace.gunit @@ -24,7 +24,7 @@ brace_expansion: "{a,b,c}" -> (BRACE_EXP (STRING a) (STRING b) (STRING c)) "{a..d}" -> (BRACE_EXP (.. a d)) "{{a,b},c,d}" -> (BRACE_EXP (STRING (BRACE_EXP (STRING a) (STRING b))) (= STRING c) (STRING d)) -"{.txt,,}" -> (BRACE_EXP (STRING . txt) EMPTY_BRACE_EXPANSION_ATOM EMPTY= _BRACE_EXPANSION_ATOM) +"{.txt,,}" -> (BRACE_EXP (STRING . txt) STRING STRING) "{GNUmakefile,{M,m}akefile}" -> (BRACE_EXP (STRING GNUmakefile) (STRING = (BRACE_EXP (STRING M) (STRING m)) akefile)) =20 fname: