docs: def tokenize(self, string):
          '''
          Maps a string to an iterator over tokens. In other words: [char] -> [token]
          '''
  
          new_lexer = ply.lex.lex(module=self, debug=self.debug, errorlog=logger)
          new_lexer.latest_newline = 0
          new_lexer.string_value = None
          new_lexer.input(string)
  
          while True:
              t = new_lexer.token()
              if t is None: break
              t.col = t.lexpos - new_lexer.latest_newline
              yield t
  
          if new_lexer.string_value is not None:
              raise JsonPathLexerError('Unexpected EOF in string literal or identifier')