Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » Problem with serializer 2 [model to text]
Problem with serializer 2 [model to text] [message #615781] Wed, 23 April 2008 07:09
Gustavo Cabral is currently offline Gustavo CabralFriend
Messages: 20
Registered: July 2009
Junior Member
Hi everyone,

I am also having problem with the serializer in two situations.

-----------------------------------------------------------
1) I am specifying the CSP hide operator syntax like this:

--
operatorTemplate Hide (operators = hideOp, source = behavior)
: channels
;

template HiddenChannels
: "{" channels {separator = ",", refersTo = name} "}"
;
--
and in the symbols and operator sections:
--
symbols {
...
hide = "\\\\": leftNone, rightNone;
...
}
operators BehaviorOp {
...
priority 4 {
hideOp = hide, 2;
}
...
}
--

The code is parsed without problem but when I serialize a model
I get "D = A21\\{ display }". That means, I get two slashes instead
of one! It should be "D = A21\{ display }"

-----------------------------------------------------------
2) The other problem is with the serialization of the CSP prefix
operator. The syntax, symbol, and operator priority are:

operatorTemplate Prefix (operators = prefixOp, source = next)
: action
;

rarrow = "->" : leftSpace, rightSpace;

priority 2, right {
prefixOp = rarrow, 1;
}

I am getting "M1 = M2 -> write" when I should get "M1 = write -> M2".
It is serializing it backwards!! It is switching the "next" and the
"action"
attributes positions.

I am using an ANT task (extractor) with the following information:

<property name="tcs-ecore" value="/CSP/Syntax/CSP.ecore" />
<am3.loadModel modelHandler="EMF" name="MM.tcs" metamodel="TCS"
path="${tcs-ecore}" />

<am3.saveModel model="M" path="${sample}-2.csp">
<extractor name="ebnf">
<param name="format" value="MM.tcs"/>
<param name="indentString" value=" "/>
<param name="serializeComments" value="true"/>
</extractor>
</am3.saveModel>

Could anyone tell me where is the implementation of this task? So I
can check its behavior? Is it a bug or am I doing something wrong? :p
I couldnt find much information about the operator template, specially
about the right or left association and the number of operators: 1 or 2,
for
instance.

best regards,
Gustavo
Tokyo University
Previous Topic:[TCS] Problem with serializer
Next Topic:[MOFScript] Eclipse M2T ?
Goto Forum:
  


Current Time: Tue Apr 23 10:08:45 GMT 2024

Powered by FUDForum. Page generated in 0.02863 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top