https://github.com/crillab/nacre_mini
Tip revision: 9973673b2f9220ca6480180cd82d34ea4cca8718 authored by Gaël Glorian on 05 June 2018, 08:40:41 UTC
Makefile updated to compile lib by default
Makefile updated to compile lib by default
Tip revision: 9973673
main.cc
#include "XCSP3CoreParser.h"
#include "XCSP3PrintCallbacks.h"
using namespace XCSP3Core;
int main(int argc,char **argv) {
XCSP3PrintCallbacks cb; // my interface between the parser and the solver
if(argc!=2)
throw std::runtime_error("usage: ./test xcsp3instance.xml");
try
{
XCSP3CoreParser parser(&cb);
parser.parse(argv[1]); // fileName is a string
}
catch (exception &e)
{
cout.flush();
cerr << "\n\tUnexpected exception :\n";
cerr << "\t" << e.what() << endl;
exit(1);
}
return 0;
}
