~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
 *
5
 *  Copyright (C) 2008 Sun Microsystems
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
%%
45
<, LT
46
<=, LE
47
<>, NE
48
!=, NE
49
=, EQ
50
>, GT_SYM
51
>=, GE
52
<=>, EQUAL_SYM
53
ACTION, ACTION
54
ADD, ADD
55
AFTER, AFTER_SYM
56
AGGREGATE, AGGREGATE_SYM
57
ALL, ALL
58
ALTER, ALTER
59
ANALYZE, ANALYZE_SYM
60
AND, AND_SYM
61
ANY, ANY_SYM
62
AS, AS
63
ASC, ASC
64
ASENSITIVE, ASENSITIVE_SYM
65
AT, AT_SYM
66
AUTO_INCREMENT, AUTO_INC
67
AVG, AVG_SYM
68
AVG_ROW_LENGTH, AVG_ROW_LENGTH
69
BEFORE, BEFORE_SYM
70
BEGIN, BEGIN_SYM
71
BETWEEN, BETWEEN_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
72
BIGINT, BIGINT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
73
BINARY, BINARY
74
BIT, BIT_SYM
75
BLOB, BLOB_SYM
76
BOOL, BOOL_SYM
77
BOOLEAN, BOOLEAN_SYM
78
BOTH, BOTH
79
BTREE, BTREE_SYM
80
BY, BY
81
BYTE, BYTE_SYM
82
CALL, CALL_SYM
83
CASCADE, CASCADE
84
CASCADED, CASCADED
85
CASE, CASE_SYM
86
CHAIN, CHAIN_SYM
87
CHANGE, CHANGE
88
CHAR, CHAR_SYM
89
CHARACTER, CHAR_SYM
90
CHECK, CHECK_SYM
91
CHECKSUM, CHECKSUM_SYM
92
CLOSE, CLOSE_SYM
93
COALESCE, COALESCE
94
COLLATE, COLLATE_SYM
95
COLLATION, COLLATION_SYM
96
COLUMN, COLUMN_SYM
97
COLUMNS, COLUMNS
98
COMMENT, COMMENT_SYM
99
COMMIT, COMMIT_SYM
100
COMMITTED, COMMITTED_SYM
101
COMPACT, COMPACT_SYM
102
COMPRESSED, COMPRESSED_SYM
103
CONCURRENT, CONCURRENT
104
CONDITION, CONDITION_SYM
105
CONNECTION, CONNECTION_SYM
106
CONSISTENT, CONSISTENT_SYM
107
CONSTRAINT, CONSTRAINT
108
CONTAINS, CONTAINS_SYM
109
CONTINUE, CONTINUE_SYM
110
CONVERT, CONVERT_SYM
111
CREATE, CREATE
112
CROSS, CROSS
113
CUBE, CUBE_SYM
114
CURRENT_DATE, CURDATE
115
CURRENT_TIMESTAMP, NOW_SYM
116
CURRENT_USER, CURRENT_USER
117
CURSOR, CURSOR_SYM
118
DATA, DATA_SYM
119
DATABASE, DATABASE
120
DATABASES, DATABASES
121
DATAFILE, DATAFILE_SYM
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
# Access likes this
142
DISTINCTROW, DISTINCT
143
DIV, DIV_SYM
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
ELSEIF, ELSEIF_SYM
152
ENABLE, ENABLE_SYM
153
ENCLOSED, ENCLOSED
154
END, END
155
ENDS, ENDS_SYM
156
ENGINE, ENGINE_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
157
ENUM, ENUM_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
158
ERRORS, ERRORS
159
ESCAPE, ESCAPE_SYM
160
ESCAPED, ESCAPED
161
EXCLUSIVE, EXCLUSIVE_SYM
162
EXISTS, EXISTS
163
EXPLAIN, DESCRIBE
164
EXTENDED, EXTENDED_SYM
165
FALSE, FALSE_SYM
166
FETCH, FETCH_SYM
167
COLUMN_FORMAT, COLUMN_FORMAT_SYM
168
FIELDS, COLUMNS
169
FILE, FILE_SYM
170
FIRST, FIRST_SYM
171
FIXED, FIXED_SYM
172
FLOAT, DOUBLE_SYM
173
FLUSH, FLUSH_SYM
174
FOR, FOR_SYM
175
FORCE, FORCE_SYM
176
FOREIGN, FOREIGN
177
FOUND, FOUND_SYM
178
FRAC_SECOND, FRAC_SECOND_SYM
179
FROM, FROM
180
FULL, FULL
181
GLOBAL, GLOBAL_SYM
182
GROUP, GROUP_SYM
183
HASH, HASH_SYM
184
HAVING, HAVING
185
HOUR, HOUR_SYM
186
HOUR_MICROSECOND, HOUR_MICROSECOND_SYM
187
HOUR_MINUTE, HOUR_MINUTE_SYM
188
HOUR_SECOND, HOUR_SECOND_SYM
189
IDENTIFIED, IDENTIFIED_SYM
190
IF, IF
191
IGNORE, IGNORE_SYM
192
IMPORT, IMPORT
193
IN, IN_SYM
194
INDEX, INDEX_SYM
195
INDEXES, INDEXES
196
INFILE, INFILE
197
INNER, INNER_SYM
198
INOUT, INOUT_SYM
199
INSENSITIVE, INSENSITIVE_SYM
200
INSERT, INSERT
201
INT, INT_SYM
202
INT4, INT_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
203
INT8, BIGINT_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
204
INTEGER, INT_SYM
205
INTERVAL, INTERVAL_SYM
206
INTO, INTO
207
IS, IS
208
ISOLATION, ISOLATION
209
ITERATE, ITERATE_SYM
210
JOIN, JOIN_SYM
211
KEY, KEY_SYM
212
KEYS, KEYS
213
KEY_BLOCK_SIZE, KEY_BLOCK_SIZE
214
KILL, KILL_SYM
215
LAST, LAST_SYM
216
LEADING, LEADING
217
LEFT, LEFT
218
LEVEL, LEVEL_SYM
219
LIKE, LIKE
220
LIMIT, LIMIT
221
LINES, LINES
222
LIST, LIST_SYM
223
LOAD, LOAD
224
LOCAL, LOCAL_SYM
225
LOCALTIME, NOW_SYM
226
LOCALTIMESTAMP, NOW_SYM
227
LOCK, LOCK_SYM
228
LOCKS, LOCKS_SYM
229
LOGS, LOGS_SYM
230
LONG, LONG_SYM
231
LONGBLOB, BLOB_SYM
232
LONGTEXT, TEXT_SYM
233
LOOP, LOOP_SYM
234
MATCH, MATCH
235
MAX_ROWS, MAX_ROWS
236
MAX_SIZE, MAX_SIZE_SYM
237
MAXVALUE, MAX_VALUE_SYM
238
MEDIUM, MEDIUM_SYM
239
MEDIUMBLOB, BLOB_SYM
240
MEDIUMTEXT, TEXT_SYM
241
MERGE, MERGE_SYM
242
MICROSECOND, MICROSECOND_SYM
243
MINUTE, MINUTE_SYM
244
MINUTE_MICROSECOND, MINUTE_MICROSECOND_SYM
245
MINUTE_SECOND, MINUTE_SECOND_SYM
246
MIN_ROWS, MIN_ROWS
247
MOD, MOD_SYM
248
MODE, MODE_SYM
249
MODIFIES, MODIFIES_SYM
250
MODIFY, MODIFY_SYM
251
MONTH, MONTH_SYM
252
NAME, NAME_SYM
253
NAMES, NAMES_SYM
254
NATIONAL, NATIONAL_SYM
255
NATURAL, NATURAL
256
NEW, NEW_SYM
257
NEXT, NEXT_SYM
258
NO, NO_SYM
259
NONE, NONE_SYM
260
NOT, NOT_SYM
261
NULL, NULL_SYM
262
NUMERIC, NUMERIC_SYM
263
OFFLINE, OFFLINE_SYM
264
OFFSET, OFFSET_SYM
265
ON, ON
266
ONE, ONE_SYM
267
ONLINE, ONLINE_SYM
268
OPEN, OPEN_SYM
269
OPTIMIZE, OPTIMIZE
270
OPTION, OPTION
271
OPTIONALLY, OPTIONALLY
272
OR, OR_SYM
273
ORDER, ORDER_SYM
274
OUT, OUT_SYM
275
OUTER, OUTER
276
OUTFILE, OUTFILE
277
PAGE, PAGE_SYM
278
PARTIAL, PARTIAL
279
PHASE, PHASE_SYM
280
PRECISION, PRECISION
281
PREV, PREV_SYM
282
PRIMARY, PRIMARY_SYM
283
PROCESS, PROCESS
284
PROCESSLIST, PROCESSLIST_SYM
285
QUARTER, QUARTER_SYM
286
QUERY, QUERY_SYM
287
RANGE, RANGE_SYM
288
READ, READ_SYM
289
READ_ONLY, READ_ONLY_SYM
290
READ_WRITE, READ_WRITE_SYM
291
READS, READS_SYM
292
REAL, REAL
293
REDUNDANT, REDUNDANT_SYM
294
REFERENCES, REFERENCES
295
RELEASE, RELEASE_SYM
296
RENAME, RENAME
297
REPEATABLE, REPEATABLE_SYM
298
REPLACE, REPLACE
299
REPEAT, REPEAT_SYM
300
RESTRICT, RESTRICT
301
RETURN, RETURN_SYM
302
RETURNS, RETURNS_SYM
303
REVERSE, REVERSE_SYM
304
REVOKE, REVOKE
305
RIGHT, RIGHT
306
ROLLBACK, ROLLBACK_SYM
307
ROLLUP, ROLLUP_SYM
308
ROUTINE, ROUTINE_SYM
309
ROW, ROW_SYM
310
ROWS, ROWS_SYM
311
ROW_FORMAT, ROW_FORMAT_SYM
312
SAVEPOINT, SAVEPOINT_SYM
313
SCHEMA, DATABASE
314
SCHEMAS, DATABASES
315
SECOND, SECOND_SYM
316
SECOND_MICROSECOND, SECOND_MICROSECOND_SYM
317
SECURITY, SECURITY_SYM
318
SELECT, SELECT_SYM
319
SENSITIVE, SENSITIVE_SYM
320
SEPARATOR, SEPARATOR_SYM
321
SERIAL, SERIAL_SYM
322
SERIALIZABLE, SERIALIZABLE_SYM
323
SESSION, SESSION_SYM
324
SERVER, SERVER_SYM
325
SET, SET
326
SHARE, SHARE_SYM
327
SHOW, SHOW
328
SHUTDOWN, SHUTDOWN
329
SIMPLE, SIMPLE_SYM
330
SNAPSHOT, SNAPSHOT_SYM
331
SOME, ANY_SYM
332
SPECIFIC, SPECIFIC_SYM
333
SQL, SQL_SYM
334
SQLEXCEPTION, SQLEXCEPTION_SYM
335
SQLSTATE, SQLSTATE_SYM
336
SQLWARNING, SQLWARNING_SYM
337
SQL_BIG_RESULT, SQL_BIG_RESULT
338
SQL_BUFFER_RESULT, SQL_BUFFER_RESULT
339
SQL_CALC_FOUND_ROWS, SQL_CALC_FOUND_ROWS
340
SQL_SMALL_RESULT, SQL_SMALL_RESULT
341
SQL_TSI_FRAC_SECOND, FRAC_SECOND_SYM
342
SQL_TSI_SECOND, SECOND_SYM
343
SQL_TSI_MINUTE, MINUTE_SYM
344
SQL_TSI_HOUR, HOUR_SYM
345
SQL_TSI_DAY, DAY_SYM
346
SQL_TSI_WEEK, WEEK_SYM
347
SQL_TSI_MONTH, MONTH_SYM
348
SQL_TSI_QUARTER, QUARTER_SYM
349
SQL_TSI_YEAR, YEAR_SYM
350
START, START_SYM
351
STARTING, STARTING
352
STATUS, STATUS_SYM
353
STOP, STOP_SYM
354
STORAGE, STORAGE_SYM
355
STORED, STORED_SYM
356
STRAIGHT_JOIN, STRAIGHT_JOIN
357
STRING, STRING_SYM
358
SUBJECT, SUBJECT_SYM
359
SUSPEND, SUSPEND_SYM
360
SWAPS, SWAPS_SYM
361
SWITCHES, SWITCHES_SYM
362
TABLE, TABLE_SYM
363
TABLES, TABLES
364
TABLESPACE, TABLESPACE
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
365
TEMPORARY, TEMPORARY_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
366
TERMINATED, TERMINATED
367
TEXT, TEXT_SYM
368
THEN, THEN_SYM
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
369
TIMESTAMP, TIMESTAMP_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
370
TIMESTAMPADD, TIMESTAMP_ADD
371
TIMESTAMPDIFF, TIMESTAMP_DIFF
372
TINYBLOB, BLOB_SYM
373
TINYTEXT, TEXT_SYM
374
TO, TO_SYM
375
TRAILING, TRAILING
779.3.39 by Monty Taylor
Fixed over-zealous trimming of symbol_hash during merge.
376
TRANSACTION, TRANSACTION_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
377
TRUE, TRUE_SYM
378
TRUNCATE, TRUNCATE_SYM
379
TYPE, TYPE_SYM
380
TYPES, TYPES_SYM
381
UNCOMMITTED, UNCOMMITTED_SYM
382
UNDOFILE, UNDOFILE_SYM
383
UNDO, UNDO_SYM
384
UNION, UNION_SYM
385
UNIQUE, UNIQUE_SYM
386
UNKNOWN, UNKNOWN_SYM
387
UNLOCK, UNLOCK_SYM
388
UPDATE, UPDATE_SYM
389
USAGE, USAGE
390
USE, USE_SYM
391
USER, USER
392
USING, USING
393
UTC_DATE, UTC_DATE_SYM
394
UTC_TIMESTAMP, UTC_TIMESTAMP_SYM
395
VALUE, VALUE_SYM
396
VALUES, VALUES
397
VARBINARY, VARBINARY
1008.3.17 by Stewart Smith
Start work to construct table proto in parser:
398
VARCHAR, VARCHAR_SYM
399
VARCHARACTER, VARCHAR_SYM
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
400
VARIABLES, VARIABLES
401
VARYING, VARYING
402
WARNINGS, WARNINGS
403
WEEK, WEEK_SYM
404
WHEN, WHEN_SYM
405
WHERE, WHERE
406
WITH, WITH
407
WORK, WORK_SYM
408
WRITE, WRITE_SYM
409
XOR, XOR
410
YEAR, YEAR_SYM
411
YEAR_MONTH, YEAR_MONTH_SYM