#!/usr/bin/perl -w

use strict;

my $output_file = $ARGV[1];
my $filename = $ARGV[0];
my $file_buf = "";

open (IN, "< $filename");
my $todo = 0;
while (<IN>)
  {
    $_ =~ s/Requires.*:/\@precondition/;
    $_ =~ s/Returns/\@return/;
    $_ =~ s/Complexity.*:/\@doc Complexity:/;
    $file_buf .= $_;
  }
close (IN);

open (OUT, "> $output_file");
print OUT $file_buf;
close (OUT);
#print STDOUT $file_buf;
