From: "Petteri Räty" <betelgeuse@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/libbash:master commit in: bashast/, bashast/gunit/
Date: Wed, 11 May 2011 07:19:34 +0000 (UTC) [thread overview]
Message-ID: <495848c85f4c54af8fed466d09bd474fbdf37568.betelgeuse@gentoo> (raw)
commit: 495848c85f4c54af8fed466d09bd474fbdf37568
Author: Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Tue May 10 17:53:03 2011 +0000
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Tue May 10 17:53:03 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=495848c8
Parser: rename MATCH_PATTERN to MATCH_ANY
The token is used to describe bracket pattern matching expressions where
any of the atoms inside the brackets can match to MATCH_ANY is a more
descriptive name.
---
bashast/bashast.g | 6 +++---
bashast/gunit/fname.gunit | 28 ++++++++++++++--------------
bashast/gunit/param_main.gunit | 2 +-
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/bashast/bashast.g b/bashast/bashast.g
index 977e8c8..220d01f 100644
--- a/bashast/bashast.g
+++ b/bashast/bashast.g
@@ -68,7 +68,7 @@ tokens{
EXTENDED_MATCH_NONE;
EXTENDED_MATCH_ANY;
EXTENDED_MATCH_AT_LEAST_ONE;
- MATCH_PATTERN;
+ MATCH_ANY;
MATCH_ANY_EXCEPT;
CHARACTER_CLASS;
EQUIVALENCE_CLASS;
@@ -450,9 +450,9 @@ pattern_match_trigger
//Pattern matching using brackets
bracket_pattern_match
: LSQUARE RSQUARE (BANG|CARET) pattern_match* RSQUARE -> ^(MATCH_ANY_EXCEPT RSQUARE pattern_match*)
- | LSQUARE RSQUARE pattern_match* RSQUARE -> ^(MATCH_PATTERN RSQUARE pattern_match*)
+ | LSQUARE RSQUARE pattern_match* RSQUARE -> ^(MATCH_ANY RSQUARE pattern_match*)
| LSQUARE (BANG|CARET) pattern_match+ RSQUARE -> ^(MATCH_ANY_EXCEPT pattern_match+)
- | LSQUARE pattern_match+ RSQUARE -> ^(MATCH_PATTERN pattern_match+);
+ | LSQUARE pattern_match+ RSQUARE -> ^(MATCH_ANY pattern_match+);
//allowable patterns with bracket pattern matching
pattern_match
: pattern_class_match
diff --git a/bashast/gunit/fname.gunit b/bashast/gunit/fname.gunit
index cfde61b..c12449b 100644
--- a/bashast/gunit/fname.gunit
+++ b/bashast/gunit/fname.gunit
@@ -47,24 +47,24 @@ fname:
"hex\xaF" -> (STRING hex \ xaF)
"ctrlx\cx" -> (STRING ctrlx \ cx)
"tab\\ttab" -> "(STRING tab \\ \t tab)"
-"abc[def]" -> (STRING abc (MATCH_PATTERN def))
-"abc[d${more}]" -> (STRING abc (MATCH_PATTERN d (VAR_REF more)))
-"abc[#d]" -> (STRING abc (MATCH_PATTERN # d))
-"abc[d#]" -> (STRING abc (MATCH_PATTERN d #))
+"abc[def]" -> (STRING abc (MATCH_ANY def))
+"abc[d${more}]" -> (STRING abc (MATCH_ANY d (VAR_REF more)))
+"abc[#d]" -> (STRING abc (MATCH_ANY # d))
+"abc[d#]" -> (STRING abc (MATCH_ANY d #))
"a[]" -> (STRING a [ ])
-"ab[d-h]" -> (STRING ab (MATCH_PATTERN d - h))
+"ab[d-h]" -> (STRING ab (MATCH_ANY d - h))
"ab[!d-h]" -> (STRING ab (MATCH_ANY_EXCEPT d - h))
"ab[^d-h]" -> (STRING ab (MATCH_ANY_EXCEPT d - h))
-"ab[]c]" -> (STRING ab (MATCH_PATTERN ] c))
-"ab[:alpha:]" -> (STRING ab (MATCH_PATTERN : alpha :))
-"ab[=c=]" -> (STRING ab (MATCH_PATTERN = c =))
-"ab[.c.]" -> (STRING ab (MATCH_PATTERN . c .))
-"ab[[:alpha:]]" -> (STRING ab (MATCH_PATTERN (CHARACTER_CLASS alpha)))
-"ab[[:alpha:][:digit:]]" -> (STRING ab (MATCH_PATTERN (CHARACTER_CLASS alpha) (CHARACTER_CLASS digit)))
+"ab[]c]" -> (STRING ab (MATCH_ANY ] c))
+"ab[:alpha:]" -> (STRING ab (MATCH_ANY : alpha :))
+"ab[=c=]" -> (STRING ab (MATCH_ANY = c =))
+"ab[.c.]" -> (STRING ab (MATCH_ANY . c .))
+"ab[[:alpha:]]" -> (STRING ab (MATCH_ANY (CHARACTER_CLASS alpha)))
+"ab[[:alpha:][:digit:]]" -> (STRING ab (MATCH_ANY (CHARACTER_CLASS alpha) (CHARACTER_CLASS digit)))
"ab[^[:alpha:]]" -> (STRING ab (MATCH_ANY_EXCEPT (CHARACTER_CLASS alpha)))
-"ab[[=c=]]" -> (STRING ab (MATCH_PATTERN (EQUIVALENCE_CLASS c)))
-"ab[[.backslash.]]" -> (STRING ab (MATCH_PATTERN (COLLATING_SYMBOL backslash)))
-"ab[12[:alpha:]]" -> (STRING ab (MATCH_PATTERN 12 (CHARACTER_CLASS alpha)))
+"ab[[=c=]]" -> (STRING ab (MATCH_ANY (EQUIVALENCE_CLASS c)))
+"ab[[.backslash.]]" -> (STRING ab (MATCH_ANY (COLLATING_SYMBOL backslash)))
+"ab[12[:alpha:]]" -> (STRING ab (MATCH_ANY 12 (CHARACTER_CLASS alpha)))
"\"'foo'\"" -> (STRING (DOUBLE_QUOTED_STRING ' foo '))
"--preserve=timestamps,mode" -> (STRING - -p reserve = timestamps , mode)
diff --git a/bashast/gunit/param_main.gunit b/bashast/gunit/param_main.gunit
index 91ed8be..54a2edb 100644
--- a/bashast/gunit/param_main.gunit
+++ b/bashast/gunit/param_main.gunit
@@ -56,7 +56,7 @@ var_ref:
"${_}" -> (VAR_REF _)
"${PV//./_}" -> (VAR_REF (REPLACE_ALL PV (STRING .) (STRING _)))
"${PV// }" -> (VAR_REF (REPLACE_ALL PV (STRING )))
-"${PV//[-._]/}" -> (VAR_REF (REPLACE_ALL PV (STRING (MATCH_PATTERN - . _))))
+"${PV//[-._]/}" -> (VAR_REF (REPLACE_ALL PV (STRING (MATCH_ANY - . _))))
"${PV/${pattern}/${replace}}" -> (VAR_REF (REPLACE_FIRST PV (STRING (VAR_REF pattern)) (STRING (VAR_REF replace))))
"${PV/#foo/bar}" -> (VAR_REF (REPLACE_AT_START PV (STRING foo) (STRING bar)))
"${PV/%foo/bar}" -> (VAR_REF (REPLACE_AT_END PV (STRING foo) (STRING bar)))
next reply other threads:[~2011-05-11 7:20 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 7:19 Petteri Räty [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-08-19 14:35 [gentoo-commits] proj/libbash:master commit in: bashast/, bashast/gunit/ Petteri Räty
2012-06-03 9:08 Petteri Räty
2012-06-03 9:08 Petteri Räty
2012-06-03 9:08 Petteri Räty
2012-06-03 9:08 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-08-04 13:53 Petteri Räty
2011-07-20 13:08 Petteri Räty
2011-07-08 14:12 Petteri Räty
2011-06-21 13:26 Petteri Räty
2011-06-21 13:20 Petteri Räty
2011-06-21 13:20 Petteri Räty
2011-06-19 19:15 Petteri Räty
2011-06-15 21:18 Petteri Räty
2011-06-14 8:28 Petteri Räty
2011-06-14 8:28 Petteri Räty
2011-06-11 8:24 Petteri Räty
2011-06-11 8:24 Petteri Räty
2011-06-09 13:41 Petteri Räty
2011-06-09 13:41 Petteri Räty
2011-06-09 8:15 Petteri Räty
2011-06-01 12:03 Petteri Räty
2011-06-01 12:03 Petteri Räty
2011-06-01 12:03 Petteri Räty
2011-06-01 12:03 Petteri Räty
2011-06-01 12:03 Petteri Räty
2011-05-23 14:34 Petteri Räty
2011-05-22 21:00 Petteri Räty
2011-05-11 7:19 Petteri Räty
2011-05-11 7:19 Petteri Räty
2011-05-07 12:25 Petteri Räty
2011-04-27 15:11 Petteri Räty
2011-04-20 11:26 Petteri Räty
2011-04-20 11:26 Petteri Räty
2011-04-20 11:26 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-17 10:58 Petteri Räty
2011-04-14 4:50 Petteri Räty
2011-04-14 4:50 Petteri Räty
2011-04-14 4:50 Petteri Räty
2011-04-12 7:19 Petteri Räty
2011-04-12 7:19 Petteri Räty
2011-04-12 7:19 Petteri Räty
2011-04-12 7:19 Petteri Räty
2011-04-11 6:50 Petteri Räty
2011-04-11 6:50 Petteri Räty
2011-04-11 6:50 Petteri Räty
2011-04-11 6:50 Petteri Räty
2011-04-11 5:21 Petteri Räty
2011-04-11 5:21 Petteri Räty
2011-04-11 5:21 Petteri Räty
2011-04-11 5:21 Petteri Räty
2011-04-09 6:27 Petteri Räty
2011-04-09 6:27 Petteri Räty
2011-04-09 6:27 Petteri Räty
2011-04-09 6:27 Petteri Räty
2011-04-08 14:26 Petteri Räty
2011-04-07 16:45 Petteri Räty
2011-04-07 7:48 Petteri Räty
2011-04-06 7:43 Petteri Räty
2011-03-30 12:48 Petteri Räty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=495848c85f4c54af8fed466d09bd474fbdf37568.betelgeuse@gentoo \
--to=betelgeuse@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox