Public Member Functions | |
def | register |
def | to_language |
def | available_languages |
def | __init__ |
def | from_ExprInt |
def | from_ExprId |
def | from_ExprCompose |
def | from_ExprSlice |
def | from_ExprOp |
def | from_ExprMem |
def | from_ExprAff |
def | from_ExprCond |
def | from_expr |
Static Public Attributes | |
list | available_translators = [] |
Private Attributes | |
_cache | |
Static Private Attributes | |
string | __LANG__ = "" |
Definition at line 5 of file translator.py.
def miasm2.ir.translators.translator.Translator.__init__ | ( | self, | |
cache_size = 1000 |
|||
) |
Instance a translator @cache_size: (optional) Expr cache size
Definition at line 38 of file translator.py.
def miasm2.ir.translators.translator.Translator.available_languages | ( | cls | ) |
def miasm2.ir.translators.translator.Translator.from_expr | ( | self, | |
expr | |||
) |
Translate an expression according to its type @expr: expression to translate
Definition at line 92 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprAff | ( | self, | |
expr | |||
) |
Translate an ExprAff @expr: ExprAff to translate
Definition at line 80 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprCompose | ( | self, | |
expr | |||
) |
Translate an ExprCompose @expr: ExprCompose to translate
Definition at line 56 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprCond | ( | self, | |
expr | |||
) |
Translate an ExprCond @expr: ExprCond to translate
Definition at line 86 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprId | ( | self, | |
expr | |||
) |
def miasm2.ir.translators.translator.Translator.from_ExprInt | ( | self, | |
expr | |||
) |
Translate an ExprInt @expr: ExprInt to translate
Definition at line 44 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprMem | ( | self, | |
expr | |||
) |
Translate an ExprMem @expr: ExprMem to translate
Definition at line 74 of file translator.py.
def miasm2.ir.translators.translator.Translator.from_ExprOp | ( | self, | |
expr | |||
) |
def miasm2.ir.translators.translator.Translator.from_ExprSlice | ( | self, | |
expr | |||
) |
Translate an ExprSlice @expr: ExprSlice to translate
Definition at line 62 of file translator.py.
def miasm2.ir.translators.translator.Translator.register | ( | cls, | |
translator | |||
) |
Register a translator @translator: Translator sub-class
Definition at line 14 of file translator.py.
def miasm2.ir.translators.translator.Translator.to_language | ( | cls, | |
target_lang, | |||
args, | |||
kwargs | |||
) |
Return the corresponding translator instance @target_lang: str (case insensitive) wanted language Raise a NotImplementedError in case of unmatched language
Definition at line 21 of file translator.py.
|
staticprivate |
Definition at line 11 of file translator.py.
|
private |
Definition at line 42 of file translator.py.
|
static |
Definition at line 9 of file translator.py.