Package docutils :: Package parsers :: Package rst :: Module states :: Class Text
[show private | hide private]
[frames | no frames]

Class Text

State --+        
        |        
  StateWS --+    
            |    
     RSTState --+
                |
               Text

Known Subclasses:
SpecializedText

Classifier of second line of a text block.

Could be a paragraph, a definition list item, or a title.


Method Summary
  blank(self, match, context, next_state)
End of paragraph.
  definition_list_item(self, termline)
  eof(self, context)
Handle end-of-file.
  indent(self, match, context, next_state)
Definition list item.
  literal_block(self)
Return a list of nodes.
  term(self, lines, lineno)
Return a definition_list's term and optional classifier.
  text(self, match, context, next_state)
Paragraph.
  underline(self, match, context, next_state)
Section title.
    Inherited from RSTState
  __init__(self, state_machine, debug)
Initialize a StateSM object; extends State.__init__().
  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.
  goto_line(self, abs_line_offset)
Jump to input line abs_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, extra_settings, match_titles, state_machine_class, state_machine_kwargs)
Create a new StateMachine rooted at node and run it over the input block.
  nested_parse(self, block, input_offset, node, match_titles, state_machine_class, state_machine_kwargs)
Create a new StateMachine rooted at node and run it over the input block.
  new_subsection(self, title, lineno, messages)
Append new subsection to document tree.
  no_match(self, context, transitions)
Override StateWS.no_match to generate a system message.
  paragraph(self, lines, lineno)
Return a list (paragraph & messages) & a boolean: literal_block next?
  runtime_init(self)
Initialize this State 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.
  title_inconsistent(self, sourcetext, lineno)
  unindent_warning(self, node_name)
    Inherited from StateWS
  add_initial_transitions(self)
Add whitespace-specific transitions before those defined in subclass.
  first_known_indent(self, match, context, next_state)
Handle an indented text block (first line's indent known).
  known_indent(self, match, context, next_state)
Handle a known-indent text block.
    Inherited from State
  add_transition(self, name, transition)
Add a transition to the start of the transition list.
  add_transitions(self, names, transitions)
Add a list of transitions to the start of the transition list.
  make_transition(self, name, next_state)
Make & return a transition tuple based on name.
  make_transitions(self, name_list)
Return a list of transition names and a transition mapping.
  nop(self, match, context, next_state)
A "do nothing" transition method.
  remove_transition(self, name)
Remove a transition by name.
  unlink(self)
Remove circular references to objects no longer required.

Class Variable Summary
list initial_transitions = [('underline', 'Body'), ('text', '...
dict patterns = {'indent': ' +', 'blank': ' *$', 'text': '', ...
    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 nested_sm = None                                                                  
NoneType nested_sm_kwargs = None                                                                  

Method Details

blank(self, match, context, next_state)

End of paragraph.
Overrides:
docutils.statemachine.StateWS.blank

eof(self, context)

Handle end-of-file. Return empty result.

Override in subclasses.

Parameter context: application-defined storage.

Overrides:
docutils.statemachine.State.eof (inherited documentation)

indent(self, match, context, next_state)

Definition list item.
Overrides:
docutils.statemachine.StateWS.indent

literal_block(self)

Return a list of nodes.

term(self, lines, lineno)

Return a definition_list's term and optional classifier.

text(self, match, context, next_state)

Paragraph.

underline(self, match, context, next_state)

Section title.

Class Variable Details

initial_transitions

Type:
list
Value:
[('underline', 'Body'), ('text', 'Body')]                              

patterns

Type:
dict
Value:
{'blank': ' *$',
 'indent': ' +',
 'text': '',
 'underline': '([!-/:-@[-`{-~])\\1* *$'}                               

Generated by Epydoc 2.0 on Tue Jul 22 05:31:33 2003 http://epydoc.sf.net