how to limit options to scope entities [message #1237418] |
Wed, 29 January 2014 12:15  |
Eclipse User |
|
|
|
if i define structural entities, say for mapping
Feature:
name = ID (':' type = [Type])? ('=' value=Expr)?
;
Entity:
'entity' name = ID ('extends' superType = [Entity])? '{'
(features += Feature)*
'}'
;
Mapping:
'from' source=[Entity] '{'
(generated+=
target=[Entity] '{'
(mappings+=FeatureMap)*
'}')*
'}'
;
FeatureMap:
target=[Feature|ID] '=' value=[Feature|ID]
;
-------
the result would be
entity Student {
firstName:String
lastName:String
age:Int
}
entity Person {
name:String
}
from Student {
Person {
name = firstName // how to limit options to firstName and lastName
}
}
---------
the question is how to limit the mapping to firstName/lastName/age since the scope is Student?
thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03840 seconds