Are Functional Programming Languages the best option for Crafting a Compiler?

This page summarizes the projects mentioned and recommended in the original post on /r/Compilers

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ANTLR

    ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.

  • grammars-v4

    Grammars written for ANTLR v4; expectation that the grammars are free of actions.

  • You said you wanted to write an LL() grammar -- those are context-free grammars. Having said that, assuming you have developed a decent symbol table manager (which you have to do anyway*), it's trivial to use context if necessary. Here is the repository of example ANTLR4 grammars (including many well known context-sensitive languages) - by the way, that's one of the arguments for using the visitor pattern rather than the listener pattern.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • xvm

    Ecstasy and XVM

  • Resolution - how the compiler figures things out and nails down "facts" (e.g. "what does this name mean?), particularly when there are circular dependencies (chicken and egg problems). On the current language project that I'm involved with, there are lots of good examples of hard problems, in here and here.

  • coherence

    Oracle Coherence Community Edition (by oracle)

  • I built an entire Java compiler in four months, from scratch, by myself, over twenty years ago. (Now owned by Oracle; still used today. Thank you, Larry.) But starting from a well written spec for a simple language like Java is orders of magnitude easier than developing a new language, runtime model, and tool-chain from scratch.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts