Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/tooling/org.eclipse.fx.ide.gmodel/src/org/eclipse/fx/ide/gmodel/GModelDSL.xtext')
-rw-r--r--bundles/tooling/org.eclipse.fx.ide.gmodel/src/org/eclipse/fx/ide/gmodel/GModelDSL.xtext29
1 files changed, 29 insertions, 0 deletions
diff --git a/bundles/tooling/org.eclipse.fx.ide.gmodel/src/org/eclipse/fx/ide/gmodel/GModelDSL.xtext b/bundles/tooling/org.eclipse.fx.ide.gmodel/src/org/eclipse/fx/ide/gmodel/GModelDSL.xtext
new file mode 100644
index 000000000..0ade9bfa6
--- /dev/null
+++ b/bundles/tooling/org.eclipse.fx.ide.gmodel/src/org/eclipse/fx/ide/gmodel/GModelDSL.xtext
@@ -0,0 +1,29 @@
+grammar org.eclipse.fx.ide.gmodel.GModelDSL with org.eclipse.xtext.common.Terminals
+
+generate gModelDSL "http://www.eclipse.org/fx/ide/gmodel/GModelDSL"
+
+GModel:
+ 'package' name=QualifiedName '{'
+ typeList += GDomainElement+
+ '}'
+;
+
+GDomainElement:
+ 'type' name=ID ('extends' superTypeList+=[GDomainElement|ID] ( ', ' superTypeList+=[GDomainElement|ID])* )? '{'
+ propertyList += GDomainProperty*
+ '}'
+;
+
+GDomainProperty:
+ ((builtIn=('Int'|'Double'|'String'|'Boolean') list?='[]'? name=ID ('=' defaultValue = GDefault)? ) | ((ref=[GDomainElement|ID]) list?='[]'? name=ID)) ';'
+;
+
+GDefault:
+ stringVal=STRING | intVal = INT
+;
+
+ValidID:
+ ID;
+
+QualifiedName:
+ ValidID (=>'.' ValidID)*; \ No newline at end of file

Back to the top