2000-12-08 21:51:13 +01:00
|
|
|
#ifndef _LEXER_H
|
|
|
|
#define _LEXER_H
|
|
|
|
|
|
|
|
#include <clex.h>
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// mylexer
|
|
|
|
|
|
|
|
class YYFAR mylexer : public yyflexer {
|
|
|
|
public:
|
|
|
|
mylexer();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void yytables();
|
|
|
|
virtual int yyaction(int action);
|
|
|
|
|
|
|
|
public:
|
2000-12-15 21:29:33 +01:00
|
|
|
#line 25 "C:\\spongebob\\Utils\\scripter\\lexer.l"
|
2000-12-08 21:51:13 +01:00
|
|
|
|
2000-12-11 21:28:41 +01:00
|
|
|
int openInputFile(char *_filename);
|
|
|
|
int closeInputFile();
|
2000-12-08 21:51:13 +01:00
|
|
|
|
2000-12-11 21:28:41 +01:00
|
|
|
void setCurrentParser(class myparser *_parser) {m_currentParser=_parser;}
|
|
|
|
class myparser *getCurrentParser() {return m_currentParser;}
|
|
|
|
|
2000-12-12 21:51:59 +01:00
|
|
|
void error();
|
|
|
|
int getErrorCount();
|
2000-12-11 21:28:41 +01:00
|
|
|
|
|
|
|
// Overridden lexer functions
|
2000-12-12 21:51:59 +01:00
|
|
|
int yygetchar();
|
2000-12-11 21:28:41 +01:00
|
|
|
|
|
|
|
private:
|
2000-12-12 21:51:59 +01:00
|
|
|
void unexpectedChar();
|
|
|
|
|
2000-12-11 21:28:41 +01:00
|
|
|
|
|
|
|
class myparser *m_currentParser;
|
|
|
|
|
2000-12-12 21:51:59 +01:00
|
|
|
#line 39 "C:\\spongebob\\Utils\\scripter\\lexer.h"
|
2000-12-08 21:51:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef YYLEXNAME
|
|
|
|
#define YYLEXNAME mylexer
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INITIAL
|
|
|
|
#define INITIAL 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|