|Re: simplified grammar for autocompletion [message #878720 is a reply to message #878704]
||Tue, 29 May 2012 19:47
| Sebastian Zarnekow
Registered: July 2009
the content assist grammar is not simplified at all. It's a lot more
complicated than the production grammar that Xtext uses just in order to
'convince' antlr to produce the right output / events that are intercepted.
I can only recommend to use a grammar that mirrors the precedencies of
your language. Otherwise you'll end up with a big mess when it comes to
the outline view, code folding, error recovery in the parser, content
assist, scoping ... well you get the idea.
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 29.05.12 21:17, schrieb Vlad Dumitrescu:
> I am fighting with my language and it's harder than I think it should
> be. I just realized that because the source will be fed to a full
> compiler anyway, the Xtext grammar doesn't have to get everything right,
> maybe. While writing this message, I have second thoughts :)
> I thought I could ignore operator precedence and similar things that
> make the grammar more complex while not giving any useful information
> for the IDE services. There is already a simplified grammar generated
> for the completion service.
> But then the serialization/formatting came to mind, and then even the
> quickfixes: I think these would need a full grammar anyway, in order to
> get all the details right...
> Does anyone have any comments on this idea?
> best regards,
Powered by FUDForum
. Page generated in 0.02033 seconds