def __init__(self):
        '''
        Initializes the variables we'll use in the state machine.

        Also see the set_state() function.
        '''
        # What to do with unknown characters; either we discard them,
        # include them in the output, or raise an exception.
        self.unknown_strategy = UNKNOWN_INCLUDE
        self.unknown_char = None

        # Long vowel style, either with macron (ā) or with circumflex (â).
        self.vowel_style = MACRON_STYLE

        # The case of the final output.
        self.uppercase = False

        # The character stack, containing the characters of the rōmaji output.
        self.stack = []

        # Number of long vowel markers in the state.
        self.lvmarker_count = 0

        # The ウ flag: whether a long vowel marker was added due to the
        # presence of a ウ. Needed in case of the 'w' exception.
        self.has_u_lvm = False

        # Number of geminate markers in the state.
        self.geminate_count = 0

        # The character that will directly follow the flushed character.
        self.next_char_info = None
        self.next_char_type = None

        # The currently active vowel character.
        self.active_vowel = None
        self.active_vowel_info = None
        self.active_vowel_ro = None

        # The currently active small vowel character.
        self.active_xvowel = None
        self.active_xvowel_info = None

        # The currently active character.
        self.active_char = None
        self.active_char_info = None

        # The type of character; either a consonant-vowel pair or a vowel.
        self.active_char_type = None

        # Information on digraph character parts.
        self.active_dgr_a_info = None
        self.active_dgr_b_info = None

        # Whether the state has a small vowel or digraph second part.
        self.has_xvowel = False
        self.has_digraph_b = False

        # Make the machine ready to accept the first character.
        self._empty_stack()
        self._clear_char()
def __init__ ( self ) : self . unknown_strategy = UNKNOWN_INCLUDE self . unknown_char = None self . vowel_style = MACRON_STYLE self . uppercase = False self . stack = [ ] self . lvmarker_count = 0 self . has_u_lvm = False self . geminate_count = 0 self . next_char_info = None self . next_char_type = None self . active_vowel = None self . active_vowel_info = None self . active_vowel_ro = None self . active_xvowel = None self . active_xvowel_info = None self . active_char = None self . active_char_info = None self . active_char_type = None self . active_dgr_a_info = None self . active_dgr_b_info = None self . has_xvowel = False self . has_digraph_b = False self . _empty_stack ( ) self . _clear_char ( )
Initializes the variables we'll use in the state machine.

        Also see the set_state() function.