mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 19:03:39 +02:00
...
This commit is contained in:
commit
d566f691bb
1 changed files with 4 additions and 3 deletions
|
|
@ -19,8 +19,8 @@
|
|||
import sys, string, operator
|
||||
|
||||
from calibre.utils.pyparsing import CaselessKeyword, Group, Forward, \
|
||||
CharsNotIn, Suppress, OneOrMore, MatchFirst, CaselessLiteral, \
|
||||
Optional, NoMatch, ParseException, QuotedString, Word
|
||||
CharsNotIn, Suppress, OneOrMore, MatchFirst, alphas, alphanums, \
|
||||
Optional, ParseException, QuotedString, Word
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.utils.icu import sort_key
|
||||
|
||||
|
|
@ -129,7 +129,8 @@ def sqp_initialize(self, locations, test=False, optimize=False):
|
|||
self.optimize = optimize
|
||||
# Define a token
|
||||
self.standard_locations = locations
|
||||
location = Optional(Word(string.ascii_letters+'#')+Suppress(':'), default='all')
|
||||
location = Optional(Word(alphas+'#', bodyChars=alphanums+'_')+Suppress(':'),
|
||||
default='all')
|
||||
word_query = CharsNotIn(string.whitespace + '()')
|
||||
#quoted_query = Suppress('"')+CharsNotIn('"')+Suppress('"')
|
||||
quoted_query = QuotedString('"', escChar='\\')
|
||||
|
|
|
|||
Loading…
Reference in a new issue