Compare commits

..

No commits in common. "e8e2515465cc2d7c444498e68bdb9f1d86767f95" and "a1e54e4e0347db6a37099822181e5cdf0d180198" have entirely different histories.

11 changed files with 40036 additions and 42648 deletions

View File

@ -97,7 +97,6 @@ module.exports = grammar({
[$._name, $.package_body_stub],
[$._name, $._subtype_indication],
[$._name, $._subtype_indication, $.component_choice_list],
[$._name, $._subtype_mark],
[$.attribute_definition_clause, $._attribute_reference],
[$.component_choice_list, $.discrete_choice],
[$.component_choice_list, $.positional_array_aggregate],
@ -159,10 +158,6 @@ module.exports = grammar({
$.identifier,
$.string_literal,
),
_subtype_mark: $ => choice(
$.identifier,
$.selected_component,
$._attribute_reference),
selected_component: $ => prec.left(seq( // RM 4.1.3
field('prefix', $._name),
@ -570,22 +565,12 @@ module.exports = grammar({
allocator: $ => seq(
reservedWord('new'),
optional($.subpool_specification),
choice(
$._subtype_indication_paren_constraint,
$.qualified_expression)
$._subtype_indication_paren_constraint,
),
_subtype_indication_paren_constraint: $ => seq(
// Ada 2012+ doesn't allow null exclusion here -- RM 4.8(2)
// Before Ada 2012, null exclusion raises Constraint_Error (AI05-0104)
optional($.null_exclusion),
field('subtype_mark', $._subtype_mark),
optional(choice(
// Choose discriminant_constraint over index_constraint,
// when syntax ambiguity arises, to avoid potential
// highlighting of names in a discriminant_constraint as
// subtype names.
prec.dynamic(1, $.discriminant_constraint),
$.index_constraint)),
$._name,
optional($.index_constraint),
),
subpool_specification: $ => seq(
'(',
@ -676,10 +661,10 @@ module.exports = grammar({
$.if_expression,
$.case_expression,
),
_conditional_quantified_declare_expression: $ => choice(
$._conditional_expression,
_conditional_quantified_expression: $ => choice(
$.if_expression,
$.case_expression,
$.quantified_expression,
$.declare_expression,
),
quantified_expression: $ => seq( // ARM 4.5.8
reservedWord('for'),
@ -922,7 +907,6 @@ module.exports = grammar({
$.access_definition,
),
optional($._assign_value),
optional($.aspect_specification),
),
_type_definition: $ => choice(
$.enumeration_type_definition,
@ -1371,19 +1355,14 @@ module.exports = grammar({
$._discrete_subtype_definition,
')',
)),
field('parameter_profile', optional($.formal_part)),
optional($.formal_part),
optional($.aspect_specification),
';',
),
entry_body: $ => seq(
reservedWord('entry'),
$.identifier,
optional(seq(
'(',
$.entry_index_specification,
')',
)),
field('parameter_profile', optional($.formal_part)),
optional($.non_empty_entry_body_formal_part),
optional($.aspect_specification),
$.entry_barrier,
reservedWord('is'),
@ -1403,7 +1382,6 @@ module.exports = grammar({
$.identifier,
reservedWord('in'),
$._discrete_subtype_definition,
optional($.aspect_specification),
),
enumeration_aggregate: $ => $._array_aggregate, // ??? inline ARM 13.4
enumeration_representation_clause: $ => seq( // ARM 13.4
@ -1815,6 +1793,27 @@ module.exports = grammar({
)),
';',
),
non_empty_entry_body_formal_part: $ => seq(
optional(seq(
'(',
$.entry_index_specification,
')',
)),
field('parameter_profile', $.formal_part),
),
entry_declaration: $ => seq(
optional($.overriding_indicator),
reservedWord('entry'),
$.identifier,
optional(seq(
'(',
$._discrete_subtype_definition,
')',
)),
field('parameter_profile', optional($.formal_part)),
optional($.aspect_specification),
';',
),
_task_item: $ => choice(
$.entry_declaration,
$._aspect_clause,
@ -1863,7 +1862,7 @@ module.exports = grammar({
'(',
choice(
comma_separated_list_of($.pragma_argument_association),
$._conditional_quantified_declare_expression,
$._conditional_quantified_expression,
),
')',
)),
@ -2295,7 +2294,6 @@ module.exports = grammar({
optional(reservedWord('constant')),
$._return_subtype_indication,
optional($._assign_value),
optional($.aspect_specification),
),
_return_subtype_indication: $ => choice(
$._subtype_indication,

30
package-lock.json generated
View File

@ -8,7 +8,7 @@
"name": "tree-sitter-ada",
"version": "0.1.0",
"dependencies": {
"tree-sitter": "0.20.6",
"tree-sitter": "0.20.5",
"tree-sitter-cli": "0.20.8"
}
},
@ -190,9 +190,9 @@
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"node_modules/nan": {
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
},
"node_modules/napi-build-utils": {
"version": "1.0.2",
@ -398,12 +398,12 @@
}
},
"node_modules/tree-sitter": {
"version": "0.20.6",
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.6.tgz",
"integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==",
"version": "0.20.5",
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.5.tgz",
"integrity": "sha512-xjxkKCKV7F2F5HWmyRE4bosoxkbxe9lYvFRc/nzmtHNqFNTwYwh0oWVVEt0VnbupZHMirEQW7vDx8ddJn72tjg==",
"hasInstallScript": true,
"dependencies": {
"nan": "^2.18.0",
"nan": "^2.17.0",
"prebuild-install": "^7.1.1"
}
},
@ -553,9 +553,9 @@
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"nan": {
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
},
"napi-build-utils": {
"version": "1.0.2",
@ -692,11 +692,11 @@
}
},
"tree-sitter": {
"version": "0.20.6",
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.6.tgz",
"integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==",
"version": "0.20.5",
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.5.tgz",
"integrity": "sha512-xjxkKCKV7F2F5HWmyRE4bosoxkbxe9lYvFRc/nzmtHNqFNTwYwh0oWVVEt0VnbupZHMirEQW7vDx8ddJn72tjg==",
"requires": {
"nan": "^2.18.0",
"nan": "^2.17.0",
"prebuild-install": "^7.1.1"
}
},

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"tree-sitter": "0.20.6",
"tree-sitter": "0.20.5",
"tree-sitter-cli": "0.20.8"
},
"scripts": {

View File

@ -303,23 +303,6 @@
}
]
},
"_subtype_mark": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "selected_component"
},
{
"type": "SYMBOL",
"name": "_attribute_reference"
}
]
},
"selected_component": {
"type": "PREC_LEFT",
"value": 0,
@ -2789,17 +2772,8 @@
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_subtype_indication_paren_constraint"
},
{
"type": "SYMBOL",
"name": "qualified_expression"
}
]
"type": "SYMBOL",
"name": "_subtype_indication_paren_constraint"
}
]
},
@ -2819,32 +2793,15 @@
]
},
{
"type": "FIELD",
"name": "subtype_mark",
"content": {
"type": "SYMBOL",
"name": "_subtype_mark"
}
"type": "SYMBOL",
"name": "_name"
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "PREC_DYNAMIC",
"value": 1,
"content": {
"type": "SYMBOL",
"name": "discriminant_constraint"
}
},
{
"type": "SYMBOL",
"name": "index_constraint"
}
]
"type": "SYMBOL",
"name": "index_constraint"
},
{
"type": "BLANK"
@ -3374,20 +3331,20 @@
}
]
},
"_conditional_quantified_declare_expression": {
"_conditional_quantified_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_conditional_expression"
"name": "if_expression"
},
{
"type": "SYMBOL",
"name": "case_expression"
},
{
"type": "SYMBOL",
"name": "quantified_expression"
},
{
"type": "SYMBOL",
"name": "declare_expression"
}
]
},
@ -4982,18 +4939,6 @@
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "aspect_specification"
},
{
"type": "BLANK"
}
]
}
]
},
@ -8008,12 +7953,8 @@
"value": "entry"
},
{
"type": "FIELD",
"name": "entry_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
@ -8101,43 +8042,14 @@
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "entry_index_specification"
},
{
"type": "STRING",
"value": ")"
}
]
"type": "SYMBOL",
"name": "non_empty_entry_body_formal_part"
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "parameter_profile",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "formal_part"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "CHOICE",
"members": [
@ -8307,18 +8219,6 @@
{
"type": "SYMBOL",
"name": "_discrete_subtype_definition"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "aspect_specification"
},
{
"type": "BLANK"
}
]
}
]
},
@ -10991,6 +10891,44 @@
}
]
},
"non_empty_entry_body_formal_part": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "entry_index_specification"
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "parameter_profile",
"content": {
"type": "SYMBOL",
"name": "formal_part"
}
}
]
},
"_task_item": {
"type": "CHOICE",
"members": [
@ -11349,7 +11287,7 @@
},
{
"type": "SYMBOL",
"name": "_conditional_quantified_declare_expression"
"name": "_conditional_quantified_expression"
}
]
},
@ -14611,18 +14549,6 @@
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "aspect_specification"
},
{
"type": "BLANK"
}
]
}
]
},
@ -15409,10 +15335,6 @@
"_subtype_indication",
"component_choice_list"
],
[
"_name",
"_subtype_mark"
],
[
"attribute_definition_clause",
"_attribute_reference"

View File

@ -458,72 +458,29 @@
{
"type": "allocator",
"named": true,
"fields": {
"subtype_mark": {
"multiple": true,
"required": false,
"types": [
{
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
}
},
"fields": {},
"children": {
"multiple": true,
"required": false,
"required": true,
"types": [
{
"type": "discriminant_constraint",
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
@ -538,9 +495,37 @@
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "subpool_specification",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
}
@ -2705,10 +2690,6 @@
"type": "access_definition",
"named": true
},
{
"type": "aspect_specification",
"named": true
},
{
"type": "expression",
"named": true
@ -2902,18 +2883,7 @@
{
"type": "entry_body",
"named": true,
"fields": {
"parameter_profile": {
"multiple": false,
"required": false,
"types": [
{
"type": "formal_part",
"named": true
}
]
}
},
"fields": {},
"children": {
"multiple": true,
"required": true,
@ -2926,10 +2896,6 @@
"type": "entry_barrier",
"named": true
},
{
"type": "entry_index_specification",
"named": true
},
{
"type": "handled_sequence_of_statements",
"named": true
@ -2941,6 +2907,10 @@
{
"type": "non_empty_declarative_part",
"named": true
},
{
"type": "non_empty_entry_body_formal_part",
"named": true
}
]
}
@ -3056,16 +3026,6 @@
"type": "entry_declaration",
"named": true,
"fields": {
"entry_name": {
"multiple": false,
"required": true,
"types": [
{
"type": "identifier",
"named": true
}
]
},
"parameter_profile": {
"multiple": false,
"required": false,
@ -3137,7 +3097,7 @@
},
"children": {
"multiple": true,
"required": false,
"required": true,
"types": [
{
"type": "aspect_specification",
@ -3155,6 +3115,10 @@
"type": "discriminant_constraint",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "index_constraint",
"named": true
@ -3245,10 +3209,6 @@
"multiple": true,
"required": true,
"types": [
{
"type": "aspect_specification",
"named": true
},
{
"type": "delta_constraint",
"named": true
@ -3942,10 +3902,6 @@
"type": "access_definition",
"named": true
},
{
"type": "aspect_specification",
"named": true
},
{
"type": "delta_constraint",
"named": true
@ -7831,6 +7787,32 @@
]
}
},
{
"type": "non_empty_entry_body_formal_part",
"named": true,
"fields": {
"parameter_profile": {
"multiple": false,
"required": true,
"types": [
{
"type": "formal_part",
"named": true
}
]
}
},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "entry_index_specification",
"named": true
}
]
}
},
{
"type": "non_empty_mode",
"named": true,
@ -8883,10 +8865,6 @@
"type": "case_expression",
"named": true
},
{
"type": "declare_expression",
"named": true
},
{
"type": "identifier",
"named": true

81587
src/parser.c

File diff suppressed because it is too large Load Diff

View File

@ -1,474 +0,0 @@
================================================================================
subtype indication (subtype mark: identifier)
================================================================================
procedure P is
begin
A := new T;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)))))))))
================================================================================
subtype indication (subtype mark: selected component)
================================================================================
procedure P is
begin
A := new X.T;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (selected_component
prefix: (identifier)
selector_name: (identifier))))))))))
================================================================================
subtype indication (subtype mark: attribute reference)
================================================================================
procedure P is
begin
A := new T'Base;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)
subtype_mark: (tick)
subtype_mark: (attribute_designator
(identifier))))))))))
================================================================================
subtype indication (null exclusion)
================================================================================
procedure P is
begin
A := new not null T;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(null_exclusion)
subtype_mark: (identifier)))))))))
================================================================================
subtype indication (constraint: index constraint)
================================================================================
procedure P is
begin
A := new T (1 .. 10, 1 .. 20);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)
(index_constraint
(range_g
(term
(numeric_literal))
(term
(numeric_literal)))
(range_g
(term
(numeric_literal))
(term
(numeric_literal))))))))))))
================================================================================
subtype indication (constraint: discriminant constraint - numeric literal)
================================================================================
procedure P is
begin
A := new T (100);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)
(discriminant_constraint
(expression
(term
(numeric_literal))))))))))))
================================================================================
subtype indication (constraint: discriminant constraint - discriminant association)
================================================================================
procedure P is
begin
A := new T (F => 100);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)
(discriminant_constraint
(discriminant_association
(identifier)
(expression
(term
(numeric_literal)))))))))))))
================================================================================
subtype indication (constraint: discriminant constraint - identifier)
================================================================================
procedure P is
begin
A := new T (F);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
subtype_mark: (identifier)
(discriminant_constraint
(expression
(term
name: (identifier))))))))))))
================================================================================
qualified expression (aggregate: positional array aggregate)
================================================================================
procedure P is
begin
A := new T'(0, 255, 0);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
(tick)
(positional_array_aggregate
(expression
(term
(numeric_literal)))
(expression
(term
(numeric_literal)))
(expression
(term
(numeric_literal)))))))))))))
================================================================================
qualified expression (aggregate: record aggregate)
================================================================================
procedure P is
begin
A := new T'(F => 1);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
(tick)
(record_aggregate
(record_component_association_list
(component_choice_list
(identifier))
(expression
(term
(numeric_literal))))))))))))))
================================================================================
qualified expression (aggregate: named array aggregate)
================================================================================
procedure P is
begin
A := new T'(1 .. 10 => (1 .. 20 => 0.0));
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
(tick)
(named_array_aggregate
(array_component_association
(discrete_choice_list
(discrete_choice
(range_g
(term
(numeric_literal))
(term
(numeric_literal)))))
(expression
(term
(named_array_aggregate
(array_component_association
(discrete_choice_list
(discrete_choice
(range_g
(term
(numeric_literal))
(term
(numeric_literal)))))
(expression
(term
(numeric_literal))))))))))))))))))
================================================================================
qualified expression (expression: numeric literal)
================================================================================
procedure P is
begin
A := new T'(55);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
(tick)
(expression
(term
(numeric_literal))))))))))))
================================================================================
qualified expression (expression: identifier)
================================================================================
procedure P is
begin
A := new T'(F);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
(tick)
(expression
(term
name: (identifier))))))))))))
================================================================================
qualified expression (subtype mark: attribute reference)
================================================================================
procedure P is
begin
A := new T'Base'(5);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(qualified_expression
subtype_name: (identifier)
subtype_name: (tick)
subtype_name: (attribute_designator
(identifier))
(tick)
(expression
(term
(numeric_literal))))))))))))
================================================================================
subpool specification
================================================================================
procedure P is
begin
A := new (pkg.pool) T;
A := new (pkg.pool) T'(55);
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
name: (identifier))
(handled_sequence_of_statements
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(subpool_specification
subpool_handle_name: (selected_component
prefix: (identifier)
selector_name: (identifier)))
subtype_mark: (identifier)))))
(assignment_statement
variable_name: (identifier)
(expression
(term
(allocator
(subpool_specification
subpool_handle_name: (selected_component
prefix: (identifier)
selector_name: (identifier)))
(qualified_expression
subtype_name: (identifier)
(tick)
(expression
(term
(numeric_literal))))))))))))

