org.exolab.castor.xml.dtd.parser
Class DTDParser

java.lang.Object
  extended by org.exolab.castor.xml.dtd.parser.DTDParser
All Implemented Interfaces:
DTDParserConstants

public class DTDParser
extends java.lang.Object
implements DTDParserConstants

Main XML DTD parser. Parses DTD documents with parameter entity references already substituted by corresponding replacement text. Constructs DTD document object.

Version:
$Revision: 1.4 $ $Date: 2005/03/07 08:31:02 $
Author:
Alexander Totok

Nested Class Summary
(package private) static class DTDParser.JJCalls
           
 
Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 DTDParserTokenManager token_source
           
 
Fields inherited from interface org.exolab.castor.xml.dtd.parser.DTDParserConstants
AND, ANY, ATTR_VALUE_CHAR_DQ, ATTR_VALUE_CHAR_SQ, BEGIN_ATTR_DECL, BEGIN_COMMENT, BEGIN_ELEMENT_DECL, BEGIN_GE_DECL, BEGIN_NOTATION_DECL, CDATA, COMBINING_CHAR, COMMENT_CHAR, DASH, DEFAULT, DIGIT, EMPTY, END_ATTR_DECL, END_COMMENT, END_DQ_ATTR, END_DQ_GE, END_ELEMENT_DECL, END_GE_DECL, END_NOTATION_DECL, END_SQ_ATTR, END_SQ_GE, ENTITIES, ENTITY, EOF, EXTENDER, FIXED, GE_VAlUE_CHAR_DQ, GE_VAlUE_CHAR_SQ, ID, IDREF, IDREFS, IMPLIED, LEFT_PAREN, LEFT_PAREN_ATTR, LETTER, NAME, NAME_ATTR, NAME_GE, NAME_NOT, NAMECHAR, NDATA, NMTOKEN, NMTOKEN_ATTR, NMTOKENS, NOTATION, OR, OR_ATTR, PCDATA, PLUS, PUBIDCHAR_GE, PUBIDCHAR_NOT, Public_GE, PUBLIC_GE, Public_NOT, PUBLIC_NOT, PUBLITER_GE, PUBLITER_NOT, QUESTION, REQUIRED, RIGHT_PAREN, RIGHT_PAREN_ATTR, S, S_ATTR, S_GE, S_GE_PUB, S_NOT, S_NOT_SYS, STAR, START_DQ_ATTR, START_DQ_GE, START_SQ_ATTR, START_SQ_GE, SYSLITER_GE, SYSLITER_NOT, System_GE, SYSTEM_GE, System_NOT, SYSTEM_NOT, tokenImage, WithinAttrDecl, WithinAttrValueDQ, WithinAttrValueSQ, WithinComment, WithinGEDecl, WithinGEValueDQ, WithinGEValueSQ, WithinNotationDecl
 
Constructor Summary
DTDParser(CharStream stream)
           
DTDParser(DTDParserTokenManager tm)
           
 
Method Summary
 void AttlistDecl(DTDdocument document)
          Parsing procedure corresponding to the Attribute Declaration nonterminal.
 java.lang.String AttrValue()
          Parsing procedure corresponding to the Attribute Value nonterminal.
 void Comment()
          Parsing procedure corresponding to the Comment nonterminal.
 ContentParticle ContPart()
          Parsing procedure corresponding to the Content Particle nonterminal.
 void disable_tracing()
           
 void ElementDecl(DTDdocument document)
          Parsing procedure corresponding to the Element Declaration nonterminal.
 void enable_tracing()
           
 ParseException generateParseException()
           
 void GEntityDecl(DTDdocument document)
          Parsing procedure corresponding to the General Entity Declaration nonterminal.
 Token getNextToken()
           
 Token getToken(int index)
           
 java.lang.String GEValue()
          Parsing procedure corresponding to the General Entity Value nonterminal.
 DTDdocument Input()
          Main parsing method that starts parsing process.
 void Mixed(Element element)
          Parsing procedure corresponding to the Mixed Element Content nonterminal.
 void NotationDecl(DTDdocument document)
          Parsing procedure corresponding to the Notation Declaration nonterminal.
 void OccuranceSpecification(ContentParticle cp)
          Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".
 void ReInit(CharStream stream)
           
 void ReInit(DTDParserTokenManager tm)
           
 ContentParticle SeqOrChoiceContPart()
          Parsing procedure corresponding to the Content Particle nonterminal of the partial form: choice list of content particles, or sequence list of content particles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public DTDParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

DTDParser

public DTDParser(CharStream stream)

DTDParser

public DTDParser(DTDParserTokenManager tm)
Method Detail

Input

public final DTDdocument Input()
                        throws ParseException,
                               DTDException
Main parsing method that starts parsing process.

Returns:
corresponding DTD document object.
Throws:
ParseException
DTDException

ElementDecl

public final void ElementDecl(DTDdocument document)
                       throws ParseException,
                              DTDException
Parsing procedure corresponding to the Element Declaration nonterminal.

Parameters:
document - DTD document to add this Element Declaration to.
Throws:
ParseException
DTDException

Mixed

public final void Mixed(Element element)
                 throws ParseException,
                        DTDException
Parsing procedure corresponding to the Mixed Element Content nonterminal.

Parameters:
element - Element which content is being defined.
Throws:
ParseException
DTDException

ContPart

public final ContentParticle ContPart()
                               throws ParseException
Parsing procedure corresponding to the Content Particle nonterminal.

Returns:
corresponding Content Particle object.
Throws:
ParseException

SeqOrChoiceContPart

public final ContentParticle SeqOrChoiceContPart()
                                          throws ParseException
Parsing procedure corresponding to the Content Particle nonterminal of the partial form: choice list of content particles, or sequence list of content particles.

Returns:
corresponding Content Particle object.
Throws:
ParseException

OccuranceSpecification

public final void OccuranceSpecification(ContentParticle cp)
                                  throws ParseException
Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".

Parameters:
cp - Content Particle being processed.
Throws:
ParseException

AttlistDecl

public final void AttlistDecl(DTDdocument document)
                       throws ParseException,
                              DTDException
Parsing procedure corresponding to the Attribute Declaration nonterminal.

Parameters:
document - DTD document to add this Attribute Declaration to.
Throws:
ParseException
DTDException

AttrValue

public final java.lang.String AttrValue()
                                 throws ParseException
Parsing procedure corresponding to the Attribute Value nonterminal.

Returns:
String containing parsed value.
Throws:
ParseException

GEntityDecl

public final void GEntityDecl(DTDdocument document)
                       throws ParseException
Parsing procedure corresponding to the General Entity Declaration nonterminal.

Parameters:
document - DTD document to add this General Entity Declaration to.
Throws:
ParseException

GEValue

public final java.lang.String GEValue()
                               throws ParseException
Parsing procedure corresponding to the General Entity Value nonterminal.

Returns:
String containing parsed value.
Throws:
ParseException

NotationDecl

public final void NotationDecl(DTDdocument document)
                        throws ParseException,
                               DTDException
Parsing procedure corresponding to the Notation Declaration nonterminal.

Parameters:
document - DTD document to add this Notation Declaration to.
Throws:
ParseException
DTDException

Comment

public final void Comment()
                   throws ParseException
Parsing procedure corresponding to the Comment nonterminal.

Throws:
ParseException

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(DTDParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com