Fixing a bug with capabilityMap extraction.
authorrtrimana <rtrimana@uci.edu>
Tue, 30 Jul 2019 21:58:39 +0000 (14:58 -0700)
committerrtrimana <rtrimana@uci.edu>
Tue, 30 Jul 2019 21:58:39 +0000 (14:58 -0700)
Extractor/ExtractorScript.py

index 51f753e..f89c9ea 100644 (file)
@@ -62,13 +62,14 @@ def ExtractFunctions(F, appName):
                
                #Check input capability
                if (Temp == "input"):
-                       Temp = GetToken(F) #Get '"'
+                       while Temp != "\"":
+                               Temp = GetToken(F)
                        variable = GetToken(F)
                        Temp = GetToken(F) #Get '"'
                        Temp = GetToken(F) #Get ','
-                       Temp = GetToken(F) #Get '"'
-                       Temp = GetToken(F) #Get capability...
-                       capability = Temp
+                       while Temp != "\"":
+                               Temp = GetToken(F)
+                       capability = GetToken(F)
                        capabilityMap[variable] = capability
                
                #Check subscribed events
@@ -226,7 +227,10 @@ def ExtractEvents(extractedEvents):
                        extractedEvents.write("\t\t\t}\n")
                elif eventList[i] == "presence":
                        #Check which capability
+                       print eventVarMap
+                       print capabilityMap
                        variable = eventVarMap[eventList[i]]
+                       print "DEBUG: %s" % variable
                        capability = capabilityMap[variable]
                        #Write three events subsequently
                        extractedEvents.write("\t\t\tdef event = Verify.getInt(0,2)\n")