class XPathParser {

    protected FunctionCall parseFunctionCall( TokenStream tokens ) {
        NameTest name = parseQName(tokens);
        tokens.consume("(");
        List<Component> args = new ArrayList<Component>();
        if (!tokens.matches(')')) {
            do {
                args.add(collapse(parseExprSingle(tokens)));
            } while (tokens.canConsume(","));
        }
        tokens.consume(")");
        return new FunctionCall(name, args);
    }

    public  XPathParser( TypeSystem context );

}