#NEWLINE# def parse_instruction( string , location , tokens ) : #NEWLINE# #INDENT# 'Parse an ARM instruction.\n    ' #NEWLINE# mnemonic = tokens . get ( 'mnemonic' ) #NEWLINE# operands = [ op for op in tokens . get ( 'operands' , [ ] ) ] #NEWLINE# instr = ArmInstruction ( string , mnemonic [ 'ins' ] , operands , arch_info . architecture_mode ) #NEWLINE# if ( 'cc' in mnemonic ) : #NEWLINE# #INDENT# instr . condition_code = cc_mapper [ mnemonic [ 'cc' ] ] #NEWLINE# #UNINDENT# if ( 'uf' in mnemonic ) : #NEWLINE# #INDENT# instr . update_flags = True #NEWLINE# #UNINDENT# if ( 'ldm_stm_addr_mode' in mnemonic ) : #NEWLINE# #INDENT# instr . ldm_stm_addr_mode = ldm_stm_am_mapper [ mnemonic [ 'ldm_stm_addr_mode' ] ] #NEWLINE# #UNINDENT# return instr