mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-16 13:05:36 +00:00
39 lines
618 B
C++
39 lines
618 B
C++
#ifndef REZLEXER_H
|
|
#define REZLEXER_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "location.hh"
|
|
|
|
class RezSymbol;
|
|
class RezWorld;
|
|
|
|
class RezLexer
|
|
{
|
|
RezWorld& world;
|
|
struct Priv;
|
|
std::unique_ptr<Priv> pImpl;
|
|
|
|
std::string curFile;
|
|
yy::location lastLocation;
|
|
|
|
class WaveToken;
|
|
|
|
bool atEnd();
|
|
WaveToken nextWave();
|
|
WaveToken peekWave();
|
|
|
|
public:
|
|
RezLexer(RezWorld& world, std::string filename);
|
|
RezLexer(RezWorld& world, std::string filename, const std::string& data);
|
|
~RezLexer();
|
|
|
|
RezSymbol nextToken();
|
|
|
|
void addDefine(std::string str);
|
|
void addIncludePath(std::string path);
|
|
};
|
|
|
|
#endif // REZLEXER_H
|