diff options
| author | serpilliere <fabrice.desclaux@cea.fr> | 2015-10-27 21:54:44 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-10-29 15:51:16 +0100 |
| commit | 1c3ee672cf1b13d1fd8fefe99406ba1a3ba55861 (patch) | |
| tree | ec881084a2eb2a62dcd5be89af254e74d5c90902 /miasm2/core/parse_asm.py | |
| parent | dfdcae8bfeefc5c4395ee1e909bab83e211ffefb (diff) | |
| download | miasm-1c3ee672cf1b13d1fd8fefe99406ba1a3ba55861.tar.gz miasm-1c3ee672cf1b13d1fd8fefe99406ba1a3ba55861.zip | |
Core/parse_asm: bloc=>block
Diffstat (limited to 'miasm2/core/parse_asm.py')
| -rw-r--r-- | miasm2/core/parse_asm.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py index d12750d4..698cb35c 100644 --- a/miasm2/core/parse_asm.py +++ b/miasm2/core/parse_asm.py @@ -181,17 +181,17 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None, gen_label_index=0): lines.append(instr) asmbloc.log_asmbloc.info("___pre asm oki___") - # make blocs + # make blocks - bloc_num = 0 + block_num = 0 b = None state = 0 i = 0 - blocs = [] - bloc_to_nlink = None + blocks = [] + block_to_nlink = None block_may_link = False while i < len(lines): - # no current bloc + # no current block if state == 0: if not isinstance(lines[i], asmbloc.asm_label): l = guess_next_new_label(symbol_pool) @@ -199,17 +199,17 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None, gen_label_index=0): else: l = lines[i] b = asmbloc.asm_bloc(l, alignment=mnemo.alignment) - b.bloc_num = bloc_num - bloc_num += 1 - blocs.append(b) + b.block_num = block_num + block_num += 1 + blocks.append(b) state = 1 i += 1 - if bloc_to_nlink: - bloc_to_nlink.addto(asmbloc.asm_constraint(b.label, - C_NEXT)) - bloc_to_nlink = None + if block_to_nlink: + block_to_nlink.addto(asmbloc.asm_constraint(b.label, + C_NEXT)) + block_to_nlink = None - # in bloc + # in block elif state == 1: if isinstance(lines[i], asmbloc.asm_raw): if hasattr(lines[i], 'split'): @@ -254,7 +254,7 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None, gen_label_index=0): state = 0 if lines[i].splitflow(): - bloc_to_nlink = b + block_to_nlink = b if not lines[i].breakflow() or lines[i].splitflow(): block_may_link = True else: @@ -262,7 +262,7 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None, gen_label_index=0): i += 1 - for block in blocs: + for block in blocks: asmbloc.log_asmbloc.info(block) - return blocs, symbol_pool + return blocks, symbol_pool |