LexerBase.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Scintilla source code edit control
  2. /** @file LexerBase.h
  3. ** A simple lexer with no state.
  4. **/
  5. // Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
  6. // The License.txt file describes the conditions under which this software may be distributed.
  7. #ifndef LEXERBASE_H
  8. #define LEXERBASE_H
  9. #ifdef SCI_NAMESPACE
  10. namespace Scintilla {
  11. #endif
  12. // A simple lexer with no state
  13. class LexerBase : public ILexer {
  14. protected:
  15. PropSetSimple props;
  16. enum {numWordLists=KEYWORDSET_MAX+1};
  17. WordList *keyWordLists[numWordLists+1];
  18. public:
  19. LexerBase();
  20. virtual ~LexerBase();
  21. void SCI_METHOD Release();
  22. int SCI_METHOD Version() const;
  23. const char * SCI_METHOD PropertyNames();
  24. int SCI_METHOD PropertyType(const char *name);
  25. const char * SCI_METHOD DescribeProperty(const char *name);
  26. Sci_Position SCI_METHOD PropertySet(const char *key, const char *val);
  27. const char * SCI_METHOD DescribeWordListSets();
  28. Sci_Position SCI_METHOD WordListSet(int n, const char *wl);
  29. void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
  30. void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
  31. void * SCI_METHOD PrivateCall(int operation, void *pointer);
  32. };
  33. #ifdef SCI_NAMESPACE
  34. }
  35. #endif
  36. #endif