org.exolab.castor.xml.dtd.parser

Class DTDParser

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.1.1.1 $ $Date: 2003/03/03 07:09:23 $
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, NAMECHAR, NAME_ATTR, NAME_GE, NAME_NOT, NDATA, NMTOKEN, NMTOKENS, NMTOKEN_ATTR, NOTATION, OR, OR_ATTR, PCDATA, PLUS, PUBIDCHAR_GE, PUBIDCHAR_NOT, PUBLIC_GE, PUBLIC_NOT, PUBLITER_GE, PUBLITER_NOT, Public_GE, Public_NOT, QUESTION, REQUIRED, RIGHT_PAREN, RIGHT_PAREN_ATTR, S, STAR, START_DQ_ATTR, START_DQ_GE, START_SQ_ATTR, START_SQ_GE, SYSLITER_GE, SYSLITER_NOT, SYSTEM_GE, SYSTEM_NOT, S_ATTR, S_GE, S_GE_PUB, S_NOT, S_NOT_SYS, System_GE, System_NOT, WithinAttrDecl, WithinAttrValueDQ, WithinAttrValueSQ, WithinComment, WithinGEDecl, WithinGEValueDQ, WithinGEValueSQ, WithinNotationDecl, tokenImage

Constructor Summary

DTDParser(CharStream stream)
DTDParser(DTDParserTokenManager tm)

Method Summary

void
AttlistDecl(DTDdocument document)
Parsing procedure corresponding to the Attribute Declaration nonterminal.
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
ElementDecl(DTDdocument document)
Parsing procedure corresponding to the Element Declaration nonterminal.
String
GEValue()
Parsing procedure corresponding to the General Entity Value nonterminal.
void
GEntityDecl(DTDdocument document)
Parsing procedure corresponding to the General Entity Declaration 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.
void
disable_tracing()
void
enable_tracing()
ParseException
generateParseException()
Token
getNextToken()
Token
getToken(int index)

Field Details

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public DTDParserTokenManager token_source

Constructor Details

DTDParser

public DTDParser(CharStream stream)

DTDParser

public DTDParser(DTDParserTokenManager tm)

Method Details

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.

AttrValue

public final String AttrValue()
            throws ParseException
Parsing procedure corresponding to the Attribute Value nonterminal.
Returns:
String containing parsed value.

Comment

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

ContPart

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

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.

GEValue

public final String GEValue()
            throws ParseException
Parsing procedure corresponding to the General Entity Value nonterminal.
Returns:
String containing parsed value.

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.

Input

public final DTDdocument Input()
            throws ParseException,
                   DTDException
Main parsing method that starts parsing process.
Returns:
corresponding DTD document object.

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.

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.

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.

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(DTDParserTokenManager tm)

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.

disable_tracing

public final void disable_tracing()

enable_tracing

public final void enable_tracing()

generateParseException

public final ParseException generateParseException()

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

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