예제 #1
0
def generate_any(expression, genstate):
    if expression.invert:
        # I don't use "IsNotIn" since that allows EOF
        return [(None, TT.IsIn, convert_re.invert(expression.chars))]

    else:
        return [(None, TT.IsIn, expression.chars)]
예제 #2
0
def generate_any(expression, genstate):
    if expression.invert:
        # I don't use "IsNotIn" since that allows EOF
        return [(None, TT.IsIn, convert_re.invert(expression.chars))]
                             
    else:
        return [(None, TT.IsIn, expression.chars)]
예제 #3
0
def generate_literal(expression, genstate):
    if expression.invert:
        # Can't use "InNot" since it can match EOF
        return [(None, TT.IsIn, convert_re.invert(expression.char))]

    else:
        return [(None, TT.Is, expression.char)]
예제 #4
0
def generate_literal(expression, genstate):
    if expression.invert:
        # Can't use "InNot" since it can match EOF
        return [(None, TT.IsIn, convert_re.invert(expression.char))]
                             
    else:
        return [(None, TT.Is, expression.char)]