[erlang-questions] Cocoa IDE for Erlang (again)

Vlad Dumitrescu vladdu55@REDACTED
Wed Aug 29 20:28:23 CEST 2007


On 8/29/07, Joel Reymont <joelr1@REDACTED> wrote:
> Suppose I wanted to provide IntelliSense and similar functionality
> for Erlang. I think this will require re-parsing the code buffer on
> every keystroke or whenever "." (dot) is typed.
> No, not all the buffer.

At every moment, you have the token stream corresponding to the test.
Entering a character is a local change, only the tokens around that position
need to be examined. Of course, entering a " (for example) is non-local, but
one can assume that the user will insert the contents of the string and
another ", so one doesn't need to rescan everything unless there is a longer
pause or some other event that signals the insertion is over.

In the same spirit, each node in the parse tree can hold references to the
beginning and ending tokens and keep reparsing at a minimum while there is
an edit going on.

This is what we are trying to do in Erlide, but I confess it's not yet as
stable and bug-free as I'd like it.

Returning to your question, I think that with such incremental scanner and
parser it could be fast enough to send each entered character to Erlang.

best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070829/0d5de05e/attachment.htm>

More information about the erlang-questions mailing list