You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the current implementation we cannot define a reflexive reference as being operatored at the same time. For example, as we would like to use for qualified name resolving for ECore elements:
-- A modelClassifier is either its ePackage followed by :: and a name, or just a name
template ecore::EClassifier referenceOnly --should never be created
: ( isDefined(ePackage) ? ePackage { mode = noop } "::" name : name)
;
-- EPackage gets operatored using the :: operator to resolve left recursion
template ecore::EPackage #noop abstract operatored(DBLCOLON);
-- if parsed path has more than one element,
template ecore::EPackage referenceOnly -- should never be created
: name
;
-- any following elements in a package path will be resolved using this
operatorTemplate ecore::EPackage(operators =
opDlColon, source = 'eSuperPackage') referenceOnly -- should never be created
: name
;
There are two problems with this:
Operatored and OperatorTemplates currently do not support being moded.
A primary template that would terminate the recursion is currently determined as concrete templates of the subtype of the operatored template. In the example above, however, it is the same class. Therefore, the grammar generation fails with "ERROR: No template for concrete subclass found to be able to terminate operator this template"
The text was updated successfully, but these errors were encountered:
I implemented a workaround allowing at least two packages as chained parents in the template definitions:
-- if parsed path has more than one element, (workaround for bug #98)
template ecore::EPackage referenceOnly -- should never be created
:
[[
nsURI {as = uriSymbol} "#"
|
(isDefined(eSuperPackage) ? eSuperPackage { mode = superPackage} ) name "::"
]]
;
--workaround for bug #98
template ecore::EPackage referenceOnly #superPackage -- should never be created
:
[[
nsURI {as = uriSymbol} "#"
|
name "::"
]]
;
As you can see I also added the possibility to refer to packages via their nsURI.
Using the current implementation we cannot define a reflexive reference as being operatored at the same time. For example, as we would like to use for qualified name resolving for ECore elements:
-- A modelClassifier is either its ePackage followed by :: and a name, or just a name
template ecore::EClassifier referenceOnly --should never be created
: ( isDefined(ePackage) ? ePackage { mode = noop } "::" name : name)
;
There are two problems with this:
The text was updated successfully, but these errors were encountered: