def translate(regex, trace=False):
    parser = RegexParser(trace=trace, semantics=RegexSemantics())
    model = parser.parse(regex, 'START')
    model.set_rule_numbers()
    return model.render()
def translate(regex, trace=False):
    parser = RegexParser(trace=trace, semantics=RegexSemantics())
    model = parser.parse(regex, 'START')
    model.set_rule_numbers()
    return model.render()