--- jaxb-dtd-parser-1.5.1/dtd-parser/src/main/java/com/sun/xml/dtdparser/DTDParser.java 2025-10-23 17:55:00.940559238 +0200 +++ jaxb-dtd-parser-1.5.1/dtd-parser/src/main/java/com/sun/xml/dtdparser/DTDParser.java 2025-10-23 17:57:15.832553532 +0200 @@ -281,17 +281,14 @@ entities.put(entityName, entity); } - //////////////////////////////////////////////////////////////// - // // parsing is by recursive descent, code roughly // following the BNF rules except tweaked for simple // lookahead. rules are more or less in numeric order, // except where code sharing suggests other structures. - // + // a classic benefit of recursive descent parsers: it's // relatively easy to get diagnostics that make sense. - // - //////////////////////////////////////////////////////////////// + private void parseInternal(InputSource input) throws IOException, SAXException { @@ -2110,18 +2107,14 @@ return true; } - //////////////////////////////////////////////////////////////// - // // UTILITIES - // - //////////////////////////////////////////////////////////////// + private char getc() throws IOException, SAXException { if (!doLexicalPE) { return in.getc(); } - // // External parameter entities get funky processing of '%param;' // references. It's not clearly defined in the XML spec; but it // boils down to having those refs be _lexical_ in most cases to @@ -2136,7 +2129,7 @@ // it can be dealt with more consistently. // // Also, there are some validity constraints in this area. - // + char c; while (in.isEOF()) {