| 1 |
/******************************************************************** |
| 2 |
a reduced version of gvlint.gvpr |
| 3 |
|
| 4 |
********************************************************************/ |
| 5 |
BEGIN{ |
| 6 |
graph_t Root; |
| 7 |
int Ni, Ei; |
| 8 |
string tok[int], gType[]; |
| 9 |
string thisAttr ; |
| 10 |
string theEngine; |
| 11 |
|
| 12 |
string caret="^", bar="|"; |
| 13 |
string Engines[], Objects[], Types[], Minimums[]; |
| 14 |
obj_t objC[], objS[], objG[], objN[], objE[]; |
| 15 |
|
| 16 |
string lintVal[]; |
| 17 |
|
| 18 |
lintVal["target"] = "ALL^E|N|G|C^escString|string^^"; |
| 19 |
lintVal["voro_margin"] = "neato|fdp|sfdp|twopi|circo^G^double^0.0^"; |
| 20 |
lintVal["weight"] = "ALL^E^int|double^0(dot,twopi)|1(neato,fdp)^"; |
| 21 |
lintVal["width"] = "ALL^N^double^0.01^"; |
| 22 |
|
| 23 |
} |
| 24 |
BEG_G{ |
| 25 |
|
| 26 |
Root=$G; |
| 27 |
gType[$G]="G"; |
| 28 |
objG[1]=$G; |
| 29 |
theEngine="dot"; |
| 30 |
|
| 31 |
for (lintVal[thisAttr]) { |
| 32 |
split(lintVal[thisAttr], tok, caret); |
| 33 |
Engines[thisAttr]= bar + tok[0] + bar; |
| 34 |
Objects[thisAttr]= bar + tok[1] + bar; |
| 35 |
Types[thisAttr]= bar + tok[2] + bar; |
| 36 |
Minimums[thisAttr]=bar + tok[3] + bar; |
| 37 |
} |
| 38 |
|
| 39 |
for (Engines[thisAttr]) { |
| 40 |
if (match(Engines[thisAttr],"ALL")<0 && match(Engines[thisAttr], theEngine)<0) { |
| 41 |
unset(Engines, thisAttr); |
| 42 |
unset(Objects, thisAttr); |
| 43 |
unset(Types, thisAttr); |
| 44 |
unset(Minimums, thisAttr); |
| 45 |
} |
| 46 |
} |
| 47 |
} |