Tokenizer.h 359 B

1234567891011121314151617181920
  1. #ifndef TOKENIZER_H
  2. #define TOKENIZER_H
  3. #include <stdbool.h>
  4. typedef enum Token { T_INT, T_NULL, T_ADD, T_MUL, T_PRINT, T_SEMICOLON, T_END } Token;
  5. bool tTokenize(const char* path);
  6. const char* tGetError();
  7. void tResetReader();
  8. Token tPeekToken();
  9. Token tReadToken();
  10. bool tReadInt(int* i);
  11. const char* tGetTokenName(Token token);
  12. void tPrint();
  13. #endif