Add if/then rule to assist 2.5 parsing

This commit is contained in:
rocky
2024-07-12 10:17:05 -04:00
parent be825239c6
commit 9450165109
2 changed files with 4 additions and 2 deletions

View File

@@ -20,8 +20,8 @@ Step 2: Run the test:
test_pyenvlib --mylib --verify # decompile verify 'mylib'
"""
from __future__ import print_function
# Does not work on 2.5.9 or before
# from __future__ import print_function
import os
import re
import shutil

View File

@@ -60,6 +60,8 @@ class Python25Parser(Python26Parser):
kvlist ::= kvlist kv
kv ::= DUP_TOP expr ROT_TWO expr STORE_SUBSCR
_ifstmts_jump ::= c_stmts_opt COME_FROM JUMP_ABSOLUTE COME_FROM POP_TOP
"""
def customize_grammar_rules(self, tokens, customize):