Fix some 2.5 parsing bugs

This commit is contained in:
rocky
2024-07-12 11:21:48 -04:00
parent 9450165109
commit f030b3316c
4 changed files with 24 additions and 0 deletions

View File

@@ -62,6 +62,11 @@ class Python25Parser(Python26Parser):
kv ::= DUP_TOP expr ROT_TWO expr STORE_SUBSCR
_ifstmts_jump ::= c_stmts_opt COME_FROM JUMP_ABSOLUTE COME_FROM POP_TOP
# "and_then" is a hack around the fact we have THEN detection.
and_then ::= expr JUMP_IF_FALSE THEN POP_TOP expr JUMP_IF_FALSE THEN POP_TOP
testexpr_then ::= and_then
"""
def customize_grammar_rules(self, tokens, customize):