throw new DSCException("Page expected, but none found");
}
//Process individual pages (and skip as necessary)
while (true) {
DSCCommentPage page = (DSCCommentPage)pageOrTrailer;
page.generate(gen);
pageOrTrailer = DSCTools.nextPageOrTrailer(parser, gen);
if (pageOrTrailer == null) {
reportInvalidDSC();
} else if (!DSCConstants.PAGE.equals(pageOrTrailer.getName())) {
pageOrTrailer.generate(gen);