-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
use.grammar
33 lines (18 loc) · 1.04 KB
/
use.grammar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright: All contributors to the Umple Project
// This file is made available subject to the open source license found at:
// [*https://umple.org/license*]
// beginning of use.grammar
// This is essentially rewriting the grammar rules present in the USE compiler, which exist in a similar format.
useProgram : model [id] ([[useGeneralClassDefinition]] | [[useInlineComment]] | [[useAssociation]])*
useGeneralClassDefinition- : [[useClassDefinition]]
useClassDefinition : (abstract)? class [id] [[useAttributes]]? end
useAttributes : attributes [[useAttributeDefinition]]*
useAttributeDefinition : [id] : [[useType]] (;)?
useType- : [[useSimpleType]]
useSimpleType : [id]
useInlineComment- : (-- [*inlineComment]) | (// [*inlineComment])
useAssociation : association [name] between [[useAssociationEnd]] [[useAssociationEnd]] end
useAssociationEnd : [name] [ [[useMultiplicity]] ]
useMultiplicity- : [[useMultiplicityRange]]
useMultiplicityRange : [[useMultiplicitySpec]] (.. [[useMultiplicitySpec]])?
useMultiplicitySpec : [integerSpec:\d+|[*]]