(_conditional_quantified_expression): accept declare expression; rename Fixes parsing error that occurred in GNATprove source code. add test.
167 lines
4.3 KiB
Plaintext
167 lines
4.3 KiB
Plaintext
================================================================================
|
|
pragma on record field
|
|
================================================================================
|
|
|
|
package P is
|
|
type R is record
|
|
Started : Boolean := False;
|
|
pragma Atomic (Started);
|
|
end record;
|
|
pragma Foo;
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_declaration
|
|
(identifier)
|
|
(full_type_declaration
|
|
(identifier)
|
|
(record_type_definition
|
|
(record_definition
|
|
(component_list
|
|
(component_declaration
|
|
(identifier)
|
|
(component_definition
|
|
(identifier))
|
|
(expression
|
|
(term
|
|
(identifier))))
|
|
(pragma_g
|
|
(identifier)
|
|
(pragma_argument_association
|
|
(expression
|
|
(term
|
|
(identifier)))))))))
|
|
(pragma_g
|
|
(identifier)))))
|
|
|
|
================================================================================
|
|
pragma in statement
|
|
================================================================================
|
|
|
|
procedure P is
|
|
begin
|
|
null;
|
|
pragma Foo;
|
|
null;
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(subprogram_body
|
|
(procedure_specification
|
|
(identifier))
|
|
(handled_sequence_of_statements
|
|
(null_statement)
|
|
(pragma_g
|
|
(identifier))
|
|
(null_statement)))))
|
|
|
|
================================================================================
|
|
pragma in tasks
|
|
================================================================================
|
|
|
|
package P is
|
|
task type T is
|
|
pragma Storage_Size (1024);
|
|
end T;
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_declaration
|
|
(identifier)
|
|
(full_type_declaration
|
|
(task_type_declaration
|
|
(identifier)
|
|
(task_definition
|
|
(pragma_g
|
|
(identifier)
|
|
(pragma_argument_association
|
|
(expression
|
|
(term
|
|
(numeric_literal)))))
|
|
(identifier)))))))
|
|
|
|
================================================================================
|
|
pragma in declare expression
|
|
================================================================================
|
|
|
|
package P is
|
|
X : Integer :=
|
|
(declare
|
|
Y : constant Integer := 123;
|
|
pragma Assert (True);
|
|
begin
|
|
Y);
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_declaration
|
|
(identifier)
|
|
(object_declaration
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(term
|
|
(declare_expression
|
|
(object_declaration
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(term
|
|
(numeric_literal))))
|
|
(pragma_g
|
|
(identifier)
|
|
(pragma_argument_association
|
|
(expression
|
|
(term
|
|
(identifier)))))
|
|
(expression
|
|
(term
|
|
(identifier))))))))))
|
|
|
|
================================================================================
|
|
declare expression in pragma
|
|
================================================================================
|
|
|
|
package P is
|
|
pragma Assert
|
|
(declare
|
|
E : constant Integer := 123;
|
|
begin
|
|
E = 123);
|
|
end P;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_declaration
|
|
(identifier)
|
|
(pragma_g
|
|
(identifier)
|
|
(declare_expression
|
|
(object_declaration
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(term
|
|
(numeric_literal))))
|
|
(expression
|
|
(term
|
|
(identifier))
|
|
(relational_operator)
|
|
(term
|
|
(numeric_literal)))))
|
|
(identifier))))
|