More specific 2.7 dictcomp and setcomp rules

This commit is contained in:
rocky
2017-11-26 15:06:45 -05:00
parent df2cda5b66
commit 6db5c63307
2 changed files with 15 additions and 8 deletions

View File

@@ -123,6 +123,7 @@ class Python27Parser(Python2Parser):
self.remove_rules("""
while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK COME_FROM
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK else_suite COME_FROM
tryfinallystmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK LOAD_CONST COME_FROM suite_stmts_opt END_FINALLY
""")
super(Python27Parser, self).add_custom_rules(tokens, customize)
self.check_reduce['and'] = 'AST'