CDecompiler

public final class CDecompiler extends Decompiler

Decompiler for ANSI C. Original author Nicolas Chleq.

KEY PRINCIPLE ABOUT WHITE SPACES AND NEWLINES: Decompilation of any sub-tree takes care ONLY of printing from the first non-whitespace-non-newline character to the last non-whitespace-non-newline character of this sub-tree. Therefore, writing the whitespaces and newlines immediately surrounding decompilation of the sub-tree is the task of the parent tree of sub-tree (or parent of parent, etc). Exceptions may exist, but they must remain rare and motivated.

Constructors

CDecompiler

public CDecompiler(Printer printer, String htmlMsgFileName)

Methods

decompileTree

public void decompileTree(Tree tree, int lang, boolean inInclude, boolean showMsgs)

tryFlushComments

protected void tryFlushComments(int indent, boolean prefix)

Prints all waiting line-comments, and resets waiting comments to null.

tryFlushCommentsBlock

protected void tryFlushCommentsBlock(int indent, boolean prefix)

Prints all waiting block-comments, and resets waiting comments to null.