Classes | |
class | B |
class | BL |
class | DL |
class | E |
class | Formatter |
class | L |
class | Lexer |
class | PL |
class | Terminal |
Functions | |
def | __init__ |
def | __init__ |
def | __str__ |
def | addAttr |
def | addFancyText |
def | addText |
def | back |
def | getpos |
def | lex |
def | next |
def | parse_DI |
def | parse_DIV |
def | parse_DL |
def | parse_P |
def | parse_Terminal |
def | parse_UL |
def | parse_ULI |
def | parse_V |
def | rewrite |
def | seek |
def | toDOM |
def | toTextNode |
Variables | |
string | __author__ = 'Andrea Vedaldi' |
string | __date__ = '2008-01-01' |
string | __description__ = 'MDoc formatting module' |
string | __license__ = 'BSD' |
__long_description__ = __doc__ | |
string | __mpname__ = 'MDocFormatter' |
string | __version__ = '0.1' |
tuple | formatter = Formatter(lines, {'BL':'http://www.google.com'}, 'a') |
funcs | |
indentinit | |
tuple | lines = text.splitlines() |
linktype | |
pos | |
string | text |
tokens | |
xmldoc |
def formatter.__init__ | ( | self, | |
lines | |||
) |
l = Lexer(LINES) parses the array of strings LINES. Lexer has a head pointing to the current line. The head can be controlled by the following methods: l.next() advances the head and fetches the next terminal. l.back() moves back the head. l.getpos() returns the head position. l.seek(POS) sets the head position to POS.
Definition at line 136 of file formatter.py.
def formatter.__init__ | ( | self, | |
lines, | |||
funcs = {} , |
|||
linktype = 'a' |
|||
) |
f = Formatter(LINES) parses the array of strings LINES. f = Formatter(LINES, FUNCS) takes the dictionary of functions FUNCS. Function names must be uppercase. The dictionary entries are used to cross link functions in the generated documentation. Formatter(LINES, FUNCS, LINKTYPE) produces links of the specified type. Use 'a' for HTML anchors and 'wiki' for MediaWiki style links. f.toDOM() process the data to construct an XML (HTML) representation of them.
Definition at line 184 of file formatter.py.
def formatter.__str__ | ( | self | ) |
Definition at line 161 of file formatter.py.
def formatter.addAttr | ( | self, | |
tag, | |||
attr, | |||
val | |||
) |
Definition at line 200 of file formatter.py.
def formatter.addFancyText | ( | self, | |
tag, | |||
s | |||
) |
Definition at line 209 of file formatter.py.
def formatter.addText | ( | self, | |
tag, | |||
s | |||
) |
Definition at line 205 of file formatter.py.
def formatter.back | ( | self | ) |
Definition at line 152 of file formatter.py.
def formatter.getpos | ( | self | ) |
Definition at line 158 of file formatter.py.
def formatter.lex | ( | line | ) |
Parse the string LINE to a terminal symbol. Each line corresponds to exactly one terminal type. Terminal types are the leaf of a hierarchy of types.
Definition at line 83 of file formatter.py.
def formatter.next | ( | self | ) |
Definition at line 142 of file formatter.py.
def formatter.parse_DI | ( | self, | |
indent | |||
) |
Definition at line 469 of file formatter.py.
def formatter.parse_DIV | ( | self, | |
indent | |||
) |
Definition at line 293 of file formatter.py.
def formatter.parse_DL | ( | self, | |
indent | |||
) |
Definition at line 453 of file formatter.py.
def formatter.parse_P | ( | self, | |
indent | |||
) |
Definition at line 329 of file formatter.py.
def formatter.parse_Terminal | ( | self, | |
T | |||
) |
Definition at line 281 of file formatter.py.
def formatter.parse_UL | ( | self, | |
indent | |||
) |
Definition at line 393 of file formatter.py.
def formatter.parse_ULI | ( | self, | |
indent | |||
) |
Definition at line 409 of file formatter.py.
def formatter.parse_V | ( | self, | |
indent | |||
) |
Definition at line 363 of file formatter.py.
def formatter.rewrite | ( | self, | |
str | |||
) |
Definition at line 155 of file formatter.py.
def formatter.seek | ( | self, | |
pos | |||
) |
Definition at line 149 of file formatter.py.
def formatter.toDOM | ( | self | ) |
Definition at line 533 of file formatter.py.
def formatter.toTextNode | ( | self, | |
s | |||
) |
Definition at line 197 of file formatter.py.
string formatter::__author__ = 'Andrea Vedaldi' |
Definition at line 50 of file formatter.py.
string formatter::__date__ = '2008-01-01' |
Definition at line 46 of file formatter.py.
string formatter::__description__ = 'MDoc formatting module' |
Definition at line 47 of file formatter.py.
string formatter::__license__ = 'BSD' |
Definition at line 49 of file formatter.py.
formatter::__long_description__ = __doc__ |
Definition at line 48 of file formatter.py.
string formatter::__mpname__ = 'MDocFormatter' |
Definition at line 44 of file formatter.py.
string formatter::__version__ = '0.1' |
Definition at line 45 of file formatter.py.
tuple formatter::formatter = Formatter(lines, {'BL':'http://www.google.com'}, 'a') |
Definition at line 628 of file formatter.py.
Definition at line 184 of file formatter.py.
Definition at line 184 of file formatter.py.
tuple formatter::lines = text.splitlines() |
Definition at line 627 of file formatter.py.
Definition at line 184 of file formatter.py.
Definition at line 136 of file formatter.py.
string formatter::text |
Definition at line 548 of file formatter.py.
Definition at line 136 of file formatter.py.
Definition at line 184 of file formatter.py.