From 823026b58211a4166de06ac243d978dcb9930271 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 22 Jan 2024 15:58:08 +0300 Subject: Turn odb repository into muti-package repository Also remove the autoconf/make-based build system. --- odb/sql-lexer.hxx | 129 ------------------------------------------------------ 1 file changed, 129 deletions(-) delete mode 100644 odb/sql-lexer.hxx (limited to 'odb/sql-lexer.hxx') diff --git a/odb/sql-lexer.hxx b/odb/sql-lexer.hxx deleted file mode 100644 index 9d24233..0000000 --- a/odb/sql-lexer.hxx +++ /dev/null @@ -1,129 +0,0 @@ -// file : odb/sql-lexer.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_SQL_LEXER_HXX -#define ODB_SQL_LEXER_HXX - -#include -#include -#include // std::size_t -#include - -#include - -class sql_lexer -{ -public: - sql_lexer (); - sql_lexer (std::string const& sql); - - void lex (std::string const& sql); - - struct invalid_input - { - invalid_input (std::size_t l, std::size_t c, std::string const& m) - : line (l), column (c), message (m) - { - } - - std::size_t line; - std::size_t column; - std::string const message; - }; - - sql_token - next (); - -protected: - class xchar - { - public: - typedef std::char_traits traits_type; - typedef traits_type::int_type int_type; - typedef traits_type::char_type char_type; - - xchar (int_type v, std::size_t l, std::size_t c); - - operator char_type () const; - - int_type - value () const; - - std::size_t - line () const; - - std::size_t - column () const; - - private: - int_type v_; - std::size_t l_; - std::size_t c_; - }; - - xchar - peek (); - - xchar - get (); - - void - unget (xchar); - -protected: - void - skip_spaces (); - - sql_token - identifier (xchar); - - sql_token - int_literal (xchar, - bool neg = false, - std::size_t ml = 0, - std::size_t mc = 0); - - sql_token - string_literal (xchar); - -protected: - bool - is_alpha (char c) const; - - bool - is_oct_digit (char c) const; - - bool - is_dec_digit (char c) const; - - bool - is_hex_digit (char c) const; - - bool - is_alnum (char c) const; - - bool - is_space (char c) const; - - bool - is_eos (xchar const& c) const; - - char - to_upper (char c) const; - -private: - std::locale loc_; - std::istringstream is_; - std::size_t l_; - std::size_t c_; - - bool eos_; - bool include_; - - xchar buf_; - bool unget_; -}; - -#include - -#endif // ODB_SQL_LEXER_HXX -- cgit v1.1