#ifndef LEXER_H #define LEXER_H #include #include using namespace std; enum TokenKind { ident, number, text, separator, eos }; class Lexer { private: ifstream f; char ch; void nextChar (); public: TokenKind kind; string token; void nextToken (); void error (string msg); public: Lexer (string fileName); }; #endif // LEXER_H