TTG hsSyn for Batch and Interactive Parsing
Alan & Kim Zimmerman
alan.zimm at gmail.com
Thu May 10 21:35:02 UTC 2018
I have updated the Wiki with the clearer names, and noted that a single
parser definition would still be used, as at present, but would only keep
the extra info if it was requested to.
The naming around interactive and batch is to anticipate a further step I
would like to take, to make the parser fully incremental, in the sense that
it would process as input the prior parse tree and a list of changes to the
source, and then generate a fresh parse tree, with the changed nodes
marked. This mode would be tightly coupled to an external too like
haskell-ide-engine, to manage the bookkeeping around this.
My thinking for this is to use the approach presented in the paper
"Efficient and Flexible Incremental Parsing" by Wagner and Graham[1].
The plan is to modify `happy`, so that we can reuse the existing GHC
Parser.y with minor modifications. This is the same approach as used in the
library tree-sitter[2], which is a very active project on github.
WIP is at [3], but it is very early stage.
Regards
Alan
[1] https://pdfs.semanticscholar.org/4d22/fab95c78b3c23fa9dff88fb82976ed
c213c2.pdf
[2] https://github.com/tree-sitter/tree-sitter
[3] https://github.com/alanz/happy/tree/incremental
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180510/b196dd6d/attachment.html>
More information about the ghc-devs
mailing list