-
Notifications
You must be signed in to change notification settings - Fork 0
/
ECFDL.xtext
62 lines (49 loc) · 1.77 KB
/
ECFDL.xtext
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// automatically generated by Xtext
grammar org.xtext.ter_metamodel.ecfdl.ECFDL with org.eclipse.xtext.common.Terminals
generate ecfd "http://www.example.org/ter_metamodel"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
Ecfd returns Ecfd:
{Ecfd}
'Ecfd'
'{'
'elements' '{' (element+=Element ( "," element+=Element)*)? '}'
'mutex' '{' (mutex+=Mutex ( "," mutex+=Mutex)*)? '}'
'}';
Element returns Element:
Boite | GroupeBoite;
Mutex returns Mutex:
'Mutex' ':' name=ID
'{'
'boites' '(' boite+=[Boite|ID] ( "," boite+=[Boite|ID])+ ')' // modification de '*' pour un '+'
'}';
Boite returns Boite:
{Boite}
'Boite' ':' name=ID
'{'
(Racine?='Racine')?
('superBoite' '(' superBoite+=[Boite|ID] ( "," superBoite+=[Boite|ID])* ')' )?
('groupeboite' '(' groupeboite+=[GroupeBoite|ID] ( "," groupeboite+=[GroupeBoite|ID])* ')' )?
('estMereDe' '('((boite+=[Boite|ID]) | (groupeboite+=[GroupeBoite|ID]) ( "," (boite+=[Boite|ID]) | (groupeboite+=[GroupeBoite|ID]))*)? ')')?
('mutex' '(' mutex+=[Mutex|ID] ( "," mutex+=[Mutex|ID])* ')' )?
('features' '(' feature+=Feature ( "," feature+=Feature)* ')' )? //changement des { } pour des ( )
'}';
GroupeBoite returns GroupeBoite:
'GroupeBoite' ':' name=ID
'{'
(Exclusif?='Exclusif')?
//('superBoite' '(' superBoite+=[Boite|EString] ( "," superBoite+=[Boite|EString])* ')' )?
'superBoite' '(' superBoite+=[Boite|ID] ')'
'boites' '(' boite+=[Boite|ID] ( "," boite+=[Boite|ID])+ ')' // modification de '*' pour un '+'
'}';
Feature returns Feature:
{Feature}
//Suppression de tous les aspects syntaxiques de feature afin de simplifier la syntaxe des boites
//'Feature'
// '{'
(/*'Nom'*/ Nom=EString)?
//'}'
;
EString returns ecore::EString:
STRING | ID;
EBoolean returns ecore::EBoolean:
'true' | 'false';