<s> from __future__ import absolute_import , unicode_literals , division <EOL> import operator <EOL> import re <EOL> OPERATOR_EQUAL = '<STR_LIT>' , '<STR_LIT>' <EOL> OPERATOR_IEQUAL = '<STR_LIT>' , '<STR_LIT:=>' <EOL> OPERATOR_LT = '<STR_LIT>' , '<STR_LIT:<>' <EOL> OPERATOR_LTE = '<STR_LIT>' , '<STR_LIT>' <EOL> OPERATOR_GT = '<STR_LIT>' , '<STR_LIT:>>' <EOL> OPERATOR_GTE = '<STR_LIT>' , '<STR_LIT>' <EOL> OPERATOR_REGEX = '<STR_LIT>' , '<STR_LIT>' <EOL> OPERATOR_ISNULL = '<STR_LIT>' , None <EOL> OPERATOR_ICONTAINS = '<STR_LIT>' , None <EOL> OPERATOR_FALLBACK = OPERATOR_IEQUAL <EOL> OPERATOR_SUFFIX_FALLBACK = OPERATOR_FALLBACK [ <NUM_LIT:0> ] <EOL> OPERATOR_EQUALITY_FALLBACK = OPERATOR_FALLBACK [ <NUM_LIT:1> ] <EOL> OPERATOR_MAP = { <EOL> OPERATOR_EQUAL : operator . eq , <EOL> OPERATOR_IEQUAL : lambda x , y : x . lower ( ) == y . lower ( ) , <EOL> OPERATOR_LT : operator . lt , <EOL> OPERATOR_LTE : operator . le , <EOL> OPERATOR_GT : operator . gt , <EOL> OPERATOR_GTE : operator . ge , <EOL> OPERATOR_REGEX : lambda x , y : re . search ( y , x ) , <EOL> OPERATOR_ISNULL : lambda x : x is None , <EOL> OPERATOR_ICONTAINS : operator . contains , <EOL> } <EOL> OPERATORS = set ( OPERATOR_MAP . keys ( ) ) <EOL> OPERATOR_SUFFIXES = set ( filter ( None , map ( operator . itemgetter ( <NUM_LIT:0> ) , OPERATORS ) ) ) <EOL> OPERATOR_EQUALITIES = set ( filter ( None , map ( operator . itemgetter ( <NUM_LIT:1> ) , OPERATORS ) ) ) <EOL> OPERATOR_SUFFIX_MAP = dict ( <EOL> filter ( operator . itemgetter ( <NUM_LIT:0> ) , <EOL> map ( lambda x : ( x [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] , x [ <NUM_LIT:1> ] ) , <EOL> OPERATOR_MAP . items ( ) ) ) ) <EOL> OPERATOR_EQUALITY_MAP = dict ( <EOL> filter ( operator . itemgetter ( <NUM_LIT:0> ) , <EOL> map ( lambda x : ( x [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] , x [ <NUM_LIT:1> ] ) , <EOL> OPERATOR_MAP . items ( ) ) ) ) <EOL> PATH_NEGATION = '<STR_LIT>' <EOL> OPERATOR_NEGATION = '<STR_LIT:!>' <EOL> NEGATION = ( PATH_NEGATION , OPERATOR_NEGATION ) <EOL> LOGICAL_AND = '<STR_LIT:&>' <EOL> LOGICAL_OR = '<STR_LIT:;>' <EOL> SEP_PATH = '<STR_LIT:.>' <EOL> SEP_VALUE = '<STR_LIT:U+002C>' <EOL> DIRECTIVE = '<STR_LIT::>' <EOL> GROUP_BEGIN = '<STR_LIT:(>' <EOL> GROUP_END = '<STR_LIT:)>' </s>
