whileelse in 3.6 sometimes has come froms...

also remove extra "L. " in token printing
This commit is contained in:
rocky
2020-04-04 10:12:12 -04:00
parent 1367709399
commit e8e7d2086d
5 changed files with 8 additions and 6 deletions

View File

@@ -74,6 +74,7 @@ class Python3Parser(PythonParser):
jb_or_c ::= JUMP_BACK
jb_or_c ::= CONTINUE
jb_cfs ::= JUMP_BACK _come_froms
stmt ::= set_comp_func
@@ -435,10 +436,11 @@ class Python3Parser(PythonParser):
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK
else_suitel
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt jb_cfs POP_BLOCK
else_suitel COME_FROM_LOOP
whileelsestmt2 ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
whileelsestmt2 ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
else_suitel JUMP_BACK COME_FROM_LOOP
whileTruestmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK POP_BLOCK

View File

@@ -396,7 +396,7 @@ class Scanner2(Scanner):
if show_asm in ('both', 'after'):
for t in tokens:
print(t.format(line_prefix='L.'))
print(t.format(line_prefix=""))
print()
return tokens, customize

View File

@@ -279,7 +279,7 @@ class Scanner26(scan.Scanner2):
if show_asm in ('both', 'after'):
for t in tokens:
print(t.format(line_prefix='L.'))
print(t.format(line_prefix=""))
print()
return tokens, customize

View File

@@ -539,7 +539,7 @@ class Scanner3(Scanner):
if show_asm in ("both", "after"):
for t in tokens:
print(t.format(line_prefix="L."))
print(t.format(line_prefix=))
print()
return tokens, customize

View File

@@ -518,7 +518,7 @@ class Scanner37Base(Scanner):
if show_asm in ("both", "after"):
for t in tokens:
print(t.format(line_prefix="L."))
print(t.format(line_prefix=""))
print()
return tokens, customize