Back to articles
I built a programming language in C
How-ToTools

I built a programming language in C

via Dev.toAakash

Built a programming language from scratch in C. Wanted to understand how languages actually work under the hood. It has a lexer, parser, AST, bytecode compiler, and a stack-based VM. Also supports arrays, dicts, classes, try/catch, and a stdlib. class Animal { fn init ( name , sound ) { self . name = name self . sound = sound } fn speak () { print self . name + " says " + self . sound } } let dog = Animal ( " Rex " , " woof " ) dog . speak () Learned more from this than from anything I've read. Compilers are not magic. Source: github.com/aaka3h/lang

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles