MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
yacc_sql.hpp
1/* A Bison parser, made by GNU Bison 3.7. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
37
38#ifndef YY_YY_YACC_SQL_HPP_INCLUDED
39# define YY_YY_YACC_SQL_HPP_INCLUDED
40/* Debug traces. */
41#ifndef YYDEBUG
42# define YYDEBUG 0
43#endif
44#if YYDEBUG
45extern int yydebug;
46#endif
47
48/* Token kinds. */
49#ifndef YYTOKENTYPE
50# define YYTOKENTYPE
51 enum yytokentype
52 {
53 YYEMPTY = -2,
54 YYEOF = 0, /* "end of file" */
55 YYerror = 256, /* error */
56 YYUNDEF = 257, /* "invalid token" */
57 SEMICOLON = 258, /* SEMICOLON */
58 CREATE = 259, /* CREATE */
59 DROP = 260, /* DROP */
60 TABLE = 261, /* TABLE */
61 TABLES = 262, /* TABLES */
62 INDEX = 263, /* INDEX */
63 CALC = 264, /* CALC */
64 SELECT = 265, /* SELECT */
65 DESC = 266, /* DESC */
66 SHOW = 267, /* SHOW */
67 SYNC = 268, /* SYNC */
68 INSERT = 269, /* INSERT */
69 DELETE = 270, /* DELETE */
70 UPDATE = 271, /* UPDATE */
71 LBRACE = 272, /* LBRACE */
72 RBRACE = 273, /* RBRACE */
73 COMMA = 274, /* COMMA */
74 TRX_BEGIN = 275, /* TRX_BEGIN */
75 TRX_COMMIT = 276, /* TRX_COMMIT */
76 TRX_ROLLBACK = 277, /* TRX_ROLLBACK */
77 INT_T = 278, /* INT_T */
78 STRING_T = 279, /* STRING_T */
79 FLOAT_T = 280, /* FLOAT_T */
80 HELP = 281, /* HELP */
81 EXIT = 282, /* EXIT */
82 DOT = 283, /* DOT */
83 INTO = 284, /* INTO */
84 VALUES = 285, /* VALUES */
85 FROM = 286, /* FROM */
86 WHERE = 287, /* WHERE */
87 AND = 288, /* AND */
88 SET = 289, /* SET */
89 ON = 290, /* ON */
90 LOAD = 291, /* LOAD */
91 DATA = 292, /* DATA */
92 INFILE = 293, /* INFILE */
93 EXPLAIN = 294, /* EXPLAIN */
94 EQ = 295, /* EQ */
95 LT = 296, /* LT */
96 GT = 297, /* GT */
97 LE = 298, /* LE */
98 GE = 299, /* GE */
99 NE = 300, /* NE */
100 NUMBER = 301, /* NUMBER */
101 FLOAT = 302, /* FLOAT */
102 ID = 303, /* ID */
103 PATH = 304, /* PATH */
104 SSS = 305, /* SSS */
105 STRING_V = 306, /* STRING_V */
106 UMINUS = 307 /* UMINUS */
107 };
108 typedef enum yytokentype yytoken_kind_t;
109#endif
110
111/* Value type. */
112#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
114{
115#line 99 "yacc_sql.y"
116
117 ParsedSqlNode * sql_node;
118 ConditionSqlNode * condition;
119 Value * value;
120 enum CompOp comp;
121 RelAttrSqlNode * rel_attr;
122 std::vector<AttrInfoSqlNode> * attr_infos;
123 AttrInfoSqlNode * attr_info;
124 Expression * expression;
125 std::vector<Expression *> * expression_list;
126 std::vector<Value> * value_list;
127 std::vector<ConditionSqlNode> * condition_list;
128 std::vector<RelAttrSqlNode> * rel_attr_list;
129 std::vector<std::string> * relation_list;
130 char * string;
131 int number;
132 float floats;
133
134#line 135 "yacc_sql.hpp"
135
136};
137typedef union YYSTYPE YYSTYPE;
138# define YYSTYPE_IS_TRIVIAL 1
139# define YYSTYPE_IS_DECLARED 1
140#endif
141
142/* Location type. */
143#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
144typedef struct YYLTYPE YYLTYPE;
146{
147 int first_line;
148 int first_column;
149 int last_line;
150 int last_column;
151};
152# define YYLTYPE_IS_DECLARED 1
153# define YYLTYPE_IS_TRIVIAL 1
154#endif
155
156
157
158int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner);
159
160#endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */
表达式的抽象描述
Definition: expression.h:60
表示一个SQL语句
Definition: parse_defs.h:290
表示语法解析后的数据
Definition: parse_defs.h:318
属性的值
Definition: value.h:40
CompOp
描述比较运算符
Definition: parse_defs.h:48
描述一个属性
Definition: parse_defs.h:149
表示一个条件比较
Definition: parse_defs.h:67
描述一个属性
Definition: parse_defs.h:38
Definition: yacc_sql.hpp:146
Definition: yacc_sql.hpp:114