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 1QWOzY-0006IJ-8n for garchives@archives.gentoo.org; Tue, 14 Jun 2011 08:28:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1103A1C03C; Tue, 14 Jun 2011 08:28:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D535C1C03C for ; Tue, 14 Jun 2011 08:28:48 +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 459771B4023 for ; Tue, 14 Jun 2011 08:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 49DF480048 for ; Tue, 14 Jun 2011 08:28:47 +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: <6a4e03f76ea76077319e53f99ad4eb901cdc2763.betelgeuse@gentoo> 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: 6a4e03f76ea76077319e53f99ad4eb901cdc2763 Date: Tue, 14 Jun 2011 08:28:47 +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: 9f04a180ec145cba714056419e76fd0d commit: 6a4e03f76ea76077319e53f99ad4eb901cdc2763 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Sat Jun 11 12:28:11 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Tue Jun 14 07:23:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D6a4e03f7 Parser: left factor bracket_pattern_match rule --- bashast/bashast.g | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 10e5556..24b94f7 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -455,12 +455,14 @@ pattern_match_trigger | AT; //Pattern matching using brackets bracket_pattern_match - : LSQUARE RSQUARE (BANG|CARET) pattern_match RSQUARE -> ^(MATCH_ANY_EXC= EPT RSQUARE pattern_match) - | LSQUARE RSQUARE pattern_match RSQUARE -> ^(MATCH_ANY RSQUARE pattern_= match) - | LSQUARE (BANG|CARET) pattern_match RSQUARE -> ^(MATCH_ANY_EXCEPT patt= ern_match) - | LSQUARE pattern_match RSQUARE -> ^(MATCH_ANY pattern_match) + : LSQUARE! bracket_pattern_match_operator | TIMES -> MATCH_ALL | QMARK -> MATCH_ONE; +bracket_pattern_match_operator + : RSQUARE (BANG|CARET) pattern_match RSQUARE -> ^(MATCH_ANY_EXCEPT RSQU= ARE pattern_match) + | RSQUARE pattern_match RSQUARE -> ^(MATCH_ANY RSQUARE pat= tern_match) + | (BANG|CARET) pattern_match RSQUARE -> ^(MATCH_ANY_EXCEPT patt= ern_match) + | pattern_match RSQUARE -> ^(MATCH_ANY pattern_mat= ch); pattern_match : pattern_match_atom+; //allowable patterns with bracket pattern matching