~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_non_reserved_words.gperf

  • Committer: Brian Aker
  • Date: 2011-01-05 16:29:27 UTC
  • mto: (2060.2.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2063.
  • Revision ID: brian@tangent.org-20110105162927-fi2gnmlz35qcagik
Add additional gperf for non-reserved SQL keywords.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%{
 
2
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
3
 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
4
 *
 
5
 *  Copyright (C) 2011 Brian Aker
 
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; either version 2 of the License, or
 
10
 *  (at your option) any later version.
 
11
 *
 
12
 *  This program is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 *  GNU General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU General Public License
 
18
 *  along with this program; if not, write to the Free Software
 
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
20
 */
 
21
 
 
22
 
 
23
#include <cstring>
 
24
 
 
25
#ifndef DRIZZLED_NON_SQL_RESERVED_WORDS_H
 
26
#define DRIZZLED_NON_SQL_RESERVED_WORDS_H
 
27
 
 
28
/* This file includes all SQL:2003 reserved words */
 
29
 
 
30
namespace drizzled {
 
31
namespace sql {
 
32
 
 
33
enum keyword_t {
 
34
  A,
 
35
  ABSOLUTE,
 
36
  ACTION,
 
37
  ADA,
 
38
  ADD,
 
39
  ADMIN,
 
40
  AFTER,
 
41
  ALWAYS,
 
42
  ASC,
 
43
  ASSERTION,
 
44
  ASSIGNMENT,
 
45
  ATTRIBUTE,
 
46
  ATTRIBUTES,
 
47
  BASE64,
 
48
  BEFORE,
 
49
  BERNOULLI,
 
50
  BREADTH,
 
51
  C,
 
52
  CASCADE,
 
53
  CATALOG,
 
54
  CATALOG_NAME,
 
55
  CHAIN,
 
56
  CHARACTERISTICS,
 
57
  CHARACTERS,
 
58
  CHARACTER_SET_CATALOG,
 
59
  CHARACTER_SET_NAME,
 
60
  CHARACTER_SET_SCHEMA,
 
61
  CLASS_ORIGIN,
 
62
  COBOL,
 
63
  COLLATION,
 
64
  COLLATION_CATALOG,
 
65
  COLLATION_NAME,
 
66
  COLLATION_SCHEMA,
 
67
  COLUMN_NAME,
 
68
  COMMAND_FUNCTION,
 
69
  COMMAND_FUNCTION_CODE,
 
70
  COMMITTED,
 
71
  CONDITION_NUMBER,
 
72
  CONNECTION,
 
73
  CONNECTION_NAME,
 
74
  CONSTRAINTS,
 
75
  CONSTRAINT_CATALOG,
 
76
  CONSTRAINT_NAME,
 
77
  CONSTRAINT_SCHEMA,
 
78
  CONSTRUCTOR,
 
79
  CONTAINS,
 
80
  CONTENT,
 
81
  CONTINUE,
 
82
  CURSOR_NAME,
 
83
  DATA,
 
84
  DATETIME_INTERVAL_CODE,
 
85
  DATETIME_INTERVAL_PRECISION,
 
86
  DEFAULTS,
 
87
  DEFERRABLE,
 
88
  DEFERRED,
 
89
  DEFINED,
 
90
  DEFINER,
 
91
  DEGREE,
 
92
  DEPTH,
 
93
  DERIVED,
 
94
  DESC,
 
95
  DESCRIPTOR,
 
96
  DIAGNOSTICS,
 
97
  DISPATCH,
 
98
  DOCUMENT,
 
99
  DOMAIN,
 
100
  DYNAMIC_FUNCTION,
 
101
  DYNAMIC_FUNCTION_CODE,
 
102
  EQUALS,
 
103
  EXCEPTION,
 
104
  EXCLUDE,
 
105
  EXCLUDING,
 
106
  FINAL,
 
107
  FIRST,
 
108
  FOLLOWING,
 
109
  FORTRAN,
 
110
  FOUND,
 
111
  G,
 
112
  GENERAL,
 
113
  GENERATED,
 
114
  GO,
 
115
  GOTO,
 
116
  GRANTED,
 
117
  HEX,
 
118
  HIERARCHY,
 
119
  IMMEDIATE,
 
120
  IMPLEMENTATION,
 
121
  INCLUDING,
 
122
  INCREMENT,
 
123
  INITIALLY,
 
124
  INPUT,
 
125
  INSTANCE,
 
126
  INSTANTIABLE,
 
127
  INVOKER,
 
128
  ISOLATION,
 
129
  K,
 
130
  KEY,
 
131
  KEY_MEMBER,
 
132
  KEY_TYPE,
 
133
  LAST,
 
134
  LENGTH,
 
135
  LEVEL,
 
136
  LOCATOR,
 
137
  M,
 
138
  MAP,
 
139
  MATCHED,
 
140
  MAXVALUE,
 
141
  MESSAGE_LENGTH,
 
142
  MESSAGE_OCTET_LENGTH,
 
143
  MESSAGE_TEXT,
 
144
  MINVALUE,
 
145
  MORE,
 
146
  MUMPS,
 
147
  NAME,
 
148
  NAMES,
 
149
  NESTING,
 
150
  NEXT,
 
151
  NORMALIZED,
 
152
  NULLABLE,
 
153
  NULLS,
 
154
  NUMBER,
 
155
  OBJECT,
 
156
  OCTETS,
 
157
  OPTION,
 
158
  OPTIONS,
 
159
  ORDERING,
 
160
  ORDINALITY,
 
161
  OTHERS,
 
162
  OUTPUT,
 
163
  OVERRIDING,
 
164
  PAD,
 
165
  PARAMETER_MODE,
 
166
  PARAMETER_NAME,
 
167
  PARAMETER_ORDINAL_POSITION,
 
168
  PARAMETER_SPECIFIC_CATALOG,
 
169
  PARAMETER_SPECIFIC_NAME,
 
170
  PARAMETER_SPECIFIC_SCHEMA,
 
171
  PARTIAL,
 
172
  PASCAL,
 
173
  PATH,
 
174
  PLACING,
 
175
  PLI,
 
176
  PRECEDING,
 
177
  PRESERVE,
 
178
  PRIOR,
 
179
  PRIVILEGES,
 
180
  PUBLIC,
 
181
  READ,
 
182
  RELATIVE,
 
183
  REPEATABLE,
 
184
  RESTART,
 
185
  RESTRICT,
 
186
  RETURNED_CARDINALITY,
 
187
  RETURNED_LENGTH,
 
188
  RETURNED_OCTET_LENGTH,
 
189
  RETURNED_SQLSTATE,
 
190
  ROLE,
 
191
  ROUTINE,
 
192
  ROUTINE_CATALOG,
 
193
  ROUTINE_NAME,
 
194
  ROUTINE_SCHEMA,
 
195
  ROW_COUNT,
 
196
  SCALE,
 
197
  SCHEMA,
 
198
  SCHEMA_NAME,
 
199
  SCOPE_CATALOG,
 
200
  SCOPE_NAME,
 
201
  SCOPE_SCHEMA,
 
202
  SECTION,
 
203
  SECURITY,
 
204
  SELF,
 
205
  SEQUENCE,
 
206
  SERIALIZABLE,
 
207
  SERVER_NAME,
 
208
  SESSION,
 
209
  SETS,
 
210
  SIMPLE,
 
211
  SIZE,
 
212
  SOURCE,
 
213
  SPACE,
 
214
  SPECIFIC_NAME,
 
215
  STANDALONE,
 
216
  STATE,
 
217
  STATEMENT,
 
218
  STRIP,
 
219
  STRUCTURE,
 
220
  STYLE,
 
221
  SUBCLASS_ORIGIN,
 
222
  TABLE_NAME,
 
223
  TEMPORARY,
 
224
  TIES,
 
225
  TOP_LEVEL_COUNT,
 
226
  TRANSACTION,
 
227
  TRANSACTIONS_COMMITTED,
 
228
  TRANSACTIONS_ROLLED_BACK,
 
229
  TRANSACTION_ACTIVE,
 
230
  TRANSFORM,
 
231
  TRANSFORMS,
 
232
  TRIGGER_CATALOG,
 
233
  TRIGGER_NAME,
 
234
  TRIGGER_SCHEMA,
 
235
  TYPE,
 
236
  UNBOUNDED,
 
237
  UNCOMMITTED,
 
238
  UNDER,
 
239
  UNNAMED,
 
240
  USAGE,
 
241
  USER_DEFINED_TYPE_CATALOG,
 
242
  USER_DEFINED_TYPE_CODE,
 
243
  USER_DEFINED_TYPE_NAME,
 
244
  USER_DEFINED_TYPE_SCHEMA,
 
245
  VERSION,
 
246
  VIEW,
 
247
  WHITESPACE,
 
248
  WORK,
 
249
  WRITE,
 
250
  ZONE
 
251
};
 
252
 
 
253
} // namespace sql
 
254
} // namespace drizzled
 
255
 
 
256
using namespace drizzled;
 
257
 
 
258
struct keyword_st
 
259
{
 
260
  const char* name;
 
261
  sql::keyword_t code;
 
262
};
 
263
 
 
264
%}
 
265
struct keyword_st
 
266
{
 
267
  const char* name;
 
268
  sql::keyword_t code;
 
269
};
 
270
%%
 
271
A, A
 
272
ABSOLUTE, ABSOLUTE
 
273
ACTION, ACTION
 
274
ADA, ADA
 
275
ADD, ADD
 
276
ADMIN, ADMIN
 
277
AFTER, AFTER
 
278
ALWAYS, ALWAYS
 
279
ASC, ASC
 
280
ASSERTION, ASSERTION
 
281
ASSIGNMENT, ASSIGNMENT
 
282
ATTRIBUTE, ATTRIBUTE
 
283
ATTRIBUTES, ATTRIBUTES
 
284
BASE64, BASE64
 
285
BEFORE, BEFORE
 
286
BERNOULLI, BERNOULLI
 
287
BREADTH, BREADTH
 
288
C, C
 
289
CASCADE, CASCADE
 
290
CATALOG, CATALOG
 
291
CATALOG_NAME, CATALOG_NAME
 
292
CHAIN, CHAIN
 
293
CHARACTERISTICS, CHARACTERISTICS
 
294
CHARACTERS, CHARACTERS
 
295
CHARACTER_SET_CATALOG, CHARACTER_SET_CATALOG
 
296
CHARACTER_SET_NAME, CHARACTER_SET_NAME
 
297
CHARACTER_SET_SCHEMA, CHARACTER_SET_SCHEMA
 
298
CLASS_ORIGIN, CLASS_ORIGIN
 
299
COBOL, COBOL
 
300
COLLATION, COLLATION
 
301
COLLATION_CATALOG, COLLATION_CATALOG
 
302
COLLATION_NAME, COLLATION_NAME
 
303
COLLATION_SCHEMA, COLLATION_SCHEMA
 
304
COLUMN_NAME, COLUMN_NAME
 
305
COMMAND_FUNCTION, COMMAND_FUNCTION
 
306
COMMAND_FUNCTION_CODE, COMMAND_FUNCTION_CODE
 
307
COMMITTED, COMMITTED
 
308
CONDITION_NUMBER, CONDITION_NUMBER
 
309
CONNECTION, CONNECTION
 
310
CONNECTION_NAME, CONNECTION_NAME
 
311
CONSTRAINTS, CONSTRAINTS
 
312
CONSTRAINT_CATALOG, CONSTRAINT_CATALOG
 
313
CONSTRAINT_NAME, CONSTRAINT_NAME
 
314
CONSTRAINT_SCHEMA, CONSTRAINT_SCHEMA
 
315
CONSTRUCTOR, CONSTRUCTOR
 
316
CONTAINS, CONTAINS
 
317
CONTENT, CONTENT
 
318
CONTINUE, CONTINUE
 
319
CURSOR_NAME, CURSOR_NAME
 
320
DATA, DATA
 
321
DATETIME_INTERVAL_CODE, DATETIME_INTERVAL_CODE
 
322
DATETIME_INTERVAL_PRECISION, DATETIME_INTERVAL_PRECISION
 
323
DEFAULTS, DEFAULTS
 
324
DEFERRABLE, DEFERRABLE
 
325
DEFERRED, DEFERRED
 
326
DEFINED, DEFINED
 
327
DEFINER, DEFINER
 
328
DEGREE, DEGREE
 
329
DEPTH, DEPTH
 
330
DERIVED, DERIVED
 
331
DESC, DESC
 
332
DESCRIPTOR, DESCRIPTOR
 
333
DIAGNOSTICS, DIAGNOSTICS
 
334
DISPATCH, DISPATCH
 
335
DOCUMENT, DOCUMENT
 
336
DOMAIN, DOMAIN
 
337
DYNAMIC_FUNCTION, DYNAMIC_FUNCTION
 
338
DYNAMIC_FUNCTION_CODE, DYNAMIC_FUNCTION_CODE
 
339
EQUALS, EQUALS
 
340
EXCEPTION, EXCEPTION
 
341
EXCLUDE, EXCLUDE
 
342
EXCLUDING, EXCLUDING
 
343
FINAL, FINAL
 
344
FIRST, FIRST
 
345
FOLLOWING, FOLLOWING
 
346
FORTRAN, FORTRAN
 
347
FOUND, FOUND
 
348
G, G
 
349
GENERAL, GENERAL
 
350
GENERATED, GENERATED
 
351
GO, GO
 
352
GOTO, GOTO
 
353
GRANTED, GRANTED
 
354
HEX, HEX
 
355
HIERARCHY, HIERARCHY
 
356
IMMEDIATE, IMMEDIATE
 
357
IMPLEMENTATION, IMPLEMENTATION
 
358
INCLUDING, INCLUDING
 
359
INCREMENT, INCREMENT
 
360
INITIALLY, INITIALLY
 
361
INPUT, INPUT
 
362
INSTANCE, INSTANCE
 
363
INSTANTIABLE, INSTANTIABLE
 
364
INVOKER, INVOKER
 
365
ISOLATION, ISOLATION
 
366
K, K
 
367
KEY, KEY
 
368
KEY_MEMBER, KEY_MEMBER
 
369
KEY_TYPE, KEY_TYPE
 
370
LAST, LAST
 
371
LENGTH, LENGTH
 
372
LEVEL, LEVEL
 
373
LOCATOR, LOCATOR
 
374
M, M
 
375
MAP, MAP
 
376
MATCHED, MATCHED
 
377
MAXVALUE, MAXVALUE
 
378
MESSAGE_LENGTH, MESSAGE_LENGTH
 
379
MESSAGE_OCTET_LENGTH, MESSAGE_OCTET_LENGTH
 
380
MESSAGE_TEXT, MESSAGE_TEXT
 
381
MINVALUE, MINVALUE
 
382
MORE, MORE
 
383
MUMPS, MUMPS
 
384
NAME, NAME
 
385
NAMES, NAMES
 
386
NESTING, NESTING
 
387
NEXT, NEXT
 
388
NORMALIZED, NORMALIZED
 
389
NULLABLE, NULLABLE
 
390
NULLS, NULLS
 
391
NUMBER, NUMBER
 
392
OBJECT, OBJECT
 
393
OCTETS, OCTETS
 
394
OPTION, OPTION
 
395
OPTIONS, OPTIONS
 
396
ORDERING, ORDERING
 
397
ORDINALITY, ORDINALITY
 
398
OTHERS, OTHERS
 
399
OUTPUT, OUTPUT
 
400
OVERRIDING, OVERRIDING
 
401
PAD, PAD
 
402
PARAMETER_MODE, PARAMETER_MODE
 
403
PARAMETER_NAME, PARAMETER_NAME
 
404
PARAMETER_ORDINAL_POSITION, PARAMETER_ORDINAL_POSITION
 
405
PARAMETER_SPECIFIC_CATALOG, PARAMETER_SPECIFIC_CATALOG
 
406
PARAMETER_SPECIFIC_NAME, PARAMETER_SPECIFIC_NAME
 
407
PARAMETER_SPECIFIC_SCHEMA, PARAMETER_SPECIFIC_SCHEMA
 
408
PARTIAL, PARTIAL
 
409
PASCAL, PASCAL
 
410
PATH, PATH
 
411
PLACING, PLACING
 
412
PLI, PLI
 
413
PRECEDING, PRECEDING
 
414
PRESERVE, PRESERVE
 
415
PRIOR, PRIOR
 
416
PRIVILEGES, PRIVILEGES
 
417
PUBLIC, PUBLIC
 
418
READ, READ
 
419
RELATIVE, RELATIVE
 
420
REPEATABLE, REPEATABLE
 
421
RESTART, RESTART
 
422
RESTRICT, RESTRICT
 
423
RETURNED_CARDINALITY, RETURNED_CARDINALITY
 
424
RETURNED_LENGTH, RETURNED_LENGTH
 
425
RETURNED_OCTET_LENGTH, RETURNED_OCTET_LENGTH
 
426
RETURNED_SQLSTATE, RETURNED_SQLSTATE
 
427
ROLE, ROLE
 
428
ROUTINE, ROUTINE
 
429
ROUTINE_CATALOG, ROUTINE_CATALOG
 
430
ROUTINE_NAME, ROUTINE_NAME
 
431
ROUTINE_SCHEMA, ROUTINE_SCHEMA
 
432
ROW_COUNT, ROW_COUNT
 
433
SCALE, SCALE
 
434
SCHEMA, SCHEMA
 
435
SCHEMA_NAME, SCHEMA_NAME
 
436
SCOPE_CATALOG, SCOPE_CATALOG
 
437
SCOPE_NAME, SCOPE_NAME
 
438
SCOPE_SCHEMA, SCOPE_SCHEMA
 
439
SECTION, SECTION
 
440
SECURITY, SECURITY
 
441
SELF, SELF
 
442
SEQUENCE, SEQUENCE
 
443
SERIALIZABLE, SERIALIZABLE
 
444
SERVER_NAME, SERVER_NAME
 
445
SESSION, SESSION
 
446
SETS, SETS
 
447
SIMPLE, SIMPLE
 
448
SIZE, SIZE
 
449
SOURCE, SOURCE
 
450
SPACE, SPACE
 
451
SPECIFIC_NAME, SPECIFIC_NAME
 
452
STANDALONE, STANDALONE
 
453
STATE, STATE
 
454
STATEMENT, STATEMENT
 
455
STRIP, STRIP
 
456
STRUCTURE, STRUCTURE
 
457
STYLE, STYLE
 
458
SUBCLASS_ORIGIN, SUBCLASS_ORIGIN
 
459
TABLE_NAME, TABLE_NAME
 
460
TEMPORARY, TEMPORARY
 
461
TIES, TIES
 
462
TOP_LEVEL_COUNT, TOP_LEVEL_COUNT
 
463
TRANSACTION, TRANSACTION
 
464
TRANSACTIONS_COMMITTED, TRANSACTIONS_COMMITTED
 
465
TRANSACTIONS_ROLLED_BACK, TRANSACTIONS_ROLLED_BACK
 
466
TRANSACTION_ACTIVE, TRANSACTION_ACTIVE
 
467
TRANSFORM, TRANSFORM
 
468
TRANSFORMS, TRANSFORMS
 
469
TRIGGER_CATALOG, TRIGGER_CATALOG
 
470
TRIGGER_NAME, TRIGGER_NAME
 
471
TRIGGER_SCHEMA, TRIGGER_SCHEMA
 
472
TYPE, TYPE
 
473
UNBOUNDED, UNBOUNDED
 
474
UNCOMMITTED, UNCOMMITTED
 
475
UNDER, UNDER
 
476
UNNAMED, UNNAMED
 
477
USAGE, USAGE
 
478
USER_DEFINED_TYPE_CATALOG, USER_DEFINED_TYPE_CATALOG
 
479
USER_DEFINED_TYPE_CODE, USER_DEFINED_TYPE_CODE
 
480
USER_DEFINED_TYPE_NAME, USER_DEFINED_TYPE_NAME
 
481
USER_DEFINED_TYPE_SCHEMA, USER_DEFINED_TYPE_SCHEMA
 
482
VERSION, VERSION
 
483
VIEW, VIEW
 
484
WHITESPACE, WHITESPACE
 
485
WORK, WORK
 
486
WRITE, WRITE
 
487
ZONE, ZONE
 
488
%%
 
489
 
 
490
#endif /* DRIZZLED_NON_SQL_RESERVED_WORDS_H */