# 2.c.1. List of functions called by current block
funcCallName=m.group(1)
listCurrBlockFuncCalls.append(funcCallName)
continue
# 2.d. look for return instructions
m=re_returnLine.match(line)
ifmisnotNone:
# Flag to say current basic block returns
isCurrBasicBlockReturning=1
continue
# look for end of function definition
m=re_funcDefEnd.match(line)
ifmisnotNone:
currFuncEndLine=lineNum-1
forblockTargetinlistCurrFuncBasicBlockTargets:
startBlockIndex=-1
index=0
forblockinlistCurrFuncBasicBlocks:
ifblock.name==blockTarget.name:
startBlockIndex=index
break
index=index+1
ifstartBlockIndex==-1:
raiseParseError("Block %s with entry in listCurrFuncBasicBlockTargets not found in listCurrFuncBasicBlocks"%(blockTarget.name))
exit(1)
fortargetinblockTarget.listTargets:
endBlockIndex=-1
index=0
forblockinlistCurrFuncBasicBlocks:
ifblock.name==target:
endBlockIndex=index
break
index=index+1
ifendBlockIndex==-1:
raiseParseError("Block %s, a target of block %s with entry in listCurrFuncBasicBlockTargets not found in listCurrFuncBasicBlocks"%(target,blockTarget.name))