|
|
|
Re: Mapping a grammar rule to possible resulting EClasses [message #659953 is a reply to message #659933] |
Wed, 16 March 2011 10:15 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
It will return the common supertype of all possible return types. Note
that an inheriting language could override some called parser rules and
return a different subtype. So you have to know all child languages in
order to get a correct result.
There is no shortcut/helper method I am aware of. You have to iterate
the contents of the rule and find all elements that could create the
returned semantic EObject, i.e. Actions and unassigned rule calls. The
union of their types and the return type of the rule should be what
you're looking for.
Am 16.03.11 09:51, schrieb Mark Christiaens:
> As I understand it, that gives me just one type. I was looking for a
> list of all the types that can result due to the embedded rule actions
> and the inheritance from other rules.
>
> ---
> Mark Christiaens
> Discover the Future of VHDL Design
> Go to http://www.sigasi.com
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.03237 seconds