2008-08-07 14:35:45 +00:00
|
|
|
#include <cstdlib>
|
2008-08-05 08:24:21 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
|
|
|
#include <map>
|
|
|
|
|
2008-08-08 00:01:22 +00:00
|
|
|
#include "filter_evaluator.h"
|
|
|
|
#include "request.h"
|
2008-08-05 08:24:21 +00:00
|
|
|
|
|
|
|
int main( int argc, char** argv ) {
|
2008-08-08 00:01:22 +00:00
|
|
|
request r;
|
2008-08-05 08:24:21 +00:00
|
|
|
string result;
|
|
|
|
|
|
|
|
try {
|
2008-08-08 00:01:22 +00:00
|
|
|
if (!r.load(std::cin))
|
|
|
|
return 1;
|
2008-08-05 08:24:21 +00:00
|
|
|
|
2008-08-08 00:01:22 +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";
|
|
|
|
}
|