def __init__(self, out): Parser.__init__(self) self.out = out # Link target and label information. self.target = None self.target_type = None self.label = None # Macro information. self.macros = [] self.macro_parameters = [] self.held_anchors = [] # Indentation and element nesting states. self.indents = [0] self.states = {} self.max_level = self.level = 0 for name in preformatted_tags + single_level_tags: self.states[name] = 0 # Table states. self.table_rows = 0 self.table_columns = 0 # Block states. self.have_block = False