> ## Content Index
> Fetch the complete content index at: https://cms.yufeiran.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# CMin
- URL: https://cms.yufeiran.com/en-bian-yi-yuan-li-ke-cheng-she-ji/
- Published: 2019-12-13T06:49:22.000Z
- Updated: 2026-09-27T12:37:55.000Z
- Author: Feiran Yu
- Tags: works, #lang-en, #legacy-import

# Introduction

A compiler takes an assembly-language or high-level-language source program as input and translates it into an equivalent program in the target language or machine code.

This project implements a compiler for a simplified C-like grammar that supports functions and arrays.

# Implementation Details

### Lexical Analysis

Construct a DFA.

### Semantic Analysis

Use recursive descent.

### Assembly Code Generation

The generated code targets a virtual-machine environment.

# Code Repository

[CMin](https://github.com/B266/CMin?ref=cms.yufeiran.com)

# References

- [Compiler Construction: Principles and Practice - Kenneth C. Louden](https://book.douban.com/subject/2709089/?ref=cms.yufeiran.com)
- [Parsing Techniques - Dick Grune; Ceriel J. H. Jacobs](https://book.douban.com/subject/4291903/?ref=cms.yufeiran.com)