code: def tokenize(text):
      r
      current_token = next_token(text)
      while current_token is not None:
          yield current_token
          current_token = next_token(text)
docs: r"""Generator for LaTeX tokens on text, ignoring comments.
  
      :param Union[str,iterator,Buffer] text: LaTeX to process
  
      >>> print(*tokenize(r'\textbf{Do play \textit{nice}.}'))
      \textbf { Do play  \textit { nice } . }
      >>> print(*tokenize(r'\begin{tabular} 0 & 1 \\ 2 & 0 \end{tabular}'))
      \begin { tabular }  0 & 1 \\ 2 & 0  \end { tabular }