aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr/grammar.lalrpop
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-01 14:38:37 +0200
committerDaniel <kingdread@gmx.de>2020-05-01 14:38:52 +0200
commited835ae90ea9f62dca0ac45adb7c4b0e0454da23 (patch)
treea52bcef88988930393efd72150549098441490c8 /src/fexpr/grammar.lalrpop
parent4479ceddd48ae062fa10879ceb199b771fa35add (diff)
downloadraidgrep-ed835ae90ea9f62dca0ac45adb7c4b0e0454da23.tar.gz
raidgrep-ed835ae90ea9f62dca0ac45adb7c4b0e0454da23.tar.bz2
raidgrep-ed835ae90ea9f62dca0ac45adb7c4b0e0454da23.zip
improve requoting heuristic
First of all, this allows : to be part of a word. This has been added because the account names start with a colon, so -player :Dunje should work. Furthermore, the re-quoting now also quotes strings that contain a .+*, as those are characters usually used in regular expressions. A command line like raidgrep -- -player "G.dric" should work, so we either have to re-quote words with a dot, or allow the dot to be part of a (lexical) word as well. For now, we're re-quoting it, but if it turns out to be too troublesome, we might change that.
Diffstat (limited to 'src/fexpr/grammar.lalrpop')
-rw-r--r--src/fexpr/grammar.lalrpop2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop
index 4cb1849..c0165ce 100644
--- a/src/fexpr/grammar.lalrpop
+++ b/src/fexpr/grammar.lalrpop
@@ -173,7 +173,7 @@ match {
r"\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d" => datetime,
r"\d\d\d\d-\d\d-\d\d" => date,
- r"\w+" => word,
+ r"[\w:]+" => word,
r#""[^"]*""# => string,
_