#ifndef LEX_H #define LEX_H #define TOK_MAX 128 enum TokenType { ERROR = 0, NAME, NUMBER, OPERATOR, STRING, END }; void strcpy(char* dest, const char* src); struct Token { TokenType type; char data[TOK_MAX]; Token() {} Token(const Token& other) { type = other.type; strcpy(data, other.data); } Token& operator=(const Token& other) { type = other.type; strcpy(data, other.data); return *this; } }; extern Token current; void set_input(const char*); void advance(); #endif