    # File lib/yard/parser/source_parser.rb, line 416
          def parse(content = __FILE__)
            case content
            when String
              @file = File.cleanpath(content)
              content = convert_encoding(File.read_binary(file))
              checksum = Registry.checksum_for(content)
              return if Registry.checksums[file] == checksum

              if Registry.checksums.has_key?(file)
                log.info "File '#{file}' was modified, re-processing..."
              end
              Registry.checksums[@file] = checksum
              self.parser_type = parser_type_for_filename(file)
            else
              content = content.read if content.respond_to? :read
            end

            @contents = content
            @parser = parser_class.new(content, file)

            self.class.before_parse_file_callbacks.each do |cb|
              return @parser if cb.call(self) == false
            end

            @parser.parse
            post_process

            self.class.after_parse_file_callbacks.each do |cb|
              cb.call(self)
            end

            @parser
          rescue ArgumentError, NotImplementedError => e
            log.warn("Cannot parse `#{file}': #{e.message}")
            log.backtrace(e, :warn)
          rescue ParserSyntaxError => e
            log.warn(e.message.capitalize)
            log.backtrace(e, :warn)
          end