x3ric / xcc

Simple C Compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XCC

XCC is a simple C compiler based on chibic, featuring support for including files from websites using curl and shebang support.

Installation

git clone https://github.com/x3ric/xcc
cd xcc
sudo make install

Usage

xc

Features

Chibic Based: Built upon chibic, XCC supports most C11 features.

GCC Backend: Runs gcc with Web Includes & Shebang Support through XCC.

Web Includes: Includes files from websites using curl.

Shebang Support: Supports executing C scripts directly.

For examples:

./examples/x11window

Internals

XCC comprises the following stages:

Tokenize: Breaks input into tokens.

Preprocess: Expands macros and interprets preprocessor directives.

Parse: Constructs abstract syntax trees and assigns types.

Codegen: Generates assembly text for AST nodes.


Arch Linux

About

Simple C Compiler

License:MIT License


Languages

Language:C 96.5%Language:Shell 3.0%Language:Makefile 0.5%