Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Antlr grammar for content assist
Antlr grammar for content assist [message #1693448] Fri, 24 April 2015 10:14 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
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 10:15]

Report message to a moderator

Re: Antlr grammar for content assist [message #1693460 is a reply to message #1693448] Fri, 24 April 2015 11:18 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
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 12:59 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
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: Thu Apr 18 23:58:12 GMT 2024

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

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

Back to the top