GNATPP(1)
π NAME π
gnatpp β the Ada pretty-printer, bestie. It's from the ASIS Tools crew and it's literally here to make your Ada source look iconic. π
β¨ SYNOPSIS β¨
gnatpp [options] {filename | -files filename} [gcc_switches]
π¦ DESCRIPTION π¦
Okay so picture this: gnatpp takes the source text of the Ada units you point it at and recreates it from GNAT's parse tree. Like, it rebuilds the whole thing from scratch, and while it's doing that it reformats the source according to all the many options below. The defaults? They're set up for the GNAT style guide, so if you just vibe with the defaults you're already serving looks. π
πΈ OPTIONS πΈ
-A(0|1|2|3|4|5)β set alignment. All the alignments are set ON by default, so this is your "actually let me pick" button.0β set the default for all the alignments OFF1β align colons in declarations2β align assignments in declarations3β align assignments in assignment statements4β align arrow delimiters in associations5β align'AT'keywords in component clauses
-a(L|U|M)β set attribute casingLβ lower caseUβ upper caseMβ mixed case (set as default)
-c(0|1|2|3|4)β comments layout0β do not format comments1β GNAT style comment line indentation (set as default)2β standard comment line indentation3β GNAT style comment beginning4β reformat comment blocks
-clnnnβ indentation level for continuation lines, nnn from1 .. 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 the-nparameter and dictionary file(s) instead-eβ do not set missed end/exit labels-ffβ put Form Feed after a pragma Page-gnatecpathβ the same as the GNAT-gnatecoption-innnβ indentation level, nnn from1 .. 9, the default value is3-Idirβ the same as the GNAT-Ioption-I-β the same as the GNAT-I-option-k(L|U)β set keyword casingLβ lower case (set as default)Uβ upper case
-l(1|2|3)β set construct layout1β GNAT style layout (set as default)2β compact layout3β uncompact layout
-Mnnnβ set maximum line length, nnn from32 .. 256, the default value is79-n(D|U|L|M)β set name casing (for both defining and usage occurrences)Dβ as declared (set as default)Uβ all in upper caseLβ all in lower caseMβ mixed
-Nβ no tabulation in comments-p(L|U|M)β (yes bestie, that's it, just the letters)Lβ lower caseUβ upper caseMβ mixed case (set as default)
--RTS=dirβ the same as the GNAT--RTSoption-Tnnnβ do not use additional indentation level for case alternatives and variants if their number is nnn or more (the default value is10)-qβ quiet mode π€«-vβ verbose mode π£οΈ-ddβ progress indicator verbose mode-wβ warnings ON
π Output file control π
-pipeβ send the output intostdout-o output_fileβ write the output into output_file. Give up if output_file already exists-of output_fileβ write the output into output_file, overriding the existing file-rβ replace the argument source with the pretty-printed source and copy the argument source intofilename.npp. Give up iffilename.nppalready exists.-rfβ replace the argument source with the pretty-printed source and copy the argument source intofilename.npp, overriding the existing file-rnbβ replace the argument source with the pretty-printed source and do not create the back-up copy of the argument source
π Input files π
filenameβ the name of the Ada source file to be reformatted. Wildcards are allowed. β¨-files filenameβ the name of the text file containing a list of Ada source files to reformat
π§ GCC switches π§
gcc_switchesβ Passed tognatgccas"-cargs gcc_switches".
π SEE ALSO π
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.
And that's the whole page, bestie β this one's from the Debian GNU/Linux crew, dated 2014-08-09, and it's part of ASIS Tools. Go make your Ada look gorgeous. πβ¨
π¦ where this page comes from
- ubuntu jammy: asis-programs 2019-5 Β· GPL-3.0-or-later
- Copyright (C) 2006 Ludovic Brenta <ludovic@ludovic-brenta.org>
- Copyright (C) 2014 Nicolas Boulenguez <nicolas@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms