def runText(progText): # ensures that we reset the name type tuple id between runs. reset(); outputErrStream = StreamObj(); rootNode = head.lexAndParse(progText,outputErrStream,2); if rootNode == None: print('\nErrors encountered\n'); print (outputErrStream.flush()); return; fDeps = slicer(rootNode); # turn fDeps into a dictionary allDepsDict = {}; for dep in fDeps: allDepsDict[dep.funcName] = dep; toPrint = '\n\n'; for dep in fDeps: toPrint += dep.jsonize(allDepsDict); toPrint += '\n\n'; toPrint += '\n\n\n'; return toPrint,rootNode;
def parseTestToRun(progText): outputStream = testCommon.StreamLike() head.lexAndParse(progText, outputStream, 2) return outputStream.flush()
def parseTestToRun(progText): outputStream = testCommon.StreamLike(); head.lexAndParse(progText, outputStream, 2); return outputStream.flush();