All Projects → DQNEO → 8cc.go

DQNEO / 8cc.go

Licence: mit
C compiler written in Go

Programming Languages

c
50402 projects - #5 most used programming language
go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to 8cc.go

The Hack General Purpose Computer
Using HDL, from Boolean algebra and elementary logic gates to building a Central Processing Unit, a memory system, and a hardware platform, leading up to a 16-bit general-purpose computer. Then, implementing the modern software hierarchy designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform; Including Virtual machine,Compiler and Operating system.
Stars: ✭ 39 (-25%)
Mutual labels:  compiler
Intrinsics Dude
Opensource Visual Studio extension for compiler instrinsics in C/C++
Stars: ✭ 44 (-15.38%)
Mutual labels:  compiler
Cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
Stars: ✭ 49 (-5.77%)
Mutual labels:  compiler
Nativejit
A C++ expression -> x64 JIT
Stars: ✭ 999 (+1821.15%)
Mutual labels:  compiler
Shaderc
A collection of tools, libraries, and tests for Vulkan shader compilation.
Stars: ✭ 1,016 (+1853.85%)
Mutual labels:  compiler
Leekscript V2
A dynamically typed, compiled just-in-time programming language used in Leek Wars' AIs
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Rascal
A simple Pascal interpreter written in rust.
Stars: ✭ 38 (-26.92%)
Mutual labels:  compiler
B2dpipe
2D Pipeline Compiler.
Stars: ✭ 51 (-1.92%)
Mutual labels:  compiler
Jsx Lite
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and Liquid.
Stars: ✭ 1,015 (+1851.92%)
Mutual labels:  compiler
Trck
Query engine for TrailDB
Stars: ✭ 48 (-7.69%)
Mutual labels:  compiler
Mlml
self-hosted compiler for a subset of OCaml
Stars: ✭ 41 (-21.15%)
Mutual labels:  compiler
Bytenode
A minimalist bytecode compiler for Node.js
Stars: ✭ 1,012 (+1846.15%)
Mutual labels:  compiler
Patchouli Compiler
An Oberon-07 compiler for Intel 64 (AMD64) architecture
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Iotz
compile things easy 🚀
Stars: ✭ 39 (-25%)
Mutual labels:  compiler
Typhon
A virtual machine for Monte.
Stars: ✭ 49 (-5.77%)
Mutual labels:  compiler
Llvm Tutorial Standalone
DEPRECATED (Use: https://github.com/llvm-hs/llvm-hs-kaleidoscope )
Stars: ✭ 38 (-26.92%)
Mutual labels:  compiler
U6a
Implementation of Unlambda, an esoteric programming language.
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Ikea Sharp
📦The new groundbreaking programming language
Stars: ✭ 52 (+0%)
Mutual labels:  compiler
Arithmetic Circuits
Arithmetic circuits for zero knowledge proof systems
Stars: ✭ 52 (+0%)
Mutual labels:  compiler
Min
Min: Crypto Token for Beautiful and Secure Code
Stars: ✭ 48 (-7.69%)
Mutual labels:  compiler

8cc.go C Compiler

8cc.go is a C Compiler written in Go. It's a port of 8cc (https://github.com/rui314/8cc)

Author

DQNEO

( Originally from Rui Ueyama [email protected] )

Usage

The output assembly code can only be run on Linux.

If you use other platforms, I would recomment Docker to run it.

$ docker run -it --rm -v `pwd`:/mnt  dqneo/ubuntu-build-essential:go bash

What kind of syntax does it support ?

  • if/else
  • for
  • binary operators (+-/* & |)
  • logical operators (&&, ||)
  • ternary operator (?:)
  • declaration of functions
  • function call
  • assign to local variables
  • assign to global variables
  • primitiv data types (int, char, char *, float, double)
  • composite data types (array, struct, union, pointer)
  • arithmetic of pointer
  • dereference of pointer

Test

$ docker run -it --rm -v `pwd`:/mnt  dqneo/ubuntu-build-essential:go bash
[email protected]:/# cd /mnt/
[email protected]:/mnt# ./gotest.sh

LICENSE

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].