![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, state_machine, debug=False) | |
| add_initial_transitions (self) | |
| blank (self, match, context, next_state) | |
| indent (self, match, context, next_state) | |
| known_indent (self, match, context, next_state) | |
| first_known_indent (self, match, context, next_state) | |
Public Member Functions inherited from docutils.statemachine.State | |
| runtime_init (self) | |
| unlink (self) | |
| add_transitions (self, names, transitions) | |
| add_transition (self, name, transition) | |
| remove_transition (self, name) | |
| make_transition (self, name, next_state=None) | |
| make_transitions (self, name_list) | |
| no_match (self, context, transitions) | |
| bof (self, context) | |
| eof (self, context) | |
| nop (self, match, context, next_state) | |
Public Attributes | |
| patterns | |
| ws_patterns | |
| ws_initial_transitions | |
Public Attributes inherited from docutils.statemachine.State | |
| transition_order | |
| transitions | |
| state_machine | |
| debug | |
Static Public Attributes | |
| indent_sm = None | |
| indent_sm_kwargs = None | |
| known_indent_sm = None | |
| known_indent_sm_kwargs = None | |
| dict | ws_patterns |
| tuple | ws_initial_transitions = ('blank', 'indent') |
Static Public Attributes inherited from docutils.statemachine.State | |
| patterns = None | |
| initial_transitions = None | |
| nested_sm = None | |
| nested_sm_kwargs = None | |
State superclass specialized for whitespace (blank lines & indents). Use this class with `StateMachineWS`. The transitions 'blank' (for blank lines) and 'indent' (for indented text blocks) are added automatically, before any other transitions. The transition method `blank()` handles blank lines and `indent()` handles nested indented blocks. Indented blocks trigger a new state machine to be created by `indent()` and run. The class of the state machine to be created is in `indent_sm`, and the constructor keyword arguments are in the dictionary `indent_sm_kwargs`. The methods `known_indent()` and `firstknown_indent()` are provided for indented blocks where the indent (all lines' and first line's only, respectively) is known to the transition method, along with the attributes `known_indent_sm` and `known_indent_sm_kwargs`. Neither transition method is triggered automatically.
| docutils.statemachine.StateWS.__init__ | ( | self, | |
| state_machine, | |||
debug = False |
|||
| ) |
Initialize a `StateSM` object; extends `State.__init__()`. Check for indent state machine attributes, set defaults if not set.
Reimplemented from docutils.statemachine.State.
Reimplemented in docutils.parsers.rst.states.RSTState, and docutils.parsers.rst.states.QuotedLiteralBlock.
| docutils.statemachine.StateWS.add_initial_transitions | ( | self | ) |
Add whitespace-specific transitions before those defined in subclass. Extends `State.add_initial_transitions()`.
Reimplemented from docutils.statemachine.State.
| docutils.statemachine.StateWS.blank | ( | self, | |
| match, | |||
| context, | |||
| next_state | |||
| ) |
Handle blank lines. Does nothing. Override in subclasses.
Reimplemented in docutils.parsers.rst.states.Text, docutils.parsers.rst.states.Line, and docutils.parsers.rst.states.QuotedLiteralBlock.
| docutils.statemachine.StateWS.first_known_indent | ( | self, | |
| match, | |||
| context, | |||
| next_state | |||
| ) |
Handle an indented text block (first line's indent known). Extend or override in subclasses. Recursively run the registered state machine for known-indent indented blocks (`self.known_indent_sm`). The indent is the length of the match, ``match.end()``.
| docutils.statemachine.StateWS.indent | ( | self, | |
| match, | |||
| context, | |||
| next_state | |||
| ) |
Handle an indented text block. Extend or override in subclasses. Recursively run the registered state machine for indented blocks (`self.indent_sm`).
Reimplemented in docutils.parsers.rst.states.Body, docutils.parsers.rst.states.Text, docutils.parsers.rst.states.Definition, and docutils.parsers.rst.states.QuotedLiteralBlock.
| docutils.statemachine.StateWS.known_indent | ( | self, | |
| match, | |||
| context, | |||
| next_state | |||
| ) |
Handle a known-indent text block. Extend or override in subclasses. Recursively run the registered state machine for known-indent indented blocks (`self.known_indent_sm`). The indent is the length of the match, ``match.end()``.
|
static |