From a3f516ddf0308771525cac2339fff504cd5f9a0e Mon Sep 17 00:00:00 2001 From: Gregg Date: Tue, 16 Jan 2024 22:20:25 -0600 Subject: [PATCH] Update makeServiceList --- tools/makeServiceList | 45 ++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/tools/makeServiceList b/tools/makeServiceList index f0950a3..b3c3ae8 100755 --- a/tools/makeServiceList +++ b/tools/makeServiceList @@ -2,34 +2,43 @@ BEGIN { + nServs=0 + while(getline < "../src/Span.h"){ 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"){ - service=x[2] - print "### " service + currentService=x[2] + services[nServs++]=currentService + nReqs[currentService]=0 + nOpts[currentService]=0 } - else if(x[1]=="REQ"){ - characteristic=x[2] - if(req[service]!=1){ - print "* Required:" - req[service]=1 - } - print " * " characteristic - } + else if(x[1]=="REQ") + reqs[currentService,nReqs[currentService]++]=x[2] - else if(x[1]=="OPT"){ - characteristic=x[2] - if(opt[service]!=1){ - print "* Optional:" - opt[service]=1 - } - print " * " characteristic + else if(x[1]=="OPT") + opts[currentService,nOpts[currentService]++]=x[2] + + else if(x[1]=="CREATE_CHAR"){ + for(i=2;i