|
Re: simplified grammar for autocompletion [message #878720 is a reply to message #878704] |
Tue, 29 May 2012 15:47   |
Eclipse User |
|
|
|
Hi Vlad,
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.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 29.05.12 21:17, schrieb Vlad Dumitrescu:
> Hi!
>
> 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,
> Vlad
>
|
|
|
|
|
Re: simplified grammar for autocompletion [message #878914 is a reply to message #878767] |
Wed, 30 May 2012 03:34  |
Eclipse User |
|
|
|
Hi Henrik,
Where would I do that picking? Since I have my own LinkingService, I can select the right object there and return it. I didn't look further, to which services use this result and what they do with it.
It could also be a form of poor-man's Option monad, so that results from multiple linking services may be put together without caring for null (which would otherwise be returned when no match is found).
regards,
Vlad
|
|
|
Powered by
FUDForum. Page generated in 0.41927 seconds