[antlr-interest] Auto- completion feature based on ANTLR

Terence Parr parrt at cs.usfca.edu
Mon Aug 18 11:18:59 PDT 2003


Hi.  Auto-completion is not really convenient in the current generated 
output.  It's kind of like compiling C code w/o the symbol table 
information (-g option).  The current ANTLR 3 analysis engine I'm 
working on makes this sort of thing trivial, but of course doesn't 
exist as a tool yet. :(

You might be able to do something interesting with the bitsets used for 
prediction.  These say what tokens predict which alternative.  The 
union of these at any decision point tells you what can come next.  The 
problem is when there is no decision:

a : A B ;

from A to B you make no decision and you would not have sets laying 
around to say "B" can come next.  ON the other hand, you might be able 
to tweak the code generator to dump a bit more info for these single 
token matches.

Still it won't be convenient.  :(

Ter

On Monday, August 18, 2003, at 08:03 AM, Ruslan Zasukhin wrote:

> Hi guys,
>
> I remember that 1.5-2 years ago on this list was small discussion about
>     HOW TO use ANTLR and parser built with ANTLR
>
> To provide auto-completion feature (like in Visual C++).
>
> Anybody can give some pointers:
>
> 1) on this thread (I cannot find it)
>
> 2) may be some new description of this task?
>
> 3) may be some examples?
>
> 4) may be exists some common libs / frameworks that can do this job?
>
>
> P.S. We want this feature for SQL editor in "Valentina Studio" desktop
> database app. User Type something, and editor help him...
>
>
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list