From ed835ae90ea9f62dca0ac45adb7c4b0e0454da23 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 1 May 2020 14:38:37 +0200 Subject: 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. --- src/fexpr/grammar.lalrpop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fexpr/grammar.lalrpop') 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, _ -- cgit v1.2.3