~drizzle-trunk/drizzle/development

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
%{
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 *
 *  Copyright (C) 2008 Sun Microsystems
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  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 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
 */


/* This file includes all reserved words */

#include <drizzled/sql_yacc.h>
#include <drizzled/lex_symbol.h>

/*
  Symbols are broken into separated arrays to allow field names with
  same name as functions.
  These are kept sorted for human lookup (the symbols are hashed).

  NOTE! The symbol tables should be the same regardless of what features
  are compiled into the server. Don't add ifdef'ed symbols to the
  lists
*/
%}
struct st_symbol
{
  const char *name;
  unsigned int  tok;
};
%%
<, LT
<=, LE
<>, NE
!=, NE
=, EQ
>, GT_SYM
>=, GE
<=>, EQUAL_SYM
ACCESSIBLE, ACCESSIBLE_SYM
ACTION, ACTION
ADD, ADD
AFTER, AFTER_SYM
AGGREGATE, AGGREGATE_SYM
ALL, ALL
ALGORITHM, ALGORITHM_SYM
ALTER, ALTER
ANALYZE, ANALYZE_SYM
AND, AND_SYM
ANY, ANY_SYM
AS, AS
ASC, ASC
ASENSITIVE, ASENSITIVE_SYM
AT, AT_SYM
AUTO_INCREMENT, AUTO_INC
AUTOEXTEND_SIZE, AUTOEXTEND_SIZE_SYM
AVG, AVG_SYM
AVG_ROW_LENGTH, AVG_ROW_LENGTH
BEFORE, BEFORE_SYM
BEGIN, BEGIN_SYM
BETWEEN, BETWEEN_SYM
BIGINT, BIGINT_SYM
BINARY, BINARY
BINLOG, BINLOG_SYM
BIT, BIT_SYM
BLOB, BLOB_SYM
BLOCK, BLOCK_SYM
BLOCK_SIZE, BLOCK_SIZE_SYM
BOOL, BOOL_SYM
BOOLEAN, BOOLEAN_SYM
BOTH, BOTH
BTREE, BTREE_SYM
BY, BY
BYTE, BYTE_SYM
CACHE, CACHE_SYM
CALL, CALL_SYM
CASCADE, CASCADE
CASCADED, CASCADED
CASE, CASE_SYM
CHAIN, CHAIN_SYM
CHANGE, CHANGE
CHANGED, CHANGED
CHAR, CHAR_SYM
CHARACTER, CHAR_SYM
CHARSET, CHARSET
CHECK, CHECK_SYM
CHECKSUM, CHECKSUM_SYM
CLOSE, CLOSE_SYM
COALESCE, COALESCE
COLLATE, COLLATE_SYM
COLLATION, COLLATION_SYM
COLUMN, COLUMN_SYM
COLUMNS, COLUMNS
COMMENT, COMMENT_SYM
COMMIT, COMMIT_SYM
COMMITTED, COMMITTED_SYM
COMPACT, COMPACT_SYM
COMPLETION, COMPLETION_SYM
COMPRESSED, COMPRESSED_SYM
CONCURRENT, CONCURRENT
CONDITION, CONDITION_SYM
CONNECTION, CONNECTION_SYM
CONSISTENT, CONSISTENT_SYM
CONSTRAINT, CONSTRAINT
CONTAINS, CONTAINS_SYM
CONTEXT, CONTEXT_SYM
CONTINUE, CONTINUE_SYM
CONVERT, CONVERT_SYM
CREATE, CREATE
CROSS, CROSS
CUBE, CUBE_SYM
CURRENT_DATE, CURDATE
CURRENT_TIMESTAMP, NOW_SYM
CURRENT_USER, CURRENT_USER
CURSOR, CURSOR_SYM
DATA, DATA_SYM
DATABASE, DATABASE
DATABASES, DATABASES
DATAFILE, DATAFILE_SYM
DATE, DATE_SYM
DATETIME, DATETIME_SYM
DAY, DAY_SYM
DAY_HOUR, DAY_HOUR_SYM
DAY_MICROSECOND, DAY_MICROSECOND_SYM
DAY_MINUTE, DAY_MINUTE_SYM
DAY_SECOND, DAY_SECOND_SYM
DEALLOCATE, DEALLOCATE_SYM
DEC, DECIMAL_SYM
DECIMAL, DECIMAL_SYM
DECLARE, DECLARE_SYM
DEFAULT, DEFAULT
DELAY_KEY_WRITE, DELAY_KEY_WRITE_SYM
DELETE, DELETE_SYM
DESC, DESC
DESCRIBE, DESCRIBE
DETERMINISTIC, DETERMINISTIC_SYM
DIRECTORY, DIRECTORY_SYM
DISABLE, DISABLE_SYM
DISCARD, DISCARD
DISTINCT, DISTINCT
# Access likes this
DISTINCTROW, DISTINCT
DIV, DIV_SYM
DOUBLE, DOUBLE_SYM
DROP, DROP
DUMPFILE, DUMPFILE
DUPLICATE, DUPLICATE_SYM
DYNAMIC, DYNAMIC_SYM
EACH, EACH_SYM
ELSE, ELSE
ELSEIF, ELSEIF_SYM
ENABLE, ENABLE_SYM
ENCLOSED, ENCLOSED
END, END
ENDS, ENDS_SYM
ENGINE, ENGINE_SYM
ENUM, ENUM_SYM
ERRORS, ERRORS
ESCAPE, ESCAPE_SYM
ESCAPED, ESCAPED
EXCLUSIVE, EXCLUSIVE_SYM
EXISTS, EXISTS
EXIT, EXIT_SYM
EXPLAIN, DESCRIBE
EXTENDED, EXTENDED_SYM
EXTENT_SIZE, EXTENT_SIZE_SYM
FALSE, FALSE_SYM
FAST, FAST_SYM
FAULTS, FAULTS_SYM
FETCH, FETCH_SYM
COLUMN_FORMAT, COLUMN_FORMAT_SYM
FIELDS, COLUMNS
FILE, FILE_SYM
FIRST, FIRST_SYM
FIXED, FIXED_SYM
FLOAT, DOUBLE_SYM
FLUSH, FLUSH_SYM
FOR, FOR_SYM
FORCE, FORCE_SYM
FOREIGN, FOREIGN
FOUND, FOUND_SYM
FRAC_SECOND, FRAC_SECOND_SYM
FROM, FROM
FULL, FULL
GLOBAL, GLOBAL_SYM
GROUP, GROUP_SYM
HANDLER, HANDLER_SYM
HASH, HASH_SYM
HAVING, HAVING
HOST, HOST_SYM
HOSTS, HOSTS_SYM
HOUR, HOUR_SYM
HOUR_MICROSECOND, HOUR_MICROSECOND_SYM
HOUR_MINUTE, HOUR_MINUTE_SYM
HOUR_SECOND, HOUR_SECOND_SYM
IDENTIFIED, IDENTIFIED_SYM
IF, IF
IGNORE, IGNORE_SYM
IMPORT, IMPORT
IN, IN_SYM
INDEX, INDEX_SYM
INDEXES, INDEXES
INFILE, INFILE
INITIAL_SIZE, INITIAL_SIZE_SYM
INNER, INNER_SYM
INOUT, INOUT_SYM
INSENSITIVE, INSENSITIVE_SYM
INSERT, INSERT
INSERT_METHOD, INSERT_METHOD
INSTALL, INSTALL_SYM
INT, INT_SYM
INT4, INT_SYM
INT8, BIGINT_SYM
INTEGER, INT_SYM
INTERVAL, INTERVAL_SYM
INTO, INTO
IS, IS
ISOLATION, ISOLATION
ITERATE, ITERATE_SYM
JOIN, JOIN_SYM
KEY, KEY_SYM
KEYS, KEYS
KEY_BLOCK_SIZE, KEY_BLOCK_SIZE
KILL, KILL_SYM
LAST, LAST_SYM
LEADING, LEADING
LEAVES, LEAVES
LEFT, LEFT
LEVEL, LEVEL_SYM
LIKE, LIKE
LIMIT, LIMIT
LINEAR, LINEAR_SYM
LINES, LINES
LIST, LIST_SYM
LOAD, LOAD
LOCAL, LOCAL_SYM
LOCALTIME, NOW_SYM
LOCALTIMESTAMP, NOW_SYM
LOCK, LOCK_SYM
LOCKS, LOCKS_SYM
LOGFILE, LOGFILE_SYM
LOGS, LOGS_SYM
LONG, LONG_SYM
LONGBLOB, BLOB_SYM
LONGTEXT, TEXT_SYM
LOOP, LOOP_SYM
MATCH, MATCH
MAX_ROWS, MAX_ROWS
MAX_SIZE, MAX_SIZE_SYM
MAXVALUE, MAX_VALUE_SYM
MEDIUM, MEDIUM_SYM
MEDIUMBLOB, BLOB_SYM
MEDIUMTEXT, TEXT_SYM
MERGE, MERGE_SYM
MICROSECOND, MICROSECOND_SYM
MIGRATE, MIGRATE_SYM
MINUTE, MINUTE_SYM
MINUTE_MICROSECOND, MINUTE_MICROSECOND_SYM
MINUTE_SECOND, MINUTE_SECOND_SYM
MIN_ROWS, MIN_ROWS
MOD, MOD_SYM
MODE, MODE_SYM
MODIFIES, MODIFIES_SYM
MODIFY, MODIFY_SYM
MONTH, MONTH_SYM
NAME, NAME_SYM
NAMES, NAMES_SYM
NATIONAL, NATIONAL_SYM
NATURAL, NATURAL
NEW, NEW_SYM
NEXT, NEXT_SYM
NO, NO_SYM
NO_WAIT, NO_WAIT_SYM
NODEGROUP, NODEGROUP_SYM
NONE, NONE_SYM
NOT, NOT_SYM
NOWAIT, NOWAIT_SYM
NO_WRITE_TO_BINLOG, NO_WRITE_TO_BINLOG
NULL, NULL_SYM
NUMERIC, NUMERIC_SYM
OFFLINE, OFFLINE_SYM
OFFSET, OFFSET_SYM
ON, ON
ONE, ONE_SYM
ONLINE, ONLINE_SYM
OPEN, OPEN_SYM
OPTIMIZE, OPTIMIZE
OPTIONS, OPTIONS_SYM
OPTION, OPTION
OPTIONALLY, OPTIONALLY
OR, OR_SYM
ORDER, ORDER_SYM
OUT, OUT_SYM
OUTER, OUTER
OUTFILE, OUTFILE
PACK_KEYS, PACK_KEYS_SYM
PAGE, PAGE_SYM
PAGE_CHECKSUM, PAGE_CHECKSUM_SYM
PARTIAL, PARTIAL
PHASE, PHASE_SYM
PORT, PORT_SYM
PRECISION, PRECISION
PREV, PREV_SYM
PRIMARY, PRIMARY_SYM
PROCESS, PROCESS
PROCESSLIST, PROCESSLIST_SYM
PURGE, PURGE
QUARTER, QUARTER_SYM
QUERY, QUERY_SYM
QUICK, QUICK
RANGE, RANGE_SYM
READ, READ_SYM
READ_ONLY, READ_ONLY_SYM
READ_WRITE, READ_WRITE_SYM
READS, READS_SYM
REAL, REAL
REBUILD, REBUILD_SYM
RECOVER, RECOVER_SYM
REDO_BUFFER_SIZE, REDO_BUFFER_SIZE_SYM
REDOFILE, REDOFILE_SYM
REDUNDANT, REDUNDANT_SYM
REFERENCES, REFERENCES
RELEASE, RELEASE_SYM
RELOAD, RELOAD
REMOVE, REMOVE_SYM
RENAME, RENAME
REORGANIZE, REORGANIZE_SYM
REPEATABLE, REPEATABLE_SYM
REPLACE, REPLACE
REPLICATION, REPLICATION
REPEAT, REPEAT_SYM
REQUIRE, REQUIRE_SYM
RESET, RESET_SYM
RESTRICT, RESTRICT
RESUME, RESUME_SYM
RETURN, RETURN_SYM
RETURNS, RETURNS_SYM
REVERSE, REVERSE_SYM
REVOKE, REVOKE
RIGHT, RIGHT
ROLLBACK, ROLLBACK_SYM
ROLLUP, ROLLUP_SYM
ROUTINE, ROUTINE_SYM
ROW, ROW_SYM
ROWS, ROWS_SYM
ROW_FORMAT, ROW_FORMAT_SYM
SAVEPOINT, SAVEPOINT_SYM
SCHEMA, DATABASE
SCHEMAS, DATABASES
SECOND, SECOND_SYM
SECOND_MICROSECOND, SECOND_MICROSECOND_SYM
SECURITY, SECURITY_SYM
SELECT, SELECT_SYM
SENSITIVE, SENSITIVE_SYM
SEPARATOR, SEPARATOR_SYM
SERIAL, SERIAL_SYM
SERIALIZABLE, SERIALIZABLE_SYM
SESSION, SESSION_SYM
SERVER, SERVER_SYM
SET, SET
SHARE, SHARE_SYM
SHOW, SHOW
SHUTDOWN, SHUTDOWN
SIMPLE, SIMPLE_SYM
SNAPSHOT, SNAPSHOT_SYM
SOCKET, SOCKET_SYM
SOME, ANY_SYM
SONAME, SONAME_SYM
SOURCE, SOURCE_SYM
SPECIFIC, SPECIFIC_SYM
SQL, SQL_SYM
SQLEXCEPTION, SQLEXCEPTION_SYM
SQLSTATE, SQLSTATE_SYM
SQLWARNING, SQLWARNING_SYM
SQL_BIG_RESULT, SQL_BIG_RESULT
SQL_BUFFER_RESULT, SQL_BUFFER_RESULT
SQL_CALC_FOUND_ROWS, SQL_CALC_FOUND_ROWS
SQL_SMALL_RESULT, SQL_SMALL_RESULT
SQL_TSI_FRAC_SECOND, FRAC_SECOND_SYM
SQL_TSI_SECOND, SECOND_SYM
SQL_TSI_MINUTE, MINUTE_SYM
SQL_TSI_HOUR, HOUR_SYM
SQL_TSI_DAY, DAY_SYM
SQL_TSI_WEEK, WEEK_SYM
SQL_TSI_MONTH, MONTH_SYM
SQL_TSI_QUARTER, QUARTER_SYM
SQL_TSI_YEAR, YEAR_SYM
START, START_SYM
STARTING, STARTING
STARTS, STARTS_SYM
STATUS, STATUS_SYM
STOP, STOP_SYM
STORAGE, STORAGE_SYM
STORED, STORED_SYM
STRAIGHT_JOIN, STRAIGHT_JOIN
STRING, STRING_SYM
SUBJECT, SUBJECT_SYM
SUPER, SUPER_SYM
SUSPEND, SUSPEND_SYM
SWAPS, SWAPS_SYM
SWITCHES, SWITCHES_SYM
TABLE, TABLE_SYM
TABLES, TABLES
TABLESPACE, TABLESPACE
TABLE_CHECKSUM, TABLE_CHECKSUM_SYM
TEMPORARY, TEMPORARY_SYM
TEMPTABLE, TEMPTABLE_SYM
TERMINATED, TERMINATED
TEXT, TEXT_SYM
THAN, THAN_SYM
THEN, THEN_SYM
TIMESTAMP, TIMESTAMP_SYM
TIMESTAMPADD, TIMESTAMP_ADD
TIMESTAMPDIFF, TIMESTAMP_DIFF
TINYBLOB, BLOB_SYM
TINYTEXT, TEXT_SYM
TO, TO_SYM
TRAILING, TRAILING
TRANSACTION, TRANSACTION_SYM
TRUE, TRUE_SYM
TRUNCATE, TRUNCATE_SYM
TYPE, TYPE_SYM
TYPES, TYPES_SYM
UNCOMMITTED, UNCOMMITTED_SYM
UNDEFINED, UNDEFINED_SYM
UNDOFILE, UNDOFILE_SYM
UNDO, UNDO_SYM
UNION, UNION_SYM
UNIQUE, UNIQUE_SYM
UNKNOWN, UNKNOWN_SYM
UNLOCK, UNLOCK_SYM
UNTIL, UNTIL_SYM
UPDATE, UPDATE_SYM
USAGE, USAGE
USE, USE_SYM
USER, USER
USER_RESOURCES, RESOURCES
USE_FRM, USE_FRM
USING, USING
UTC_DATE, UTC_DATE_SYM
UTC_TIMESTAMP, UTC_TIMESTAMP_SYM
VALUE, VALUE_SYM
VALUES, VALUES
VARBINARY, VARBINARY
VARCHAR, VARCHAR_SYM
VARCHARACTER, VARCHAR_SYM
VARIABLES, VARIABLES
VARYING, VARYING
WAIT, WAIT_SYM
WARNINGS, WARNINGS
WEEK, WEEK_SYM
WEIGHT_STRING, WEIGHT_STRING_SYM
WHEN, WHEN_SYM
WHERE, WHERE
WITH, WITH
WORK, WORK_SYM
WRITE, WRITE_SYM
VIRTUAL, VIRTUAL_SYM
XOR, XOR
YEAR, YEAR_SYM
YEAR_MONTH, YEAR_MONTH_SYM