Changeset View
Changeset View
Standalone View
Standalone View
src/parser/generated/KDbToken.h
Show All 39 Lines | 38 | public: | |||
---|---|---|---|---|---|
40 | 40 | | |||
41 | //! Creates an invalid token | 41 | //! Creates an invalid token | ||
42 | inline KDbToken() : v(0) {} | 42 | inline KDbToken() : v(0) {} | ||
43 | 43 | | |||
44 | KDbToken(const KDbToken &other) : v(other.v) {} | 44 | KDbToken(const KDbToken &other) : v(other.v) {} | ||
45 | 45 | | |||
46 | //! Creates a single-character token | 46 | //! Creates a single-character token | ||
47 | //! Only characters that belong to the grammar are accepted: | 47 | //! Only characters that belong to the grammar are accepted: | ||
48 | //! ';' ',' '.' '>' '<' '=' '+' '-' '&' '|' '/' '*' '%' '~' '(' ')' | 48 | //! ';' ',' '.' '>' '<' '=' '+' '-' '&' '|' '/' '*' '%' '~' '#' ':' '(' ')' | ||
49 | //! Invalid KDbToken is created for character that is not accepted. | 49 | //! Invalid KDbToken is created for character that is not accepted. | ||
50 | KDbToken(char charToken); | 50 | KDbToken(char charToken); | ||
51 | 51 | | |||
52 | //! @return true if this token is valid | 52 | //! @return true if this token is valid | ||
53 | inline bool isValid() const { return v != 0; } | 53 | inline bool isValid() const { return v != 0; } | ||
54 | 54 | | |||
55 | //! @return name of this token | 55 | //! @return name of this token | ||
56 | //! Useful for debugging. | 56 | //! Useful for debugging. | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | |||||
157 | static const KDbToken NOT; | 157 | static const KDbToken NOT; | ||
158 | static const KDbToken NOT_EQUAL; | 158 | static const KDbToken NOT_EQUAL; | ||
159 | static const KDbToken NOT_EQUAL2; | 159 | static const KDbToken NOT_EQUAL2; | ||
160 | static const KDbToken OR; | 160 | static const KDbToken OR; | ||
161 | static const KDbToken SIMILAR_TO; | 161 | static const KDbToken SIMILAR_TO; | ||
162 | static const KDbToken NOT_SIMILAR_TO; | 162 | static const KDbToken NOT_SIMILAR_TO; | ||
163 | static const KDbToken XOR; | 163 | static const KDbToken XOR; | ||
164 | static const KDbToken UMINUS; | 164 | static const KDbToken UMINUS; | ||
165 | static const KDbToken TABS_OR_SPACES; | ||||
166 | static const KDbToken DATE_TIME_INTEGER; | ||||
167 | static const KDbToken TIME_AM; | ||||
168 | static const KDbToken TIME_PM; | ||||
165 | //! Custom tokens are not used in parser but used as an extension in expression classes. | 169 | //! Custom tokens are not used in parser but used as an extension in expression classes. | ||
166 | static const KDbToken BETWEEN_AND; | 170 | static const KDbToken BETWEEN_AND; | ||
167 | static const KDbToken NOT_BETWEEN_AND; | 171 | static const KDbToken NOT_BETWEEN_AND; | ||
168 | // -- end of constants -- | 172 | // -- end of constants -- | ||
169 | 173 | | |||
170 | class List; | 174 | class List; | ||
171 | private: | 175 | private: | ||
172 | inline KDbToken(int value) : v(value) {} | 176 | inline KDbToken(int value) : v(value) {} | ||
173 | int v; | 177 | int v; | ||
174 | }; | 178 | }; | ||
175 | 179 | | |||
176 | //! Sends information about token @a token to debug output @a dbg. | 180 | //! Sends information about token @a token to debug output @a dbg. | ||
177 | KDB_EXPORT QDebug operator<<(QDebug dbg, KDbToken token); | 181 | KDB_EXPORT QDebug operator<<(QDebug dbg, KDbToken token); | ||
178 | 182 | | |||
179 | #endif | 183 | #endif |