miasm
Reverse engineering framework
|
Functions | |
def | parse_loc_key (t) |
def | str_to_expr (str_in) |
Variables | |
integer | |
hex_word = pyparsing.Literal('0x') + pyparsing.Word(pyparsing.hexnums) | |
hex_int | |
tuple | str_int_pos = (hex_int | integer) |
tuple | str_int_neg |
tuple | str_int = str_int_pos | str_int_neg |
STR_EXPRINT = pyparsing.Suppress("ExprInt") | |
STR_EXPRID = pyparsing.Suppress("ExprId") | |
STR_EXPRLOC = pyparsing.Suppress("ExprLoc") | |
STR_EXPRSLICE = pyparsing.Suppress("ExprSlice") | |
STR_EXPRMEM = pyparsing.Suppress("ExprMem") | |
STR_EXPRCOND = pyparsing.Suppress("ExprCond") | |
STR_EXPRCOMPOSE = pyparsing.Suppress("ExprCompose") | |
STR_EXPROP = pyparsing.Suppress("ExprOp") | |
STR_EXPRASSIGN = pyparsing.Suppress("ExprAssign") | |
LOCKEY = pyparsing.Suppress("LocKey") | |
STR_COMMA = pyparsing.Suppress(",") | |
LPARENTHESIS = pyparsing.Suppress("(") | |
RPARENTHESIS = pyparsing.Suppress(")") | |
T_INF = pyparsing.Suppress("<") | |
T_SUP = pyparsing.Suppress(">") | |
string_quote = pyparsing.QuotedString(quoteChar="'", escChar='\\', escQuote='\\') | |
string_dquote = pyparsing.QuotedString(quoteChar='"', escChar='\\', escQuote='\\') | |
string = string_quote | string_dquote | |
expr = pyparsing.Forward() | |
tuple | expr_int = STR_EXPRINT + LPARENTHESIS + str_int + STR_COMMA + str_int + RPARENTHESIS |
tuple | expr_id = STR_EXPRID + LPARENTHESIS + string + STR_COMMA + str_int + RPARENTHESIS |
tuple | expr_loc = STR_EXPRLOC + LPARENTHESIS + T_INF + LOCKEY + str_int + T_SUP + STR_COMMA + str_int + RPARENTHESIS |
tuple | expr_slice = STR_EXPRSLICE + LPARENTHESIS + expr + STR_COMMA + str_int + STR_COMMA + str_int + RPARENTHESIS |
tuple | expr_mem = STR_EXPRMEM + LPARENTHESIS + expr + STR_COMMA + str_int + RPARENTHESIS |
expr_cond = STR_EXPRCOND + LPARENTHESIS + expr + STR_COMMA + expr + STR_COMMA + expr + RPARENTHESIS | |
expr_compose = STR_EXPRCOMPOSE + LPARENTHESIS + pyparsing.delimitedList(expr, delim=',') + RPARENTHESIS | |
expr_op = STR_EXPROP + LPARENTHESIS + string + STR_COMMA + pyparsing.delimitedList(expr, delim=',') + RPARENTHESIS | |
expr_aff = STR_EXPRASSIGN + LPARENTHESIS + expr + STR_COMMA + expr + RPARENTHESIS | |
def miasm.expression.parser.parse_loc_key | ( | t | ) |
def miasm.expression.parser.str_to_expr | ( | str_in | ) |
Parse the @str_in and return the corresponoding Expression @str_in: repr string of an Expression
miasm.expression.parser.expr = pyparsing.Forward() |
miasm.expression.parser.expr_aff = STR_EXPRASSIGN + LPARENTHESIS + expr + STR_COMMA + expr + RPARENTHESIS |
miasm.expression.parser.expr_compose = STR_EXPRCOMPOSE + LPARENTHESIS + pyparsing.delimitedList(expr, delim=',') + RPARENTHESIS |
miasm.expression.parser.expr_cond = STR_EXPRCOND + LPARENTHESIS + expr + STR_COMMA + expr + STR_COMMA + expr + RPARENTHESIS |
tuple miasm.expression.parser.expr_id = STR_EXPRID + LPARENTHESIS + string + STR_COMMA + str_int + RPARENTHESIS |
tuple miasm.expression.parser.expr_int = STR_EXPRINT + LPARENTHESIS + str_int + STR_COMMA + str_int + RPARENTHESIS |
tuple miasm.expression.parser.expr_loc = STR_EXPRLOC + LPARENTHESIS + T_INF + LOCKEY + str_int + T_SUP + STR_COMMA + str_int + RPARENTHESIS |
tuple miasm.expression.parser.expr_mem = STR_EXPRMEM + LPARENTHESIS + expr + STR_COMMA + str_int + RPARENTHESIS |
miasm.expression.parser.expr_op = STR_EXPROP + LPARENTHESIS + string + STR_COMMA + pyparsing.delimitedList(expr, delim=',') + RPARENTHESIS |
tuple miasm.expression.parser.expr_slice = STR_EXPRSLICE + LPARENTHESIS + expr + STR_COMMA + str_int + STR_COMMA + str_int + RPARENTHESIS |
miasm.expression.parser.hex_int |
miasm.expression.parser.hex_word = pyparsing.Literal('0x') + pyparsing.Word(pyparsing.hexnums) |
miasm.expression.parser.integer |
miasm.expression.parser.LOCKEY = pyparsing.Suppress("LocKey") |
miasm.expression.parser.LPARENTHESIS = pyparsing.Suppress("(") |
miasm.expression.parser.RPARENTHESIS = pyparsing.Suppress(")") |
miasm.expression.parser.STR_COMMA = pyparsing.Suppress(",") |
miasm.expression.parser.STR_EXPRASSIGN = pyparsing.Suppress("ExprAssign") |
miasm.expression.parser.STR_EXPRCOMPOSE = pyparsing.Suppress("ExprCompose") |
miasm.expression.parser.STR_EXPRCOND = pyparsing.Suppress("ExprCond") |
miasm.expression.parser.STR_EXPRID = pyparsing.Suppress("ExprId") |
miasm.expression.parser.STR_EXPRINT = pyparsing.Suppress("ExprInt") |
miasm.expression.parser.STR_EXPRLOC = pyparsing.Suppress("ExprLoc") |
miasm.expression.parser.STR_EXPRMEM = pyparsing.Suppress("ExprMem") |
miasm.expression.parser.STR_EXPROP = pyparsing.Suppress("ExprOp") |
miasm.expression.parser.STR_EXPRSLICE = pyparsing.Suppress("ExprSlice") |
tuple miasm.expression.parser.str_int = str_int_pos | str_int_neg |
tuple miasm.expression.parser.str_int_neg |
miasm.expression.parser.string = string_quote | string_dquote |
miasm.expression.parser.string_dquote = pyparsing.QuotedString(quoteChar='"', escChar='\\', escQuote='\\') |
miasm.expression.parser.string_quote = pyparsing.QuotedString(quoteChar="'", escChar='\\', escQuote='\\') |
miasm.expression.parser.T_INF = pyparsing.Suppress("<") |
miasm.expression.parser.T_SUP = pyparsing.Suppress(">") |