mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-04 18:38:25 +00:00
ff2465007f
- move AFP stuff into its own namespace - move utf8 and equivset into seperate modules - parser should understand /* */ comments
25 lines
449 B
C++
25 lines
449 B
C++
#include <cstdlib>
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "filter_evaluator.h"
|
|
#include "request.h"
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
afp::request r;
|
|
std::string result;
|
|
|
|
try {
|
|
if (!r.load(std::cin))
|
|
return 1;
|
|
|
|
result = r.evaluate();
|
|
} catch (afp::exception &excep) {
|
|
std::cout << "EXCEPTION: " << excep.what() << std::endl;
|
|
std::cerr << "EXCEPTION: " << excep.what() << std::endl;
|
|
}
|
|
|
|
std::cout << result << "\0";
|
|
}
|