Skip to content

v420v/ibu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The ibu programming language

CI

Key Features of ibu

  • No strict type checker
  • No C-like pointer arithmetic
  • No function-like macros
  • No variable shadowing
  • No break, continue stmt. Use goto
  • No libc dependency
  • No hidden control flow
  • No hidden memory allocations
  • All values are extended to 64-bit when accessed
  • The compiler is written in itself

Important

Supports x86-64 Linux only

Build the language

$ git clone git@github.com:v420v/ibu.git
$ cd ibu
$ make init

Build the language with docker

$ git clone git@github.com:v420v/ibu.git
$ cd ibu
$ make up
$ make ibu
$ make init
Command Execution
make up docker compose up -d
make ibu docker compose exec ibu bash
make down docker compose down

Usage

$ ./ibuc <filename>.ibu

Compiler implementation

File Content
src/ibu.ibu Entry point
src/tokenizer/tokenizer.ibu Lexical analyzer
src/preprocessor/preprocessor.ibu Preprocessor
src/parser/parser.ibu Parser
src/codegen/codegen.ibu x86-64 Assembly code generator
src/linux-syscall/linux-syscall.ibu Linux system call
src/runtime.s Syscall function in assembly
src/util/util.ibu Other

Contribution

contribution is welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A self-hosted programming language that compiles to x86-64 assembly

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages