code: private void processFunction(final Expression expression, final FunctionDescriptor od, RulesTextProvider textProvider) throws ParserException
  	{
      	log.debug("processFunction");
  		if (!exact("(",textProvider))
  			throw new ParserException("Expected ')' after '"+od.getName()+"': ",textProvider);
  		Class<?> args[] = od.getParameterTypes();
  		for (int arg=1;arg <= args.length;arg++)
  		{
  			if (args[arg-1].equals(Expression.class))
  			{
  				Expression e = processExpression(textProvider);
  				expression.expression(e);
  			}
  			if (args[arg-1].equals(List.class))
  			{	
  				if (!xpath(textProvider))
  					throw new ParserException("expected list operand: ",textProvider);
  				// operand string found
  				String operand = textProvider.getLastToken();
  				if (!textProvider.findOperandInScope(operand))
  				{
  					throw new ParserException("Could not locate "+operand+" in scope",textProvider);
  				}
  				expression.list(textProvider.getLastToken(),textProvider.getLastResolvedField());
  			}
  			else
  			{
  	             Expression e = processExpression(textProvider);
  	             expression.expression(e);
  			}
  			if (arg < args.length)
  			{
  				// ensure arguments are separated by a comma
  			    exactOrError(",",textProvider);
  			}
  		}
  		exactOrError(")",textProvider);
  		expression.function(od);
  	}
docs: This puts the function and its arguments into the expression. It figures out
  the number of args and their type and makes sure they are all there (and the right type)
  
  @param expression
  @param od
  @throws ParserException