Skip to content

Commit

Permalink
Added 'import'
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-hickman-epistimis committed Jan 13, 2024
1 parent b22bd06 commit f922d13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions com.epistimis.uddl/src/com/epistimis/uddl/GenerateUddl.mwe2
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Workflow {
projectWizard = {
generate = true
}
// https://idiomaticsoft.com/post/2022-05-16-xtext-importuri/
scopeProvider = scoping.ImportNamespacesScopingFragment2 {
generateXtendStub = false
}
}
}
}
15 changes: 8 additions & 7 deletions com.epistimis.uddl/src/com/epistimis/uddl/Uddl.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ generate uddl "http://www.epistimis.com/uddl/Uddl"

import "http://www.eclipse.org/emf/2002/Ecore" as ecore

//// Starter rule comes first
//ModelFile:
// includes+=Include*
// dataModel=DataModel
//;
// Starter rule comes first
ModelFile:
(includes+=Include)*
dataModel=DataModel
;

/** A DataModel is a container for ConceptualDataModels, LogicalDataModels, and PlatformDataModels */
DataModel:
Expand Down Expand Up @@ -37,10 +37,11 @@ QN:
ID ('.' ID)*;

/**
* Use 'include' because 'import' is an XBase keyword
* Use 'include' because 'import' is an XBase keyword ?
* Probably not - examples use 'import' and doc knows of XBase
*/
Include:
'include' importedNamespace=QualifiedNameWithWildcard;
'import' importedNamespace=QualifiedNameWithWildcard ';' ;

/**
* Already defined in XBase
Expand Down

0 comments on commit f922d13

Please sign in to comment.