add debug mode and stdin input

This commit is contained in:
hugogogo
2026-05-04 20:40:51 +02:00
parent edc678cee4
commit dff842ccab
5 changed files with 155 additions and 10 deletions

View File

@@ -8,6 +8,16 @@
#include <stdarg.h> // for va_list
#include <stdbool.h>
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* COMPUTORV1.C
*/
typedef enum
{
MODE_ARGV, //
MODE_STDIN, //
} e_program_mode;
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* LEXER.C
*/
@@ -96,6 +106,7 @@ void reduce(s_term *terms, s_polynom *polynom);
typedef enum
{
ERROR_BASE = 1, // start at 1 to avoid exit(0) for errors
ARGUMENTS_ERROR,
ERROR_TOKEN_COUNT,
ERROR_UNKNOWN_TOKEN,
ERROR_NUMBER_TOO_BIG,
@@ -126,5 +137,6 @@ extern char *input_g_err;
extern s_token *tokens_g_err;
extern s_term *terms_g_err;
extern s_polynom *polynom_g_err;
extern bool debug_mode;
#endif