Tokenizer.h 453 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef TOKENIZER_H
  2. #define TOKENIZER_H
  3. #include <stdbool.h>
  4. typedef enum Token {
  5. T_INT,
  6. T_NULL,
  7. T_TRUE,
  8. T_FALSE,
  9. T_ADD,
  10. T_MUL,
  11. T_PRINT,
  12. T_SEMICOLON,
  13. T_OPEN_BRACKET,
  14. T_CLOSE_BRACKET,
  15. T_END
  16. } Token;
  17. bool tTokenize(const char* path);
  18. const char* tGetError();
  19. void tResetReader();
  20. Token tPeekToken();
  21. Token tReadToken();
  22. bool tReadInt(int* i);
  23. const char* tGetTokenName(Token token);
  24. void tPrint();
  25. #endif