1
0
mirror of https://github.com/MariaDB/server.git synced 2025-04-24 18:27:21 +03:00
Alexander Barkov 1d30a23fcc Moving a few static functions in sql_lex.cc to new methods in Lex_input_stream
Reasoning:
- Shorter and clearer code
- Better encapsulation
  (a fair number of Lex_input_stream methods and members were
   moved to the private section)

New methods:

  int lex_token(union YYSTYPE *yylval, THD *thd);
  bool consume_comment(int remaining_recursions_permitted);
  int lex_one_token(union YYSTYPE *yylval, THD *thd);
  int find_keyword(Lex_ident_cli_st *str, uint len, bool function);
  LEX_CSTRING get_token(uint skip, uint length);

Additional changes:

- Removing Lex_input_stream::yylval.
  In the original code it was just an alias
  for the "yylval" passed to lex_one_token().
  This coding style is bug prone and is hard to follow.
  In the new reduction "yylval" (or its components) is passed to
  the affected methods as a parameter.
- Moving the code in sql_lex.h up and down between "private" and "public"
  sections (sorry if this made the diff somewhat harder to read)
2018-05-09 00:16:32 +04:00
..
2017-11-22 14:39:21 +04:00
2018-02-06 17:12:17 +02:00
2018-04-05 14:23:18 +04:00
2017-08-24 01:05:48 +02:00
2018-04-20 18:29:18 +04:00
2017-08-31 15:44:17 +04:00
2018-01-04 09:22:59 +02:00
2017-08-24 01:05:48 +02:00
2017-03-10 18:21:29 +01:00
2017-03-10 18:21:29 +01:00
2017-11-13 19:09:46 +03:00
2017-03-10 18:21:29 +01:00
2018-05-07 00:07:33 +03:00
2017-09-01 11:33:45 +03:00
2018-04-24 20:59:57 +03:00
2017-11-30 08:16:37 +02:00
2017-11-30 08:16:37 +02:00
2018-04-24 20:59:57 +03:00
2018-02-15 10:22:03 +02:00
2017-11-23 19:41:44 +03:00
2018-02-15 10:22:03 +02:00
2018-02-15 10:22:03 +02:00
2018-02-15 10:22:03 +02:00
2018-04-24 20:59:57 +03:00
2017-04-07 18:09:56 +04:00
2018-04-23 09:49:58 +03:00
2018-03-26 17:53:17 +03:00
2018-05-01 16:52:19 +03:00
2018-02-15 10:22:03 +02:00
2017-06-21 13:44:16 +03:00
2017-12-12 09:57:17 +02:00
2017-12-11 15:43:41 +03:00
2017-08-24 01:05:48 +02:00
2018-05-07 00:07:33 +03:00
2018-04-10 13:12:36 +02:00
2018-04-24 20:59:57 +03:00
2018-04-24 12:48:27 +03:00
2017-08-31 13:46:30 +04:00
2017-08-26 00:34:43 +02:00
2018-01-04 09:22:59 +02:00
2018-04-10 13:12:36 +02:00
2018-04-10 13:12:36 +02:00
2018-05-01 16:52:19 +03:00
2018-04-24 20:59:57 +03:00
2018-04-29 17:53:21 +03:00
2017-08-24 01:05:48 +02:00
2018-04-19 15:23:21 +03:00
2017-04-28 21:59:11 -07:00
2018-04-10 13:12:36 +02:00
2018-02-15 10:22:03 +02:00
2017-03-10 18:21:29 +01:00
2017-05-05 20:36:08 +03:00
2018-04-29 17:53:21 +03:00
2018-02-15 10:22:03 +02:00
2018-05-01 16:52:19 +03:00
2017-10-04 08:24:06 +03:00
2018-05-07 00:07:33 +03:00
2018-05-07 00:07:33 +03:00
2018-05-01 16:52:19 +03:00
2018-04-24 20:59:57 +03:00
2017-11-21 19:47:46 +01:00
2018-02-15 10:22:03 +02:00
2018-04-10 13:12:36 +02:00
2018-04-24 20:59:57 +03:00
2018-04-24 20:59:57 +03:00
2018-01-09 14:16:47 +03:00
2018-03-28 17:31:57 +02:00
2018-02-23 15:33:24 +01:00
2017-11-23 09:49:45 +02:00
2018-05-07 00:07:33 +03:00
2018-04-24 20:59:57 +03:00
2017-03-30 12:48:42 +02:00
2017-11-27 15:07:32 +03:00
2018-04-24 12:48:27 +03:00
2018-04-10 13:12:36 +02:00
2018-04-10 13:12:36 +02:00
2017-11-05 22:23:32 +02:00
2017-03-10 18:21:29 +01:00
2017-11-10 16:12:45 +02:00
2017-03-10 18:21:29 +01:00
2018-03-28 17:31:57 +02:00
2018-03-28 17:31:57 +02:00
2017-03-30 12:48:42 +02:00
2018-03-28 17:31:57 +02:00
2017-08-31 09:30:40 +03:00
2018-03-28 17:31:57 +02:00
2018-03-21 10:36:49 +02:00