Home | Trees | Index | Help |
|
---|
|
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)>
|
|||
Token | Token s are an intermediate data structure used
while constructing the structuring DOM tree for a formatted
docstring. |
||
TokenizationError | An error generated while tokenizing a formatted documentation string. | ||
StructuringError | An error generated while structuring a formatted documentation string. | ||
ColorizingError | An error generated while colorizing a paragraph. | ||
ParsedEpytextDocstring |
|
|||
xml.dom.minidom.Document |
parse(str,
errors=None)
Return a DOM tree encoding the contents of an epytext string. |
||
_pop_completed_blocks(token,
stack,
indent_stack)
Pop any completed blocks off the stack. |
|||
_add_para(doc,
para_token,
stack,
indent_stack,
errors)
Colorize the given paragraph, and add it to the DOM tree. |
|||
_add_section(doc,
heading_token,
stack,
indent_stack,
errors)
Add a new section to the DOM tree, with the given heading. |
|||
_add_list(doc,
bullet_token,
stack,
indent_stack,
errors)
Add a new list item or field to the DOM tree, with the given bullet or field tag. |
|||
int
|
_tokenize_doctest(lines,
start,
block_indent,
tokens,
errors)
Construct a Token containing the doctest block starting at lines[start] , and append it to tokens .
|
||
int
|
_tokenize_literal(lines,
start,
block_indent,
tokens,
errors)
Construct a Token containing the literal block starting at lines[start] , and append it to tokens .
|
||
int
|
_tokenize_listart(lines,
start,
bullet_indent,
tokens,
errors)
Construct Tokens for the bullet and the first paragraph of the list item (or field) starting at lines[start] , and
append them to tokens .
|
||
int
|
_tokenize_para(lines,
start,
para_indent,
tokens,
errors)
Construct a Token containing the paragraph starting at lines[start] , and append it to tokens .
|
||
list of Token
|
_tokenize(str,
errors)
Split a given formatted docstring into an ordered list of Token s, according to the epytext markup rules.
|
||
Element
|
_colorize(doc,
token,
errors,
tagName='para')
Given a string containing the contents of a paragraph, produce a DOM Element encoding that paragraph.
|
||
_colorize_graph(doc,
graph,
token,
end,
errors)
Eg: |
|||
_colorize_link(doc, link, token, end, errors) | |||
string
|
to_epytext(tree,
indent=0,
seclevel=0)
Convert a DOM document encoding epytext back to an epytext string. |
||
string
|
to_plaintext(tree,
indent=0,
seclevel=0)
Convert a DOM document encoding epytext to a string representation. |
||
string
|
to_debug(tree,
indent=4,
seclevel=0)
Convert a DOM document encoding epytext back to an epytext string, annotated with extra debugging information. |
||
xml.dom.minidom.Document |
pparse(str,
show_warnings=1,
show_errors=1,
stream=sys.stderr)
Pretty-parse the string. |
||
xml.dom.minidom.Document |
parse_as_literal(str)
Return a DOM document matching the epytext DTD, containing a single literal block. |
||
xml.dom.minidom.Document |
parse_as_para(str)
Return a DOM document matching the epytext DTD, containing a single paragraph. |
||
ParsedDocstring |
parse_docstring(docstring,
errors,
**options)
Parse the given docstring, which is formatted using epytext; and return a ParsedDocstring representation of its
contents.
|
|
|||
_HEADING_CHARS | |||
_ESCAPES | |||
SYMBOLS | A list of the of escape symbols that are supported by epydoc. | ||
_SYMBOLS | |||
__doc__ | |||
_COLORIZING_TAGS | |||
_LINK_COLORIZING_TAGS | |||
_BULLET_RE | |||
_LIST_BULLET_RE | |||
_FIELD_BULLET_RE | |||
_BRACE_RE | |||
_TARGET_RE | |||
GRAPH_TYPES |
|
errors .
|
|
|
|
|
lines[start] , and append it to tokens .
block_indent should be the indentation of the doctest block.
Any errors generated while tokenizing the doctest block will be appended
to errors .
|
lines[start] , and append it to tokens .
block_indent should be the indentation of the literal block.
Any errors generated while tokenizing the literal block will be appended
to errors .
|
lines[start] , and append
them to tokens . bullet_indent should be the
indentation of the list item. Any errors generated while tokenizing will
be appended to errors .
|
lines[start] , and append it to tokens .
para_indent should be the indentation of the paragraph .
Any errors generated while tokenizing the paragraph will be appended to
errors .
|
Token s, according to the epytext markup rules.
|
Element encoding that paragraph. Colorized regions are
represented using DOM Element s, and text is represented
using DOM Text s.
|
G{classtree} G{classtree x, y, z} G{importgraph} |
|
|
to_epytext , but to_plaintext removes inline
markup, prints escaped characters in unescaped form, etc.
|
|
|
|
|
ParsedDocstring representation of its contents.
|
|
_HEADING_CHARS
|
_ESCAPES
|
SYMBOLSA list of the of escape symbols that are supported by epydoc. Currently the following symbols are supported:
|
_SYMBOLS
|
__doc__
|
_COLORIZING_TAGS
|
_LINK_COLORIZING_TAGS
|
_BULLET_RE
|
_LIST_BULLET_RE
|
_FIELD_BULLET_RE
|
_BRACE_RE
|
_TARGET_RE
|
GRAPH_TYPES
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 3.0alpha2 on Tue Apr 11 17:31:40 2006 | http://epydoc.sf.net |