mediawiki-extensions-AbuseF.../parser_native/eval.cpp

26 lines
447 B
C++
Raw Normal View History

#include <cstdlib>
2008-08-05 08:24:21 +00:00
#include <iostream>
#include <string>
#include <sstream>
#include <map>
#include "filter_evaluator.h"
#include "request.h"
2008-08-05 08:24:21 +00:00
int main( int argc, char** argv ) {
request r;
2008-08-05 08:24:21 +00:00
string result;
try {
if (!r.load(std::cin))
return 1;
2008-08-05 08:24:21 +00:00
result = r.evaluate();
2008-08-05 08:24:21 +00:00
} catch (AFPException excep) {
cout << "EXCEPTION: " << excep.what() << endl;
cerr << "EXCEPTION: " << excep.what() << endl;
}
cout << result << "\0";
}