Closed phoe closed 7 years ago
Thanks for the reference!
Can you give an example of what this does? Does this have to do with manipulation of parens and things around them?
One of the pieces of research that I know is an incremental parser for Common Lisp that is currently used for syntax highlighting inside the Second Climacs editor that automatically recognizes and highlights correctness/incorrectness of packages and symbols and the language role of any given symbol, so that, for an easy example, the let
inside (let ...)
is colored differently depending on whether it's the special operator LET
, a variable or an unevaluated symbol on a literal list.
Quoting the abstract: https://github.com/robert-strandh/Second-Climacs/blob/master/Papers/Incremental-parsing/abstract.text
In a text editor for writing Common Lisp source code, it is desirable to have an accurate analysis of the buffer contents, so that the role of the elements of the code can be indicated to the programmer. Furthermore, the buffer contents should preferably be analyzed after each keystroke so that the programmer has up-to-date information resulting from the analysis.
We describe an incremental parser that can be used as a key component of such an analyzer. The parser, itself written in Common Lisp, uses a special-purpose implementation of the Common Lisp READ function in combination with a cache that stores existing results of calling the reader.
Since the parser uses the standard Common Lisp reader, the resulting analysis is very accurate. Furthermore, the cache makes the parser very fast in most common cases; re-parsing a buffer in which a single character has been altered takes only a few milliseconds.
Thanks again. This doesn't have much to do with paren-based operations, so I'll keep this out of scope for now.
Modern research from @robert-strandh has some significant improvements for Lisp editing, such as automatic recognition and highlighting of syntax based on actual function of a symbol in syntax and not regular expressions.
See https://github.com/robert-strandh/Second-Climacs and contact the author for more details.