def attempt_ApplicationExpression(self, expression, context):
        if self.has_priority(APP, context):
            if self.inRange(0) and self.token(0) == Tokens.OPEN:
                if not isinstance(expression, LambdaExpression) and \
                   not isinstance(expression, ApplicationExpression) and \
                   not isinstance(expression, FunctionVariableExpression) and \
                   not isinstance(expression, ConstantExpression):
                    raise LogicalExpressionException(self._currentIndex,
                                         ("The function '%s" % expression) +
                                         "' is not a Lambda Expression, an "
                                         "Application Expression, or a "
                                         "functional predicate, so it may "
                                         "not take arguments.")
                self.token() #swallow then open paren
                #curry the arguments
                accum = self.make_ApplicationExpression(expression, self.process_next_expression(APP))
                while self.inRange(0) and self.token(0) == Tokens.COMMA:
                    self.token() #swallow the comma
                    accum = self.make_ApplicationExpression(accum, self.process_next_expression(APP))
                self.assertNextToken(Tokens.CLOSE)
                return accum
        return expression
Attempt to make an application expression.  The next tokens are
dataset/ETHPy150Open nltk/nltk/nltk/sem/logic.py/LogicParser.attempt_ApplicationExpression