1 #ifndef CmajorLexer_HPP
2 #define CmajorLexer_HPP
3
4
5
6 #include <sngcm/cmlexer/TokenValueParsers.hpp>
7 #include <sngcm/cmlexer/CmajorLexerApi.hpp>
8 #include <soulng/lexer/Lexer.hpp>
9
10 class CmajorLexer : public soulng::lexer::Lexer
11 {
12 public:
13 CmajorLexer(const std::u32string& content_, const std::string& fileName_, int fileIndex_);
14 CmajorLexer(const char32_t* start_, const char32_t* end_, const std::string& fileName_, int fileIndex_);
15 int NextState(int state, char32_t c) override;
16 double floatingLit;
17 bool floatingLitFloat;
18 uint64_t intLit;
19 bool intLitUnsigned;
20 char32_t chrLit;
21 int chrLitPrefix;
22 std::u32string strLit;
23 int strLitPrefix;
24 int leftAngleCount;
25 bool parsingOperatorFunctionGroupId;
26 private:
27 int GetTokenId(int statementIndex);
28 };
29 #endif