From 2fc38866932d5e255b676ec4684f2426bfa5ed22 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 13 Oct 2017 07:52:56 -0400 Subject: [PATCH] Small changes --- HISTORY.md | 17 ++++++++++++++--- uncompyle6/semantics/pysource.py | 6 +++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index cadcc7d3..d8871c82 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -98,9 +98,20 @@ so. Then hamled made a few commits earler on, while Eike Siewertsen made a few commits later on. But mostly wibiti, and Guenther Starnberger got the code to where uncompyle2 was around 2012. -In `uncompyle`, decompilation of python bytecode 2.5 & 2.6 is done by -transforming the byte code into a pseudo-2.7 Python bytecode and is -based on code from Eloi Vanderbeken. +While John Aycock and Hartmut Goebel were well versed in compiler +technology, those that have come afterwards don't seem to have been as +facile in it. Furthermore, documentation or guidance on how the +decompiler code worked, comparison to a conventional compiler +pipeline, how to add new constructs, or debug grammars was weak. Some +of the grammar tracing and error reporting was a bit weak as well. + +Given this, perhaps it is not surprising that subsequent changes +tended to shy away from using the built-in compiler technology +mechanisms and addressed problems and extensions by some other means. + +Specifically, in `uncompyle`, decompilation of python bytecode 2.5 & 2.6 +is done by transforming the byte code into a pseudo-2.7 Python +bytecode and is based on code from Eloi Vanderbeken. This project, `uncompyle6`, abandons that approach for various reasons. However the main reason is that we need offsets in fragment diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index a0a2772a..894bc979 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -1828,7 +1828,11 @@ class SourceWalker(GenericASTTraversal, object): specifications such as %c, %C, and so on. """ - # self.println("----> ", startnode.kind, ', ', entry[0]) + # print("-----") + # print(startnode) + # print(entry[0]) + # print('======') + fmt = entry[0] arg = 1 i = 0