class XPathParser {

    protected List<Component> parsePredicates( TokenStream tokens ) {
        List<Component> predicates = new ArrayList<Component>();
        while (tokens.canConsume('[')) {
            predicates.add(collapse(parseExpr(tokens)));
            tokens.consume(']');
        }
        return predicates;
    }

    public  XPathParser( TypeSystem context );

}