![]() |
MySQL 9.3.0
Source Code Documentation
|
#include "sql_lexer.h"
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <mutex>
#include "lex_string.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_version.h"
#include "sql/lex.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_lexer_input_stream.h"
#include "sql_lexer_thd.h"
#include "strings/sql_chars.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 LEX_CSTRING | get_dollar_quoted_text (Lex_input_stream *lip, int tag_len) |
Get the text literal between dollar quotes. More... | |
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) |
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 |
|
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 |
Get the text literal between dollar quotes.
A dollar quote is of the form $tag$, where tag is zero or more characters. The same characters that are permitted for unquoted identifiers, except dollar, may be used for the tag. That is, basic ASCII letters, digits 0-9, underscore, and any multibyte UTF8 characters.
lip | The input stream. When called, the current position is right after the initial dollar character |
tag_len | The length of the tag |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
bool operator!= | ( | const SqlLexer::iterator & | a, |
const SqlLexer::iterator & | b | ||
) |
bool operator== | ( | const SqlLexer::iterator & | a, |
const SqlLexer::iterator & | b | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |