def rem_insert_end(): return literal('<#<')
def until_block_maybe(): return __(r'.*?(?=>)'), And(literal('>'))
def ref_insert_end(): return literal('<')
def rem_insert_start(): return literal('>#>')
def ref_insert_start(): return literal('>'), And([literal('['), literal('{')])
def ref_insert_middle(): return [(literal('['), identifier, literal(']')), (literal('{'), identifier, literal('}'))], And(literal('<'))
def block_freeform_end(): return literal('}'), anyws, block_end
def block_freeform(): return literal('{'), ZeroOrMore((ws, literal('<-{'))),
def block_end(): return literal('<<<')
def block_tabular(): return literal('<'), ws
def block_start(): return literal('>->'), identifier, literal('<'), [ literal('+'), literal('-') ]