Commit a97e4e3f by Ed Schonberg Committed by Arnaud Charlet

gnat_rm.texi, [...]: Document new syntax for pragma Annotate

2009-11-30  Ed Schonberg  <schonberg@adacore.com>

	* gnat_rm.texi, gnat_ugn.texi: Document new syntax for pragma Annotate

From-SVN: r154805
parent fd22cd21
2009-11-30 Ed Schonberg <schonberg@adacore.com>
* gnat_rm.texi, gnat_ugn.texi: Document new syntax for pragma Annotate
2009-11-30 Robert Dewar <dewar@adacore.com> 2009-11-30 Robert Dewar <dewar@adacore.com>
* scans.ads (Wide_Wide_Character_Found): New flag * scans.ads (Wide_Wide_Character_Found): New flag
......
...@@ -929,7 +929,7 @@ same syntax and effect. ...@@ -929,7 +929,7 @@ same syntax and effect.
@noindent @noindent
Syntax: Syntax:
@smallexample @c ada @smallexample @c ada
pragma Annotate (IDENTIFIER @{, ARG@}); pragma Annotate (IDENTIFIER [,IDENTIFIER] @{, ARG@});
ARG ::= NAME | EXPRESSION ARG ::= NAME | EXPRESSION
@end smallexample @end smallexample
...@@ -937,11 +937,14 @@ ARG ::= NAME | EXPRESSION ...@@ -937,11 +937,14 @@ ARG ::= NAME | EXPRESSION
@noindent @noindent
This pragma is used to annotate programs. @var{identifier} identifies This pragma is used to annotate programs. @var{identifier} identifies
the type of annotation. GNAT verifies that it is an identifier, but does the type of annotation. GNAT verifies that it is an identifier, but does
not otherwise analyze it. The @var{arg} argument not otherwise analyze it. The second optional identifier is also left
can be either a string literal or an unanalyzed, and by convention is used to control the action of the tool to
expression. String literals are assumed to be of type which the annotation is addressed. The remaining @var{arg} arguments
@code{Standard.String}. Names of entities are simply analyzed as entity can be either string literals or more generally expressions.
names. All other expressions are analyzed as expressions, and must be String literals are assumed to be either of type
@code{Standard.String} or else @code{Wide_String} or @code{Wide_Wide_String}
depending on the character literals they contain.
All other kinds of arguments are analyzed as expressions, and must be
unambiguous. unambiguous.
The analyzed pragma is retained in the tree, but not otherwise processed The analyzed pragma is retained in the tree, but not otherwise processed
......
...@@ -21028,7 +21028,7 @@ exemption control annotations is as follows: ...@@ -21028,7 +21028,7 @@ exemption control annotations is as follows:
@group @group
pragma Annotate (gnatcheck, @i{exemption_control}, @i{Rule_Name}, [@i{justification}]); pragma Annotate (gnatcheck, @i{exemption_control}, @i{Rule_Name}, [@i{justification}]);
@i{exemption_control} ::= "Exempt_On" | "Exempt_Off" @i{exemption_control} ::= Exempt_On | Exempt_Off
@i{Rule_Name} ::= string_literal @i{Rule_Name} ::= string_literal
...@@ -21052,9 +21052,9 @@ A source code section where an exemption is active for a given rule is ...@@ -21052,9 +21052,9 @@ A source code section where an exemption is active for a given rule is
delimited by an @code{exempt_on} and @code{exempt_off} annotation pair: delimited by an @code{exempt_on} and @code{exempt_off} annotation pair:
@smallexample @c ada @smallexample @c ada
pragma Annotate (gnatcheck, "Exempt_On", Rule_Name, "justification"); pragma Annotate (gnatcheck, Exempt_On, Rule_Name, "justification");
-- source code section -- source code section
pragma Annotate (gnatcheck, "Exempt_Off", Rule_Name); pragma Annotate (gnatcheck, Exempt_Off, Rule_Name);
@end smallexample @end smallexample
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment