[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmt] Problem with serializer 2 [model to text]
|
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