parsingcompilationincremental-compiler

Learning incremental compilation design


There are a lot of books and articles about creating compilers which do all the compilation job at a time. And what about design of incremental compilers/parsers, which are used by IDEs? I'm familiar with first class of compilers, but I have never work with the second one.

I tried to read some articles about Eclipse Java Development Tools, but they describe how to use complete infrastructure(i.e. APIs) instead of describing internal design(i.e. how it works internally).

My goal is to implement incremental compiler for my own programming language. Which books or articles would you recommend me?


Solution

  • This book is worth a look: Builing a Flexible Incremental Compiler Back-End.

    Quote from Ch. 10 "Conclusions":

    This paper has explored the design of the back-end of an incremental compilation system. Rather than building a single fixed incremental compiler, this paper has presented a flexible framework for constructing such systems in accordance with user needs.

    I think this is what you are looking for...

    Edit:
    So you plan to create something that is known as a "cross compiler"?!
    I started a new attempt. Until now, I can't provide the ultimate reference. If you plan such a big project, I'm sure you are an experienced programmer. Therefore it is possible, that you already know these link(s).

    Compilers.net
    List of certain compilers, even cross compilers (Translators). Unfortunately with some broken links, but 'Toba' is still working and has a link to its source code. May be that this can inspire you.

    clang: a C language family frontend for LLVM
    Ok, it's for LVVM but source is available in a SVN repository and it seems to be a front end for a compiler (translator). May be that this can inspire you as well.