.. java:import:: fr.inria.tapenade.representation ILUtils .. java:import:: fr.inria.tapenade.representation TapEnv .. java:import:: fr.inria.tapenade.representation TapList .. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils Tree .. java:import:: java.io IOException Decompiler ========== .. java:package:: fr.inria.tapenade.prettyprint :noindex: .. java:type:: public class Decompiler Abstract class for Fortran, C decompilers. Fields ------ EMPTY_CONTEXT ^^^^^^^^^^^^^ .. java:field:: protected static final int EMPTY_CONTEXT :outertype: Decompiler commentChar ^^^^^^^^^^^ .. java:field:: protected String commentChar :outertype: Decompiler continuationChar ^^^^^^^^^^^^^^^^ .. java:field:: protected String continuationChar :outertype: Decompiler eolContinuationChar ^^^^^^^^^^^^^^^^^^^ .. java:field:: protected String eolContinuationChar :outertype: Decompiler language ^^^^^^^^ .. java:field:: protected int language :outertype: Decompiler maxColumn ^^^^^^^^^ .. java:field:: protected int maxColumn :outertype: Decompiler posX ^^^^ .. java:field:: protected int posX :outertype: Decompiler posY ^^^^ .. java:field:: protected int posY :outertype: Decompiler printer ^^^^^^^ .. java:field:: protected final Printer printer :outertype: Decompiler showMessages ^^^^^^^^^^^^ .. java:field:: protected boolean showMessages :outertype: Decompiler To display Tapenade message. waitingComments ^^^^^^^^^^^^^^^ .. java:field:: protected TapList waitingComments :outertype: Decompiler waitingCommentsBlock ^^^^^^^^^^^^^^^^^^^^ .. java:field:: protected TapList waitingCommentsBlock :outertype: Decompiler Constructors ------------ Decompiler ^^^^^^^^^^ .. java:constructor:: protected Decompiler(Printer printer, String msgFileName) :outertype: Decompiler Methods ------- contextMinus ^^^^^^^^^^^^ .. java:method:: protected int contextMinus(int context, int newContextRk) :outertype: Decompiler contextPlus ^^^^^^^^^^^ .. java:method:: protected int contextPlus(int context, int newContextRk) :outertype: Decompiler decompileTree ^^^^^^^^^^^^^ .. java:method:: public void decompileTree(Tree tree, int language, boolean inInclude, boolean dumps) :outertype: Decompiler hasContext ^^^^^^^^^^ .. java:method:: protected boolean hasContext(int context, int newContextRk) :outertype: Decompiler newLine ^^^^^^^ .. java:method:: public void newLine(int indent) throws IOException :outertype: Decompiler prints a new line. postDecompile ^^^^^^^^^^^^^ .. java:method:: protected void postDecompile(Tree tree, int indent) throws IOException :outertype: Decompiler 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(). :param tree: the tree to process. :param indent: the indentation to use if something has to be printed. :throws IOException: printer exception preDecompile ^^^^^^^^^^^^ .. java:method:: protected void preDecompile(Tree tree, int indent) throws IOException :outertype: Decompiler 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". :param tree: the tree to process. :param indent: the indentation to use if something has to be printed. :throws IOException: printer exception print ^^^^^ .. java:method:: protected void print(String word, int indent, String kind) throws IOException :outertype: Decompiler 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. :param indent: current indentation level, to be used in case the word starts a new line or "continuation line". :param 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"}. printString ^^^^^^^^^^^ .. java:method:: protected void printString(String word) throws IOException :outertype: Decompiler reinitialize ^^^^^^^^^^^^ .. java:method:: protected void reinitialize() :outertype: Decompiler space ^^^^^ .. java:method:: protected void space() throws IOException :outertype: Decompiler Prints one whiteSpace. If there was already a space just before, prints nothing. tryFlushComments ^^^^^^^^^^^^^^^^ .. java:method:: protected void tryFlushComments(int indent, boolean prefix) throws IOException :outertype: Decompiler Prints all waiting line-comments, and resets waiting comments to null. tryFlushCommentsBlock ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void tryFlushCommentsBlock(int indent, boolean prefix) throws IOException :outertype: Decompiler Prints all waiting block-comments, and resets waiting comments to null.