├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile ├── README.md ├── arena.h ├── ast.c ├── ast.h ├── ast_node_type.h ├── buffer_util.h ├── codegen.h ├── compile.c ├── compile.h ├── compile_flags.txt ├── compiler.c ├── data_type.h ├── elf.c ├── elf.h ├── elf64.c ├── emu.c ├── examples ├── break-statement.c ├── hello-world.c ├── http.c ├── include │ ├── assert.h │ ├── fcntl.h │ ├── stdarg.h │ ├── stddef.h │ ├── stdio.h │ ├── stdlib.h │ ├── string.h │ ├── sys │ │ └── syscall.h │ ├── time.h │ └── unistd.h ├── infinite-loop-print-time-sleep.c ├── memory-ffi.c ├── printf.c ├── ptr.c ├── read-file-into-buffer.c ├── struct.c ├── syscall.c └── user-input.c ├── imm.h ├── instruction.h ├── lex.c ├── main-ast.c ├── main.c ├── memory.c ├── operand.h ├── parse.c ├── parse.h ├── pe.c ├── pre.c ├── register.h ├── std.h ├── test.c ├── tests ├── exit-code.c ├── precedence.c ├── run.sh └── while-loop.c ├── token.h ├── tools └── dump-opcodes.c ├── types.h ├── util.h ├── virtual_opcodes.h ├── vm.c ├── x64.c └── x86.c /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/.gitmodules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/README.md -------------------------------------------------------------------------------- /arena.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/arena.h -------------------------------------------------------------------------------- /ast.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/ast.c -------------------------------------------------------------------------------- /ast.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/ast.h -------------------------------------------------------------------------------- /ast_node_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/ast_node_type.h -------------------------------------------------------------------------------- /buffer_util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/buffer_util.h -------------------------------------------------------------------------------- /codegen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/codegen.h -------------------------------------------------------------------------------- /compile.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/compile.c -------------------------------------------------------------------------------- /compile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/compile.h -------------------------------------------------------------------------------- /compile_flags.txt: -------------------------------------------------------------------------------- 1 | -g 2 | -m32 3 | -------------------------------------------------------------------------------- /compiler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/compiler.c -------------------------------------------------------------------------------- /data_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/data_type.h -------------------------------------------------------------------------------- /elf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/elf.c -------------------------------------------------------------------------------- /elf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/elf.h -------------------------------------------------------------------------------- /elf64.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/elf64.c -------------------------------------------------------------------------------- /emu.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/emu.c -------------------------------------------------------------------------------- /examples/break-statement.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/break-statement.c -------------------------------------------------------------------------------- /examples/hello-world.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/hello-world.c -------------------------------------------------------------------------------- /examples/http.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/http.c -------------------------------------------------------------------------------- /examples/include/assert.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/assert.h -------------------------------------------------------------------------------- /examples/include/fcntl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/fcntl.h -------------------------------------------------------------------------------- /examples/include/stdarg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/stdarg.h -------------------------------------------------------------------------------- /examples/include/stddef.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/stddef.h -------------------------------------------------------------------------------- /examples/include/stdio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/stdio.h -------------------------------------------------------------------------------- /examples/include/stdlib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/stdlib.h -------------------------------------------------------------------------------- /examples/include/string.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/string.h -------------------------------------------------------------------------------- /examples/include/sys/syscall.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/sys/syscall.h -------------------------------------------------------------------------------- /examples/include/time.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/time.h -------------------------------------------------------------------------------- /examples/include/unistd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/include/unistd.h -------------------------------------------------------------------------------- /examples/infinite-loop-print-time-sleep.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/infinite-loop-print-time-sleep.c -------------------------------------------------------------------------------- /examples/memory-ffi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/memory-ffi.c -------------------------------------------------------------------------------- /examples/printf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/printf.c -------------------------------------------------------------------------------- /examples/ptr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/ptr.c -------------------------------------------------------------------------------- /examples/read-file-into-buffer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/read-file-into-buffer.c -------------------------------------------------------------------------------- /examples/struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/struct.c -------------------------------------------------------------------------------- /examples/syscall.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/syscall.c -------------------------------------------------------------------------------- /examples/user-input.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/examples/user-input.c -------------------------------------------------------------------------------- /imm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/imm.h -------------------------------------------------------------------------------- /instruction.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/instruction.h -------------------------------------------------------------------------------- /lex.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/lex.c -------------------------------------------------------------------------------- /main-ast.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/main-ast.c -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/main.c -------------------------------------------------------------------------------- /memory.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/memory.c -------------------------------------------------------------------------------- /operand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/operand.h -------------------------------------------------------------------------------- /parse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/parse.c -------------------------------------------------------------------------------- /parse.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/parse.h -------------------------------------------------------------------------------- /pe.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/pe.c -------------------------------------------------------------------------------- /pre.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/pre.c -------------------------------------------------------------------------------- /register.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/register.h -------------------------------------------------------------------------------- /std.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/std.h -------------------------------------------------------------------------------- /test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/test.c -------------------------------------------------------------------------------- /tests/exit-code.c: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | return 123; 4 | } 5 | -------------------------------------------------------------------------------- /tests/precedence.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/tests/precedence.c -------------------------------------------------------------------------------- /tests/run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/tests/run.sh -------------------------------------------------------------------------------- /tests/while-loop.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/tests/while-loop.c -------------------------------------------------------------------------------- /token.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/token.h -------------------------------------------------------------------------------- /tools/dump-opcodes.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/tools/dump-opcodes.c -------------------------------------------------------------------------------- /types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/types.h -------------------------------------------------------------------------------- /util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/util.h -------------------------------------------------------------------------------- /virtual_opcodes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/virtual_opcodes.h -------------------------------------------------------------------------------- /vm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/vm.c -------------------------------------------------------------------------------- /x64.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/x64.c -------------------------------------------------------------------------------- /x86.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riicchhaarrd/ocean/HEAD/x86.c --------------------------------------------------------------------------------