Torrey
A Compiler to x86-64 Assembly
Torrey is a Lisp-like programming language implemented via compilation. Here is the context-free grammar of the language.
Language features include: type inference, integer and boolean primitive expressions, a unary minus expression, binary arithmetic and relational expressions, standard output, lexically-scoped variables, if and if-else expressions, and logical expressions.
Torrey is implemented as a compiler in Java and has a small C runtime. After building an abstract syntax tree (AST) of the program, the compiler translates the AST to an intermediate representation, or IR.
The IR can then be compiled down to one or more target languages. At the moment, the only target language is x86-64 gas assembly; however, additional targets can be added at any time.
This project is actively maintained and additional language features and targets are anticipated.
1, 1
$