Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsResolveTemp in Lazy Rule relating to another Lazy Rule
https://www.eclipse.org/forums/index.php/mv/msg/440198/985718/#msg_985718
I have a lazy rule which contains a resolveTemp. The resolveTemp has a pattern which another lazy rule matches. However, I never achieve a match. I thought this was supported, did I misunderstand the User Guide? The guide states this is possible "the target pattern and do sections of a called rule, provided that this called rule is executed after the matching phase (e.g. is not called from a transformation entrypoint)."
If I change the latter rule from a lazy rule to a called rule then I see a match.
Any ideas?
Thanks,
Ronan]]>Ronan B2012-11-15T19:05:31-00:00Re: ResolveTemp in Lazy Rule relating to another Lazy Rule
https://www.eclipse.org/forums/index.php/mv/msg/440198/985730/#msg_985730
as far as I know, you can use resolveTemp only to match the output of non-lazy matched rules, not of lazy or called rules.
resolveTemp would not be suitable for non-unique lazy rules anyway, as these create new output each time they're called.
I can only guess that you are trying to get the output of varying rules in the same place; an idiom I use for that purpose is an overloaded helper (= several helpers of the same name in different contexts), each of them calling another lazy rule; overloading of rules is simulated this way.]]>Gunnar Arndt2012-11-15T20:45:23-00:00Re: ResolveTemp in Lazy Rule relating to another Lazy Rule
https://www.eclipse.org/forums/index.php/mv/msg/440198/985910/#msg_985910
Yep you guessed right on the use-case. Thanks for the tip on using helpers. I'm afraid the code is getting a little unmaintainable with lazy rules and this will make it more complex.
Thanks!
Ronan]]>Ronan B2012-11-16T16:03:59-00:00