Closed sprocter closed 8 years ago
Sam,
the grammar is ok. TriggerPort is a super class that includes InternalFeature.
Your problem is that you are referencing an error event, not an internal event, Below is the example with an internalevent declaration and reference. If the issue is how to detect an error event that is within a component: the error event results in a transition to an error state and the error state is referenced in teh detection declaration (see the example). `package ErrorDetectionExample public
system ErrorDetectionExample
features
extport: out event port;
end ErrorDetectionExample;
system implementation ErrorDetectionExample.imp
internal features
internalevent: event ;
annex EMV2 {**
use behavior ErrorLibrary::FailStop;
component error behavior
events
ExampleEvent : error event;
transitions
t1: Operational -[ExampleEvent]-> FailStop;
detections
test : Failstop -[ ]-> internalevent!;
test1 : all -[ ]-> ExampleEvent!;
test2 : Failstop -[ ]-> extport!;
end component;
**};
end ErrorDetectionExample.imp;
end ErrorDetectionExample; `
Ahh, got it. Thanks for the explanation!
Overview
The version of the EMV2 standard I have specifies that internal events can be used as error detection effects, but the xtext grammar seems to not allow this.
Details
The version of the EMV2 Standard I have says that:
But the XText grammar specification of an ErrorDetection is:
I was wondering which of these two sources was in error.
Minimal working example
Expected result
The code parses successfully without any errors
Actual result
The following error is generated: