MySQL 8.0.29
Source Code Documentation
lex_symbol.h
Go to the documentation of this file.
1/* Copyright (c) 2000, 2021, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23/* This struct includes all reserved words and functions */
24
25#ifndef _lex_symbol_h
26#define _lex_symbol_h
27
29 SG_KEYWORDS = 1 << 0, // SQL keywords and reserved words
30 SG_FUNCTIONS = 1 << 1, // very special native SQL functions
31 SG_HINTABLE_KEYWORDS = 1 << 2, // SQL keywords that accept optimizer hints
32 SG_HINTS = 1 << 3, // optimizer hint parser keywords
33
34 /* All tokens of the main parser: */
36};
37
38struct SYMBOL {
39 const char *name;
40 const unsigned int length;
41 const unsigned int tok;
42 /** group mask, see SYM_GROUP enum for bits. */
43 int group;
44};
45
46struct LEX_SYMBOL {
47 const SYMBOL *symbol;
48 char *str;
49 unsigned int length;
50};
51
52#endif /* _lex_symbol_h */
SYM_GROUP
Definition: lex_symbol.h:28
@ SG_KEYWORDS
Definition: lex_symbol.h:29
@ SG_HINTS
Definition: lex_symbol.h:32
@ SG_MAIN_PARSER
Definition: lex_symbol.h:35
@ SG_HINTABLE_KEYWORDS
Definition: lex_symbol.h:31
@ SG_FUNCTIONS
Definition: lex_symbol.h:30
Definition: lex_symbol.h:46
const SYMBOL * symbol
Definition: lex_symbol.h:47
char * str
Definition: lex_symbol.h:48
unsigned int length
Definition: lex_symbol.h:49
Definition: lex_symbol.h:38
const unsigned int length
Definition: lex_symbol.h:40
const unsigned int tok
Definition: lex_symbol.h:41
int group
group mask, see SYM_GROUP enum for bits.
Definition: lex_symbol.h:43
const char * name
Definition: lex_symbol.h:39