MySQL 8.0.39
Source Code Documentation
|
#include "sql_lexer.h"
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <mutex>
#include <iostream>
#include "lex_string.h"
#include "m_ctype.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql_version.h"
#include "sql/lexer_yystype.h"
#include "sql/sql_digest_stream.h"
#include "sql/sql_lex_hash.h"
#include "sql/sql_yacc.h"
#include "sql/system_variables.h"
#include "sql_chars.h"
#include "sql_lexer_input_stream.h"
#include "sql_lexer_thd.h"
Functions | |
sql_digest_state * | digest_add_token (sql_digest_state *, uint, Lexer_yystype *) |
sql_digest_state * | digest_reduce_token (sql_digest_state *, uint, uint) |
static int | find_keyword (Lex_input_stream *lip, uint len, bool function) |
static LEX_STRING | get_token (Lex_input_stream *lip, uint skip, uint length) |
static LEX_STRING | get_quoted_token (Lex_input_stream *lip, uint skip, uint length, char quote) |
static char * | get_text (Lex_input_stream *lip, int pre_skip, int post_skip) |
static uint | int_token (const char *str, uint length) |
static bool | consume_comment (Lex_input_stream *lip, int remaining_recursions_permitted) |
Given a stream that is advanced to the first contained character in an open comment, consume the comment. More... | |
static int | lex_one_token (Lexer_yystype *yylval, THD *thd) |
bool | lex_init (void) |
static bool | is_final_token (const SqlLexer::iterator::Token &tkn) |
static bool | is_keyword_or_func (const char *name, size_t len) |
bool | operator== (const SqlLexer::iterator &a, const SqlLexer::iterator &b) |
bool | operator!= (const SqlLexer::iterator &a, const SqlLexer::iterator &b) |
Variables | |
static const char * | long_str = "2147483647" |
static const uint | long_len = 10 |
static const char * | signed_long_str = "-2147483648" |
static const char * | longlong_str = "9223372036854775807" |
static const uint | longlong_len = 19 |
static const char * | signed_longlong_str = "-9223372036854775808" |
static const uint | signed_longlong_len = 19 |
static const char * | unsigned_longlong_str = "18446744073709551615" |
static const uint | unsigned_longlong_len = 20 |
std::once_flag | lexer_init |
|
static |
Given a stream that is advanced to the first contained character in an open comment, consume the comment.
Optionally, if we are allowed, recurse so that we understand comments within this current comment.
At this level, we do not support version-condition comments. We might have been called with having just passed one in the stream, though. In that case, we probably want to tolerate mundane comments inside. Thus, the case for recursion.
Whether | EOF reached before comment is closed. |
sql_digest_state * digest_add_token | ( | sql_digest_state * | state, |
uint | token, | ||
Lexer_yystype * | yylval | ||
) |
sql_digest_state * digest_reduce_token | ( | sql_digest_state * | state, |
uint | token_left, | ||
uint | token_right | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool operator!= | ( | const SqlLexer::iterator & | a, |
const SqlLexer::iterator & | b | ||
) |
bool operator== | ( | const SqlLexer::iterator & | a, |
const SqlLexer::iterator & | b | ||
) |
std::once_flag lexer_init |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |