~drizzle-trunk/drizzle/development

779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
1
%{
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
2
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
3
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
5
 *  Copyright (C) 2008 Sun Microsystems, Inc.
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; version 2 of the License.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
1 by brian
clean slate
20
21
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
22
/* This file includes all reserved words */
1 by brian
clean slate
23
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
24
#include <drizzled/sql_yacc.h>
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
25
#include <drizzled/lex_symbol.h>
1 by brian
clean slate
26
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
27
using namespace drizzled;
28
1 by brian
clean slate
29
/*
30
  Symbols are broken into separated arrays to allow field names with
31
  same name as functions.
32
  These are kept sorted for human lookup (the symbols are hashed).
33
34
  NOTE! The symbol tables should be the same regardless of what features
35
  are compiled into the server. Don't add ifdef'ed symbols to the
36
  lists
37
*/
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
38
%}
39
struct st_symbol
40
{
41
  const char *name;
42
  unsigned int  tok;
43
};
44
%%
2198.6.1 by Brian Aker
Add in an ANSI || operator.
45
||, CONCAT
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
46
<=, LE
47
<>, NE
48
!=, NE
49
>=, GE
50
<=>, EQUAL_SYM
2194.4.2 by Brian Aker
Bit functions/fix for <<
51
<, LESS_THAN
52
>, GREATER_THAN
53
<<, SHIFT_LEFT
54
>>, SHIFT_RIGHT
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
55
# Access likes this
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
56
ACTION, ACTION
2030.1.1 by Brian Aker
Small set of symbol updates.
57
ADD, ADD_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
58
AFTER, AFTER_SYM
59
AGGREGATE, AGGREGATE_SYM
60
ALL, ALL
2030.1.1 by Brian Aker
Small set of symbol updates.
61
ALTER, ALTER_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
62
ANALYZE, ANALYZE_SYM
63
AND, AND_SYM
64
ANY, ANY_SYM
65
AS, AS
66
ASC, ASC
67
ASENSITIVE, ASENSITIVE_SYM
68
AT, AT_SYM
69
AUTO_INCREMENT, AUTO_INC
70
AVG, AVG_SYM
71
BEFORE, BEFORE_SYM
72
BEGIN, BEGIN_SYM
73
BETWEEN, BETWEEN_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
74
BIGINT, BIGINT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
75
BINARY, BINARY
76
BIT, BIT_SYM
77
BLOB, BLOB_SYM
78
BOOL, BOOL_SYM
79
BOOLEAN, BOOLEAN_SYM
80
BOTH, BOTH
81
BTREE, BTREE_SYM
82
BY, BY
83
CALL, CALL_SYM
84
CASCADE, CASCADE
85
CASCADED, CASCADED
86
CASE, CASE_SYM
2073.1.2 by Brian Aker
Basic DDL for catalog.
87
CATALOG, CATALOG_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
88
CHAIN, CHAIN_SYM
2030.1.1 by Brian Aker
Small set of symbol updates.
89
CHANGE, CHANGE_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
90
CHAR, CHAR_SYM
91
CHARACTER, CHAR_SYM
92
CHECK, CHECK_SYM
93
CHECKSUM, CHECKSUM_SYM
94
CLOSE, CLOSE_SYM
95
COALESCE, COALESCE
96
COLLATE, COLLATE_SYM
97
COLLATION, COLLATION_SYM
98
COLUMN, COLUMN_SYM
99
COLUMNS, COLUMNS
100
COMMENT, COMMENT_SYM
101
COMMIT, COMMIT_SYM
102
COMMITTED, COMMITTED_SYM
103
COMPACT, COMPACT_SYM
104
COMPRESSED, COMPRESSED_SYM
105
CONCURRENT, CONCURRENT
106
CONDITION, CONDITION_SYM
107
CONNECTION, CONNECTION_SYM
108
CONSISTENT, CONSISTENT_SYM
109
CONSTRAINT, CONSTRAINT
110
CONTAINS, CONTAINS_SYM
111
CONVERT, CONVERT_SYM
112
CREATE, CREATE
113
CROSS, CROSS
114
CUBE, CUBE_SYM
115
CURRENT_DATE, CURDATE
116
CURRENT_TIMESTAMP, NOW_SYM
117
CURRENT_USER, CURRENT_USER
118
CURSOR, CURSOR_SYM
119
DATA, DATA_SYM
120
DATABASE, DATABASE
121
DATABASES, DATABASES
122
DATE, DATE_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
123
DATETIME, DATETIME_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
124
DAY, DAY_SYM
125
DAY_HOUR, DAY_HOUR_SYM
126
DAY_MICROSECOND, DAY_MICROSECOND_SYM
127
DAY_MINUTE, DAY_MINUTE_SYM
128
DAY_SECOND, DAY_SECOND_SYM
129
DEALLOCATE, DEALLOCATE_SYM
130
DEC, DECIMAL_SYM
131
DECIMAL, DECIMAL_SYM
132
DECLARE, DECLARE_SYM
133
DEFAULT, DEFAULT
134
DELETE, DELETE_SYM
135
DESC, DESC
136
DESCRIBE, DESCRIBE
137
DETERMINISTIC, DETERMINISTIC_SYM
138
DISABLE, DISABLE_SYM
139
DISCARD, DISCARD
140
DISTINCT, DISTINCT
141
DISTINCTROW, DISTINCT
142
DIV, DIV_SYM
2029.1.24 by Brian Aker
Reduce the conflicts based on engine options.
143
DO, DO_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
144
DOUBLE, DOUBLE_SYM
145
DROP, DROP
146
DUMPFILE, DUMPFILE
147
DUPLICATE, DUPLICATE_SYM
148
DYNAMIC, DYNAMIC_SYM
149
EACH, EACH_SYM
150
ELSE, ELSE
151
ENABLE, ENABLE_SYM
152
ENCLOSED, ENCLOSED
153
END, END
154
ENDS, ENDS_SYM
155
ENGINE, ENGINE_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
156
ENUM, ENUM_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
157
ERRORS, ERRORS
158
ESCAPE, ESCAPE_SYM
159
ESCAPED, ESCAPED
160
EXCLUSIVE, EXCLUSIVE_SYM
1835.1.6 by Brian Aker
This patch returns dynamic SQL into the core (through SQL-Server syntax).
161
EXECUTE, EXECUTE_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
162
EXISTS, EXISTS
163
EXPLAIN, DESCRIBE
164
EXTENDED, EXTENDED_SYM
165
FALSE, FALSE_SYM
166
FIELDS, COLUMNS
167
FILE, FILE_SYM
168
FIRST, FIRST_SYM
169
FIXED, FIXED_SYM
170
FLOAT, DOUBLE_SYM
171
FLUSH, FLUSH_SYM
172
FOR, FOR_SYM
173
FORCE, FORCE_SYM
174
FOREIGN, FOREIGN
175
FOUND, FOUND_SYM
176
FRAC_SECOND, FRAC_SECOND_SYM
177
FROM, FROM
178
FULL, FULL
179
GLOBAL, GLOBAL_SYM
180
GROUP, GROUP_SYM
181
HASH, HASH_SYM
182
HAVING, HAVING
183
HOUR, HOUR_SYM
184
HOUR_MICROSECOND, HOUR_MICROSECOND_SYM
185
HOUR_MINUTE, HOUR_MINUTE_SYM
186
HOUR_SECOND, HOUR_SECOND_SYM
187
IDENTIFIED, IDENTIFIED_SYM
2029.1.26 by Brian Aker
Merge in work for reserved words in SQL standard.
188
IDENTITY, IDENTITY_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
189
IF, IF
190
IGNORE, IGNORE_SYM
191
IMPORT, IMPORT
192
IN, IN_SYM
193
INDEX, INDEX_SYM
194
INDEXES, INDEXES
195
INFILE, INFILE
196
INNER, INNER_SYM
197
INOUT, INOUT_SYM
198
INSENSITIVE, INSENSITIVE_SYM
199
INSERT, INSERT
200
INT, INT_SYM
201
INT4, INT_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
202
INT8, BIGINT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
203
INTEGER, INT_SYM
204
INTERVAL, INTERVAL_SYM
205
INTO, INTO
206
IS, IS
207
ISOLATION, ISOLATION
208
ITERATE, ITERATE_SYM
209
JOIN, JOIN_SYM
210
KEY, KEY_SYM
211
KEYS, KEYS
212
KEY_BLOCK_SIZE, KEY_BLOCK_SIZE
213
KILL, KILL_SYM
214
LAST, LAST_SYM
215
LEADING, LEADING
216
LEFT, LEFT
217
LEVEL, LEVEL_SYM
218
LIKE, LIKE
219
LIMIT, LIMIT
220
LINES, LINES
221
LOAD, LOAD
222
LOCAL, LOCAL_SYM
223
LOCALTIME, NOW_SYM
224
LOCALTIMESTAMP, NOW_SYM
225
LOCK, LOCK_SYM
226
LOCKS, LOCKS_SYM
227
LOGS, LOGS_SYM
228
LONG, LONG_SYM
229
LONGBLOB, BLOB_SYM
230
LONGTEXT, TEXT_SYM
231
MATCH, MATCH
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
232
MAXVALUE, MAX_VALUE_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
233
MEDIUM, MEDIUM_SYM
234
MEDIUMBLOB, BLOB_SYM
235
MEDIUMTEXT, TEXT_SYM
236
MERGE, MERGE_SYM
237
MICROSECOND, MICROSECOND_SYM
238
MINUTE, MINUTE_SYM
239
MINUTE_MICROSECOND, MINUTE_MICROSECOND_SYM
240
MINUTE_SECOND, MINUTE_SECOND_SYM
241
MOD, MOD_SYM
242
MODE, MODE_SYM
243
MODIFIES, MODIFIES_SYM
244
MODIFY, MODIFY_SYM
245
MONTH, MONTH_SYM
246
NAME, NAME_SYM
247
NAMES, NAMES_SYM
248
NATIONAL, NATIONAL_SYM
249
NATURAL, NATURAL
250
NEW, NEW_SYM
251
NEXT, NEXT_SYM
252
NO, NO_SYM
253
NONE, NONE_SYM
254
NOT, NOT_SYM
255
NULL, NULL_SYM
256
NUMERIC, NUMERIC_SYM
257
OFFLINE, OFFLINE_SYM
258
OFFSET, OFFSET_SYM
259
ON, ON
260
ONE, ONE_SYM
261
ONLINE, ONLINE_SYM
262
OPEN, OPEN_SYM
263
OPTIMIZE, OPTIMIZE
264
OPTION, OPTION
265
OPTIONALLY, OPTIONALLY
266
OR, OR_SYM
267
ORDER, ORDER_SYM
268
OUT, OUT_SYM
269
OUTER, OUTER
270
OUTFILE, OUTFILE
271
PARTIAL, PARTIAL
272
PRECISION, PRECISION
273
PREV, PREV_SYM
274
PRIMARY, PRIMARY_SYM
275
PROCESS, PROCESS
276
PROCESSLIST, PROCESSLIST_SYM
277
QUARTER, QUARTER_SYM
278
QUERY, QUERY_SYM
279
RANGE, RANGE_SYM
280
READ, READ_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
281
READS, READS_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
282
READ_WRITE, READ_WRITE_SYM
283
REAL, REAL
284
REDUNDANT, REDUNDANT_SYM
285
REFERENCES, REFERENCES
1976.7.1 by Brian Aker
Added compatible REGEX for Drizzle to MySQL's syntax.
286
REGEXP, REGEXP_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
287
RELEASE, RELEASE_SYM
288
RENAME, RENAME
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
289
REPEAT, REPEAT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
290
REPEATABLE, REPEATABLE_SYM
291
REPLACE, REPLACE
2187.7.4 by Brian Aker
Merge in change from REPLICATION to REPLICATE as keyword.
292
REPLICATE,REPLICATE
2168.3.1 by Brian Aker
Basic DDL working for replication.
293
REPLICATION,REPLICATION
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
294
RESTRICT, RESTRICT
295
RETURN, RETURN_SYM
296
RETURNS, RETURNS_SYM
297
REVOKE, REVOKE
298
RIGHT, RIGHT
1976.7.1 by Brian Aker
Added compatible REGEX for Drizzle to MySQL's syntax.
299
RLIKE, REGEXP_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
300
ROLLBACK, ROLLBACK_SYM
301
ROLLUP, ROLLUP_SYM
302
ROUTINE, ROUTINE_SYM
303
ROW, ROW_SYM
304
ROWS, ROWS_SYM
305
ROW_FORMAT, ROW_FORMAT_SYM
306
SAVEPOINT, SAVEPOINT_SYM
307
SCHEMA, DATABASE
308
SCHEMAS, DATABASES
309
SECOND, SECOND_SYM
310
SECOND_MICROSECOND, SECOND_MICROSECOND_SYM
311
SECURITY, SECURITY_SYM
312
SELECT, SELECT_SYM
313
SENSITIVE, SENSITIVE_SYM
314
SEPARATOR, SEPARATOR_SYM
315
SERIAL, SERIAL_SYM
316
SERIALIZABLE, SERIALIZABLE_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
317
SERVER, SERVER_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
318
SESSION, SESSION_SYM
2030.1.1 by Brian Aker
Small set of symbol updates.
319
SET, SET_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
320
SHARE, SHARE_SYM
321
SHOW, SHOW
2015.1.3 by Brian Aker
Merge in CAST operators for SIGNED/UNSIGNED
322
SIGNED, SIGNED_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
323
SIMPLE, SIMPLE_SYM
324
SNAPSHOT, SNAPSHOT_SYM
325
SOME, ANY_SYM
326
SPECIFIC, SPECIFIC_SYM
327
SQL, SQL_SYM
328
SQLEXCEPTION, SQLEXCEPTION_SYM
329
SQLSTATE, SQLSTATE_SYM
330
SQLWARNING, SQLWARNING_SYM
331
SQL_BIG_RESULT, SQL_BIG_RESULT
332
SQL_BUFFER_RESULT, SQL_BUFFER_RESULT
333
SQL_CALC_FOUND_ROWS, SQL_CALC_FOUND_ROWS
334
SQL_SMALL_RESULT, SQL_SMALL_RESULT
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
335
SQL_TSI_DAY, DAY_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
336
SQL_TSI_FRAC_SECOND, FRAC_SECOND_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
337
SQL_TSI_HOUR, HOUR_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
338
SQL_TSI_MINUTE, MINUTE_SYM
339
SQL_TSI_MONTH, MONTH_SYM
340
SQL_TSI_QUARTER, QUARTER_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
341
SQL_TSI_SECOND, SECOND_SYM
342
SQL_TSI_WEEK, WEEK_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
343
SQL_TSI_YEAR, YEAR_SYM
344
START, START_SYM
345
STARTING, STARTING
346
STATUS, STATUS_SYM
347
STOP, STOP_SYM
348
STORED, STORED_SYM
349
STRAIGHT_JOIN, STRAIGHT_JOIN
350
STRING, STRING_SYM
351
SUBJECT, SUBJECT_SYM
352
SUSPEND, SUSPEND_SYM
353
TABLE, TABLE_SYM
354
TABLES, TABLES
355
TABLESPACE, TABLESPACE
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
356
TEMPORARY, TEMPORARY_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
357
TERMINATED, TERMINATED
358
TEXT, TEXT_SYM
359
THEN, THEN_SYM
1999.4.7 by Brian Aker
Merge in first pass of TIME type (closer to EPOCH time).
360
TIME, TIME_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
361
TIMESTAMP, TIMESTAMP_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
362
TIMESTAMPADD, TIMESTAMP_ADD
363
TIMESTAMPDIFF, TIMESTAMP_DIFF
364
TINYBLOB, BLOB_SYM
365
TINYTEXT, TEXT_SYM
366
TO, TO_SYM
367
TRAILING, TRAILING
779.3.39 by Monty Taylor
Fixed over-zealous trimming of symbol_hash during merge.
368
TRANSACTION, TRANSACTION_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
369
TRUE, TRUE_SYM
370
TRUNCATE, TRUNCATE_SYM
371
TYPE, TYPE_SYM
372
UNCOMMITTED, UNCOMMITTED_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
373
UNDO, UNDO_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
374
UNDOFILE, UNDOFILE_SYM
375
UNION, UNION_SYM
376
UNIQUE, UNIQUE_SYM
377
UNKNOWN, UNKNOWN_SYM
378
UNLOCK, UNLOCK_SYM
2008.2.3 by Brian Aker
Fixing up a, somewhat, hidden unsigned type to solve a few issues around
379
UNSIGNED, UNSIGNED_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
380
UPDATE, UPDATE_SYM
381
USAGE, USAGE
382
USE, USE_SYM
383
USER, USER
384
USING, USING
385
UTC_DATE, UTC_DATE_SYM
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
386
UTC_TIMESTAMP, UTC_TIMESTAMP_SYM
1996.2.1 by Brian Aker
uuid type code.
387
UUID, UUID_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
388
VALUE, VALUE_SYM
389
VALUES, VALUES
390
VARBINARY, VARBINARY
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
391
VARCHAR, VARCHAR_SYM
392
VARCHARACTER, VARCHAR_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
393
VARIABLES, VARIABLES
394
VARYING, VARYING
2029.1.28 by Brian Aker
Remove a couple of dead keywords.
395
WAIT, WAIT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
396
WARNINGS, WARNINGS
397
WEEK, WEEK_SYM
398
WHEN, WHEN_SYM
399
WHERE, WHERE
400
WITH, WITH
401
WORK, WORK_SYM
402
WRITE, WRITE_SYM
403
XOR, XOR
404
YEAR, YEAR_SYM
405
YEAR_MONTH, YEAR_MONTH_SYM
2008.2.3 by Brian Aker
Fixing up a, somewhat, hidden unsigned type to solve a few issues around
406
ZEROFILL, ZEROFILL_SYM