Home | Trees | Index | Help |
|
---|
Package docutils :: Module statemachine :: Class StateMachineWS |
|
StateMachine
--+
|
StateMachineWS
NestedStateMachine
,
RSTStateMachine
,
SearchStateMachineWS
StateMachine
subclass specialized for whitespace recognition.
There are three methods provided for extracting indented text blocks:
get_indented()
: use when the indent is unknown.get_known_indented()
: use when the indent is known for all lines.get_first_known_indented()
: use when only the first line's indent is
known.Method Summary | |
---|---|
Return an indented block and info. | |
Return a block of indented lines of text, and info. | |
Return an indented block and info. | |
Inherited from StateMachine | |
Initialize a StateMachine object; add state objects. | |
Return line number of current line (counting from 1). | |
Return line offset of current line, from beginning of file. | |
Initialize & add a state_class (State subclass) object. | |
Add state_classes (a list of State subclasses). | |
Return 1 if the input is at or before beginning-of-file. | |
Return 1 if the input is at or past end-of-file. | |
The observer parameter is a function or bound method which takes two
arguments, the source and offset of the current line. | |
Examine one line of input for a transition match & execute its method. | |
| |
Report error details. | |
Return current state object; set it first if next_state given. | |
Return a contiguous block of text. | |
Jump to absolute line offset line_offset , load and return it. | |
| |
Return 1 if the next line is blank or non-existant. | |
Return the result of a regular expression match. | |
Load self.line with the n 'th next line and return it. | |
| |
Load self.line with the n 'th previous line and return it. | |
Run the state machine on input_lines . | |
Initialize self.states . | |
Remove circular references to objects no longer required. |
Method Details |
---|
get_first_known_indented(self, indent, until_blank=0, strip_indent=1, strip_top=1)Return an indented block and info. Extract an indented block where the indent is known for the first line and unknown for all other lines.
|
get_indented(self, until_blank=0, strip_indent=1)Return a block of indented lines of text, and info. Extract an indented block where the indent is unknown for all lines.
|
get_known_indented(self, indent, until_blank=0, strip_indent=1)Return an indented block and info. Extract an indented block where the indent is known for all lines.
Starting with the current line, extract the entire text block with at
least
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Tue Jul 22 05:30:49 2003 | http://epydoc.sf.net |