All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xe.xe_ElementDeclParser

java.lang.Object
   |
   +----xe.xe_Parser
           |
           +----xe.xe_ElementDeclParser

public class xe_ElementDeclParser
extends xe_Parser
Class xe_ElementDeclParser - parser for an element declaration within the DTD of an XML document, assuming the beginning (' or or - mixed or - elements


Constructor Index

 o xe_ElementDeclParser()

Method Index

 o parse()
Parse the body of an element declaration.
 o parseElementContent(xg_ElementDecl, xe_Token, xe_Token)
Parse the declaration of an 'elements' element, assuming that its name, opening parenthesis and the first token of the first Entry have already been parsed.
 o parseElementsEntry(xg_ElementDecl, xe_Token)
Parse an entry in the list of an 'elements' element, assuming that its first token has already been parsed.
 o parseElementsList(xg_ElementDecl, xe_Token, xe_Token)
Parse an entry in the list of an 'elements' element, assuming that its opening parenthesis and the token after it have already been parsed.
 o parseMixedContent(xg_ElementDecl, xe_Token, xe_Token)
Parse the declaration of a mixed element, assuming that its name, opening parenthesis and the '#' of #PCDATA have already been parsed (and the '#' is in the InputStartToken).
 o parseMixedNameList(xg_ElementDecl, xe_Token)
Parse the declaration of a mixed element which has a list of names, assuming that it has been parsed up to the '#PCDATA |'.
 o parseOccurrencesChar(xg_ElementDecl)
Parse the occurrences character ('?', '*', '+' - or it may be omitted altogether) which occurs at the end of an elements list.

Constructors

 o xe_ElementDeclParser
 public xe_ElementDeclParser()

Methods

 o parse
 public xg_Node parse() throws IOException
Parse the body of an element declaration.

Returns:
The parsed ElementDecl
Overrides:
parse in class xe_Parser
 o parseMixedContent
 public xe_Token parseMixedContent(xg_ElementDecl InputElementDecl,
                                   xe_Token InputOpenParenToken,
                                   xe_Token InputFirstToken) throws IOException
Parse the declaration of a mixed element, assuming that its name, opening parenthesis and the '#' of #PCDATA have already been parsed (and the '#' is in the InputStartToken). It should have the rough form: Name (#PCDATA ) Name (#PCDATA | Name; | Name; | ...)* ======>

Parameters:
InputElementDecl - The element declaration currently being parsed
InputOpenParenToken - The opening parenthesis token
InputFirstToken - The first token after the open parenthesis
 o parseMixedNameList
 public void parseMixedNameList(xg_ElementDecl InputElementDecl,
                                xe_Token InputOpeningOrToken) throws IOException
Parse the declaration of a mixed element which has a list of names, assuming that it has been parsed up to the '#PCDATA |'. This initial '|' is assumed to have already been parsed (and be in the InputStartToken), although we still need to check it actually is '|'. It should have the rough form: Name (#PCDATA | Name; | Name; | ...)* ==============>

Parameters:
InputElementDecl - The ElementDecl currently being parsed
InputOpeningOrToken - The opening or token
 o parseElementContent
 public xe_Token parseElementContent(xg_ElementDecl InputElementDecl,
                                     xe_Token InputOpenParenToken,
                                     xe_Token InputFirstToken) throws IOException
Parse the declaration of an 'elements' element, assuming that its name, opening parenthesis and the first token of the first Entry have already been parsed. It should have the rough form: Name ( Entry | Entry | ... )?|*|+ - choice Name ( Entry , Entry , ... )?|*|+ - seq ========> where Entry is either a 'choice' or 'seq'.

Parameters:
InputElementDecl - The ElementDecl currently being parsed
InputOpenParenToken - The opening parenthesis token
InputFirstToken - The first token after the open parenthesis
 o parseElementsList
 public xe_Token parseElementsList(xg_ElementDecl InputElementDecl,
                                   xe_Token InputOpenParenToken,
                                   xe_Token InputFirstToken) throws IOException
Parse an entry in the list of an 'elements' element, assuming that its opening parenthesis and the token after it have already been parsed. It should have the rough form: ( Entry | Entry | ... ) - choice or ( Entry , Entry , ... ) - seq ===> where Entry is either a Name, 'choice' or 'seq'.

Parameters:
InputElementDecl - The element declaration currently being parsed
InputOpenParenToken - The opening parenthesis token
InputFirstToken - The first token after the opening parenthesis
 o parseElementsEntry
 public xe_Token parseElementsEntry(xg_ElementDecl InputElementDecl,
                                    xe_Token InputFirstToken) throws IOException
Parse an entry in the list of an 'elements' element, assuming that its first token has already been parsed. It should have the rough form: Name or ( Entry | Entry | ... ) - choice or ( Entry , Entry , ... ) - seq where Entry is either a Name, 'choice' or 'seq'.

Parameters:
InputElementDecl - The ElementDecl currently being parsed
InputFirstToken - The first token
Returns:
The token which follows the entry
 o parseOccurrencesChar
 public xe_Token parseOccurrencesChar(xg_ElementDecl InputElementDecl) throws IOException
Parse the occurrences character ('?', '*', '+' - or it may be omitted altogether) which occurs at the end of an elements list.

Parameters:
InputElementDecl - The ElementDecl currently being parsed
Returns:
The token which follows the occurrences character

All Packages  Class Hierarchy  This Package  Previous  Next  Index