code: def readlines(self):
          
          if self.grammar:
              tot = []
              # Used this way instead of a 'for' loop against
              # self.file.readlines() so that there wasn't two copies of the file
              # in memory.
              while 1:
                  line = self.file.readline()
                  if not line:
                      break
                  tot.append(line)
              return tot
          return self.file.readlines()
docs: Returns a list of all lines (optionally parsed) in the file.