write-a-C-interpreter icon indicating copy to clipboard operation
write-a-C-interpreter copied to clipboard

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

Results 10 write-a-C-interpreter issues
Sort by recently updated
recently updated
newest added

您好~我直接从仓库拉代码下来无法编译通过: os: win10 64bit gcc: MinGW.org GCC-6.3.0-1 ``` PS C:\Users\AlexC\Documents\GitHub\write-a-C-interpreter> gcc -m32 -o xc xc.c xc.c: In function 'next': xc.c:111:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]...

1. ...[Compiler Th**oe**ry](https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L52)... https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L52 You meant Th**eo**ry, didn’t you? 2. ...[can you **imaging**](https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L35)... https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L35 **imagine** is more appropriate here. 3. ...[tr**ys** to](https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L52)... https://github.com/lotabout/write-a-C-interpreter/blob/32f0a51c6c13d7999c07837fe43518a9c2956bed/tutorial/en/0-Preface.md?plain=1#L52 There should be tr**ies**.

- Translated chapter 1-Skeleton.md to Spanish I am not sure if I should leave the comments in English or translate them as well. Also it seems that there are some...

I have a simple, little script parser. For example to switch a sprinkler on time ` IF TIME == 12:00:00 THEN OUT1 = 1; IF TIME == 13:00:00 THEN OUT1...

I test the interpreter ` poolsize = 1 * 1024; line = 1; // allocate memory for virtual machine if (!(text = old_text = malloc(poolsize))) return -1; if (!(data =...

Yeah this is something good and can support 64bit

Polish the English text of every tutorial chapter, and Improve markdown source docs: * Add Level 1 title to docs ("Preface", "1. Skeleton", etc.). * Replaces smiles with markdown emojis....

https://lotabout.me/2015/write-a-C-interpreter-2/ 该章中JZ/JNZ指令一节中JNZ指令的实现代码后的注释少了not,应为else if (op == JNZ) {pc = ax ? (int *)*pc : pc + 1;} // jump if ax is **not** zero