class documentation
class Line(SpecializedText): (source)
Second line of over- & underlined section title or transition marker.
Method | blank |
Transition marker. |
Method | eof |
Transition marker at end of section or document. |
Method | short |
Undocumented |
Method | state |
Undocumented |
Method | text |
Potential over- & underlined title. |
Method | underline |
Section title. |
Instance Variable | eofcheck |
Set to 0 while parsing sections, so that we don't catch the EOF. |
Inherited from SpecializedText
:
Method | invalid |
Not a compound element member. Abort this state machine. |
Inherited from Text
(via SpecializedText
):
Method | definition |
Undocumented |
Method | indent |
Definition list item. |
Method | literal |
Return a list of nodes. |
Method | quoted |
Undocumented |
Method | term |
Return a definition_list's term and optional classifiers. |
Class Variable | classifier |
Undocumented |
Class Variable | initial |
A list of transitions to initialize when a `State` is instantiated. Each entry is either a transition name string, or a (transition name, next state name) pair. See `make_transitions()`. Override in subclasses. |
Class Variable | patterns |
{Name: pattern} mapping, used by `make_transition()`. Each pattern may be a string or a compiled `re` pattern. Override in subclasses. |
Inherited from RSTState
(via SpecializedText
, Text
):
Method | __init__ |
Initialize a `StateSM` object; extends `State.__init__()`. |
Method | bof |
Called at beginning of file. |
Method | check |
Check for a valid subsection header. Return True or False. |
Method | goto |
Jump to input line `abs_line_offset`, ignoring jumps past the end. |
Method | inline |
Return 2 lists: nodes (text and inline elements), and system_messages. |
Method | nested |
Create a new StateMachine rooted at `node` and run it over the input `block`. Also keep track of optional intermediate blank lines and the required final one. |
Method | nested |
Create a new StateMachine rooted at `node` and run it over the input `block`. |
Method | new |
Append new subsection to document tree. On return, check level. |
Method | no |
Override `StateWS.no_match` to generate a system message. |
Method | paragraph |
Return a list (paragraph & messages) & a boolean: literal_block next? |
Method | runtime |
Initialize this `State` before running the state machine; called from `self.state_machine.run()`. |
Method | section |
Check for a valid subsection and create one if it checks out. |
Method | title |
Undocumented |
Method | unindent |
Undocumented |
Class Variable | nested |
Undocumented |
Instance Variable | document |
Undocumented |
Instance Variable | inliner |
Undocumented |
Instance Variable | memo |
Undocumented |
Instance Variable | nested |
Keyword arguments dictionary, passed to the `nested_sm` constructor. |
Instance Variable | parent |
Undocumented |
Instance Variable | reporter |
Undocumented |
Inherited from StateWS
(via SpecializedText
, Text
, RSTState
):
Method | add |
Add whitespace-specific transitions before those defined in subclass. |
Method | first |
Handle an indented text block (first line's indent known). |
Method | known |
Handle a known-indent text block. Extend or override in subclasses. |
Class Variable | ws |
Default initial whitespace transitions, added before those listed in `State.initial_transitions`. May be overridden in subclasses. |
Class Variable | ws |
Patterns for default whitespace transitions. May be overridden in subclasses. |
Instance Variable | indent |
The `StateMachine` class handling indented text blocks. |
Instance Variable | indent |
Keyword arguments dictionary, passed to the `indent_sm` constructor. |
Instance Variable | known |
The `StateMachine` class handling known-indented text blocks. |
Instance Variable | known |
Keyword arguments dictionary, passed to the `known_indent_sm` constructor. |
Inherited from State
(via SpecializedText
, Text
, RSTState
, StateWS
):
Method | add |
Add a transition to the start of the transition list. |
Method | add |
Add a list of transitions to the start of the transition list. |
Method | make |
Make & return a transition tuple based on `name`. |
Method | make |
Return a list of transition names and a transition mapping. |
Method | nop |
A "do nothing" transition method. |
Method | remove |
Remove a transition by `name`. |
Method | unlink |
Remove circular references to objects no longer required. |
Instance Variable | debug |
Debugging mode on/off. |
Instance Variable | nested |
The `StateMachine` class for handling nested processing. |
Instance Variable | state |
A reference to the controlling `StateMachine` object. |
Instance Variable | transition |
A list of transition names in search order. |
Instance Variable | transitions |
A mapping of transition names to 3-tuples containing (compiled_pattern, transition_method, next_state_name). Initialized as an instance attribute dynamically (instead of as a class attribute) because it may make forward references to patterns and methods in this or other classes. |