Home | Trees | Index | Help |
|
---|
Package docutils :: Package parsers :: Package rst :: Module states :: Class RSTState |
|
State
--+ |StateWS
--+ | RSTState
Body
,
Text
reStructuredText State superclass.
Contains methods used by all State subclasses.
Method Summary | |
---|---|
Initialize a StateSM object; extends State.__init__() . | |
Called at beginning of file. | |
Check for illegal structure: empty section, misplaced transitions. | |
Check for a valid subsection header. | |
Jump to input line abs_line_offset , ignoring jumps past the end. | |
Return 2 lists: nodes (text and inline elements), and system_messages. | |
Create a new StateMachine rooted at node and run it over the input
block . | |
Create a new StateMachine rooted at node and run it over the input
block . | |
Append new subsection to document tree. | |
Override StateWS.no_match to generate a system message. | |
Return a list (paragraph & messages) & a boolean: literal_block next? | |
Initialize this State before running the state machine; called from
self.state_machine.run() . | |
Check for a valid subsection and create one if it checks out. | |
title_inconsistent(self,
sourcetext,
lineno)
| |
unindent_warning(self,
node_name)
| |
Inherited from StateWS | |
Add whitespace-specific transitions before those defined in subclass. | |
Handle blank lines. | |
Handle an indented text block (first line's indent known). | |
Handle an indented text block. | |
Handle a known-indent text block. | |
Inherited from State | |
Add a transition to the start of the transition list. | |
Add a list of transitions to the start of the transition list. | |
Handle end-of-file. | |
Make & return a transition tuple based on name . | |
Return a list of transition names and a transition mapping. | |
A "do nothing" transition method. | |
Remove a transition by name . | |
Remove circular references to objects no longer required. |
Class Variable Summary | |
---|---|
class |
nested_sm = docutils.parsers.rst.states.NestedStateMachine |
Inherited from StateWS | |
NoneType |
indent_sm = None |
NoneType |
indent_sm_kwargs = None |
NoneType |
known_indent_sm = None |
NoneType |
known_indent_sm_kwargs = None |
tuple |
ws_initial_transitions = ('blank', 'indent')
|
dict |
ws_patterns = {'indent': ' +', 'blank': ' *$'}
|
Inherited from State | |
NoneType |
initial_transitions = None |
NoneType |
nested_sm_kwargs = None |
NoneType |
patterns = None |
Method Details |
---|
__init__(self,
state_machine,
debug=0)
|
bof(self, context)Called at beginning of file.
|
check_section(self, section)Check for illegal structure: empty section, misplaced transitions. |
check_subsection(self, source, style, lineno)Check for a valid subsection header. Return 1 (true) or None (false). When a new section is reached that isn't a subsection of the current section, back up the line count (use previous_line(-x)), then raise EOFError. The current StateMachine will finish, then the calling StateMachine can re-examine the title. This will work its way back up the calling chain until the correct section level isreached. @@@ Alternative: Evaluate the title, store the title info & level, and back up the chain until that level is reached. Store in memo? Or return in results? |
goto_line(self, abs_line_offset)Jump to input lineabs_line_offset , ignoring jumps past the end. |
inline_text(self, text, lineno)Return 2 lists: nodes (text and inline elements), and system_messages. |
nested_list_parse(self, block, input_offset, node, initial_state, blank_finish, blank_finish_state=None, extra_settings={}, match_titles=0, state_machine_class=None, state_machine_kwargs=None)Create a new StateMachine rooted atnode and run it over the input
block . Also keep track of optional intermdediate blank lines and the
required final one. |
nested_parse(self, block, input_offset, node, match_titles=0, state_machine_class=None, state_machine_kwargs=None)Create a new StateMachine rooted atnode and run it over the input
block . |
new_subsection(self, title, lineno, messages)Append new subsection to document tree. On return, check level. |
no_match(self, context, transitions)Override This code should never be run.
|
paragraph(self, lines, lineno)Return a list (paragraph & messages) & a boolean: literal_block next? |
runtime_init(self)Initialize thisState before running the state machine; called from
self.state_machine.run() .
|
section(self, title, source, style, lineno, messages)Check for a valid subsection and create one if it checks out. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Tue Jul 22 05:31:19 2003 | http://epydoc.sf.net |