-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- no space is inserted between the switch and the file name.
-- The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
- -- except that the parameter is a decimal integer in the range 0 to 999.
+ -- except that the parameter is a decimal integer in the range 0 to 999999.
-- For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
-- more options to appear (although only in some cases does the use of
--
-- Use full source locations references in the report file.
+ S_Diagnosis : aliased constant S := "/DIAGNOSTIC_LIMIT=#" &
+ "-m#";
+ -- /DIAGNOSTIC_LIMIT=500 (D)
+ -- /DIAGNOSTIC_LIMIT=nnn
+ --
+ -- NNN is a decimal integer in the range of 1 to 1000 and limits the
+ -- number of diagnostic messages to be generated into Stdout to that
+ -- number. Once that number has been reached, gnatcheck stops
+ -- to print out diagnoses into Stderr. If NNN is equal to 0, this means
+ -- that there is no limit on the number of diagnoses in Stdout.
+
S_Check_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
"DEFAULT " &
"-vP0 " &
--
-- Work quietly, only output warnings and errors.
+ S_Check_Time : aliased constant S := "/TIME " &
+ "-t";
+ -- /NOTIME (D)
+ -- /TIME
+ --
+ -- Print out execution time
+
+ S_Check_Log : aliased constant S := "/LOG " &
+ "-log";
+ -- /NOLOG (D)
+ -- /LOG
+ --
+ -- Duplicate all the output sent to Stderr into a log file.
+
S_Check_Sections : aliased constant S := "/SECTIONS=" &
"DEFAULT " &
"-s123 " &
-- copies of the gnat1 commands spawned to obtain the chop control
-- information.
+ S_Check_Out : aliased constant S := "/OUTPUT=@" &
+ "-o@";
+ -- /OUTPUT=filename
+ --
+ -- Specify the name of the output file.
+
Check_Switches : aliased constant Switches :=
(S_Check_Add 'Access,
S_Check_All 'Access,
+ S_Diagnosis 'Access,
S_Check_Ext 'Access,
S_Check_Files 'Access,
S_Check_Follow 'Access,
S_Check_Mess 'Access,
S_Check_Project 'Access,
S_Check_Quiet 'Access,
+ S_Check_Time 'Access,
+ S_Check_Log 'Access,
S_Check_Sections 'Access,
S_Check_Short 'Access,
S_Check_Subdirs 'Access,
- S_Check_Verb 'Access);
-
- ----------------------------
- -- Switches for GNAT SYNC --
- ----------------------------
-
- S_Sync_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
- "-aP*";
- -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
- --
- -- Add directories to the project search path.
-
- S_Sync_All : aliased constant S := "/ALL " &
- "-a";
- -- /NOALL (D)
- -- /ALL
- --
- -- Also check the components of the GNAT run time and process the needed
- -- components of the GNAT RTL when building and analyzing the global
- -- structure for checking the global rules.
-
- S_Sync_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
- "-X" & '"';
- -- /EXTERNAL_REFERENCE="name=val"
- --
- -- Specifies an external reference to the project manager. Useful only if
- -- /PROJECT_FILE is used.
- --
- -- Example:
- -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
-
- S_Sync_Files : aliased constant S := "/FILES=@" &
- "-files=@";
- -- /FILES=filename
- --
- -- Take as arguments the files that are listed in the specified
- -- text file.
-
- S_Sync_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
- "-eL";
- -- /NOFOLLOW_LINKS_FOR_FILES (D)
- -- /FOLLOW_LINKS_FOR_FILES
- --
- -- Follow links when parsing project files
-
- S_Sync_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
- "DEFAULT " &
- "-vP0 " &
- "MEDIUM " &
- "-vP1 " &
- "HIGH " &
- "-vP2";
- -- /MESSAGES_PROJECT_FILE[=messages-option]
- --
- -- Specifies the "verbosity" of the parsing of project files.
- -- messages-option may be one of the following:
- --
- -- DEFAULT (D) No messages are output if there is no error or warning.
- --
- -- MEDIUM A small number of messages are output.
- --
- -- HIGH A great number of messages are output, most of them not
- -- being useful for the user.
-
- S_Sync_Project : aliased constant S := "/PROJECT_FILE=<" &
- "-P>";
- -- /PROJECT_FILE=filename
- --
- -- Specifies the main project file to be used. The project files rooted
- -- at the main project file will be parsed before the invocation of the
- -- gnatcheck. The source directories to be searched will be communicated
- -- to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
-
- S_Sync_Quiet : aliased constant S := "/QUIET " &
- "-q";
- -- /NOQUIET (D)
- -- /QUIET
- --
- -- Work quietly, only output warnings and errors.
-
- S_Sync_Subdirs : aliased constant S := "/SUBDIRS=<" &
- "--subdirs=>";
- -- /SUBDIRS=dir
- --
- -- The actual directories (object, exec, library, ...) are subdirectories
- -- of the directory specified in the project file. If the subdirectory
- -- does not exist, it is created automatically.
-
- S_Sync_Verb : aliased constant S := "/VERBOSE " &
- "-v";
- -- /NOVERBOSE (D)
- -- /VERBOSE
- --
- -- The version number and copyright notice are output, as well as exact
- -- copies of the gnat1 commands spawned to obtain the chop control
- -- information.
-
- S_Sync_Exec : aliased constant S := "/EXECUTION_TIME " &
- "-t";
- -- /NOEXECUTION_TIME (D)
- -- /EXECUTION_TIME
- --
- -- Output the execution time
-
- S_Sync_Details : aliased constant S := "/DETAILs=" &
- "MEDIUM " &
- "-om " &
- "SHORT " &
- "-os " &
- "FULL " &
- "-of";
- -- /DETAILS[=options]
- --
- -- Specifies the details of the output.
- -- Options may be one of the following:
- --
- -- MEDIUM (D)
- -- SHORT
- -- FULL
-
- S_Sync_Warnoff : aliased constant S := "/WARNINGS_OFF " &
- "-wq";
- --
- -- /WARNINGS_OFF
- --
- -- Turn warnings off
-
- S_Sync_Output : aliased constant S := "/OUTPUT_FILE=<" &
- "-out_file=>";
- --
- -- /OUTPUT_FILE=filename
- --
- -- Redirect output to a text file
-
- Sync_Switches : aliased constant Switches :=
- (S_Sync_Add 'Access,
- S_Sync_All 'Access,
- S_Sync_Ext 'Access,
- S_Sync_Follow 'Access,
- S_Sync_Files 'Access,
- S_Sync_Mess 'Access,
- S_Sync_Project 'Access,
- S_Sync_Quiet 'Access,
- S_Sync_Subdirs 'Access,
- S_Sync_Verb 'Access,
- S_Sync_Exec 'Access,
- S_Sync_Details 'Access,
- S_Sync_Warnoff 'Access,
- S_Sync_Output 'Access);
+ S_Check_Verb 'Access,
+ S_Check_Out 'Access);
----------------------------
-- Switches for GNAT CHOP --
-- filetype, instead of the object file. This may be useful if you need
-- to examine the generated assembly code.
+ S_GCC_AValid : aliased constant S := "/ASSUME_VALID " &
+ "-gnatB";
+ -- /NO_ASSUME_VALID (D)
+ -- /ASSUME_VALID
+ --
+ -- Use to tell the compiler to assume that all objects have valid values
+ -- except those occurring as prefixes to 'Valid attributes. In the default
+ -- mode, the compiler assumes that values may be invalid unless it can
+ -- be sure that they are valid, and code is generated to allow for this
+ -- possibility. The use of /ASSUME_VALID will improve the code.
+
S_GCC_Checks : aliased constant S := "/CHECKS=" &
"FULL " &
"-gnato,!-gnatE,!-gnatp " &
--
-- Produces a listing of the expanded code in Ada source form. For
-- example, all tasking constructs are reduced to appropriate run-time
- -- library calls.
+ -- library calls. The maximum line length for the listing 72.
+
+ S_GCC_Lexpand : aliased constant S := "/LEXPAND_SOURCE=#" &
+ "-gnatG#";
+ -- /LEXPAND_SOURCE=nnn
+ --
+ -- Produces a listing of the expanded code in Ada source form. For
+ -- example, all tasking constructs are reduced to appropriate run-time
+ -- library calls. The parameter is the maximum line length for the
+ -- listing.
S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " &
"-gnatX";
-- /VERBOSE), then error lines start with the full path name of the
-- project file, rather than its simple file name.
+ S_GCC_Generate : aliased constant S := "/GENERATE_PROCESSED_SOURCE " &
+ "-gnateG";
+ -- /NOGENERATE_PROCESSED_SOURCE (D)
+ -- /GENERATE_PROCESSED_SOURCE
+ --
+ -- Generate a file <source>_prep if the integrated preprocessing
+ -- is modifying the source text.
+
S_GCC_GNAT : aliased constant S := "/GNAT_INTERNAL " &
"-gnatg";
-- /NOGNAT_INTERNAL (D)
-- a body is compiled, the corresponding spec is also listed, along
-- with any subunits.
+ S_GCC_Machine : aliased constant S := "/MACHINE_CODE_LISTING " &
+ "-source-listing";
+ -- /NOMACHINE_CODE_LISTING (D)
+ -- /MACHINE_CODE_LISTING
+ --
+ -- Cause a full machine code listing of the file to be generated to
+ -- <filename>.lis. Interspersed source is included if the /DEBUG
+ -- qualifier is also present.
+
S_GCC_Mapping : aliased constant S := "/MAPPING_FILE=<" &
"-gnatem>";
-- /MAPPING_FILE=file_name
--
-- Do not look for library files in the system default directory.
+ S_GCC_NoWarnP : aliased constant S := "/NOWARNING_PRAGMAS " &
+ "-gnatd.i";
+ -- /NOWARNING_PRAGMAS
+ --
+ -- Causes all Warnings pragmas to be ignored. Useful to check if the
+ -- program has obsolete warnings pragmas that are hiding problems.
+
S_GCC_Opt : aliased constant S := "/OPTIMIZE=" &
"ALL " &
"-O2,!-O0,!-O1,!-O3 " &
-- file xyz.adb is compiled with -gnatl=.lst, then the output is written
-- to file xyz.adb_lst.
+ S_GCC_Pointer : aliased constant S := "/POINTER_SIZE=" &
+ "64 " &
+ "-mmalloc64 " &
+ "LONG " &
+ "-mmalloc64 " &
+ "32 " &
+ "-mno-malloc64 " &
+ "SHORT " &
+ "-mno-malloc64";
+ -- /POINTER_SIZE=64 (D)
+ -- /POINTER_SIZE[=(keyword[,...])]
+ --
+ -- Change how pointers and descriptors are allocated. The following
+ -- keywords are supported:
+ --
+ -- 64 (D) Allocate heap pointers in 64bit space except as
+ -- constrained by a 32bit size clause or by
+ -- Convention_C and generate 64bit descriptors for
+ -- Descriptor mechanisms for calling imported
+ -- subprograms and accept both 64bit and 32bit
+ -- descriptors for calls to exported subprograms.
+ --
+ -- LONG Equivalent to option 64.
+ --
+ -- 32 Allocate all heap pointers in 32bit space and
+ -- generate 32bit descriptors for Descriptor
+ -- mechanisms for calling imported subprograms.
+ --
+ -- SHORT Equivalent to option 32.
+
S_GCC_Polling : aliased constant S := "/POLLING " &
"-gnatP";
-- /NOPOLLING (D)
-- readable to any Ada programmer, and is useful to determine the
-- characteristics of target dependent types in package Standard.
+ S_GCC_Reswarn : aliased constant S := "/TREAT_RESTRICTIONS_AS_WARNINGS " &
+ "-gnatr";
+
+ -- /NO_TREAT_RESTRICTIONS_AS_WARNINGS (D)
+ -- /TREAT_RESTRICTIONS_AS_WARNINGS
+ --
+ -- Causes all restrictions to be treated as warnings (pragma Restriction
+ -- treated as Restriction_Warnings, pragma Profile as Profile_Warnings,
+ -- and pragma Ravenscar sets restriction warnings instead of restrictions)
+
S_GCC_Report : aliased constant S := "/REPORT_ERRORS=" &
"VERBOSE " &
"-gnatv " &
--
-- Build against an alternate runtime system named xxx or RTS-xxx.
+ S_GCC_SCO : aliased constant S := "/SCO_OUTPUT " &
+ "-gnateS";
+ -- /NOSCO_OUTPUT (D)
+ -- /SCO_OUTPUT
+ --
+ -- Controls the output of SCO (Source Coverage Obligation) information
+ -- in the generated ALI file. This information is used by advanced source
+ -- coverage tools. For a full description of the SCO format, see unit
+ -- SCOs in the compiler sources (sco.ads/sco.adb).
+
S_GCC_Search : aliased constant S := "/SEARCH=*" &
"-I*";
-- /SEARCH=(directory[,...])
"-gnaty-A " &
"BLANKS " &
"-gnatyb " &
+ "BOOLEAN_OPERATORS " &
+ "-gnatyB " &
"NOBLANKS " &
"-gnaty-b " &
"COMMENTS " &
"-gnatyo " &
"NOORDERED_SUBPROGRAMS " &
"-gnaty-o " &
+ "OVERRIDING_INDICATORS " &
+ "-gnatyO " &
+ "NOOVERRIDING_INDICATORS " &
+ "-gnaty-O " &
"PRAGMA " &
"-gnatyp " &
"NOPRAGMA " &
-- in the ordering (e.g. Junk2 comes before
-- Junk10).
--
+ -- OVERRIDING_INDICATORS Check that overriding subprograms are
+ -- explicitly marked as such. The declaration of
+ -- a primitive operation of a type extension that
+ -- overrides an inherited operation must carry
+ -- an overriding indicator.
+ --
-- PRAGMA Check pragma casing.
-- Pragma names must be written in mixed case,
-- that is, the initial letter and any letter
"-gnatwb " &
"NO_BAD_FIXED_VALUES " &
"-gnatwB " &
+ "BIASED_REPRESENTATION " &
+ "-gnatw.b " &
+ "NO_BIASED_REPRESENTATION " &
+ "-gnatw.B " &
"CONDITIONALS " &
"-gnatwc " &
"NOCONDITIONALS " &
"-gnatwm " &
"NOMODIFIED_UNREF " &
"-gnatwM " &
+ "SUSPICIOUS_MODULUS " &
+ "-gnatw.m " &
+ "NOSUSPICIOUS_MODULUS " &
+ "-gnatw.M " &
"NORMAL " &
"-gnatwn " &
"OVERLAYS " &
"-gnatwv " &
"NOVARIABLES_UNINITIALIZED " &
"-gnatwV " &
+ "REVERSE_BIT_ORDER " &
+ "-gnatw.v " &
+ "NOREVERSE_BIT_ORDER " &
+ "-gnatw.V " &
"LOWBOUND_ASSUMED " &
"-gnatww " &
"NOLOWBOUND_ASSUMED " &
-- NODOC (see /WIDE_CHARACTER_ENCODING)
S_GCC_Xdebug : aliased constant S := "/XDEBUG " &
- "-gnatD";
+ "-gnatD";
-- /NOXDEBUG (D)
-- /XDEBUG
--
-- refer to the generated file. This allows source level debugging using
-- the generated code which is sometimes useful for complex code, for
-- example to find out exactly which part of a complex construction
- -- raised an exception.
+ -- raised an exception. The maximum line length for the output is 72.
+
+ S_GCC_Lxdebug : aliased constant S := "/LXDEBUG=#" &
+ "-gnatD=#";
+ -- /LXDEBUG=nnn
+ --
+ -- Output expanded source files for source level debugging.
+ -- The expanded source (see /EXPAND_SOURCE) is written to files
+ -- with names formed by appending "_DG" to the input file name,
+ -- The debugging information generated by the /DEBUG qualifier will then
+ -- refer to the generated file. This allows source level debugging using
+ -- the generated code which is sometimes useful for complex code, for
+ -- example to find out exactly which part of a complex construction
+ -- raised an exception. The parameter is the maximum line length for
+ -- the output.
S_GCC_Xref : aliased constant S := "/XREF=" &
"GENERATE " &
S_GCC_Ada_05 'Access,
S_GCC_Add 'Access,
S_GCC_Asm 'Access,
+ S_GCC_AValid 'Access,
S_GCC_Checks 'Access,
S_GCC_ChecksX 'Access,
S_GCC_Compres 'Access,
S_GCC_Error 'Access,
S_GCC_ErrorX 'Access,
S_GCC_Expand 'Access,
+ S_GCC_Lexpand 'Access,
S_GCC_Extend 'Access,
S_GCC_Ext 'Access,
S_GCC_File 'Access,
S_GCC_Follow 'Access,
S_GCC_Force 'Access,
S_GCC_Full 'Access,
+ S_GCC_Generate'Access,
S_GCC_GNAT 'Access,
S_GCC_Help 'Access,
S_GCC_Ident 'Access,
S_GCC_Length 'Access,
S_GCC_List 'Access,
S_GCC_Output 'Access,
+ S_GCC_Machine 'Access,
S_GCC_Mapping 'Access,
S_GCC_Mess 'Access,
S_GCC_Nesting 'Access,
S_GCC_Noload 'Access,
S_GCC_Nostinc 'Access,
S_GCC_Nostlib 'Access,
+ S_GCC_NoWarnP 'Access,
S_GCC_Opt 'Access,
S_GCC_OptX 'Access,
+ S_GCC_Pointer 'Access,
S_GCC_Polling 'Access,
S_GCC_Project 'Access,
S_GCC_Psta 'Access,
S_GCC_Repinfo 'Access,
S_GCC_RepinfX 'Access,
S_GCC_RTS 'Access,
+ S_GCC_SCO 'Access,
S_GCC_Search 'Access,
S_GCC_Style 'Access,
S_GCC_StyleX 'Access,
S_GCC_No_Back 'Access,
S_GCC_All_Back'Access,
S_GCC_Xdebug 'Access,
+ S_GCC_Lxdebug 'Access,
S_GCC_Xref 'Access);
----------------------------
-- Specifies the main project file to be used. The project files rooted
-- at the main project file will be parsed before looking for sources.
-- The source and object directories to be searched will be communicated
- -- to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
+ -- to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
-- ADA_PRJ_OBJECTS_FILE.
S_Find_Ref : aliased constant S := "/REFERENCES " &
-- Put all object files and .ALI files in <file>.
-- This qualifier is not compatible with /PROJECT_FILE.
+ S_Make_Disprog : aliased constant S := "/DISPLAY_PROGRESS " &
+ "-d";
+ -- /NOPLAY_PROGRESS (D)
+ -- /DISPLAY_PROGRESS
+ --
+ -- Display progress for each source, up to date or not, as a single line
+ -- completed x out of y (zz%)
+ -- If the file needs to be compiled this is displayed after the
+ -- invocation of the compiler. These lines are displayed even in quiet
+ -- output mode (/QUIET).
+
S_Make_Doobj : aliased constant S := "/DO_OBJECT_CHECK " &
"-n";
-- /NODO_OBJECT_CHECK (D)
S_Make_Current 'Access,
S_Make_Dep 'Access,
S_Make_Dirobj 'Access,
+ S_Make_Disprog 'Access,
S_Make_Doobj 'Access,
S_Make_Execut 'Access,
S_Make_Ext 'Access,
-- NODOC (see /SYNTAX_METRICS)
S_Metric_Syntax : aliased constant S := "/SYNTAX_METRICS=" &
- "ALL_ON " &
+ "ALL " &
"--syntax-all " &
- "ALL_OFF " &
+ "NONE " &
"--no-syntax-all " &
- "DECLARATIONS_ON " &
+ "DECLARATIONS " &
"--declarations " &
- "DECLARATIONS_OFF " &
+ "NODECLARATIONS " &
"--no-declarations " &
- "STATEMENTS_ON " &
+ "STATEMENTS " &
"--statements " &
- "STATEMENTS_OFF " &
+ "NOSTATEMENTS " &
"--no-statements " &
- "PUBLIC_SUBPROGRAMS_ON " &
+ "PUBLIC_SUBPROGRAMS " &
"--public-subprograms " &
- "PUBLIC_SUBPROGRAMS_OFF " &
+ "NOPUBLIC_SUBPROGRAMS " &
"--no-public-subprograms " &
- "ALL_SUBPROGRAMS_ON " &
+ "ALL_SUBPROGRAMS " &
"--all-subprograms " &
- "ALL_SUBPROGRAMS_OFF " &
+ "NOALL_SUBPROGRAMS " &
"--no-all-subprograms " &
- "PUBLIC_TYPES_ON " &
+ "PUBLIC_TYPES " &
"--public-types " &
- "PUBLIC_TYPES_OFF " &
+ "NOPUBLIC_TYPES " &
"--no-public-types " &
- "ALL_TYPES_ON " &
+ "ALL_TYPES " &
"--all-types " &
- "ALL_TYPES_OFF " &
+ "NOALL_TYPES " &
"--no-all-types " &
- "UNIT_NESTING_ON " &
+ "UNIT_NESTING " &
"--unit-nesting " &
- "UNIT_NESTING_OFF " &
+ "NOUNIT_NESTING " &
"--no-unit-nesting " &
- "CONSTRUCT_NESTING_ON " &
+ "CONSTRUCT_NESTING " &
"--construct-nesting " &
- "CONSTRUCT_NESTING_OFF " &
+ "NOCONSTRUCT_NESTING " &
"--no-construct-nesting";
-- /SYNTAX_METRICS(option, option ...)
--
-- Specifies the syntax element metrics to be computed (if at least one
-- positive syntax element metric, line metric, complexity or coupling
- -- metric is specified then only explicitly specified specified syntax
- -- element metrics are computed and reported)
+ -- metric is specified then only explicitly specified syntax element
+ -- metrics are computed and reported)
--
-- option may be one of the following:
--
- -- ALL_ON (D) All the syntax element metrics are computed
- -- ALL_OFF None of syntax element metrics is computed
- -- DECLARATIONS_ON Compute the total number of declarations
- -- DECLARATIONS_OFF Do not compute the total number of
- -- declarations
- -- STATEMENTS_ON Compute the total number of statements
- -- STATEMENTS_OFF Do not compute the total number of
- -- statements
- -- PUBLIC_SUBPROGRAMS_ON Compute the number of public subprograms
- -- PUBLIC_SUBPROGRAMS_OFF Do not compute the number of public
- -- subprograms
- -- ALL_SUBPROGRAMS_ON Compute the number of all the subprograms
- -- ALL_SUBPROGRAMS_OFF Do not compute the number of all the
- -- subprograms
- -- PUBLIC_TYPES_ON Compute the number of public types
- -- PUBLIC_TYPES_OFF Do not compute the number of public types
- -- ALL_TYPES_ON Compute the number of all the types
- -- ALL_TYPES_OFF Do not compute the number of all the types
- -- UNIT_NESTING_ON Compute the maximal program unit nesting
- -- level
- -- UNIT_NESTING_OFF Do not compute the maximal program unit
- -- nesting level
- -- CONSTRUCT_NESTING_ON Compute the maximal construct nesting level
- -- CONSTRUCT_NESTING_OFF Do not compute the maximal construct nesting
- -- level
+ -- ALL (D) All the syntax element metrics are computed
+ -- NONE None of syntax element metrics is computed
+ -- DECLARATIONS Compute the total number of declarations
+ -- NODECLARATIONS Do not compute the total number of declarations
+ -- STATEMENTS Compute the total number of statements
+ -- NOSTATEMENTS Do not compute the total number of statements
+ -- PUBLIC_SUBPROGRAMS Compute the number of public subprograms
+ -- NOPUBLIC_SUBPROGRAMS Do not compute the number of public subprograms
+ -- ALL_SUBPROGRAMS Compute the number of all the subprograms
+ -- NOALL_SUBPROGRAMS Do not compute the number of all the
+ -- subprograms
+ -- PUBLIC_TYPES Compute the number of public types
+ -- NOPUBLIC_TYPES Do not compute the number of public types
+ -- ALL_TYPES Compute the number of all the types
+ -- NOALL_TYPES Do not compute the number of all the types
+ -- UNIT_NESTING Compute the maximal program unit nesting
+ -- level
+ -- NOUNIT_NESTING Do not compute the maximal program unit
+ -- nesting level
+ -- CONSTRUCT_NESTING Compute the maximal construct nesting level
+ -- NOCONSTRUCT_NESTING Do not compute the maximal construct nesting
+ -- level
--
-- All combinations of syntax element metrics options are allowed.
"!-x,!-nt,!-sfn " &
"XML " &
"-x " &
+ "XSD " &
+ "-xs " &
"NO_TEXT " &
"-nt " &
"SHORT_SOURCE_FILE_NAME " &
-- DEFAULT (D) Generate the text output only, use full
-- argument source names in global information
-- XML Generate the output in XML format
+ -- XSD Generate the output in XML format, and
+ -- generate an XML schema file that describes
+ -- the structure of XML metrics report
-- NO_TEXT Do not generate the text output (implies XML)
-- SHORT_SOURCE_FILE_NAME Use short argument source names in output
-- NODOC (see /LINE_COUNT_METRICS)
S_Metric_Lines : aliased constant S := "/LINE_COUNT_METRICS=" &
- "ALL_ON " &
+ "ALL " &
"--lines-all " &
- "ALL_OFF " &
+ "NONE " &
"--no-lines-all " &
- "ALL_LINES_ON " &
+ "ALL_LINES " &
"--lines " &
- "ALL_LINES_OFF " &
+ "NOALL_LINES " &
"--no-lines " &
- "CODE_LINES_ON " &
+ "CODE_LINES " &
"--lines-code " &
- "CODE_LINES_OFF " &
+ "NOCODE_LINES " &
"--no-lines-code " &
- "COMMENT_LINES_ON " &
+ "COMMENT_LINES " &
"--lines-comment " &
- "COMMENT_LINES_OFF " &
+ "NOCOMMENT_LINES " &
"--no-lines-comment " &
- "CODE_COMMENT_LINES_ON " &
+ "CODE_COMMENT_LINES " &
"--lines-eol-comment " &
- "CODE_COMMENT_LINES_OFF " &
+ "NOCODE_COMMENT_LINES " &
"--no-lines-eol-comment " &
- "COMMENT_PERCENTAGE_ON " &
+ "COMMENT_PERCENTAGE " &
"--lines-ratio " &
- "COMMENT_PERCENTAGE_OFF " &
+ "NOCOMMENT_PERCENTAGE " &
"--no-lines-ratio " &
- "BLANK_LINES_ON " &
+ "BLANK_LINES " &
"--lines-blank " &
- "BLANK_LINES_OFF " &
+ "NOBLANK_LINES " &
"--no-lines-blank " &
- "AVERAGE_BODY_LINES_ON " &
+ "AVERAGE_BODY_LINES " &
"--lines-average " &
- "AVERAGE_BODY_LINES_OFF " &
+ "NOAVERAGE_BODY_LINES " &
"--no-lines-average";
-- /LINE_COUNT_METRICS=(option, option ...)
-- Specifies the line metrics to be computed (if at least one positive
-- syntax element metric, line metric, complexity or coupling metric is
- -- specified then only explicitly specified specified line metrics are
- -- computed and reported)
+ -- specified then only explicitly specified line metrics are computed
+ -- and reported)
--
-- option may be one of the following:
--
- -- ALL_ON (D) All the line metrics are computed
- -- ALL_OFF None of line metrics is computed
- -- ALL_LINES_ON All lines are computed
- -- ALL_LINES_OFF All lines are not computed
- -- CODE_LINES_ON Lines with Ada code are computed
- -- CODE_LINES_OFF Lines with Ada code are not computed
- -- COMMENT_LINES_ON Comment lines are computed
- -- COMMENT_LINES_OFF Comment lines are not computed
- -- COMMENT_PERCENTAGE_ON Ratio between comment lines and all the
- -- lines containing comments and program code
- -- is computed
- -- COMMENT_PERCENTAGE_OFF Ratio between comment lines and all the
- -- lines containing comments and program code
- -- is not computed
- -- BLANK_LINES_ON Blank lines are computed
- -- BLANK_LINES_OFF Blank lines are not computed
- -- AVERAGE_BODY_LINES_ON Average number of code lines in subprogram,
- -- task and entry bodies and statement
- -- sequences of package bodies is computed
- -- AVERAGE_BODY_LINES_OFF Average number of code lines in subprogram,
- -- task and entry bodies and statement
- -- sequences of package bodies is not computed
+ -- ALL (D) All the line metrics are computed
+ -- NONE None of line metrics is computed
+ -- ALL_LINES All lines are computed
+ -- NOALL_LINES All lines are not computed
+ -- CODE_LINES Lines with Ada code are computed
+ -- NOCODE_LINES Lines with Ada code are not computed
+ -- COMMENT_LINES Comment lines are computed
+ -- NOCOMMENT_LINES Comment lines are not computed
+ -- CODE_COMMENT_LINES Lines containing both code and comment parts
+ -- are computed
+ -- NOCODE_COMMENT_LINES Lines containing both code and comment parts
+ -- are not computed
+ -- COMMENT_PERCENTAGE Ratio between comment lines and all the lines
+ -- containing comments and program code is
+ -- computed
+ -- NOCOMMENT_PERCENTAGE Ratio between comment lines and all the lines
+ -- containing comments and program code is not
+ -- computed
+ -- BLANK_LINES Blank lines are computed
+ -- NOBLANK_LINES Blank lines are not computed
+ -- AVERAGE_BODY_LINES Average number of code lines in subprogram,
+ -- task and entry bodies and statement sequences
+ -- of package bodies is computed
+ -- NOAVERAGE_BODY_LINES Average number of code lines in subprogram,
+ -- task and entry bodies and statement sequences
+ -- of package bodies is not computed
--
-- All combinations of line metrics options are allowed.
S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS=" &
- "ALL_ON " &
+ "ALL " &
"--complexity-all " &
- "ALL_OFF " &
+ "NONE " &
"--no-complexity-all " &
- "CYCLOMATIC_ON " &
+ "CYCLOMATIC " &
"--complexity-cyclomatic " &
- "CYCLOMATIC_OFF " &
+ "NOCYCLOMATIC " &
"--no-complexity-cyclomatic "&
- "ESSENTIAL_ON " &
+ "ESSENTIAL " &
"--complexity-essential " &
- "ESSENTIAL_OFF " &
+ "NOESSENTIAL " &
"--no-complexity-essential " &
- "LOOP_NESTING_ON " &
+ "LOOP_NESTING " &
"--loop-nesting " &
- "LOOP_NESTING_OFF " &
+ "NOLOOP_NESTING " &
"--no-loop-nesting " &
- "AVERAGE_COMPLEXITY_ON " &
+ "AVERAGE_COMPLEXITY " &
"--complexity-average " &
- "AVERAGE_COMPLEXITY_OFF " &
- "--no-complexity-average";
+ "NOAVERAGE_COMPLEXITY " &
+ "--no-complexity-average " &
+ "EXTRA_EXIT_POINTS " &
+ "--extra-exit-points " &
+ "NOEXTRA_EXIT_POINTS " &
+ "--no-extra-exit-points";
-- /COMPLEXITY_METRICS=(option, option ...)
-- Specifies the complexity metrics to be computed (if at least one
-- positive syntax element metric, line metric, complexity or coupling
- -- metric is specified then only explicitly specified specified complexity
- -- metrics are computed and reported)
+ -- metric is specified then only explicitly specified complexity metrics
+ -- are computed and reported)
--
-- option may be one of the following:
--
- -- ALL_ON (D) All the complexity metrics are computed
- -- ALL_OFF None of complexity metrics is computed
- -- CYCLOMATIC_ON Compute the McCabe Cyclomatic Complexity
- -- CYCLOMATIC_OFF Do not compute the McCabe Cyclomatic
- -- Complexity
- -- ESSENTIAL_ON Compute the Essential Complexity
- -- ESSENTIAL_OFF Do not compute the Essential Complexity
- -- LOOP_NESTIMG_ON Compute the maximal loop nesting
- -- LOOP_NESTIMG_OFF Do not compute the maximal loop nesting
- -- AVERAGE_COMPLEXITY_ON Compute the average complexity for
- -- executable bodies
- -- AVERAGE_COMPLEXITY_OFF Do not compute the average complexity for
- -- executable bodies
+ -- ALL (D) All the complexity metrics are computed
+ -- NONE None of complexity metrics is computed
+ -- CYCLOMATIC Compute the McCabe Cyclomatic Complexity
+ -- NOCYCLOMATIC Do not compute the McCabe Cyclomatic Complexity
+ -- ESSENTIAL Compute the Essential Complexity
+ -- NOESSENTIAL Do not compute the Essential Complexity
+ -- LOOP_NESTING Compute the maximal loop nesting
+ -- NOLOOP_NESTING Do not compute the maximal loop nesting
+ -- AVERAGE_COMPLEXITY Compute the average complexity for executable
+ -- bodies
+ -- NOAVERAGE_COMPLEXITY Do not compute the average complexity for
+ -- executable bodies
+ -- EXTRA_EXIT_POINTS Compute extra exit points metric
+ -- NOEXTRA_EXIT_POINTS Do not compute extra exit points metric
--
-- All combinations of line metrics options are allowed.
S_Metric_Coupling : aliased constant S := "/COUPLING_METRICS=" &
- "ALL_ON " &
+ "ALL " &
"--coupling-all " &
- "ALL_OFF " &
- "--no-counling-all " &
- "PACKAGE_EFFERENT_ON " &
+ "NONE " &
+ "--no-coupling-all " &
+ "PACKAGE_EFFERENT " &
"--package-efferent-coupling " &
- "PACKAGE_EFFERENT_OFF " &
+ "NOPACKAGE_EFFERENT " &
"--no-package-efferent-coupling " &
- "PACKAGE_AFFERENT_ON " &
+ "PACKAGE_AFFERENT " &
"--package-afferent-coupling " &
- "PACKAGE_AFFERENT_OFF " &
+ "NOPACKAGE_AFFERENT " &
"--no-package-afferent-coupling " &
- "CATEGORY_EFFERENT_ON " &
+ "CATEGORY_EFFERENT " &
"--category-efferent-coupling " &
- "CATEGORY_EFFERENT_OFF " &
+ "NOCATEGORY_EFFERENT " &
"--no-category-efferent-coupling " &
- "CATEGORY_AFFERENT_ON " &
+ "CATEGORY_AFFERENT " &
"--category-afferent-coupling " &
- "CATEGORY_AFFERENT_OFF " &
+ "NOCATEGORY_AFFERENT " &
"--no-category-afferent-coupling";
-- /COUPLING_METRICS=(option, option ...)
--
-- option may be one of the following:
--
- -- ALL_ON All the coupling metrics are computed
- -- ALL_OFF (D) None of coupling metrics is computed
- -- PACKAGE_EFFERENT_ON Compute package efferent coupling
- -- PACKAGE_EFFERENT_OFF Do not compute package efferent coupling
- -- PACKAGE_AFFERENT_ON Compute package afferent coupling
- -- PACKAGE_AFFERENT_OFF Do not compute package afferent coupling
- -- CATEGORY_EFFERENT_ON Compute category efferent coupling
- -- CATEGORY_EFFERENT_OFF Do not compute category efferent coupling
- -- CATEGORY_AFFERENT_ON Compute category afferent coupling
- -- CATEGORY_AFFERENT_OFF Do not compute category afferent coupling
+ -- ALL All the coupling metrics are computed
+ -- NONE (D) None of coupling metrics is computed
+ -- PACKAGE_EFFERENT Compute package efferent coupling
+ -- NOPACKAGE_EFFERENT Do not compute package efferent coupling
+ -- PACKAGE_AFFERENT Compute package afferent coupling
+ -- NOPACKAGE_AFFERENT Do not compute package afferent coupling
+ -- CATEGORY_EFFERENT Compute category efferent coupling
+ -- NOCATEGORY_EFFERENT Do not compute category efferent coupling
+ -- CATEGORY_AFFERENT Compute category afferent coupling
+ -- NOCATEGORY_AFFERENT Do not compute category afferent coupling
--
-- All combinations of coupling metrics options are allowed.
-- Do not place the IS keyword on a separate line in a subprogram body in
-- case if the specification occupies more then one line.
+ S_Pretty_Sep_Label : aliased constant S := "/SEPARATE_LABEL " &
+ "--separate-label";
+ -- /SEPARATE_LABEL
+ --
+ -- Place statement label(s) and the statement itself on separate lines.
+
S_Pretty_Sep_Loop_Then : aliased constant S := "/SEPARATE_LOOP_THEN " &
"--separate-loop-then";
-- /SEPARATE_LOOP_THEN
--
-- Specify the case of Ada keywords. The default is keywords in lower
-- case.
+ --
-- keyword-option may be one of the following:
--
-- LOWER_CASE (D)
-- /MAX_INDENT=nnn
--
-- Do not use an additional indentation level for case alternatives
- -- and variants if their number is nnn or more. The default is 10.
- -- If nnn is zero, an additional indentation level is used for any number
- -- of case alternatives and variants.
+ -- and variants if their number is nnn or more. The default is 10.
+ -- If nnn is zero, an additional indentation level is used for any
+ -- number of case alternatives and variants.
S_Pretty_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
"DEFAULT " &
S_Pretty_Project 'Access,
S_Pretty_RTS 'Access,
S_Pretty_Search 'Access,
+ S_Pretty_Sep_Label 'Access,
S_Pretty_Sep_Loop_Then 'Access,
S_Pretty_N_Sep_Loop_Then 'Access,
S_Pretty_Subdirs 'Access,
-- HIGH A great number of messages are output, most of them not
-- being useful for the user.
+ S_Stub_No_Exc : aliased constant S := "/NO_EXCEPTION " &
+ "--no-exception";
+ -- /NONO_EXCEPTION (D)
+ -- /NO_EXCEPTION
+ --
+ -- Avoid raising PROGRAM_ERROR in the generated program unit stubs.
+
+ S_Stub_No_Head : aliased constant S := "/NO_LOCAL_HEADER " &
+ "--no-local-header";
+ -- /NONO_LOCAL_HEADER (D)
+ -- /NO_LOCAL_HEADER
+ --
+ -- Do not put local comment header before body stub for local program unit.
+
S_Stub_Output : aliased constant S := "/OUTPUT=@" &
"-o@";
-- /OUTPUT=filespec
-- OVERWRITE (D) Overwrite the existing tree file. If the current
-- directory already contains the file which, according
-- to the GNAT file naming rules should be considered
- -- as a tree file for the argument source file,
- -- gnatstub will refuse to create the tree file needed
- -- to create a sample body unless this option is chosen.
+ -- as a tree file for the argument source file, gnatstub
+ -- will refuse to create the tree file needed to create
+ -- a sample body unless this option is chosen.
--
-- SAVE Do not remove the tree file (i.e., the snapshot
-- of the compiler internal structures used by gnatstub)
S_Stub_Mess 'Access,
S_Stub_Output 'Access,
S_Stub_Project 'Access,
+ S_Stub_No_Exc 'Access,
+ S_Stub_No_Head 'Access,
S_Stub_Quiet 'Access,
S_Stub_Search 'Access,
S_Stub_Subdirs 'Access,
S_Stub_Verbose 'Access);
----------------------------
+ -- Switches for GNAT SYNC --
+ ----------------------------
+
+ S_Sync_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
+ "-aP*";
+ -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
+ --
+ -- Add directories to the project search path.
+
+ S_Sync_All : aliased constant S := "/ALL " &
+ "-a";
+ -- /NOALL (D)
+ -- /ALL
+ --
+ -- Also check the components of the GNAT run time and process the needed
+ -- components of the GNAT RTL when building and analyzing the global
+ -- structure for checking the global rules.
+
+ S_Sync_Allproj : aliased constant S := "/ALL_PROJECTS " &
+ "-U";
+ -- /NOALL_PROJECTS (D)
+ -- /ALL_PROJECTS
+ --
+ -- When GNAT SYNC is used with a Project File and no source is
+ -- specified, the underlying tool gnatsync is called for all the
+ -- sources of all the Project Files in the project tree.
+
+ S_Sync_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
+ "-X" & '"';
+ -- /EXTERNAL_REFERENCE="name=val"
+ --
+ -- Specifies an external reference to the project manager. Useful only if
+ -- /PROJECT_FILE is used.
+ --
+ -- Example:
+ -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
+
+ S_Sync_Files : aliased constant S := "/FILES=@" &
+ "-files=@";
+ -- /FILES=filename
+ --
+ -- Take as arguments the files that are listed in the specified
+ -- text file.
+
+ S_Sync_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
+ "-eL";
+ -- /NOFOLLOW_LINKS_FOR_FILES (D)
+ -- /FOLLOW_LINKS_FOR_FILES
+ --
+ -- Follow links when parsing project files
+
+ S_Sync_Main : aliased constant S := "/MAIN_SUBPROGRAM=@" &
+ "-main=@";
+ -- /MAIN_SUBPROGRAM=filename
+ --
+ -- Specify the name of the file containing the main subprogram
+
+ S_Sync_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
+ "DEFAULT " &
+ "-vP0 " &
+ "MEDIUM " &
+ "-vP1 " &
+ "HIGH " &
+ "-vP2";
+ -- /MESSAGES_PROJECT_FILE[=messages-option]
+ --
+ -- Specifies the "verbosity" of the parsing of project files.
+ -- messages-option may be one of the following:
+ --
+ -- DEFAULT (D) No messages are output if there is no error or warning.
+ --
+ -- MEDIUM A small number of messages are output.
+ --
+ -- HIGH A great number of messages are output, most of them not
+ -- being useful for the user.
+
+ S_Sync_Project : aliased constant S := "/PROJECT_FILE=<" &
+ "-P>";
+ -- /PROJECT_FILE=filename
+ --
+ -- Specifies the main project file to be used. The project files rooted
+ -- at the main project file will be parsed before the invocation of the
+ -- gnatcheck. The source directories to be searched will be communicated
+ -- to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
+
+ S_Sync_Quiet : aliased constant S := "/QUIET " &
+ "-q";
+ -- /NOQUIET (D)
+ -- /QUIET
+ --
+ -- Work quietly, only output warnings and errors.
+
+ S_Sync_Subdirs : aliased constant S := "/SUBDIRS=<" &
+ "--subdirs=>";
+ -- /SUBDIRS=dir
+ --
+ -- The actual directories (object, exec, library, ...) are subdirectories
+ -- of the directory specified in the project file. If the subdirectory
+ -- does not exist, it is created automatically.
+
+ S_Sync_Verb : aliased constant S := "/VERBOSE " &
+ "-v";
+ -- /NOVERBOSE (D)
+ -- /VERBOSE
+ --
+ -- The version number and copyright notice are output, as well as exact
+ -- copies of the gnat1 commands spawned to obtain the chop control
+ -- information.
+
+ S_Sync_Exec : aliased constant S := "/EXECUTION_TIME " &
+ "-t";
+ -- /NOEXECUTION_TIME (D)
+ -- /EXECUTION_TIME
+ --
+ -- Output the execution time
+
+ S_Sync_Details : aliased constant S := "/DETAILS=" &
+ "MEDIUM " &
+ "-om " &
+ "SHORT " &
+ "-os " &
+ "FULL " &
+ "-of";
+ -- /DETAILS[=options]
+ --
+ -- Specifies the details of the output.
+ -- Options may be one of the following:
+ --
+ -- MEDIUM (D)
+ -- SHORT
+ -- FULL
+
+ S_Sync_Warnoff : aliased constant S := "/WARNINGS_OFF " &
+ "-wq";
+ --
+ -- /WARNINGS_OFF
+ --
+ -- Turn warnings off
+
+ S_Sync_Output : aliased constant S := "/OUTPUT_FILE=<" &
+ "-out_file=>";
+ --
+ -- /OUTPUT_FILE=filename
+ --
+ -- Redirect output to a text file
+
+ Sync_Switches : aliased constant Switches :=
+ (S_Sync_Add 'Access,
+ S_Sync_All 'Access,
+ S_Sync_Allproj 'Access,
+ S_Sync_Ext 'Access,
+ S_Sync_Follow 'Access,
+ S_Sync_Files 'Access,
+ S_Sync_Main 'Access,
+ S_Sync_Mess 'Access,
+ S_Sync_Project 'Access,
+ S_Sync_Quiet 'Access,
+ S_Sync_Subdirs 'Access,
+ S_Sync_Verb 'Access,
+ S_Sync_Exec 'Access,
+ S_Sync_Details 'Access,
+ S_Sync_Warnoff 'Access,
+ S_Sync_Output 'Access);
+
+ ----------------------------
-- Switches for GNAT XREF --
----------------------------