MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
lex_sql.h
1#ifndef yyHEADER_H
2#define yyHEADER_H 1
3#define yyIN_HEADER 1
4
5#line 5 "lex_sql.h"
6/*
7这里的代码会被复制到lex_sql.cpp的最开始位置
8定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字
9做比较,导致编译报警
10*/
11#define YY_TYPEDEF_YY_SIZE_T
12typedef int yy_size_t;
13
14/* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */
15#define YY_USER_INIT \
16 yycolumn = 0;
17
18/* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */
19/* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */
20#define YY_USER_ACTION \
21do { \
22 yylloc->first_line = yylloc->last_line = yylineno; \
23 yylloc->first_column = yycolumn; \
24 yylloc->last_column = yylloc->first_column + yyleng - 1; \
25 yycolumn += yyleng; \
26} \
27while (0);
28
29#line 29 "lex_sql.h"
30
31#define YY_INT_ALIGNED short int
32
33/* A lexical scanner generated by flex */
34
35#define FLEX_SCANNER
36#define YY_FLEX_MAJOR_VERSION 2
37#define YY_FLEX_MINOR_VERSION 6
38#define YY_FLEX_SUBMINOR_VERSION 4
39#if YY_FLEX_SUBMINOR_VERSION > 0
40#define FLEX_BETA
41#endif
42
43#ifdef yyget_lval
44#define yyget_lval_ALREADY_DEFINED
45#else
46#define yyget_lval yyget_lval
47#endif
48
49#ifdef yyset_lval
50#define yyset_lval_ALREADY_DEFINED
51#else
52#define yyset_lval yyset_lval
53#endif
54
55#ifdef yyget_lloc
56#define yyget_lloc_ALREADY_DEFINED
57#else
58#define yyget_lloc yyget_lloc
59#endif
60
61#ifdef yyset_lloc
62#define yyset_lloc_ALREADY_DEFINED
63#else
64#define yyset_lloc yyset_lloc
65#endif
66
67/* First, we deal with platform-specific or compiler-specific issues. */
68
69/* begin standard C headers. */
70#include <stdio.h>
71#include <string.h>
72#include <errno.h>
73#include <stdlib.h>
74
75/* end standard C headers. */
76
77/* flex integer type definitions */
78
79#ifndef FLEXINT_H
80#define FLEXINT_H
81
82/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
83
84#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
85
86/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
87 * if you want the limit (max/min) macros for int types.
88 */
89#ifndef __STDC_LIMIT_MACROS
90#define __STDC_LIMIT_MACROS 1
91#endif
92
93#include <inttypes.h>
94typedef int8_t flex_int8_t;
95typedef uint8_t flex_uint8_t;
96typedef int16_t flex_int16_t;
97typedef uint16_t flex_uint16_t;
98typedef int32_t flex_int32_t;
99typedef uint32_t flex_uint32_t;
100typedef uint64_t flex_uint64_t;
101#else
102typedef signed char flex_int8_t;
103typedef short int flex_int16_t;
104typedef int flex_int32_t;
105typedef unsigned char flex_uint8_t;
106typedef unsigned short int flex_uint16_t;
107typedef unsigned int flex_uint32_t;
108
109/* Limits of integral types. */
110#ifndef INT8_MIN
111#define INT8_MIN (-128)
112#endif
113#ifndef INT16_MIN
114#define INT16_MIN (-32767-1)
115#endif
116#ifndef INT32_MIN
117#define INT32_MIN (-2147483647-1)
118#endif
119#ifndef INT8_MAX
120#define INT8_MAX (127)
121#endif
122#ifndef INT16_MAX
123#define INT16_MAX (32767)
124#endif
125#ifndef INT32_MAX
126#define INT32_MAX (2147483647)
127#endif
128#ifndef UINT8_MAX
129#define UINT8_MAX (255U)
130#endif
131#ifndef UINT16_MAX
132#define UINT16_MAX (65535U)
133#endif
134#ifndef UINT32_MAX
135#define UINT32_MAX (4294967295U)
136#endif
137
138#ifndef SIZE_MAX
139#define SIZE_MAX (~(size_t)0)
140#endif
141
142#endif /* ! C99 */
143
144#endif /* ! FLEXINT_H */
145
146/* begin standard C++ headers. */
147
148/* TODO: this is always defined, so inline it */
149#define yyconst const
150
151#if defined(__GNUC__) && __GNUC__ >= 3
152#define yynoreturn __attribute__((__noreturn__))
153#else
154#define yynoreturn
155#endif
156
157/* An opaque pointer. */
158#ifndef YY_TYPEDEF_YY_SCANNER_T
159#define YY_TYPEDEF_YY_SCANNER_T
160typedef void* yyscan_t;
161#endif
162
163/* For convenience, these vars (plus the bison vars far below)
164 are macros in the reentrant scanner. */
165#define yyin yyg->yyin_r
166#define yyout yyg->yyout_r
167#define yyextra yyg->yyextra_r
168#define yyleng yyg->yyleng_r
169#define yytext yyg->yytext_r
170#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
171#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
172#define yy_flex_debug yyg->yy_flex_debug_r
173
174/* Size of default input buffer. */
175#ifndef YY_BUF_SIZE
176#ifdef __ia64__
177/* On IA-64, the buffer size is 16k, not 8k.
178 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
179 * Ditto for the __ia64__ case accordingly.
180 */
181#define YY_BUF_SIZE 32768
182#else
183#define YY_BUF_SIZE 16384
184#endif /* __ia64__ */
185#endif
186
187#ifndef YY_TYPEDEF_YY_BUFFER_STATE
188#define YY_TYPEDEF_YY_BUFFER_STATE
189typedef struct yy_buffer_state *YY_BUFFER_STATE;
190#endif
191
192#ifndef YY_TYPEDEF_YY_SIZE_T
193#define YY_TYPEDEF_YY_SIZE_T
194typedef size_t yy_size_t;
195#endif
196
197#ifndef YY_STRUCT_YY_BUFFER_STATE
198#define YY_STRUCT_YY_BUFFER_STATE
199struct yy_buffer_state
200 {
201 FILE *yy_input_file;
202
203 char *yy_ch_buf; /* input buffer */
204 char *yy_buf_pos; /* current position in input buffer */
205
206 /* Size of input buffer in bytes, not including room for EOB
207 * characters.
208 */
209 int yy_buf_size;
210
211 /* Number of characters read into yy_ch_buf, not including EOB
212 * characters.
213 */
214 yy_size_t yy_n_chars;
215
216 /* Whether we "own" the buffer - i.e., we know we created it,
217 * and can realloc() it to grow it, and should free() it to
218 * delete it.
219 */
220 int yy_is_our_buffer;
221
222 /* Whether this is an "interactive" input source; if so, and
223 * if we're using stdio for input, then we want to use getc()
224 * instead of fread(), to make sure we stop fetching input after
225 * each newline.
226 */
227 int yy_is_interactive;
228
229 /* Whether we're considered to be at the beginning of a line.
230 * If so, '^' rules will be active on the next match, otherwise
231 * not.
232 */
233 int yy_at_bol;
234
235 int yy_bs_lineno;
236 int yy_bs_column;
238 /* Whether to try to fill the input buffer when we reach the
239 * end of it.
240 */
241 int yy_fill_buffer;
242
243 int yy_buffer_status;
244
245 };
246#endif /* !YY_STRUCT_YY_BUFFER_STATE */
247
248void yyrestart ( FILE *input_file , yyscan_t yyscanner );
249void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
250YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
251void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
252void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
253void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
254void yypop_buffer_state ( yyscan_t yyscanner );
255
256YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
257YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
258YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner );
259
260void *yyalloc ( yy_size_t , yyscan_t yyscanner );
261void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
262void yyfree ( void * , yyscan_t yyscanner );
263
264/* Begin user sect3 */
265
266#define yywrap(yyscanner) (/*CONSTCOND*/1)
267#define YY_SKIP_YYWRAP
268
269#define yytext_ptr yytext_r
270
271#ifdef YY_HEADER_EXPORT_START_CONDITIONS
272#define INITIAL 0
273#define STR 1
274
275#endif
276
277#ifndef YY_NO_UNISTD_H
278/* Special case for "unistd.h", since it is non-ANSI. We include it way
279 * down here because we want the user's section 1 to have been scanned first.
280 * The user has a chance to override it with an option.
281 */
282#include <unistd.h>
283#endif
284
285#ifndef YY_EXTRA_TYPE
286#define YY_EXTRA_TYPE void *
287#endif
288
289int yylex_init (yyscan_t* scanner);
290
291int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
292
293/* Accessor methods to globals.
294 These are made visible to non-reentrant scanners for convenience. */
295
296int yylex_destroy ( yyscan_t yyscanner );
297
298int yyget_debug ( yyscan_t yyscanner );
299
300void yyset_debug ( int debug_flag , yyscan_t yyscanner );
301
302YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
303
304void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
305
306FILE *yyget_in ( yyscan_t yyscanner );
307
308void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
309
310FILE *yyget_out ( yyscan_t yyscanner );
311
312void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
313
314 yy_size_t yyget_leng ( yyscan_t yyscanner );
315
316char *yyget_text ( yyscan_t yyscanner );
317
318int yyget_lineno ( yyscan_t yyscanner );
319
320void yyset_lineno ( int _line_number , yyscan_t yyscanner );
321
322int yyget_column ( yyscan_t yyscanner );
323
324void yyset_column ( int _column_no , yyscan_t yyscanner );
325
326YYSTYPE * yyget_lval ( yyscan_t yyscanner );
327
328void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
329
330 YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
331
332 void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
333
334/* Macros after this point can all be overridden by user definitions in
335 * section 1.
336 */
337
338#ifndef YY_SKIP_YYWRAP
339#ifdef __cplusplus
340extern "C" int yywrap ( yyscan_t yyscanner );
341#else
342extern int yywrap ( yyscan_t yyscanner );
343#endif
344#endif
345
346#ifndef yytext_ptr
347static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
348#endif
349
350#ifdef YY_NEED_STRLEN
351static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
352#endif
353
354#ifndef YY_NO_INPUT
355
356#endif
357
358/* Amount of stuff to slurp up with each read. */
359#ifndef YY_READ_BUF_SIZE
360#ifdef __ia64__
361/* On IA-64, the buffer size is 16k, not 8k */
362#define YY_READ_BUF_SIZE 16384
363#else
364#define YY_READ_BUF_SIZE 8192
365#endif /* __ia64__ */
366#endif
367
368/* Number of entries by which start-condition stack grows. */
369#ifndef YY_START_STACK_INCR
370#define YY_START_STACK_INCR 25
371#endif
372
373/* Default declaration of generated scanner - a define so the user can
374 * easily add parameters.
375 */
376#ifndef YY_DECL
377#define YY_DECL_IS_OURS 1
378
379extern int yylex \
380 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
381
382#define YY_DECL int yylex \
383 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
384#endif /* !YY_DECL */
385
386/* yy_get_previous_state - get the state just before the EOB char was reached */
387
388#undef YY_NEW_FILE
389#undef YY_FLUSH_BUFFER
390#undef yy_set_bol
391#undef yy_new_buffer
392#undef yy_set_interactive
393#undef YY_DO_BEFORE_ACTION
394
395#ifdef YY_DECL_IS_OURS
396#undef YY_DECL_IS_OURS
397#undef YY_DECL
398#endif
399
400#ifndef yy_create_buffer_ALREADY_DEFINED
401#undef yy_create_buffer
402#endif
403#ifndef yy_delete_buffer_ALREADY_DEFINED
404#undef yy_delete_buffer
405#endif
406#ifndef yy_scan_buffer_ALREADY_DEFINED
407#undef yy_scan_buffer
408#endif
409#ifndef yy_scan_string_ALREADY_DEFINED
410#undef yy_scan_string
411#endif
412#ifndef yy_scan_bytes_ALREADY_DEFINED
413#undef yy_scan_bytes
414#endif
415#ifndef yy_init_buffer_ALREADY_DEFINED
416#undef yy_init_buffer
417#endif
418#ifndef yy_flush_buffer_ALREADY_DEFINED
419#undef yy_flush_buffer
420#endif
421#ifndef yy_load_buffer_state_ALREADY_DEFINED
422#undef yy_load_buffer_state
423#endif
424#ifndef yy_switch_to_buffer_ALREADY_DEFINED
425#undef yy_switch_to_buffer
426#endif
427#ifndef yypush_buffer_state_ALREADY_DEFINED
428#undef yypush_buffer_state
429#endif
430#ifndef yypop_buffer_state_ALREADY_DEFINED
431#undef yypop_buffer_state
432#endif
433#ifndef yyensure_buffer_stack_ALREADY_DEFINED
434#undef yyensure_buffer_stack
435#endif
436#ifndef yylex_ALREADY_DEFINED
437#undef yylex
438#endif
439#ifndef yyrestart_ALREADY_DEFINED
440#undef yyrestart
441#endif
442#ifndef yylex_init_ALREADY_DEFINED
443#undef yylex_init
444#endif
445#ifndef yylex_init_extra_ALREADY_DEFINED
446#undef yylex_init_extra
447#endif
448#ifndef yylex_destroy_ALREADY_DEFINED
449#undef yylex_destroy
450#endif
451#ifndef yyget_debug_ALREADY_DEFINED
452#undef yyget_debug
453#endif
454#ifndef yyset_debug_ALREADY_DEFINED
455#undef yyset_debug
456#endif
457#ifndef yyget_extra_ALREADY_DEFINED
458#undef yyget_extra
459#endif
460#ifndef yyset_extra_ALREADY_DEFINED
461#undef yyset_extra
462#endif
463#ifndef yyget_in_ALREADY_DEFINED
464#undef yyget_in
465#endif
466#ifndef yyset_in_ALREADY_DEFINED
467#undef yyset_in
468#endif
469#ifndef yyget_out_ALREADY_DEFINED
470#undef yyget_out
471#endif
472#ifndef yyset_out_ALREADY_DEFINED
473#undef yyset_out
474#endif
475#ifndef yyget_leng_ALREADY_DEFINED
476#undef yyget_leng
477#endif
478#ifndef yyget_text_ALREADY_DEFINED
479#undef yyget_text
480#endif
481#ifndef yyget_lineno_ALREADY_DEFINED
482#undef yyget_lineno
483#endif
484#ifndef yyset_lineno_ALREADY_DEFINED
485#undef yyset_lineno
486#endif
487#ifndef yyget_column_ALREADY_DEFINED
488#undef yyget_column
489#endif
490#ifndef yyset_column_ALREADY_DEFINED
491#undef yyset_column
492#endif
493#ifndef yywrap_ALREADY_DEFINED
494#undef yywrap
495#endif
496#ifndef yyget_lval_ALREADY_DEFINED
497#undef yyget_lval
498#endif
499#ifndef yyset_lval_ALREADY_DEFINED
500#undef yyset_lval
501#endif
502#ifndef yyget_lloc_ALREADY_DEFINED
503#undef yyget_lloc
504#endif
505#ifndef yyset_lloc_ALREADY_DEFINED
506#undef yyset_lloc
507#endif
508#ifndef yyalloc_ALREADY_DEFINED
509#undef yyalloc
510#endif
511#ifndef yyrealloc_ALREADY_DEFINED
512#undef yyrealloc
513#endif
514#ifndef yyfree_ALREADY_DEFINED
515#undef yyfree
516#endif
517#ifndef yytext_ALREADY_DEFINED
518#undef yytext
519#endif
520#ifndef yyleng_ALREADY_DEFINED
521#undef yyleng
522#endif
523#ifndef yyin_ALREADY_DEFINED
524#undef yyin
525#endif
526#ifndef yyout_ALREADY_DEFINED
527#undef yyout
528#endif
529#ifndef yy_flex_debug_ALREADY_DEFINED
530#undef yy_flex_debug
531#endif
532#ifndef yylineno_ALREADY_DEFINED
533#undef yylineno
534#endif
535#ifndef yytables_fload_ALREADY_DEFINED
536#undef yytables_fload
537#endif
538#ifndef yytables_destroy_ALREADY_DEFINED
539#undef yytables_destroy
540#endif
541#ifndef yyTABLES_NAME_ALREADY_DEFINED
542#undef yyTABLES_NAME
543#endif
544
545#line 138 "lex_sql.l"
546
547
548#line 548 "lex_sql.h"
549#undef yyIN_HEADER
550#endif /* yyHEADER_H */
Definition: yacc_sql.hpp:146
Definition: lex_sql.cpp:247
int yy_bs_column
Definition: lex_sql.cpp:283
int yy_bs_lineno
Definition: lex_sql.cpp:282
Definition: yacc_sql.hpp:114
Definition: yacc_sql.cpp:492