def string_to_transition(s):
    """s is a string of the form a,b or a,b->c,d"""
    from .machines import Transition
    s = lexer(s)
    lhs = parse_multiple(s, parse_store)
    if s.pos < len(s) and s.cur == "->":
        s.pos += 1
        rhs = parse_multiple(s, parse_store)
    else:
        rhs = ()
    parse_end(s)
    return Transition(lhs, rhs)
s is a string of the form a,b or a,b->c,d