Files
rxcc/README.md

20 lines
1.1 KiB
Markdown
Raw Normal View History

2026-02-01 11:45:39 -05:00
rxcc - Rochester X C Compiler
---
2026-02-01 11:48:39 -05:00
2026-02-01 11:45:39 -05:00
An x86 C compiler written in Swift.
2026-02-01 11:48:39 -05:00
## Overview
2026-02-01 11:45:39 -05:00
Have you ever woken up one day and said to yourself, "Man, 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-01 11:48:39 -05:00
## Features
2026-02-01 11:50:57 -05:00
This project is under active development, but 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-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.
* __Variables__: To be implemented soon.
2026-02-01 11:48:39 -05:00