# doctorwkt/acwj

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/doctorwkt-acwj).**

13,235 stars · 1,195 forks · C · GPL-3.0

## Links

- GitHub: https://github.com/DoctorWkt/acwj
- awesome-repositories: https://awesome-repositories.com/repository/doctorwkt-acwj.md

## Topics

`c` `compiler` `lexical-analysis` `parsing`

## Description

This project is a compiler development tutorial that provides a series of guides and exercises for building a complete compiler from scratch. It focuses on the implementation of a structured compilation pipeline to transform high-level source code into executable machine instructions.

The project covers the creation of a machine code generator for specific processor architectures and a static analysis framework. This framework includes methodologies for implementing type checking and constant folding to verify logic correctness before the final execution phase.

The instructional material encompasses the entire compilation process, including language front-end development with lexical scanners and parsers, as well as the engineering of multi-pass pipelines. It also addresses the design of self-hosting compilers and the use of recursive descent parsing.

## Tags

### Programming Languages & Runtimes

- [Compiler Construction Tutorials](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-construction-tutorials.md) — Offers a structured tutorial for building a complete compiler from scratch, covering tokenization to code generation.
- [Machine Code Generation](https://awesome-repositories.com/f/programming-languages-runtimes/machine-code-generation.md) — Provides the capability to emit native processor instructions from an intermediate representation for direct hardware execution. ([source](https://github.com/doctorwkt/acwj#readme))
- [Multi-Pass Compiler Pipelines](https://awesome-repositories.com/f/programming-languages-runtimes/multi-pass-compiler-pipelines.md) — Designs a multi-pass compiler pipeline that transforms source code through sequential stages of scanning, parsing, and generation.
- [Lexical Analyzers](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/lexical-analyzers.md) — Implements a lexical analyzer to transform raw source character streams into structured tokens for the compilation process.

### Part of an Awesome List

- [Assembly Generators](https://awesome-repositories.com/f/awesome-lists/devtools/assemblers/assembly-generators.md) — Implements assembly generators that translate high-level constructs into machine instructions for specific processor architectures.
- [Static Analysis Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/static-analysis-frameworks.md) — Provides a framework for implementing static analysis tasks like type checking and constant folding.
- [Compiler Construction](https://awesome-repositories.com/f/awesome-lists/devtools/compiler-construction.md) — A C compiler implementation guide.
- [Programming Languages](https://awesome-repositories.com/f/awesome-lists/devtools/programming-languages.md) — A C compiler written in C.

### Data & Databases

- [Recursive Descent Parsers](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/recursive-descent-parsers.md) — Implements recursive descent parsing to translate language syntax into structured representations using recursive function calls.

### Education & Learning Resources

- [Compiler Front-ends](https://awesome-repositories.com/f/education-learning-resources/front-end-learning-paths/compiler-front-ends.md) — Guides the implementation of language front-ends, including lexical scanners and parsers to process source syntax. ([source](https://github.com/doctorwkt/acwj#readme))

### Software Engineering & Architecture

- [Static Analysis](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis.md) — Implements static analysis for validating types and logic correctness during the compilation process. ([source](https://github.com/doctorwkt/acwj#readme))
- [Static Analysis Engines](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis-engines.md) — Provides a static analysis engine to perform type checking and constant folding for logic verification before execution.
- [Language Syntax Parsers](https://awesome-repositories.com/f/software-engineering-architecture/syntax-tree-analysis/language-syntax-parsers.md) — Develops language syntax parsers to transform source code into abstract syntax trees.
- [Static Type Checking](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/static-type-checking.md) — Implements static type checking to verify consistency and logic correctness during the build phase.

### Development Tools & Productivity

- [Self-Hosting Toolchains](https://awesome-repositories.com/f/development-tools-productivity/compilers-toolchains/compilers/self-hosting-verification-tools/self-hosting-toolchains.md) — Covers the architectural design of self-hosting toolchains where the compiler is written in its own target language.
