Software Alternatives & Reviews

Let's write a compiler, part 1: Introduction, selecting a language, and planning

Racket Lang
  1. SPIM: A MIPS32 Simulator
    Cool :). The thing is to have an always start-to-end working compiler for an increasingly (even if the steps are very small) complex language. Another point would be to use simple tools at least to begin with. Racket [1] provides good lexer/parser tools [2] and you can use pattern matching [3] to browse and transform your AST. You can also target MIPS assembly [4] using the SPIM platform [5] for example, it is easy to learn and has very good debugging tools (basically the whole platform behaves like a gdb session). For the compiler implementation language OCaml is also a very good choice (even better because static typing will actually help you a lot with the horizontal approach) but it is less easier to setup as you need to install a lot more tools: ocaml itself, ocamllex (lexer), menhir (parser), ocamlbuild (automated build system), etc. [1] https://racket-lang.org/ [2] https://docs.racket-lang.org/parser-tools/ [3] https://docs.racket-lang.org/guide/match.html [4] http://www.cburch.com/cs/330/reading/mips-ref.pdf [5] http://spimsimulator.sourceforge.net/.

    5 social mentions

  2. Racket (formerly PLT Scheme) is a modern programming language in the Lisp/Scheme family, suitable...
    Pricing:
    • Open Source
    Cool :). The thing is to have an always start-to-end working compiler for an increasingly (even if the steps are very small) complex language. Another point would be to use simple tools at least to begin with. Racket [1] provides good lexer/parser tools [2] and you can use pattern matching [3] to browse and transform your AST. You can also target MIPS assembly [4] using the SPIM platform [5] for example, it is easy to learn and has very good debugging tools (basically the whole platform behaves like a gdb session). For the compiler implementation language OCaml is also a very good choice (even better because static typing will actually help you a lot with the horizontal approach) but it is less easier to setup as you need to install a lot more tools: ocaml itself, ocamllex (lexer), menhir (parser), ocamlbuild (automated build system), etc. [1] https://racket-lang.org/ [2] https://docs.racket-lang.org/parser-tools/ [3] https://docs.racket-lang.org/guide/match.html [4] http://www.cburch.com/cs/330/reading/mips-ref.pdf [5] http://spimsimulator.sourceforge.net/.

    #Programming Language #OOP #Generic Programming Language 91 social mentions

Discuss: Let's write a compiler, part 1: Introduction, selecting a language, and planning

Log in or Post with