Decompiler¶
-
public class
Decompiler
¶ Abstract class for Fortran, C decompilers.
Fields¶
Methods¶
decompileTree¶
postDecompile¶
-
protected void
postDecompile
(Tree tree, int indent)¶ Process annotations of a tree after it has been decompiled. This function uses stack “seenTreesStack” to make sure each tree is postDecompiled only once, in principle on the last call to postDecompile().
- Parameters
tree – the tree to process.
indent – the indentation to use if something has to be printed.
- Throws
IOException – printer exception
preDecompile¶
-
protected void
preDecompile
(Tree tree, int indent)¶ Process annotations of a tree before it is decompiled. This function may be called several successive times for the same tree depending on the call order of all the decompile functions above. Only the 1st call will have an effect. The calls to this function are all paired with a corresponding call of the postDecompile(), using the global stack “seenTreesStack”.
- Parameters
tree – the tree to process.
indent – the indentation to use if something has to be printed.
- Throws
IOException – printer exception
print¶
-
protected void
print
(String word, int indent, String kind)¶ Prints the word “word” onto the output. If the word is too long, we go to a new line or we may even CUT the word.
- Parameters
indent – current indentation level, to be used in case the word starts a new line or “continuation line”.
kind – the kind of word, that will determine its HTML rendering. It can be one of {“plain”, “string”, “constant”, “keyword”, “funcname”, “typename”, “label”, “modifier”, “vardecl”}.
space¶
-
protected void
space
()¶ Prints one whiteSpace. If there was already a space just before, prints nothing.