code: def parse_string(self):
          
          word = ''
  
          if self.prior_delim:
              delim = self.prior_delim
              self.prior_delim = None
          else:
              delim = self.char
              word += self.char
              self.update_chars()
  
          while True:
              if self.char == delim:
                  # Check for escaped delimiters
                  self.update_chars()
                  if self.char == delim:
                      word += 2 * delim
                      self.update_chars()
                  else:
                      word += delim
                      break
              elif self.char == '\n':
                  self.prior_delim = delim
                  break
              else:
                  word += self.char
                  self.update_chars()
  
          return word
docs: Tokenize a Fortran string.