assembler.py
def categorizeOperands(self,line):
        """Categorize operands and pass any unknown strings"""
        categorizedLine = [line[0]]
        for operand in line[1:]:
            if operand in self.conditions.keys():
                categorizedLine.append('COND')
            elif operand in self.registers.keys():
                categorizedLine.append('REG')
            elif re.search('<link_[a-z]{1}[\w_]*/>|[\-]*\d+',operand):
                categorizedLine.append('NUM')
            else:
                categorizedLine.append('_'+operand)
        return tuple(categorizedLine)
Categorize operands and pass any unknown strings
Categorize operands and pass any unknown strings
Categorize operands and pass any unknown strings
def categorizeOperands(self,line):
        categorizedLine = [line[0]]
        for operand in line[1:]:
            if operand in self.conditions.keys():
                categorizedLine.append('COND')
            elif operand in self.registers.keys():
                categorizedLine.append('REG')
            elif re.search('<link_[a-z]{1}[\w_]*/>|[\-]*\d+',operand):
                categorizedLine.append('NUM')
            else:
                categorizedLine.append('_'+operand)
        return tuple(categorizedLine)
def categorizeOperands ( self , line ) : categorizedLine = [ line [ 0 ] ] for operand in line [ 1 : ] : if operand in self . conditions . keys ( ) : categorizedLine . append ( 'COND' ) elif operand in self . registers . keys ( ) : categorizedLine . append ( 'REG' ) elif re . search ( '<link_[a-z]{1}[\w_]*/>|[\-]*\d+' , operand ) : categorizedLine . append ( 'NUM' ) else : categorizedLine . append ( '_' + operand ) return tuple ( categorizedLine )
Categorize operands and pass any unknown strings
Categorize operands and pass any unknown strings
"""Categorize operands and pass any unknown strings"""
self
line