Re: [eclipse-users] Question re rpc

From: Farrell, Andrew <andrew.farrell_at_hp.com>
Date: Wed, 20 Jun 2007 10:55:48 +0100
Hi Joachim
Thanks for the info.

I did try the first of the options that you suggest, but probably got
the syntax wrong.
Anyway, I'll be sure to use one of these.

Thanks for your help
Andrew Farrell 

-----Original Message-----
From: eclipse-users-bounces+andrew.farrell=hp.com_at_crosscoreop.com
[mailto:eclipse-users-bounces+andrew.farrell=hp.com_at_crosscoreop.com] On
Behalf Of Joachim Schimpf (Independent Contractor)
Sent: 19 June 2007 23:23
To: eclipse-users_at_crosscoreop.com
Subject: Re: [eclipse-users] Question re rpc

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

_______________________________________________
ECLiPSe-Users mailing list
ECLiPSe-Users_at_crosscoreop.com
http://www.crosscoreop.com/mailman/options/eclipse-users
Received on Wed Jun 20 2007 - 10:56:12 CEST

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