nano-c

所属分类:GPT/ChatGPT
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2022-10-12 06:24:28
上 传 者sh-1993
说明:  非常小的C解释器
(Very small C interpreter)

文件列表:
LICENSE (35149, 2022-10-11)
Makefile (750, 2022-10-11)
examples/ (0, 2022-10-11)
examples/argtest.c (776, 2022-10-11)
examples/array.c (429, 2022-10-11)
examples/disasm.c (47, 2022-10-11)
examples/func.c (831, 2022-10-11)
examples/func2.c (80, 2022-10-11)
examples/hello.c (2046, 2022-10-11)
examples/http.c (119, 2022-10-11)
examples/literal.c (189, 2022-10-11)
examples/perf.c (296, 2022-10-11)
examples/perf/ (0, 2022-10-11)
examples/perf/c/ (0, 2022-10-11)
examples/perf/c/isprime.c (484, 2022-10-11)
examples/perf/python/ (0, 2022-10-11)
examples/perf/python/isprime.py (256, 2022-10-11)
examples/simple.c (516, 2022-10-11)
examples/string.c (349, 2022-10-11)
include/ (0, 2022-10-11)
include/error.h (1496, 2022-10-11)
include/map.h (426, 2022-10-11)
include/nanoc.h (5483, 2022-10-11)
include/types.h (197, 2022-10-11)
include/util.h (254, 2022-10-11)
nanoc (109776, 2022-10-11)
obj/ (0, 2022-10-11)
obj/error.o (5776, 2022-10-11)
obj/interpreter.o (44304, 2022-10-11)
obj/lexer.o (21608, 2022-10-11)
obj/map.o (6880, 2022-10-11)
obj/parser.o (70032, 2022-10-11)
obj/util.o (4432, 2022-10-11)
square.cgi (314, 2022-10-11)
src/ (0, 2022-10-11)
src/error.c (1099, 2022-10-11)
src/interpreter.c (11466, 2022-10-11)
src/lexer.c (8429, 2022-10-11)
... ...

# nano-c Very small C interpreter Modified version works on an Arduino Uno (only 2048 bytes RAM). ## Features * if-statement * for-, while-, do-while- loops * break and continue * functions and recursion * local and global variables * relatively helpful error messages * int type (can be used as pointers to a global data area) * generates bytecode that is then run by the interpreter * user-defined native functions [NEW!] * chars and strings [NEW!] * 8, 16, 32 bit arrays [NEW!] ## Example code it can run ```C int quicksort(int arr, int first, int last) { int i, j, pivot, temp; if(first < last) { pivot = first; i = first; j = last; while(i < j) { while((arr[i] <= arr[pivot]) && (i < last)) { i += 1; } while(arr[j] > arr[pivot]) { j -= 1; } if(i < j) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } temp = arr[pivot]; arr[pivot] = arr[j]; arr[j] = temp; quicksort(arr, first, j - 1); quicksort(arr, j + 1, last); } } int sort(int ptr, int count) { quicksort(ptr, 0, count - 1); }

近期下载者

相关文件


收藏者