Compare commits
No commits in common. "e8e2515465cc2d7c444498e68bdb9f1d86767f95" and "a1e54e4e0347db6a37099822181e5cdf0d180198" have entirely different histories.
e8e2515465
...
a1e54e4e03
60
grammar.js
60
grammar.js
|
|
@ -97,7 +97,6 @@ module.exports = grammar({
|
||||||
[$._name, $.package_body_stub],
|
[$._name, $.package_body_stub],
|
||||||
[$._name, $._subtype_indication],
|
[$._name, $._subtype_indication],
|
||||||
[$._name, $._subtype_indication, $.component_choice_list],
|
[$._name, $._subtype_indication, $.component_choice_list],
|
||||||
[$._name, $._subtype_mark],
|
|
||||||
[$.attribute_definition_clause, $._attribute_reference],
|
[$.attribute_definition_clause, $._attribute_reference],
|
||||||
[$.component_choice_list, $.discrete_choice],
|
[$.component_choice_list, $.discrete_choice],
|
||||||
[$.component_choice_list, $.positional_array_aggregate],
|
[$.component_choice_list, $.positional_array_aggregate],
|
||||||
|
|
@ -159,10 +158,6 @@ module.exports = grammar({
|
||||||
$.identifier,
|
$.identifier,
|
||||||
$.string_literal,
|
$.string_literal,
|
||||||
),
|
),
|
||||||
_subtype_mark: $ => choice(
|
|
||||||
$.identifier,
|
|
||||||
$.selected_component,
|
|
||||||
$._attribute_reference),
|
|
||||||
|
|
||||||
selected_component: $ => prec.left(seq( // RM 4.1.3
|
selected_component: $ => prec.left(seq( // RM 4.1.3
|
||||||
field('prefix', $._name),
|
field('prefix', $._name),
|
||||||
|
|
@ -570,22 +565,12 @@ module.exports = grammar({
|
||||||
allocator: $ => seq(
|
allocator: $ => seq(
|
||||||
reservedWord('new'),
|
reservedWord('new'),
|
||||||
optional($.subpool_specification),
|
optional($.subpool_specification),
|
||||||
choice(
|
|
||||||
$._subtype_indication_paren_constraint,
|
$._subtype_indication_paren_constraint,
|
||||||
$.qualified_expression)
|
|
||||||
),
|
),
|
||||||
_subtype_indication_paren_constraint: $ => seq(
|
_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),
|
optional($.null_exclusion),
|
||||||
field('subtype_mark', $._subtype_mark),
|
$._name,
|
||||||
optional(choice(
|
optional($.index_constraint),
|
||||||
// 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)),
|
|
||||||
),
|
),
|
||||||
subpool_specification: $ => seq(
|
subpool_specification: $ => seq(
|
||||||
'(',
|
'(',
|
||||||
|
|
@ -676,10 +661,10 @@ module.exports = grammar({
|
||||||
$.if_expression,
|
$.if_expression,
|
||||||
$.case_expression,
|
$.case_expression,
|
||||||
),
|
),
|
||||||
_conditional_quantified_declare_expression: $ => choice(
|
_conditional_quantified_expression: $ => choice(
|
||||||
$._conditional_expression,
|
$.if_expression,
|
||||||
|
$.case_expression,
|
||||||
$.quantified_expression,
|
$.quantified_expression,
|
||||||
$.declare_expression,
|
|
||||||
),
|
),
|
||||||
quantified_expression: $ => seq( // ARM 4.5.8
|
quantified_expression: $ => seq( // ARM 4.5.8
|
||||||
reservedWord('for'),
|
reservedWord('for'),
|
||||||
|
|
@ -922,7 +907,6 @@ module.exports = grammar({
|
||||||
$.access_definition,
|
$.access_definition,
|
||||||
),
|
),
|
||||||
optional($._assign_value),
|
optional($._assign_value),
|
||||||
optional($.aspect_specification),
|
|
||||||
),
|
),
|
||||||
_type_definition: $ => choice(
|
_type_definition: $ => choice(
|
||||||
$.enumeration_type_definition,
|
$.enumeration_type_definition,
|
||||||
|
|
@ -1371,19 +1355,14 @@ module.exports = grammar({
|
||||||
$._discrete_subtype_definition,
|
$._discrete_subtype_definition,
|
||||||
')',
|
')',
|
||||||
)),
|
)),
|
||||||
field('parameter_profile', optional($.formal_part)),
|
optional($.formal_part),
|
||||||
optional($.aspect_specification),
|
optional($.aspect_specification),
|
||||||
';',
|
';',
|
||||||
),
|
),
|
||||||
entry_body: $ => seq(
|
entry_body: $ => seq(
|
||||||
reservedWord('entry'),
|
reservedWord('entry'),
|
||||||
$.identifier,
|
$.identifier,
|
||||||
optional(seq(
|
optional($.non_empty_entry_body_formal_part),
|
||||||
'(',
|
|
||||||
$.entry_index_specification,
|
|
||||||
')',
|
|
||||||
)),
|
|
||||||
field('parameter_profile', optional($.formal_part)),
|
|
||||||
optional($.aspect_specification),
|
optional($.aspect_specification),
|
||||||
$.entry_barrier,
|
$.entry_barrier,
|
||||||
reservedWord('is'),
|
reservedWord('is'),
|
||||||
|
|
@ -1403,7 +1382,6 @@ module.exports = grammar({
|
||||||
$.identifier,
|
$.identifier,
|
||||||
reservedWord('in'),
|
reservedWord('in'),
|
||||||
$._discrete_subtype_definition,
|
$._discrete_subtype_definition,
|
||||||
optional($.aspect_specification),
|
|
||||||
),
|
),
|
||||||
enumeration_aggregate: $ => $._array_aggregate, // ??? inline ARM 13.4
|
enumeration_aggregate: $ => $._array_aggregate, // ??? inline ARM 13.4
|
||||||
enumeration_representation_clause: $ => seq( // 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(
|
_task_item: $ => choice(
|
||||||
$.entry_declaration,
|
$.entry_declaration,
|
||||||
$._aspect_clause,
|
$._aspect_clause,
|
||||||
|
|
@ -1863,7 +1862,7 @@ module.exports = grammar({
|
||||||
'(',
|
'(',
|
||||||
choice(
|
choice(
|
||||||
comma_separated_list_of($.pragma_argument_association),
|
comma_separated_list_of($.pragma_argument_association),
|
||||||
$._conditional_quantified_declare_expression,
|
$._conditional_quantified_expression,
|
||||||
),
|
),
|
||||||
')',
|
')',
|
||||||
)),
|
)),
|
||||||
|
|
@ -2295,7 +2294,6 @@ module.exports = grammar({
|
||||||
optional(reservedWord('constant')),
|
optional(reservedWord('constant')),
|
||||||
$._return_subtype_indication,
|
$._return_subtype_indication,
|
||||||
optional($._assign_value),
|
optional($._assign_value),
|
||||||
optional($.aspect_specification),
|
|
||||||
),
|
),
|
||||||
_return_subtype_indication: $ => choice(
|
_return_subtype_indication: $ => choice(
|
||||||
$._subtype_indication,
|
$._subtype_indication,
|
||||||
|
|
|
||||||
30
package-lock.json
generated
30
package-lock.json
generated
|
|
@ -8,7 +8,7 @@
|
||||||
"name": "tree-sitter-ada",
|
"name": "tree-sitter-ada",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tree-sitter": "0.20.6",
|
"tree-sitter": "0.20.5",
|
||||||
"tree-sitter-cli": "0.20.8"
|
"tree-sitter-cli": "0.20.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -190,9 +190,9 @@
|
||||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
||||||
},
|
},
|
||||||
"node_modules/nan": {
|
"node_modules/nan": {
|
||||||
"version": "2.18.0",
|
"version": "2.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||||
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
|
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
|
||||||
},
|
},
|
||||||
"node_modules/napi-build-utils": {
|
"node_modules/napi-build-utils": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
|
@ -398,12 +398,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tree-sitter": {
|
"node_modules/tree-sitter": {
|
||||||
"version": "0.20.6",
|
"version": "0.20.5",
|
||||||
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.6.tgz",
|
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.5.tgz",
|
||||||
"integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==",
|
"integrity": "sha512-xjxkKCKV7F2F5HWmyRE4bosoxkbxe9lYvFRc/nzmtHNqFNTwYwh0oWVVEt0VnbupZHMirEQW7vDx8ddJn72tjg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nan": "^2.18.0",
|
"nan": "^2.17.0",
|
||||||
"prebuild-install": "^7.1.1"
|
"prebuild-install": "^7.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -553,9 +553,9 @@
|
||||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
||||||
},
|
},
|
||||||
"nan": {
|
"nan": {
|
||||||
"version": "2.18.0",
|
"version": "2.17.0",
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||||
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
|
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
|
||||||
},
|
},
|
||||||
"napi-build-utils": {
|
"napi-build-utils": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
|
@ -692,11 +692,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree-sitter": {
|
"tree-sitter": {
|
||||||
"version": "0.20.6",
|
"version": "0.20.5",
|
||||||
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.6.tgz",
|
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.5.tgz",
|
||||||
"integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==",
|
"integrity": "sha512-xjxkKCKV7F2F5HWmyRE4bosoxkbxe9lYvFRc/nzmtHNqFNTwYwh0oWVVEt0VnbupZHMirEQW7vDx8ddJn72tjg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"nan": "^2.18.0",
|
"nan": "^2.17.0",
|
||||||
"prebuild-install": "^7.1.1"
|
"prebuild-install": "^7.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tree-sitter": "0.20.6",
|
"tree-sitter": "0.20.5",
|
||||||
"tree-sitter-cli": "0.20.8"
|
"tree-sitter-cli": "0.20.8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
172
src/grammar.json
172
src/grammar.json
|
|
@ -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": {
|
"selected_component": {
|
||||||
"type": "PREC_LEFT",
|
"type": "PREC_LEFT",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
|
|
@ -2788,18 +2771,9 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_subtype_indication_paren_constraint"
|
"name": "_subtype_indication_paren_constraint"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "qualified_expression"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2819,32 +2793,15 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "FIELD",
|
|
||||||
"name": "subtype_mark",
|
|
||||||
"content": {
|
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_subtype_mark"
|
"name": "_name"
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "PREC_DYNAMIC",
|
|
||||||
"value": 1,
|
|
||||||
"content": {
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "discriminant_constraint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "index_constraint"
|
"name": "index_constraint"
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
|
|
@ -3374,20 +3331,20 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_conditional_quantified_declare_expression": {
|
"_conditional_quantified_expression": {
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_conditional_expression"
|
"name": "if_expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "case_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "quantified_expression"
|
"name": "quantified_expression"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "declare_expression"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -4982,18 +4939,6 @@
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "aspect_specification"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -8008,12 +7953,8 @@
|
||||||
"value": "entry"
|
"value": "entry"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "FIELD",
|
|
||||||
"name": "entry_name",
|
|
||||||
"content": {
|
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "identifier"
|
"name": "identifier"
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
|
|
@ -8100,44 +8041,15 @@
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "("
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "entry_index_specification"
|
"name": "non_empty_entry_body_formal_part"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": ")"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "FIELD",
|
|
||||||
"name": "parameter_profile",
|
|
||||||
"content": {
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "formal_part"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
|
|
@ -8307,18 +8219,6 @@
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_discrete_subtype_definition"
|
"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": {
|
"_task_item": {
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
|
|
@ -11349,7 +11287,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_conditional_quantified_declare_expression"
|
"name": "_conditional_quantified_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -14611,18 +14549,6 @@
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "aspect_specification"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -15409,10 +15335,6 @@
|
||||||
"_subtype_indication",
|
"_subtype_indication",
|
||||||
"component_choice_list"
|
"component_choice_list"
|
||||||
],
|
],
|
||||||
[
|
|
||||||
"_name",
|
|
||||||
"_subtype_mark"
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"attribute_definition_clause",
|
"attribute_definition_clause",
|
||||||
"_attribute_reference"
|
"_attribute_reference"
|
||||||
|
|
|
||||||
|
|
@ -458,10 +458,10 @@
|
||||||
{
|
{
|
||||||
"type": "allocator",
|
"type": "allocator",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {},
|
||||||
"subtype_mark": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "attribute_designator",
|
"type": "attribute_designator",
|
||||||
|
|
@ -483,6 +483,14 @@
|
||||||
"type": "identifier",
|
"type": "identifier",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "index_constraint",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null_exclusion",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "qualified_expression",
|
"type": "qualified_expression",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -503,6 +511,10 @@
|
||||||
"type": "string_literal",
|
"type": "string_literal",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "subpool_specification",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "target_name",
|
"type": "target_name",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -518,33 +530,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"children": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": false,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "discriminant_constraint",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "index_constraint",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null_exclusion",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "qualified_expression",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "subpool_specification",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "array_component_association",
|
"type": "array_component_association",
|
||||||
"named": true,
|
"named": true,
|
||||||
|
|
@ -2705,10 +2690,6 @@
|
||||||
"type": "access_definition",
|
"type": "access_definition",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "aspect_specification",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "expression",
|
"type": "expression",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -2902,18 +2883,7 @@
|
||||||
{
|
{
|
||||||
"type": "entry_body",
|
"type": "entry_body",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {},
|
||||||
"parameter_profile": {
|
|
||||||
"multiple": false,
|
|
||||||
"required": false,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "formal_part",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
@ -2926,10 +2896,6 @@
|
||||||
"type": "entry_barrier",
|
"type": "entry_barrier",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "entry_index_specification",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "handled_sequence_of_statements",
|
"type": "handled_sequence_of_statements",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -2941,6 +2907,10 @@
|
||||||
{
|
{
|
||||||
"type": "non_empty_declarative_part",
|
"type": "non_empty_declarative_part",
|
||||||
"named": true
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "non_empty_entry_body_formal_part",
|
||||||
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -3056,16 +3026,6 @@
|
||||||
"type": "entry_declaration",
|
"type": "entry_declaration",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {
|
"fields": {
|
||||||
"entry_name": {
|
|
||||||
"multiple": false,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "identifier",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parameter_profile": {
|
"parameter_profile": {
|
||||||
"multiple": false,
|
"multiple": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
|
|
@ -3137,7 +3097,7 @@
|
||||||
},
|
},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "aspect_specification",
|
"type": "aspect_specification",
|
||||||
|
|
@ -3155,6 +3115,10 @@
|
||||||
"type": "discriminant_constraint",
|
"type": "discriminant_constraint",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "identifier",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "index_constraint",
|
"type": "index_constraint",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -3245,10 +3209,6 @@
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
|
||||||
"type": "aspect_specification",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "delta_constraint",
|
"type": "delta_constraint",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
@ -3942,10 +3902,6 @@
|
||||||
"type": "access_definition",
|
"type": "access_definition",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "aspect_specification",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "delta_constraint",
|
"type": "delta_constraint",
|
||||||
"named": true
|
"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",
|
"type": "non_empty_mode",
|
||||||
"named": true,
|
"named": true,
|
||||||
|
|
@ -8883,10 +8865,6 @@
|
||||||
"type": "case_expression",
|
"type": "case_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "declare_expression",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "identifier",
|
"type": "identifier",
|
||||||
"named": true
|
"named": true
|
||||||
|
|
|
||||||
81587
src/parser.c
81587
src/parser.c
File diff suppressed because it is too large
Load Diff
|
|
@ -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))))))))))))
|
|
||||||
|
|
@ -129,38 +129,3 @@ end;
|
||||||
(expression
|
(expression
|
||||||
(term
|
(term
|
||||||
(identifier))))))))))
|
(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))))
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package body P is
|
||||||
function Func return Boolean;
|
function Func return Boolean;
|
||||||
entry E;
|
entry E;
|
||||||
entry E2 (Color)(A : Integer);
|
entry E2 (Color)(A : Integer);
|
||||||
entry E3 (1 .. 1);
|
|
||||||
private
|
private
|
||||||
Field : Integer;
|
Field : Integer;
|
||||||
end Obj;
|
end Obj;
|
||||||
|
|
@ -24,10 +23,6 @@ package body P is
|
||||||
begin
|
begin
|
||||||
null;
|
null;
|
||||||
end E2;
|
end E2;
|
||||||
entry E3 (for I in 1 .. 1 with Import) when True is
|
|
||||||
begin
|
|
||||||
null;
|
|
||||||
end E3;
|
|
||||||
end Obj;
|
end Obj;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -59,13 +54,6 @@ end;
|
||||||
(parameter_specification
|
(parameter_specification
|
||||||
(identifier)
|
(identifier)
|
||||||
(identifier))))
|
(identifier))))
|
||||||
(entry_declaration
|
|
||||||
(identifier)
|
|
||||||
(range_g
|
|
||||||
(term
|
|
||||||
(numeric_literal))
|
|
||||||
(term
|
|
||||||
(numeric_literal))))
|
|
||||||
(component_declaration
|
(component_declaration
|
||||||
(identifier)
|
(identifier)
|
||||||
(component_definition
|
(component_definition
|
||||||
|
|
@ -104,33 +92,14 @@ end;
|
||||||
(identifier))
|
(identifier))
|
||||||
(entry_body
|
(entry_body
|
||||||
(identifier)
|
(identifier)
|
||||||
|
(non_empty_entry_body_formal_part
|
||||||
(entry_index_specification
|
(entry_index_specification
|
||||||
(identifier)
|
(identifier)
|
||||||
(identifier))
|
(identifier))
|
||||||
(formal_part
|
(formal_part
|
||||||
(parameter_specification
|
(parameter_specification
|
||||||
(identifier)
|
(identifier)
|
||||||
(identifier)))
|
|
||||||
(entry_barrier
|
|
||||||
(expression
|
|
||||||
(term
|
|
||||||
(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
|
(entry_barrier
|
||||||
(expression
|
(expression
|
||||||
(term
|
(term
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ Discriminated
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
package P is
|
package P is
|
||||||
type R (A : Integer; B : Integer with Import) is record
|
type R (A : Integer; B : Integer) is record
|
||||||
F : Float;
|
F : Float;
|
||||||
end record;
|
end record;
|
||||||
end;
|
end;
|
||||||
|
|
@ -129,11 +129,7 @@ end;
|
||||||
(identifier))
|
(identifier))
|
||||||
(discriminant_specification
|
(discriminant_specification
|
||||||
(identifier)
|
(identifier)
|
||||||
(identifier)
|
(identifier))))
|
||||||
(aspect_specification
|
|
||||||
(aspect_mark_list
|
|
||||||
(aspect_association
|
|
||||||
(identifier)))))))
|
|
||||||
(record_type_definition
|
(record_type_definition
|
||||||
(record_definition
|
(record_definition
|
||||||
(component_list
|
(component_list
|
||||||
|
|
|
||||||
|
|
@ -157,11 +157,6 @@ begin
|
||||||
return A : My_Rec := (F => 1) do
|
return A : My_Rec := (F => 1) do
|
||||||
null;
|
null;
|
||||||
end return;
|
end return;
|
||||||
return Y : Integer
|
|
||||||
with Address => X'Address
|
|
||||||
do
|
|
||||||
null;
|
|
||||||
end return;
|
|
||||||
end F;
|
end F;
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
@ -191,22 +186,6 @@ end F;
|
||||||
(expression
|
(expression
|
||||||
(term
|
(term
|
||||||
(numeric_literal))))))))
|
(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
|
(handled_sequence_of_statements
|
||||||
(null_statement))))
|
(null_statement))))
|
||||||
(identifier))))
|
(identifier))))
|
||||||
|
|
@ -435,6 +414,52 @@ end;
|
||||||
(character_literal)))))
|
(character_literal)))))
|
||||||
(null_statement)))))))
|
(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
|
Filtered for loops
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user