You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Shorten Python3 grammars with + and *
This commit is contained in:
@@ -100,8 +100,7 @@ class Python3Parser(PythonParser):
|
|||||||
del_stmt ::= expr DELETE_ATTR
|
del_stmt ::= expr DELETE_ATTR
|
||||||
|
|
||||||
kwarg ::= LOAD_CONST expr
|
kwarg ::= LOAD_CONST expr
|
||||||
kwargs ::= kwargs kwarg
|
kwargs ::= kwarg*
|
||||||
kwargs ::=
|
|
||||||
|
|
||||||
classdef ::= build_class designator
|
classdef ::= build_class designator
|
||||||
|
|
||||||
|
@@ -17,8 +17,7 @@ class Python36Parser(Python35Parser):
|
|||||||
def p_36misc(self, args):
|
def p_36misc(self, args):
|
||||||
"""
|
"""
|
||||||
fstring_multi ::= fstring_expr_or_strs BUILD_STRING
|
fstring_multi ::= fstring_expr_or_strs BUILD_STRING
|
||||||
fstring_expr_or_strs ::= fstring_expr_or_strs fstring_expr_or_str
|
fstring_expr_or_strs ::= fstring_expr_or_str+
|
||||||
fstring_expr_or_strs ::= fstring_expr_or_str
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def add_custom_rules(self, tokens, customize):
|
def add_custom_rules(self, tokens, customize):
|
||||||
|
Reference in New Issue
Block a user