]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/tree/xpath/XPathLexer.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / tree / xpath / XPathLexer.h
1 #pragma once
2
3
4 #include "antlr4-runtime.h"
5
6
7
8
9 class  XPathLexer : public antlr4::Lexer {
10 public:
11   enum {
12     TOKEN_REF = 1, RULE_REF = 2, ANYWHERE = 3, ROOT = 4, WILDCARD = 5, BANG = 6, 
13     ID = 7, STRING = 8
14   };
15
16   XPathLexer(antlr4::CharStream *input);
17   ~XPathLexer();
18
19   virtual std::string getGrammarFileName() const override;
20   virtual const std::vector<std::string>& getRuleNames() const override;
21
22   virtual const std::vector<std::string>& getChannelNames() const override;
23   virtual const std::vector<std::string>& getModeNames() const override;
24   virtual const std::vector<std::string>& getTokenNames() const override; // deprecated, use vocabulary instead
25   virtual antlr4::dfa::Vocabulary& getVocabulary() const override;
26
27   virtual const std::vector<uint16_t> getSerializedATN() const override;
28   virtual const antlr4::atn::ATN& getATN() const override;
29
30   virtual void action(antlr4::RuleContext *context, size_t ruleIndex, size_t actionIndex) override;
31 private:
32   static std::vector<antlr4::dfa::DFA> _decisionToDFA;
33   static antlr4::atn::PredictionContextCache _sharedContextCache;
34   static std::vector<std::string> _ruleNames;
35   static std::vector<std::string> _tokenNames;
36   static std::vector<std::string> _channelNames;
37   static std::vector<std::string> _modeNames;
38
39   static std::vector<std::string> _literalNames;
40   static std::vector<std::string> _symbolicNames;
41   static antlr4::dfa::Vocabulary _vocabulary;
42   static antlr4::atn::ATN _atn;
43   static std::vector<uint16_t> _serializedATN;
44
45
46   // Individual action functions triggered by action() above.
47   void IDAction(antlr4::RuleContext *context, size_t actionIndex);
48
49   // Individual semantic predicate functions triggered by sempred() above.
50
51   struct Initializer {
52     Initializer();
53   };
54   static Initializer _init;
55 };
56