class XPathParser {

    protected ParenthesizedExpression parseParenthesizedExpr( TokenStream tokens ) {
        tokens.consume('(');
        if (tokens.canConsume(')')) {
            return new ParenthesizedExpression();
        }
        Component expr = collapse(parseExpr(tokens));
        tokens.consume(')');
        return new ParenthesizedExpression(expr);
    }

    public  XPathParser( TypeSystem context );

}