Next: , Previous: Alignment Control, Up: Switches for gnatpp

13.1.2 Casing Control

gnatpp allows you to specify the casing for reserved words, pragma names, attribute designators and identifiers. For identifiers you may define a general rule for name casing but also override this rule via a set of dictionary files.

Three types of casing are supported: lower case, upper case, and mixed case. Lower and upper case are self-explanatory (but since some letters in Latin1 and other GNAT-supported character sets exist only in lower-case form, an upper case conversion will have no effect on them.) “Mixed case” means that the first letter, and also each letter immediately following an underscore, are converted to their uppercase forms; all the other letters are converted to their lowercase forms.

Attribute designators are lower case
Attribute designators are upper case
Attribute designators are mixed case (this is the default)

Keywords (technically, these are known in Ada as reserved words) are lower case (this is the default)
Keywords are upper case

Name casing for defining occurrences are as they appear in the source file (this is the default)
Names are in upper case
Names are in lower case
Names are in mixed case

Pragma names are lower case
Pragma names are upper case
Pragma names are mixed case (this is the default)
Use file as a dictionary file that defines the casing for a set of specified names, thereby overriding the effect on these names by any explicit or implicit -n switch. To supply more than one dictionary file, use several -D switches.

gnatpp implicitly uses a default dictionary file to define the casing for the Ada predefined names and the names declared in the GNAT libraries.

Do not use the default dictionary file; instead, use the casing defined by a -n switch and any explicit dictionary file(s)

The structure of a dictionary file, and details on the conventions used in the default dictionary file, are defined in Name Casing.

The -D- and -Dfile switches are mutually compatible.