about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <camille.mougey@cea.fr>2015-01-07 17:53:30 +0100
committerCamille Mougey <camille.mougey@cea.fr>2015-01-23 17:24:42 +0100
commit90083d5d7df06c21d361e20f69b2a2f71e47ccc3 (patch)
tree851fe5025bba40bb4236fd7c431f7a78f5d82b38
parent4d415d6eb66fa0cc5ff003a7a1732665083fb809 (diff)
downloadmiasm-90083d5d7df06c21d361e20f69b2a2f71e47ccc3.tar.gz
miasm-90083d5d7df06c21d361e20f69b2a2f71e47ccc3.zip
Example/Asm_msp430: Reorganize and remove unused imports
-rw-r--r--example/asm_msp430_sc.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/example/asm_msp430_sc.py b/example/asm_msp430_sc.py
index c0bae929..de488803 100644
--- a/example/asm_msp430_sc.py
+++ b/example/asm_msp430_sc.py
@@ -1,25 +1,23 @@
 #! /usr/bin/env python
+from pdb import pm
 
-from miasm2.core.cpu import parse_ast
-from miasm2.arch.msp430.arch import mn_msp430, base_expr, variable
-from miasm2.core.bin_stream import bin_stream
-from miasm2.core import parse_asm
-from miasm2.expression.expression import *
 from elfesteem.strpatchwork import StrPatchwork
 
-from pdb import pm
 from miasm2.core import asmbloc
-import struct
+from miasm2.core.cpu import parse_ast
+from miasm2.arch.msp430.arch import mn_msp430, base_expr
+from miasm2.core import parse_asm
+import miasm2.expression.expression as m2_expr
 
 reg_and_id = dict(mn_msp430.regs.all_regs_ids_byname)
 
 
 def my_ast_int2expr(a):
-    return ExprInt32(a)
+    return m2_expr.ExprInt32(a)
 
 
 def my_ast_id2expr(t):
-    return reg_and_id.get(t, ExprId(t, size=32))
+    return reg_and_id.get(t, m2_expr.ExprId(t, size=32))
 
 my_var_parser = parse_ast(my_ast_id2expr, my_ast_int2expr)
 base_expr.setParseAction(my_var_parser)