diff --git a/__pkginfo__.py b/__pkginfo__.py index 076581bc..eb2edd2b 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -12,7 +12,7 @@ copyright = """ Copyright (C) 2015, 2016 Rocky Bernstein . """ -classifiers = ['Development Status :: 4 - Beta', +classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', @@ -37,7 +37,7 @@ entry_points={ 'pydisassemble=uncompyle6.bin.pydisassemble:main', ]} ftp_url = None -install_requires = ['spark-parser >= 1.5.0, < 1.6.0', +install_requires = ['spark-parser >= 1.5.1, < 1.6.0', 'xdis >= 3.2.3, < 3.3.0'] license = 'MIT' mailing_list = 'python-debugger@googlegroups.com' diff --git a/uncompyle6/parser.py b/uncompyle6/parser.py index 5909e95e..05b71188 100644 --- a/uncompyle6/parser.py +++ b/uncompyle6/parser.py @@ -157,8 +157,7 @@ class PythonParser(GenericASTBuilder): """ passstmt ::= - _stmts ::= _stmts stmt - _stmts ::= stmt + _stmts ::= stmt+ # statements with continue c_stmts ::= _stmts @@ -270,8 +269,7 @@ class PythonParser(GenericASTBuilder): # Zero or one COME_FROM # And/or expressions have this - come_from_opt ::= COME_FROM - come_from_opt ::= + come_from_opt ::= COME_FROM? """ def p_dictcomp(self, args): diff --git a/uncompyle6/parsers/parse2.py b/uncompyle6/parsers/parse2.py index 00565e4c..b0e440c2 100644 --- a/uncompyle6/parsers/parse2.py +++ b/uncompyle6/parsers/parse2.py @@ -25,20 +25,18 @@ class Python2Parser(PythonParser): self.new_rules = set() def p_print2(self, args): - ''' + """ stmt ::= print_items_stmt stmt ::= print_nl stmt ::= print_items_nl_stmt print_items_stmt ::= expr PRINT_ITEM print_items_opt print_items_nl_stmt ::= expr PRINT_ITEM print_items_opt PRINT_NEWLINE_CONT - print_items_opt ::= print_items - print_items_opt ::= - print_items ::= print_items print_item - print_items ::= print_item - print_item ::= expr PRINT_ITEM_CONT - print_nl ::= PRINT_NEWLINE - ''' + print_items_opt ::= print_items? + print_items ::= print_item+ + print_item ::= expr PRINT_ITEM_CONT + print_nl ::= PRINT_NEWLINE + """ def p_stmt2(self, args): """ @@ -169,8 +167,7 @@ class Python2Parser(PythonParser): try_middle ::= jmp_abs COME_FROM except_stmts END_FINALLY - except_stmts ::= except_stmts except_stmt - except_stmts ::= except_stmt + except_stmts ::= except_stmt+ except_stmt ::= except_cond1 except_suite except_stmt ::= except