def METHOD_NAME(self):
    name = self.ident()
    op = self.lex.get_token()
    if op == "(":
        parsers = {
            "not": self.parse_not,
            "any": self.parse_any,
            "all": self.parse_all,
        }
        func = parsers.get(name)
        if not func:
            raise Exception("invalid term %s in %s" % (name, self.text))
        return func()
    if op == "=":
        if name not in self.valid_variables:
            raise Exception("unknown variable %r in expression" % (name,))
        # remove shell quote from value so can test things with period in them, e.g "18.04"
        unquoted = " ".join(shlex.split(self.lex.get_token()))
        return EqualExpr(name, unquoted)
    raise Exception(
        "Unexpected token sequence '%s %s' in %s" % (name, op, self.text)
    )