Skip to content

raghav3615/compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Complier

-> The goal of this project is to learn how compilers & computation works under the hood and to actually implement them by making some actual compilers <3.

P.S. I know this might some insane by idk shit so why not try it out.

Current status

  • Implemented

    • Lexer and parser for a small toy language (identifiers, integers, arithmetic, parentheses, basic control flow)
    • AST construction and pretty-printing
    • Simple semantic checks (scopes, variable resolution)
    • Interpreter / REPL for executing programs
    • Basic code generation to a simple stack-based bytecode and a VM
  • Limitations

    • No optimizations
    • Minimal type system (mostly dynamic/untyped)
    • Limited standard library and error reporting
  • Next Goal

    • Add stronger typing and type checking
    • Implement optimization passes and more backends (e.g., LLVM or native asm)
    • Improve diagnostics, tests, and documentation
  • Run the CLI script by path:

python -m tinycalc.cli example.c

About

learning how to write a compiler from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors