~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
%{
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 *
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 *
 *  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>

using namespace drizzled;

/*
  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;
};
%%
||, CONCAT
<=, LE
<>, NE
!=, NE
>=, GE
<=>, EQUAL_SYM
<, LESS_THAN
>, GREATER_THAN
<<, SHIFT_LEFT
>>, SHIFT_RIGHT
# Access likes this
ACTION, ACTION
ADD, ADD_SYM
AFTER, AFTER_SYM
AGGREGATE, AGGREGATE_SYM
ALL, ALL
ALTER, ALTER_SYM
ANALYZE, ANALYZE_SYM
AND, AND_SYM
ANY, ANY_SYM
AS, AS
ASC, ASC
ASENSITIVE, ASENSITIVE_SYM
AT, AT_SYM
AUTO_INCREMENT, AUTO_INC
AVG, AVG_SYM
BEFORE, BEFORE_SYM
BEGIN, BEGIN_SYM
BETWEEN, BETWEEN_SYM
BIGINT, BIGINT_SYM
BINARY, BINARY
BIT, BIT_SYM
BLOB, BLOB_SYM
BOOL, BOOL_SYM
BOOLEAN, BOOLEAN_SYM
BOTH, BOTH
BTREE, BTREE_SYM
BY, BY
CALL, CALL_SYM
CASCADE, CASCADE
CASCADED, CASCADED
CASE, CASE_SYM
CATALOG, CATALOG_SYM
CHAIN, CHAIN_SYM
CHANGE, CHANGE_SYM
CHAR, CHAR_SYM
CHARACTER, CHAR_SYM
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
COMPRESSED, COMPRESSED_SYM
CONCURRENT, CONCURRENT
CONDITION, CONDITION_SYM
CONNECTION, CONNECTION_SYM
CONSISTENT, CONSISTENT_SYM
CONSTRAINT, CONSTRAINT
CONTAINS, CONTAINS_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
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
DELETE, DELETE_SYM
DESC, DESC
DESCRIBE, DESCRIBE
DETERMINISTIC, DETERMINISTIC_SYM
DISABLE, DISABLE_SYM
DISCARD, DISCARD
DISTINCT, DISTINCT
DISTINCTROW, DISTINCT
DIV, DIV_SYM
DO, DO_SYM
DOUBLE, DOUBLE_SYM
DROP, DROP
DUMPFILE, DUMPFILE
DUPLICATE, DUPLICATE_SYM
DYNAMIC, DYNAMIC_SYM
EACH, EACH_SYM
ELSE, ELSE
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
EXECUTE, EXECUTE_SYM
EXISTS, EXISTS
EXPLAIN, DESCRIBE
EXTENDED, EXTENDED_SYM
FALSE, FALSE_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
HASH, HASH_SYM
HAVING, HAVING
HOUR, HOUR_SYM
HOUR_MICROSECOND, HOUR_MICROSECOND_SYM
HOUR_MINUTE, HOUR_MINUTE_SYM
HOUR_SECOND, HOUR_SECOND_SYM
IDENTIFIED, IDENTIFIED_SYM
IDENTITY, IDENTITY_SYM
IF, IF
IGNORE, IGNORE_SYM
IMPORT, IMPORT
IN, IN_SYM
INDEX, INDEX_SYM
INDEXES, INDEXES
INFILE, INFILE
INNER, INNER_SYM
INOUT, INOUT_SYM
INSENSITIVE, INSENSITIVE_SYM
INSERT, INSERT
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
LEFT, LEFT
LEVEL, LEVEL_SYM
LIKE, LIKE
LIMIT, LIMIT
LINES, LINES
LOAD, LOAD
LOCAL, LOCAL_SYM
LOCALTIME, NOW_SYM
LOCALTIMESTAMP, NOW_SYM
LOCK, LOCK_SYM
LOCKS, LOCKS_SYM
LOGS, LOGS_SYM
LONG, LONG_SYM
LONGBLOB, BLOB_SYM
LONGTEXT, TEXT_SYM
MATCH, MATCH
MAXVALUE, MAX_VALUE_SYM
MEDIUM, MEDIUM_SYM
MEDIUMBLOB, BLOB_SYM
MEDIUMTEXT, TEXT_SYM
MERGE, MERGE_SYM
MICROSECOND, MICROSECOND_SYM
MINUTE, MINUTE_SYM
MINUTE_MICROSECOND, MINUTE_MICROSECOND_SYM
MINUTE_SECOND, MINUTE_SECOND_SYM
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
NONE, NONE_SYM
NOT, NOT_SYM
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
OPTION, OPTION
OPTIONALLY, OPTIONALLY
OR, OR_SYM
ORDER, ORDER_SYM
OUT, OUT_SYM
OUTER, OUTER
OUTFILE, OUTFILE
PARTIAL, PARTIAL
PRECISION, PRECISION
PREV, PREV_SYM
PRIMARY, PRIMARY_SYM
PROCESS, PROCESS
PROCESSLIST, PROCESSLIST_SYM
QUARTER, QUARTER_SYM
QUERY, QUERY_SYM
RANGE, RANGE_SYM
READ, READ_SYM
READS, READS_SYM
READ_WRITE, READ_WRITE_SYM
REAL, REAL
REDUNDANT, REDUNDANT_SYM
REFERENCES, REFERENCES
REGEXP, REGEXP_SYM
RELEASE, RELEASE_SYM
RENAME, RENAME
REPEAT, REPEAT_SYM
REPEATABLE, REPEATABLE_SYM
REPLACE, REPLACE
REPLICATE,REPLICATE
REPLICATION,REPLICATION
RESTRICT, RESTRICT
RETURN, RETURN_SYM
RETURNS, RETURNS_SYM
REVOKE, REVOKE
RIGHT, RIGHT
RLIKE, REGEXP_SYM
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
SERVER, SERVER_SYM
SESSION, SESSION_SYM
SET, SET_SYM
SHARE, SHARE_SYM
SHOW, SHOW
SIGNED, SIGNED_SYM
SIMPLE, SIMPLE_SYM
SNAPSHOT, SNAPSHOT_SYM
SOME, ANY_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_DAY, DAY_SYM
SQL_TSI_FRAC_SECOND, FRAC_SECOND_SYM
SQL_TSI_HOUR, HOUR_SYM
SQL_TSI_MINUTE, MINUTE_SYM
SQL_TSI_MONTH, MONTH_SYM
SQL_TSI_QUARTER, QUARTER_SYM
SQL_TSI_SECOND, SECOND_SYM
SQL_TSI_WEEK, WEEK_SYM
SQL_TSI_YEAR, YEAR_SYM
START, START_SYM
STARTING, STARTING
STATUS, STATUS_SYM
STOP, STOP_SYM
STORED, STORED_SYM
STRAIGHT_JOIN, STRAIGHT_JOIN
STRING, STRING_SYM
SUBJECT, SUBJECT_SYM
SUSPEND, SUSPEND_SYM
TABLE, TABLE_SYM
TABLES, TABLES
TABLESPACE, TABLESPACE
TEMPORARY, TEMPORARY_SYM
TERMINATED, TERMINATED
TEXT, TEXT_SYM
THEN, THEN_SYM
TIME, TIME_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
UNCOMMITTED, UNCOMMITTED_SYM
UNDO, UNDO_SYM
UNDOFILE, UNDOFILE_SYM
UNION, UNION_SYM
UNIQUE, UNIQUE_SYM
UNKNOWN, UNKNOWN_SYM
UNLOCK, UNLOCK_SYM
UNSIGNED, UNSIGNED_SYM
UPDATE, UPDATE_SYM
USAGE, USAGE
USE, USE_SYM
USER, USER
USING, USING
UTC_DATE, UTC_DATE_SYM
UTC_TIMESTAMP, UTC_TIMESTAMP_SYM
UUID, UUID_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
WHEN, WHEN_SYM
WHERE, WHERE
WITH, WITH
WORK, WORK_SYM
WRITE, WRITE_SYM
XOR, XOR
YEAR, YEAR_SYM
YEAR_MONTH, YEAR_MONTH_SYM
ZEROFILL, ZEROFILL_SYM