Skip to content

AnirudhMathur12/cappuccino_c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The point of writing this compiler was to understand how a compiler works on every level. From tokenizing to emitting assembly. It took a lot of iterations and hard resets to finally get to a point where I built something remotely scalable.

The compiler is nowhere near finished or in any shape to do anything. I built keeping the "Make First, Perfect Later" mindset and I have gotten to a point where I think I can see a refactor on the horizon.

As I am writing everything, even the part that generates the assembly, so the compiler only supports computers on Apple silicon (technically it can support all ARM processors, but writing assembly on the M-series is slightly different).

Yes I have to use lldb, because I also need to implement a print function from scratch.

Here's what the compiler can do:-

  • Declare and define variable (they have to be done seperately).
Screenshot 2025-08-06 at 10 42 51 PM Screenshot 2025-08-06 at 10 39 49 PM Screenshot 2025-08-06 at 10 54 02 PM Screenshot 2025-08-06 at 10 50 49 PM
  • Do basic arithmetic, addition and subtraction.
Screenshot 2025-08-06 at 11 19 24 PM Screenshot 2025-08-06 at 11 22 22 PM
  • Do long complex arithmetic.
Screenshot 2025-08-20 at 9 34 45 PM Screenshot 2025-08-20 at 9 37 50 PM
  • Can process conditional statements (a > b; etc), but these were planned to be released with if and while statement's implementation, so they have no use right now.

About

Trying to make a programming language to challenge the not so deep depths of my programming knowledge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages