-
Notifications
You must be signed in to change notification settings - Fork 1
/
identifier.hpp
50 lines (39 loc) · 1.15 KB
/
identifier.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef SQL_PARSER_AST_IDENTIFIER_HPP
#define SQL_PARSER_AST_IDENTIFIER_HPP
#include "sql/ast/common.hpp"
#include <boost/optional.hpp>
#include <boost/spirit/home/x3/support/ast/position_tagged.hpp>
#include <boost/spirit/home/x3/support/ast/variant.hpp>
#include <vector>
namespace sql { namespace ast
{
namespace x3 = boost::spirit::x3;
struct identifier : x3::position_tagged {
std::string identifier;
quot quotation;
};
typedef std::vector<identifier> identifier_list;
struct simple_table_identifier
{
identifier table;
};
struct schema_table_identifier
{
identifier schema;
identifier table;
};
struct table_identifier : x3::variant<
schema_table_identifier
, simple_table_identifier
>
{
using base_type::base_type;
using base_type::operator=;
};
struct aliased_table_identifier
{
table_identifier table;
boost::optional<identifier> alias;
};
}}
#endif //SQL_PARSER_AST_IDENTIFIER_HPP