Skip to content
Snippets Groups Projects
Commit ed7be8e6 authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Add useful helper printModVec

parent 2182e34b
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,21 @@ static CAMLprim value setset2caml(const set<set<int> >& vt) {
return set2CamlList(vt, set2caml);
}
static void printModVec(FILE* f, const vector<pair<pair<bool,int>,int> >& modvec) {
fprintf(f, "GML-Input: /\\ (");
for (int i = 0; i < modvec.size(); i++) {
bool isdia = modvec[i].first.first;
int cnt = modvec[i].first.second;
int underl = modvec[i].second;
if (i > 0) fprintf(f, ",");
if (isdia) {
fprintf(f, " <%d> p%d", cnt, underl);
} else {
fprintf(f, " [%d] p%d", cnt, underl);
}
}
fprintf(f, " )\n");
}
CAMLprim value gmlRules_stub(value modalities) {
// parse caml-modalities to a C++ vector
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment