Files
rxcc/README.md

33 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2026-02-02 12:56:35 -05:00
<div align="center">
<br/>
<p>
<img src="resources/img/rxcc.png"
title="rxcc" alt="rxcc logo" width="120" />
<h1>rxcc - Rochester X C Compiler</h1>
</p>
<p width="120">
An x86 C compiler written in Swift.
</p>
<br/>
</div>
<!--Readme header inspired by https://helium.computer-->
2026-02-01 11:48:39 -05:00
2026-02-02 18:01:55 +00:00
# Overview
Have you ever woken up one day and said to yourself, "Y'know what? I'd really like to build a compiler today."?
2026-02-01 11:50:57 -05:00
2026-02-01 11:45:39 -05:00
Could be just me.
2026-02-01 11:50:57 -05:00
2026-02-01 11:45:39 -05:00
Well, ever since that fateful day, I've been chiseling away at this mammoth task, adding functionality in stages by following [this series](https://norasandler.com/2017/11/29/Write-a-Compiler.html).
2026-02-02 18:01:55 +00:00
# Features
2026-02-02 12:56:35 -05:00
> [!NOTE]
> This project is under active development, and the implemented features are rapidly changing.
Here is a list of the currently implemented C language features:
2026-02-01 11:52:48 -05:00
* __Unary Operators__: The ~ (bitwise compliment), - (negation), and ! (logical negation) operators are implemented for integers, and can be applied to any term.
* __Arithmetic Operators__: The + (addition), - (subtraction), * (multiplication), and / (division) operators are implemented for integers, parsed according to their precedence levels in C.
2026-02-14 02:08:04 +00:00
* __Bitwise Operators__: The & (bitwise AND), | (bitwise OR), and ^ (bitwise XOR) operators are implemented for integers, each with their own precedence levels.
2026-02-01 11:45:39 -05:00
* __Functions__: Each file currently supports exactly one function (so you'd be wise to make it "main"), with exactly one statement: an integer return statement. So yeah, not so useful yet.
2026-02-11 12:02:04 -05:00
* __Variables__: Local, integer variables are supported, and can be declared (optionally initialized) and assigned to.
2026-02-14 02:08:04 +00:00
* __Compound Assignment__: Each binary operator has its corresponding compound assignment operator implemented. Now you can have fun using your bitwise-shift-right-equals (>>=) operator.