From ce6859d4a88ace4128b12f7449aa950124e2fae5 Mon Sep 17 00:00:00 2001 From: Lily <112970249+lilyhuang-github@users.noreply.github.com> Date: Thu, 3 Apr 2025 21:08:31 -0400 Subject: [PATCH] update hnadling of keywords: AND, OR, NOT in card search --- cockatrice/src/game/filters/filter_string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/game/filters/filter_string.cpp b/cockatrice/src/game/filters/filter_string.cpp index 039dcdb9f..21822a32d 100644 --- a/cockatrice/src/game/filters/filter_string.cpp +++ b/cockatrice/src/game/filters/filter_string.cpp @@ -12,13 +12,13 @@ Start <- QueryPartList ~ws <- [ ]+ QueryPartList <- ComplexQueryPart ( ws ("and" ws)? ComplexQueryPart)* ws* -ComplexQueryPart <- SomewhatComplexQueryPart ws $or<[oO][rR]> ws ComplexQueryPart / SomewhatComplexQueryPart +ComplexQueryPart <- SomewhatComplexQueryPart ws $or<[O][R]> ws ComplexQueryPart / SomewhatComplexQueryPart SomewhatComplexQueryPart <- [(] QueryPartList [)] / QueryPart QueryPart <- NotQuery / SetQuery / RarityQuery / CMCQuery / FormatQuery / PowerQuery / ToughnessQuery / ColorQuery / TypeQuery / OracleQuery / FieldQuery / GenericQuery -NotQuery <- ('not' ws/'-') SomewhatComplexQueryPart +NotQuery <- ('NOT' ws/'-') SomewhatComplexQueryPart SetQuery <- ('e'/'set') [:] FlexStringValue OracleQuery <- 'o' [:] RegexString