Hi,
On Mon, Mar 30, 2009 at 05:54:36PM -0400, John Smith wrote:
> The output file from CIL (the *.cil.c file) is not indented to my liking
> (e.g., indented 2 spaces whereas I prefer 4 spaces, or not indented at all)
> and makes it difficult to read. Can someone tell me how I can change this.
> Preferably there would be some options I can enable/disable, but I wouldn't
> mind modifying CIL a little to achieve my goals.
You should read the "6.3 Printing and Debugging support" section of the
doc [1].
Look at the definition of defaultCilPrinter (in cil.ml). You can either
modify it directly or inherit it to make another printer and then:
Cil.printerForMaincil := ref (new myCustomPrinter);
Unfortunately, I think you will have to copy/paste most of the class and
adjust it to suit your needs, for indentation values are spread in the
code (look for "indentation" in [2]).
Regards,
Gabriel Kerneis
[1] http://manju.cs.berkeley.edu/cil/attributes.html#toc6
[2] http://manju.cs.berkeley.edu/cil/api/Cil.cilPrinter.html
------------------------------------------------------------------------------
_______________________________________________
CIL-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cil-users