lotabout/write-a-C-interpreter
소개
간단한 C 언어 인터프리터를 작성합니다. c4에서 영감을 받았으며, 대부분 c4를 기반으로 합니다.
프로그래밍 언어 및 런타임측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalC interpreter that interprets itself.
How to Run the Code
File xc.c is the original one and xc-tutor.c is the one that I make for
the tutorial step by step.
gcc -o xc xc.c
./xc hello.c
./xc -s hello.c
./xc xc.c hello.c
./xc xc.c xc.c hello.c
About
This project is inspired by c4 and is largely based on it.
However, I rewrote them all to make it more understandable and help myself to understand it.
Despite the complexity we saw in books about compiler design, writing one is not that hard. You don't need that much theory though they will help for better understanding the logic behind the code.
Also I write a series of article about how this compiler is built under directory tutorial/en.
There is also a chinese version in my blog.
- 手把手教你构建 C 语言编译器(0)——前言
- 手把手教你构建 C 语言编译器(1)——设计
- 手把手教你构建 C 语言编译器(2)——虚拟机
- 手把手教你构建 C 语言编译器(3)——词法分析器
- 手把手教你构建 C 语言编译器(4)——递归下降
- 手把手教你构建 C 语言编译器(5)——变量定义
- 手把手教你构建 C 语言编译器(6)——函数定义
- 手把手教你构建 C 语言编译器(7)——语句
- 手把手教你构建 C 语言编译器(8)——表达式
- 手把手教你构建 C 语言编译器(9)——总结
Resources
Further Reading:
- Let's Build a Compiler: An excellent starting material for building compiler.
Forks:
Licence
The original code is licenced with GPL2, so this code will use the same licence.
관련 프로젝트 살펴보기
불러오는 중…