Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Antlr grammar for content assist
Antlr grammar for content assist [message #1693448] Fri, 24 April 2015 06:14 Go to next message
Eclipse UserFriend
Hi!

I tried to see if I can understand how the "simpler" grammar used for content assist differs from the regular one, but it's not straightforward. For one thing, this "simpler" grammar is almost 4 times as large for my language... Shocked

Anyway, I hope that someone can explain in a couple of lines the ideas behind the content assist grammar (what elements are important and how the rest is ignored, for example).

Thanks in advance!
regards,
Vlad

[Updated on: Fri, 24 April 2015 06:15] by Moderator

Re: Antlr grammar for content assist [message #1693460 is a reply to message #1693448] Fri, 24 April 2015 07:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Vlad,

the CA grammar is not supposed to be simpler but just different. It is a
refactored variant of the original grammar that allows to grab internal
information from Antlr to compute the followset for any given cursor
position in the document. Therefore all subrules in Antlr have to become
explicit rules due to Antlr error recovery semantics. That's why it's
much bigger in terms of lines of code.

Is that enough information or do you want to know something else?

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Antlr grammar for content assist [message #1693479 is a reply to message #1693460] Fri, 24 April 2015 08:59 Go to previous message
Eclipse UserFriend
Thank you very much Sebastian, this is exactly what I needed. I was hoping that there would be something that could be used in other contexts, but maybe I can learn something anyway. Now I know at least how to look at it Smile

best regards,
Vlad
Previous Topic:how to format xtext resource on save
Next Topic:Build management
Goto Forum:
  


Current Time: Sun Oct 26 04:27:47 EDT 2025

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

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

Back to the top