2 ms·
Fascinating project! I kind of hope to need to work on C++ sometime so I can try it out. Particularly the Clang AST library would be a enormous boon for any LLV
by elcritch 11y ago
Fascinating project! I kind of hope to need to work on C++ sometime so I can try it out. Particularly the Clang AST library would be a enormous boon for any LLVM / C++ / C work. IMHO, 9/10's of any compiler work is just figuring out how to write recursive functions to modify the AST which is a pain using C++ and visitor patterns. Working in LISP for these parts while being integrated with C++ for other parts sounds like it would be awesome if not outright fun.
- drmeister 11y agoThanks - yes it's fun and very powerful. An integral part of Clasp is "clasp-analyzer" - a static analyzer that uses the ASTMatcher library to analyze all of the Clasp C++ source code (>170 source files). It builds an interface to the Memory Pool System garbage collector (coming soon) and builds a fast replacement for dynamic_cast. We are planning to use it to write a "super-swig" that could automatically build foreign function interfaces for C++ code.