1#line 2 "bootscanner.c"
2
3#line 4 "bootscanner.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define yy_create_buffer boot_yy_create_buffer
10#define yy_delete_buffer boot_yy_delete_buffer
11#define yy_flex_debug boot_yy_flex_debug
12#define yy_init_buffer boot_yy_init_buffer
13#define yy_flush_buffer boot_yy_flush_buffer
14#define yy_load_buffer_state boot_yy_load_buffer_state
15#define yy_switch_to_buffer boot_yy_switch_to_buffer
16#define yyin boot_yyin
17#define yyleng boot_yyleng
18#define yylex boot_yylex
19#define yylineno boot_yylineno
20#define yyout boot_yyout
21#define yyrestart boot_yyrestart
22#define yytext boot_yytext
23#define yywrap boot_yywrap
24#define yyalloc boot_yyalloc
25#define yyrealloc boot_yyrealloc
26#define yyfree boot_yyfree
27
28#define FLEX_SCANNER
29#define YY_FLEX_MAJOR_VERSION 2
30#define YY_FLEX_MINOR_VERSION 6
31#define YY_FLEX_SUBMINOR_VERSION 1
32#if YY_FLEX_SUBMINOR_VERSION > 0
33#define FLEX_BETA
34#endif
35
36/* First, we deal with platform-specific or compiler-specific issues. */
37
38/* begin standard C headers. */
39#include <stdio.h>
40#include <string.h>
41#include <errno.h>
42#include <stdlib.h>
43
44/* end standard C headers. */
45
46/* flex integer type definitions */
47
48#ifndef FLEXINT_H
49#define FLEXINT_H
50
51/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52
53#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54
55/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56 * if you want the limit (max/min) macros for int types.
57 */
58#ifndef __STDC_LIMIT_MACROS
59#define __STDC_LIMIT_MACROS 1
60#endif
61
62#include <inttypes.h>
63typedef int8_t flex_int8_t;
64typedef uint8_t flex_uint8_t;
65typedef int16_t flex_int16_t;
66typedef uint16_t flex_uint16_t;
67typedef int32_t flex_int32_t;
68typedef uint32_t flex_uint32_t;
69#else
70typedef signed char flex_int8_t;
71typedef short int flex_int16_t;
72typedef int flex_int32_t;
73typedef unsigned char flex_uint8_t;
74typedef unsigned short int flex_uint16_t;
75typedef unsigned int flex_uint32_t;
76
77/* Limits of integral types. */
78#ifndef INT8_MIN
79#define INT8_MIN (-128)
80#endif
81#ifndef INT16_MIN
82#define INT16_MIN (-32767-1)
83#endif
84#ifndef INT32_MIN
85#define INT32_MIN (-2147483647-1)
86#endif
87#ifndef INT8_MAX
88#define INT8_MAX (127)
89#endif
90#ifndef INT16_MAX
91#define INT16_MAX (32767)
92#endif
93#ifndef INT32_MAX
94#define INT32_MAX (2147483647)
95#endif
96#ifndef UINT8_MAX
97#define UINT8_MAX (255U)
98#endif
99#ifndef UINT16_MAX
100#define UINT16_MAX (65535U)
101#endif
102#ifndef UINT32_MAX
103#define UINT32_MAX (4294967295U)
104#endif
105
106#endif /* ! C99 */
107
108#endif /* ! FLEXINT_H */
109
110/* TODO: this is always defined, so inline it */
111#define yyconst const
112
113#if defined(__GNUC__) && __GNUC__ >= 3
114#define yynoreturn __attribute__((__noreturn__))
115#else
116#define yynoreturn
117#endif
118
119/* Returned upon end-of-file. */
120#define YY_NULL 0
121
122/* Promotes a possibly negative, possibly signed char to an unsigned
123 * integer for use as an array index. If the signed char is negative,
124 * we want to instead treat it as an 8-bit unsigned char, hence the
125 * double cast.
126 */
127#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
128
129/* Enter a start condition. This macro really ought to take a parameter,
130 * but we do it the disgusting crufty way forced on us by the ()-less
131 * definition of BEGIN.
132 */
133#define BEGIN (yy_start) = 1 + 2 *
134
135/* Translate the current start state into a value that can be later handed
136 * to BEGIN to return to the state. The YYSTATE alias is for lex
137 * compatibility.
138 */
139#define YY_START (((yy_start) - 1) / 2)
140#define YYSTATE YY_START
141
142/* Action number for EOF rule of a given start state. */
143#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
144
145/* Special action meaning "start processing a new file". */
146#define YY_NEW_FILE boot_yyrestart(boot_yyin )
147
148#define YY_END_OF_BUFFER_CHAR 0
149
150/* Size of default input buffer. */
151#ifndef YY_BUF_SIZE
152#ifdef __ia64__
153/* On IA-64, the buffer size is 16k, not 8k.
154 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
155 * Ditto for the __ia64__ case accordingly.
156 */
157#define YY_BUF_SIZE 32768
158#else
159#define YY_BUF_SIZE 16384
160#endif /* __ia64__ */
161#endif
162
163/* The state buf must be large enough to hold one state per character in the main buffer.
164 */
165#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
166
167#ifndef YY_TYPEDEF_YY_BUFFER_STATE
168#define YY_TYPEDEF_YY_BUFFER_STATE
169typedef struct yy_buffer_state *YY_BUFFER_STATE;
170#endif
171
172#ifndef YY_TYPEDEF_YY_SIZE_T
173#define YY_TYPEDEF_YY_SIZE_T
174typedef size_t yy_size_t;
175#endif
176
177extern int boot_yyleng;
178
179extern FILE *boot_yyin, *boot_yyout;
180
181#define EOB_ACT_CONTINUE_SCAN 0
182#define EOB_ACT_END_OF_FILE 1
183#define EOB_ACT_LAST_MATCH 2
184
185 #define YY_LESS_LINENO(n)
186 #define YY_LINENO_REWIND_TO(ptr)
187
188/* Return all but the first "n" matched characters back to the input stream. */
189#define yyless(n) \
190 do \
191 { \
192 /* Undo effects of setting up boot_yytext. */ \
193 int yyless_macro_arg = (n); \
194 YY_LESS_LINENO(yyless_macro_arg);\
195 *yy_cp = (yy_hold_char); \
196 YY_RESTORE_YY_MORE_OFFSET \
197 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
198 YY_DO_BEFORE_ACTION; /* set up boot_yytext again */ \
199 } \
200 while ( 0 )
201
202#define unput(c) yyunput( c, (yytext_ptr) )
203
204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
206struct yy_buffer_state
207 {
208 FILE *yy_input_file;
209
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
212
213 /* Size of input buffer in bytes, not including room for EOB
214 * characters.
215 */
216 int yy_buf_size;
217
218 /* Number of characters read into yy_ch_buf, not including EOB
219 * characters.
220 */
221 int yy_n_chars;
222
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
225 * delete it.
226 */
227 int yy_is_our_buffer;
228
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
232 * each newline.
233 */
234 int yy_is_interactive;
235
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
238 * not.
239 */
240 int yy_at_bol;
241
242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
245 /* Whether to try to fill the input buffer when we reach the
246 * end of it.
247 */
248 int yy_fill_buffer;
249
250 int yy_buffer_status;
251
252#define YY_BUFFER_NEW 0
253#define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
259 *
260 * When we actually see the EOF, we change the status to "new"
261 * (via boot_yyrestart()), so that the user can continue scanning by
262 * just pointing boot_yyin at a new input file.
263 */
264#define YY_BUFFER_EOF_PENDING 2
265
266 };
267#endif /* !YY_STRUCT_YY_BUFFER_STATE */
268
269/* Stack of input buffers. */
270static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
273
274/* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
277 *
278 * Returns the top of the stack, or NULL.
279 */
280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
283
284/* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
286 */
287#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
288
289/* yy_hold_char holds the character lost when boot_yytext is formed. */
290static char yy_hold_char;
291static int yy_n_chars; /* number of characters read into yy_ch_buf */
292int boot_yyleng;
293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = NULL;
296static int yy_init = 0; /* whether we need to initialize */
297static int yy_start = 0; /* start state number */
298
299/* Flag which is used to allow boot_yywrap()'s to do buffer switches
300 * instead of setting up a fresh boot_yyin. A bit of a hack ...
301 */
302static int yy_did_buffer_switch_on_eof;
303
304void boot_yyrestart (FILE *input_file );
305void boot_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306YY_BUFFER_STATE boot_yy_create_buffer (FILE *file,int size );
307void boot_yy_delete_buffer (YY_BUFFER_STATE b );
308void boot_yy_flush_buffer (YY_BUFFER_STATE b );
309void boot_yypush_buffer_state (YY_BUFFER_STATE new_buffer );
310void boot_yypop_buffer_state (void );
311
312static void boot_yyensure_buffer_stack (void );
313static void boot_yy_load_buffer_state (void );
314static void boot_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
315
316#define YY_FLUSH_BUFFER boot_yy_flush_buffer(YY_CURRENT_BUFFER )
317
318YY_BUFFER_STATE boot_yy_scan_buffer (char *base,yy_size_t size );
319YY_BUFFER_STATE boot_yy_scan_string (yyconst char *yy_str );
320YY_BUFFER_STATE boot_yy_scan_bytes (yyconst char *bytes,int len );
321
322void *boot_yyalloc (yy_size_t );
323void *boot_yyrealloc (void *,yy_size_t );
324void boot_yyfree (void * );
325
326#define yy_new_buffer boot_yy_create_buffer
327
328#define yy_set_interactive(is_interactive) \
329 { \
330 if ( ! YY_CURRENT_BUFFER ){ \
331 boot_yyensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 boot_yy_create_buffer(boot_yyin,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
336 }
337
338#define yy_set_bol(at_bol) \
339 { \
340 if ( ! YY_CURRENT_BUFFER ){\
341 boot_yyensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 boot_yy_create_buffer(boot_yyin,YY_BUF_SIZE ); \
344 } \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
346 }
347
348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
349
350/* Begin user sect3 */
351
352#define boot_yywrap() (/*CONSTCOND*/1)
353#define YY_SKIP_YYWRAP
354
355typedef unsigned char YY_CHAR;
356
357FILE *boot_yyin = NULL, *boot_yyout = NULL;
358
359typedef int yy_state_type;
360
361extern int boot_yylineno;
362
363int boot_yylineno = 1;
364
365extern char *boot_yytext;
366#ifdef yytext_ptr
367#undef yytext_ptr
368#endif
369#define yytext_ptr boot_yytext
370
371static yy_state_type yy_get_previous_state (void );
372static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
373static int yy_get_next_buffer (void );
374static void yynoreturn yy_fatal_error (yyconst char* msg );
375
376/* Done after the current pattern has been matched and before the
377 * corresponding action - sets up boot_yytext.
378 */
379#define YY_DO_BEFORE_ACTION \
380 (yytext_ptr) = yy_bp; \
381 boot_yyleng = (int) (yy_cp - yy_bp); \
382 (yy_hold_char) = *yy_cp; \
383 *yy_cp = '\0'; \
384 (yy_c_buf_p) = yy_cp;
385
386#define YY_NUM_RULES 31
387#define YY_END_OF_BUFFER 32
388/* This struct is not used in this scanner,
389 but its presence is necessary. */
390struct yy_trans_info
391 {
392 flex_int32_t yy_verify;
393 flex_int32_t yy_nxt;
394 };
395static yyconst flex_int16_t yy_accept[128] =
396 { 0,
397 0, 0, 32, 30, 15, 14, 30, 12, 13, 10,
398 28, 11, 28, 28, 28, 28, 28, 28, 28, 28,
399 28, 28, 28, 28, 28, 16, 0, 29, 28, 28,
400 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
401 22, 28, 28, 28, 28, 28, 28, 16, 28, 26,
402 28, 4, 28, 28, 28, 28, 28, 28, 28, 28,
403 28, 28, 28, 28, 28, 28, 28, 27, 28, 28,
404 28, 28, 28, 28, 28, 28, 28, 1, 28, 28,
405 28, 28, 28, 25, 28, 28, 18, 2, 28, 28,
406 21, 28, 28, 28, 28, 24, 28, 23, 9, 28,
407
408 3, 28, 28, 8, 28, 28, 20, 28, 17, 19,
409 28, 28, 28, 28, 28, 5, 28, 28, 28, 28,
410 7, 28, 28, 28, 28, 6, 0
411 } ;
412
413static yyconst YY_CHAR yy_ec[256] =
414 { 0,
415 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
416 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 2, 1, 4, 5, 1, 1, 1, 1, 6,
419 7, 1, 1, 8, 9, 1, 1, 9, 9, 9,
420 9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
421 10, 1, 1, 1, 9, 9, 11, 12, 13, 14,
422 9, 9, 15, 9, 9, 16, 9, 17, 18, 9,
423 9, 19, 9, 20, 21, 9, 9, 9, 9, 9,
424 1, 1, 1, 1, 22, 1, 23, 24, 25, 26,
425
426 27, 9, 28, 29, 30, 9, 9, 31, 9, 32,
427 33, 34, 35, 36, 37, 38, 39, 9, 40, 41,
428 42, 9, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1
443 } ;
444
445static yyconst YY_CHAR yy_meta[43] =
446 { 0,
447 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
448 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
449 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
450 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
451 3, 3
452 } ;
453
454static yyconst flex_uint16_t yy_base[131] =
455 { 0,
456 0, 143, 147, 149, 149, 149, 142, 149, 149, 149,
457 0, 149, 127, 25, 129, 111, 11, 16, 115, 109,
458 17, 107, 110, 105, 16, 0, 133, 149, 0, 117,
459 115, 118, 121, 93, 98, 100, 96, 101, 102, 19,
460 0, 99, 85, 101, 100, 92, 91, 0, 109, 0,
461 103, 0, 87, 79, 85, 78, 91, 82, 27, 85,
462 79, 72, 73, 71, 72, 74, 92, 0, 73, 66,
463 76, 74, 62, 76, 57, 72, 60, 0, 53, 67,
464 55, 53, 63, 0, 68, 51, 0, 0, 61, 51,
465 0, 59, 47, 50, 57, 0, 55, 0, 0, 45,
466
467 0, 53, 42, 0, 51, 55, 0, 53, 0, 0,
468 53, 38, 39, 39, 44, 0, 40, 38, 42, 44,
469 0, 28, 35, 31, 30, 0, 149, 57, 52, 60
470 } ;
471
472static yyconst flex_int16_t yy_def[131] =
473 { 0,
474 127, 1, 127, 127, 127, 127, 128, 127, 127, 127,
475 129, 127, 129, 129, 129, 129, 129, 129, 129, 129,
476 129, 129, 129, 129, 129, 130, 128, 127, 129, 129,
477 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
478 129, 129, 129, 129, 129, 129, 129, 130, 129, 129,
479 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
480 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
481 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
482 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
483 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
484
485 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
486 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
487 129, 129, 129, 129, 129, 129, 0, 127, 127, 127
488 } ;
489
490static yyconst flex_uint16_t yy_nxt[192] =
491 { 0,
492 4, 5, 6, 7, 4, 8, 9, 10, 11, 12,
493 11, 11, 11, 13, 11, 11, 14, 15, 11, 11,
494 11, 16, 11, 17, 18, 19, 11, 11, 11, 20,
495 11, 11, 21, 11, 11, 22, 23, 24, 25, 11,
496 11, 11, 31, 35, 59, 32, 37, 46, 41, 36,
497 42, 38, 47, 75, 29, 60, 76, 27, 27, 27,
498 48, 126, 48, 125, 124, 123, 122, 121, 120, 119,
499 118, 117, 116, 115, 114, 113, 112, 111, 110, 109,
500 108, 107, 106, 105, 104, 103, 102, 101, 100, 99,
501 98, 97, 96, 95, 94, 93, 92, 91, 90, 89,
502
503 88, 87, 86, 85, 84, 83, 82, 81, 80, 79,
504 78, 77, 74, 73, 72, 71, 70, 69, 68, 67,
505 66, 65, 64, 63, 62, 61, 58, 57, 56, 55,
506 54, 53, 52, 51, 50, 49, 28, 45, 44, 43,
507 40, 39, 34, 33, 30, 28, 127, 26, 3, 127,
508 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
509 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
510 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
511 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
512 127
513
514 } ;
515
516static yyconst flex_int16_t yy_chk[192] =
517 { 0,
518 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
522 1, 1, 14, 17, 40, 14, 18, 25, 21, 17,
523 21, 18, 25, 59, 129, 40, 59, 128, 128, 128,
524 130, 125, 130, 124, 123, 122, 120, 119, 118, 117,
525 115, 114, 113, 112, 111, 108, 106, 105, 103, 102,
526 100, 97, 95, 94, 93, 92, 90, 89, 86, 85,
527 83, 82, 81, 80, 79, 77, 76, 75, 74, 73,
528
529 72, 71, 70, 69, 67, 66, 65, 64, 63, 62,
530 61, 60, 58, 57, 56, 55, 54, 53, 51, 49,
531 47, 46, 45, 44, 43, 42, 39, 38, 37, 36,
532 35, 34, 33, 32, 31, 30, 27, 24, 23, 22,
533 20, 19, 16, 15, 13, 7, 3, 2, 127, 127,
534 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
535 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
536 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
537 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
538 127
539
540 } ;
541
542static yy_state_type yy_last_accepting_state;
543static char *yy_last_accepting_cpos;
544
545extern int boot_yy_flex_debug;
546int boot_yy_flex_debug = 0;
547
548/* The intent behind this definition is that it'll catch
549 * any uses of REJECT which flex missed.
550 */
551#define REJECT reject_used_but_not_detected
552#define yymore() yymore_used_but_not_detected
553#define YY_MORE_ADJ 0
554#define YY_RESTORE_YY_MORE_OFFSET
555char *boot_yytext;
556#line 1 "bootscanner.l"
557#line 2 "bootscanner.l"
558/*-------------------------------------------------------------------------
559 *
560 * bootscanner.l
561 * a lexical scanner for the bootstrap parser
562 *
563 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
564 * Portions Copyright (c) 1994, Regents of the University of California
565 *
566 *
567 * IDENTIFICATION
568 * src/backend/bootstrap/bootscanner.l
569 *
570 *-------------------------------------------------------------------------
571 */
572#include "postgres.h"
573
574#include "access/attnum.h"
575#include "access/htup.h"
576#include "access/itup.h"
577#include "access/tupdesc.h"
578#include "bootstrap/bootstrap.h"
579#include "catalog/pg_am.h"
580#include "catalog/pg_attribute.h"
581#include "catalog/pg_class.h"
582#include "nodes/nodes.h"
583#include "nodes/parsenodes.h"
584#include "nodes/pg_list.h"
585#include "nodes/primnodes.h"
586#include "parser/scansup.h"
587#include "rewrite/prs2lock.h"
588#include "storage/block.h"
589#include "storage/fd.h"
590#include "storage/itemptr.h"
591#include "storage/off.h"
592#include "utils/rel.h"
593
594/* Not needed now that this file is compiled as part of bootparse. */
595/* #include "bootparse.h" */
596
597/* LCOV_EXCL_START */
598
599/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
600#undef fprintf
601#define fprintf(file, fmt, msg) fprintf_to_ereport(fmt, msg)
602
603static void
604fprintf_to_ereport(const char *fmt, const char *msg)
605{
606 ereport(ERROR, (errmsg_internal("%s", msg)));
607}
608
609
610static int yyline = 1; /* line number for error reporting */
611
612#define YY_NO_INPUT 1
613/*
614 * Keyword tokens return the keyword text (as a constant string) in yylval.kw,
615 * just in case that's needed because we want to treat the keyword as an
616 * unreserved identifier. Note that _null_ is not treated as a keyword
617 * for this purpose; it's the one "reserved word" in the bootstrap syntax.
618 *
619 * Notice that all the keywords are case-sensitive, and for historical
620 * reasons some must be upper case.
621 *
622 * String tokens return a palloc'd string in yylval.str.
623 */
624#line 625 "bootscanner.c"
625
626#define INITIAL 0
627
628#ifndef YY_NO_UNISTD_H
629/* Special case for "unistd.h", since it is non-ANSI. We include it way
630 * down here because we want the user's section 1 to have been scanned first.
631 * The user has a chance to override it with an option.
632 */
633#include <unistd.h>
634#endif
635
636#ifndef YY_EXTRA_TYPE
637#define YY_EXTRA_TYPE void *
638#endif
639
640static int yy_init_globals (void );
641
642/* Accessor methods to globals.
643 These are made visible to non-reentrant scanners for convenience. */
644
645int boot_yylex_destroy (void );
646
647int boot_yyget_debug (void );
648
649void boot_yyset_debug (int debug_flag );
650
651YY_EXTRA_TYPE boot_yyget_extra (void );
652
653void boot_yyset_extra (YY_EXTRA_TYPE user_defined );
654
655FILE *boot_yyget_in (void );
656
657void boot_yyset_in (FILE * _in_str );
658
659FILE *boot_yyget_out (void );
660
661void boot_yyset_out (FILE * _out_str );
662
663 int boot_yyget_leng (void );
664
665char *boot_yyget_text (void );
666
667int boot_yyget_lineno (void );
668
669void boot_yyset_lineno (int _line_number );
670
671/* Macros after this point can all be overridden by user definitions in
672 * section 1.
673 */
674
675#ifndef YY_SKIP_YYWRAP
676#ifdef __cplusplus
677extern "C" int boot_yywrap (void );
678#else
679extern int boot_yywrap (void );
680#endif
681#endif
682
683#ifndef YY_NO_UNPUT
684
685#endif
686
687#ifndef yytext_ptr
688static void yy_flex_strncpy (char *,yyconst char *,int );
689#endif
690
691#ifdef YY_NEED_STRLEN
692static int yy_flex_strlen (yyconst char * );
693#endif
694
695#ifndef YY_NO_INPUT
696
697#ifdef __cplusplus
698static int yyinput (void );
699#else
700static int input (void );
701#endif
702
703#endif
704
705/* Amount of stuff to slurp up with each read. */
706#ifndef YY_READ_BUF_SIZE
707#ifdef __ia64__
708/* On IA-64, the buffer size is 16k, not 8k */
709#define YY_READ_BUF_SIZE 16384
710#else
711#define YY_READ_BUF_SIZE 8192
712#endif /* __ia64__ */
713#endif
714
715/* Copy whatever the last rule matched to the standard output. */
716#ifndef ECHO
717/* This used to be an fputs(), but since the string might contain NUL's,
718 * we now use fwrite().
719 */
720#define ECHO do { if (fwrite( boot_yytext, (size_t) boot_yyleng, 1, boot_yyout )) {} } while (0)
721#endif
722
723/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
724 * is returned in "result".
725 */
726#ifndef YY_INPUT
727#define YY_INPUT(buf,result,max_size) \
728 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
729 { \
730 int c = '*'; \
731 size_t n; \
732 for ( n = 0; n < max_size && \
733 (c = getc( boot_yyin )) != EOF && c != '\n'; ++n ) \
734 buf[n] = (char) c; \
735 if ( c == '\n' ) \
736 buf[n++] = (char) c; \
737 if ( c == EOF && ferror( boot_yyin ) ) \
738 YY_FATAL_ERROR( "input in flex scanner failed" ); \
739 result = n; \
740 } \
741 else \
742 { \
743 errno=0; \
744 while ( (result = (int) fread(buf, 1, max_size, boot_yyin))==0 && ferror(boot_yyin)) \
745 { \
746 if( errno != EINTR) \
747 { \
748 YY_FATAL_ERROR( "input in flex scanner failed" ); \
749 break; \
750 } \
751 errno=0; \
752 clearerr(boot_yyin); \
753 } \
754 }\
755\
756
757#endif
758
759/* No semi-colon after return; correct usage is to write "yyterminate();" -
760 * we don't want an extra ';' after the "return" because that will cause
761 * some compilers to complain about unreachable statements.
762 */
763#ifndef yyterminate
764#define yyterminate() return YY_NULL
765#endif
766
767/* Number of entries by which start-condition stack grows. */
768#ifndef YY_START_STACK_INCR
769#define YY_START_STACK_INCR 25
770#endif
771
772/* Report a fatal error. */
773#ifndef YY_FATAL_ERROR
774#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
775#endif
776
777/* end tables serialization structures and prototypes */
778
779/* Default declaration of generated scanner - a define so the user can
780 * easily add parameters.
781 */
782#ifndef YY_DECL
783#define YY_DECL_IS_OURS 1
784
785extern int boot_yylex (void);
786
787#define YY_DECL int boot_yylex (void)
788#endif /* !YY_DECL */
789
790/* Code executed at the beginning of each rule, after boot_yytext and boot_yyleng
791 * have been set up.
792 */
793#ifndef YY_USER_ACTION
794#define YY_USER_ACTION
795#endif
796
797/* Code executed at the end of each rule. */
798#ifndef YY_BREAK
799#define YY_BREAK /*LINTED*/break;
800#endif
801
802#define YY_RULE_SETUP \
803 if ( boot_yyleng > 0 ) \
804 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
805 (boot_yytext[boot_yyleng - 1] == '\n'); \
806 YY_USER_ACTION
807
808/** The main scanner function which does all the work.
809 */
810YY_DECL
811{
812 yy_state_type yy_current_state;
813 char *yy_cp, *yy_bp;
814 int yy_act;
815
816 if ( !(yy_init) )
817 {
818 (yy_init) = 1;
819
820#ifdef YY_USER_INIT
821 YY_USER_INIT;
822#endif
823
824 if ( ! (yy_start) )
825 (yy_start) = 1; /* first start state */
826
827 if ( ! boot_yyin )
828 boot_yyin = stdin;
829
830 if ( ! boot_yyout )
831 boot_yyout = stdout;
832
833 if ( ! YY_CURRENT_BUFFER ) {
834 boot_yyensure_buffer_stack ();
835 YY_CURRENT_BUFFER_LVALUE =
836 boot_yy_create_buffer(boot_yyin,YY_BUF_SIZE );
837 }
838
839 boot_yy_load_buffer_state( );
840 }
841
842 {
843#line 83 "bootscanner.l"
844
845
846#line 847 "bootscanner.c"
847
848 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
849 {
850 yy_cp = (yy_c_buf_p);
851
852 /* Support of boot_yytext. */
853 *yy_cp = (yy_hold_char);
854
855 /* yy_bp points to the position in yy_ch_buf of the start of
856 * the current run.
857 */
858 yy_bp = yy_cp;
859
860 yy_current_state = (yy_start);
861 yy_current_state += YY_AT_BOL();
862yy_match:
863 do
864 {
865 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
866 if ( yy_accept[yy_current_state] )
867 {
868 (yy_last_accepting_state) = yy_current_state;
869 (yy_last_accepting_cpos) = yy_cp;
870 }
871 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
872 {
873 yy_current_state = (int) yy_def[yy_current_state];
874 if ( yy_current_state >= 128 )
875 yy_c = yy_meta[(unsigned int) yy_c];
876 }
877 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
878 ++yy_cp;
879 }
880 while ( yy_current_state != 127 );
881 yy_cp = (yy_last_accepting_cpos);
882 yy_current_state = (yy_last_accepting_state);
883
884yy_find_action:
885 yy_act = yy_accept[yy_current_state];
886
887 YY_DO_BEFORE_ACTION;
888
889do_action: /* This label is used only to access EOF actions. */
890
891 switch ( yy_act )
892 { /* beginning of action switch */
893 case 0: /* must back up */
894 /* undo the effects of YY_DO_BEFORE_ACTION */
895 *yy_cp = (yy_hold_char);
896 yy_cp = (yy_last_accepting_cpos);
897 yy_current_state = (yy_last_accepting_state);
898 goto yy_find_action;
899
900case 1:
901YY_RULE_SETUP
902#line 85 "bootscanner.l"
903{ yylval.kw = "open"; return OPEN; }
904 YY_BREAK
905case 2:
906YY_RULE_SETUP
907#line 87 "bootscanner.l"
908{ yylval.kw = "close"; return XCLOSE; }
909 YY_BREAK
910case 3:
911YY_RULE_SETUP
912#line 89 "bootscanner.l"
913{ yylval.kw = "create"; return XCREATE; }
914 YY_BREAK
915case 4:
916YY_RULE_SETUP
917#line 91 "bootscanner.l"
918{ yylval.kw = "OID"; return OBJ_ID; }
919 YY_BREAK
920case 5:
921YY_RULE_SETUP
922#line 92 "bootscanner.l"
923{ yylval.kw = "bootstrap"; return XBOOTSTRAP; }
924 YY_BREAK
925case 6:
926YY_RULE_SETUP
927#line 93 "bootscanner.l"
928{ yylval.kw = "shared_relation"; return XSHARED_RELATION; }
929 YY_BREAK
930case 7:
931YY_RULE_SETUP
932#line 94 "bootscanner.l"
933{ yylval.kw = "rowtype_oid"; return XROWTYPE_OID; }
934 YY_BREAK
935case 8:
936YY_RULE_SETUP
937#line 96 "bootscanner.l"
938{ yylval.kw = "insert"; return INSERT_TUPLE; }
939 YY_BREAK
940case 9:
941YY_RULE_SETUP
942#line 98 "bootscanner.l"
943{ return NULLVAL; }
944 YY_BREAK
945case 10:
946YY_RULE_SETUP
947#line 100 "bootscanner.l"
948{ return COMMA; }
949 YY_BREAK
950case 11:
951YY_RULE_SETUP
952#line 101 "bootscanner.l"
953{ return EQUALS; }
954 YY_BREAK
955case 12:
956YY_RULE_SETUP
957#line 102 "bootscanner.l"
958{ return LPAREN; }
959 YY_BREAK
960case 13:
961YY_RULE_SETUP
962#line 103 "bootscanner.l"
963{ return RPAREN; }
964 YY_BREAK
965case 14:
966/* rule 14 can match eol */
967YY_RULE_SETUP
968#line 105 "bootscanner.l"
969{ yyline++; }
970 YY_BREAK
971case 15:
972YY_RULE_SETUP
973#line 106 "bootscanner.l"
974;
975 YY_BREAK
976case 16:
977YY_RULE_SETUP
978#line 108 "bootscanner.l"
979; /* drop everything after "#" for comments */
980 YY_BREAK
981case 17:
982YY_RULE_SETUP
983#line 110 "bootscanner.l"
984{ yylval.kw = "declare"; return XDECLARE; }
985 YY_BREAK
986case 18:
987YY_RULE_SETUP
988#line 111 "bootscanner.l"
989{ yylval.kw = "build"; return XBUILD; }
990 YY_BREAK
991case 19:
992YY_RULE_SETUP
993#line 112 "bootscanner.l"
994{ yylval.kw = "indices"; return INDICES; }
995 YY_BREAK
996case 20:
997YY_RULE_SETUP
998#line 113 "bootscanner.l"
999{ yylval.kw = "unique"; return UNIQUE; }
1000 YY_BREAK
1001case 21:
1002YY_RULE_SETUP
1003#line 114 "bootscanner.l"
1004{ yylval.kw = "index"; return INDEX; }
1005 YY_BREAK
1006case 22:
1007YY_RULE_SETUP
1008#line 115 "bootscanner.l"
1009{ yylval.kw = "on"; return ON; }
1010 YY_BREAK
1011case 23:
1012YY_RULE_SETUP
1013#line 116 "bootscanner.l"
1014{ yylval.kw = "using"; return USING; }
1015 YY_BREAK
1016case 24:
1017YY_RULE_SETUP
1018#line 117 "bootscanner.l"
1019{ yylval.kw = "toast"; return XTOAST; }
1020 YY_BREAK
1021case 25:
1022YY_RULE_SETUP
1023#line 118 "bootscanner.l"
1024{ yylval.kw = "FORCE"; return XFORCE; }
1025 YY_BREAK
1026case 26:
1027YY_RULE_SETUP
1028#line 119 "bootscanner.l"
1029{ yylval.kw = "NOT"; return XNOT; }
1030 YY_BREAK
1031case 27:
1032YY_RULE_SETUP
1033#line 120 "bootscanner.l"
1034{ yylval.kw = "NULL"; return XNULL; }
1035 YY_BREAK
1036case 28:
1037YY_RULE_SETUP
1038#line 122 "bootscanner.l"
1039{
1040 yylval.str = scanstr(boot_yytext);
1041 return ID;
1042 }
1043 YY_BREAK
1044case 29:
1045/* rule 29 can match eol */
1046YY_RULE_SETUP
1047#line 126 "bootscanner.l"
1048{
1049 /* leading and trailing quotes are not passed to scanstr */
1050 boot_yytext[strlen(boot_yytext) - 1] = '\0';
1051 yylval.str = scanstr(boot_yytext+1);
1052 boot_yytext[strlen(boot_yytext)] = '"'; /* restore boot_yytext */
1053 return ID;
1054 }
1055 YY_BREAK
1056case 30:
1057YY_RULE_SETUP
1058#line 134 "bootscanner.l"
1059{
1060 elog(ERROR, "syntax error at line %d: unexpected character \"%s\"", yyline, boot_yytext);
1061 }
1062 YY_BREAK
1063case 31:
1064YY_RULE_SETUP
1065#line 138 "bootscanner.l"
1066YY_FATAL_ERROR( "flex scanner jammed" );
1067 YY_BREAK
1068#line 1069 "bootscanner.c"
1069case YY_STATE_EOF(INITIAL):
1070 yyterminate();
1071
1072 case YY_END_OF_BUFFER:
1073 {
1074 /* Amount of text matched not including the EOB char. */
1075 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1076
1077 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1078 *yy_cp = (yy_hold_char);
1079 YY_RESTORE_YY_MORE_OFFSET
1080
1081 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1082 {
1083 /* We're scanning a new file or input source. It's
1084 * possible that this happened because the user
1085 * just pointed boot_yyin at a new source and called
1086 * boot_yylex(). If so, then we have to assure
1087 * consistency between YY_CURRENT_BUFFER and our
1088 * globals. Here is the right place to do so, because
1089 * this is the first action (other than possibly a
1090 * back-up) that will match for the new input source.
1091 */
1092 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1093 YY_CURRENT_BUFFER_LVALUE->yy_input_file = boot_yyin;
1094 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1095 }
1096
1097 /* Note that here we test for yy_c_buf_p "<=" to the position
1098 * of the first EOB in the buffer, since yy_c_buf_p will
1099 * already have been incremented past the NUL character
1100 * (since all states make transitions on EOB to the
1101 * end-of-buffer state). Contrast this with the test
1102 * in input().
1103 */
1104 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1105 { /* This was really a NUL. */
1106 yy_state_type yy_next_state;
1107
1108 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1109
1110 yy_current_state = yy_get_previous_state( );
1111
1112 /* Okay, we're now positioned to make the NUL
1113 * transition. We couldn't have
1114 * yy_get_previous_state() go ahead and do it
1115 * for us because it doesn't know how to deal
1116 * with the possibility of jamming (and we don't
1117 * want to build jamming into it because then it
1118 * will run more slowly).
1119 */
1120
1121 yy_next_state = yy_try_NUL_trans( yy_current_state );
1122
1123 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1124
1125 if ( yy_next_state )
1126 {
1127 /* Consume the NUL. */
1128 yy_cp = ++(yy_c_buf_p);
1129 yy_current_state = yy_next_state;
1130 goto yy_match;
1131 }
1132
1133 else
1134 {
1135 yy_cp = (yy_last_accepting_cpos);
1136 yy_current_state = (yy_last_accepting_state);
1137 goto yy_find_action;
1138 }
1139 }
1140
1141 else switch ( yy_get_next_buffer( ) )
1142 {
1143 case EOB_ACT_END_OF_FILE:
1144 {
1145 (yy_did_buffer_switch_on_eof) = 0;
1146
1147 if ( boot_yywrap( ) )
1148 {
1149 /* Note: because we've taken care in
1150 * yy_get_next_buffer() to have set up
1151 * boot_yytext, we can now set up
1152 * yy_c_buf_p so that if some total
1153 * hoser (like flex itself) wants to
1154 * call the scanner after we return the
1155 * YY_NULL, it'll still work - another
1156 * YY_NULL will get returned.
1157 */
1158 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1159
1160 yy_act = YY_STATE_EOF(YY_START);
1161 goto do_action;
1162 }
1163
1164 else
1165 {
1166 if ( ! (yy_did_buffer_switch_on_eof) )
1167 YY_NEW_FILE;
1168 }
1169 break;
1170 }
1171
1172 case EOB_ACT_CONTINUE_SCAN:
1173 (yy_c_buf_p) =
1174 (yytext_ptr) + yy_amount_of_matched_text;
1175
1176 yy_current_state = yy_get_previous_state( );
1177
1178 yy_cp = (yy_c_buf_p);
1179 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1180 goto yy_match;
1181
1182 case EOB_ACT_LAST_MATCH:
1183 (yy_c_buf_p) =
1184 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1185
1186 yy_current_state = yy_get_previous_state( );
1187
1188 yy_cp = (yy_c_buf_p);
1189 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1190 goto yy_find_action;
1191 }
1192 break;
1193 }
1194
1195 default:
1196 YY_FATAL_ERROR(
1197 "fatal flex scanner internal error--no action found" );
1198 } /* end of action switch */
1199 } /* end of scanning one token */
1200 } /* end of user's declarations */
1201} /* end of boot_yylex */
1202
1203/* yy_get_next_buffer - try to read in a new buffer
1204 *
1205 * Returns a code representing an action:
1206 * EOB_ACT_LAST_MATCH -
1207 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1208 * EOB_ACT_END_OF_FILE - end of file
1209 */
1210static int yy_get_next_buffer (void)
1211{
1212 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1213 char *source = (yytext_ptr);
1214 int number_to_move, i;
1215 int ret_val;
1216
1217 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1218 YY_FATAL_ERROR(
1219 "fatal flex scanner internal error--end of buffer missed" );
1220
1221 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1222 { /* Don't try to fill the buffer, so this is an EOF. */
1223 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1224 {
1225 /* We matched a single character, the EOB, so
1226 * treat this as a final EOF.
1227 */
1228 return EOB_ACT_END_OF_FILE;
1229 }
1230
1231 else
1232 {
1233 /* We matched some text prior to the EOB, first
1234 * process it.
1235 */
1236 return EOB_ACT_LAST_MATCH;
1237 }
1238 }
1239
1240 /* Try to read more data. */
1241
1242 /* First move last chars to start of buffer. */
1243 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1244
1245 for ( i = 0; i < number_to_move; ++i )
1246 *(dest++) = *(source++);
1247
1248 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1249 /* don't do the read, it's not guaranteed to return an EOF,
1250 * just force an EOF
1251 */
1252 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1253
1254 else
1255 {
1256 int num_to_read =
1257 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1258
1259 while ( num_to_read <= 0 )
1260 { /* Not enough room in the buffer - grow it. */
1261
1262 /* just a shorter name for the current buffer */
1263 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1264
1265 int yy_c_buf_p_offset =
1266 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1267
1268 if ( b->yy_is_our_buffer )
1269 {
1270 int new_size = b->yy_buf_size * 2;
1271
1272 if ( new_size <= 0 )
1273 b->yy_buf_size += b->yy_buf_size / 8;
1274 else
1275 b->yy_buf_size *= 2;
1276
1277 b->yy_ch_buf = (char *)
1278 /* Include room in for 2 EOB chars. */
1279 boot_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1280 }
1281 else
1282 /* Can't grow it, we don't own it. */
1283 b->yy_ch_buf = NULL;
1284
1285 if ( ! b->yy_ch_buf )
1286 YY_FATAL_ERROR(
1287 "fatal error - scanner input buffer overflow" );
1288
1289 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1290
1291 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1292 number_to_move - 1;
1293
1294 }
1295
1296 if ( num_to_read > YY_READ_BUF_SIZE )
1297 num_to_read = YY_READ_BUF_SIZE;
1298
1299 /* Read in more data. */
1300 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1301 (yy_n_chars), num_to_read );
1302
1303 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1304 }
1305
1306 if ( (yy_n_chars) == 0 )
1307 {
1308 if ( number_to_move == YY_MORE_ADJ )
1309 {
1310 ret_val = EOB_ACT_END_OF_FILE;
1311 boot_yyrestart(boot_yyin );
1312 }
1313
1314 else
1315 {
1316 ret_val = EOB_ACT_LAST_MATCH;
1317 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1318 YY_BUFFER_EOF_PENDING;
1319 }
1320 }
1321
1322 else
1323 ret_val = EOB_ACT_CONTINUE_SCAN;
1324
1325 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1326 /* Extend the array by 50%, plus the number we really need. */
1327 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1328 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) boot_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1329 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1330 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1331 }
1332
1333 (yy_n_chars) += number_to_move;
1334 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1335 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1336
1337 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1338
1339 return ret_val;
1340}
1341
1342/* yy_get_previous_state - get the state just before the EOB char was reached */
1343
1344 static yy_state_type yy_get_previous_state (void)
1345{
1346 yy_state_type yy_current_state;
1347 char *yy_cp;
1348
1349 yy_current_state = (yy_start);
1350 yy_current_state += YY_AT_BOL();
1351
1352 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1353 {
1354 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1355 if ( yy_accept[yy_current_state] )
1356 {
1357 (yy_last_accepting_state) = yy_current_state;
1358 (yy_last_accepting_cpos) = yy_cp;
1359 }
1360 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1361 {
1362 yy_current_state = (int) yy_def[yy_current_state];
1363 if ( yy_current_state >= 128 )
1364 yy_c = yy_meta[(unsigned int) yy_c];
1365 }
1366 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1367 }
1368
1369 return yy_current_state;
1370}
1371
1372/* yy_try_NUL_trans - try to make a transition on the NUL character
1373 *
1374 * synopsis
1375 * next_state = yy_try_NUL_trans( current_state );
1376 */
1377 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1378{
1379 int yy_is_jam;
1380 char *yy_cp = (yy_c_buf_p);
1381
1382 YY_CHAR yy_c = 1;
1383 if ( yy_accept[yy_current_state] )
1384 {
1385 (yy_last_accepting_state) = yy_current_state;
1386 (yy_last_accepting_cpos) = yy_cp;
1387 }
1388 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1389 {
1390 yy_current_state = (int) yy_def[yy_current_state];
1391 if ( yy_current_state >= 128 )
1392 yy_c = yy_meta[(unsigned int) yy_c];
1393 }
1394 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1395 yy_is_jam = (yy_current_state == 127);
1396
1397 return yy_is_jam ? 0 : yy_current_state;
1398}
1399
1400#ifndef YY_NO_UNPUT
1401
1402#endif
1403
1404#ifndef YY_NO_INPUT
1405#ifdef __cplusplus
1406 static int yyinput (void)
1407#else
1408 static int input (void)
1409#endif
1410
1411{
1412 int c;
1413
1414 *(yy_c_buf_p) = (yy_hold_char);
1415
1416 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1417 {
1418 /* yy_c_buf_p now points to the character we want to return.
1419 * If this occurs *before* the EOB characters, then it's a
1420 * valid NUL; if not, then we've hit the end of the buffer.
1421 */
1422 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1423 /* This was really a NUL. */
1424 *(yy_c_buf_p) = '\0';
1425
1426 else
1427 { /* need more input */
1428 int offset = (yy_c_buf_p) - (yytext_ptr);
1429 ++(yy_c_buf_p);
1430
1431 switch ( yy_get_next_buffer( ) )
1432 {
1433 case EOB_ACT_LAST_MATCH:
1434 /* This happens because yy_g_n_b()
1435 * sees that we've accumulated a
1436 * token and flags that we need to
1437 * try matching the token before
1438 * proceeding. But for input(),
1439 * there's no matching to consider.
1440 * So convert the EOB_ACT_LAST_MATCH
1441 * to EOB_ACT_END_OF_FILE.
1442 */
1443
1444 /* Reset buffer status. */
1445 boot_yyrestart(boot_yyin );
1446
1447 /*FALLTHROUGH*/
1448
1449 case EOB_ACT_END_OF_FILE:
1450 {
1451 if ( boot_yywrap( ) )
1452 return 0;
1453
1454 if ( ! (yy_did_buffer_switch_on_eof) )
1455 YY_NEW_FILE;
1456#ifdef __cplusplus
1457 return yyinput();
1458#else
1459 return input();
1460#endif
1461 }
1462
1463 case EOB_ACT_CONTINUE_SCAN:
1464 (yy_c_buf_p) = (yytext_ptr) + offset;
1465 break;
1466 }
1467 }
1468 }
1469
1470 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1471 *(yy_c_buf_p) = '\0'; /* preserve boot_yytext */
1472 (yy_hold_char) = *++(yy_c_buf_p);
1473
1474 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1475
1476 return c;
1477}
1478#endif /* ifndef YY_NO_INPUT */
1479
1480/** Immediately switch to a different input stream.
1481 * @param input_file A readable stream.
1482 *
1483 * @note This function does not reset the start condition to @c INITIAL .
1484 */
1485 void boot_yyrestart (FILE * input_file )
1486{
1487
1488 if ( ! YY_CURRENT_BUFFER ){
1489 boot_yyensure_buffer_stack ();
1490 YY_CURRENT_BUFFER_LVALUE =
1491 boot_yy_create_buffer(boot_yyin,YY_BUF_SIZE );
1492 }
1493
1494 boot_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1495 boot_yy_load_buffer_state( );
1496}
1497
1498/** Switch to a different input buffer.
1499 * @param new_buffer The new input buffer.
1500 *
1501 */
1502 void boot_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1503{
1504
1505 /* TODO. We should be able to replace this entire function body
1506 * with
1507 * boot_yypop_buffer_state();
1508 * boot_yypush_buffer_state(new_buffer);
1509 */
1510 boot_yyensure_buffer_stack ();
1511 if ( YY_CURRENT_BUFFER == new_buffer )
1512 return;
1513
1514 if ( YY_CURRENT_BUFFER )
1515 {
1516 /* Flush out information for old buffer. */
1517 *(yy_c_buf_p) = (yy_hold_char);
1518 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1519 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1520 }
1521
1522 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1523 boot_yy_load_buffer_state( );
1524
1525 /* We don't actually know whether we did this switch during
1526 * EOF (boot_yywrap()) processing, but the only time this flag
1527 * is looked at is after boot_yywrap() is called, so it's safe
1528 * to go ahead and always set it.
1529 */
1530 (yy_did_buffer_switch_on_eof) = 1;
1531}
1532
1533static void boot_yy_load_buffer_state (void)
1534{
1535 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1536 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1537 boot_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1538 (yy_hold_char) = *(yy_c_buf_p);
1539}
1540
1541/** Allocate and initialize an input buffer state.
1542 * @param file A readable stream.
1543 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1544 *
1545 * @return the allocated buffer state.
1546 */
1547 YY_BUFFER_STATE boot_yy_create_buffer (FILE * file, int size )
1548{
1549 YY_BUFFER_STATE b;
1550
1551 b = (YY_BUFFER_STATE) boot_yyalloc(sizeof( struct yy_buffer_state ) );
1552 if ( ! b )
1553 YY_FATAL_ERROR( "out of dynamic memory in boot_yy_create_buffer()" );
1554
1555 b->yy_buf_size = (yy_size_t)size;
1556
1557 /* yy_ch_buf has to be 2 characters longer than the size given because
1558 * we need to put in 2 end-of-buffer characters.
1559 */
1560 b->yy_ch_buf = (char *) boot_yyalloc(b->yy_buf_size + 2 );
1561 if ( ! b->yy_ch_buf )
1562 YY_FATAL_ERROR( "out of dynamic memory in boot_yy_create_buffer()" );
1563
1564 b->yy_is_our_buffer = 1;
1565
1566 boot_yy_init_buffer(b,file );
1567
1568 return b;
1569}
1570
1571/** Destroy the buffer.
1572 * @param b a buffer created with boot_yy_create_buffer()
1573 *
1574 */
1575 void boot_yy_delete_buffer (YY_BUFFER_STATE b )
1576{
1577
1578 if ( ! b )
1579 return;
1580
1581 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1582 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1583
1584 if ( b->yy_is_our_buffer )
1585 boot_yyfree((void *) b->yy_ch_buf );
1586
1587 boot_yyfree((void *) b );
1588}
1589
1590/* Initializes or reinitializes a buffer.
1591 * This function is sometimes called more than once on the same buffer,
1592 * such as during a boot_yyrestart() or at EOF.
1593 */
1594 static void boot_yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1595
1596{
1597 int oerrno = errno;
1598
1599 boot_yy_flush_buffer(b );
1600
1601 b->yy_input_file = file;
1602 b->yy_fill_buffer = 1;
1603
1604 /* If b is the current buffer, then boot_yy_init_buffer was _probably_
1605 * called from boot_yyrestart() or through yy_get_next_buffer.
1606 * In that case, we don't want to reset the lineno or column.
1607 */
1608 if (b != YY_CURRENT_BUFFER){
1609 b->yy_bs_lineno = 1;
1610 b->yy_bs_column = 0;
1611 }
1612
1613 b->yy_is_interactive = 0;
1614
1615 errno = oerrno;
1616}
1617
1618/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1619 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1620 *
1621 */
1622 void boot_yy_flush_buffer (YY_BUFFER_STATE b )
1623{
1624 if ( ! b )
1625 return;
1626
1627 b->yy_n_chars = 0;
1628
1629 /* We always need two end-of-buffer characters. The first causes
1630 * a transition to the end-of-buffer state. The second causes
1631 * a jam in that state.
1632 */
1633 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1634 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1635
1636 b->yy_buf_pos = &b->yy_ch_buf[0];
1637
1638 b->yy_at_bol = 1;
1639 b->yy_buffer_status = YY_BUFFER_NEW;
1640
1641 if ( b == YY_CURRENT_BUFFER )
1642 boot_yy_load_buffer_state( );
1643}
1644
1645/** Pushes the new state onto the stack. The new state becomes
1646 * the current state. This function will allocate the stack
1647 * if necessary.
1648 * @param new_buffer The new state.
1649 *
1650 */
1651void boot_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1652{
1653 if (new_buffer == NULL)
1654 return;
1655
1656 boot_yyensure_buffer_stack();
1657
1658 /* This block is copied from boot_yy_switch_to_buffer. */
1659 if ( YY_CURRENT_BUFFER )
1660 {
1661 /* Flush out information for old buffer. */
1662 *(yy_c_buf_p) = (yy_hold_char);
1663 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1664 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1665 }
1666
1667 /* Only push if top exists. Otherwise, replace top. */
1668 if (YY_CURRENT_BUFFER)
1669 (yy_buffer_stack_top)++;
1670 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1671
1672 /* copied from boot_yy_switch_to_buffer. */
1673 boot_yy_load_buffer_state( );
1674 (yy_did_buffer_switch_on_eof) = 1;
1675}
1676
1677/** Removes and deletes the top of the stack, if present.
1678 * The next element becomes the new top.
1679 *
1680 */
1681void boot_yypop_buffer_state (void)
1682{
1683 if (!YY_CURRENT_BUFFER)
1684 return;
1685
1686 boot_yy_delete_buffer(YY_CURRENT_BUFFER );
1687 YY_CURRENT_BUFFER_LVALUE = NULL;
1688 if ((yy_buffer_stack_top) > 0)
1689 --(yy_buffer_stack_top);
1690
1691 if (YY_CURRENT_BUFFER) {
1692 boot_yy_load_buffer_state( );
1693 (yy_did_buffer_switch_on_eof) = 1;
1694 }
1695}
1696
1697/* Allocates the stack if it does not exist.
1698 * Guarantees space for at least one push.
1699 */
1700static void boot_yyensure_buffer_stack (void)
1701{
1702 int num_to_alloc;
1703
1704 if (!(yy_buffer_stack)) {
1705
1706 /* First allocation is just for 2 elements, since we don't know if this
1707 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1708 * immediate realloc on the next call.
1709 */
1710 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1711 (yy_buffer_stack) = (struct yy_buffer_state**)boot_yyalloc
1712 (num_to_alloc * sizeof(struct yy_buffer_state*)
1713 );
1714 if ( ! (yy_buffer_stack) )
1715 YY_FATAL_ERROR( "out of dynamic memory in boot_yyensure_buffer_stack()" );
1716
1717 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1718
1719 (yy_buffer_stack_max) = num_to_alloc;
1720 (yy_buffer_stack_top) = 0;
1721 return;
1722 }
1723
1724 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1725
1726 /* Increase the buffer to prepare for a possible push. */
1727 yy_size_t grow_size = 8 /* arbitrary grow size */;
1728
1729 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1730 (yy_buffer_stack) = (struct yy_buffer_state**)boot_yyrealloc
1731 ((yy_buffer_stack),
1732 num_to_alloc * sizeof(struct yy_buffer_state*)
1733 );
1734 if ( ! (yy_buffer_stack) )
1735 YY_FATAL_ERROR( "out of dynamic memory in boot_yyensure_buffer_stack()" );
1736
1737 /* zero only the new slots.*/
1738 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1739 (yy_buffer_stack_max) = num_to_alloc;
1740 }
1741}
1742
1743/** Setup the input buffer state to scan directly from a user-specified character buffer.
1744 * @param base the character buffer
1745 * @param size the size in bytes of the character buffer
1746 *
1747 * @return the newly allocated buffer state object.
1748 */
1749YY_BUFFER_STATE boot_yy_scan_buffer (char * base, yy_size_t size )
1750{
1751 YY_BUFFER_STATE b;
1752
1753 if ( size < 2 ||
1754 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1755 base[size-1] != YY_END_OF_BUFFER_CHAR )
1756 /* They forgot to leave room for the EOB's. */
1757 return NULL;
1758
1759 b = (YY_BUFFER_STATE) boot_yyalloc(sizeof( struct yy_buffer_state ) );
1760 if ( ! b )
1761 YY_FATAL_ERROR( "out of dynamic memory in boot_yy_scan_buffer()" );
1762
1763 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1764 b->yy_buf_pos = b->yy_ch_buf = base;
1765 b->yy_is_our_buffer = 0;
1766 b->yy_input_file = NULL;
1767 b->yy_n_chars = b->yy_buf_size;
1768 b->yy_is_interactive = 0;
1769 b->yy_at_bol = 1;
1770 b->yy_fill_buffer = 0;
1771 b->yy_buffer_status = YY_BUFFER_NEW;
1772
1773 boot_yy_switch_to_buffer(b );
1774
1775 return b;
1776}
1777
1778/** Setup the input buffer state to scan a string. The next call to boot_yylex() will
1779 * scan from a @e copy of @a str.
1780 * @param yystr a NUL-terminated string to scan
1781 *
1782 * @return the newly allocated buffer state object.
1783 * @note If you want to scan bytes that may contain NUL values, then use
1784 * boot_yy_scan_bytes() instead.
1785 */
1786YY_BUFFER_STATE boot_yy_scan_string (yyconst char * yystr )
1787{
1788
1789 return boot_yy_scan_bytes(yystr,(int) strlen(yystr) );
1790}
1791
1792/** Setup the input buffer state to scan the given bytes. The next call to boot_yylex() will
1793 * scan from a @e copy of @a bytes.
1794 * @param yybytes the byte buffer to scan
1795 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1796 *
1797 * @return the newly allocated buffer state object.
1798 */
1799YY_BUFFER_STATE boot_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1800{
1801 YY_BUFFER_STATE b;
1802 char *buf;
1803 yy_size_t n;
1804 int i;
1805
1806 /* Get memory for full buffer, including space for trailing EOB's. */
1807 n = (yy_size_t) (_yybytes_len + 2);
1808 buf = (char *) boot_yyalloc(n );
1809 if ( ! buf )
1810 YY_FATAL_ERROR( "out of dynamic memory in boot_yy_scan_bytes()" );
1811
1812 for ( i = 0; i < _yybytes_len; ++i )
1813 buf[i] = yybytes[i];
1814
1815 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1816
1817 b = boot_yy_scan_buffer(buf,n );
1818 if ( ! b )
1819 YY_FATAL_ERROR( "bad buffer in boot_yy_scan_bytes()" );
1820
1821 /* It's okay to grow etc. this buffer, and we should throw it
1822 * away when we're done.
1823 */
1824 b->yy_is_our_buffer = 1;
1825
1826 return b;
1827}
1828
1829#ifndef YY_EXIT_FAILURE
1830#define YY_EXIT_FAILURE 2
1831#endif
1832
1833static void yynoreturn yy_fatal_error (yyconst char* msg )
1834{
1835 (void) fprintf( stderr, "%s\n", msg );
1836 exit( YY_EXIT_FAILURE );
1837}
1838
1839/* Redefine yyless() so it works in section 3 code. */
1840
1841#undef yyless
1842#define yyless(n) \
1843 do \
1844 { \
1845 /* Undo effects of setting up boot_yytext. */ \
1846 int yyless_macro_arg = (n); \
1847 YY_LESS_LINENO(yyless_macro_arg);\
1848 boot_yytext[boot_yyleng] = (yy_hold_char); \
1849 (yy_c_buf_p) = boot_yytext + yyless_macro_arg; \
1850 (yy_hold_char) = *(yy_c_buf_p); \
1851 *(yy_c_buf_p) = '\0'; \
1852 boot_yyleng = yyless_macro_arg; \
1853 } \
1854 while ( 0 )
1855
1856/* Accessor methods (get/set functions) to struct members. */
1857
1858/** Get the current line number.
1859 *
1860 */
1861int boot_yyget_lineno (void)
1862{
1863
1864 return boot_yylineno;
1865}
1866
1867/** Get the input stream.
1868 *
1869 */
1870FILE *boot_yyget_in (void)
1871{
1872 return boot_yyin;
1873}
1874
1875/** Get the output stream.
1876 *
1877 */
1878FILE *boot_yyget_out (void)
1879{
1880 return boot_yyout;
1881}
1882
1883/** Get the length of the current token.
1884 *
1885 */
1886int boot_yyget_leng (void)
1887{
1888 return boot_yyleng;
1889}
1890
1891/** Get the current token.
1892 *
1893 */
1894
1895char *boot_yyget_text (void)
1896{
1897 return boot_yytext;
1898}
1899
1900/** Set the current line number.
1901 * @param _line_number line number
1902 *
1903 */
1904void boot_yyset_lineno (int _line_number )
1905{
1906
1907 boot_yylineno = _line_number;
1908}
1909
1910/** Set the input stream. This does not discard the current
1911 * input buffer.
1912 * @param _in_str A readable stream.
1913 *
1914 * @see boot_yy_switch_to_buffer
1915 */
1916void boot_yyset_in (FILE * _in_str )
1917{
1918 boot_yyin = _in_str ;
1919}
1920
1921void boot_yyset_out (FILE * _out_str )
1922{
1923 boot_yyout = _out_str ;
1924}
1925
1926int boot_yyget_debug (void)
1927{
1928 return boot_yy_flex_debug;
1929}
1930
1931void boot_yyset_debug (int _bdebug )
1932{
1933 boot_yy_flex_debug = _bdebug ;
1934}
1935
1936static int yy_init_globals (void)
1937{
1938 /* Initialization is the same as for the non-reentrant scanner.
1939 * This function is called from boot_yylex_destroy(), so don't allocate here.
1940 */
1941
1942 (yy_buffer_stack) = NULL;
1943 (yy_buffer_stack_top) = 0;
1944 (yy_buffer_stack_max) = 0;
1945 (yy_c_buf_p) = NULL;
1946 (yy_init) = 0;
1947 (yy_start) = 0;
1948
1949/* Defined in main.c */
1950#ifdef YY_STDINIT
1951 boot_yyin = stdin;
1952 boot_yyout = stdout;
1953#else
1954 boot_yyin = NULL;
1955 boot_yyout = NULL;
1956#endif
1957
1958 /* For future reference: Set errno on error, since we are called by
1959 * boot_yylex_init()
1960 */
1961 return 0;
1962}
1963
1964/* boot_yylex_destroy is for both reentrant and non-reentrant scanners. */
1965int boot_yylex_destroy (void)
1966{
1967
1968 /* Pop the buffer stack, destroying each element. */
1969 while(YY_CURRENT_BUFFER){
1970 boot_yy_delete_buffer(YY_CURRENT_BUFFER );
1971 YY_CURRENT_BUFFER_LVALUE = NULL;
1972 boot_yypop_buffer_state();
1973 }
1974
1975 /* Destroy the stack itself. */
1976 boot_yyfree((yy_buffer_stack) );
1977 (yy_buffer_stack) = NULL;
1978
1979 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1980 * boot_yylex() is called, initialization will occur. */
1981 yy_init_globals( );
1982
1983 return 0;
1984}
1985
1986/*
1987 * Internal utility routines.
1988 */
1989
1990#ifndef yytext_ptr
1991static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1992{
1993
1994 int i;
1995 for ( i = 0; i < n; ++i )
1996 s1[i] = s2[i];
1997}
1998#endif
1999
2000#ifdef YY_NEED_STRLEN
2001static int yy_flex_strlen (yyconst char * s )
2002{
2003 int n;
2004 for ( n = 0; s[n]; ++n )
2005 ;
2006
2007 return n;
2008}
2009#endif
2010
2011void *boot_yyalloc (yy_size_t size )
2012{
2013 return malloc(size);
2014}
2015
2016void *boot_yyrealloc (void * ptr, yy_size_t size )
2017{
2018
2019 /* The cast to (char *) in the following accommodates both
2020 * implementations that use char* generic pointers, and those
2021 * that use void* generic pointers. It works with the latter
2022 * because both ANSI C and C++ allow castless assignment from
2023 * any pointer type to void*, and deal with argument conversions
2024 * as though doing an assignment.
2025 */
2026 return realloc(ptr, size);
2027}
2028
2029void boot_yyfree (void * ptr )
2030{
2031 free( (char *) ptr ); /* see boot_yyrealloc() for (char *) cast */
2032}
2033
2034#define YYTABLES_NAME "yytables"
2035
2036#line 138 "bootscanner.l"
2037
2038
2039
2040/* LCOV_EXCL_STOP */
2041
2042void
2043yyerror(const char *message)
2044{
2045 elog(ERROR, "%s at line %d", message, yyline);
2046}
2047
2048