Update makeServiceList
This commit is contained in:
parent
ffbb79a653
commit
a3f516ddf0
|
|
@ -2,34 +2,43 @@
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
||||||
|
nServs=0
|
||||||
|
|
||||||
while(getline < "../src/Span.h"){
|
while(getline < "../src/Span.h"){
|
||||||
|
|
||||||
gsub("^[ ]+","") # strip out any leading spaces
|
gsub("^[ ]+","") # strip out any leading spaces
|
||||||
split($0,x,"[,();]+") # split line into separate words
|
n=split($0,x,"[,();]+") # split line into separate words
|
||||||
|
|
||||||
if(x[1]=="CREATE_SERV"){
|
if(x[1]=="CREATE_SERV"){
|
||||||
service=x[2]
|
currentService=x[2]
|
||||||
print "### " service
|
services[nServs++]=currentService
|
||||||
|
nReqs[currentService]=0
|
||||||
|
nOpts[currentService]=0
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(x[1]=="REQ"){
|
else if(x[1]=="REQ")
|
||||||
characteristic=x[2]
|
reqs[currentService,nReqs[currentService]++]=x[2]
|
||||||
if(req[service]!=1){
|
|
||||||
print "* Required:"
|
|
||||||
req[service]=1
|
|
||||||
}
|
|
||||||
print " * " characteristic
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(x[1]=="OPT"){
|
else if(x[1]=="OPT")
|
||||||
characteristic=x[2]
|
opts[currentService,nOpts[currentService]++]=x[2]
|
||||||
if(opt[service]!=1){
|
|
||||||
print "* Optional:"
|
else if(x[1]=="CREATE_CHAR"){
|
||||||
opt[service]=1
|
for(i=2;i<n;i++)
|
||||||
}
|
printf("%s ",x[i])
|
||||||
print " * " characteristic
|
printf("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(i=0;i<nServs;i++){
|
||||||
|
s=services[i]
|
||||||
|
print s
|
||||||
|
for(j=0;j<nReqs[s];j++)
|
||||||
|
print " REQ:" reqs[s,j]
|
||||||
|
for(j=0;j<nOpts[s];j++)
|
||||||
|
print " OPT:" opts[s,j]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue