def readFileLines
      puts "Reading source file #{@fileName} ..."
      lineNumber = 0
      File.open(@fileName).each_line do |line|
        line.chomp!
        lineNumber += 1 # track line numbers for when Ruby code needs to be executed (i.e. to populate stack traces)
        #puts "line #{lineNumber}: #{line}"
        commentLineMatch = COMMENT_LINE_REGEX.match(line)
        if commentLineMatch # it matches the Regenerate command line regex (but might not actually be a command ...)
          parsedCommandLine = ParsedRegenerateCommentLine.new(line, commentLineMatch)
          #puts "parsedCommandLine = #{parsedCommandLine}"
          if parsedCommandLine.isRegenerateCommentLine # if it is a Regenerate command line
            parsedCommandLine.checkIsValid # check it is valid, and then, 
            processCommandLine(parsedCommandLine, lineNumber) # process the command line
          else
            processTextLine(line, lineNumber) # process a text line which is not a Regenerate command line
          end
        else
          processTextLine(line, lineNumber) # process a text line which is not a Regenerate command line
        end
      end
      # After processing all source lines, the only unfinished page component permitted is a static HTML component.
      finishAtEndOfSourceFile
      #puts "Finished reading #{@fileName}."
    end
def readFileLines
      puts "Reading source file #{@fileName} ..."
      lineNumber = 0
      File.open(@fileName).each_line do |line|
        line.chomp!
        lineNumber += 1 # track line numbers for when Ruby code needs to be executed (i.e. to populate stack traces)
        #puts "line #{lineNumber}: #{line}"
        commentLineMatch = COMMENT_LINE_REGEX.match(line)
        if commentLineMatch # it matches the Regenerate command line regex (but might not actually be a command ...)
          parsedCommandLine = ParsedRegenerateCommentLine.new(line, commentLineMatch)
          #puts "parsedCommandLine = #{parsedCommandLine}"
          if parsedCommandLine.isRegenerateCommentLine # if it is a Regenerate command line
            parsedCommandLine.checkIsValid # check it is valid, and then, 
            processCommandLine(parsedCommandLine, lineNumber) # process the command line
          else
            processTextLine(line, lineNumber) # process a text line which is not a Regenerate command line
          end
        else
          processTextLine(line, lineNumber) # process a text line which is not a Regenerate command line
        end
      end
      # After processing all source lines, the only unfinished page component permitted is a static HTML component.
      finishAtEndOfSourceFile
      #puts "Finished reading #{@fileName}."
    end
Read in and parse lines from source file