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 1Q8Re5-0004gj-JA for garchives@archives.gentoo.org; Sat, 09 Apr 2011 06:27:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CE881C02A; Sat, 9 Apr 2011 06:27:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 491D01C033 for ; Sat, 9 Apr 2011 06:27:38 +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 D67411B4057 for ; Sat, 9 Apr 2011 06:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3E42B8007B for ; Sat, 9 Apr 2011 06:27:37 +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: Subject: [gentoo-commits] proj/libbash:master commit in: bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g X-VCS-Directories: bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: fa4053e5a365b1ced100736989070b8bd01f33eb Date: Sat, 9 Apr 2011 06:27:37 +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: 30253aefacbf98d9bf50e7a3892e8d80 commit: fa4053e5a365b1ced100736989070b8bd01f33eb Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Fri Apr 8 19:22:57 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sat Apr 9 06:13:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Dfa4053e5 Remove need to backtrack from the word rule All the other alternatives can also be matched from fname so we need syntactic predicates. We should give thought to if we need both the word and fname rules. --- bashast/bashast.g | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 64568c9..20068b5 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -330,13 +330,13 @@ wspace : BLANK+|EOL; semiel : (';'|EOL) BLANK*; =20 //definition of word. this is just going to grow... -word : brace_expansion - | command_sub - | var_ref - | num - | fname - | arithmetic_expansion - | res_word_str -> ^(STRING res_word_str); +word : (brace_expansion) =3D> brace_expansion + | (command_sub) =3D> command_sub + | (var_ref) =3D> var_ref + | (num) =3D> num + | (arithmetic_expansion) =3D> arithmetic_expansion + | fname; + pattern : command_sub | fname | TIMES;