|
|
|
|
Re: Two different "Languages" in one editor [message #836363 is a reply to message #832675] |
Wed, 04 April 2012 11:53 |
Heinz Huber Messages: 45 Registered: February 2012 |
Member |
|
|
Hi Ralph,
i tryied my paint skills and got the following picture which maybe helpful for my explanation.
The problem i got is, that the direct representation of my Xtext language will be something that is very complex. So i want to make that thing a little more abstract. The picture above is the way i want to show it in my graphical editor.
The way the code is in my Xtext language is the following:
Server {
Element (Inner Element)
}
1/2 code of Destination
Route
1/2 code of Destination
As you can see, the representation in my visual editor is very different to my textual one. There are no connections between the elements like they are in the Xtext
The problem here is, that i found no way to change my Xtext grammar that there is a match for both editors.
So my question is -> Is there a way to have a grammar for the editor thing and one grammer for the xtext editor? And then there has to be a possibilty to parse (translate) between these languages.
Hope that this explanation is better then the ones before.
Thanks in advance for your answer!
EDIT:
I forgot the "3 boxes could stand for one Object" thing. A perfect example is that Element/InnerElement thing from the picture above. A textual example for that could be:
test {
elementval1 = hi
innertest {
innerval = test
innerval2 = 123123
}
}
So the Element from the picture is the outer element. And the InnerElement from the picture is code which will be inside that one. I chose that way of representation because there can be a Element without a InnerElement. And in my case these two boxes thing is the logical best way to show it.
[Updated on: Wed, 04 April 2012 12:04] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03348 seconds