# lotabout/write-a-C-interpreter

Write a simple interpreter of C. Inspired by c4 and largely based on it.

Repository: https://github.com/lotabout/write-a-C-interpreter
Canonical: https://ross.abutalabs.com/products/write-a-c-interpreter
Language: C
License: GPL-2.0
License Family: copyleft
Last push: 2025-11-22T01:54:12+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 53, release rhythm 35, longevity 100
- inputs: {"age_days": 3906, "days_push": 285, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4397, forks 771 (observed 2026-08-28T04:08:48.209063+00:00)

## What it is
A small, self-hosting C interpreter written in C, inspired by and largely based on c4, accompanied by a step-by-step tutorial series (in English and Chinese) explaining how it is built. It is primarily an educational project for learning how interpreters and compilers work.

## Use cases
- learn how to write a C interpreter
- understand how compilers and interpreters work
- study a small self-hosting interpreter codebase
- follow a step-by-step compiler construction tutorial
- learn lexing and recursive descent parsing
- build a simple virtual machine in C

## When to choose
- you want to learn interpreter/compiler fundamentals from readable, minimal code
- you prefer learning by reading a guided tutorial alongside the source
- you want a small self-hosting C interpreter to experiment with

## When to avoid
- you need a production-grade C compiler or interpreter
- you need full C standard compliance or performance
- you want a maintained tool for running C code in real projects

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: interpreter, parser, compiler
- domain: compilers, programming-languages, education, tutorials
- platform: windows, cli, c
- tags: c-interpreter, self-hosting, tutorial, compiler-design, virtual-machine, lexer, recursive-descent, linux, macos

## Member repositories
- lotabout/write-a-C-interpreter (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:48.209063+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:09.632113+00:00, confidence not recorded.
  - readme: https://github.com/lotabout/write-a-C-interpreter (fetched 2026-08-28T04:08:48.209063+00:00, sha 72fcbfb29b19)
- Data as of 2026-08-30T08:39:29.467469+00:00.
