Skip to content

Commit

Permalink
lpmln2wc now handles aggregates in body correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
samidhtalsania committed Nov 2, 2016
1 parent d658610 commit ed7d4e9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lpmln2wc_src/lpmln2wc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ set<string> findVariables(const string& head){
stack.push(0);
}

else if(head.at(i) == '#'){
while(head.at(i) != '}')
i++;
i++;
}

string tempStr;
while(!stack.empty()){
i++;
Expand Down Expand Up @@ -189,13 +195,13 @@ int main(int argc, char **argv){
s = findFreeVariables(newStr, splitVec[1]);
}
catch (const std::invalid_argument& ia) {
weightString = "1000@1";
weightString = "1@1";
s = findFreeVariables(splitVec[0], splitVec[1]);
splitVecSpace.clear();
newStr = splitVec[0];
}
catch(...){
weightString = "1000@1";
weightString = "1@1";
s = findFreeVariables(splitVec[0], splitVec[1]);
splitVecSpace.clear();
newStr = splitVec[0];
Expand Down

0 comments on commit ed7d4e9

Please sign in to comment.