1use super::behavior::{
2 ActionDef, ActionUsage, AllocationDef, AllocationUsage, FlowDef, FlowUsage, StateDef,
3 StateUsage,
4};
5use super::common::FilterMember;
6use super::common::{
7 CommentAnnotation, DocComment, Identification, Import, ParseErrorNode, TextualRepresentation,
8};
9use super::kerml_fallback::{
10 ClassifierDecl, ExtendedLibraryDecl, FeatureDecl, KermlFeatureDecl, KermlSemanticDecl,
11};
12use super::requirement::{
13 ActorDecl, AnalysisCaseDef, AnalysisCaseUsage, CaseDef, CaseUsage, ConcernUsage, Dependency,
14 RequirementDef, RequirementUsage, Satisfy, UseCaseDef, UseCaseUsage, VerificationCaseDef,
15 VerificationCaseUsage,
16};
17use super::structure::{
18 AliasDef, AttributeDef, ConnectionDef, EnumDef, IndividualDef, InterfaceDef, ItemDef,
19 MetadataDef, OccurrenceDef, OccurrenceUsage, PartDef, PartUsage, PortDef,
20};
21use super::view::{
22 CalcDef, ConstraintDef, RenderingDef, RenderingUsage, ViewDef, ViewUsage, ViewpointDef,
23 ViewpointUsage,
24};
25use crate::ast::core::Node;
26
27#[derive(Debug, Clone, PartialEq, Eq)]
29pub struct Package {
30 pub identification: Identification,
31 pub body: PackageBody,
32}
33#[derive(Debug, Clone, PartialEq, Eq)]
35pub enum PackageBody {
36 Semicolon,
38 Brace {
40 elements: Vec<Node<PackageBodyElement>>,
41 },
42}
43#[derive(Debug, Clone, PartialEq, Eq)]
45pub struct LibraryPackage {
46 pub is_standard: bool,
47 pub identification: Identification,
48 pub body: PackageBody,
49}
50#[derive(Debug, Clone, PartialEq, Eq)]
52pub enum PackageBodyElement {
53 Error(Node<ParseErrorNode>),
54 Doc(Node<DocComment>),
55 Comment(Node<CommentAnnotation>),
56 TextualRep(Node<TextualRepresentation>),
57 Filter(Node<FilterMember>),
58 Package(Node<Package>),
59 LibraryPackage(Node<LibraryPackage>),
60 Import(Node<Import>),
61 PartDef(Node<PartDef>),
62 PartUsage(Node<PartUsage>),
63 PortDef(Node<PortDef>),
64 InterfaceDef(Node<InterfaceDef>),
65 AliasDef(Node<AliasDef>),
66 AttributeDef(Node<AttributeDef>),
67 ActionDef(Node<ActionDef>),
68 ActionUsage(Node<ActionUsage>),
69 RequirementDef(Node<RequirementDef>),
70 RequirementUsage(Node<RequirementUsage>),
71 Satisfy(Node<Satisfy>),
72 UseCaseDef(Node<UseCaseDef>),
73 Actor(Node<ActorDecl>),
74 StateDef(Node<StateDef>),
75 StateUsage(Node<StateUsage>),
76 ItemDef(Node<ItemDef>),
77 IndividualDef(Node<IndividualDef>),
78 ConstraintDef(Node<ConstraintDef>),
79 CalcDef(Node<CalcDef>),
80 ViewDef(Node<ViewDef>),
81 ViewpointDef(Node<ViewpointDef>),
82 RenderingDef(Node<RenderingDef>),
83 ViewUsage(Node<ViewUsage>),
84 ViewpointUsage(Node<ViewpointUsage>),
85 RenderingUsage(Node<RenderingUsage>),
86 ConnectionDef(Node<ConnectionDef>),
87 MetadataDef(Node<MetadataDef>),
88 EnumDef(Node<EnumDef>),
89 OccurrenceDef(Node<OccurrenceDef>),
90 OccurrenceUsage(Node<OccurrenceUsage>),
91 Dependency(Node<Dependency>),
92 AllocationDef(Node<AllocationDef>),
93 AllocationUsage(Node<AllocationUsage>),
94 FlowDef(Node<FlowDef>),
95 FlowUsage(Node<FlowUsage>),
96 ConcernUsage(Node<ConcernUsage>),
97 CaseDef(Node<CaseDef>),
98 CaseUsage(Node<CaseUsage>),
99 AnalysisCaseDef(Node<AnalysisCaseDef>),
100 AnalysisCaseUsage(Node<AnalysisCaseUsage>),
101 VerificationCaseDef(Node<VerificationCaseDef>),
102 VerificationCaseUsage(Node<VerificationCaseUsage>),
103 UseCaseUsage(Node<UseCaseUsage>),
104 FeatureDecl(Node<FeatureDecl>),
105 ClassifierDecl(Node<ClassifierDecl>),
106 KermlSemanticDecl(Node<KermlSemanticDecl>),
107 KermlFeatureDecl(Node<KermlFeatureDecl>),
108 ExtendedLibraryDecl(Node<ExtendedLibraryDecl>),
109}