#pragma once #ifndef TOKENIZER_HPP #define TOKENIZER_HPP #include #include #include #include typedef enum { PREPROC, FUNCTION, SUB, END, AS, TYPE, IDENTIFIER, INTEGER, STRING, OPAREN, CPAREN, COMMA, QUOTE, EQUALS, TOKEN_TYPE_COUNT } PBTokenType; typedef struct { PBTokenType type; std::string value; } PBToken; class Tokenizer { std::vector> tokentypes; std::string code; public: Tokenizer(std::string); std::vector tokenize(); PBToken tokenize_one_token(); std::string dump(); }; #endif