code: def string_to_state(s):
      
      s = lexer(s)
      attrs = {}
      while True:
          if s.cur == '>':
              attrs['start'] = True
              s.pos += 1
          elif s.cur == '@':
              attrs['accept'] = True
              s.pos += 1
          else:
              break
      x = parse_symbol(s)
      parse_end(s)
      return x, attrs
docs: s is a string possibly preceded by > or @.