def __init__(self, text, fileName, symTabManager, funcActRecords):
    text = text.split('\n')
    text = [i.lstrip().rstrip() for i in text if (i != '')]
    text = [i.replace('\t', '') for i in text]
    self.instructions = []
    self.basicBlocks = []
    self.targets = set([])
    self.allLineIDs = set([])
    self.fileName = fileName
    G.AsmText = ASM.TextRegion(fileName)
    G.AsmData = ASM.DataRegion(funcActRecords, symTabManager)
    LIB.AddEssentialLibraries()
    for line in text:
        instrTuple = LexerIR(line)
        if (instrTuple == []):
            continue
        instrTuple = [i.lstrip().rstrip() for i in instrTuple]
        instr = INSTRUCTION.Instr3AC(instrTuple)
        DEBUG.Assert((instr.lineID not in self.allLineIDs), 'Multiple lines with same line ID.')
        self.allLineIDs.add(instr.lineID)
        self.instructions += [instr]
        gotoTarget = self.instructions[(- 1)].GetTarget()
        if gotoTarget:
            self.targets.add(gotoTarget)
    for instr in self.instructions:
        if (('$LID_' + str(instr.lineID)) in self.targets):
            instr.isTarget = True
def __init__(self, text, fileName, symTabManager, funcActRecords):
    text = text.split('\n')
    text = [i.lstrip().rstrip() for i in text if (i != )]
    text = [i.replace('\t', ) for i in text]
    self.instructions = []
    self.basicBlocks = []
    self.targets = set([])
    self.allLineIDs = set([])
    self.fileName = fileName
    G.AsmText = ASM.TextRegion(fileName)
    G.AsmData = ASM.DataRegion(funcActRecords, symTabManager)
    LIB.AddEssentialLibraries()
    for line in text:
        instrTuple = LexerIR(line)
        if (instrTuple == []):
            continue
        instrTuple = [i.lstrip().rstrip() for i in instrTuple]
        instr = INSTRUCTION.Instr3AC(instrTuple)
        DEBUG.Assert((instr.lineID not in self.allLineIDs), 'Multiple lines with same line ID.')
        self.allLineIDs.add(instr.lineID)
        self.instructions += [instr]
        gotoTarget = self.instructions[(- 1)].GetTarget()
        if gotoTarget:
            self.targets.add(gotoTarget)
    for instr in self.instructions:
        if (('$LID_' + str(instr.lineID)) in self.targets):
            instr.isTarget = True