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") {
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
Inform & endl(Inform &inf)
std::string::iterator iterator
bool parse(std::string str, Function *&fun)
static const std::string FCall
static const std::string Double
static const std::string UDouble
static bool parse(iterator &it, const iterator &end, Function *&fun)
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)
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 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 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 bool parse_detail(iterator &it, const iterator &end, Function *&fun)