public <T> T parse(String body, Class<T> rootClass) {
        TokenStream stream = setupTokenStream(body);
        T result = parseClass(new ClassAccessor<T>(rootClass), stream);
        String next = stream.next();
        if (next != null)
            throw new ParseException("There were unconsumed tokens left in the stream: " + next);
        return result;
    }