+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>
* scans.ads (Wide_Wide_Character_Found): New flag
@noindent
Syntax:
@smallexample @c ada
-pragma Annotate (IDENTIFIER @{, ARG@});
+pragma Annotate (IDENTIFIER [,IDENTIFIER] @{, ARG@});
ARG ::= NAME | EXPRESSION
@end smallexample
@noindent
This pragma is used to annotate programs. @var{identifier} identifies
the type of annotation. GNAT verifies that it is an identifier, but does
-not otherwise analyze it. The @var{arg} argument
-can be either a string literal or an
-expression. String literals are assumed to be of type
-@code{Standard.String}. Names of entities are simply analyzed as entity
-names. All other expressions are analyzed as expressions, and must be
+not otherwise analyze it. The second optional identifier is also left
+unanalyzed, and by convention is used to control the action of the tool to
+which the annotation is addressed. The remaining @var{arg} arguments
+can be either string literals or more generally expressions.
+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.
The analyzed pragma is retained in the tree, but not otherwise processed
@group
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
delimited by an @code{exempt_on} and @code{exempt_off} annotation pair:
@smallexample @c ada
-pragma Annotate (gnatcheck, "Exempt_On", Rule_Name, "justification");
+pragma Annotate (gnatcheck, Exempt_On, Rule_Name, "justification");
-- source code section
-pragma Annotate (gnatcheck, "Exempt_Off", Rule_Name);
+pragma Annotate (gnatcheck, Exempt_Off, Rule_Name);
@end smallexample