-
Notifications
You must be signed in to change notification settings - Fork 0
/
ODAttribute.mc4
43 lines (34 loc) · 1.35 KB
/
ODAttribute.mc4
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
34
35
36
37
38
39
40
41
42
43
/* (c) https://github.com/MontiCore/monticore */
package de.monticore;
/* This is a MontiCore stable grammar.
* Adaptations -- if any -- are conservative. */
/**
ODAttribute is part of the OD grammars
describing UML object diagrams (in the UML/P variant).
ODAttribute defines additional forms of attributes,
including lists and maps.
*/
component grammar ODAttribute extends de.monticore.ODBasis {
/*========================================================================*/
/*============================ Attribute =================================*/
/*========================================================================*/
/** ASTODList represents a List of ODValues.
(Whether the order is relevant is not decided here.
Therefore, it is also possible to store sets this way.)
@attribute oDValue List of ODValue
*/
ODList implements ODValue =
"[" (ODValue || ",")* "]";
/** ASTODMap represents a Map of values
@attribute oDMapElement List of ODMapElements
*/
ODMap implements ODValue =
"[" (ODMapElement || ",")* "]";
/** ASTODMapElement represents a Map element of ODMap.
It can be either a concrete ODObject or a concrete ODValue.
@attribute key Key element of the key value pair
@attribute val Value element of the key value pair
*/
ODMapElement =
key:ODValue "->" val:ODValue;
}