[antlr-interest] ANTLR based content assist

Arjun Khandelwal Arjun.Khandelwal at mastek.com
Tue Jul 21 22:13:07 PDT 2009


Hi,
I am working on a small textual DSL which is kind of a small subset of Java in the sense it has only relational, conditional, arithmetic operations which are very much like those in Java.
I have just learnt the basics of ANTLR (skimmed thru the definitive guide. It's brilliant!!!) and wrote the basic grammar for the language. (Copied most of it from Java.g ;-))

I need to provide content assist for the editor which is one of the major reasons I decided to give ANTLR a try (we already had grammar defined in JavaCC and simple editor based on it) .I am looking up to the ANTLR generated parser for helping me with this.
Has anybody developed content assist (autocompletion) based on ANTLR? How easy or difficult would it be? Would I need to do too much tweaking with ANTLR to get this working?

I saw the FAQ entry "How to get the list of valid options for next" but couldn't make out much from it :-(. How do I get the string token or rule represented by the bitset that I get on accessing the follow stack?

How do I proceed with this?
Even a clue or pointers would certainly help.

Regards,
-Arjun.

MASTEK LTD.
Making a valuable difference
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090722/6fb0b085/attachment.html 


More information about the antlr-interest mailing list