18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package build.tools.dtdbuilder; 27 28 import javax.swing.text.html.parser.*; 29 import java.net.URL; 30 import java.io.IOException; 31 import java.io.InputStream; 32 import java.util.Enumeration; 33 import java.util.Vector; 34 import java.util.Hashtable; 35 import java.util.BitSet; 36 import java.text.MessageFormat; 37 38 import sun.misc.MessageUtils; 39 40 /** 41 * A parser for DTDs. This parser roughly corresponds to the 42 * rules specified in "The SGML Handbook" by Charles F. Goldfarb. 43 * The end result of parsing the stream is a DTD object. 44 * 45 * 46 * @see DTD 47 * @see DTDInputStream 48 * @author Arthur van Hoff 49 */ 50 final 51 class DTDParser implements DTDConstants { 52 DTDBuilder dtd; 53 DTDInputStream in; 54 int ch; 55 char str[] = new char[128]; 56 int strpos = 0; 57 int nerrors = 0; 58 59 /** | 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package build.tools.dtdbuilder; 27 28 import javax.swing.text.html.parser.*; 29 import java.net.URL; 30 import java.io.IOException; 31 import java.io.InputStream; 32 import java.util.Enumeration; 33 import java.util.Vector; 34 import java.util.Hashtable; 35 import java.util.BitSet; 36 import java.text.MessageFormat; 37 38 /** 39 * A parser for DTDs. This parser roughly corresponds to the 40 * rules specified in "The SGML Handbook" by Charles F. Goldfarb. 41 * The end result of parsing the stream is a DTD object. 42 * 43 * 44 * @see DTD 45 * @see DTDInputStream 46 * @author Arthur van Hoff 47 */ 48 final 49 class DTDParser implements DTDConstants { 50 DTDBuilder dtd; 51 DTDInputStream in; 52 int ch; 53 char str[] = new char[128]; 54 int strpos = 0; 55 int nerrors = 0; 56 57 /** |