Home » Archived » M2M (model-to-model transformation) » Problem with clause "using" in called rule
Problem with clause "using" in called rule [message #11967] |
Mon, 22 January 2007 06:58  |
Eclipse User |
|
|
|
Originally posted by: jairson.gmail.com
Hello All,
I´ve read in the manual that called rules allow us to use the clause
"using" to declare local variables. But I am having an error message
"unexpected token: using" with the excerpt below:
rule simpagation2simpagation (r : CHR!Simpagation,v :
Sequence(CHR!VariableSymbol))
{
using {
co : Sequence(CHR!ConstantSymbol) =
thisModule.allConstantSymbols(r.keep->union(r.remove));
}
to
ro : CHR!Simpagation (
(...)
Can anyone help?
regards,
Jairson Vitorino
|
|
| |
Re: Problem with clause "using" in called rule [message #11993 is a reply to message #11981] |
Mon, 22 January 2007 10:14   |
Eclipse User |
|
|
|
Originally posted by: jairson.gmail.com
Mikaël
Thanks for the answer. I am using ATL 2004! That´s what I found it strange.
here is the whole rule:
rule simpagation2simpagation (r : CHR!Simpagation,v :
Sequence(CHR!VariableSymbol))
{
using {
co : Sequence(CHR!ConstantSymbol) =
thisModule.allConstantSymbols(r.keep->union(r.remove));
}
to
ro : CHR!Simpagation (
name <- r.name,
keep <- r.keep,
remove <- r.remove,
guard <- r.guard->union(co->iterate(c; acc : CHR!Bic = Sequence{} |
acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
disjunctiveBody <- r.disjunctiveBody
)
}
I still have the same error.
Jairson
Mikaël Barbero wrote:
> Hi Jairson,
>
> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If it's
> 2006, try it with 2004 and report us if it is working. This would mean
> that ATL 2006 doesn't support "using" in called rules.
>
> Regards,
> Mikael
>
> Jairson a écrit :
>> Hello All,
>>
>> I´ve read in the manual that called rules allow us to use the clause
>> "using" to declare local variables. But I am having an error message
>> "unexpected token: using" with the excerpt below:
>>
>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>> Sequence(CHR!VariableSymbol))
>> {
>> using {
>> co : Sequence(CHR!ConstantSymbol) =
>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>> }
>> to
>> ro : CHR!Simpagation (
>> (...)
>>
>> Can anyone help?
>>
>> regards,
>>
>> Jairson Vitorino
>
>
>
|
|
|
Re: Problem with clause "using" in called rule [message #12019 is a reply to message #11993] |
Mon, 22 January 2007 10:13   |
Eclipse User |
|
|
|
Hello,
Your rule parses ok with the latest version of ATL.
Can you please try to update?
The problem may also be a syntax error earlier in the file. If there is
one, the parser may not have succeeded in resynchronizing. Correcting
any previous error should then make this one disappear.
Regards,
Frédéric Jouault
Jairson wrote:
> Mikaël
>
> Thanks for the answer. I am using ATL 2004! That´s what I found it strange.
>
> here is the whole rule:
>
> rule simpagation2simpagation (r : CHR!Simpagation,v :
> Sequence(CHR!VariableSymbol))
> {
> using {
> co : Sequence(CHR!ConstantSymbol) =
> thisModule.allConstantSymbols(r.keep->union(r.remove));
> }
> to
> ro : CHR!Simpagation (
> name <- r.name,
> keep <- r.keep,
> remove <- r.remove,
> guard <- r.guard->union(co->iterate(c; acc : CHR!Bic
> = Sequence{} |
> acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
>
> disjunctiveBody <- r.disjunctiveBody
> )
>
> }
>
> I still have the same error.
>
> Jairson
>
> Mikaël Barbero wrote:
>> Hi Jairson,
>>
>> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If
>> it's 2006, try it with 2004 and report us if it is working. This would
>> mean that ATL 2006 doesn't support "using" in called rules.
>>
>> Regards,
>> Mikael
>>
>> Jairson a écrit :
>>> Hello All,
>>>
>>> I´ve read in the manual that called rules allow us to use the clause
>>> "using" to declare local variables. But I am having an error message
>>> "unexpected token: using" with the excerpt below:
>>>
>>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>>> Sequence(CHR!VariableSymbol))
>>> {
>>> using {
>>> co : Sequence(CHR!ConstantSymbol) =
>>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>>> }
>>> to
>>> ro : CHR!Simpagation (
>>> (...)
>>>
>>> Can anyone help?
>>>
>>> regards,
>>>
>>> Jairson Vitorino
>>
>>
>>
|
|
|
Re: Problem with clause "using" in called rule [message #12032 is a reply to message #12019] |
Mon, 22 January 2007 13:16  |
Eclipse User |
|
|
|
Originally posted by: jairson.gmail.com
Thanks. I´ll update then.
Frédéric Jouault wrote:
> Hello,
>
> Your rule parses ok with the latest version of ATL.
> Can you please try to update?
>
> The problem may also be a syntax error earlier in the file. If there is
> one, the parser may not have succeeded in resynchronizing. Correcting
> any previous error should then make this one disappear.
>
>
> Regards,
>
> Frédéric Jouault
>
>
> Jairson wrote:
>> Mikaël
>>
>> Thanks for the answer. I am using ATL 2004! That´s what I found it
>> strange.
>>
>> here is the whole rule:
>>
>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>> Sequence(CHR!VariableSymbol))
>> {
>> using {
>> co : Sequence(CHR!ConstantSymbol) =
>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>> }
>> to
>> ro : CHR!Simpagation (
>> name <- r.name,
>> keep <- r.keep,
>> remove <- r.remove,
>> guard <- r.guard->union(co->iterate(c; acc :
>> CHR!Bic = Sequence{} |
>> acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
>>
>> disjunctiveBody <- r.disjunctiveBody
>> )
>> }
>>
>> I still have the same error.
>>
>> Jairson
>>
>> Mikaël Barbero wrote:
>>> Hi Jairson,
>>>
>>> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If
>>> it's 2006, try it with 2004 and report us if it is working. This
>>> would mean that ATL 2006 doesn't support "using" in called rules.
>>>
>>> Regards,
>>> Mikael
>>>
>>> Jairson a écrit :
>>>> Hello All,
>>>>
>>>> I´ve read in the manual that called rules allow us to use the clause
>>>> "using" to declare local variables. But I am having an error message
>>>> "unexpected token: using" with the excerpt below:
>>>>
>>>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>>>> Sequence(CHR!VariableSymbol))
>>>> {
>>>> using {
>>>> co : Sequence(CHR!ConstantSymbol) =
>>>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>>>> }
>>>> to
>>>> ro : CHR!Simpagation (
>>>> (...)
>>>>
>>>> Can anyone help?
>>>>
>>>> regards,
>>>>
>>>> Jairson Vitorino
>>>
>>>
>>>
|
|
|
Goto Forum:
Current Time: Thu May 01 16:42:29 EDT 2025
Powered by FUDForum. Page generated in 0.03875 seconds
|