module Printer_api:sig
..end
class type extensible_printer_type =object
..end
type
line_directive_style =
| |
Line_comment |
(* |
Before every element, print the line number in
comments. This is ignored by processing tools
(thus errors are reported on the lines of the CIL output),
but useful for visual inspection
| *) |
| |
Line_comment_sparse |
(* |
Like LineComment but only print a line directive for
a new source line
| *) |
| |
Line_preprocessor_input |
(* |
Use #line directives
| *) |
| |
Line_preprocessor_output |
(* |
Use # nnn directives (in gcc mode)
| *) |
type
state = {
|
mutable line_directive_style : |
(* |
Whether we print something that will only be used as input to Cil's
parser. In that case we are a bit more liberal in what we print.
| *) |
|
mutable print_cil_input : |
(* |
Whether to print the CIL as they are, without trying to be smart and
print nicer code. Normally this is false, in which case the pretty
printer will turn the while(1) loops of CIL into nicer loops, will not
print empty "else" blocks, etc. These is one case howewer in which if
you turn this on you will get code that does not compile: if you use
varargs the __builtin_va_arg function will be printed in its internal
form.
| *) |
|
mutable print_cil_as_is : |
(* |
The length used when wrapping output lines. Setting this variable to
a large integer will prevent wrapping and make #line directives more
accurate.
| *) |
|
mutable line_length : |
(* |
Emit warnings when truncating integer constants (default true)
| *) |
|
mutable warn_truncate : |
module type S =sig
..end