Initial commit

This commit is contained in:
2025-05-14 01:16:41 +10:00
parent 21fd8823ee
commit 9528030b2a
8 changed files with 198 additions and 0 deletions

15
include/expr_compiler.h Normal file
View File

@@ -0,0 +1,15 @@
// Reads a human math expression from the command line or a file
// and converts it from infix to postfix. e.g; a + b -> a b +
// If it is already in postfix then it will skip the infix conversion
// Finally it will then convert it into a bytecode stack
#include "expr_compiler.h"
// For type conversion of human-readable formats
// Supports all float formats
#include "typing.h"
// Converts human readable linear expression into bytecode for the executor
uint8_t* infix_compile_expression(const char* src);
// Converts postfix linear expression into bytecode for the executor
uint8_t* postfix_compile_expression(const char* src);