Tokenizer.h 328 B

123456789101112131415161718
  1. #ifndef TOKENIZER_H
  2. #define TOKENIZER_H
  3. #include <stdbool.h>
  4. typedef enum Token { T_INT, T_ADD, 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. #endif