34 lines
521 B
C++
34 lines
521 B
C++
#include "common.hpp"
|
|
|
|
#include "storage.hpp"
|
|
|
|
using dtl::Diff;
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
if (isFewArgs(argc)) {
|
|
std::cerr << "Too few arguments." << std::endl;
|
|
return -1;
|
|
}
|
|
|
|
typedef char elem;
|
|
typedef std::string sequence;
|
|
|
|
sequence A(argv[1]);
|
|
sequence B(argv[2]);
|
|
|
|
Diff<elem, sequence> d(A, B);
|
|
d.compose();
|
|
|
|
// Shortest Edit Script
|
|
std::cout << "SES" << std::endl;
|
|
|
|
std::string result;
|
|
|
|
d.storeSES<std::string, CustomStorage>(result);
|
|
|
|
std::cout << result;
|
|
|
|
return 0;
|
|
}
|