MySQL  8.0.26
Source Code Documentation
sql_chars.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2015, 2021, Oracle and/or its affiliates.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License, version 2.0,
6  as published by the Free Software Foundation.
7 
8  This program is also distributed with certain software (including
9  but not limited to OpenSSL) that is licensed under separate terms,
10  as designated in a particular file or component or in included license
11  documentation. The authors of MySQL hereby grant you an additional
12  permission to link the program and your derivative works with the
13  separately licensed software that they have included with MySQL.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License, version 2.0, for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23 
24 /*
25  Char classes for lexical scanners
26 */
27 
28 #ifndef SQL_LEX_CHARS_INCLUDED
29 #define SQL_LEX_CHARS_INCLUDED
30 
31 #include "my_compiler.h"
32 #include "my_inttypes.h"
33 #include "my_macros.h"
34 
35 struct CHARSET_INFO;
36 
37 enum MY_ATTRIBUTE((__packed__)) my_lex_states {
70 };
71 
72 enum MY_ATTRIBUTE((__packed__)) hint_lex_char_classes {
74  HINT_CHR_AT, // [@]
76  HINT_CHR_CHAR, // default state
77  HINT_CHR_DIGIT, // [[:digit:]]
78  HINT_CHR_DOT, // '.'
80  HINT_CHR_EOF, // pseudo-class
81  HINT_CHR_IDENT, // [_$[:alpha:]]
82  HINT_CHR_MB, // multibyte character
83  HINT_CHR_NL, // \n
86  HINT_CHR_SPACE // [[:space:]] excluding \n
87 };
88 
90  enum my_lex_states main_map[256];
92 };
93 
95 
97 
98 #endif /* SQL_LEX_CHARS_INCLUDED */
Header for compiler-dependent features.
Some integer typedefs for easier portability.
Some common macros.
Definition: commit_order_queue.h:33
hint_lex_char_classes
Definition: sql_chars.h:72
@ HINT_CHR_SPACE
Definition: sql_chars.h:86
@ HINT_CHR_AT
Definition: sql_chars.h:74
@ HINT_CHR_MB
Definition: sql_chars.h:82
@ HINT_CHR_CHAR
Definition: sql_chars.h:76
@ HINT_CHR_NL
Definition: sql_chars.h:83
@ HINT_CHR_BACKQUOTE
Definition: sql_chars.h:75
@ HINT_CHR_DOUBLEQUOTE
Definition: sql_chars.h:79
@ HINT_CHR_QUOTE
Definition: sql_chars.h:84
@ HINT_CHR_DOT
Definition: sql_chars.h:78
@ HINT_CHR_ASTERISK
Definition: sql_chars.h:73
@ HINT_CHR_IDENT
Definition: sql_chars.h:81
@ HINT_CHR_SLASH
Definition: sql_chars.h:85
@ HINT_CHR_EOF
Definition: sql_chars.h:80
@ HINT_CHR_DIGIT
Definition: sql_chars.h:77
bool init_state_maps(CHARSET_INFO *cs)
Definition: sql_chars.cc:67
my_lex_states
Definition: sql_chars.h:37
@ MY_LEX_USER_END
Definition: sql_chars.h:60
@ MY_LEX_SYSTEM_VAR
Definition: sql_chars.h:64
@ MY_LEX_IDENT_SEP
Definition: sql_chars.h:41
@ MY_LEX_SKIP
Definition: sql_chars.h:62
@ MY_LEX_STRING_OR_DELIMITER
Definition: sql_chars.h:69
@ MY_LEX_CHAR
Definition: sql_chars.h:39
@ MY_LEX_INT_OR_REAL
Definition: sql_chars.h:52
@ MY_LEX_LONG_COMMENT
Definition: sql_chars.h:56
@ MY_LEX_LONG_CMP_OP
Definition: sql_chars.h:47
@ MY_LEX_IDENT_START
Definition: sql_chars.h:42
@ MY_LEX_IDENT_OR_HEX
Definition: sql_chars.h:66
@ MY_LEX_HEX_NUMBER
Definition: sql_chars.h:44
@ MY_LEX_SEMICOLON
Definition: sql_chars.h:58
@ MY_LEX_END
Definition: sql_chars.h:50
@ MY_LEX_NUMBER_IDENT
Definition: sql_chars.h:51
@ MY_LEX_IDENT
Definition: sql_chars.h:40
@ MY_LEX_EOL
Definition: sql_chars.h:55
@ MY_LEX_USER_VARIABLE_DELIMITER
Definition: sql_chars.h:63
@ MY_LEX_REAL_OR_POINT
Definition: sql_chars.h:53
@ MY_LEX_SET_VAR
Definition: sql_chars.h:59
@ MY_LEX_REAL
Definition: sql_chars.h:43
@ MY_LEX_START
Definition: sql_chars.h:38
@ MY_LEX_IDENT_OR_NCHAR
Definition: sql_chars.h:68
@ MY_LEX_IDENT_OR_KEYWORD
Definition: sql_chars.h:65
@ MY_LEX_END_LONG_COMMENT
Definition: sql_chars.h:57
@ MY_LEX_BOOL
Definition: sql_chars.h:54
@ MY_LEX_IDENT_OR_BIN
Definition: sql_chars.h:67
@ MY_LEX_COMMENT
Definition: sql_chars.h:49
@ MY_LEX_CMP_OP
Definition: sql_chars.h:46
@ MY_LEX_BIN_NUMBER
Definition: sql_chars.h:45
@ MY_LEX_STRING
Definition: sql_chars.h:48
@ MY_LEX_HOSTNAME
Definition: sql_chars.h:61
Definition: m_ctype.h:354
Definition: sql_chars.h:89
enum my_lex_states main_map[256]
Definition: sql_chars.h:90
enum hint_lex_char_classes hint_map[256]
Definition: sql_chars.h:91