2008-08-09 16:44:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2008 Andrew Garrett.
|
|
|
|
* Copyright (c) 2008 River Tarnell <river@wikimedia.org>
|
|
|
|
* Derived from public domain code contributed by Victor Vasiliev.
|
|
|
|
*
|
|
|
|
* Permission is granted to anyone to use this software for any purpose,
|
|
|
|
* including commercial applications, and to alter it and redistribute it
|
|
|
|
* freely. This software is provided 'as-is', without any express or
|
|
|
|
* implied warranty.
|
|
|
|
*/
|
|
|
|
|
2008-08-10 03:52:17 +00:00
|
|
|
#include "filter_evaluator.h"
|
2008-08-09 16:44:54 +00:00
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
afp::u32filter_evaluator f;
|
|
|
|
|
2008-08-10 03:52:17 +00:00
|
|
|
if (argc != 2) {
|
|
|
|
std::cerr << "usage: " << argv[0] << " <filter>\n";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2008-08-09 16:44:54 +00:00
|
|
|
try {
|
2008-08-10 03:52:17 +00:00
|
|
|
std::cout << f.evaluate(make_u32fray(argv[1])) << '\n';
|
2008-08-09 16:44:54 +00:00
|
|
|
} catch (std::exception &e) {
|
|
|
|
std::cerr << "exception: " << e.what() << '\n';
|
|
|
|
}
|
|
|
|
}
|