├── .gitignore ├── Makefile ├── README.md ├── ast_nodes.inl ├── clean.bat ├── codegen.c ├── compiler.c ├── hashmap.c ├── hashmap.inl ├── keywords.inl ├── lexer.c ├── main.c ├── memory.c ├── parse.c ├── platform_linux.c ├── platform_macos.c ├── platform_unix.c ├── platform_unix.h ├── platform_windows.c ├── platform_windows.h ├── punctuators.inl ├── scc.h ├── semantics.c ├── std.h ├── stretchy.c ├── string.c ├── testAll.bat ├── testall.sh ├── tests ├── basic.c ├── comment.c ├── float1.c ├── float2.c ├── float3.c ├── float4.c ├── float5.c ├── float6.c ├── float7.c ├── for1.c ├── for2.c ├── intprom.c ├── param1.c ├── param2.c ├── param3.c ├── param4.c ├── pointer1.c ├── pointer2.c ├── stringConstants.c ├── struct1.c ├── struct2.c ├── struct3.c ├── struct4.c ├── test.c ├── while1.c └── while2.c ├── tree.c └── x64.c /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/.gitignore -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | ./compiler.c 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/README.md -------------------------------------------------------------------------------- /ast_nodes.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/ast_nodes.inl -------------------------------------------------------------------------------- /clean.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/clean.bat -------------------------------------------------------------------------------- /codegen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/codegen.c -------------------------------------------------------------------------------- /compiler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/compiler.c -------------------------------------------------------------------------------- /hashmap.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/hashmap.c -------------------------------------------------------------------------------- /hashmap.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/hashmap.inl -------------------------------------------------------------------------------- /keywords.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/keywords.inl -------------------------------------------------------------------------------- /lexer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/lexer.c -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/main.c -------------------------------------------------------------------------------- /memory.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/memory.c -------------------------------------------------------------------------------- /parse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/parse.c -------------------------------------------------------------------------------- /platform_linux.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_linux.c -------------------------------------------------------------------------------- /platform_macos.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_macos.c -------------------------------------------------------------------------------- /platform_unix.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_unix.c -------------------------------------------------------------------------------- /platform_unix.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_unix.h -------------------------------------------------------------------------------- /platform_windows.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_windows.c -------------------------------------------------------------------------------- /platform_windows.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/platform_windows.h -------------------------------------------------------------------------------- /punctuators.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/punctuators.inl -------------------------------------------------------------------------------- /scc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/scc.h -------------------------------------------------------------------------------- /semantics.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/semantics.c -------------------------------------------------------------------------------- /std.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/std.h -------------------------------------------------------------------------------- /stretchy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/stretchy.c -------------------------------------------------------------------------------- /string.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/string.c -------------------------------------------------------------------------------- /testAll.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | build && compiler -a | findstr fail -------------------------------------------------------------------------------- /testall.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/testall.sh -------------------------------------------------------------------------------- /tests/basic.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1; 3 | } 4 | -------------------------------------------------------------------------------- /tests/comment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/comment.c -------------------------------------------------------------------------------- /tests/float1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float1.c -------------------------------------------------------------------------------- /tests/float2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float2.c -------------------------------------------------------------------------------- /tests/float3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float3.c -------------------------------------------------------------------------------- /tests/float4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float4.c -------------------------------------------------------------------------------- /tests/float5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float5.c -------------------------------------------------------------------------------- /tests/float6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float6.c -------------------------------------------------------------------------------- /tests/float7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/float7.c -------------------------------------------------------------------------------- /tests/for1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/for1.c -------------------------------------------------------------------------------- /tests/for2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/for2.c -------------------------------------------------------------------------------- /tests/intprom.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/intprom.c -------------------------------------------------------------------------------- /tests/param1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/param1.c -------------------------------------------------------------------------------- /tests/param2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/param2.c -------------------------------------------------------------------------------- /tests/param3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/param3.c -------------------------------------------------------------------------------- /tests/param4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/param4.c -------------------------------------------------------------------------------- /tests/pointer1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/pointer1.c -------------------------------------------------------------------------------- /tests/pointer2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/pointer2.c -------------------------------------------------------------------------------- /tests/stringConstants.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/stringConstants.c -------------------------------------------------------------------------------- /tests/struct1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/struct1.c -------------------------------------------------------------------------------- /tests/struct2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/struct2.c -------------------------------------------------------------------------------- /tests/struct3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/struct3.c -------------------------------------------------------------------------------- /tests/struct4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/struct4.c -------------------------------------------------------------------------------- /tests/test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/test.c -------------------------------------------------------------------------------- /tests/while1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/while1.c -------------------------------------------------------------------------------- /tests/while2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tests/while2.c -------------------------------------------------------------------------------- /tree.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/tree.c -------------------------------------------------------------------------------- /x64.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serge-rgb/compiler/HEAD/x64.c --------------------------------------------------------------------------------