View File

@ -129,38 +129,3 @@ end;
(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))))

View File

@ -8,7 +8,6 @@ package body P is
function Func return Boolean;
entry E;
entry E2 (Color)(A : Integer);
entry E3 (1 .. 1);
private
Field : Integer;
end Obj;
@ -24,10 +23,6 @@ package body P is
begin
null;
end E2;
entry E3 (for I in 1 .. 1 with Import) when True is
begin
null;
end E3;
end Obj;
end;
@ -59,13 +54,6 @@ end;
(parameter_specification
(identifier)
(identifier))))
(entry_declaration
(identifier)
(range_g
(term
(numeric_literal))
(term
(numeric_literal))))
(component_declaration
(identifier)
(component_definition
@ -104,33 +92,14 @@ end;
(identifier))
(entry_body
(identifier)
(entry_index_specification
(identifier)
(identifier))
(formal_part
(parameter_specification
(non_empty_entry_body_formal_part
(entry_index_specification
(identifier)
(identifier)))
(entry_barrier
(expression
(term
(identifier))
(formal_part
(parameter_specification
(identifier)
(identifier))))
(handled_sequence_of_statements
(null_statement))
(identifier))
(entry_body
(identifier)
(entry_index_specification
(identifier)
(range_g
(term
(numeric_literal))
(term
(numeric_literal)))
(aspect_specification
(aspect_mark_list
(aspect_association
(identifier)))))
(entry_barrier
(expression
(term

View File

@ -109,7 +109,7 @@ Discriminated
================================================================================
package P is
type R (A : Integer; B : Integer with Import) is record
type R (A : Integer; B : Integer) is record
F : Float;
end record;
end;
@ -129,11 +129,7 @@ end;
(identifier))
(discriminant_specification
(identifier)
(identifier)
(aspect_specification
(aspect_mark_list
(aspect_association
(identifier)))))))
(identifier))))
(record_type_definition
(record_definition
(component_list

View File

@ -157,11 +157,6 @@ begin
return A : My_Rec := (F => 1) do
null;
end return;
return Y : Integer
with Address => X'Address
do
null;
end return;
end F;
--------------------------------------------------------------------------------
@ -191,22 +186,6 @@ end F;
(expression
(term
(numeric_literal))))))))
(handled_sequence_of_statements
(null_statement)))
(extended_return_statement
(extended_return_object_declaration
(identifier)
(identifier)
(aspect_specification
(aspect_mark_list
(aspect_association
(identifier)
(expression
(term
(identifier)
(tick)
(attribute_designator
(identifier))))))))
(handled_sequence_of_statements
(null_statement))))
(identifier))))
@ -435,6 +414,52 @@ end;
(character_literal)))))
(null_statement)))))))
================================================================================
Allocators
================================================================================
procedure P is
begin
A := new T;
A := new (pkg.pool) T'((F => 1));
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(subprogram_body
(procedure_specification
(identifier))
(handled_sequence_of_statements
(assignment_statement
(identifier)
(expression
(term
(allocator
(identifier)))))
(assignment_statement
(identifier)
(expression
(term
(allocator
(subpool_specification
(selected_component
(identifier)
(identifier)))
(qualified_expression
(identifier)
(tick)
(expression
(term
(record_aggregate
(record_component_association_list
(component_choice_list
(identifier))
(expression
(term
(numeric_literal))))))))))))))))
================================================================================
Filtered for loops
================================================================================