Description
AMaCC (Arguably Minimalist Arm C Compiler) is a small 32-bit Arm C compiler written from scratch as a teaching tool for learning how compilers, linkers and loaders work. It compiles a subset of C large enough to compile itself, and has two execution modes: a just-in-time compiler for the Arm backend, and generation of valid GNU/Linux ELF executables. Its design is easy to follow: a token generator feeds cooperative parsing functions that build a simple stack-based syntax tree, combining recursive descent with operator precedence parsing for expressions. The tree becomes a stack-based intermediate representation, which you can inspect with a command-line option, and is then turned into Arm32 instructions. It supports all C89 statements except typedef, all C89 expression operators, and char, int, enum, struct, union and multi-level pointer types.…
Highlights
- JIT execution on Arm
- Generates GNU/Linux ELF executables
- Self-hosting C subset
- Inspectable stack-based intermediate representation
- Supports C89 statements (except typedef) and operators
Ratings & Reviews
No ratings yet
Be the first to rate Amacc.
People also visit
Amacc FAQ
What is AMaCC?
A minimalist 32-bit Arm C compiler built from scratch to teach how compilers, linkers and loaders work.
How can the compiled code run?
Either through its just-in-time compiler on Arm, or as an ELF executable for GNU/Linux.
How much of C does it support?
All C89 statements except typedef, all C89 expression operators, and char, int, enum, struct, union and multi-level pointers. It compiles enough C to compile itself.
Can I see the intermediate code?
Yes, a command-line option lets you examine the stack-based IR.
What are the best Amacc alternatives?
Popular alternatives to Amacc include Shecc, XCC and selfie. See all Amacc alternatives




