Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to visualize grammar generated from Xtext in AntlrWorks
How to visualize grammar generated from Xtext in AntlrWorks [message #948566] Thu, 18 October 2012 06:34 Go to next message
David Kovar is currently offline David KovarFriend
Messages: 2
Registered: October 2012
Junior Member
Hi,
we have a system with custom language (which hasn't any relationship with Java, it uses its own parser etc.) and I would like to use Eclipse as an editor for this language.

So I created model in Xtext for that language (it is called Majic, but please don't ask me who "invented" this name :-). There were neither errors nor warnings in model so I started Eclipse application with Majic language support and opened one valid file. But there were errors, so I can see my Xtext model is wrong.

My question is how to visualize or debug my Xtext model. Which is the best practice how to looking for errors in model? I tried to open it in AntlrWorks and start debugging, but I hanged, because it needs DebugAbstractInternalAntlrParser. Of course I tried to create it, but without success.

Please, is there any article or hints, how to debug model created in Xtext? I haven't found anything.

Thank you.

[Updated on: Fri, 19 October 2012 07:05]

Report message to a moderator

Re: How to visualize grammar generated from Xtext in AntlrWorks [message #948873 is a reply to message #948566] Thu, 18 October 2012 13:15 Go to previous messageGo to next message
Michael Ernst is currently offline Michael ErnstFriend
Messages: 49
Registered: July 2010
Member
I hope, this post helps: http://blog.dietmar-stoll.de/2011/08/xtext-grammar-visualization.html
Re: How to visualize grammar generated from Xtext in AntlrWorks [message #949663 is a reply to message #948873] Fri, 19 October 2012 07:08 Go to previous message
David Kovar is currently offline David KovarFriend
Messages: 2
Registered: October 2012
Junior Member
Thank you Michael. But I've already read it and this is not what I'm looking for.

If I follow the article and run Check Grammar in AntlrWorks everything is OK. So from syntactical point of view it is OK. But if I run my project in Eclipse and open valid Majic file, it will show me somewhere in the middle of the file that semicolon is missing. But semicolon is required by several rules and I don't have any clue where is a bug in my model file.

Maybe there is another way how to debug models, but I don't know it. I found that AntlrWorks can draw Parser Trees, so I thought it may help to solve my problem.

But I'm completely open to other best practices how to "debug" Xtext models.
Previous Topic:Generating enums with methods (and fields)
Next Topic:Customizing Serializer
Goto Forum:
  


Current Time: Tue Apr 16 06:52:24 GMT 2024

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

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

Back to the top