-
Notifications
You must be signed in to change notification settings - Fork 7
/
MySQLLexer.g4
1178 lines (1098 loc) · 70.3 KB
/
MySQLLexer.g4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
lexer grammar MySQLLexer;
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0,
* as published by the Free Software Foundation.
*
* This program is also distributed with certain software (including
* but not limited to OpenSSL) that is licensed under separate terms, as
* designated in a particular file or component or in included license
* documentation. The authors of MySQL hereby grant you an additional
* permission to link the program and your derivative works with the
* separately licensed software that they have included with MySQL.
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License, version 2.0, for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Merged in all changes up to mysql-trunk git revision [6d4f66a] (16. January 2020).
*
* MySQL grammar for ANTLR 4.5+ with language features from MySQL 5.6.0 up to MySQL 8.0.
* The server version in the generated parser can be switched at runtime, making it so possible
* to switch the supported feature set dynamically.
*
* The coverage of the MySQL language should be 100%, but there might still be bugs or omissions.
*
* To use this grammar you will need a few support classes (which should be close to where you found this grammar).
* These classes implement the target specific action code, so we don't clutter the grammar with that
* and make it simpler to adjust it for other targets. See the demo/test project for further details.
*
* Written by Mike Lischke. Direct all bug reports, omissions etc. to [email protected].
*/
//-------------------------------------------------------------------------------------------------
// $antlr-format alignTrailingComments on, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments off, useTab off
// $antlr-format allowShortRulesOnASingleLine on, alignSemicolons ownLine
options {
superClass = MySQLBaseLexer;
tokenVocab = predefined; // Keyword tokens in a predefined order for simpler checks.
exportMacro = PARSERS_PUBLIC_TYPE;
}
tokens {
NOT2_SYMBOL,
CONCAT_PIPES_SYMBOL,
// Tokens assigned in NUMBER rule.
INT_NUMBER, // NUM in sql_yacc.yy
LONG_NUMBER,
ULONGLONG_NUMBER
}
@postinclude {
#include "MySQLBaseLexer.h"
}
//-------------------------------------------------------------------------------------------------
@header {/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0,
* as published by the Free Software Foundation.
*
* This program is also distributed with certain software (including
* but not limited to OpenSSL) that is licensed under separate terms, as
* designated in a particular file or component or in included license
* documentation. The authors of MySQL hereby grant you an additional
* permission to link the program and your derivative works with the
* separately licensed software that they have included with MySQL.
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License, version 2.0, for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
}
//-------------------------------------------------------------------------------------------------
// Operators
EQUAL_OPERATOR: '='; // Also assign.
ASSIGN_OPERATOR: ':=';
NULL_SAFE_EQUAL_OPERATOR: '<=>';
GREATER_OR_EQUAL_OPERATOR: '>=';
GREATER_THAN_OPERATOR: '>';
LESS_OR_EQUAL_OPERATOR: '<=';
LESS_THAN_OPERATOR: '<';
NOT_EQUAL_OPERATOR: '!=';
NOT_EQUAL2_OPERATOR: '<>' -> type(NOT_EQUAL_OPERATOR);
PLUS_OPERATOR: '+';
MINUS_OPERATOR: '-';
MULT_OPERATOR: '*';
DIV_OPERATOR: '/';
MOD_OPERATOR: '%';
LOGICAL_NOT_OPERATOR: '!';
BITWISE_NOT_OPERATOR: '~';
SHIFT_LEFT_OPERATOR: '<<';
SHIFT_RIGHT_OPERATOR: '>>';
LOGICAL_AND_OPERATOR: '&&';
BITWISE_AND_OPERATOR: '&';
BITWISE_XOR_OPERATOR: '^';
LOGICAL_OR_OPERATOR:
'||'
;
BITWISE_OR_OPERATOR: '|';
DOT_SYMBOL: '.';
COMMA_SYMBOL: ',';
SEMICOLON_SYMBOL: ';';
COLON_SYMBOL: ':';
OPEN_PAR_SYMBOL: '(';
CLOSE_PAR_SYMBOL: ')';
OPEN_CURLY_SYMBOL: '{';
CLOSE_CURLY_SYMBOL: '}';
UNDERLINE_SYMBOL: '_';
JSON_SEPARATOR_SYMBOL: '->' ; // MYSQL
JSON_UNQUOTED_SEPARATOR_SYMBOL: '->>' ; // MYSQL
// The MySQL server parser uses custom code in its lexer to allow base alphanum chars (and ._$) as variable name.
// For this it handles user variables in 2 different ways and we have to model this to match that behavior.
AT_SIGN_SYMBOL: '@';
AT_TEXT_SUFFIX: '@' SIMPLE_IDENTIFIER;
AT_AT_SIGN_SYMBOL: '@@';
NULL2_SYMBOL: '\\N';
PARAM_MARKER: '?';
fragment A: [aA];
fragment B: [bB];
fragment C: [cC];
fragment D: [dD];
fragment E: [eE];
fragment F: [fF];
fragment G: [gG];
fragment H: [hH];
fragment I: [iI];
fragment J: [jJ];
fragment K: [kK];
fragment L: [lL];
fragment M: [mM];
fragment N: [nN];
fragment O: [oO];
fragment P: [pP];
fragment Q: [qQ];
fragment R: [rR];
fragment S: [sS];
fragment T: [tT];
fragment U: [uU];
fragment V: [vV];
fragment W: [wW];
fragment X: [xX];
fragment Y: [yY];
fragment Z: [zZ];
fragment DIGIT: [0-9];
fragment DIGITS: DIGIT+;
fragment HEXDIGIT: [0-9a-fA-F];
// Only lower case 'x' and 'b' count for hex + bin numbers. Otherwise it's an identifier.
HEX_NUMBER: ('0x' HEXDIGIT+) | ('x\'' HEXDIGIT+ '\'')| ('X\'' HEXDIGIT+ '\'');
BIN_NUMBER: ('0b' [01]+) | ('b\'' [01]+ '\'')| ('B\'' [01]+ '\'');
INT_NUMBER: DIGITS { l.SetType(l.DetermineNumericType(l.GetText())); };
// Float types must be handled first or the DOT_IDENTIIFER rule will make them to identifiers
// (if there is no leading digit before the dot).
DECIMAL_NUMBER: DIGITS? DOT_SYMBOL DIGITS;
// Examples:
// 1.2e-3
// 1e+10
// .3e-4
// 1.e+5
FLOAT_NUMBER: ((DIGITS? DOT_SYMBOL)? DIGITS | DIGITS DOT_SYMBOL) [eE] (MINUS_OPERATOR | PLUS_OPERATOR)? DIGITS;
// Special rule that should also match all keywords if they are directly preceded by a dot.
// Hence it's defined before all keywords.
// Here we make use of the ability in our base lexer to emit multiple tokens with a single rule.
DOT_IDENTIFIER:
DOT_SYMBOL LETTER_WHEN_UNQUOTED_NO_DIGIT LETTER_WHEN_UNQUOTED* { l.EmitDot(); } -> type(IDENTIFIER)
;
/*
The following comment is from the server grammar and gives some information about the source of tokens.
Additionally there is a section describing how to handle tokens there, which does not apply to this ANTLR grammar.
MAINTAINER:
1) Comments for TOKENS.
For each token, please include in the same line a comment that contains
one of the following tags:
SQL-2015-R : Reserved keyword as per SQL-2015 draft
SQL-2003-R : Reserved keyword as per SQL-2003
SQL-2003-N : Non Reserved keyword as per SQL-2003
SQL-1999-R : Reserved keyword as per SQL-1999
SQL-1999-N : Non Reserved keyword as per SQL-1999
MYSQL : MySQL extension (unspecified)
MYSQL-FUNC : MySQL extension, function
INTERNAL : Not a real token, lex optimization
OPERATOR : SQL operator
FUTURE-USE : Reserved for futur use
This makes the code grep-able, and helps maintenance.
2) About token values
Token values are assigned by bison, in order of declaration.
Token values are used in query DIGESTS.
To make DIGESTS stable, it is desirable to avoid changing token values.
In practice, this means adding new tokens at the end of the list,
in the current release section (8.0),
instead of adding them in the middle of the list.
Failing to comply with instructions below will trigger build failure,
as this process is enforced by gen_lex_token.
3) Instructions to add a new token:
Add the new token at the end of the list,
in the MySQL 8.0 section.
4) Instructions to remove an old token:
Do not remove the token, rename it as follows:
%token OBSOLETE_TOKEN_<NNN> / * was: TOKEN_FOO * /
where NNN is the token value (found in sql_yacc.h)
For example, see OBSOLETE_TOKEN_820
*/
/*
Tokens from MySQL 5.7, keep in alphabetical order.
*/
// $antlr-format groupedAlignments off, alignTrailers on
//ABORT_SYMBOL: 'ABORT'; // INTERNAL (used in lex)
ACCESSIBLE_SYMBOL: A C C E S S I B L E;
ACCOUNT_SYMBOL: A C C O U N T ;
ACTION_SYMBOL: A C T I O N; // SQL-2003-N
ADD_SYMBOL: A D D; // SQL-2003-R
ADDDATE_SYMBOL: A D D D A T E { l.SetType(l.DetermineFunction(MySQLLexerADDDATE_SYMBOL)); }; // MYSQL-FUNC
AFTER_SYMBOL: A F T E R; // SQL-2003-N
AGAINST_SYMBOL: A G A I N S T;
AGGREGATE_SYMBOL: A G G R E G A T E;
ALGORITHM_SYMBOL: A L G O R I T H M;
ALL_SYMBOL: A L L; // SQL-2003-R
ALTER_SYMBOL: A L T E R; // SQL-2003-R
ALWAYS_SYMBOL: A L W A Y S ;
ANALYSE_SYMBOL: A N A L Y S E ;
ANALYZE_SYMBOL: A N A L Y Z E;
AND_SYMBOL: A N D; // SQL-2003-R
ANY_SYMBOL: A N Y; // SQL-2003-R
AS_SYMBOL: A S; // SQL-2003-R
ASC_SYMBOL: A S C; // SQL-2003-N
ASCII_SYMBOL: A S C I I; // MYSQL-FUNC
ASENSITIVE_SYMBOL: A S E N S I T I V E; // FUTURE-USE
AT_SYMBOL: A T;
AUTHORS_SYMBOL: A U T H O R S ;
AUTOEXTEND_SIZE_SYMBOL: A U T O E X T E N D '_' S I Z E;
AUTO_INCREMENT_SYMBOL: A U T O '_' I N C R E M E N T;
AVG_ROW_LENGTH_SYMBOL: A V G '_' R O W '_' L E N G T H;
AVG_SYMBOL: A V G; // SQL-2003-N
BACKUP_SYMBOL: B A C K U P;
BEFORE_SYMBOL: B E F O R E; // SQL-2003-N
BEGIN_SYMBOL: B E G I N; // SQL-2003-R
BETWEEN_SYMBOL: B E T W E E N; // SQL-2003-R
BIGINT_SYMBOL: B I G I N T; // SQL-2003-R
BINARY_SYMBOL: B I N A R Y; // SQL-2003-R
BINLOG_SYMBOL: B I N L O G;
BIN_NUM_SYMBOL: B I N '_' N U M;
BIT_AND_SYMBOL: B I T '_' A N D { l.SetType(l.DetermineFunction(MySQLLexerBIT_AND_SYMBOL)); }; // MYSQL-FUNC
BIT_OR_SYMBOL: B I T '_' O R { l.SetType(l.DetermineFunction(MySQLLexerBIT_OR_SYMBOL)); }; // MYSQL-FUNC
BIT_SYMBOL: B I T; // MYSQL-FUNC
BIT_XOR_SYMBOL: B I T '_' X O R { l.SetType(l.DetermineFunction(MySQLLexerBIT_XOR_SYMBOL)); }; // MYSQL-FUNC
BLOB_SYMBOL: B L O B; // SQL-2003-R
BLOCK_SYMBOL: B L O C K;
BOOLEAN_SYMBOL: B O O L E A N; // SQL-2003-R
BOOL_SYMBOL: B O O L;
BOTH_SYMBOL: B O T H; // SQL-2003-R
BTREE_SYMBOL: B T R E E;
BY_SYMBOL: B Y; // SQL-2003-R
BYTE_SYMBOL: B Y T E;
CACHE_SYMBOL: C A C H E;
CALL_SYMBOL: C A L L; // SQL-2003-R
CASCADE_SYMBOL: C A S C A D E; // SQL-2003-N
CASCADED_SYMBOL: C A S C A D E D; // SQL-2003-R
CASE_SYMBOL: C A S E; // SQL-2003-R
CAST_SYMBOL: C A S T { l.SetType(l.DetermineFunction(MySQLLexerCAST_SYMBOL)); }; // SQL-2003-R
CATALOG_NAME_SYMBOL: C A T A L O G '_' N A M E; // SQL-2003-N
CHAIN_SYMBOL: C H A I N; // SQL-2003-N
CHANGE_SYMBOL: C H A N G E;
CHANGED_SYMBOL: C H A N G E D;
CHANNEL_SYMBOL: C H A N N E L ;
CHARSET_SYMBOL: C H A R S E T;
CHARACTER_SYMBOL: C H A R A C T E R -> type(CHAR_SYMBOL); // Synonym
CHAR_SYMBOL: C H A R; // SQL-2003-R
CHECKSUM_SYMBOL: C H E C K S U M;
CHECK_SYMBOL: C H E C K; // SQL-2003-R
CIPHER_SYMBOL: C I P H E R;
CLASS_ORIGIN_SYMBOL: C L A S S '_' O R I G I N; // SQL-2003-N
CLIENT_SYMBOL: C L I E N T;
CLOSE_SYMBOL: C L O S E; // SQL-2003-R
COALESCE_SYMBOL: C O A L E S C E; // SQL-2003-N
CODE_SYMBOL: C O D E;
COLLATE_SYMBOL: C O L L A T E; // SQL-2003-R
COLLATION_SYMBOL: C O L L A T I O N; // SQL-2003-N
COLUMNS_SYMBOL: C O L U M N S;
COLUMN_SYMBOL: C O L U M N; // SQL-2003-R
COLUMN_NAME_SYMBOL: C O L U M N '_' N A M E; // SQL-2003-N
COLUMN_FORMAT_SYMBOL: C O L U M N '_' F O R M A T;
COMMENT_SYMBOL: C O M M E N T;
COMMITTED_SYMBOL: C O M M I T T E D; // SQL-2003-N
COMMIT_SYMBOL: C O M M I T; // SQL-2003-R
COMPACT_SYMBOL: C O M P A C T;
COMPLETION_SYMBOL: C O M P L E T I O N;
COMPRESSED_SYMBOL: C O M P R E S S E D;
COMPRESSION_SYMBOL: C O M P R E S S I O N ;
CONCURRENT_SYMBOL: C O N C U R R E N T;
CONDITION_SYMBOL: C O N D I T I O N; // SQL-2003-R, SQL-2008-R
CONNECTION_SYMBOL: C O N N E C T I O N;
CONSISTENT_SYMBOL: C O N S I S T E N T;
CONSTRAINT_SYMBOL: C O N S T R A I N T; // SQL-2003-R
CONSTRAINT_CATALOG_SYMBOL: C O N S T R A I N T '_' C A T A L O G; // SQL-2003-N
CONSTRAINT_NAME_SYMBOL: C O N S T R A I N T '_' N A M E; // SQL-2003-N
CONSTRAINT_SCHEMA_SYMBOL: C O N S T R A I N T '_' S C H E M A; // SQL-2003-N
CONTAINS_SYMBOL: C O N T A I N S; // SQL-2003-N
CONTEXT_SYMBOL: C O N T E X T;
CONTINUE_SYMBOL: C O N T I N U E; // SQL-2003-R
CONTRIBUTORS_SYMBOL: C O N T R I B U T O R S ;
CONVERT_SYMBOL: C O N V E R T; // SQL-2003-N
COUNT_SYMBOL: C O U N T { l.SetType(l.DetermineFunction(MySQLLexerCOUNT_SYMBOL)); }; // SQL-2003-N
CPU_SYMBOL: C P U;
CREATE_SYMBOL: C R E A T E; // SQL-2003-R
CROSS_SYMBOL: C R O S S; // SQL-2003-R
CUBE_SYMBOL: C U B E; // SQL-2003-R
CURDATE_SYMBOL: C U R D A T E { l.SetType(l.DetermineFunction(MySQLLexerCURDATE_SYMBOL)); }; // MYSQL-FUNC
CURRENT_SYMBOL: C U R R E N T ;
CURRENT_DATE_SYMBOL:
C U R R E N T '_' D A T E { l.SetType(l.DetermineFunction(MySQLLexerCURDATE_SYMBOL)); }
; // Synonym, MYSQL-FUNC
CURRENT_TIME_SYMBOL:
C U R R E N T '_' T I M E { l.SetType(l.DetermineFunction(MySQLLexerCURTIME_SYMBOL)); }
; // Synonym, MYSQL-FUNC
CURRENT_TIMESTAMP_SYMBOL: C U R R E N T '_' T I M E S T A M P -> type(NOW_SYMBOL); // Synonym
CURRENT_USER_SYMBOL: C U R R E N T '_' U S E R; // SQL-2003-R
CURSOR_SYMBOL: C U R S O R; // SQL-2003-R
CURSOR_NAME_SYMBOL: C U R S O R '_' N A M E; // SQL-2003-N
CURTIME_SYMBOL: C U R T I M E { l.SetType(l.DetermineFunction(MySQLLexerCURTIME_SYMBOL)); }; // MYSQL-FUNC
DATABASE_SYMBOL: D A T A B A S E;
DATABASES_SYMBOL: D A T A B A S E S;
DATAFILE_SYMBOL: D A T A F I L E;
DATA_SYMBOL: D A T A; // SQL-2003-N
DATETIME_SYMBOL: D A T E T I M E; // MYSQL
DATE_ADD_SYMBOL: D A T E '_' A D D { l.SetType(l.DetermineFunction(MySQLLexerDATE_ADD_SYMBOL)); };
DATE_SUB_SYMBOL: D A T E '_' S U B { l.SetType(l.DetermineFunction(MySQLLexerDATE_SUB_SYMBOL)); };
DATE_SYMBOL: D A T E; // SQL-2003-R
DAYOFMONTH_SYMBOL: D A Y O F M O N T H -> type(DAY_SYMBOL); // Synonym
DAY_HOUR_SYMBOL: D A Y '_' H O U R;
DAY_MICROSECOND_SYMBOL: D A Y '_' M I C R O S E C O N D;
DAY_MINUTE_SYMBOL: D A Y '_' M I N U T E;
DAY_SECOND_SYMBOL: D A Y '_' S E C O N D;
DAY_SYMBOL: D A Y; // SQL-2003-R
DEALLOCATE_SYMBOL: D E A L L O C A T E; // SQL-2003-R
DEC_SYMBOL: D E C -> type(DECIMAL_SYMBOL); // Synonym
DECIMAL_NUM_SYMBOL: D E C I M A L '_' N U M;
DECIMAL_SYMBOL: D E C I M A L; // SQL-2003-R
DECLARE_SYMBOL: D E C L A R E; // SQL-2003-R
DEFAULT_SYMBOL: D E F A U L T; // SQL-2003-R
DEFAULT_AUTH_SYMBOL: D E F A U L T '_' A U T H ;
DEFINER_SYMBOL: D E F I N E R;
DELAYED_SYMBOL: D E L A Y E D;
DELAY_KEY_WRITE_SYMBOL: D E L A Y '_' K E Y '_' W R I T E;
DELETE_SYMBOL: D E L E T E; // SQL-2003-R
DESC_SYMBOL: D E S C; // SQL-2003-N
DESCRIBE_SYMBOL: D E S C R I B E; // SQL-2003-R
DES_KEY_FILE_SYMBOL: D E S '_' K E Y '_' F I L E ;
DETERMINISTIC_SYMBOL: D E T E R M I N I S T I C; // SQL-2003-R
DIAGNOSTICS_SYMBOL: D I A G N O S T I C S;
DIRECTORY_SYMBOL: D I R E C T O R Y;
DISABLE_SYMBOL: D I S A B L E;
DISCARD_SYMBOL: D I S C A R D;
DISK_SYMBOL: D I S K;
DISTINCT_SYMBOL: D I S T I N C T; // SQL-2003-R
DISTINCTROW_SYMBOL: D I S T I N C T R O W -> type(DISTINCT_SYMBOL); // Synonym
DIV_SYMBOL: D I V;
DOUBLE_SYMBOL: D O U B L E; // SQL-2003-R
DO_SYMBOL: D O;
DROP_SYMBOL: D R O P; // SQL-2003-R
DUAL_SYMBOL: D U A L;
DUMPFILE_SYMBOL: D U M P F I L E;
DUPLICATE_SYMBOL: D U P L I C A T E;
DYNAMIC_SYMBOL: D Y N A M I C; // SQL-2003-R
EACH_SYMBOL: E A C H; // SQL-2003-R
ELSE_SYMBOL: E L S E; // SQL-2003-R
ELSEIF_SYMBOL: E L S E I F;
ENABLE_SYMBOL: E N A B L E;
ENCLOSED_SYMBOL: E N C L O S E D;
ENCRYPTION_SYMBOL: E N C R Y P T I O N ;
END_SYMBOL: E N D; // SQL-2003-R
ENDS_SYMBOL: E N D S;
END_OF_INPUT_SYMBOL: E N D '_' O F '_' I N P U T; // INTERNAL
ENGINES_SYMBOL: E N G I N E S;
ENGINE_SYMBOL: E N G I N E;
ENUM_SYMBOL: E N U M; // MYSQL
ERROR_SYMBOL: E R R O R;
ERRORS_SYMBOL: E R R O R S;
ESCAPED_SYMBOL: E S C A P E D;
ESCAPE_SYMBOL: E S C A P E; // SQL-2003-R
EVENTS_SYMBOL: E V E N T S;
EVENT_SYMBOL: E V E N T;
EVERY_SYMBOL: E V E R Y; // SQL-2003-N
EXCHANGE_SYMBOL: E X C H A N G E;
EXECUTE_SYMBOL: E X E C U T E; // SQL-2003-R
EXISTS_SYMBOL: E X I S T S; // SQL-2003-R
EXIT_SYMBOL: E X I T;
EXPANSION_SYMBOL: E X P A N S I O N;
EXPIRE_SYMBOL: E X P I R E ;
EXPLAIN_SYMBOL: E X P L A I N; // SQL-2003-R
EXPORT_SYMBOL: E X P O R T ;
EXTENDED_SYMBOL: E X T E N D E D;
EXTENT_SIZE_SYMBOL: E X T E N T '_' S I Z E;
EXTRACT_SYMBOL: E X T R A C T { l.SetType(l.DetermineFunction(MySQLLexerEXTRACT_SYMBOL)); }; // SQL-2003-N
FALSE_SYMBOL: F A L S E; // SQL-2003-R
FAST_SYMBOL: F A S T;
FAULTS_SYMBOL: F A U L T S;
FETCH_SYMBOL: F E T C H; // SQL-2003-R
FIELDS_SYMBOL: F I E L D S -> type(COLUMNS_SYMBOL); // Synonym
FILE_SYMBOL: F I L E;
FILE_BLOCK_SIZE_SYMBOL: F I L E '_' B L O C K '_' S I Z E ;
FILTER_SYMBOL: F I L T E R ;
FIRST_SYMBOL: F I R S T; // SQL-2003-N
FIXED_SYMBOL: F I X E D;
FLOAT4_SYMBOL: F L O A T '4' -> type(FLOAT_SYMBOL); // Synonym
FLOAT8_SYMBOL: F L O A T '8' -> type(DOUBLE_SYMBOL); // Synonym
FLOAT_SYMBOL: F L O A T; // SQL-2003-R
FLUSH_SYMBOL: F L U S H;
FOLLOWS_SYMBOL: F O L L O W S ;
FORCE_SYMBOL: F O R C E;
FOREIGN_SYMBOL: F O R E I G N; // SQL-2003-R
FOR_SYMBOL: F O R; // SQL-2003-R
FORMAT_SYMBOL: F O R M A T;
FOUND_SYMBOL: F O U N D; // SQL-2003-R
FROM_SYMBOL: F R O M;
FULL_SYMBOL: F U L L; // SQL-2003-R
FULLTEXT_SYMBOL: F U L L T E X T;
FUNCTION_SYMBOL: F U N C T I O N; // SQL-2003-R
GET_SYMBOL: G E T ;
GENERAL_SYMBOL: G E N E R A L;
GENERATED_SYMBOL: G E N E R A T E D ;
GROUP_REPLICATION_SYMBOL: G R O U P '_' R E P L I C A T I O N ;
GEOMETRYCOLLECTION_SYMBOL: G E O M E T R Y C O L L E C T I O N; // MYSQL
GEOMETRY_SYMBOL: G E O M E T R Y;
GET_FORMAT_SYMBOL: G E T '_' F O R M A T; // MYSQL-FUNC
GLOBAL_SYMBOL: G L O B A L; // SQL-2003-R
GRANT_SYMBOL: G R A N T; // SQL-2003-R
GRANTS_SYMBOL: G R A N T S;
GROUP_SYMBOL: G R O U P; // SQL-2003-R
GROUP_CONCAT_SYMBOL:
G R O U P '_' C O N C A T { l.SetType(l.DetermineFunction(MySQLLexerGROUP_CONCAT_SYMBOL)); }
;
HANDLER_SYMBOL: H A N D L E R;
HASH_SYMBOL: H A S H;
HAVING_SYMBOL: H A V I N G; // SQL-2003-R
HELP_SYMBOL: H E L P;
HIGH_PRIORITY_SYMBOL: H I G H '_' P R I O R I T Y;
HOST_SYMBOL: H O S T;
HOSTS_SYMBOL: H O S T S;
HOUR_MICROSECOND_SYMBOL: H O U R '_' M I C R O S E C O N D;
HOUR_MINUTE_SYMBOL: H O U R '_' M I N U T E;
HOUR_SECOND_SYMBOL: H O U R '_' S E C O N D;
HOUR_SYMBOL: H O U R; // SQL-2003-R
IDENTIFIED_SYMBOL: I D E N T I F I E D;
IF_SYMBOL: I F;
IGNORE_SYMBOL: I G N O R E;
IGNORE_SERVER_IDS_SYMBOL: I G N O R E '_' S E R V E R '_' I D S;
IMPORT_SYMBOL: I M P O R T;
INDEXES_SYMBOL: I N D E X E S;
INDEX_SYMBOL: I N D E X;
INFILE_SYMBOL: I N F I L E;
INITIAL_SIZE_SYMBOL: I N I T I A L '_' S I Z E;
INNER_SYMBOL: I N N E R; // SQL-2003-R
INOUT_SYMBOL: I N O U T; // SQL-2003-R
INSENSITIVE_SYMBOL: I N S E N S I T I V E; // SQL-2003-R
INSERT_SYMBOL: I N S E R T; // SQL-2003-R
INSERT_METHOD_SYMBOL: I N S E R T '_' M E T H O D;
INSTANCE_SYMBOL: I N S T A N C E ;
INSTALL_SYMBOL: I N S T A L L;
INTEGER_SYMBOL: I N T E G E R -> type(INT_SYMBOL); // Synonym
INTERVAL_SYMBOL: I N T E R V A L; // SQL-2003-R
INTO_SYMBOL: I N T O; // SQL-2003-R
INT_SYMBOL: I N T; // SQL-2003-R
INVOKER_SYMBOL: I N V O K E R;
IN_SYMBOL: I N; // SQL-2003-R
IO_AFTER_GTIDS_SYMBOL: I O '_' A F T E R '_' G T I D S; // MYSQL, FUTURE-USE
IO_BEFORE_GTIDS_SYMBOL: I O '_' B E F O R E '_' G T I D S; // MYSQL, FUTURE-USE
IO_THREAD_SYMBOL: I O '_' T H R E A D -> type(RELAY_THREAD_SYMBOL); // Synonym
IO_SYMBOL: I O;
IPC_SYMBOL: I P C;
IS_SYMBOL: I S; // SQL-2003-R
ISOLATION_SYMBOL: I S O L A T I O N; // SQL-2003-R
ISSUER_SYMBOL: I S S U E R;
ITERATE_SYMBOL: I T E R A T E;
JOIN_SYMBOL: J O I N; // SQL-2003-R
JSON_SYMBOL: J S O N ;
KEYS_SYMBOL: K E Y S;
KEY_BLOCK_SIZE_SYMBOL: K E Y '_' B L O C K '_' S I Z E;
KEY_SYMBOL: K E Y; // SQL-2003-N
KILL_SYMBOL: K I L L;
LANGUAGE_SYMBOL: L A N G U A G E; // SQL-2003-R
LAST_SYMBOL: L A S T; // SQL-2003-N
LEADING_SYMBOL: L E A D I N G; // SQL-2003-R
LEAVES_SYMBOL: L E A V E S;
LEAVE_SYMBOL: L E A V E;
LEFT_SYMBOL: L E F T; // SQL-2003-R
LESS_SYMBOL: L E S S;
LEVEL_SYMBOL: L E V E L;
LIKE_SYMBOL: L I K E; // SQL-2003-R
LIMIT_SYMBOL: L I M I T;
LINEAR_SYMBOL: L I N E A R;
LINES_SYMBOL: L I N E S;
LINESTRING_SYMBOL: L I N E S T R I N G; // MYSQL
LIST_SYMBOL: L I S T;
LOAD_SYMBOL: L O A D;
LOCALTIME_SYMBOL: L O C A L T I M E -> type(NOW_SYMBOL); // Synonym
LOCALTIMESTAMP_SYMBOL: L O C A L T I M E S T A M P -> type(NOW_SYMBOL); // Synonym
LOCAL_SYMBOL: L O C A L; // SQL-2003-R
LOCATOR_SYMBOL: L O C A T O R; // SQL-2003-N
LOCKS_SYMBOL: L O C K S;
LOCK_SYMBOL: L O C K;
LOGFILE_SYMBOL: L O G F I L E;
LOGS_SYMBOL: L O G S;
LONGBLOB_SYMBOL: L O N G B L O B; // MYSQL
LONGTEXT_SYMBOL: L O N G T E X T; // MYSQL
LONG_NUM_SYMBOL: L O N G '_' N U M;
LONG_SYMBOL: L O N G;
LOOP_SYMBOL: L O O P;
LOW_PRIORITY_SYMBOL: L O W '_' P R I O R I T Y;
MASTER_AUTO_POSITION_SYMBOL: M A S T E R '_' A U T O '_' P O S I T I O N ;
MASTER_BIND_SYMBOL: M A S T E R '_' B I N D ;
MASTER_CONNECT_RETRY_SYMBOL: M A S T E R '_' C O N N E C T '_' R E T R Y;
MASTER_DELAY_SYMBOL: M A S T E R '_' D E L A Y;
MASTER_HOST_SYMBOL: M A S T E R '_' H O S T;
MASTER_LOG_FILE_SYMBOL: M A S T E R '_' L O G '_' F I L E;
MASTER_LOG_POS_SYMBOL: M A S T E R '_' L O G '_' P O S;
MASTER_PASSWORD_SYMBOL: M A S T E R '_' P A S S W O R D;
MASTER_PORT_SYMBOL: M A S T E R '_' P O R T;
MASTER_RETRY_COUNT_SYMBOL: M A S T E R '_' R E T R Y '_' C O U N T ;
MASTER_SERVER_ID_SYMBOL: M A S T E R '_' S E R V E R '_' I D;
MASTER_SSL_CAPATH_SYMBOL: M A S T E R '_' S S L '_' C A P A T H;
MASTER_SSL_CA_SYMBOL: M A S T E R '_' S S L '_' C A;
MASTER_SSL_CERT_SYMBOL: M A S T E R '_' S S L '_' C E R T;
MASTER_SSL_CIPHER_SYMBOL: M A S T E R '_' S S L '_' C I P H E R;
MASTER_SSL_CRL_SYMBOL: M A S T E R '_' S S L '_' C R L ;
MASTER_SSL_CRLPATH_SYMBOL: M A S T E R '_' S S L '_' C R L P A T H ;
MASTER_SSL_KEY_SYMBOL: M A S T E R '_' S S L '_' K E Y;
MASTER_SSL_SYMBOL: M A S T E R '_' S S L;
MASTER_SSL_VERIFY_SERVER_CERT_SYMBOL:
M A S T E R '_' S S L '_' V E R I F Y '_' S E R V E R '_' C E R T?
;
MASTER_SYMBOL: M A S T E R;
MASTER_TLS_VERSION_SYMBOL: M A S T E R '_' T L S '_' V E R S I O N ;
MASTER_USER_SYMBOL: M A S T E R '_' U S E R;
MASTER_HEARTBEAT_PERIOD_SYMBOL: M A S T E R '_' H E A R T B E A T '_' P E R I O D?;
MATCH_SYMBOL: M A T C H; // SQL-2003-R
MAX_CONNECTIONS_PER_HOUR_SYMBOL: M A X '_' C O N N E C T I O N S '_' P E R '_' H O U R;
MAX_QUERIES_PER_HOUR_SYMBOL: M A X '_' Q U E R I E S '_' P E R '_' H O U R;
MAX_ROWS_SYMBOL: M A X '_' R O W S;
MAX_SIZE_SYMBOL: M A X '_' S I Z E;
MAX_STATEMENT_TIME_SYMBOL:
M A X '_' S T A T E M E N T '_' T I M E
;
MAX_SYMBOL: M A X { l.SetType(l.DetermineFunction(MySQLLexerMAX_SYMBOL)); }; // SQL-2003-N
MAX_UPDATES_PER_HOUR_SYMBOL: M A X '_' U P D A T E S '_' P E R '_' H O U R;
MAX_USER_CONNECTIONS_SYMBOL: M A X '_' U S E R '_' C O N N E C T I O N S;
MAXVALUE_SYMBOL: M A X V A L U E; // SQL-2003-N
MEDIUMBLOB_SYMBOL: M E D I U M B L O B; // MYSQL
MEDIUMINT_SYMBOL: M E D I U M I N T; // MYSQL
MEDIUMTEXT_SYMBOL: M E D I U M T E X T; // MYSQL
MEDIUM_SYMBOL: M E D I U M;
MEMORY_SYMBOL: M E M O R Y;
MERGE_SYMBOL: M E R G E; // SQL-2003-R
MESSAGE_TEXT_SYMBOL: M E S S A G E '_' T E X T; // SQL-2003-N
MICROSECOND_SYMBOL: M I C R O S E C O N D; // MYSQL-FUNC
MID_SYMBOL: M I D { l.SetType(l.DetermineFunction(MySQLLexerSUBSTRING_SYMBOL)); }; // Synonym
MIDDLEINT_SYMBOL: M I D D L E I N T -> type(MEDIUMINT_SYMBOL); // Synonym (for Powerbuilder)
MIGRATE_SYMBOL: M I G R A T E;
MINUTE_MICROSECOND_SYMBOL: M I N U T E '_' M I C R O S E C O N D;
MINUTE_SECOND_SYMBOL: M I N U T E '_' S E C O N D;
MINUTE_SYMBOL: M I N U T E; // SQL-2003-R
MIN_ROWS_SYMBOL: M I N '_' R O W S;
MIN_SYMBOL: M I N { l.SetType(l.DetermineFunction(MySQLLexerMIN_SYMBOL)); }; // SQL-2003-N
MODE_SYMBOL: M O D E;
MODIFIES_SYMBOL: M O D I F I E S; // SQL-2003-R
MODIFY_SYMBOL: M O D I F Y;
MOD_SYMBOL: M O D; // SQL-2003-N
MONTH_SYMBOL: M O N T H; // SQL-2003-R
MULTILINESTRING_SYMBOL: M U L T I L I N E S T R I N G; // MYSQL
MULTIPOINT_SYMBOL: M U L T I P O I N T; // MYSQL
MULTIPOLYGON_SYMBOL: M U L T I P O L Y G O N; // MYSQL
MUTEX_SYMBOL: M U T E X;
MYSQL_ERRNO_SYMBOL: M Y S Q L '_' E R R N O;
NAMES_SYMBOL: N A M E S; // SQL-2003-N
NAME_SYMBOL: N A M E; // SQL-2003-N
NATIONAL_SYMBOL: N A T I O N A L; // SQL-2003-R
NATURAL_SYMBOL: N A T U R A L; // SQL-2003-R
NCHAR_STRING_SYMBOL: N C H A R '_' S T R I N G;
NCHAR_SYMBOL: N C H A R; // SQL-2003-R
NDB_SYMBOL: N D B -> type(NDBCLUSTER_SYMBOL); //Synonym
NDBCLUSTER_SYMBOL: N D B C L U S T E R;
NEG_SYMBOL: N E G;
NEVER_SYMBOL: N E V E R ;
NEW_SYMBOL: N E W; // SQL-2003-R
NEXT_SYMBOL: N E X T; // SQL-2003-N
NODEGROUP_SYMBOL: N O D E G R O U P;
NONE_SYMBOL: N O N E; // SQL-2003-R
NONBLOCKING_SYMBOL: N O N B L O C K I N G ;
NOT_SYMBOL:
N O T
; // SQL-2003-R
NOW_SYMBOL: N O W { l.SetType(l.DetermineFunction(MySQLLexerNOW_SYMBOL)); };
NO_SYMBOL: N O; // SQL-2003-R
NO_WAIT_SYMBOL: N O '_' W A I T;
NO_WRITE_TO_BINLOG_SYMBOL: N O '_' W R I T E '_' T O '_' B I N L O G;
NULL_SYMBOL: N U L L; // SQL-2003-R
NUMBER_SYMBOL: N U M B E R ;
NUMERIC_SYMBOL: N U M E R I C; // SQL-2003-R
NVARCHAR_SYMBOL: N V A R C H A R;
OFFLINE_SYMBOL: O F F L I N E;
OFFSET_SYMBOL: O F F S E T;
OLD_PASSWORD_SYMBOL: O L D '_' P A S S W O R D ;
ON_SYMBOL: O N; // SQL-2003-R
ONE_SYMBOL: O N E;
ONLINE_SYMBOL: O N L I N E;
ONLY_SYMBOL: O N L Y ;
OPEN_SYMBOL: O P E N; // SQL-2003-R
OPTIMIZE_SYMBOL: O P T I M I Z E;
OPTIMIZER_COSTS_SYMBOL: O P T I M I Z E R '_' C O S T S ;
OPTIONS_SYMBOL: O P T I O N S;
OPTION_SYMBOL: O P T I O N; // SQL-2003-N
OPTIONALLY_SYMBOL: O P T I O N A L L Y;
ORDER_SYMBOL: O R D E R; // SQL-2003-R
OR_SYMBOL: O R; // SQL-2003-R
OUTER_SYMBOL: O U T E R;
OUTFILE_SYMBOL: O U T F I L E;
OUT_SYMBOL: O U T; // SQL-2003-R
OWNER_SYMBOL: O W N E R;
PACK_KEYS_SYMBOL: P A C K '_' K E Y S;
PAGE_SYMBOL: P A G E;
PARSER_SYMBOL: P A R S E R;
PARTIAL_SYMBOL: P A R T I A L; // SQL-2003-N
PARTITIONING_SYMBOL: P A R T I T I O N I N G;
PARTITIONS_SYMBOL: P A R T I T I O N S;
PARTITION_SYMBOL: P A R T I T I O N; // SQL-2003-R
PASSWORD_SYMBOL: P A S S W O R D;
PHASE_SYMBOL: P H A S E;
PLUGINS_SYMBOL: P L U G I N S;
PLUGIN_DIR_SYMBOL: P L U G I N '_' D I R ; // Internal
PLUGIN_SYMBOL: P L U G I N;
POINT_SYMBOL: P O I N T;
POLYGON_SYMBOL: P O L Y G O N; // MYSQL
PORT_SYMBOL: P O R T;
POSITION_SYMBOL: P O S I T I O N { l.SetType(l.DetermineFunction(MySQLLexerPOSITION_SYMBOL)); }; // SQL-2003-N
PRECEDES_SYMBOL: P R E C E D E S ;
PRECISION_SYMBOL: P R E C I S I O N; // SQL-2003-R
PREPARE_SYMBOL: P R E P A R E; // SQL-2003-R
PRESERVE_SYMBOL: P R E S E R V E;
PREV_SYMBOL: P R E V;
PRIMARY_SYMBOL: P R I M A R Y; // SQL-2003-R
PRIVILEGES_SYMBOL: P R I V I L E G E S; // SQL-2003-N
PROCEDURE_SYMBOL: P R O C E D U R E; // SQL-2003-R
PROCESS_SYMBOL: P R O C E S S;
PROCESSLIST_SYMBOL: P R O C E S S L I S T;
PROFILE_SYMBOL: P R O F I L E;
PROFILES_SYMBOL: P R O F I L E S;
PROXY_SYMBOL: P R O X Y;
PURGE_SYMBOL: P U R G E;
QUARTER_SYMBOL: Q U A R T E R;
QUERY_SYMBOL: Q U E R Y;
QUICK_SYMBOL: Q U I C K;
RANGE_SYMBOL: R A N G E; // SQL-2003-R
READS_SYMBOL: R E A D S; // SQL-2003-R
READ_ONLY_SYMBOL: R E A D '_' O N L Y;
READ_SYMBOL: R E A D; // SQL-2003-N
READ_WRITE_SYMBOL: R E A D '_' W R I T E;
REAL_SYMBOL: R E A L; // SQL-2003-R
REBUILD_SYMBOL: R E B U I L D;
RECOVER_SYMBOL: R E C O V E R;
REDOFILE_SYMBOL: R E D O F I L E ;
REDO_BUFFER_SIZE_SYMBOL: R E D O '_' B U F F E R '_' S I Z E;
REDUNDANT_SYMBOL: R E D U N D A N T;
REFERENCES_SYMBOL: R E F E R E N C E S; // SQL-2003-R
REGEXP_SYMBOL: R E G E X P;
RELAY_SYMBOL: R E L A Y;
RELAYLOG_SYMBOL: R E L A Y L O G;
RELAY_LOG_FILE_SYMBOL: R E L A Y '_' L O G '_' F I L E;
RELAY_LOG_POS_SYMBOL: R E L A Y '_' L O G '_' P O S;
RELAY_THREAD_SYMBOL: R E L A Y '_' T H R E A D;
RELEASE_SYMBOL: R E L E A S E; // SQL-2003-R
RELOAD_SYMBOL: R E L O A D;
REMOVE_SYMBOL: R E M O V E;
RENAME_SYMBOL: R E N A M E;
REORGANIZE_SYMBOL: R E O R G A N I Z E;
REPAIR_SYMBOL: R E P A I R;
REPEATABLE_SYMBOL: R E P E A T A B L E; // SQL-2003-N
REPEAT_SYMBOL: R E P E A T; // MYSQL-FUNC
REPLACE_SYMBOL: R E P L A C E; // MYSQL-FUNC
REPLICATION_SYMBOL: R E P L I C A T I O N;
REPLICATE_DO_DB_SYMBOL: R E P L I C A T E '_' D O '_' D B ;
REPLICATE_IGNORE_DB_SYMBOL: R E P L I C A T E '_' I G N O R E '_' D B ;
REPLICATE_DO_TABLE_SYMBOL: R E P L I C A T E '_' D O '_' T A B L E ;
REPLICATE_IGNORE_TABLE_SYMBOL:
R E P L I C A T E '_' I G N O R E '_' T A B L E
;
REPLICATE_WILD_DO_TABLE_SYMBOL:
R E P L I C A T E '_' W I L D '_' D O '_' T A B L E
;
REPLICATE_WILD_IGNORE_TABLE_SYMBOL:
R E P L I C A T E '_' W I L D '_' I G N O R E '_' T A B L E
;
REPLICATE_REWRITE_DB_SYMBOL: R E P L I C A T E '_' R E W R I T E '_' D B ;
REQUIRE_SYMBOL: R E Q U I R E;
RESET_SYMBOL: R E S E T;
RESIGNAL_SYMBOL: R E S I G N A L; // SQL-2003-R
RESTORE_SYMBOL: R E S T O R E;
RESTRICT_SYMBOL: R E S T R I C T;
RESUME_SYMBOL: R E S U M E;
RETURNED_SQLSTATE_SYMBOL: R E T U R N E D '_' S Q L S T A T E;
RETURNS_SYMBOL: R E T U R N S; // SQL-2003-R
RETURN_SYMBOL: R E T U R N?; // SQL-2003-R
REVERSE_SYMBOL: R E V E R S E;
REVOKE_SYMBOL: R E V O K E; // SQL-2003-R
RIGHT_SYMBOL: R I G H T; // SQL-2003-R
RLIKE_SYMBOL: R L I K E -> type(REGEXP_SYMBOL); // Synonym (like in mSQL2)
ROLLBACK_SYMBOL: R O L L B A C K; // SQL-2003-R
ROLLUP_SYMBOL: R O L L U P; // SQL-2003-R
ROTATE_SYMBOL: R O T A T E ;
ROUTINE_SYMBOL: R O U T I N E; // SQL-2003-N
ROWS_SYMBOL: R O W S; // SQL-2003-R
ROW_COUNT_SYMBOL: R O W '_' C O U N T;
ROW_FORMAT_SYMBOL: R O W '_' F O R M A T;
ROW_SYMBOL: R O W; // SQL-2003-R
RTREE_SYMBOL: R T R E E;
SAVEPOINT_SYMBOL: S A V E P O I N T; // SQL-2003-R
SCHEDULE_SYMBOL: S C H E D U L E;
SCHEMA_SYMBOL: S C H E M A -> type(DATABASE_SYMBOL); // Synonym
SCHEMA_NAME_SYMBOL: S C H E M A '_' N A M E; // SQL-2003-N
SCHEMAS_SYMBOL: S C H E M A S -> type(DATABASES_SYMBOL); // Synonym
SECOND_MICROSECOND_SYMBOL: S E C O N D '_' M I C R O S E C O N D;
SECOND_SYMBOL: S E C O N D; // SQL-2003-R
SECURITY_SYMBOL: S E C U R I T Y; // SQL-2003-N
SELECT_SYMBOL: S E L E C T; // SQL-2003-R
SENSITIVE_SYMBOL: S E N S I T I V E; // FUTURE-USE
SEPARATOR_SYMBOL: S E P A R A T O R;
SERIALIZABLE_SYMBOL: S E R I A L I Z A B L E; // SQL-2003-N
SERIAL_SYMBOL: S E R I A L;
SESSION_SYMBOL: S E S S I O N; // SQL-2003-N
SERVER_SYMBOL: S E R V E R;
SERVER_OPTIONS_SYMBOL: S E R V E R '_' O P T I O N S;
SESSION_USER_SYMBOL:
S E S S I O N '_' U S E R { l.SetType(l.DetermineFunction(MySQLLexerUSER_SYMBOL)); }
; // Synonym
SET_SYMBOL: S E T; // SQL-2003-R
SET_VAR_SYMBOL: S E T '_' V A R;
SHARE_SYMBOL: S H A R E;
SHOW_SYMBOL: S H O W;
SHUTDOWN_SYMBOL: S H U T D O W N;
SIGNAL_SYMBOL: S I G N A L; // SQL-2003-R
SIGNED_SYMBOL: S I G N E D;
SIMPLE_SYMBOL: S I M P L E; // SQL-2003-N
SLAVE_SYMBOL: S L A V E;
SLOW_SYMBOL: S L O W;
SMALLINT_SYMBOL: S M A L L I N T; // SQL-2003-R
SNAPSHOT_SYMBOL: S N A P S H O T;
SOME_SYMBOL: S O M E -> type(ANY_SYMBOL); // Synonym
SOCKET_SYMBOL: S O C K E T;
SONAME_SYMBOL: S O N A M E;
SOUNDS_SYMBOL: S O U N D S;
SOURCE_SYMBOL: S O U R C E;
SPATIAL_SYMBOL: S P A T I A L;
SPECIFIC_SYMBOL: S P E C I F I C; // SQL-2003-R
SQLEXCEPTION_SYMBOL: S Q L E X C E P T I O N; // SQL-2003-R
SQLSTATE_SYMBOL: S Q L S T A T E; // SQL-2003-R
SQLWARNING_SYMBOL: S Q L W A R N I N G; // SQL-2003-R
SQL_AFTER_GTIDS_SYMBOL: S Q L '_' A F T E R '_' G T I D S; // MYSQL
SQL_AFTER_MTS_GAPS_SYMBOL:
S Q L '_' A F T E R '_' M T S '_' G A P S
; // MYSQL
SQL_BEFORE_GTIDS_SYMBOL: S Q L '_' B E F O R E '_' G T I D S; // MYSQL
SQL_BIG_RESULT_SYMBOL: S Q L '_' B I G '_' R E S U L T;
SQL_BUFFER_RESULT_SYMBOL: S Q L '_' B U F F E R '_' R E S U L T;
SQL_CACHE_SYMBOL: S Q L '_' C A C H E ;
SQL_CALC_FOUND_ROWS_SYMBOL: S Q L '_' C A L C '_' F O U N D '_' R O W S;
SQL_NO_CACHE_SYMBOL: S Q L '_' N O '_' C A C H E;
SQL_SMALL_RESULT_SYMBOL: S Q L '_' S M A L L '_' R E S U L T;
SQL_SYMBOL: S Q L; // SQL-2003-R
SQL_THREAD_SYMBOL: S Q L '_' T H R E A D;
SSL_SYMBOL: S S L;
STACKED_SYMBOL: S T A C K E D ;
STARTING_SYMBOL: S T A R T I N G;
STARTS_SYMBOL: S T A R T S;
START_SYMBOL: S T A R T; // SQL-2003-R
STATS_AUTO_RECALC_SYMBOL: S T A T S '_' A U T O '_' R E C A L C;
STATS_PERSISTENT_SYMBOL: S T A T S '_' P E R S I S T E N T;
STATS_SAMPLE_PAGES_SYMBOL: S T A T S '_' S A M P L E '_' P A G E S;
STATUS_SYMBOL: S T A T U S;
STDDEV_SAMP_SYMBOL:
S T D D E V '_' S A M P { l.SetType(l.DetermineFunction(MySQLLexerSTDDEV_SAMP_SYMBOL)); }
; // SQL-2003-N
STDDEV_SYMBOL: S T D D E V { l.SetType(l.DetermineFunction(MySQLLexerSTD_SYMBOL)); }; // Synonym
STDDEV_POP_SYMBOL: S T D D E V '_' P O P { l.SetType(l.DetermineFunction(MySQLLexerSTD_SYMBOL)); }; // Synonym
STD_SYMBOL: S T D { l.SetType(l.DetermineFunction(MySQLLexerSTD_SYMBOL)); };
STOP_SYMBOL: S T O P;
STORAGE_SYMBOL: S T O R A G E;
STORED_SYMBOL: S T O R E D ;
STRAIGHT_JOIN_SYMBOL: S T R A I G H T '_' J O I N;
STRING_SYMBOL: S T R I N G;
SUBCLASS_ORIGIN_SYMBOL: S U B C L A S S '_' O R I G I N; // SQL-2003-N
SUBDATE_SYMBOL: S U B D A T E { l.SetType(l.DetermineFunction(MySQLLexerSUBDATE_SYMBOL)); };
SUBJECT_SYMBOL: S U B J E C T;
SUBPARTITIONS_SYMBOL: S U B P A R T I T I O N S;
SUBPARTITION_SYMBOL: S U B P A R T I T I O N;
SUBSTR_SYMBOL: S U B S T R { l.SetType(l.DetermineFunction(MySQLLexerSUBSTRING_SYMBOL)); }; // Synonym
SUBSTRING_SYMBOL: S U B S T R I N G { l.SetType(l.DetermineFunction(MySQLLexerSUBSTRING_SYMBOL)); }; // SQL-2003-N
SUM_SYMBOL: S U M { l.SetType(l.DetermineFunction(MySQLLexerSUM_SYMBOL)); }; // SQL-2003-N
SUPER_SYMBOL: S U P E R;
SUSPEND_SYMBOL: S U S P E N D;
SWAPS_SYMBOL: S W A P S;
SWITCHES_SYMBOL: S W I T C H E S;
SYSDATE_SYMBOL: S Y S D A T E { l.SetType(l.DetermineFunction(MySQLLexerSYSDATE_SYMBOL)); };
SYSTEM_USER_SYMBOL: S Y S T E M '_' U S E R { l.SetType(l.DetermineFunction(MySQLLexerUSER_SYMBOL)); };
TABLES_SYMBOL: T A B L E S;
TABLESPACE_SYMBOL: T A B L E S P A C E;
TABLE_REF_PRIORITY_SYMBOL: T A B L E '_' R E F '_' P R I O R I T Y ;
TABLE_SYMBOL: T A B L E; // SQL-2003-R
TABLE_CHECKSUM_SYMBOL: T A B L E '_' C H E C K S U M;
TABLE_NAME_SYMBOL: T A B L E '_' N A M E; // SQL-2003-N
TEMPORARY_SYMBOL: T E M P O R A R Y; // SQL-2003-N
TEMPTABLE_SYMBOL: T E M P T A B L E;
TERMINATED_SYMBOL: T E R M I N A T E D;
TEXT_SYMBOL: T E X T;
THAN_SYMBOL: T H A N;
THEN_SYMBOL: T H E N; // SQL-2003-R
TIMESTAMP_SYMBOL: T I M E S T A M P; // SQL-2003-R
TIMESTAMP_ADD_SYMBOL: T I M E S T A M P A D D;
TIMESTAMP_DIFF_SYMBOL: T I M E S T A M P D I F F;
TIME_SYMBOL: T I M E; // SQL-2003-R
TINYBLOB_SYMBOL: T I N Y B L O B; // MYSQL
TINYINT_SYMBOL: T I N Y I N T; // MYSQL
TINYTEXT_SYMBOL: T I N Y T E X T; // MYSQL
TO_SYMBOL: T O; // SQL-2003-R
TRAILING_SYMBOL: T R A I L I N G; // SQL-2003-R
TRANSACTION_SYMBOL: T R A N S A C T I O N;
TRIGGERS_SYMBOL: T R I G G E R S;
TRIGGER_SYMBOL: T R I G G E R; // SQL-2003-R
TRIM_SYMBOL: T R I M { l.SetType(l.DetermineFunction(MySQLLexerTRIM_SYMBOL)); }; // SQL-2003-N
TRUE_SYMBOL: T R U E; // SQL-2003-R
TRUNCATE_SYMBOL: T R U N C A T E;
TYPES_SYMBOL: T Y P E S;
TYPE_SYMBOL: T Y P E; // SQL-2003-N
UDF_RETURNS_SYMBOL: U D F '_' R E T U R N S;
UNCOMMITTED_SYMBOL: U N C O M M I T T E D; // SQL-2003-N
UNDEFINED_SYMBOL: U N D E F I N E D;
UNDOFILE_SYMBOL: U N D O F I L E;
UNDO_BUFFER_SIZE_SYMBOL: U N D O '_' B U F F E R '_' S I Z E;
UNDO_SYMBOL: U N D O; // FUTURE-USE
UNICODE_SYMBOL: U N I C O D E;
UNINSTALL_SYMBOL: U N I N S T A L L;
UNION_SYMBOL: U N I O N; // SQL-2003-R
UNIQUE_SYMBOL: U N I Q U E;
UNKNOWN_SYMBOL: U N K N O W N; // SQL-2003-R
UNLOCK_SYMBOL: U N L O C K;
UNSIGNED_SYMBOL: U N S I G N E D; // MYSQL
UNTIL_SYMBOL: U N T I L;
UPDATE_SYMBOL: U P D A T E; // SQL-2003-R
UPGRADE_SYMBOL: U P G R A D E;
USAGE_SYMBOL: U S A G E; // SQL-2003-N
USER_RESOURCES_SYMBOL:
U S E R '_' R E S O U R C E S
; // Represented only as RESOURCES in server grammar.
USER_SYMBOL: U S E R; // SQL-2003-R
USE_FRM_SYMBOL: U S E '_' F R M;
USE_SYMBOL: U S E;
USING_SYMBOL: U S I N G; // SQL-2003-R
UTC_DATE_SYMBOL: U T C '_' D A T E;
UTC_TIMESTAMP_SYMBOL: U T C '_' T I M E S T A M P;
UTC_TIME_SYMBOL: U T C '_' T I M E;
VALIDATION_SYMBOL: V A L I D A T I O N ;
VALUES_SYMBOL: V A L U E S; // SQL-2003-R
VALUE_SYMBOL: V A L U E; // SQL-2003-R
VARBINARY_SYMBOL: V A R B I N A R Y; // SQL-2008-R
VARCHAR_SYMBOL: V A R C H A R; // SQL-2003-R
VARCHARACTER_SYMBOL: V A R C H A R A C T E R -> type(VARCHAR_SYMBOL); // Synonym
VARIABLES_SYMBOL: V A R I A B L E S;
VARIANCE_SYMBOL: V A R I A N C E { l.SetType(l.DetermineFunction(MySQLLexerVARIANCE_SYMBOL)); };
VARYING_SYMBOL: V A R Y I N G; // SQL-2003-R
VAR_POP_SYMBOL: V A R '_' P O P { l.SetType(l.DetermineFunction(MySQLLexerVARIANCE_SYMBOL)); }; // Synonym
VAR_SAMP_SYMBOL: V A R '_' S A M P { l.SetType(l.DetermineFunction(MySQLLexerVAR_SAMP_SYMBOL)); };
VIEW_SYMBOL: V I E W; // SQL-2003-N
VIRTUAL_SYMBOL: V I R T U A L ;
WAIT_SYMBOL: W A I T;
WARNINGS_SYMBOL: W A R N I N G S;
WEEK_SYMBOL: W E E K;
WEIGHT_STRING_SYMBOL: W E I G H T '_' S T R I N G;
WHEN_SYMBOL: W H E N; // SQL-2003-R
WHERE_SYMBOL: W H E R E; // SQL-2003-R
WHILE_SYMBOL: W H I L E;
WITH_SYMBOL: W I T H; // SQL-2003-R
WITHOUT_SYMBOL: W I T H O U T; // SQL-2003-R
WORK_SYMBOL: W O R K; // SQL-2003-N
WRAPPER_SYMBOL: W R A P P E R;
WRITE_SYMBOL: W R I T E; // SQL-2003-N
X509_SYMBOL: X '509';
XA_SYMBOL: X A;
XID_SYMBOL: X I D ;
XML_SYMBOL: X M L;
XOR_SYMBOL: X O R;
YEAR_MONTH_SYMBOL: Y E A R '_' M O N T H;
YEAR_SYMBOL: Y E A R; // SQL-2003-R
ZEROFILL_SYMBOL: Z E R O F I L L; // MYSQL
/*
Tokens from MySQL 8.0
*/
PERSIST_SYMBOL: P E R S I S T ;
ROLE_SYMBOL: R O L E ; // SQL-1999-R
ADMIN_SYMBOL: A D M I N ; // SQL-1999-R
INVISIBLE_SYMBOL: I N V I S I B L E ;
VISIBLE_SYMBOL: V I S I B L E ;
EXCEPT_SYMBOL: E X C E P T ;
COMPONENT_SYMBOL: C O M P O N E N T ;
RECURSIVE_SYMBOL: R E C U R S I V E ;
JSON_OBJECTAGG_SYMBOL: J S O N '_' O B J E C T A G G ;
JSON_ARRAYAGG_SYMBOL: J S O N '_' A R R A Y A G G ;
OF_SYMBOL: O F ;
SKIP_SYMBOL: S K I P ;
LOCKED_SYMBOL: L O C K E D ;
NOWAIT_SYMBOL: N O W A I T ;
GROUPING_SYMBOL: G R O U P I N G ;
PERSIST_ONLY_SYMBOL: P E R S I S T '_' O N L Y ;
HISTOGRAM_SYMBOL: H I S T O G R A M ;
BUCKETS_SYMBOL: B U C K E T S ;
REMOTE_SYMBOL: R E M O T E ;
CLONE_SYMBOL: C L O N E ;
CUME_DIST_SYMBOL: C U M E '_' D I S T ;
DENSE_RANK_SYMBOL: D E N S E '_' R A N K ;
EXCLUDE_SYMBOL: E X C L U D E ;
FIRST_VALUE_SYMBOL: F I R S T '_' V A L U E ;
FOLLOWING_SYMBOL: F O L L O W I N G ;
GROUPS_SYMBOL: G R O U P S ;
LAG_SYMBOL: L A G ;
LAST_VALUE_SYMBOL: L A S T '_' V A L U E ;
LEAD_SYMBOL: L E A D ;
NTH_VALUE_SYMBOL: N T H '_' V A L U E ;
NTILE_SYMBOL: N T I L E ;
NULLS_SYMBOL: N U L L S ;
OTHERS_SYMBOL: O T H E R S ;
OVER_SYMBOL: O V E R ;
PERCENT_RANK_SYMBOL: P E R C E N T '_' R A N K ;
PRECEDING_SYMBOL: P R E C E D I N G ;
RANK_SYMBOL: R A N K ;
RESPECT_SYMBOL: R E S P E C T ;
ROW_NUMBER_SYMBOL: R O W '_' N U M B E R ;
TIES_SYMBOL: T I E S ;
UNBOUNDED_SYMBOL: U N B O U N D E D ;
WINDOW_SYMBOL: W I N D O W ;
EMPTY_SYMBOL: E M P T Y ;
JSON_TABLE_SYMBOL: J S O N '_' T A B L E ;
NESTED_SYMBOL: N E S T E D ;
ORDINALITY_SYMBOL: O R D I N A L I T Y ;
PATH_SYMBOL: P A T H ;
HISTORY_SYMBOL: H I S T O R Y ;
REUSE_SYMBOL: R E U S E ;