You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Work around broken modularity in python_parser
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2015-2020 Rocky Bernstein
|
# Copyright (c) 2015-2021 Rocky Bernstein
|
||||||
# Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org>
|
# Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org>
|
||||||
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
# Copyright (c) 1999 John Aycock
|
# Copyright (c) 1999 John Aycock
|
||||||
@@ -877,7 +877,14 @@ def python_parser(
|
|||||||
# For heavy grammar debugging
|
# For heavy grammar debugging
|
||||||
# parser_debug = {'rules': True, 'transition': True, 'reduce' : True,
|
# parser_debug = {'rules': True, 'transition': True, 'reduce' : True,
|
||||||
# 'showstack': 'full'}
|
# 'showstack': 'full'}
|
||||||
|
|
||||||
p = get_python_parser(version, parser_debug)
|
p = get_python_parser(version, parser_debug)
|
||||||
|
|
||||||
|
# FIXME: have p.insts update in a better way
|
||||||
|
# modularity is broken here
|
||||||
|
p.insts = scanner.insts
|
||||||
|
p.offset2inst_index = scanner.offset2inst_index
|
||||||
|
|
||||||
return parse(p, tokens, customize, co)
|
return parse(p, tokens, customize, co)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user