[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] Re: [TCS] Problem with serializer 2 [model to text]

Hi,

-----------------------------------------------------------
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;
}
..
}
--

Can you try using: hide = "\\" ?

This should work for the extraction.


> 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 }"

According to this, I suppose this causes a problem with injection?
If yes, then there is a bug: the grammar generator should escape it, and you should not have to do it.
Could you please post a bug about this?
Thanks.



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.

If I understand correctly, "write" is the action, right?
If yes, then there is also a bug for this. Can you please open a bug for this?
Thanks.



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.

Extraction is implemented in org.eclipse.gmt.tcs.extractor, which is in /cvsroot/technology/org.eclipse.gmt/org.eclipse.gmt.tcs/plugins.


Do not hesitate to contribute a patch on bugzilla as well.
Thanks.



Regards,

Frédéric Jouault