Lucene++ - a full-featured, c++ search engine
API Documentation

QueryParserTokenManager.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef QUERYPARSERTOKENMANAGER_H
8 #define QUERYPARSERTOKENMANAGER_H
9
10 #include "QueryParserConstants.h"
11
12 namespace Lucene {
13
15 class LPPAPI QueryParserTokenManager : public QueryParserConstants, public LuceneObject {
16 public:
17 QueryParserTokenManager(const QueryParserCharStreamPtr& stream);
18 QueryParserTokenManager(const QueryParserCharStreamPtr& stream, int32_t lexState);
19
20 virtual ~QueryParserTokenManager();
21
22 LUCENE_CLASS(QueryParserTokenManager);
23
24 public:
26 InfoStreamPtr debugStream;
27
28 protected:
29 static const int64_t jjbitVec0[];
30 static const int64_t jjbitVec1[];
31 static const int64_t jjbitVec3[];
32 static const int64_t jjbitVec4[];
33 static const int32_t jjnextStates[];
34
36 static const wchar_t* jjstrLiteralImages[];
37
39 static const wchar_t* lexStateNames[];
40
42 static const int32_t jjnewLexState[];
43 static const int64_t jjtoToken[];
44 static const int64_t jjtoSkip[];
45
46 int32_t curLexState;
47 int32_t defaultLexState;
48 int32_t jjnewStateCnt;
49 int32_t jjround;
50 int32_t jjmatchedPos;
51 int32_t jjmatchedKind;
52
53 QueryParserCharStreamPtr input_stream;
54 IntArray jjrounds;
55 IntArray jjstateSet;
56 wchar_t curChar;
57
58 public:
60 void setDebugStream(const InfoStreamPtr& debugStream);
61
63 void ReInit(const QueryParserCharStreamPtr& stream);
64
66 void ReInit(const QueryParserCharStreamPtr& stream, int32_t lexState);
67
69 void SwitchTo(int32_t lexState);
70
72 QueryParserTokenPtr getNextToken();
73
74 protected:
75 int32_t jjStopStringLiteralDfa_3(int32_t pos, int64_t active0);
76 int32_t jjStartNfa_3(int32_t pos, int64_t active0);
77 int32_t jjStopAtPos(int32_t pos, int32_t kind);
78 int32_t jjMoveStringLiteralDfa0_3();
79 int32_t jjStartNfaWithStates_3(int32_t pos, int32_t kind, int32_t state);
80 int32_t jjMoveNfa_3(int32_t startState, int32_t curPos);
81 int32_t jjStopStringLiteralDfa_1(int32_t pos, int64_t active0);
82 int32_t jjStartNfa_1(int32_t pos, int64_t active0);
83 int32_t jjMoveStringLiteralDfa0_1();
84 int32_t jjMoveStringLiteralDfa1_1(int64_t active0);
85 int32_t jjStartNfaWithStates_1(int32_t pos, int32_t kind, int32_t state);
86 int32_t jjMoveNfa_1(int32_t startState, int32_t curPos);
87 int32_t jjMoveStringLiteralDfa0_0();
88 int32_t jjMoveNfa_0(int32_t startState, int32_t curPos);
89 int32_t jjStopStringLiteralDfa_2(int32_t pos, int64_t active0);
90 int32_t jjStartNfa_2(int32_t pos, int64_t active0);
91 int32_t jjMoveStringLiteralDfa0_2();
92 int32_t jjMoveStringLiteralDfa1_2(int64_t active0);
93 int32_t jjStartNfaWithStates_2(int32_t pos, int32_t kind, int32_t state);
94 int32_t jjMoveNfa_2(int32_t startState, int32_t curPos);
95
96 static bool jjCanMove_0(int32_t hiByte, int32_t i1, int32_t i2, int64_t l1, int64_t l2);
97 static bool jjCanMove_1(int32_t hiByte, int32_t i1, int32_t i2, int64_t l1, int64_t l2);
98 static bool jjCanMove_2(int32_t hiByte, int32_t i1, int32_t i2, int64_t l1, int64_t l2);
99
100 void ReInitRounds();
101 QueryParserTokenPtr jjFillToken();
102
103 void jjCheckNAdd(int32_t state);
104 void jjAddStates(int32_t start, int32_t end);
105 void jjCheckNAddTwoStates(int32_t state1, int32_t state2);
106 void jjCheckNAddStates(int32_t start, int32_t end);
107 };
108
109 }
110
111 #endif
QueryParserConstants.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::QueryParserTokenPtr
boost::shared_ptr< QueryParserToken > QueryParserTokenPtr
Definition: LuceneTypes.h:273
Lucene::QueryParserTokenManager::input_stream
QueryParserCharStreamPtr input_stream
Definition: QueryParserTokenManager.h:53
Lucene::QueryParserTokenManager
Token Manager.
Definition: QueryParserTokenManager.h:15
Lucene::QueryParserTokenManager::jjrounds
IntArray jjrounds
Definition: QueryParserTokenManager.h:54
Lucene::QueryParserTokenManager::jjstateSet
IntArray jjstateSet
Definition: QueryParserTokenManager.h:55
Lucene::QueryParserTokenManager::jjround
int32_t jjround
Definition: QueryParserTokenManager.h:49
Lucene::QueryParserTokenManager::defaultLexState
int32_t defaultLexState
Definition: QueryParserTokenManager.h:47
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::QueryParserTokenManager::jjnewStateCnt
int32_t jjnewStateCnt
Definition: QueryParserTokenManager.h:48
Lucene::QueryParserConstants
Token literal values and constants.
Definition: QueryParserConstants.h:15
Lucene::QueryParserCharStreamPtr
boost::shared_ptr< QueryParserCharStream > QueryParserCharStreamPtr
Definition: LuceneTypes.h:271
Lucene::InfoStreamPtr
boost::shared_ptr< InfoStream > InfoStreamPtr
Definition: LuceneTypes.h:532
Lucene::QueryParserTokenManager::curLexState
int32_t curLexState
Definition: QueryParserTokenManager.h:46
Lucene::QueryParserTokenManager::jjmatchedKind
int32_t jjmatchedKind
Definition: QueryParserTokenManager.h:51
Lucene::QueryParserTokenManager::jjmatchedPos
int32_t jjmatchedPos
Definition: QueryParserTokenManager.h:50
Lucene::QueryParserTokenManager::curChar
wchar_t curChar
Definition: QueryParserTokenManager.h:56

clucene.sourceforge.net