Asynchronous select
This commit is contained in:
parent
b0f3476851
commit
434dc1a695
|
|
@ -199,3 +199,83 @@ end;
|
|||
(entry_declaration
|
||||
(identifier)))
|
||||
(identifier)))))))))))
|
||||
|
||||
================================================================================
|
||||
asynchronous select
|
||||
================================================================================
|
||||
|
||||
package body P is
|
||||
task body T is
|
||||
begin
|
||||
select
|
||||
Proc (1);
|
||||
null;
|
||||
then abort
|
||||
Proc2;
|
||||
end select;
|
||||
end;
|
||||
end;
|
||||
null;
|
||||
end;
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(compilation
|
||||
(compilation_unit
|
||||
(proper_body
|
||||
(package_body
|
||||
(name
|
||||
(identifier))
|
||||
(non_empty_declarative_part
|
||||
(declarative_item_pragma
|
||||
(proper_body
|
||||
(task_body
|
||||
(identifier)
|
||||
(handled_sequence_of_statements
|
||||
(sequence_of_statements
|
||||
(statement
|
||||
(compound_statement
|
||||
(select_statement
|
||||
(asynchronous_select
|
||||
(triggering_alternative
|
||||
(procedure_call_statement
|
||||
(name
|
||||
(function_call
|
||||
(name
|
||||
(identifier))
|
||||
(actual_parameter_part
|
||||
(parameter_association
|
||||
(expression
|
||||
(relation
|
||||
(simple_expression
|
||||
(term
|
||||
(factor
|
||||
(primary
|
||||
(numeric_literal))))))))))))
|
||||
(sequence_of_statements
|
||||
(statement
|
||||
(simple_statement
|
||||
(null_statement)))))
|
||||
(sequence_of_statements
|
||||
(statement
|
||||
(simple_statement
|
||||
(procedure_call_statement
|
||||
(name
|
||||
(identifier)))))))))))))))))))
|
||||
(compilation_unit
|
||||
(statement
|
||||
(simple_statement
|
||||
(null_statement))))
|
||||
(compilation_unit
|
||||
(statement
|
||||
(simple_statement
|
||||
(procedure_call_statement
|
||||
(name
|
||||
(identifier))))))
|
||||
(compilation_unit
|
||||
(statement
|
||||
(simple_statement
|
||||
(procedure_call_statement
|
||||
(name
|
||||
(identifier)))))))
|
||||
|
|
|
|||
22
grammar.js
22
grammar.js
|
|
@ -1929,12 +1929,32 @@ module.exports = grammar({
|
|||
$.selective_accept,
|
||||
$.timed_entry_call,
|
||||
$.conditional_entry_call,
|
||||
// $.asynchronous_select,
|
||||
$.asynchronous_select,
|
||||
),
|
||||
entry_call_alternative: $ => seq(
|
||||
$.procedure_call_statement,
|
||||
optional($.sequence_of_statements),
|
||||
),
|
||||
asynchronous_select: $ => seq(
|
||||
reservedWord('select'),
|
||||
$.triggering_alternative,
|
||||
reservedWord('then'),
|
||||
reservedWord('abort'),
|
||||
field('abortable_part', $.sequence_of_statements),
|
||||
reservedWord('end'),
|
||||
reservedWord('select'),
|
||||
';',
|
||||
),
|
||||
triggering_alternative: $ => choice(
|
||||
seq(
|
||||
$.procedure_call_statement,
|
||||
optional($.sequence_of_statements),
|
||||
),
|
||||
seq(
|
||||
$.delay_statement,
|
||||
optional($.sequence_of_statements),
|
||||
),
|
||||
),
|
||||
conditional_entry_call: $ => seq(
|
||||
reservedWord('select'),
|
||||
$.entry_call_alternative,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user