commit 2a4438c4bcadeb9d45b7c8223ba09762bfa635eb Author: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Fri Jan 21 21:28:03 2022 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c38fa4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*.iml diff --git a/main.c b/main.c new file mode 100644 index 0000000..601aec7 --- /dev/null +++ b/main.c @@ -0,0 +1,37 @@ +#include +#include + +typedef enum { + LITERAL + ADD + SUB + MUL + DIV + GROUP +} expr_kind; + +typedef struct { + expr_kind tag; + union { + + } value; +} expr; + +int main(int argc, char **argv) { + if (argc == 1) { + printf("provide me an argument please\n"); + return 1; + } + + char *input = argv[0]; + + return 0; +} + +int parse_expr(char *input, size_t *offset) {} + +int parse_factor(char *input, size_t *offset) {} + +int parse_term(char *input, size_t *offset) {} + +int parse_literal(char *input, size_t *offset) {}