#include <vector>
#include "action.h"
+ #include "planner.h"
using namespace std;
cout << "id: " << *$1 << endl;
// Precondition flags:
- cout << "a: " << (*$2)["a"] << endl;
+ cout << "a: " << (*$2)["NET"] << endl;
cout << "b: " << (*$2)["b"] << endl;
cout << "c: " << (*$2)["c"] << endl;
cout << "d: " << (*$2)["d"] << endl;
cout << "exe: " << *$4 << endl;
// Print number of effects
- cout << "1: " << (*$5)[1].size() << endl;
+ cout << "1: " << (*$5)[0].size() << endl;
cout << "99: " << (*$5)[99].size() << endl;
cout << "88: " << (*$5)[88].size() << endl;
cerr << "Parse error : " << s;
}
+vector<string> stringToVector(string str){
+ vector<string> strings;
+
+ istringstream ist(str);
+ while (ist >> str){
+ strings.push_back(str);
+ }
+
+ return strings;
+}
int
main (int argc, char** argv)
actions = new vector<Action>();
yyparse();
+
+ Planner p(*actions, stringToVector(argv[2]), stringToVector(argv[3]));
+ p.execute();
}