Hi,<br><br><div><span class="gmail_quote">On 8/29/07, <b class="gmail_sendername">Joel Reymont</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Suppose I wanted to provide IntelliSense and similar functionality<br>for Erlang. I think this will require re-parsing the code buffer on<br>every keystroke or whenever "." (dot) is typed.<br><br></blockquote>
</div>No, not all the buffer.<br><br>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.
<br><br>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.<br><br>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.
<br><br>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. <br><br>best regards,<br>Vlad<br><br>