22 #include <boost/regex.hpp>
33 const std::string
Function::Double =
"(-?[0-9]+\\.?[0-9]*([Ee][+-]?[0-9]+)?)";
41 std::cout <<
"parsing failed here:" << std::string(it, end) <<
std::endl;
52 std::string str(it, end);
53 if( !boost::regex_match(str , what, functionCall ) )
return false;
55 std::string identifier = what[1];
56 std::string arguments = what[2];
57 unsigned int shift = identifier.size() + 1;
59 if (identifier ==
"rectangle") {
65 }
else if (identifier ==
"ellipse") {
71 }
else if (identifier ==
"polygon") {
77 }
else if (identifier ==
"mask") {
82 }
else if (identifier ==
"repeat") {
88 }
else if (identifier ==
"rotate") {
94 }
else if (identifier ==
"translate") {
100 }
else if (identifier ==
"shear") {
106 }
else if (identifier ==
"union") {
112 }
else if (identifier ==
"difference") {
118 }
else if (identifier ==
"symmetric_difference") {
125 }
else if (identifier ==
"intersection") {
static const std::string FCall
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static const std::string Double
static const std::string UInt
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
Inform & endl(Inform &inf)
static bool parse_detail(iterator &it, const iterator &end, Function *fun)
static bool parse(iterator &it, const iterator &end, Function *&fun)
std::string::iterator iterator
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
bool parse(std::string str, Function *&fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static const std::string UDouble
static bool parse_detail(iterator &it, const iterator &end, Function *fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)