[antlr-interest] Fwd: autocompletion based on grmmar

Chris Dew chris at sidwells.com
Wed Apr 9 05:28:25 PDT 2008


One problem I've come across is that there can be multiple possible rules
which could be matched, dependent on how a sentence is completed.

An edge case is an empty sentence - the first character can be the first
character from any token which can be first in a rule, or any number of
subrules.  It looks like this could get exponential in its time requirements
- there can be no 'look ahead' when autocompleting :-(.

I think I may try some form of 'bitwise' token system.  e.g. In natural
language the word 'colour' is *either* a VERB token *or* a ADJECTIVE token.

I'll know more, when I've tinkered more.

Good luck in your project,

Chris.

On 08/04/2008, Kamil Burzynski <nopik at data.pl> wrote:
>
> "Chris Dew" <cmsdew at googlemail.com> napisał(a):
>
> > I'm looking at the possibility of creating an autocompleter.  I know I
> > can
> > build this from scratch, but I was wondering if antlr would make this
> > easier.
>
>
> What an coincidence... I started doing the same ;) The idea was on my mind
> for many months now, but finally I've started to do something real.. I
> decided to create (from scratch) library for this purpose. The road is
> quite long, and I have made only first few steps, so I do not expect
> anything usable this year, but who knows ;) Some time ago I made some
> small
> mockup project using lex/yacc, but they turned out to be too limited, and
> my small 'project' stalled for a while. Finally, I started to evaluate
> Antlr, and it seems, that it is powerful enough to get this task done..
> Yesterday I have finished reading Antlr book, so over next weeks I'll try
> to do some simple C parser and see how this is going..
>
>
> --
> Best regards from
>
> Kamil Burzynski
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080409/13640bd0/attachment-0001.html 


More information about the antlr-interest mailing list