diff options
Diffstat (limited to 'org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext')
-rw-r--r-- | org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext index 91ebd214c..d7e6d03d3 100644 --- a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext +++ b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/Xcore.xtext @@ -1,12 +1,9 @@ grammar org.eclipse.emf.ecore.xcore.Xcore with org.eclipse.xtext.xbase.Xbase -import "platform:/resource/org.eclipse.emf.ecore.xcore/model/Xcore.ecore" -import "platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore" as ecore -import "platform:/resource/org.eclipse.emf.codegen.ecore/model/GenModel.ecore" as genmodel -// import "http://www.eclipse.org/emf/2002/Ecore" as ecore -import "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.ecore" as xbase - +import "http://www.eclipse.org/emf/2002/GenModel" as genmodel +import "http://www.eclipse.org/xtext/xbase/Xbase" as xbase +import "http://www.eclipse.org/emf/2011/Xcore" XPackage returns XPackage: (annotations+=XAnnotation)* @@ -32,7 +29,7 @@ XImportDirective: 'import' importedNamespace=QualifiedNameWithWildcard ; -QualifiedNameWithWildcard returns ecore::EString: +QualifiedNameWithWildcard: QualifiedName '.*'? ; @@ -209,7 +206,7 @@ XBlockExpression returns xbase::XBlockExpression: XGenericType returns XGenericType: // classifier=[XClassifier|QualifiedName] (=>'<' typeArguments+=XGenericTypeArgument (',' typeArguments+=XGenericTypeArgument)* '>')? - type=[genmodel::GenBase|QualifiedName] (=>'<' typeArguments+=XGenericTypeArgument (',' typeArguments+=XGenericTypeArgument)* '>')? + type=[genmodel::GenBase|XQualifiedName] (=>'<' typeArguments+=XGenericTypeArgument (',' typeArguments+=XGenericTypeArgument)* '>')? ; XGenericTypeArgument returns XGenericType : @@ -221,3 +218,16 @@ XGenericWildcardTypeArgument returns XGenericType : {XGenericType} '?' ('extends' upperBound=XGenericType | 'super' lowerBound=XGenericType)? ; + +XQualifiedName: + XID ('.' XID)* +; + +XID: + ID | 'get' | 'set' | 'isUnSet' | 'isSet' +; + +ValidID: + XID | 'void' +; + |