My attempt(s) at designing and creating a programming language and its compiler from scratch without using LLVM or any other compiler compiler
Aug 9, 2025
Jul 17, 2025 to Aug 3, 2025 (17 days)
Trial 1 is written in the D programming language and includes a lexer, parser, three-address code transformer, and finally, an x86-64 assembly code generator that conforms to the SysV ABI.
// isqrt.evor
i32 main() {
return isqrt(16);
}
i32 isqrt(i32 n) {
i32 odd = 1;
i32 count = 0;
while n >= odd {
n = n - odd;
odd += 2;
count += 1;
}
return count;
}
$ make && ./evorc hello.evor >hello.s && gcc -o hello hello.s && ./hello
- Control flow constructs:
if
,while
, and function calls. - Types:
void
,bool
,i32
, and pointers.
and while the language's feature set is very narrow, the sharp eye would notice that it doesn't, as a proper language, need forward declarations.