Home | Trees | Index | Help |
|
---|
Package epydoc :: Package markup :: Module epytext |
|
doctest
module.
para
blocks:
<!ENTITY % colorized '(code | math | index | italic | bold | uri | link | symbol)*'> <!ELEMENT epytext ((para | literalblock | doctestblock | section | ulist | olist)*, fieldlist?)> <!ELEMENT para (#PCDATA | %colorized;)*> <!ELEMENT section (para | listblock | doctestblock | section | ulist | olist)+> <!ELEMENT fieldlist (field+)> <!ELEMENT field (tag, arg?, (para | listblock | doctestblock) ulist | olist)+)> <!ELEMENT tag (#PCDATA)> <!ELEMENT arg (#PCDATA)> <!ELEMENT literalblock (#PCDATA)> <!ELEMENT doctestblock (#PCDATA)> <!ELEMENT ulist (li+)> <!ELEMENT olist (li+)> <!ELEMENT li (para | literalblock | doctestblock | ulist | olist)+> <!ATTLIST li bullet NMTOKEN #IMPLIED> <!ATTLIST olist start NMTOKEN #IMPLIED> <!ELEMENT uri (name, target)> <!ELEMENT link (name, target)> <!ELEMENT name (#PCDATA | %colorized;)*> <!ELEMENT target (#PCDATA)> <!ELEMENT code (#PCDATA | %colorized;)*> <!ELEMENT math (#PCDATA | %colorized;)*> <!ELEMENT italic (#PCDATA | %colorized;)*> <!ELEMENT bold (#PCDATA | %colorized;)*> <!ELEMENT indexed (#PCDATA | %colorized;)> <!ELEMENT symbol (#PCDATA)>
Classes | |
---|---|
ParsedEpytextDocstring |
|
Token |
Token s are an intermediate data structure used while
constructing the structuring DOM tree for a formatted docstring. |
Exceptions | |
---|---|
ColorizingError |
An error generated while colorizing a paragraph. |
StructuringError |
An error generated while structuring a formatted documentation string. |
TokenizationError |
An error generated while tokenizing a formatted documentation string. |
Function Summary | |
---|---|
xml.dom.minidom.Document
|
Return a DOM tree encoding the contents of an epytext string. |
xml.dom.minidom.Document
|
Return a DOM document matching the epytext DTD, containing a single literal block. |
xml.dom.minidom.Document
|
Return a DOM document matching the epytext DTD, containing a single paragraph. |
ParsedDocstring
|
Parse the given docstring, which is formatted using epytext; and return a ParsedDocstring representation of its contents. |
xml.dom.minidom.Document
|
Pretty-parse the string. |
string
|
Convert a DOM document encoding epytext back to an epytext string, annotated with extra debugging information. |
string
|
Convert a DOM document encoding epytext back to an epytext string. |
string
|
Convert a DOM document encoding epytext to a string representation. |
Variable Summary | |
---|---|
list |
SYMBOLS : A list of the of escape symbols that are supported by epydoc. |
Function Details |
---|
parse(str, errors=None)Return a DOM tree encoding the contents of an epytext string. Any errors generated during parsing will be stored inerrors .
|
parse_as_literal(str)Return a DOM document matching the epytext DTD, containing a single literal block. That literal block will include the contents of the given string. This method is typically used as a fall-back when the parser fails.
|
parse_as_para(str)Return a DOM document matching the epytext DTD, containing a single paragraph. That paragraph will include the contents of the given string. This can be used to wrap some forms of automatically generated information (such as type names) in paragraphs.
|
parse_docstring(docstring, errors, **options)Parse the given docstring, which is formatted using epytext; and return aParsedDocstring representation of its
contents.
|
pparse(str, show_warnings=1, show_errors=1, stream=<cStringIO.StringO object at 0x8504f68>)Pretty-parse the string. This parses the string, and catches any warnings or errors produced. Any warnings and errors are displayed, and the resulting DOM parse structure is returned.
|
to_debug(tree, indent=4, seclevel=0)Convert a DOM document encoding epytext back to an epytext string, annotated with extra debugging information. This function is similar toto_epytext , but it adds explicit
information about where different blocks begin, along the left
margin.
|
to_epytext(tree, indent=0, seclevel=0)Convert a DOM document encoding epytext back to an epytext string. This is the inverse operation fromparse . I.e., assuming there are no
errors, the following is true:
|
to_plaintext(tree, indent=0, seclevel=0)Convert a DOM document encoding epytext to a string representation. This representation is similar to the string generated byto_epytext , but to_plaintext removes inline
markup, prints escaped characters in unescaped form, etc.
|
Variable Details |
---|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 20 17:46:14 2004 | http://epydoc.sf.net |