From 643560ffa2d08bdca14cd37f9aebc3a96eaf9455 Mon Sep 17 00:00:00 2001 From: Mathieu Darse Date: Tue, 3 Nov 2015 13:26:05 +0100 Subject: [PATCH] =?UTF-8?q?Move=20catch=20all=20logic=20out=20of=20=C2=AB?= =?UTF-8?q?=C2=A0text=C2=A0=C2=BB=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent character greediness when symbols like colon appear after the start of a string. Needed for implicit AND with key value pairs. --- grammar/query.pp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/grammar/query.pp b/grammar/query.pp index ef6746fa13..da9da96e4d 100644 --- a/grammar/query.pp +++ b/grammar/query.pp @@ -41,7 +41,13 @@ #query: ::space::? primary()? ::space::? + | catch_all() +catch_all: + ( + | + | keyword() + | symbol() #text )* // Boolean operators @@ -101,13 +107,9 @@ term: // Free text handling text: - string_keyword_symbol() - ( ? string_keyword_symbol() )* - ( ::space::? context_block() )? - -string_keyword_symbol: string() - | symbol() + ( ? string() )* + ( ::space::? context_block() )? context_block: ::parenthese_:: ::space::? context() ::space::? ::_parenthese:: #context