19 unsigned int start_sub(
i);
21 std::unique_ptr<RegionLogicalOperation> new_region = std::make_unique<RegionLogicalOperation>();
22 bool currect_inverse(
false);
33 element.push_back(
input[
i]);
34 if (
input[
i] ==
']')
break;
37 log << MSG::WARNING <<
"Missing ']' at end of input! Started here:" <<
endmsg;
41 std::unique_ptr<RegionElement> reg_el = std::make_unique<RegionElement>();
43 if (!reg_el->Initialize(element)) {
48 if (!new_region->AddRegion(std::move(reg_el), currect_inverse)) {
49 log << MSG::WARNING <<
"Missing operator!" <<
endmsg;
53 currect_inverse =
false;
60 log << MSG::WARNING <<
"'(' at end of input!" <<
endmsg;
65 if (!second_region) {
return nullptr; }
66 if (!new_region->AddRegion(std::move(second_region), currect_inverse)) {
67 log << MSG::WARNING <<
"Missing operator!" <<
endmsg;
71 currect_inverse =
false;
76 if (currect_inverse) {
77 log << MSG::WARNING <<
"Surplus '!'" <<
endmsg;
81 currect_inverse =
true;
87 bool next_op(
input[
i] ==
'|');
88 if (!new_region->AddOperator(next_op)) {
89 log << MSG::WARNING <<
"Unexpected operator!" <<
endmsg;
97 if (new_region->SurplusOperator()) {
98 log << MSG::WARNING <<
"Surplus operator" <<
endmsg;
102 if (is_in_braces) {
return new_region; }
103 log << MSG::WARNING <<
"Unexpected ')'" <<
endmsg;
114 log << MSG::WARNING <<
"Syntax Error" <<
endmsg;
121 log << MSG::WARNING <<
"Missing ')'" <<
endmsg;
125 if (new_region->SurplusOperator()) {
126 log << MSG::WARNING <<
"Surplus operator" <<
endmsg;
135 std::string st1, st2;
136 for (;
i <
input.size() &&
i < position;
i++) { st1 +=
input[
i]; }
138 *msgStr << MSG::WARNING << st1 <<
"*" << st2 <<
endmsg;