> ## 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/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: 作品, #legacy-import

# 介绍

编译器将汇编或高级计算机语言源程序（Source program）作为输入，翻译成目标语言（Target language）机器代码的等价程序。  
这里实现了一个支持函数、数组的精简C语言文法的编译器

# 实现细节

### 词法分析

构造DFA

### 语义分析

使用递归下降

### 汇编代码生成

生成代码为一个虚拟机环境

# 代码仓库

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

# 参考

- [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)