Re: [eclipse-users] Question re rpc

From: Joachim Schimpf (Independent Contractor) <jschimpf_at_cisco.com>
Date: Wed, 20 Jun 2007 00:22:47 +0200
Farrell, Andrew wrote:
 >...
>> I am using EclipseEngine.rpc -- very simple, I wish to declare a range
> 
>> for a variable, but when using the method call it decides that it is 
>> incorrect syntax.
>>
>> Using DosEclipse, everything is fine:
>>
>> [eclipse 24]: X &:: [a,b].
>>
>> X = X{[a, b]}
>> Yes (0.00s cpu)
>>
>> But when using rpc -- eclipse.rpc("X &:: [a,b]"); -- I get the use of 
>> the &:: being syntactically incorrect:
>>
>> string stream 7: syntax error: postfix/infix operator expected
>> | X &:: [a,b]
>> |     ^ here
>> string contains unexpected characters in term_string(_950, "X &::
>> [a,b]")

Hi Andrew,

the problem is that when you pass a *string* to rpc, this is currently
not parsed in the same module context in which the goal gets called.
This could be considered a bug, so we'll fix it.

For the time being, use either a string in canonical syntax, i.e.

	eclipse.rpc("&::(A, [a,b])");

or use the Java-Eclipse type mapping, i.e. pass a CompoundTerm:

	Collection abList = new LinkedList();
	abList.add(new Atom("a"));
	abList.add(new Atom("b"));
	eclipse.rpc(new CompoundTermImpl("&::", null, abList);


Best regards,
Joachim
Received on Tue Jun 19 2007 - 23:23:02 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET