Scroll to navigation

GNATPP(1) ASIS Tools GNATPP(1)

NAME

gnatpp - Ada pretty-printer

SYNOPSIS

gnatpp [options] {filename | -files filename} [gcc_switches]

DESCRIPTION

gnatpp recreates the source text of the specified Ada units from GNAT's parse tree. Along the way, it reformats the source text according to the many options. The defaults are suitable for the GNAT style guide.

OPTIONS

set alignment, all the alignments are set ON by default
0
set the default for all the alignments OFF
1
align colons in declarations
2
align assignments in declarations
3
align assignments in assignment statements
4
align arrow delimiters in associations
5
align 'AT' keywords in component clauses
set attribute casing
lower case
upper case
mixed case (set as default)
comments layout
0
do not format comments
1
GNAT style comment line indentation (set as default)
2
standard comment line indentation
3
GNAT style comment beginning
4
reformat comment blocks
indentation level for continuation lines, nnn from 1 .. 9
-Dfile
set file as the dictionary file defining casing exceptions
-D-
do not use RM95-defined casing for predefined names, use casing defined by -n parameter and dictionary file(s) instead
do not set missed end/exit labels
put Form Feed after a pragma Page
the same as GNAT -gnatec option
indentation level, nnn from 1 .. 9, the default value is 3
the same as GNAT -I option
the same as GNAT -I- option
set keyword casing
lower case (set as default)
upper case
set construct layout
1
GNAT style layout (set as default)
2
compact layout
3
uncompact layout
-Mnnn
set maximum line length, nnn from 32 .. 256, the default value is 79
set name casing (for both defining and usage occurrences)
as declared (set as default)
all in upper case
all in lower case
mixed
no tabulation in comments
lower case
upper case
mixed case (set as default)
the same as GNAT --RTS option
do not use additional indentation level for case alternatives and variants if their number is nnn or more (the default value is 10)
quiet mode
verbose mode
progress indicator verbose mode
warnings ON

Output file control

send the output into stdout
write the output into output_file. Give up if output_file already exists
write the output into output_file, overriding the existing file
replace the argument source with the pretty-printed source and copy the argument source into filename.npp. Give up if filename.npp already exists.
replace the argument source with the pretty-printed source and copy the argument source into filename.npp, overriding the existing file
replace the argument source with the pretty-printed source and do not create the back-up copy of the argument source

Input files

the name of the Ada source file to be reformatted. Wildcards are allowed.
the name of the text file containing a list of Ada source files to reformat

GCC switches

Passed to gnatgcc as "-cargs gcc_switches".

SEE ALSO

gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatelim(1), gnatmetric(1), gnatstub(1), gnattest(1)

Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ if the asis-doc package is installed. The reference documentation about ASIS is excluded due to license problems, but may be found in various formats at http://libre.adacore.com/developers/documentation.

2014-08-09 Debian GNU/Linux