Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » "scope" problem
"scope" problem [message #1061895] Tue, 04 June 2013 10:48 Go to next message
Kevin SERIN is currently offline Kevin SERIN
Messages: 19
Registered: May 2013
Junior Member
Hi,

I've a scope problem in my xtext project. I have this grammar: https://wwwsecu.irit.fr/hg/SMAC/victor-noel-phd/may/may-xtext2-kevin/file/03809334e153/fr.irit.smac.may.juno.spead/src/fr/irit/smac/may/juno/spead/SpeADL.xtext . The important is I have components which have names and which can be parametrized, and I have part which are contained in component and which represent "instances" of other component.

I take an example to show the problem:
import test.interfaces.*

namespace named {
	component SequentialDispatcher[T] {
		requires handler: Push[T]
	}
	
	component ClassicAgentComponent[Msg, Ref] {

		part dispatcher: SequentialDispatcher[Msg] {
			bind handler to beh.cycle
		}
		part beh: ClassicBehaviour[Msg, Ref]
	}
	
	component ClassicBehaviour[Msg2, Ref2] {
		provides cycle: Push[Msg2]
	}
}


In this example, when you do a Ctrl+space in the 'part beh', xtext propose 'Msg' and 'Msg2' as parametrized types. But it should only propose 'Msg' beacause 'Msg2' is declared in an other component.

I don't know if I am clear about what is my problem.
Re: "scope" problem [message #1061917 is a reply to message #1061895] Tue, 04 June 2013 13:08 Go to previous messageGo to next message
Erick Fonseca is currently offline Erick Fonseca
Messages: 63
Registered: December 2011
Member
I can't see your grammar: the server asks for username and password.
Copy it here, or at least its relevant subset.
Re: "scope" problem [message #1061925 is a reply to message #1061917] Tue, 04 June 2013 14:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 5851
Registered: July 2009
Senior Member
Hi,

you may have a look at
http://www.eclipse.org/forums/index.php/m/1015438/?srch=getAttributes#msg_1015438
Re: "scope" problem [message #1062331 is a reply to message #1061917] Fri, 07 June 2013 05:00 Go to previous messageGo to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi,

Password is anon/anon Smile
Re: "scope" problem [message #1062332 is a reply to message #1061925] Fri, 07 June 2013 05:02 Go to previous messageGo to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
The thing is that we are using JvmTypeParameter, and that it seems that the scope does not follow the namespace hierarchy/container as it used to in the past...
Re: "scope" problem [message #1062629 is a reply to message #1062332] Mon, 10 June 2013 03:59 Go to previous messageGo to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
So, to ask the question differently: why does JvmTypeParameter are parts of the global scope and not the local one?

We would like to be able to get the Jvm type scoping, so using a simple handmade scoping is not the objective!
Re: "scope" problem [message #1073702 is a reply to message #1062629] Thu, 25 July 2013 06:38 Go to previous message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi, by the way, the bug was reported here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=413567
Previous Topic:Parser seems to confuse assignments / Grammar problem
Next Topic:Scope for C# like Attribute-Class
Goto Forum:
  


Current Time: Mon Apr 21 11:41:42 EDT 2014

Powered by FUDForum. Page generated in 0.13124 seconds