1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "sal/config.h"
24 #define YY_EXIT 1 // YY_FATAL will not halt the application
33 #pragma warning ( push )
34 // Silence warnings about redefinition of INT8_MIN etc in stdint.h
35 // The flex-generated workdir/LexTarget/idlc/source/scanner.cxx defines them prior to these includes
36 #pragma warning ( disable : 4005 )
38 #include <connectivity/internalnode.hxx>
43 #ifndef INCLUDED_CONNECTIVITY_SOURCE_PARSE_SQLFLEX_L
44 #define INCLUDED_CONNECTIVITY_SOURCE_PARSE_SQLFLEX_L
50 #include "sqlbison.hxx"
54 #include <osl/diagnose.h>
55 #include <rtl/strbuf.hxx>
56 #include <connectivity/sqlparse.hxx>
57 #include <connectivity/sqlscan.hxx>
67 #define YY_NO_UNISTD_H
69 using namespace connectivity;
71 // Creation of the pages for the tokens
72 // Pages generally are created from the Lexer
74 static sal_Int32 gatherString(int delim, sal_Int32 nTyp);
75 static sal_Int32 gatherName(const sal_Char*);
76 static sal_Int32 gatherNamePre(const sal_Char* );
77 // has to be set before the parser starts
78 OSQLScanner* xxx_pGLOBAL_SQLSCAN = nullptr;
80 #define SQL_NEW_NODE(text, token) \
81 SQLyylval.pParseNode = new OSQLInternalNode(text, token);
83 #define SQL_NEW_KEYWORD(token) \
84 SQLyylval.pParseNode = new OSQLInternalNode("", SQLNodeType::Keyword, (token)); return token;
86 #define SQL_NEW_INTNUM SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::IntNum); return SQL_TOKEN_INTNUM;
87 #define SQL_NEW_APPROXNUM SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::ApproxNum); return SQL_TOKEN_APPROXNUM;
88 #define SQL_NEW_DATE SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::AccessDate); return SQL_TOKEN_ACCESS_DATE;
90 #define YY_INPUT(buf,result,max_size) \
92 int c = xxx_pGLOBAL_SQLSCAN->SQLyygetc(); \
93 result = (c == EOF) ? YY_NULL : (buf[0] = c, 1);\
97 static void do_fatal_error(const char* msg)
99 xxx_pGLOBAL_SQLSCAN->SQLyyerror(msg);
100 /*hack to silence -Wunused-function*/
101 if (0) yy_fatal_error(msg);
104 #define YY_FATAL_ERROR(msg) \
106 do_fatal_error(msg); \
118 %option never-interactive
121 ABS {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); }
122 ACOS {SQL_NEW_KEYWORD(SQL_TOKEN_ACOS); }
123 AFTER {SQL_NEW_KEYWORD(SQL_TOKEN_AFTER); }
124 ALL {SQL_NEW_KEYWORD(SQL_TOKEN_ALL); }
125 ALTER {SQL_NEW_KEYWORD(SQL_TOKEN_ALTER); }
126 AND {SQL_NEW_KEYWORD(SQL_TOKEN_AND); }
127 ANY {SQL_NEW_KEYWORD(SQL_TOKEN_ANY); }
128 ARRAY_AGG {SQL_NEW_KEYWORD(SQL_TOKEN_ARRAY_AGG); }
129 AS {SQL_NEW_KEYWORD(SQL_TOKEN_AS); }
130 ASC {SQL_NEW_KEYWORD(SQL_TOKEN_ASC); }
131 ASCII {SQL_NEW_KEYWORD(SQL_TOKEN_ASCII); }
132 ASIN {SQL_NEW_KEYWORD(SQL_TOKEN_ASIN); }
133 AT {SQL_NEW_KEYWORD(SQL_TOKEN_AT); }
134 ATAN {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN); }
135 ATAN2 {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN2); }
136 ATOMIC {SQL_NEW_KEYWORD(SQL_TOKEN_ATOMIC); }
137 AUTHORIZATION {SQL_NEW_KEYWORD(SQL_TOKEN_AUTHORIZATION); }
138 AVG {SQL_NEW_KEYWORD(SQL_TOKEN_AVG); }
140 BEFORE {SQL_NEW_KEYWORD(SQL_TOKEN_BEFORE); }
141 BEGIN {SQL_NEW_KEYWORD(SQL_TOKEN_BEGIN); }
142 BETWEEN {SQL_NEW_KEYWORD(SQL_TOKEN_BETWEEN); }
143 BIGINT {SQL_NEW_KEYWORD(SQL_TOKEN_BIGINT); }
144 BINARY {SQL_NEW_KEYWORD(SQL_TOKEN_BINARY); }
145 BIT {SQL_NEW_KEYWORD(SQL_TOKEN_BIT); }
146 BIT_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_BIT_LENGTH); }
147 BLOB {SQL_NEW_KEYWORD(SQL_TOKEN_BLOB); }
148 BOTH {SQL_NEW_KEYWORD(SQL_TOKEN_BOTH); }
149 BY {SQL_NEW_KEYWORD(SQL_TOKEN_BY); }
151 CALL {SQL_NEW_KEYWORD(SQL_TOKEN_CALL); }
152 CASE {SQL_NEW_KEYWORD(SQL_TOKEN_CASE); }
153 CAST {SQL_NEW_KEYWORD(SQL_TOKEN_CAST); }
154 CEILING {SQL_NEW_KEYWORD(SQL_TOKEN_CEILING); }
155 CHAR {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR); }
156 CHARACTER {SQL_NEW_KEYWORD(SQL_TOKEN_CHARACTER); }
157 CHAR(ACTER)?_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR_LENGTH); }
158 CHECK {SQL_NEW_KEYWORD(SQL_TOKEN_CHECK); }
159 CLOB {SQL_NEW_KEYWORD(SQL_TOKEN_CLOB); }
160 COALESCE {SQL_NEW_KEYWORD(SQL_TOKEN_COALESCE); }
161 COLLATE {SQL_NEW_KEYWORD(SQL_TOKEN_COLLATE); }
162 COLLECT {SQL_NEW_KEYWORD(SQL_TOKEN_COLLECT); }
163 COMMIT {SQL_NEW_KEYWORD(SQL_TOKEN_COMMIT); }
164 CONCAT {SQL_NEW_KEYWORD(SQL_TOKEN_CONCAT); }
165 CONTINUE {SQL_NEW_KEYWORD(SQL_TOKEN_CONTINUE); }
166 CONVERT {SQL_NEW_KEYWORD(SQL_TOKEN_CONVERT); }
167 COS {SQL_NEW_KEYWORD(SQL_TOKEN_COS); }
168 COT {SQL_NEW_KEYWORD(SQL_TOKEN_COT); }
169 COUNT {SQL_NEW_KEYWORD(SQL_TOKEN_COUNT); }
170 CREATE {SQL_NEW_KEYWORD(SQL_TOKEN_CREATE); }
171 CROSS {SQL_NEW_KEYWORD(SQL_TOKEN_CROSS); }
172 CUME_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_CUME_DIST); }
173 CURRENT {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT); }
174 CURRENT_DATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DATE); }
175 CURRENT_CATALOG {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_CATALOG); }
176 CURRENT_DEFAULT_TRANSFORM_GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP); }
177 CURRENT_PATH {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_PATH); }
178 CURRENT_ROLE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_ROLE); }
179 CURRENT_SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_SCHEMA); }
180 CURRENT_USER {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_USER); }
181 CURDATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURDATE); }
182 CURRENT_TIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIME); }
183 CURTIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURTIME); }
184 CURRENT_TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIMESTAMP); }
185 CURSOR {SQL_NEW_KEYWORD(SQL_TOKEN_CURSOR); }
187 D {SQL_NEW_KEYWORD(SQL_TOKEN_D); }
188 DATE {SQL_NEW_KEYWORD(SQL_TOKEN_DATE); }
189 DATEDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_DATEDIFF); }
190 DATEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_DATEVALUE); }
191 DAY {SQL_NEW_KEYWORD(SQL_TOKEN_DAY); }
192 DAYNAME {SQL_NEW_KEYWORD(SQL_TOKEN_DAYNAME); }
193 DAYOFMONTH {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFMONTH); }
194 DAYOFWEEK {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFWEEK); }
195 DAYOFYEAR {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFYEAR); }
196 DEC {SQL_NEW_KEYWORD(SQL_TOKEN_DEC); }
197 DECIMAL {SQL_NEW_KEYWORD(SQL_TOKEN_DECIMAL); }
198 DECLARE {SQL_NEW_KEYWORD(SQL_TOKEN_DECLARE); }
199 DEFAULT {SQL_NEW_KEYWORD(SQL_TOKEN_DEFAULT); }
200 DEGREES {SQL_NEW_KEYWORD(SQL_TOKEN_DEGREES); }
201 DELETE {SQL_NEW_KEYWORD(SQL_TOKEN_DELETE); }
202 DENSE_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_DENSE_RANK); }
203 DESC {SQL_NEW_KEYWORD(SQL_TOKEN_DESC); }
204 DIFFERENCE {SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); }
205 DISTINCT {SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); }
206 DOUBLE {SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); }
207 DROP {SQL_NEW_KEYWORD(SQL_TOKEN_DROP); }
209 EACH {SQL_NEW_KEYWORD(SQL_TOKEN_EACH); }
210 ELSE {SQL_NEW_KEYWORD(SQL_TOKEN_ELSE); }
211 END {SQL_NEW_KEYWORD(SQL_TOKEN_END); }
212 EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); }
213 ESCAPE {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); }
214 EXCEPT {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); }
215 EXCLUDE {SQL_NEW_KEYWORD(SQL_TOKEN_EXCLUDE); }
216 EXISTS {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); }
217 EXP {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); }
218 EXTRACT {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); }
220 FALSE {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); }
221 FETCH {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); }
222 FIRST {SQL_NEW_KEYWORD(SQL_TOKEN_FIRST); }
223 FIRST_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_FIRST_VALUE); }
224 FLOAT {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); }
225 FLOOR {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); }
226 FN {SQL_NEW_KEYWORD(SQL_TOKEN_FN); }
227 FOLLOWING {SQL_NEW_KEYWORD(SQL_TOKEN_FOLLOWING); }
228 FOR {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); }
229 FOREIGN {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); }
230 FOUND {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); }
231 FROM {SQL_NEW_KEYWORD(SQL_TOKEN_FROM); }
232 FULL {SQL_NEW_KEYWORD(SQL_TOKEN_FULL); }
233 FUSION {SQL_NEW_KEYWORD(SQL_TOKEN_FUSION); }
235 GRANT {SQL_NEW_KEYWORD(SQL_TOKEN_GRANT); }
236 GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); }
238 HAVING {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); }
239 HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); }
241 IGNORE {SQL_NEW_KEYWORD(SQL_TOKEN_IGNORE); }
242 IN {SQL_NEW_KEYWORD(SQL_TOKEN_IN); }
243 INNER {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); }
244 INSERT {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); }
245 INSTEAD {SQL_NEW_KEYWORD(SQL_TOKEN_INSTEAD); }
246 INT(EGER)? {SQL_NEW_KEYWORD(SQL_TOKEN_INTEGER); }
247 INTERSECT {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECT); }
248 INTERVAL {SQL_NEW_KEYWORD(SQL_TOKEN_INTERVAL); }
249 INTERSECTION {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECTION); }
250 INTO {SQL_NEW_KEYWORD(SQL_TOKEN_INTO); }
251 IS {SQL_NEW_KEYWORD(SQL_TOKEN_IS); }
253 JOIN {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); }
255 KEY {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); }
257 LAG {SQL_NEW_KEYWORD(SQL_TOKEN_LAG); }
258 LARGE {SQL_NEW_KEYWORD(SQL_TOKEN_LARGE); }
259 LAST {SQL_NEW_KEYWORD(SQL_TOKEN_LAST); }
260 LAST_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_LAST_VALUE); }
261 LCASE {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); }
262 LEAD {SQL_NEW_KEYWORD(SQL_TOKEN_LEAD); }
263 LEADING {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); }
264 LEFT {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); }
265 LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); }
266 LIKE {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); }
267 LIMIT {SQL_NEW_KEYWORD(SQL_TOKEN_LIMIT); }
268 LN {SQL_NEW_KEYWORD(SQL_TOKEN_LN); }
269 LOCAL {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); }
270 LOCATE {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); }
271 LOG {SQL_NEW_KEYWORD(SQL_TOKEN_LOG); }
272 LOGF {SQL_NEW_KEYWORD(SQL_TOKEN_LOGF); }
273 LOG10 {SQL_NEW_KEYWORD(SQL_TOKEN_LOG10); }
274 LOWER {SQL_NEW_KEYWORD(SQL_TOKEN_LOWER); }
275 LTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_LTRIM); }
277 MAX {SQL_NEW_KEYWORD(SQL_TOKEN_MAX); }
278 MILLISECOND {SQL_NEW_KEYWORD(SQL_TOKEN_MILLISECOND); }
279 MIN {SQL_NEW_KEYWORD(SQL_TOKEN_MIN); }
280 MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_MINUTE); }
281 MOD {SQL_NEW_KEYWORD(SQL_TOKEN_MOD); }
282 MONTH {SQL_NEW_KEYWORD(SQL_TOKEN_MONTH); }
283 MONTHNAME {SQL_NEW_KEYWORD(SQL_TOKEN_MONTHNAME); }
285 NATIONAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATIONAL); }
286 NATURAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); }
287 NCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); }
288 NCLOB {SQL_NEW_KEYWORD(SQL_TOKEN_NCLOB); }
289 NEW {SQL_NEW_KEYWORD(SQL_TOKEN_NEW); }
290 NEXT {SQL_NEW_KEYWORD(SQL_TOKEN_NEXT); }
291 NO {SQL_NEW_KEYWORD(SQL_TOKEN_NO); }
292 NOT {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); }
293 NOW {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); }
294 NTH_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_NTH_VALUE); }
295 NTILE {SQL_NEW_KEYWORD(SQL_TOKEN_NTILE); }
296 NULL {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); }
297 NULLIF {SQL_NEW_KEYWORD(SQL_TOKEN_NULLIF); }
298 NULLS {SQL_NEW_KEYWORD(SQL_TOKEN_NULLS); }
299 NUMERIC {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); }
301 OBJECT {SQL_NEW_KEYWORD(SQL_TOKEN_OBJECT); }
302 OCTET_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); }
303 OF {SQL_NEW_KEYWORD(SQL_TOKEN_OF); }
304 OFFSET {SQL_NEW_KEYWORD(SQL_TOKEN_OFFSET); }
305 OJ {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); }
306 OLD {SQL_NEW_KEYWORD(SQL_TOKEN_OLD); }
307 ON {SQL_NEW_KEYWORD(SQL_TOKEN_ON); }
308 ONLY {SQL_NEW_KEYWORD(SQL_TOKEN_ONLY); }
309 OPTION {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); }
310 OR {SQL_NEW_KEYWORD(SQL_TOKEN_OR); }
311 ORDER {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); }
312 OTHERS {SQL_NEW_KEYWORD(SQL_TOKEN_OTHERS); }
313 OUTER {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); }
314 OVER {SQL_NEW_KEYWORD(SQL_TOKEN_OVER); }
316 PARTITION {SQL_NEW_KEYWORD(SQL_TOKEN_PARTITION); }
317 PERCENT_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENT_RANK); }
318 PERCENTILE_CONT {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_CONT); }
319 PERCENTILE_DISC {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_DISC); }
320 PI {SQL_NEW_KEYWORD(SQL_TOKEN_PI); }
321 POSITION {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); }
322 POWER {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); }
323 PRECEDING {SQL_NEW_KEYWORD(SQL_TOKEN_PRECEDING); }
324 PRECISION {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); }
325 PRIMARY {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); }
326 PRIVILEGES {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); }
327 PROCEDURE {SQL_NEW_KEYWORD(SQL_TOKEN_PROCEDURE); }
328 PUBLIC {SQL_NEW_KEYWORD(SQL_TOKEN_PUBLIC); }
330 QUARTER {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); }
332 RADIANS {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); }
333 RAND {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); }
334 RANGE {SQL_NEW_KEYWORD(SQL_TOKEN_RANGE); }
335 RANK {SQL_NEW_KEYWORD(SQL_TOKEN_RANK); }
336 REAL {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); }
337 REFERENCES {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); }
338 REFERENCING {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCING); }
339 REPEAT {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); }
340 REPLACE {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); }
341 RESPECT {SQL_NEW_KEYWORD(SQL_TOKEN_RESPECT); }
342 ROLLBACK {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); }
343 ROUND {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); }
344 ROUNDMAGIC {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); }
345 ROW {SQL_NEW_KEYWORD(SQL_TOKEN_ROW); }
346 ROWS {SQL_NEW_KEYWORD(SQL_TOKEN_ROWS); }
347 ROW_NUMBER {SQL_NEW_KEYWORD(SQL_TOKEN_ROW_NUMBER); }
348 RIGHT {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); }
349 RTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); }
351 SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_SCHEMA); }
352 SECOND {SQL_NEW_KEYWORD(SQL_TOKEN_SECOND); }
353 SELECT {SQL_NEW_KEYWORD(SQL_TOKEN_SELECT); }
354 SET {SQL_NEW_KEYWORD(SQL_TOKEN_SET); }
355 SIZE {SQL_NEW_KEYWORD(SQL_TOKEN_SIZE); }
356 SIGN {SQL_NEW_KEYWORD(SQL_TOKEN_SIGN); }
357 SIN {SQL_NEW_KEYWORD(SQL_TOKEN_SIN); }
358 SMALLINT {SQL_NEW_KEYWORD(SQL_TOKEN_SMALLINT); }
359 SOME {SQL_NEW_KEYWORD(SQL_TOKEN_SOME); }
360 SOUNDEX {SQL_NEW_KEYWORD(SQL_TOKEN_SOUNDEX); }
361 SPACE {SQL_NEW_KEYWORD(SQL_TOKEN_SPACE); }
362 SQRT {SQL_NEW_KEYWORD(SQL_TOKEN_SQRT); }
363 STDDEV_POP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_POP); }
364 STDDEV_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_SAMP); }
365 STATEMENT {SQL_NEW_KEYWORD(SQL_TOKEN_STATEMENT); }
366 SUBSTRING {SQL_NEW_KEYWORD(SQL_TOKEN_SUBSTRING); }
367 SUM {SQL_NEW_KEYWORD(SQL_TOKEN_SUM); }
368 SESSION_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SESSION_USER); }
369 SYSTEM_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SYSTEM_USER); }
371 TABLE {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); }
372 TAN {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); }
373 THEN {SQL_NEW_KEYWORD(SQL_TOKEN_THEN); }
374 TIES {SQL_NEW_KEYWORD(SQL_TOKEN_TIES); }
375 TIME {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); }
376 TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); }
377 TIMESTAMPADD {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); }
378 TIMESTAMPDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPDIFF); }
379 TIMEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEVALUE); }
380 TIMEZONE_HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_HOUR); }
381 TIMEZONE_MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_MINUTE); }
382 TO {SQL_NEW_KEYWORD(SQL_TOKEN_TO); }
383 TRAILING {SQL_NEW_KEYWORD(SQL_TOKEN_TRAILING); }
384 TRANSLATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRANSLATE); }
385 TRIGGER {SQL_NEW_KEYWORD(SQL_TOKEN_TRIGGER); }
386 TRIM {SQL_NEW_KEYWORD(SQL_TOKEN_TRIM); }
387 TRUE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUE); }
388 TRUNCATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUNCATE); }
389 TS {SQL_NEW_KEYWORD(SQL_TOKEN_TS); }
390 T {SQL_NEW_KEYWORD(SQL_TOKEN_T); }
392 UCASE {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); }
393 UNBOUNDED {SQL_NEW_KEYWORD(SQL_TOKEN_UNBOUNDED); }
394 UNION {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); }
395 UNIQUE {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); }
396 UNKNOWN {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); }
397 UPDATE {SQL_NEW_KEYWORD(SQL_TOKEN_UPDATE); }
398 UPPER {SQL_NEW_KEYWORD(SQL_TOKEN_UPPER); }
399 USAGE {SQL_NEW_KEYWORD(SQL_TOKEN_USAGE); }
400 USER {SQL_NEW_KEYWORD(SQL_TOKEN_USER); }
401 USING {SQL_NEW_KEYWORD(SQL_TOKEN_USING); }
403 VARBINARY {SQL_NEW_KEYWORD(SQL_TOKEN_VARBINARY); }
404 VARCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_VARCHAR); }
405 VARYING {SQL_NEW_KEYWORD(SQL_TOKEN_VARYING); }
406 VAR_POP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_POP); }
407 VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_SAMP); }
408 VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_VALUE); }
409 VALUES {SQL_NEW_KEYWORD(SQL_TOKEN_VALUES); }
410 VIEW {SQL_NEW_KEYWORD(SQL_TOKEN_VIEW); }
412 WEEK {SQL_NEW_KEYWORD(SQL_TOKEN_WEEK); }
413 WEEKDAY {SQL_NEW_KEYWORD(SQL_TOKEN_WEEKDAY); }
414 WHEN {SQL_NEW_KEYWORD(SQL_TOKEN_WHEN); }
415 WHERE {SQL_NEW_KEYWORD(SQL_TOKEN_WHERE); }
416 WITH {SQL_NEW_KEYWORD(SQL_TOKEN_WITH); }
417 WITHIN {SQL_NEW_KEYWORD(SQL_TOKEN_WITHIN); }
418 WITHOUT {SQL_NEW_KEYWORD(SQL_TOKEN_WITHOUT); }
419 WORK {SQL_NEW_KEYWORD(SQL_TOKEN_WORK); }
421 YEAR {SQL_NEW_KEYWORD(SQL_TOKEN_YEAR); }
422 YEARDAY {SQL_NEW_KEYWORD(SQL_TOKEN_YEARDAY); }
424 ZONE {SQL_NEW_KEYWORD(SQL_TOKEN_ZONE); }
426 "<" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::Less);return SQL_LESS;}
427 ">" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::Great);return SQL_GREAT;}
428 "=" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::Equal);return SQL_EQUAL;}
429 "<=" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::LessEq);return SQL_LESSEQ;}
430 ">=" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::GreatEq);return SQL_GREATEQ;}
431 "<>" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::NotEqual);return SQL_NOTEQUAL;}
432 "!=" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::NotEqual);return SQL_NOTEQUAL;}
433 "||" { SQL_NEW_NODE(OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQLNodeType::Concat);return SQL_CONCAT;}
436 [-+*/:(),.;?{}] { return SQLyytext[0]; }
439 <SQL>[A-Za-z\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375][A-Za-z\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375_0-9]* {return gatherName( SQLyytext);}
441 <SQL>([0-9]+) {SQL_NEW_INTNUM; }
444 <SQL>([0-9]+"."[0-9]*) |
445 <SQL>[0-9]+[eE][+-]?[0-9]+ |
446 <SQL>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ |
447 <SQL>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
449 <PREDICATE_GER,PREDICATE_ENG,DATE>[A-Za-z\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375][A-Za-z0-9_%.,*?\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375]* {return gatherNamePre(SQLyytext);}
451 <PREDICATE_GER,PREDICATE_ENG>([0-9]+) {SQL_NEW_INTNUM; }
452 <PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+) {SQL_NEW_INTNUM; }
453 <PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+) {SQL_NEW_INTNUM; }
455 <PREDICATE_ENG>([0-9]+"."[0-9]+) |
456 <PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+"."[0-9]+) |
457 <PREDICATE_ENG>("."[0-9]+) {SQL_NEW_APPROXNUM; }
458 <PREDICATE_ENG>[0-9]+[eE][+-]?[0-9]+ |
459 <PREDICATE_ENG>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ |
460 <PREDICATE_ENG>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
462 <PREDICATE_GER>([0-9]+","[0-9]+) |
463 <PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+","[0-9]+) |
464 <PREDICATE_GER>(","[0-9]+) {SQL_NEW_APPROXNUM; }
465 <PREDICATE_GER>[0-9]+[eE][+-]?[0-9]+ |
466 <PREDICATE_GER>[0-9]+","[0-9]*[eE][+-]?[0-9]+ |
467 <PREDICATE_GER>","[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
469 <PREDICATE_GER,PREDICATE_ENG>[0-9.,][A-Za-z0-9_.,%]* {return gatherNamePre(SQLyytext);}
471 <SQL>\" { return gatherString('\"',0); }
472 <SQL>` { return gatherString('`' ,0); }
474 <PREDICATE_GER,PREDICATE_ENG,DATE,SQL>"[" { return gatherString(']' ,0);}
476 \' { return gatherString('\'',1); }
478 <PREDICATE_GER,PREDICATE_ENG,DATE># { return gatherString('#' ,2); }
480 <DATE>[0-9]{1,4}[^ ]*[0-9] |
481 <DATE>[0-9]{1,4}[^ ]*[0-9][ ][0-9]{1,4}[^ ]*[0-9] { SQL_NEW_DATE; }
483 <STRING>["-""+""*""/"":""("")"",""."";""?""{""}"] { return SQLyytext[0]; } /* */
484 <STRING>"[" { return gatherString(']' ,0); }
485 <STRING>[^ ':["?"]* { return gatherNamePre(SQLyytext); }
493 . {YY_FATAL_ERROR("Invalid symbol"); return SQL_TOKEN_INVALIDSYMBOL;}
497 // Kludge around a bug (well, Posix incompatibility) in flex 2.5.x
498 // http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=189332
499 #if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5
501 #ifndef YY_FLUSH_BUFFER
502 #define YY_FLUSH_BUFFER SQLyy_flush_buffer(YY_CURRENT_BUFFER )
506 #define yytext_ptr SQLyytext
511 // Versions of flex apparently differ in whether input() resp. yyinput() returns
512 // zero or EOF upon end of file:
513 inline bool checkeof(int c) { return c == 0 || c == EOF; }
516 * Read SQL string literal
518 * '' 'a string' 'quote '' within string'
519 * "" "a string" "quote "" within string"
520 * nTyp == 0 -> SQLNodeType::Name
521 * nTyp == 1 -> SQLNodeType::String
522 * nTyp == 2 -> SQLNodeType::AccessDate
524 sal_Int32 gatherString(int delim, sal_Int32 nTyp)
527 OStringBuffer sBuffer(256);
529 while (!checkeof(ch = yyinput()))
533 if ((ch = yyinput()) != delim)
541 SQL_NEW_NODE(OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQLNodeType::Name);
542 return SQL_TOKEN_NAME;
544 SQL_NEW_NODE(OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQLNodeType::String);
545 return SQL_TOKEN_STRING;
547 SQL_NEW_NODE(OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQLNodeType::AccessDate);
548 return SQL_TOKEN_ACCESS_DATE;
553 sBuffer.append(static_cast<sal_Char>(ch));
557 else if (nTyp != 1 && (ch == '\r' || ch == '\n') )
561 sBuffer.append(static_cast<sal_Char>(ch));
564 YY_FATAL_ERROR("Unterminated name string");
565 return SQL_TOKEN_INVALIDSYMBOL;
568 sal_Int32 mapEnumToToken(IParseContext::InternationalKeyCode _eKeyCode )
570 sal_Int32 nTokenID = 0;
573 case IParseContext::InternationalKeyCode::Like: nTokenID = SQL_TOKEN_LIKE; break;
574 case IParseContext::InternationalKeyCode::Not: nTokenID = SQL_TOKEN_NOT; break;
575 case IParseContext::InternationalKeyCode::Null: nTokenID = SQL_TOKEN_NULL; break;
576 case IParseContext::InternationalKeyCode::True: nTokenID = SQL_TOKEN_TRUE; break;
577 case IParseContext::InternationalKeyCode::False: nTokenID = SQL_TOKEN_FALSE; break;
578 case IParseContext::InternationalKeyCode::Is: nTokenID = SQL_TOKEN_IS; break;
579 case IParseContext::InternationalKeyCode::Between: nTokenID = SQL_TOKEN_BETWEEN; break;
580 case IParseContext::InternationalKeyCode::Or: nTokenID = SQL_TOKEN_OR; break;
581 case IParseContext::InternationalKeyCode::And: nTokenID = SQL_TOKEN_AND; break;
582 case IParseContext::InternationalKeyCode::Avg: nTokenID = SQL_TOKEN_AVG; break;
583 case IParseContext::InternationalKeyCode::Count: nTokenID = SQL_TOKEN_COUNT; break;
584 case IParseContext::InternationalKeyCode::Max: nTokenID = SQL_TOKEN_MAX; break;
585 case IParseContext::InternationalKeyCode::Min: nTokenID = SQL_TOKEN_MIN; break;
586 case IParseContext::InternationalKeyCode::Sum: nTokenID = SQL_TOKEN_SUM; break;
587 case IParseContext::InternationalKeyCode::Every: nTokenID = SQL_TOKEN_EVERY; break;
588 case IParseContext::InternationalKeyCode::Any: nTokenID = SQL_TOKEN_ANY; break;
589 case IParseContext::InternationalKeyCode::Some: nTokenID = SQL_TOKEN_SOME; break;
590 case IParseContext::InternationalKeyCode::StdDevPop: nTokenID = SQL_TOKEN_STDDEV_POP; break;
591 case IParseContext::InternationalKeyCode::StdDevSamp: nTokenID = SQL_TOKEN_STDDEV_SAMP; break;
592 case IParseContext::InternationalKeyCode::VarSamp: nTokenID = SQL_TOKEN_VAR_SAMP; break;
593 case IParseContext::InternationalKeyCode::VarPop: nTokenID = SQL_TOKEN_VAR_POP; break;
594 case IParseContext::InternationalKeyCode::Collect: nTokenID = SQL_TOKEN_COLLECT; break;
595 case IParseContext::InternationalKeyCode::Fusion: nTokenID = SQL_TOKEN_FUSION; break;
596 case IParseContext::InternationalKeyCode::Intersection: nTokenID = SQL_TOKEN_INTERSECTION; break;
598 OSL_FAIL( "mapEnumToToken: unsupported key!" );
603 * Read SQL Name literal
604 * Valid Names or international keywords:
605 * As we have international keywords, we test first on them
607 sal_Int32 gatherName(const sal_Char* text)
610 OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
611 IParseContext::InternationalKeyCode eKeyCode = xxx_pGLOBAL_SQLSCAN->getInternationalTokenID(text);
614 case IParseContext::InternationalKeyCode::Like:
615 case IParseContext::InternationalKeyCode::Not:
616 case IParseContext::InternationalKeyCode::Null:
617 case IParseContext::InternationalKeyCode::True:
618 case IParseContext::InternationalKeyCode::False:
619 case IParseContext::InternationalKeyCode::Is:
620 case IParseContext::InternationalKeyCode::Between:
621 case IParseContext::InternationalKeyCode::Or:
622 case IParseContext::InternationalKeyCode::And:
623 case IParseContext::InternationalKeyCode::Count:
624 case IParseContext::InternationalKeyCode::Avg:
625 case IParseContext::InternationalKeyCode::Max:
626 case IParseContext::InternationalKeyCode::Min:
627 case IParseContext::InternationalKeyCode::Sum:
628 case IParseContext::InternationalKeyCode::Every:
629 case IParseContext::InternationalKeyCode::Any:
630 case IParseContext::InternationalKeyCode::Some:
631 case IParseContext::InternationalKeyCode::StdDevPop:
632 case IParseContext::InternationalKeyCode::StdDevSamp:
633 case IParseContext::InternationalKeyCode::VarSamp:
634 case IParseContext::InternationalKeyCode::VarPop:
635 case IParseContext::InternationalKeyCode::Collect:
636 case IParseContext::InternationalKeyCode::Fusion:
637 case IParseContext::InternationalKeyCode::Intersection:
638 nToken = mapEnumToToken(eKeyCode);
639 SQL_NEW_KEYWORD(nToken);
642 SQL_NEW_NODE(OUString(text,strlen(text),RTL_TEXTENCODING_UTF8), SQLNodeType::Name);
643 return SQL_TOKEN_NAME;
647 Read SQL Name literal for predicate check
648 Valid Names or international keywords:
649 As we have international keywords, we test first on them
651 sal_Int32 gatherNamePre(const sal_Char* text)
654 OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
655 IParseContext::InternationalKeyCode eKeyCode = xxx_pGLOBAL_SQLSCAN->getInternationalTokenID(text);
658 case IParseContext::InternationalKeyCode::Like:
659 case IParseContext::InternationalKeyCode::Not:
660 case IParseContext::InternationalKeyCode::Null:
661 case IParseContext::InternationalKeyCode::True:
662 case IParseContext::InternationalKeyCode::False:
663 case IParseContext::InternationalKeyCode::Is:
664 case IParseContext::InternationalKeyCode::Between:
665 case IParseContext::InternationalKeyCode::Or:
666 case IParseContext::InternationalKeyCode::And:
667 case IParseContext::InternationalKeyCode::Count:
668 case IParseContext::InternationalKeyCode::Avg:
669 case IParseContext::InternationalKeyCode::Max:
670 case IParseContext::InternationalKeyCode::Min:
671 case IParseContext::InternationalKeyCode::Sum:
672 case IParseContext::InternationalKeyCode::Every:
673 case IParseContext::InternationalKeyCode::Any:
674 case IParseContext::InternationalKeyCode::Some:
675 case IParseContext::InternationalKeyCode::StdDevPop:
676 case IParseContext::InternationalKeyCode::StdDevSamp:
677 case IParseContext::InternationalKeyCode::VarSamp:
678 case IParseContext::InternationalKeyCode::VarPop:
679 case IParseContext::InternationalKeyCode::Collect:
680 case IParseContext::InternationalKeyCode::Fusion:
681 case IParseContext::InternationalKeyCode::Intersection:
682 nToken = mapEnumToToken(eKeyCode);
683 SQL_NEW_KEYWORD(nToken);
686 // we need a special handling for parameter
688 OString sStmt = xxx_pGLOBAL_SQLSCAN->getStatement();
689 sal_Int32 nLength = strlen(text);
690 sal_Int32 nPos = xxx_pGLOBAL_SQLSCAN->GetCurrentPos() - nLength - 2;
691 if (sStmt.getStr()[nPos] == ':')
693 SQL_NEW_NODE(OUString(text,nLength,RTL_TEXTENCODING_UTF8), SQLNodeType::Name);
694 nToken = SQL_TOKEN_NAME;
698 SQL_NEW_NODE(OUString(text,nLength,RTL_TEXTENCODING_UTF8), SQLNodeType::String);
699 nToken = SQL_TOKEN_STRING;
706 using namespace connectivity;
708 static bool IN_SQLyyerror;
709 //------------------------------------------------------------------------------
710 OSQLScanner::OSQLScanner()
711 : m_pContext(nullptr)
713 , m_bInternational(false)
714 , m_nRule(0) // 0 is INITIAL
716 IN_SQLyyerror = false;
719 //------------------------------------------------------------------------------
720 OSQLScanner::~OSQLScanner()
723 //------------------------------------------------------------------------------
724 void OSQLScanner::SQLyyerror(char const *fmt)
729 IN_SQLyyerror = true;
731 OSL_ENSURE(m_pContext, "OSQLScanner::SQLyyerror: No Context set");
732 m_sErrorMessage = OUString(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8);
733 if (m_nCurrentPos < m_sStatement.getLength())
735 m_sErrorMessage += ": ";
738 OUStringBuffer Buffer(256);
740 int ch = SQLyytext ? (SQLyytext[0] == 0 ? ' ' : SQLyytext[0]): ' ';
741 Buffer.append((sal_Unicode)ch);
742 while (!checkeof(ch = yyinput()))
746 if ((ch = yyinput()) != ' ')
751 aError = Buffer.makeStringAndClear();
756 Buffer.append((sal_Unicode)ch);
759 m_sErrorMessage += aError;
761 IN_SQLyyerror = false;
765 //------------------------------------------------------------------------------
766 void OSQLScanner::prepareScan(const OUString & rNewStatement, const IParseContext* pContext, bool bInternational)
771 m_sErrorMessage = OUString();
772 m_sStatement = OUStringToOString(rNewStatement, RTL_TEXTENCODING_UTF8);
774 m_bInternational = bInternational;
775 m_pContext = pContext;
778 //------------------------------------------------------------------------------
779 sal_Int32 OSQLScanner::SQLyygetc(void)
781 sal_Int32 nPos = (m_nCurrentPos >= m_sStatement.getLength()) ? EOF : m_sStatement.getStr()[m_nCurrentPos];
786 //------------------------------------------------------------------------------
787 IParseContext::InternationalKeyCode OSQLScanner::getInternationalTokenID(const sal_Char* sToken) const
789 OSL_ENSURE(m_pContext, "OSQLScanner::getInternationalTokenID: No Context set");
790 return (m_bInternational) ? m_pContext->getIntlKeyCode(OString(sToken) ) : IParseContext::InternationalKeyCode::None;
792 sal_Int32 OSQLScanner::GetGERRule() { return PREDICATE_GER; }
793 sal_Int32 OSQLScanner::GetENGRule() { return PREDICATE_ENG; }
794 sal_Int32 OSQLScanner::GetSQLRule() { return SQL; }
795 sal_Int32 OSQLScanner::GetDATERule() { return DATE; }
796 sal_Int32 OSQLScanner::GetSTRINGRule() { return STRING; }
797 void OSQLScanner::setScanner(bool _bNull)
799 xxx_pGLOBAL_SQLSCAN = _bNull ? nullptr : this;
801 sal_Int32 OSQLScanner::SQLlex()
806 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */