Move catch all logic out of « text » rule

Prevent character greediness when symbols like colon appear after the start of a string. Needed for implicit AND with key value pairs.
This commit is contained in:
Mathieu Darse
2015-11-03 13:26:05 +01:00
parent 548f57bd93
commit 643560ffa2

View File

@@ -41,7 +41,13 @@
#query:
::space::? primary()? ::space::?
| catch_all()
catch_all:
( <space>
| <word>
| keyword()
| symbol() #text )*
// Boolean operators
@@ -101,13 +107,9 @@ term:
// Free text handling
text:
string_keyword_symbol()
( <space>? string_keyword_symbol() )*
( ::space::? context_block() )?
string_keyword_symbol:
string()
| symbol()
( <space>? string() )*
( ::space::? context_block() )?
context_block:
::parenthese_:: ::space::? context() ::space::? ::_parenthese:: #context