Skip to content
/ gLang Public

Compiler from a basic C-like language to x86_64 byte code

License

Notifications You must be signed in to change notification settings

Lord-KA/gLang

Repository files navigation

gLang

This is a compiler written in C for a very basic custom laguage that is translated to custom gSPU assembly (release-1.0) or to x86_64 bytecode (release-1.1).

Building release version

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
$ make

For full stack debug capabilities add FULL_DEBUG flag

Usage

Usage: -h          : show this help
       -i FileName : input from file
       -o FileName : output to file 

Done

  1. Lexer
  2. Recursive descent parser to expression tree
  3. Basic optimizations
  4. Translation to gAsm
  5. CMake config with fetching all hand-made dependencies by release tag
  6. Basic examples in glang
  7. Translation to x84_64 bytecode.

TODO

  1. Convert gSPU to double
  2. Implement basic memory management

About

Compiler from a basic C-like language to x86_64 byte code

Resources

License

Stars

Watchers

Forks

Packages

No packages published