Dealing with Eclipse XText syntax errors [message #1746058] |
Thu, 20 October 2016 18:23  |
Eclipse User |
|
|
|
I have two questions concerning Xtext-produced syntax errors:
1) Where are these produced by default in the code and how can I override the default text/behavior, etc. In particular I want to change the text produced for a message AND perhaps even turn off the error or remove the error from Eclipse if semantically I determine that it actually is not an error.
2) Going along with #1, I would like to know where in the code (XText or Eclipse) I can programmatically manipulate the "Problems" tab at the bottom of the Eclipse IDE that is running with XText. I may determine that some "error" that Xtext finds according to the grammar is actually not an error, so I would like to catch that in the code somewhere and perhaps remove errors from the Problems list or add different errors to the list such as semantic errors that are found
Can someone please help me see how I can do these two things? I have not been successful at finding any of this in the forums.
Thanks!
|
|
|
|
|
|
|
Re: Dealing with Eclipse XText syntax errors [message #1746361 is a reply to message #1746326] |
Thu, 27 October 2016 09:27  |
Eclipse User |
|
|
|
Thank-you that worked. Yes, I certainly need to learn more about xtend. Working with Xtext has been an interesting but rigorous process. There is no single place to learn about google injection, Antlr, Xtext, xtend and how they work together. I have the Xtext book, but I have found it to not be a great learning resource if one knows nothing about all this. The Xtext web site was a good start, but I have found that searching the blogs and asking questions has been a better learning avenue.
Xtext is a powerful tool. I have learned that much. By augmenting it with my own custom lexer, I have been able to quickly adapt a very complex Bison grammar into Antlr/Xtext form and parse and process very long DSL programs (12MB in seconds). Learning the tool has been a challenge, but the rewards have been significant.
|
|
|
Powered by
FUDForum. Page generated in 0.08940 seconds