r/Compilers • u/ApprehensivePipe1584 • Sep 21 '26
C^4 Programming Language
I've been making a programming language, C^4 for almost a year. It's got generics, concepts, OOP, inheritance and polymorphism, error handling, and is able to build projects. It has some docs and a README, and a book is in the works. Wondering if anybody could check it out?
4
Upvotes
View all comments
Show parent comment
1
u/ApprehensivePipe1584 Sep 22 '26
It's a straight pipeline, not circular, don't know if my original message made it sound like that. It's just thats... how compilers need to work. The lexer turns text into tokens, the parser turns those tokens into a ast of nodes, and the compiler turns those nodes into the output. I need the tokens for the compiler because that's where the positions for my errors are stored. There just are so many nodes and those nodes need tokens, so it would be either 1 header being included by every other header and file and... it's just not practical to do.