1*8af74909SZhong Yang // Scintilla source code edit control 2*8af74909SZhong Yang /** @file LexerSimple.h 3*8af74909SZhong Yang ** A simple lexer with no state. 4*8af74909SZhong Yang **/ 5*8af74909SZhong Yang // Copyright 1998-2010 by Neil Hodgson <[email protected]> 6*8af74909SZhong Yang // The License.txt file describes the conditions under which this software may be distributed. 7*8af74909SZhong Yang 8*8af74909SZhong Yang #ifndef LEXERSIMPLE_H 9*8af74909SZhong Yang #define LEXERSIMPLE_H 10*8af74909SZhong Yang 11*8af74909SZhong Yang namespace Scintilla { 12*8af74909SZhong Yang 13*8af74909SZhong Yang // A simple lexer with no state 14*8af74909SZhong Yang class LexerSimple : public LexerBase { 15*8af74909SZhong Yang const LexerModule *module; 16*8af74909SZhong Yang std::string wordLists; 17*8af74909SZhong Yang public: 18*8af74909SZhong Yang explicit LexerSimple(const LexerModule *module_); 19*8af74909SZhong Yang const char * SCI_METHOD DescribeWordListSets() override; 20*8af74909SZhong Yang void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; 21*8af74909SZhong Yang void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; 22*8af74909SZhong Yang // ILexer5 methods 23*8af74909SZhong Yang const char * SCI_METHOD GetName() override; 24*8af74909SZhong Yang int SCI_METHOD GetIdentifier() override; 25*8af74909SZhong Yang }; 26*8af74909SZhong Yang 27*8af74909SZhong Yang } 28*8af74909SZhong Yang 29*8af74909SZhong Yang #endif 30