docs: def parse(self, line):
          """Tokenize a line of Fortran source."""
          tokens = []
  
          self.idx = -1   # Bogus value to ensure idx = 0 after first iteration
          self.characters = iter(line)
          self.update_chars()
  
          while self.char != '\n':
              # Update namelist group status
              if self.char in ('&', '$'):
                  self.group_token = self.char
  
              if self.group_token and (
                      (self.group_token, self.char) in (('&', '/'), ('$', '$'))):
                  self.group_token = False
  
              word = ''
              if self.char in self.whitespace:
                  while self.char in self.whitespace:
                      word += self.char
                      self.update_chars()
  
              elif self.char in ('!', '#') or self.group_token is None:
                  # Abort the iteration and build the comment token
                  word = line[self.idx:-1]
                  self.char = '\n'
  
              elif self.char in '"\'' or self.prior_delim:
                  word = self.parse_string()
  
              elif self.char.isalpha():
                  word = self.parse_name(line)
  
              elif self.char in ('+', '-'):
                  # Lookahead to check for IEEE value
                  self.characters, lookahead = itertools.tee(self.characters)
                  ieee_val = ''.join(itertools.takewhile(str.isalpha, lookahead))
                  if ieee_val.lower() in ('inf', 'infinity', 'nan'):
                      word = self.char + ieee_val
                      self.characters = lookahead
                      self.prior_char = ieee_val[-1]
                      self.char = next(lookahead, '\n')
                  else:
                      word = self.parse_numeric()
  
              elif self.char.isdigit():
                  word = self.parse_numeric()
  
              elif self.char == '.':
                  self.update_chars()
                  if self.char.isdigit():
                      frac = self.parse_numeric()
                      word = '.' + frac
                  else:
                      word = '.'
                      while self.char.isalpha():
                          word += self.char
                          self.update_chars()
                      if self.char == '.':
                          word += self.char
                          self.update_chars()
  
              elif self.char in Tokenizer.punctuation:
                  word = self.char
                  self.update_chars()
  
              else:
                  # This should never happen
                  raise ValueError
  
              tokens.append(word)
  
          return tokens