diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-25 11:09:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:49 +0100 |
| commit | 02bbb30efea4980c9d133947cbbf69fb599071ad (patch) | |
| tree | 3fea6826fcc5354840a27cb1dc99ff31eef81896 /example/expression/expr_grapher.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'example/expression/expr_grapher.py')
| -rw-r--r-- | example/expression/expr_grapher.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/example/expression/expr_grapher.py b/example/expression/expr_grapher.py index e0562852..e1643b03 100644 --- a/example/expression/expr_grapher.py +++ b/example/expression/expr_grapher.py @@ -1,6 +1,8 @@ +from __future__ import print_function + from miasm2.expression.expression import * -print "Simple Expression grapher demo" +print("Simple Expression grapher demo") a = ExprId("A", 32) b = ExprId("B", 32) @@ -8,13 +10,13 @@ c = ExprId("C", 32) d = ExprId("D", 32) m = ExprMem(a + b + c + a, 32) -e1 = ExprCompose(a + b - (c * a) / m | b, a + m) +e1 = ExprCompose(a + b - ((c * a) // m) | b, a + m) e2 = ExprInt(15, 64) e = ExprCond(d, e1, e2)[0:32] -print "[+] Expression:" -print e +print("[+] Expression:") +print(e) g = e.graph() -print "[+] Graph:" -print g.dot() +print("[+] Graph:") +print(g.dot()) |