1 #line 2 "psqlscan.c"
2 /*-------------------------------------------------------------------------
3  *
4  * psqlscan.l
5  *	  lexical scanner for SQL commands
6  *
7  * This lexer used to be part of psql, and that heritage is reflected in
8  * the file name as well as function and typedef names, though it can now
9  * be used by other frontend programs as well.  It's also possible to extend
10  * this lexer with a compatible add-on lexer to handle program-specific
11  * backslash commands.
12  *
13  * This code is mainly concerned with determining where the end of a SQL
14  * statement is: we are looking for semicolons that are not within quotes,
15  * comments, or parentheses.  The most reliable way to handle this is to
16  * borrow the backend's flex lexer rules, lock, stock, and barrel.  The rules
17  * below are (except for a few) the same as the backend's, but their actions
18  * are just ECHO whereas the backend's actions generally do other things.
19  *
20  * XXX The rules in this file must be kept in sync with the backend lexer!!!
21  *
22  * XXX Avoid creating backtracking cases --- see the backend lexer for info.
23  *
24  * See psqlscan_int.h for additional commentary.
25  *
26  *
27  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
28  * Portions Copyright (c) 1994, Regents of the University of California
29  *
30  * IDENTIFICATION
31  *	  src/fe_utils/psqlscan.l
32  *
33  *-------------------------------------------------------------------------
34  */
35 #include "postgres_fe.h"
36 
37 #include "common/logging.h"
38 #include "fe_utils/psqlscan.h"
39 
40 #include "libpq-fe.h"
41 
42 #line 43 "psqlscan.c"
43 
44 #define  YY_INT_ALIGNED short int
45 
46 /* A lexical scanner generated by flex */
47 
48 #define FLEX_SCANNER
49 #define YY_FLEX_MAJOR_VERSION 2
50 #define YY_FLEX_MINOR_VERSION 6
51 #define YY_FLEX_SUBMINOR_VERSION 4
52 #if YY_FLEX_SUBMINOR_VERSION > 0
53 #define FLEX_BETA
54 #endif
55 
56 #ifdef yy_create_buffer
57 #define psql_yy_create_buffer_ALREADY_DEFINED
58 #else
59 #define yy_create_buffer psql_yy_create_buffer
60 #endif
61 
62 #ifdef yy_delete_buffer
63 #define psql_yy_delete_buffer_ALREADY_DEFINED
64 #else
65 #define yy_delete_buffer psql_yy_delete_buffer
66 #endif
67 
68 #ifdef yy_scan_buffer
69 #define psql_yy_scan_buffer_ALREADY_DEFINED
70 #else
71 #define yy_scan_buffer psql_yy_scan_buffer
72 #endif
73 
74 #ifdef yy_scan_string
75 #define psql_yy_scan_string_ALREADY_DEFINED
76 #else
77 #define yy_scan_string psql_yy_scan_string
78 #endif
79 
80 #ifdef yy_scan_bytes
81 #define psql_yy_scan_bytes_ALREADY_DEFINED
82 #else
83 #define yy_scan_bytes psql_yy_scan_bytes
84 #endif
85 
86 #ifdef yy_init_buffer
87 #define psql_yy_init_buffer_ALREADY_DEFINED
88 #else
89 #define yy_init_buffer psql_yy_init_buffer
90 #endif
91 
92 #ifdef yy_flush_buffer
93 #define psql_yy_flush_buffer_ALREADY_DEFINED
94 #else
95 #define yy_flush_buffer psql_yy_flush_buffer
96 #endif
97 
98 #ifdef yy_load_buffer_state
99 #define psql_yy_load_buffer_state_ALREADY_DEFINED
100 #else
101 #define yy_load_buffer_state psql_yy_load_buffer_state
102 #endif
103 
104 #ifdef yy_switch_to_buffer
105 #define psql_yy_switch_to_buffer_ALREADY_DEFINED
106 #else
107 #define yy_switch_to_buffer psql_yy_switch_to_buffer
108 #endif
109 
110 #ifdef yypush_buffer_state
111 #define psql_yypush_buffer_state_ALREADY_DEFINED
112 #else
113 #define yypush_buffer_state psql_yypush_buffer_state
114 #endif
115 
116 #ifdef yypop_buffer_state
117 #define psql_yypop_buffer_state_ALREADY_DEFINED
118 #else
119 #define yypop_buffer_state psql_yypop_buffer_state
120 #endif
121 
122 #ifdef yyensure_buffer_stack
123 #define psql_yyensure_buffer_stack_ALREADY_DEFINED
124 #else
125 #define yyensure_buffer_stack psql_yyensure_buffer_stack
126 #endif
127 
128 #ifdef yylex
129 #define psql_yylex_ALREADY_DEFINED
130 #else
131 #define yylex psql_yylex
132 #endif
133 
134 #ifdef yyrestart
135 #define psql_yyrestart_ALREADY_DEFINED
136 #else
137 #define yyrestart psql_yyrestart
138 #endif
139 
140 #ifdef yylex_init
141 #define psql_yylex_init_ALREADY_DEFINED
142 #else
143 #define yylex_init psql_yylex_init
144 #endif
145 
146 #ifdef yylex_init_extra
147 #define psql_yylex_init_extra_ALREADY_DEFINED
148 #else
149 #define yylex_init_extra psql_yylex_init_extra
150 #endif
151 
152 #ifdef yylex_destroy
153 #define psql_yylex_destroy_ALREADY_DEFINED
154 #else
155 #define yylex_destroy psql_yylex_destroy
156 #endif
157 
158 #ifdef yyget_debug
159 #define psql_yyget_debug_ALREADY_DEFINED
160 #else
161 #define yyget_debug psql_yyget_debug
162 #endif
163 
164 #ifdef yyset_debug
165 #define psql_yyset_debug_ALREADY_DEFINED
166 #else
167 #define yyset_debug psql_yyset_debug
168 #endif
169 
170 #ifdef yyget_extra
171 #define psql_yyget_extra_ALREADY_DEFINED
172 #else
173 #define yyget_extra psql_yyget_extra
174 #endif
175 
176 #ifdef yyset_extra
177 #define psql_yyset_extra_ALREADY_DEFINED
178 #else
179 #define yyset_extra psql_yyset_extra
180 #endif
181 
182 #ifdef yyget_in
183 #define psql_yyget_in_ALREADY_DEFINED
184 #else
185 #define yyget_in psql_yyget_in
186 #endif
187 
188 #ifdef yyset_in
189 #define psql_yyset_in_ALREADY_DEFINED
190 #else
191 #define yyset_in psql_yyset_in
192 #endif
193 
194 #ifdef yyget_out
195 #define psql_yyget_out_ALREADY_DEFINED
196 #else
197 #define yyget_out psql_yyget_out
198 #endif
199 
200 #ifdef yyset_out
201 #define psql_yyset_out_ALREADY_DEFINED
202 #else
203 #define yyset_out psql_yyset_out
204 #endif
205 
206 #ifdef yyget_leng
207 #define psql_yyget_leng_ALREADY_DEFINED
208 #else
209 #define yyget_leng psql_yyget_leng
210 #endif
211 
212 #ifdef yyget_text
213 #define psql_yyget_text_ALREADY_DEFINED
214 #else
215 #define yyget_text psql_yyget_text
216 #endif
217 
218 #ifdef yyget_lineno
219 #define psql_yyget_lineno_ALREADY_DEFINED
220 #else
221 #define yyget_lineno psql_yyget_lineno
222 #endif
223 
224 #ifdef yyset_lineno
225 #define psql_yyset_lineno_ALREADY_DEFINED
226 #else
227 #define yyset_lineno psql_yyset_lineno
228 #endif
229 
230 #ifdef yyget_column
231 #define psql_yyget_column_ALREADY_DEFINED
232 #else
233 #define yyget_column psql_yyget_column
234 #endif
235 
236 #ifdef yyset_column
237 #define psql_yyset_column_ALREADY_DEFINED
238 #else
239 #define yyset_column psql_yyset_column
240 #endif
241 
242 #ifdef yywrap
243 #define psql_yywrap_ALREADY_DEFINED
244 #else
245 #define yywrap psql_yywrap
246 #endif
247 
248 #ifdef yyget_lval
249 #define psql_yyget_lval_ALREADY_DEFINED
250 #else
251 #define yyget_lval psql_yyget_lval
252 #endif
253 
254 #ifdef yyset_lval
255 #define psql_yyset_lval_ALREADY_DEFINED
256 #else
257 #define yyset_lval psql_yyset_lval
258 #endif
259 
260 #ifdef yyalloc
261 #define psql_yyalloc_ALREADY_DEFINED
262 #else
263 #define yyalloc psql_yyalloc
264 #endif
265 
266 #ifdef yyrealloc
267 #define psql_yyrealloc_ALREADY_DEFINED
268 #else
269 #define yyrealloc psql_yyrealloc
270 #endif
271 
272 #ifdef yyfree
273 #define psql_yyfree_ALREADY_DEFINED
274 #else
275 #define yyfree psql_yyfree
276 #endif
277 
278 /* First, we deal with  platform-specific or compiler-specific issues. */
279 
280 /* begin standard C headers. */
281 #include <stdio.h>
282 #include <string.h>
283 #include <errno.h>
284 #include <stdlib.h>
285 
286 /* end standard C headers. */
287 
288 /* flex integer type definitions */
289 
290 #ifndef FLEXINT_H
291 #define FLEXINT_H
292 
293 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
294 
295 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
296 
297 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
298  * if you want the limit (max/min) macros for int types.
299  */
300 #ifndef __STDC_LIMIT_MACROS
301 #define __STDC_LIMIT_MACROS 1
302 #endif
303 
304 #include <inttypes.h>
305 typedef int8_t flex_int8_t;
306 typedef uint8_t flex_uint8_t;
307 typedef int16_t flex_int16_t;
308 typedef uint16_t flex_uint16_t;
309 typedef int32_t flex_int32_t;
310 typedef uint32_t flex_uint32_t;
311 #else
312 typedef signed char flex_int8_t;
313 typedef short int flex_int16_t;
314 typedef int flex_int32_t;
315 typedef unsigned char flex_uint8_t;
316 typedef unsigned short int flex_uint16_t;
317 typedef unsigned int flex_uint32_t;
318 
319 /* Limits of integral types. */
320 #ifndef INT8_MIN
321 #define INT8_MIN               (-128)
322 #endif
323 #ifndef INT16_MIN
324 #define INT16_MIN              (-32767-1)
325 #endif
326 #ifndef INT32_MIN
327 #define INT32_MIN              (-2147483647-1)
328 #endif
329 #ifndef INT8_MAX
330 #define INT8_MAX               (127)
331 #endif
332 #ifndef INT16_MAX
333 #define INT16_MAX              (32767)
334 #endif
335 #ifndef INT32_MAX
336 #define INT32_MAX              (2147483647)
337 #endif
338 #ifndef UINT8_MAX
339 #define UINT8_MAX              (255U)
340 #endif
341 #ifndef UINT16_MAX
342 #define UINT16_MAX             (65535U)
343 #endif
344 #ifndef UINT32_MAX
345 #define UINT32_MAX             (4294967295U)
346 #endif
347 
348 #ifndef SIZE_MAX
349 #define SIZE_MAX               (~(size_t)0)
350 #endif
351 
352 #endif /* ! C99 */
353 
354 #endif /* ! FLEXINT_H */
355 
356 /* begin standard C++ headers. */
357 
358 /* TODO: this is always defined, so inline it */
359 #define yyconst const
360 
361 #if defined(__GNUC__) && __GNUC__ >= 3
362 #define yynoreturn __attribute__((__noreturn__))
363 #else
364 #define yynoreturn
365 #endif
366 
367 /* Returned upon end-of-file. */
368 #define YY_NULL 0
369 
370 /* Promotes a possibly negative, possibly signed char to an
371  *   integer in range [0..255] for use as an array index.
372  */
373 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
374 
375 /* An opaque pointer. */
376 #ifndef YY_TYPEDEF_YY_SCANNER_T
377 #define YY_TYPEDEF_YY_SCANNER_T
378 typedef void* yyscan_t;
379 #endif
380 
381 /* For convenience, these vars (plus the bison vars far below)
382    are macros in the reentrant scanner. */
383 #define yyin yyg->yyin_r
384 #define yyout yyg->yyout_r
385 #define yyextra yyg->yyextra_r
386 #define yyleng yyg->yyleng_r
387 #define yytext yyg->yytext_r
388 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
389 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
390 #define yy_flex_debug yyg->yy_flex_debug_r
391 
392 /* Enter a start condition.  This macro really ought to take a parameter,
393  * but we do it the disgusting crufty way forced on us by the ()-less
394  * definition of BEGIN.
395  */
396 #define BEGIN yyg->yy_start = 1 + 2 *
397 /* Translate the current start state into a value that can be later handed
398  * to BEGIN to return to the state.  The YYSTATE alias is for lex
399  * compatibility.
400  */
401 #define YY_START ((yyg->yy_start - 1) / 2)
402 #define YYSTATE YY_START
403 /* Action number for EOF rule of a given start state. */
404 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
405 /* Special action meaning "start processing a new file". */
406 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
407 #define YY_END_OF_BUFFER_CHAR 0
408 
409 /* Size of default input buffer. */
410 #ifndef YY_BUF_SIZE
411 #ifdef __ia64__
412 /* On IA-64, the buffer size is 16k, not 8k.
413  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
414  * Ditto for the __ia64__ case accordingly.
415  */
416 #define YY_BUF_SIZE 32768
417 #else
418 #define YY_BUF_SIZE 16384
419 #endif /* __ia64__ */
420 #endif
421 
422 /* The state buf must be large enough to hold one state per character in the main buffer.
423  */
424 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
425 
426 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
427 #define YY_TYPEDEF_YY_BUFFER_STATE
428 typedef struct yy_buffer_state *YY_BUFFER_STATE;
429 #endif
430 
431 #ifndef YY_TYPEDEF_YY_SIZE_T
432 #define YY_TYPEDEF_YY_SIZE_T
433 typedef size_t yy_size_t;
434 #endif
435 
436 #define EOB_ACT_CONTINUE_SCAN 0
437 #define EOB_ACT_END_OF_FILE 1
438 #define EOB_ACT_LAST_MATCH 2
439 
440     #define YY_LESS_LINENO(n)
441     #define YY_LINENO_REWIND_TO(ptr)
442 
443 /* Return all but the first "n" matched characters back to the input stream. */
444 #define yyless(n) \
445 	do \
446 		{ \
447 		/* Undo effects of setting up yytext. */ \
448         int yyless_macro_arg = (n); \
449         YY_LESS_LINENO(yyless_macro_arg);\
450 		*yy_cp = yyg->yy_hold_char; \
451 		YY_RESTORE_YY_MORE_OFFSET \
452 		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
453 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
454 		} \
455 	while ( 0 )
456 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
457 
458 #ifndef YY_STRUCT_YY_BUFFER_STATE
459 #define YY_STRUCT_YY_BUFFER_STATE
460 struct yy_buffer_state
461 	{
462 	FILE *yy_input_file;
463 
464 	char *yy_ch_buf;		/* input buffer */
465 	char *yy_buf_pos;		/* current position in input buffer */
466 
467 	/* Size of input buffer in bytes, not including room for EOB
468 	 * characters.
469 	 */
470 	int yy_buf_size;
471 
472 	/* Number of characters read into yy_ch_buf, not including EOB
473 	 * characters.
474 	 */
475 	int yy_n_chars;
476 
477 	/* Whether we "own" the buffer - i.e., we know we created it,
478 	 * and can realloc() it to grow it, and should free() it to
479 	 * delete it.
480 	 */
481 	int yy_is_our_buffer;
482 
483 	/* Whether this is an "interactive" input source; if so, and
484 	 * if we're using stdio for input, then we want to use getc()
485 	 * instead of fread(), to make sure we stop fetching input after
486 	 * each newline.
487 	 */
488 	int yy_is_interactive;
489 
490 	/* Whether we're considered to be at the beginning of a line.
491 	 * If so, '^' rules will be active on the next match, otherwise
492 	 * not.
493 	 */
494 	int yy_at_bol;
495 
496     int yy_bs_lineno; /**< The line count. */
497     int yy_bs_column; /**< The column count. */
498 
499 	/* Whether to try to fill the input buffer when we reach the
500 	 * end of it.
501 	 */
502 	int yy_fill_buffer;
503 
504 	int yy_buffer_status;
505 
506 #define YY_BUFFER_NEW 0
507 #define YY_BUFFER_NORMAL 1
508 	/* When an EOF's been seen but there's still some text to process
509 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
510 	 * shouldn't try reading from the input source any more.  We might
511 	 * still have a bunch of tokens to match, though, because of
512 	 * possible backing-up.
513 	 *
514 	 * When we actually see the EOF, we change the status to "new"
515 	 * (via yyrestart()), so that the user can continue scanning by
516 	 * just pointing yyin at a new input file.
517 	 */
518 #define YY_BUFFER_EOF_PENDING 2
519 
520 	};
521 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
522 
523 /* We provide macros for accessing buffer states in case in the
524  * future we want to put the buffer states in a more general
525  * "scanner state".
526  *
527  * Returns the top of the stack, or NULL.
528  */
529 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
530                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
531                           : NULL)
532 /* Same as previous macro, but useful when we know that the buffer stack is not
533  * NULL or when we need an lvalue. For internal use only.
534  */
535 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
536 
537 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
538 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
539 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
540 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
541 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
542 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
543 void yypop_buffer_state ( yyscan_t yyscanner );
544 
545 static void yyensure_buffer_stack ( yyscan_t yyscanner );
546 static void yy_load_buffer_state ( yyscan_t yyscanner );
547 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
548 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
549 
550 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
551 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
552 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
553 
554 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
555 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
556 void yyfree ( void * , yyscan_t yyscanner );
557 
558 #define yy_new_buffer yy_create_buffer
559 #define yy_set_interactive(is_interactive) \
560 	{ \
561 	if ( ! YY_CURRENT_BUFFER ){ \
562         yyensure_buffer_stack (yyscanner); \
563 		YY_CURRENT_BUFFER_LVALUE =    \
564             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
565 	} \
566 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
567 	}
568 #define yy_set_bol(at_bol) \
569 	{ \
570 	if ( ! YY_CURRENT_BUFFER ){\
571         yyensure_buffer_stack (yyscanner); \
572 		YY_CURRENT_BUFFER_LVALUE =    \
573             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
574 	} \
575 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
576 	}
577 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
578 
579 /* Begin user sect3 */
580 
581 #define psql_yywrap(yyscanner) (/*CONSTCOND*/1)
582 #define YY_SKIP_YYWRAP
583 typedef flex_uint8_t YY_CHAR;
584 
585 typedef int yy_state_type;
586 
587 #define yytext_ptr yytext_r
588 
589 static const flex_int16_t yy_nxt[][44] =
590     {
591     {
592         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
593         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
594         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
595         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
596         0,    0,    0,    0
597     },
598 
599     {
600        25,   26,   27,   28,   27,   29,   30,   31,   32,   33,
601        31,   34,   35,   36,   33,   33,   37,   38,   39,   40,
602        41,   41,   42,   43,   44,   45,   46,   31,   47,   48,
603        47,   47,   49,   47,   50,   47,   47,   51,   52,   53,
604        51,   52,   26,   26
605 
606     },
607 
608     {
609        25,   26,   27,   28,   27,   29,   30,   31,   32,   33,
610        31,   34,   35,   36,   33,   33,   37,   38,   39,   40,
611        41,   41,   42,   43,   44,   45,   46,   31,   47,   48,
612        47,   47,   49,   47,   50,   47,   47,   51,   52,   53,
613        51,   52,   26,   26
614     },
615 
616     {
617        25,   54,   54,   54,   54,   54,   54,   54,   54,   54,
618        54,   55,   54,   54,   54,   54,   54,   54,   54,   54,
619        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
620        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
621        54,   54,   54,   54
622 
623     },
624 
625     {
626        25,   54,   54,   54,   54,   54,   54,   54,   54,   54,
627        54,   55,   54,   54,   54,   54,   54,   54,   54,   54,
628        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
629        54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
630        54,   54,   54,   54
631     },
632 
633     {
634        25,   56,   56,   56,   56,   57,   56,   57,   56,   57,
635        57,   56,   56,   56,   58,   57,   56,   57,   56,   59,
636        56,   56,   56,   56,   57,   57,   57,   57,   56,   56,
637        56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
638        56,   56,   56,   56
639 
640     },
641 
642     {
643        25,   56,   56,   56,   56,   57,   56,   57,   56,   57,
644        57,   56,   56,   56,   58,   57,   56,   57,   56,   59,
645        56,   56,   56,   56,   57,   57,   57,   57,   56,   56,
646        56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
647        56,   56,   56,   56
648     },
649 
650     {
651        25,   60,   60,   60,   60,   60,   61,   60,   60,   60,
652        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
653        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
654        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
655        60,   60,   60,   60
656 
657     },
658 
659     {
660        25,   60,   60,   60,   60,   60,   61,   60,   60,   60,
661        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
662        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
663        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
664        60,   60,   60,   60
665     },
666 
667     {
668        25,   62,   62,   62,   62,   62,   62,   62,   62,   62,
669        62,   63,   62,   62,   62,   62,   62,   62,   62,   62,
670        62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
671        62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
672        62,   62,   62,   62
673 
674     },
675 
676     {
677        25,   62,   62,   62,   62,   62,   62,   62,   62,   62,
678        62,   63,   62,   62,   62,   62,   62,   62,   62,   62,
679        62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
680        62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
681        62,   62,   62,   62
682     },
683 
684     {
685        25,   64,   64,   64,   64,   64,   64,   64,   64,   64,
686        64,   65,   64,   64,   64,   64,   64,   64,   64,   64,
687        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
688        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
689        64,   64,   64,   64
690 
691     },
692 
693     {
694        25,   64,   64,   64,   64,   64,   64,   64,   64,   64,
695        64,   65,   64,   64,   64,   64,   64,   64,   64,   64,
696        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
697        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
698        64,   64,   64,   64
699     },
700 
701     {
702        25,   66,   66,   67,   66,   66,   66,   66,   66,   66,
703        66,   68,   66,   66,   66,   66,   66,   66,   66,   66,
704        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
705        66,   66,   66,   66,   66,   66,   66,   66,   66,   69,
706        66,   66,   66,   66
707 
708     },
709 
710     {
711        25,   66,   66,   67,   66,   66,   66,   66,   66,   66,
712        66,   68,   66,   66,   66,   66,   66,   66,   66,   66,
713        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
714        66,   66,   66,   66,   66,   66,   66,   66,   66,   69,
715        66,   66,   66,   66
716     },
717 
718     {
719        25,   70,   70,   71,   70,   70,   70,   70,   72,   70,
720        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
721        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
722        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
723        70,   70,   70,   70
724 
725     },
726 
727     {
728        25,   70,   70,   71,   70,   70,   70,   70,   72,   70,
729        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
730        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
731        70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
732        70,   70,   70,   70
733     },
734 
735     {
736        25,   60,   60,   60,   60,   60,   73,   60,   60,   60,
737        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
738        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
739        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
740        60,   60,   60,   60
741 
742     },
743 
744     {
745        25,   60,   60,   60,   60,   60,   73,   60,   60,   60,
746        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
747        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
748        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
749        60,   60,   60,   60
750     },
751 
752     {
753        25,   74,   75,   76,   75,   74,   74,   74,   74,   74,
754        74,   74,   74,   74,   74,   74,   74,   77,   74,   74,
755        74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
756        74,   74,   74,   74,   74,   74,   74,   78,   74,   74,
757        78,   74,   74,   74
758 
759     },
760 
761     {
762        25,   74,   75,   76,   75,   74,   74,   74,   74,   74,
763        74,   74,   74,   74,   74,   74,   74,   77,   74,   74,
764        74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
765        74,   74,   74,   74,   74,   74,   74,   78,   74,   74,
766        78,   74,   74,   74
767     },
768 
769     {
770        25,   64,   64,   64,   64,   64,   64,   64,   64,   64,
771        64,   79,   64,   64,   64,   64,   64,   64,   64,   64,
772        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
773        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
774        64,   64,   64,   64
775 
776     },
777 
778     {
779        25,   64,   64,   64,   64,   64,   64,   64,   64,   64,
780        64,   79,   64,   64,   64,   64,   64,   64,   64,   64,
781        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
782        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
783        64,   64,   64,   64
784     },
785 
786     {
787        25,   80,   81,   82,   81,   80,   80,   80,   80,   80,
788        80,   80,   80,   80,   80,   80,   80,   83,   80,   80,
789        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
790        80,   80,   80,   80,   80,   80,   80,   84,   80,   80,
791        84,   80,   80,   80
792 
793     },
794 
795     {
796        25,   80,   81,   82,   81,   80,   80,   80,   80,   80,
797        80,   80,   80,   80,   80,   80,   80,   83,   80,   80,
798        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
799        80,   80,   80,   80,   80,   80,   80,   84,   80,   80,
800        84,   80,   80,   80
801     },
802 
803     {
804       -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
805       -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
806       -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
807       -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
808       -25,  -25,  -25,  -25
809 
810     },
811 
812     {
813        25,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
814       -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
815       -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
816       -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
817       -26,  -26,  -26,  -26
818     },
819 
820     {
821        25,  -27,   85,   85,   85,  -27,  -27,  -27,  -27,  -27,
822       -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
823       -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
824       -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
825       -27,  -27,  -27,  -27
826 
827     },
828 
829     {
830        25,  -28,   85,   85,   85,  -28,  -28,  -28,  -28,  -28,
831       -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
832       -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
833       -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
834       -28,  -28,  -28,  -28
835     },
836 
837     {
838        25,  -29,  -29,  -29,  -29,   86,  -29,   86,  -29,   86,
839        86,  -29,  -29,  -29,   86,   86,  -29,   86,  -29,   86,
840       -29,  -29,  -29,  -29,   86,   87,   86,   86,  -29,  -29,
841       -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
842       -29,  -29,  -29,  -29
843 
844     },
845 
846     {
847        25,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
848       -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
849       -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
850       -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
851       -30,  -30,  -30,  -30
852     },
853 
854     {
855        25,  -31,  -31,  -31,  -31,   86,  -31,   86,  -31,   86,
856        86,  -31,  -31,  -31,   86,   86,  -31,   86,  -31,   86,
857       -31,  -31,  -31,  -31,   86,   86,   86,   86,  -31,  -31,
858       -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
859       -31,  -31,  -31,  -31
860 
861     },
862 
863     {
864        25,  -32,  -32,  -32,  -32,  -32,  -32,  -32,   88,  -32,
865       -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
866        89,   89,  -32,  -32,  -32,  -32,  -32,  -32,   90,   90,
867        90,   90,   90,   90,   90,   90,   90,   90,   90,  -32,
868        90,   90,  -32,  -32
869     },
870 
871     {
872        25,  -33,  -33,  -33,  -33,   86,  -33,   86,  -33,   86,
873        86,  -33,  -33,  -33,   86,   86,  -33,   86,  -33,   86,
874       -33,  -33,  -33,  -33,   86,   86,   86,   86,  -33,  -33,
875       -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
876       -33,  -33,  -33,  -33
877 
878     },
879 
880     {
881        25,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
882       -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
883       -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
884       -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
885       -34,  -34,  -34,  -34
886     },
887 
888     {
889        25,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
890       -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
891       -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
892       -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
893       -35,  -35,  -35,  -35
894 
895     },
896 
897     {
898        25,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
899       -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
900       -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
901       -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
902       -36,  -36,  -36,  -36
903     },
904 
905     {
906        25,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
907       -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
908       -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
909       -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
910       -37,  -37,  -37,  -37
911 
912     },
913 
914     {
915        25,  -38,  -38,  -38,  -38,   86,  -38,   86,  -38,   86,
916        86,  -38,  -38,  -38,   86,   86,  -38,   91,  -38,   86,
917       -38,  -38,  -38,  -38,   86,   86,   86,   86,  -38,  -38,
918       -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
919       -38,  -38,  -38,  -38
920     },
921 
922     {
923        25,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
924       -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,   92,  -39,
925        93,   93,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
926       -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
927       -39,  -39,  -39,  -39
928 
929     },
930 
931     {
932        25,  -40,  -40,  -40,  -40,   86,  -40,   86,  -40,   86,
933        86,  -40,  -40,  -40,   94,   86,  -40,   86,  -40,   86,
934       -40,  -40,  -40,  -40,   86,   86,   86,   86,  -40,  -40,
935       -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
936       -40,  -40,  -40,  -40
937     },
938 
939     {
940        25,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
941       -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,   95,  -41,
942        96,   96,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
943       -41,  -41,   97,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
944       -41,  -41,  -41,  -41
945 
946     },
947 
948     {
949        25,  -42,  -42,  -42,  -42,  -42,   98,  -42,  -42,  -42,
950       -42,   99,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,
951       100,  100,  101,  -42,  -42,  102,  -42,  -42,  100,  100,
952       100,  100,  100,  100,  100,  100,  100,  100,  100,  -42,
953       100,  100,  103,  -42
954     },
955 
956     {
957        25,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
958       -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
959       -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
960       -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
961       -43,  -43,  -43,  -43
962 
963     },
964 
965     {
966        25,  -44,  -44,  -44,  -44,   86,  -44,   86,  -44,   86,
967        86,  -44,  -44,  -44,   86,   86,  -44,   86,  -44,   86,
968       -44,  -44,  -44,  -44,   86,  104,  105,   86,  -44,  -44,
969       -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,
970       -44,  -44,  -44,  -44
971     },
972 
973     {
974        25,  -45,  -45,  -45,  -45,   86,  -45,   86,  -45,   86,
975        86,  -45,  -45,  -45,   86,   86,  -45,   86,  -45,   86,
976       -45,  -45,  -45,  -45,   86,   86,  106,   86,  -45,  -45,
977       -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,
978       -45,  -45,  -45,  -45
979 
980     },
981 
982     {
983        25,  -46,  -46,  -46,  -46,   86,  -46,   86,  -46,   86,
984        86,  -46,  -46,  -46,   86,   86,  -46,   86,  -46,   86,
985       -46,  -46,  -46,  -46,   86,  107,   86,   86,  -46,  -46,
986       -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,
987       -46,  -46,  -46,  -46
988     },
989 
990     {
991        25,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  108,  -47,
992       -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,
993       108,  108,  -47,  -47,  -47,  -47,  -47,  -47,  108,  108,
994       108,  108,  108,  108,  108,  108,  108,  108,  108,  -47,
995       108,  108,  -47,  -47
996 
997     },
998 
999     {
1000        25,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  108,  -48,
1001       -48,  109,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
1002       108,  108,  -48,  -48,  -48,  -48,  -48,  -48,  108,  108,
1003       108,  108,  108,  108,  108,  108,  108,  108,  108,  -48,
1004       108,  108,  -48,  -48
1005     },
1006 
1007     {
1008        25,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  108,  -49,
1009       -49,  110,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  -49,
1010       108,  108,  -49,  -49,  -49,  -49,  -49,  -49,  108,  108,
1011       108,  108,  108,  108,  108,  108,  108,  108,  108,  -49,
1012       108,  108,  -49,  -49
1013 
1014     },
1015 
1016     {
1017        25,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  108,  -50,
1018       -50,  111,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
1019       108,  108,  -50,  -50,  -50,  -50,  -50,  -50,  108,  108,
1020       108,  108,  108,  108,  108,  108,  108,  108,  108,  -50,
1021       108,  108,  -50,  -50
1022     },
1023 
1024     {
1025        25,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  108,  -51,
1026       112,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
1027       108,  108,  -51,  -51,  -51,  -51,  -51,  -51,  108,  108,
1028       108,  108,  108,  108,  108,  108,  108,  108,  108,  -51,
1029       108,  108,  -51,  -51
1030 
1031     },
1032 
1033     {
1034        25,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  108,  -52,
1035       -52,  113,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
1036       108,  108,  -52,  -52,  -52,  -52,  -52,  -52,  108,  108,
1037       108,  108,  108,  108,  108,  108,  108,  108,  108,  -52,
1038       108,  108,  -52,  -52
1039     },
1040 
1041     {
1042        25,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
1043       -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
1044       -53,  -53,  114,  114,  -53,  -53,  -53,  -53,  -53,  -53,
1045       -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
1046       -53,  -53,  -53,  -53
1047 
1048     },
1049 
1050     {
1051        25,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1052       115,  -54,  115,  115,  115,  115,  115,  115,  115,  115,
1053       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1054       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1055       115,  115,  115,  115
1056     },
1057 
1058     {
1059        25,  -55,  116,  117,  117,  -55,  -55,  -55,  -55,  -55,
1060       -55,  -55,  -55,  -55,  -55,  -55,  -55,  118,  -55,  -55,
1061       -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
1062       -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
1063       -55,  -55,  -55,  -55
1064 
1065     },
1066 
1067     {
1068        25,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1069       119,  119,  119,  119,  -56,  119,  119,  119,  119,  -56,
1070       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1071       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1072       119,  119,  119,  119
1073     },
1074 
1075     {
1076        25,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1077       119,  119,  119,  119,  -57,  119,  119,  119,  119,  -57,
1078       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1079       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1080       119,  119,  119,  119
1081 
1082     },
1083 
1084     {
1085        25,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
1086       -58,  -58,  -58,  -58,  120,  -58,  -58,  -58,  -58,  121,
1087       -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
1088       -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
1089       -58,  -58,  -58,  -58
1090     },
1091 
1092     {
1093        25,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
1094       -59,  -59,  -59,  -59,  122,  -59,  -59,  -59,  -59,  -59,
1095       -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
1096       -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
1097       -59,  -59,  -59,  -59
1098 
1099     },
1100 
1101     {
1102        25,  123,  123,  123,  123,  123,  -60,  123,  123,  123,
1103       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1104       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1105       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1106       123,  123,  123,  123
1107     },
1108 
1109     {
1110        25,  -61,  -61,  -61,  -61,  -61,  124,  -61,  -61,  -61,
1111       -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,
1112       -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,
1113       -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,
1114       -61,  -61,  -61,  -61
1115 
1116     },
1117 
1118     {
1119        25,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1120       125,  -62,  125,  125,  125,  125,  125,  125,  125,  125,
1121       125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1122       125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1123       125,  125,  125,  125
1124     },
1125 
1126     {
1127        25,  -63,  126,  127,  127,  -63,  -63,  -63,  -63,  -63,
1128       -63,  -63,  -63,  -63,  -63,  -63,  -63,  128,  -63,  -63,
1129       -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,
1130       -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,
1131       -63,  -63,  -63,  -63
1132 
1133     },
1134 
1135     {
1136        25,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1137       129,  -64,  129,  129,  129,  129,  129,  129,  129,  129,
1138       129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1139       129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1140       129,  129,  129,  129
1141     },
1142 
1143     {
1144        25,  -65,  130,  131,  131,  -65,  -65,  -65,  -65,  -65,
1145       -65,  132,  -65,  -65,  -65,  -65,  -65,  133,  -65,  -65,
1146       -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,
1147       -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,
1148       -65,  -65,  -65,  -65
1149 
1150     },
1151 
1152     {
1153        25,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1154       134,  -66,  134,  134,  134,  134,  134,  134,  134,  134,
1155       134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1156       134,  134,  134,  134,  134,  134,  134,  134,  134,  -66,
1157       134,  134,  134,  134
1158     },
1159 
1160     {
1161        25,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1162       134,  -67,  134,  134,  134,  134,  134,  134,  134,  134,
1163       134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1164       134,  134,  134,  134,  134,  134,  134,  134,  134,  -67,
1165       134,  134,  134,  134
1166 
1167     },
1168 
1169     {
1170        25,  -68,  130,  131,  131,  -68,  -68,  -68,  -68,  -68,
1171       -68,  132,  -68,  -68,  -68,  -68,  -68,  133,  -68,  -68,
1172       -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,
1173       -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,
1174       -68,  -68,  -68,  -68
1175     },
1176 
1177     {
1178        25,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1179       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1180       136,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1181       135,  135,  135,  135,  135,  135,  135,  137,  135,  135,
1182       138,  139,  135,  135
1183 
1184     },
1185 
1186     {
1187        25,  140,  140,  140,  140,  140,  140,  140,  -70,  140,
1188       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1189       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1190       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1191       140,  140,  140,  140
1192     },
1193 
1194     {
1195        25,  140,  140,  140,  140,  140,  140,  140,  -71,  140,
1196       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1197       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1198       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1199       140,  140,  140,  140
1200 
1201     },
1202 
1203     {
1204        25,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  141,  -72,
1205       -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,
1206       -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  142,  142,
1207       142,  142,  142,  142,  142,  142,  142,  142,  142,  -72,
1208       142,  142,  -72,  -72
1209     },
1210 
1211     {
1212        25,  -73,  -73,  -73,  -73,  -73,  124,  -73,  -73,  -73,
1213       -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,
1214       -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,
1215       -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,
1216       -73,  -73,  -73,  -73
1217 
1218     },
1219 
1220     {
1221        25,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
1222       -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
1223       -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
1224       -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
1225       -74,  -74,  -74,  -74
1226     },
1227 
1228     {
1229        25,  -75,  143,  143,  143,  -75,  -75,  -75,  -75,  -75,
1230       -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
1231       -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
1232       -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
1233       -75,  -75,  -75,  -75
1234 
1235     },
1236 
1237     {
1238        25,  -76,  143,  143,  143,  -76,  -76,  -76,  -76,  -76,
1239       -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
1240       -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
1241       -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
1242       -76,  -76,  -76,  -76
1243     },
1244 
1245     {
1246        25,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
1247       -77,  -77,  -77,  -77,  -77,  -77,  -77,  144,  -77,  -77,
1248       -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
1249       -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
1250       -77,  -77,  -77,  -77
1251 
1252     },
1253 
1254     {
1255        25,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
1256       -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
1257       -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
1258       -78,  -78,  145,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
1259       -78,  -78,  -78,  -78
1260     },
1261 
1262     {
1263        25,  -79,  146,  147,  147,  -79,  -79,  -79,  -79,  -79,
1264       -79,  132,  -79,  -79,  -79,  -79,  -79,  148,  -79,  -79,
1265       -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
1266       -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
1267       -79,  -79,  -79,  -79
1268 
1269     },
1270 
1271     {
1272        25,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
1273       -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
1274       -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
1275       -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
1276       -80,  -80,  -80,  -80
1277     },
1278 
1279     {
1280        25,  -81,  149,  149,  149,  -81,  -81,  -81,  -81,  -81,
1281       -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
1282       -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
1283       -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
1284       -81,  -81,  -81,  -81
1285 
1286     },
1287 
1288     {
1289        25,  -82,  149,  149,  149,  -82,  -82,  -82,  -82,  -82,
1290       -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
1291       -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
1292       -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
1293       -82,  -82,  -82,  -82
1294     },
1295 
1296     {
1297        25,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
1298       -83,  -83,  -83,  -83,  -83,  -83,  -83,  150,  -83,  -83,
1299       -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
1300       -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
1301       -83,  -83,  -83,  -83
1302 
1303     },
1304 
1305     {
1306        25,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
1307       -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
1308       -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
1309       -84,  -84,  151,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
1310       -84,  -84,  -84,  -84
1311     },
1312 
1313     {
1314        25,  -85,   85,   85,   85,  -85,  -85,  -85,  -85,  -85,
1315       -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,
1316       -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,
1317       -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,
1318       -85,  -85,  -85,  -85
1319 
1320     },
1321 
1322     {
1323        25,  -86,  -86,  -86,  -86,   86,  -86,   86,  -86,   86,
1324        86,  -86,  -86,  -86,   86,   86,  -86,   86,  -86,   86,
1325       -86,  -86,  -86,  -86,   86,   86,   86,   86,  -86,  -86,
1326       -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,
1327       -86,  -86,  -86,  -86
1328     },
1329 
1330     {
1331        25,  -87,  -87,  -87,  -87,   86,  -87,   86,  -87,   86,
1332        86,  -87,  -87,  -87,   86,   86,  -87,   86,  -87,   86,
1333       -87,  -87,  -87,  -87,   86,   86,   86,   86,  -87,  -87,
1334       -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
1335       -87,  -87,  -87,  -87
1336 
1337     },
1338 
1339     {
1340        25,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
1341       -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
1342       -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
1343       -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
1344       -88,  -88,  -88,  -88
1345     },
1346 
1347     {
1348        25,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
1349       -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
1350        89,   89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
1351       -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
1352       -89,  -89,  -89,  -89
1353 
1354     },
1355 
1356     {
1357        25,  -90,  -90,  -90,  -90,  -90,  -90,  -90,   88,  -90,
1358       -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,
1359       152,  152,  -90,  -90,  -90,  -90,  -90,  -90,  152,  152,
1360       152,  152,  152,  152,  152,  152,  152,  152,  152,  -90,
1361       152,  152,  -90,  -90
1362     },
1363 
1364     {
1365        25,  153,  153,  -91,  -91,  154,  153,  154,  153,  154,
1366       154,  153,  153,  153,  154,  154,  153,  154,  153,  154,
1367       153,  153,  153,  153,  154,  154,  154,  154,  153,  153,
1368       153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
1369       153,  153,  153,  153
1370 
1371     },
1372 
1373     {
1374        25,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
1375       -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
1376       -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
1377       -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
1378       -92,  -92,  -92,  -92
1379     },
1380 
1381     {
1382        25,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
1383       -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
1384        93,   93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
1385       -93,  -93,   97,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
1386       -93,  -93,  -93,  -93
1387 
1388     },
1389 
1390     {
1391        25,  -94,  -94,  -94,  -94,  155,  -94,  155,  -94,  155,
1392       155,  -94,  -94,  -94,  155,  155,  -94,  155,  -94,  155,
1393       -94,  -94,  -94,  -94,  155,  155,  155,  155,  -94,  -94,
1394       -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,
1395       -94,  -94,  -94,  -94
1396     },
1397 
1398     {
1399        25,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,
1400       -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  156,  -95,
1401       157,  157,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,
1402       -95,  -95,   97,  -95,  -95,  -95,  -95,  -95,  -95,  -95,
1403       -95,  -95,  -95,  -95
1404 
1405     },
1406 
1407     {
1408        25,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,
1409       -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,   95,  -96,
1410        96,   96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,
1411       -96,  -96,   97,  -96,  -96,  -96,  -96,  -96,  -96,  -96,
1412       -96,  -96,  -96,  -96
1413     },
1414 
1415     {
1416        25,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,
1417       -97,  -97,  -97,  -97,  -97,  158,  -97,  158,  -97,  -97,
1418       159,  159,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,
1419       -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,
1420       -97,  -97,  -97,  -97
1421 
1422     },
1423 
1424     {
1425        25,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,
1426       -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,
1427       160,  160,  -98,  -98,  -98,  -98,  -98,  -98,  160,  160,
1428       160,  160,  160,  160,  160,  160,  160,  160,  160,  -98,
1429       160,  160,  -98,  -98
1430     },
1431 
1432     {
1433        25,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,
1434       -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,
1435       161,  161,  -99,  -99,  -99,  -99,  -99,  -99,  161,  161,
1436       161,  161,  161,  161,  161,  161,  161,  161,  161,  -99,
1437       161,  161,  -99,  -99
1438 
1439     },
1440 
1441     {
1442        25, -100, -100, -100, -100, -100, -100, -100, -100, -100,
1443      -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
1444       100,  100, -100, -100, -100, -100, -100, -100,  100,  100,
1445       100,  100,  100,  100,  100,  100,  100,  100,  100, -100,
1446       100,  100, -100, -100
1447     },
1448 
1449     {
1450        25, -101, -101, -101, -101, -101, -101, -101, -101, -101,
1451      -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
1452      -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
1453      -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
1454      -101, -101, -101, -101
1455 
1456     },
1457 
1458     {
1459        25, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1460      -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1461      -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1462      -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1463      -102, -102, -102, -102
1464     },
1465 
1466     {
1467        25, -103, -103, -103, -103, -103, -103, -103, -103, -103,
1468      -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
1469      -103, -103, -103, -103, -103, -103, -103,  162, -103, -103,
1470      -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
1471      -103, -103, -103, -103
1472 
1473     },
1474 
1475     {
1476        25, -104, -104, -104, -104,   86, -104,   86, -104,   86,
1477        86, -104, -104, -104,   86,   86, -104,   86, -104,   86,
1478      -104, -104, -104, -104,   86,   86,   86,   86, -104, -104,
1479      -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
1480      -104, -104, -104, -104
1481     },
1482 
1483     {
1484        25, -105, -105, -105, -105,   86, -105,   86, -105,   86,
1485        86, -105, -105, -105,   86,   86, -105,   86, -105,   86,
1486      -105, -105, -105, -105,   86,   86,   86,   86, -105, -105,
1487      -105, -105, -105, -105, -105, -105, -105, -105, -105, -105,
1488      -105, -105, -105, -105
1489 
1490     },
1491 
1492     {
1493        25, -106, -106, -106, -106,   86, -106,   86, -106,   86,
1494        86, -106, -106, -106,   86,   86, -106,   86, -106,   86,
1495      -106, -106, -106, -106,   86,   86,   86,   86, -106, -106,
1496      -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
1497      -106, -106, -106, -106
1498     },
1499 
1500     {
1501        25, -107, -107, -107, -107,   86, -107,   86, -107,   86,
1502        86, -107, -107, -107,   86,   86, -107,   86, -107,   86,
1503      -107, -107, -107, -107,   86,   86,   86,   86, -107, -107,
1504      -107, -107, -107, -107, -107, -107, -107, -107, -107, -107,
1505      -107, -107, -107, -107
1506 
1507     },
1508 
1509     {
1510        25, -108, -108, -108, -108, -108, -108, -108,  108, -108,
1511      -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
1512       108,  108, -108, -108, -108, -108, -108, -108,  108,  108,
1513       108,  108,  108,  108,  108,  108,  108,  108,  108, -108,
1514       108,  108, -108, -108
1515     },
1516 
1517     {
1518        25, -109, -109, -109, -109, -109, -109, -109, -109, -109,
1519      -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
1520      -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
1521      -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
1522      -109, -109, -109, -109
1523 
1524     },
1525 
1526     {
1527        25, -110, -110, -110, -110, -110, -110, -110, -110, -110,
1528      -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
1529      -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
1530      -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
1531      -110, -110, -110, -110
1532     },
1533 
1534     {
1535        25, -111, -111, -111, -111, -111, -111, -111, -111, -111,
1536      -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
1537      -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
1538      -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
1539      -111, -111, -111, -111
1540 
1541     },
1542 
1543     {
1544        25, -112, -112, -112, -112, -112,  163, -112, -112, -112,
1545      -112,  164, -112, -112, -112, -112, -112, -112, -112, -112,
1546      -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
1547      -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
1548      -112, -112, -112, -112
1549     },
1550 
1551     {
1552        25, -113, -113, -113, -113, -113, -113, -113, -113, -113,
1553      -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
1554      -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
1555      -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
1556      -113, -113, -113, -113
1557 
1558     },
1559 
1560     {
1561        25, -114, -114, -114, -114, -114, -114, -114, -114, -114,
1562      -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
1563      -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
1564      -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
1565      -114, -114, -114, -114
1566     },
1567 
1568     {
1569        25,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1570       115, -115,  115,  115,  115,  115,  115,  115,  115,  115,
1571       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1572       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1573       115,  115,  115,  115
1574 
1575     },
1576 
1577     {
1578        25, -116,  116,  117,  117, -116, -116, -116, -116, -116,
1579      -116, -116, -116, -116, -116, -116, -116,  118, -116, -116,
1580      -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
1581      -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
1582      -116, -116, -116, -116
1583     },
1584 
1585     {
1586        25, -117,  165,  165,  165, -117, -117, -117, -117, -117,
1587      -117,  166, -117, -117, -117, -117, -117,  167, -117, -117,
1588      -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
1589      -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
1590      -117, -117, -117, -117
1591 
1592     },
1593 
1594     {
1595        25, -118, -118, -118, -118, -118, -118, -118, -118, -118,
1596      -118, -118, -118, -118, -118, -118, -118,  168, -118, -118,
1597      -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
1598      -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
1599      -118, -118, -118, -118
1600     },
1601 
1602     {
1603        25,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1604       119,  119,  119,  119, -119,  119,  119,  119,  119, -119,
1605       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1606       119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
1607       119,  119,  119,  119
1608 
1609     },
1610 
1611     {
1612        25, -120, -120, -120, -120, -120, -120, -120, -120, -120,
1613      -120, -120, -120, -120,  120, -120, -120, -120, -120,  121,
1614      -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
1615      -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
1616      -120, -120, -120, -120
1617     },
1618 
1619     {
1620        25, -121, -121, -121, -121, -121, -121, -121, -121, -121,
1621      -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
1622      -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
1623      -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
1624      -121, -121, -121, -121
1625 
1626     },
1627 
1628     {
1629        25, -122, -122, -122, -122,  169, -122,  169, -122,  169,
1630       169, -122, -122, -122,  169,  169, -122,  169, -122,  169,
1631      -122, -122, -122, -122,  169,  169,  169,  169, -122, -122,
1632      -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
1633      -122, -122, -122, -122
1634     },
1635 
1636     {
1637        25,  123,  123,  123,  123,  123, -123,  123,  123,  123,
1638       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1639       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1640       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
1641       123,  123,  123,  123
1642 
1643     },
1644 
1645     {
1646        25, -124, -124, -124, -124, -124, -124, -124, -124, -124,
1647      -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
1648      -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
1649      -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
1650      -124, -124, -124, -124
1651     },
1652 
1653     {
1654        25,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1655       125, -125,  125,  125,  125,  125,  125,  125,  125,  125,
1656       125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1657       125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
1658       125,  125,  125,  125
1659 
1660     },
1661 
1662     {
1663        25, -126,  126,  127,  127, -126, -126, -126, -126, -126,
1664      -126, -126, -126, -126, -126, -126, -126,  128, -126, -126,
1665      -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
1666      -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
1667      -126, -126, -126, -126
1668     },
1669 
1670     {
1671        25, -127,  170,  170,  170, -127, -127, -127, -127, -127,
1672      -127,  171, -127, -127, -127, -127, -127,  172, -127, -127,
1673      -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
1674      -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
1675      -127, -127, -127, -127
1676 
1677     },
1678 
1679     {
1680        25, -128, -128, -128, -128, -128, -128, -128, -128, -128,
1681      -128, -128, -128, -128, -128, -128, -128,  173, -128, -128,
1682      -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
1683      -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
1684      -128, -128, -128, -128
1685     },
1686 
1687     {
1688        25,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1689       129, -129,  129,  129,  129,  129,  129,  129,  129,  129,
1690       129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1691       129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
1692       129,  129,  129,  129
1693 
1694     },
1695 
1696     {
1697        25, -130,  130,  131,  131, -130, -130, -130, -130, -130,
1698      -130, -130, -130, -130, -130, -130, -130,  133, -130, -130,
1699      -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1700      -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1701      -130, -130, -130, -130
1702     },
1703 
1704     {
1705        25, -131,  174,  174,  174, -131, -131, -131, -131, -131,
1706      -131,  175, -131, -131, -131, -131, -131,  176, -131, -131,
1707      -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
1708      -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
1709      -131, -131, -131, -131
1710 
1711     },
1712 
1713     {
1714        25, -132, -132, -132, -132, -132, -132, -132, -132, -132,
1715      -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
1716      -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
1717      -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
1718      -132, -132, -132, -132
1719     },
1720 
1721     {
1722        25, -133, -133, -133, -133, -133, -133, -133, -133, -133,
1723      -133, -133, -133, -133, -133, -133, -133,  177, -133, -133,
1724      -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
1725      -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
1726      -133, -133, -133, -133
1727 
1728     },
1729 
1730     {
1731        25,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1732       134, -134,  134,  134,  134,  134,  134,  134,  134,  134,
1733       134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
1734       134,  134,  134,  134,  134,  134,  134,  134,  134, -134,
1735       134,  134,  134,  134
1736     },
1737 
1738     {
1739        25, -135, -135, -135, -135, -135, -135, -135, -135, -135,
1740      -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
1741      -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
1742      -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
1743      -135, -135, -135, -135
1744 
1745     },
1746 
1747     {
1748        25, -136, -136, -136, -136, -136, -136, -136, -136, -136,
1749      -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
1750       178, -136, -136, -136, -136, -136, -136, -136, -136, -136,
1751      -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
1752      -136, -136, -136, -136
1753     },
1754 
1755     {
1756        25, -137, -137, -137, -137, -137, -137, -137, -137, -137,
1757      -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
1758       179,  179, -137, -137, -137, -137, -137, -137,  179,  179,
1759       179,  179,  179, -137, -137, -137, -137, -137, -137, -137,
1760      -137, -137, -137, -137
1761 
1762     },
1763 
1764     {
1765        25, -138, -138, -138, -138, -138, -138, -138, -138, -138,
1766      -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
1767       180,  180, -138, -138, -138, -138, -138, -138,  180,  180,
1768       180,  180,  180, -138, -138, -138, -138, -138, -138, -138,
1769      -138, -138, -138, -138
1770     },
1771 
1772     {
1773        25, -139, -139, -139, -139, -139, -139, -139, -139, -139,
1774      -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
1775       181,  181, -139, -139, -139, -139, -139, -139,  181,  181,
1776       181,  181,  181, -139, -139, -139, -139, -139, -139, -139,
1777      -139, -139, -139, -139
1778 
1779     },
1780 
1781     {
1782        25,  140,  140,  140,  140,  140,  140,  140, -140,  140,
1783       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1784       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1785       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1786       140,  140,  140,  140
1787     },
1788 
1789     {
1790        25, -141, -141, -141, -141, -141, -141, -141, -141, -141,
1791      -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
1792      -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
1793      -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
1794      -141, -141, -141, -141
1795 
1796     },
1797 
1798     {
1799        25, -142, -142, -142, -142, -142, -142, -142,  141, -142,
1800      -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
1801       182,  182, -142, -142, -142, -142, -142, -142,  182,  182,
1802       182,  182,  182,  182,  182,  182,  182,  182,  182, -142,
1803       182,  182, -142, -142
1804     },
1805 
1806     {
1807        25, -143,  143,  143,  143, -143, -143, -143, -143, -143,
1808      -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
1809      -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
1810      -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
1811      -143, -143, -143, -143
1812 
1813     },
1814 
1815     {
1816        25,  183,  183, -144, -144,  183,  183,  183,  183,  183,
1817       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
1818       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
1819       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
1820       183,  183,  183,  183
1821     },
1822 
1823     {
1824        25, -145, -145, -145, -145, -145, -145, -145, -145, -145,
1825      -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
1826      -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
1827      -145, -145, -145, -145, -145, -145,  184, -145, -145, -145,
1828      -145, -145, -145, -145
1829 
1830     },
1831 
1832     {
1833        25, -146,  146,  147,  147, -146, -146, -146, -146, -146,
1834      -146, -146, -146, -146, -146, -146, -146,  148, -146, -146,
1835      -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
1836      -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
1837      -146, -146, -146, -146
1838     },
1839 
1840     {
1841        25, -147,  185,  185,  185, -147, -147, -147, -147, -147,
1842      -147,  175, -147, -147, -147, -147, -147,  186, -147, -147,
1843      -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
1844      -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
1845      -147, -147, -147, -147
1846 
1847     },
1848 
1849     {
1850        25, -148, -148, -148, -148, -148, -148, -148, -148, -148,
1851      -148, -148, -148, -148, -148, -148, -148,  187, -148, -148,
1852      -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
1853      -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
1854      -148, -148, -148, -148
1855     },
1856 
1857     {
1858        25, -149,  149,  149,  149, -149, -149, -149, -149, -149,
1859      -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1860      -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1861      -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1862      -149, -149, -149, -149
1863 
1864     },
1865 
1866     {
1867        25,  188,  188, -150, -150,  188,  188,  188,  188,  188,
1868       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
1869       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
1870       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
1871       188,  188,  188,  188
1872     },
1873 
1874     {
1875        25, -151, -151, -151, -151, -151, -151, -151, -151, -151,
1876      -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
1877      -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
1878      -151, -151, -151, -151, -151, -151,  189, -151, -151, -151,
1879      -151, -151, -151, -151
1880 
1881     },
1882 
1883     {
1884        25, -152, -152, -152, -152, -152, -152, -152,   88, -152,
1885      -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
1886       152,  152, -152, -152, -152, -152, -152, -152,  152,  152,
1887       152,  152,  152,  152,  152,  152,  152,  152,  152, -152,
1888       152,  152, -152, -152
1889     },
1890 
1891     {
1892        25,  153,  153, -153, -153,  153,  153,  153,  153,  153,
1893       153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
1894       153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
1895       153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
1896       153,  153,  153,  153
1897 
1898     },
1899 
1900     {
1901        25,  153,  153, -154, -154,  154,  153,  154,  153,  154,
1902       154,  153,  153,  153,  154,  154,  153,  154,  153,  154,
1903       153,  153,  153,  153,  154,  154,  154,  154,  153,  153,
1904       153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
1905       153,  153,  153,  153
1906     },
1907 
1908     {
1909        25, -155, -155, -155, -155,  155, -155,  155, -155,  155,
1910       155, -155, -155, -155,  155,  155, -155,  155, -155,  155,
1911      -155, -155, -155, -155,  155,  155,  155,  155, -155, -155,
1912      -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
1913      -155, -155, -155, -155
1914 
1915     },
1916 
1917     {
1918        25, -156, -156, -156, -156, -156, -156, -156, -156, -156,
1919      -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
1920      -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
1921      -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
1922      -156, -156, -156, -156
1923     },
1924 
1925     {
1926        25, -157, -157, -157, -157, -157, -157, -157, -157, -157,
1927      -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
1928       157,  157, -157, -157, -157, -157, -157, -157, -157, -157,
1929      -157, -157,   97, -157, -157, -157, -157, -157, -157, -157,
1930      -157, -157, -157, -157
1931 
1932     },
1933 
1934     {
1935        25, -158, -158, -158, -158, -158, -158, -158, -158, -158,
1936      -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
1937       159,  159, -158, -158, -158, -158, -158, -158, -158, -158,
1938      -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
1939      -158, -158, -158, -158
1940     },
1941 
1942     {
1943        25, -159, -159, -159, -159, -159, -159, -159, -159, -159,
1944      -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
1945       159,  159, -159, -159, -159, -159, -159, -159, -159, -159,
1946      -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
1947      -159, -159, -159, -159
1948 
1949     },
1950 
1951     {
1952        25, -160, -160, -160, -160, -160,  190, -160, -160, -160,
1953      -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
1954       160,  160, -160, -160, -160, -160, -160, -160,  160,  160,
1955       160,  160,  160,  160,  160,  160,  160,  160,  160, -160,
1956       160,  160, -160, -160
1957     },
1958 
1959     {
1960        25, -161, -161, -161, -161, -161, -161, -161, -161, -161,
1961      -161,  191, -161, -161, -161, -161, -161, -161, -161, -161,
1962       161,  161, -161, -161, -161, -161, -161, -161,  161,  161,
1963       161,  161,  161,  161,  161,  161,  161,  161,  161, -161,
1964       161,  161, -161, -161
1965 
1966     },
1967 
1968     {
1969        25, -162, -162, -162, -162, -162, -162, -162, -162, -162,
1970      -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
1971       192,  192, -162, -162, -162, -162, -162, -162,  192,  192,
1972       192,  192,  192,  192,  192,  192,  192,  192,  192, -162,
1973       192,  192, -162, -162
1974     },
1975 
1976     {
1977        25, -163, -163, -163, -163, -163, -163, -163, -163, -163,
1978      -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
1979      -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
1980      -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
1981      -163, -163, -163, -163
1982 
1983     },
1984 
1985     {
1986        25, -164, -164, -164, -164, -164, -164, -164, -164, -164,
1987      -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
1988      -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
1989      -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
1990      -164, -164, -164, -164
1991     },
1992 
1993     {
1994        25, -165,  165,  165,  165, -165, -165, -165, -165, -165,
1995      -165,  166, -165, -165, -165, -165, -165,  167, -165, -165,
1996      -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
1997      -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
1998      -165, -165, -165, -165
1999 
2000     },
2001 
2002     {
2003        25, -166, -166, -166, -166, -166, -166, -166, -166, -166,
2004      -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
2005      -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
2006      -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
2007      -166, -166, -166, -166
2008     },
2009 
2010     {
2011        25, -167, -167, -167, -167, -167, -167, -167, -167, -167,
2012      -167, -167, -167, -167, -167, -167, -167,  193, -167, -167,
2013      -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
2014      -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
2015      -167, -167, -167, -167
2016 
2017     },
2018 
2019     {
2020        25,  194,  195,  117,  117,  194,  194,  194,  194,  194,
2021       194,  194,  194,  194,  194,  194,  194,  196,  194,  194,
2022       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2023       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2024       194,  194,  194,  194
2025     },
2026 
2027     {
2028        25, -169, -169, -169, -169,  169, -169,  169, -169,  169,
2029       169, -169, -169, -169,  169,  169, -169,  169, -169,  169,
2030      -169, -169, -169, -169,  169,  169,  169,  169, -169, -169,
2031      -169, -169, -169, -169, -169, -169, -169, -169, -169, -169,
2032      -169, -169, -169, -169
2033 
2034     },
2035 
2036     {
2037        25, -170,  170,  170,  170, -170, -170, -170, -170, -170,
2038      -170,  171, -170, -170, -170, -170, -170,  172, -170, -170,
2039      -170, -170, -170, -170, -170, -170, -170, -170, -170, -170,
2040      -170, -170, -170, -170, -170, -170, -170, -170, -170, -170,
2041      -170, -170, -170, -170
2042     },
2043 
2044     {
2045        25, -171, -171, -171, -171, -171, -171, -171, -171, -171,
2046      -171, -171, -171, -171, -171, -171, -171, -171, -171, -171,
2047      -171, -171, -171, -171, -171, -171, -171, -171, -171, -171,
2048      -171, -171, -171, -171, -171, -171, -171, -171, -171, -171,
2049      -171, -171, -171, -171
2050 
2051     },
2052 
2053     {
2054        25, -172, -172, -172, -172, -172, -172, -172, -172, -172,
2055      -172, -172, -172, -172, -172, -172, -172,  197, -172, -172,
2056      -172, -172, -172, -172, -172, -172, -172, -172, -172, -172,
2057      -172, -172, -172, -172, -172, -172, -172, -172, -172, -172,
2058      -172, -172, -172, -172
2059     },
2060 
2061     {
2062        25,  198,  199,  127,  127,  198,  198,  198,  198,  198,
2063       198,  198,  198,  198,  198,  198,  198,  200,  198,  198,
2064       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2065       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2066       198,  198,  198,  198
2067 
2068     },
2069 
2070     {
2071        25, -174,  174,  174,  174, -174, -174, -174, -174, -174,
2072      -174,  175, -174, -174, -174, -174, -174,  176, -174, -174,
2073      -174, -174, -174, -174, -174, -174, -174, -174, -174, -174,
2074      -174, -174, -174, -174, -174, -174, -174, -174, -174, -174,
2075      -174, -174, -174, -174
2076     },
2077 
2078     {
2079        25, -175, -175, -175, -175, -175, -175, -175, -175, -175,
2080      -175, -175, -175, -175, -175, -175, -175, -175, -175, -175,
2081      -175, -175, -175, -175, -175, -175, -175, -175, -175, -175,
2082      -175, -175, -175, -175, -175, -175, -175, -175, -175, -175,
2083      -175, -175, -175, -175
2084 
2085     },
2086 
2087     {
2088        25, -176, -176, -176, -176, -176, -176, -176, -176, -176,
2089      -176, -176, -176, -176, -176, -176, -176,  201, -176, -176,
2090      -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
2091      -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
2092      -176, -176, -176, -176
2093     },
2094 
2095     {
2096        25,  202,  203,  131,  131,  202,  202,  202,  202,  202,
2097       202,  202,  202,  202,  202,  202,  202,  204,  202,  202,
2098       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2099       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2100       202,  202,  202,  202
2101 
2102     },
2103 
2104     {
2105        25, -178, -178, -178, -178, -178, -178, -178, -178, -178,
2106      -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
2107       205, -178, -178, -178, -178, -178, -178, -178, -178, -178,
2108      -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
2109      -178, -178, -178, -178
2110     },
2111 
2112     {
2113        25, -179, -179, -179, -179, -179, -179, -179, -179, -179,
2114      -179, -179, -179, -179, -179, -179, -179, -179, -179, -179,
2115       206,  206, -179, -179, -179, -179, -179, -179,  206,  206,
2116       206,  206,  206, -179, -179, -179, -179, -179, -179, -179,
2117      -179, -179, -179, -179
2118 
2119     },
2120 
2121     {
2122        25, -180, -180, -180, -180, -180, -180, -180, -180, -180,
2123      -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
2124       207,  207, -180, -180, -180, -180, -180, -180,  207,  207,
2125       207,  207,  207, -180, -180, -180, -180, -180, -180, -180,
2126      -180, -180, -180, -180
2127     },
2128 
2129     {
2130        25, -181, -181, -181, -181, -181, -181, -181, -181, -181,
2131      -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
2132       208,  208, -181, -181, -181, -181, -181, -181,  208,  208,
2133       208,  208,  208, -181, -181, -181, -181, -181, -181, -181,
2134      -181, -181, -181, -181
2135 
2136     },
2137 
2138     {
2139        25, -182, -182, -182, -182, -182, -182, -182,  141, -182,
2140      -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
2141       182,  182, -182, -182, -182, -182, -182, -182,  182,  182,
2142       182,  182,  182,  182,  182,  182,  182,  182,  182, -182,
2143       182,  182, -182, -182
2144     },
2145 
2146     {
2147        25,  183,  183, -183, -183,  183,  183,  183,  183,  183,
2148       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
2149       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
2150       183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
2151       183,  183,  183,  183
2152 
2153     },
2154 
2155     {
2156        25, -184, -184, -184, -184, -184, -184, -184, -184, -184,
2157      -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
2158      -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
2159       209, -184, -184, -184, -184, -184, -184, -184, -184, -184,
2160      -184, -184, -184, -184
2161     },
2162 
2163     {
2164        25, -185,  185,  185,  185, -185, -185, -185, -185, -185,
2165      -185,  175, -185, -185, -185, -185, -185,  186, -185, -185,
2166      -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
2167      -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
2168      -185, -185, -185, -185
2169 
2170     },
2171 
2172     {
2173        25, -186, -186, -186, -186, -186, -186, -186, -186, -186,
2174      -186, -186, -186, -186, -186, -186, -186,  210, -186, -186,
2175      -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
2176      -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
2177      -186, -186, -186, -186
2178     },
2179 
2180     {
2181        25,  211,  212,  147,  147,  211,  211,  211,  211,  211,
2182       211,  211,  211,  211,  211,  211,  211,  213,  211,  211,
2183       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2184       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2185       211,  211,  211,  211
2186 
2187     },
2188 
2189     {
2190        25,  188,  188, -188, -188,  188,  188,  188,  188,  188,
2191       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
2192       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
2193       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
2194       188,  188,  188,  188
2195     },
2196 
2197     {
2198        25, -189, -189, -189, -189, -189, -189, -189, -189, -189,
2199      -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
2200      -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
2201       214, -189, -189, -189, -189, -189, -189, -189, -189, -189,
2202      -189, -189, -189, -189
2203 
2204     },
2205 
2206     {
2207        25, -190, -190, -190, -190, -190, -190, -190, -190, -190,
2208      -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
2209      -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
2210      -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
2211      -190, -190, -190, -190
2212     },
2213 
2214     {
2215        25, -191, -191, -191, -191, -191, -191, -191, -191, -191,
2216      -191, -191, -191, -191, -191, -191, -191, -191, -191, -191,
2217      -191, -191, -191, -191, -191, -191, -191, -191, -191, -191,
2218      -191, -191, -191, -191, -191, -191, -191, -191, -191, -191,
2219      -191, -191, -191, -191
2220 
2221     },
2222 
2223     {
2224        25, -192, -192, -192, -192, -192, -192, -192, -192, -192,
2225      -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
2226       192,  192, -192, -192, -192, -192, -192, -192,  192,  192,
2227       192,  192,  192,  192,  192,  192,  192,  192,  192, -192,
2228       192,  192, -192,  215
2229     },
2230 
2231     {
2232        25,  216,  217,  218,  218,  216,  216,  216,  216,  216,
2233       216,  216,  216,  216,  216,  216,  216,  219,  216,  216,
2234       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2235       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2236       216,  216,  216,  216
2237 
2238     },
2239 
2240     {
2241        25,  194,  195,  117,  117,  194,  194,  194,  194,  194,
2242       194,  194,  194,  194,  194,  194,  194,  196,  194,  194,
2243       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2244       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2245       194,  194,  194,  194
2246     },
2247 
2248     {
2249        25,  194,  195,  117,  117,  194,  194,  194,  194,  194,
2250       194,  194,  194,  194,  194,  194,  194,  196,  194,  194,
2251       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2252       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2253       194,  194,  194,  194
2254 
2255     },
2256 
2257     {
2258        25,  194,  195,  117,  117,  194,  194,  194,  194,  194,
2259       194,  194,  194,  194,  194,  194,  194,  220,  194,  194,
2260       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2261       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2262       194,  194,  194,  194
2263     },
2264 
2265     {
2266        25,  221,  222,  223,  223,  221,  221,  221,  221,  221,
2267       221,  221,  221,  221,  221,  221,  221,  224,  221,  221,
2268       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2269       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2270       221,  221,  221,  221
2271 
2272     },
2273 
2274     {
2275        25,  198,  199,  127,  127,  198,  198,  198,  198,  198,
2276       198,  198,  198,  198,  198,  198,  198,  200,  198,  198,
2277       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2278       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2279       198,  198,  198,  198
2280     },
2281 
2282     {
2283        25,  198,  199,  127,  127,  198,  198,  198,  198,  198,
2284       198,  198,  198,  198,  198,  198,  198,  200,  198,  198,
2285       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2286       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2287       198,  198,  198,  198
2288 
2289     },
2290 
2291     {
2292        25,  198,  199,  127,  127,  198,  198,  198,  198,  198,
2293       198,  198,  198,  198,  198,  198,  198,  225,  198,  198,
2294       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2295       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2296       198,  198,  198,  198
2297     },
2298 
2299     {
2300        25,  226,  227,  228,  228,  226,  226,  226,  226,  226,
2301       226,  226,  226,  226,  226,  226,  226,  229,  226,  226,
2302       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2303       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2304       226,  226,  226,  226
2305 
2306     },
2307 
2308     {
2309        25,  202,  203,  131,  131,  202,  202,  202,  202,  202,
2310       202,  202,  202,  202,  202,  202,  202,  204,  202,  202,
2311       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2312       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2313       202,  202,  202,  202
2314     },
2315 
2316     {
2317        25,  202,  203,  131,  131,  202,  202,  202,  202,  202,
2318       202,  202,  202,  202,  202,  202,  202,  204,  202,  202,
2319       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2320       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2321       202,  202,  202,  202
2322 
2323     },
2324 
2325     {
2326        25,  202,  203,  131,  131,  202,  202,  202,  202,  202,
2327       202,  202,  202,  202,  202,  202,  202,  230,  202,  202,
2328       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2329       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2330       202,  202,  202,  202
2331     },
2332 
2333     {
2334        25, -205, -205, -205, -205, -205, -205, -205, -205, -205,
2335      -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
2336      -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
2337      -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
2338      -205, -205, -205, -205
2339 
2340     },
2341 
2342     {
2343        25, -206, -206, -206, -206, -206, -206, -206, -206, -206,
2344      -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
2345       231,  231, -206, -206, -206, -206, -206, -206,  231,  231,
2346       231,  231,  231, -206, -206, -206, -206, -206, -206, -206,
2347      -206, -206, -206, -206
2348     },
2349 
2350     {
2351        25, -207, -207, -207, -207, -207, -207, -207, -207, -207,
2352      -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
2353       232,  232, -207, -207, -207, -207, -207, -207,  232,  232,
2354       232,  232,  232, -207, -207, -207, -207, -207, -207, -207,
2355      -207, -207, -207, -207
2356 
2357     },
2358 
2359     {
2360        25, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2361      -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2362      -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2363      -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2364      -208, -208, -208, -208
2365     },
2366 
2367     {
2368        25, -209, -209, -209, -209, -209, -209, -209, -209, -209,
2369      -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
2370      -209, -209, -209, -209, -209, -209, -209, -209,  233, -209,
2371      -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
2372      -209, -209, -209, -209
2373 
2374     },
2375 
2376     {
2377        25,  234,  235,  236,  236,  234,  234,  234,  234,  234,
2378       234,  234,  234,  234,  234,  234,  234,  237,  234,  234,
2379       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2380       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2381       234,  234,  234,  234
2382     },
2383 
2384     {
2385        25,  211,  212,  147,  147,  211,  211,  211,  211,  211,
2386       211,  211,  211,  211,  211,  211,  211,  213,  211,  211,
2387       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2388       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2389       211,  211,  211,  211
2390 
2391     },
2392 
2393     {
2394        25,  211,  212,  147,  147,  211,  211,  211,  211,  211,
2395       211,  211,  211,  211,  211,  211,  211,  213,  211,  211,
2396       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2397       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2398       211,  211,  211,  211
2399     },
2400 
2401     {
2402        25,  211,  212,  147,  147,  211,  211,  211,  211,  211,
2403       211,  211,  211,  211,  211,  211,  211,  238,  211,  211,
2404       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2405       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2406       211,  211,  211,  211
2407 
2408     },
2409 
2410     {
2411        25, -214, -214, -214, -214, -214, -214, -214, -214, -214,
2412      -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
2413      -214, -214, -214, -214, -214, -214, -214, -214,  239, -214,
2414      -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
2415      -214, -214, -214, -214
2416     },
2417 
2418     {
2419        25, -215, -215, -215, -215, -215, -215, -215, -215, -215,
2420      -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
2421      -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
2422      -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
2423      -215, -215, -215, -215
2424 
2425     },
2426 
2427     {
2428        25,  216,  217,  218,  218,  216,  216,  216,  216,  216,
2429       216,  216,  216,  216,  216,  216,  216,  219,  216,  216,
2430       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2431       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2432       216,  216,  216,  216
2433     },
2434 
2435     {
2436        25,  216,  217,  218,  218,  216,  216,  216,  216,  216,
2437       216,  216,  216,  216,  216,  216,  216,  219,  216,  216,
2438       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2439       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2440       216,  216,  216,  216
2441 
2442     },
2443 
2444     {
2445        25, -218,  165,  165,  165, -218, -218, -218, -218, -218,
2446      -218,  166, -218, -218, -218, -218, -218,  167, -218, -218,
2447      -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
2448      -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
2449      -218, -218, -218, -218
2450     },
2451 
2452     {
2453        25,  216,  217,  218,  218,  216,  216,  216,  216,  216,
2454       216,  216,  216,  216,  216,  216,  216,  240,  216,  216,
2455       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2456       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2457       216,  216,  216,  216
2458 
2459     },
2460 
2461     {
2462        25,  194,  195,  117,  117,  194,  194,  194,  194,  194,
2463       194,  194,  194,  194,  194,  194,  194,  220,  194,  194,
2464       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2465       194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
2466       194,  194,  194,  194
2467     },
2468 
2469     {
2470        25,  221,  222,  223,  223,  221,  221,  221,  221,  221,
2471       221,  221,  221,  221,  221,  221,  221,  224,  221,  221,
2472       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2473       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2474       221,  221,  221,  221
2475 
2476     },
2477 
2478     {
2479        25,  221,  222,  223,  223,  221,  221,  221,  221,  221,
2480       221,  221,  221,  221,  221,  221,  221,  224,  221,  221,
2481       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2482       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2483       221,  221,  221,  221
2484     },
2485 
2486     {
2487        25, -223,  170,  170,  170, -223, -223, -223, -223, -223,
2488      -223,  171, -223, -223, -223, -223, -223,  172, -223, -223,
2489      -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
2490      -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
2491      -223, -223, -223, -223
2492 
2493     },
2494 
2495     {
2496        25,  221,  222,  223,  223,  221,  221,  221,  221,  221,
2497       221,  221,  221,  221,  221,  221,  221,  241,  221,  221,
2498       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2499       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2500       221,  221,  221,  221
2501     },
2502 
2503     {
2504        25,  198,  199,  127,  127,  198,  198,  198,  198,  198,
2505       198,  198,  198,  198,  198,  198,  198,  225,  198,  198,
2506       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2507       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
2508       198,  198,  198,  198
2509 
2510     },
2511 
2512     {
2513        25,  226,  227,  228,  228,  226,  226,  226,  226,  226,
2514       226,  226,  226,  226,  226,  226,  226,  229,  226,  226,
2515       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2516       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2517       226,  226,  226,  226
2518     },
2519 
2520     {
2521        25,  226,  227,  228,  228,  226,  226,  226,  226,  226,
2522       226,  226,  226,  226,  226,  226,  226,  229,  226,  226,
2523       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2524       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2525       226,  226,  226,  226
2526 
2527     },
2528 
2529     {
2530        25, -228,  174,  174,  174, -228, -228, -228, -228, -228,
2531      -228,  175, -228, -228, -228, -228, -228,  176, -228, -228,
2532      -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
2533      -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
2534      -228, -228, -228, -228
2535     },
2536 
2537     {
2538        25,  226,  227,  228,  228,  226,  226,  226,  226,  226,
2539       226,  226,  226,  226,  226,  226,  226,  242,  226,  226,
2540       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2541       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2542       226,  226,  226,  226
2543 
2544     },
2545 
2546     {
2547        25,  202,  203,  131,  131,  202,  202,  202,  202,  202,
2548       202,  202,  202,  202,  202,  202,  202,  230,  202,  202,
2549       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2550       202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
2551       202,  202,  202,  202
2552     },
2553 
2554     {
2555        25, -231, -231, -231, -231, -231, -231, -231, -231, -231,
2556      -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
2557       243,  243, -231, -231, -231, -231, -231, -231,  243,  243,
2558       243,  243,  243, -231, -231, -231, -231, -231, -231, -231,
2559      -231, -231, -231, -231
2560 
2561     },
2562 
2563     {
2564        25, -232, -232, -232, -232, -232, -232, -232, -232, -232,
2565      -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
2566       244,  244, -232, -232, -232, -232, -232, -232,  244,  244,
2567       244,  244,  244, -232, -232, -232, -232, -232, -232, -232,
2568      -232, -232, -232, -232
2569     },
2570 
2571     {
2572        25, -233, -233, -233, -233, -233, -233, -233, -233, -233,
2573      -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
2574      -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
2575      -233, -233, -233, -233, -233,  245, -233, -233, -233, -233,
2576      -233, -233, -233, -233
2577 
2578     },
2579 
2580     {
2581        25,  234,  235,  236,  236,  234,  234,  234,  234,  234,
2582       234,  234,  234,  234,  234,  234,  234,  237,  234,  234,
2583       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2584       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2585       234,  234,  234,  234
2586     },
2587 
2588     {
2589        25,  234,  235,  236,  236,  234,  234,  234,  234,  234,
2590       234,  234,  234,  234,  234,  234,  234,  237,  234,  234,
2591       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2592       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2593       234,  234,  234,  234
2594 
2595     },
2596 
2597     {
2598        25, -236,  185,  185,  185, -236, -236, -236, -236, -236,
2599      -236,  175, -236, -236, -236, -236, -236,  186, -236, -236,
2600      -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
2601      -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
2602      -236, -236, -236, -236
2603     },
2604 
2605     {
2606        25,  234,  235,  236,  236,  234,  234,  234,  234,  234,
2607       234,  234,  234,  234,  234,  234,  234,  246,  234,  234,
2608       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2609       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2610       234,  234,  234,  234
2611 
2612     },
2613 
2614     {
2615        25,  211,  212,  147,  147,  211,  211,  211,  211,  211,
2616       211,  211,  211,  211,  211,  211,  211,  238,  211,  211,
2617       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2618       211,  211,  211,  211,  211,  211,  211,  211,  211,  211,
2619       211,  211,  211,  211
2620     },
2621 
2622     {
2623        25, -239, -239, -239, -239, -239, -239, -239, -239, -239,
2624      -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
2625      -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
2626      -239, -239, -239, -239, -239,  247, -239, -239, -239, -239,
2627      -239, -239, -239, -239
2628 
2629     },
2630 
2631     {
2632        25,  216,  217,  218,  218,  216,  216,  216,  216,  216,
2633       216,  216,  216,  216,  216,  216,  216,  240,  216,  216,
2634       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2635       216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
2636       216,  216,  216,  216
2637     },
2638 
2639     {
2640        25,  221,  222,  223,  223,  221,  221,  221,  221,  221,
2641       221,  221,  221,  221,  221,  221,  221,  241,  221,  221,
2642       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2643       221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
2644       221,  221,  221,  221
2645 
2646     },
2647 
2648     {
2649        25,  226,  227,  228,  228,  226,  226,  226,  226,  226,
2650       226,  226,  226,  226,  226,  226,  226,  242,  226,  226,
2651       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2652       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
2653       226,  226,  226,  226
2654     },
2655 
2656     {
2657        25, -243, -243, -243, -243, -243, -243, -243, -243, -243,
2658      -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
2659       248,  248, -243, -243, -243, -243, -243, -243,  248,  248,
2660       248,  248,  248, -243, -243, -243, -243, -243, -243, -243,
2661      -243, -243, -243, -243
2662 
2663     },
2664 
2665     {
2666        25, -244, -244, -244, -244, -244, -244, -244, -244, -244,
2667      -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
2668      -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
2669      -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
2670      -244, -244, -244, -244
2671     },
2672 
2673     {
2674        25, -245, -245, -245, -245, -245, -245, -245, -245, -245,
2675      -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
2676      -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
2677      -245, -245,  249, -245, -245, -245, -245, -245, -245, -245,
2678      -245, -245, -245, -245
2679 
2680     },
2681 
2682     {
2683        25,  234,  235,  236,  236,  234,  234,  234,  234,  234,
2684       234,  234,  234,  234,  234,  234,  234,  246,  234,  234,
2685       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2686       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
2687       234,  234,  234,  234
2688     },
2689 
2690     {
2691        25, -247, -247, -247, -247, -247, -247, -247, -247, -247,
2692      -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
2693      -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
2694      -247, -247,  250, -247, -247, -247, -247, -247, -247, -247,
2695      -247, -247, -247, -247
2696 
2697     },
2698 
2699     {
2700        25, -248, -248, -248, -248, -248, -248, -248, -248, -248,
2701      -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
2702       251,  251, -248, -248, -248, -248, -248, -248,  251,  251,
2703       251,  251,  251, -248, -248, -248, -248, -248, -248, -248,
2704      -248, -248, -248, -248
2705     },
2706 
2707     {
2708        25, -249,  252,  252,  252, -249, -249, -249, -249, -249,
2709      -249,  253, -249, -249, -249, -249, -249,  254, -249, -249,
2710      -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
2711      -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
2712      -249, -249, -249, -249
2713 
2714     },
2715 
2716     {
2717        25, -250,  255,  255,  255, -250, -250, -250, -250, -250,
2718      -250,  256, -250, -250, -250, -250, -250,  257, -250, -250,
2719      -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
2720      -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
2721      -250, -250, -250, -250
2722     },
2723 
2724     {
2725        25, -251, -251, -251, -251, -251, -251, -251, -251, -251,
2726      -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
2727       258,  258, -251, -251, -251, -251, -251, -251,  258,  258,
2728       258,  258,  258, -251, -251, -251, -251, -251, -251, -251,
2729      -251, -251, -251, -251
2730 
2731     },
2732 
2733     {
2734        25, -252,  252,  252,  252, -252, -252, -252, -252, -252,
2735      -252,  253, -252, -252, -252, -252, -252,  254, -252, -252,
2736      -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
2737      -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
2738      -252, -252, -252, -252
2739     },
2740 
2741     {
2742        25,  259,  259,  259,  259,  259,  259,  259,  259,  259,
2743       259, -253,  259,  259,  259,  259,  259,  259,  259,  259,
2744       259,  259,  259,  259,  259,  259,  259,  259,  259,  259,
2745       259,  259,  259,  259,  259,  259,  259,  259,  259,  259,
2746       259,  259,  259,  259
2747 
2748     },
2749 
2750     {
2751        25, -254, -254, -254, -254, -254, -254, -254, -254, -254,
2752      -254, -254, -254, -254, -254, -254, -254,  260, -254, -254,
2753      -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
2754      -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
2755      -254, -254, -254, -254
2756     },
2757 
2758     {
2759        25, -255,  255,  255,  255, -255, -255, -255, -255, -255,
2760      -255,  256, -255, -255, -255, -255, -255,  257, -255, -255,
2761      -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
2762      -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
2763      -255, -255, -255, -255
2764 
2765     },
2766 
2767     {
2768        25,  261,  261,  261,  261,  261,  261,  261,  261,  261,
2769       261, -256,  261,  261,  261,  261,  261,  261,  261,  261,
2770       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
2771       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
2772       261,  261,  261,  261
2773     },
2774 
2775     {
2776        25, -257, -257, -257, -257, -257, -257, -257, -257, -257,
2777      -257, -257, -257, -257, -257, -257, -257,  262, -257, -257,
2778      -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
2779      -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
2780      -257, -257, -257, -257
2781 
2782     },
2783 
2784     {
2785        25, -258, -258, -258, -258, -258, -258, -258, -258, -258,
2786      -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
2787       244,  244, -258, -258, -258, -258, -258, -258,  244,  244,
2788       244,  244,  244, -258, -258, -258, -258, -258, -258, -258,
2789      -258, -258, -258, -258
2790     },
2791 
2792     {
2793        25, -259, -259, -259, -259, -259, -259, -259, -259, -259,
2794      -259,  263, -259, -259, -259, -259, -259, -259, -259, -259,
2795      -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
2796      -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
2797      -259, -259, -259, -259
2798 
2799     },
2800 
2801     {
2802        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2803       264,  266,  264,  264,  264,  264,  264,  267,  264,  264,
2804       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2805       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2806       264,  264,  264,  264
2807     },
2808 
2809     {
2810        25, -261, -261, -261, -261, -261, -261, -261, -261, -261,
2811      -261,  268, -261, -261, -261, -261, -261, -261, -261, -261,
2812      -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
2813      -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
2814      -261, -261, -261, -261
2815 
2816     },
2817 
2818     {
2819        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2820       269,  271,  269,  269,  269,  269,  269,  272,  269,  269,
2821       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2822       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2823       269,  269,  269,  269
2824     },
2825 
2826     {
2827        25, -263, -263, -263, -263, -263, -263, -263, -263, -263,
2828      -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
2829      -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
2830      -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
2831      -263, -263, -263, -263
2832 
2833     },
2834 
2835     {
2836        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2837       264,  266,  264,  264,  264,  264,  264,  267,  264,  264,
2838       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2839       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2840       264,  264,  264,  264
2841     },
2842 
2843     {
2844        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2845       264,  266,  264,  264,  264,  264,  264,  267,  264,  264,
2846       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2847       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2848       264,  264,  264,  264
2849 
2850     },
2851 
2852     {
2853        25,  273,  274,  275,  275,  273,  273,  273,  273,  273,
2854       273,  266,  273,  273,  273,  273,  273,  276,  273,  273,
2855       273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
2856       273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
2857       273,  273,  273,  273
2858     },
2859 
2860     {
2861        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2862       264,  266,  264,  264,  264,  264,  264,  277,  264,  264,
2863       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2864       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2865       264,  264,  264,  264
2866 
2867     },
2868 
2869     {
2870        25, -268, -268, -268, -268, -268, -268, -268, -268, -268,
2871      -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
2872      -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
2873      -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
2874      -268, -268, -268, -268
2875     },
2876 
2877     {
2878        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2879       269,  271,  269,  269,  269,  269,  269,  272,  269,  269,
2880       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2881       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2882       269,  269,  269,  269
2883 
2884     },
2885 
2886     {
2887        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2888       269,  271,  269,  269,  269,  269,  269,  272,  269,  269,
2889       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2890       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2891       269,  269,  269,  269
2892     },
2893 
2894     {
2895        25,  278,  279,  280,  280,  278,  278,  278,  278,  278,
2896       278,  271,  278,  278,  278,  278,  278,  281,  278,  278,
2897       278,  278,  278,  278,  278,  278,  278,  278,  278,  278,
2898       278,  278,  278,  278,  278,  278,  278,  278,  278,  278,
2899       278,  278,  278,  278
2900 
2901     },
2902 
2903     {
2904        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2905       269,  271,  269,  269,  269,  269,  269,  282,  269,  269,
2906       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2907       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2908       269,  269,  269,  269
2909     },
2910 
2911     {
2912        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2913       264,  283,  264,  264,  264,  264,  264,  267,  264,  264,
2914       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2915       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2916       264,  264,  264,  264
2917 
2918     },
2919 
2920     {
2921        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2922       264,  283,  264,  264,  264,  264,  264,  267,  264,  264,
2923       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2924       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2925       264,  264,  264,  264
2926     },
2927 
2928     {
2929        25, -275,  252,  252,  252, -275, -275, -275, -275, -275,
2930      -275,  284, -275, -275, -275, -275, -275,  254, -275, -275,
2931      -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
2932      -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
2933      -275, -275, -275, -275
2934 
2935     },
2936 
2937     {
2938        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2939       264,  283,  264,  264,  264,  264,  264,  277,  264,  264,
2940       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2941       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2942       264,  264,  264,  264
2943     },
2944 
2945     {
2946        25,  264,  265,  252,  252,  264,  264,  264,  264,  264,
2947       264,  266,  264,  264,  264,  264,  264,  277,  264,  264,
2948       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2949       264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
2950       264,  264,  264,  264
2951 
2952     },
2953 
2954     {
2955        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2956       269,  285,  269,  269,  269,  269,  269,  272,  269,  269,
2957       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2958       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2959       269,  269,  269,  269
2960     },
2961 
2962     {
2963        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2964       269,  285,  269,  269,  269,  269,  269,  272,  269,  269,
2965       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2966       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2967       269,  269,  269,  269
2968 
2969     },
2970 
2971     {
2972        25, -280,  255,  255,  255, -280, -280, -280, -280, -280,
2973      -280,  286, -280, -280, -280, -280, -280,  257, -280, -280,
2974      -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
2975      -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
2976      -280, -280, -280, -280
2977     },
2978 
2979     {
2980        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2981       269,  285,  269,  269,  269,  269,  269,  282,  269,  269,
2982       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2983       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2984       269,  269,  269,  269
2985 
2986     },
2987 
2988     {
2989        25,  269,  270,  255,  255,  269,  269,  269,  269,  269,
2990       269,  271,  269,  269,  269,  269,  269,  282,  269,  269,
2991       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2992       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
2993       269,  269,  269,  269
2994     },
2995 
2996     {
2997        25,  273,  274,  275,  275,  273,  273,  273,  273,  273,
2998       273,  266,  273,  273,  273,  273,  273,  276,  273,  273,
2999       273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
3000       273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
3001       273,  273,  273,  273
3002 
3003     },
3004 
3005     {
3006        25,  259,  259,  259,  259,  259,  259,  259,  259,  259,
3007       259, -284,  259,  259,  259,  259,  259,  259,  259,  259,
3008       259,  259,  259,  259,  259,  259,  259,  259,  259,  259,
3009       259,  259,  259,  259,  259,  259,  259,  259,  259,  259,
3010       259,  259,  259,  259
3011     },
3012 
3013     {
3014        25,  278,  279,  280,  280,  278,  278,  278,  278,  278,
3015       278,  271,  278,  278,  278,  278,  278,  281,  278,  278,
3016       278,  278,  278,  278,  278,  278,  278,  278,  278,  278,
3017       278,  278,  278,  278,  278,  278,  278,  278,  278,  278,
3018       278,  278,  278,  278
3019 
3020     },
3021 
3022     {
3023        25,  261,  261,  261,  261,  261,  261,  261,  261,  261,
3024       261, -286,  261,  261,  261,  261,  261,  261,  261,  261,
3025       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
3026       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
3027       261,  261,  261,  261
3028     },
3029 
3030     } ;
3031 
3032 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
3033 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  , yyscan_t yyscanner);
3034 static int yy_get_next_buffer ( yyscan_t yyscanner );
3035 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
3036 
3037 /* Done after the current pattern has been matched and before the
3038  * corresponding action - sets up yytext.
3039  */
3040 #define YY_DO_BEFORE_ACTION \
3041 	yyg->yytext_ptr = yy_bp; \
3042 	yyleng = (int) (yy_cp - yy_bp); \
3043 	yyg->yy_hold_char = *yy_cp; \
3044 	*yy_cp = '\0'; \
3045 	yyg->yy_c_buf_p = yy_cp;
3046 #define YY_NUM_RULES 89
3047 #define YY_END_OF_BUFFER 90
3048 /* This struct is not used in this scanner,
3049    but its presence is necessary. */
3050 struct yy_trans_info
3051 	{
3052 	flex_int32_t yy_verify;
3053 	flex_int32_t yy_nxt;
3054 	};
3055 static const flex_int16_t yy_accept[287] =
3056     {   0,
3057         0,    0,   12,   12,    0,    0,    0,    0,   11,   11,
3058         0,    0,    0,    0,    0,    0,    0,    0,   52,   52,
3059         0,    0,   28,   28,   90,   88,    1,    1,   79,   46,
3060        79,   88,   78,   19,   65,   66,   78,   78,   78,   78,
3061        81,   78,   67,   78,   78,   78,   87,   87,   87,   87,
3062        87,   87,   69,   12,    9,    5,    5,    6,    6,   55,
3063        48,   11,   16,   31,   22,   32,   32,   22,   39,   43,
3064        43,   45,   49,   51,   50,   50,   51,   51,   24,   27,
3065        26,   26,   27,   27,    1,   79,   64,   40,   80,   41,
3066         1,   58,   82,    2,   82,   81,   85,   75,   74,   70,
3067 
3068        57,   59,   77,   61,   63,   60,   62,   87,    8,   20,
3069        18,   56,   15,   68,   12,    9,    9,   10,    5,    7,
3070         4,    3,   55,   54,   11,   16,   16,   17,   31,   22,
3071        22,   30,   23,   32,   35,   36,   34,   34,   35,   43,
3072        42,   44,   50,   50,   52,   24,   24,   25,   26,   26,
3073        28,   41,    1,    1,    2,   83,   82,   86,   84,   75,
3074        74,   76,   47,   21,    9,   14,   10,    9,    3,   16,
3075        13,   17,   16,   22,   38,   23,   22,   36,   34,   34,
3076        37,   44,   50,   52,   24,   25,   24,   26,   28,   72,
3077        71,   76,    9,    9,    9,    9,   16,   16,   16,   16,
3078 
3079        22,   22,   22,   22,   36,   34,   34,   37,   52,   24,
3080        24,   24,   24,   28,   73,    9,    9,    9,    9,    9,
3081        16,   16,   16,   16,   16,   22,   22,   22,   22,   22,
3082        34,   34,   52,   24,   24,   24,   24,   24,   28,    9,
3083        16,   22,   34,   33,   52,   24,   28,   34,   52,   28,
3084        34,   52,   52,   52,   28,   28,   28,   34,   52,   52,
3085        28,   28,   53,   52,   52,   52,   52,   29,   28,   28,
3086        28,   28,   52,   52,   52,   52,   52,   28,   28,   28,
3087        28,   28,   52,   52,   28,   28
3088     } ;
3089 
3090 static const YY_CHAR yy_ec[256] =
3091     {   0,
3092         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
3093         1,    2,    4,    1,    1,    1,    1,    1,    1,    1,
3094         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
3095         1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
3096        13,   14,   15,   16,   17,   18,   19,   20,   20,   20,
3097        20,   20,   20,   20,   20,   21,   21,   22,   23,   24,
3098        25,   26,   27,    7,   28,   29,   30,   31,   32,   31,
3099        33,   33,   33,   33,   33,   33,   33,   34,   33,   35,
3100        33,   33,   36,   33,   37,   33,   33,   38,   33,   33,
3101        16,   39,   16,    9,   33,    7,   28,   29,   30,   31,
3102 
3103        32,   31,   33,   33,   33,   33,   33,   33,   33,   34,
3104        33,   35,   33,   33,   36,   33,   40,   33,   33,   41,
3105        33,   33,   42,    7,   43,    7,    1,   33,   33,   33,
3106        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3107        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3108        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3109        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3110        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3111        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3112        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3113 
3114        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3115        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3116        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3117        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3118        33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
3119        33,   33,   33,   33,   33
3120     } ;
3121 
3122 /* The intent behind this definition is that it'll catch
3123  * any uses of REJECT which flex missed.
3124  */
3125 #define REJECT reject_used_but_not_detected
3126 #define yymore() yymore_used_but_not_detected
3127 #define YY_MORE_ADJ 0
3128 #define YY_RESTORE_YY_MORE_OFFSET
3129 #line 1 "psqlscan.l"
3130 
3131 #line 44 "psqlscan.l"
3132 
3133 /* LCOV_EXCL_START */
3134 
3135 #include "fe_utils/psqlscan_int.h"
3136 
3137 /*
3138  * We must have a typedef YYSTYPE for yylex's first argument, but this lexer
3139  * doesn't presently make use of that argument, so just declare it as int.
3140  */
3141 typedef int YYSTYPE;
3142 
3143 /*
3144  * Set the type of yyextra; we use it as a pointer back to the containing
3145  * PsqlScanState.
3146  */
3147 #define YY_EXTRA_TYPE PsqlScanState
3148 
3149 
3150 /* Return values from yylex() */
3151 #define LEXRES_EOL			0	/* end of input */
3152 #define LEXRES_SEMI			1	/* command-terminating semicolon found */
3153 #define LEXRES_BACKSLASH	2	/* backslash command start */
3154 
3155 
3156 #define ECHO psqlscan_emit(cur_state, yytext, yyleng)
3157 
3158 /*
3159  * Work around a bug in flex 2.5.35: it emits a couple of functions that
3160  * it forgets to emit declarations for.  Since we use -Wmissing-prototypes,
3161  * this would cause warnings.  Providing our own declarations should be
3162  * harmless even when the bug gets fixed.
3163  */
3164 extern int	psql_yyget_column(yyscan_t yyscanner);
3165 extern void psql_yyset_column(int column_no, yyscan_t yyscanner);
3166 
3167 #line 3168 "psqlscan.c"
3168 #define YY_NO_INPUT 1
3169 /*
3170  * All of the following definitions and rules should exactly match
3171  * src/backend/parser/scan.l so far as the flex patterns are concerned.
3172  * The rule bodies are just ECHO as opposed to what the backend does,
3173  * however.  (But be sure to duplicate code that affects the lexing process,
3174  * such as BEGIN() and yyless().)  Also, psqlscan uses a single <<EOF>> rule
3175  * whereas scan.l has a separate one for each exclusive state.
3176  */
3177 /*
3178  * OK, here is a short description of lex/flex rules behavior.
3179  * The longest pattern which matches an input string is always chosen.
3180  * For equal-length patterns, the first occurring in the rules list is chosen.
3181  * INITIAL is the starting state, to which all non-conditional rules apply.
3182  * Exclusive states change parsing rules while the state is active.  When in
3183  * an exclusive state, only those rules defined for that state apply.
3184  *
3185  * We use exclusive states for quoted strings, extended comments,
3186  * and to eliminate parsing troubles for numeric strings.
3187  * Exclusive states:
3188  *  <xb> bit string literal
3189  *  <xc> extended C-style comments
3190  *  <xd> delimited identifiers (double-quoted identifiers)
3191  *  <xh> hexadecimal numeric string
3192  *  <xq> standard quoted strings
3193  *  <xe> extended quoted strings (support backslash escape sequences)
3194  *  <xdolq> $foo$ quoted strings
3195  *  <xui> quoted identifier with Unicode escapes
3196  *  <xuiend> end of a quoted identifier with Unicode escapes, UESCAPE can follow
3197  *  <xus> quoted string with Unicode escapes
3198  *  <xusend> end of a quoted string with Unicode escapes, UESCAPE can follow
3199  *
3200  * Note: we intentionally don't mimic the backend's <xeu> state; we have
3201  * no need to distinguish it from <xe> state, and no good way to get out
3202  * of it in error cases.  The backend just throws yyerror() in those
3203  * cases, but that's not an option here.
3204  */
3205 
3206 /*
3207  * In order to make the world safe for Windows and Mac clients as well as
3208  * Unix ones, we accept either \n or \r as a newline.  A DOS-style \r\n
3209  * sequence will be seen as two successive newlines, but that doesn't cause
3210  * any problems.  Comments that start with -- and extend to the next
3211  * newline are treated as equivalent to a single whitespace character.
3212  *
3213  * NOTE a fine point: if there is no newline following --, we will absorb
3214  * everything to the end of the input as a comment.  This is correct.  Older
3215  * versions of Postgres failed to recognize -- as a comment if the input
3216  * did not end with a newline.
3217  *
3218  * XXX perhaps \f (formfeed) should be treated as a newline as well?
3219  *
3220  * XXX if you change the set of whitespace characters, fix scanner_isspace()
3221  * to agree.
3222  */
3223 /*
3224  * SQL requires at least one newline in the whitespace separating
3225  * string literals that are to be concatenated.  Silly, but who are we
3226  * to argue?  Note that {whitespace_with_newline} should not have * after
3227  * it, whereas {whitespace} should generally have a * after it...
3228  */
3229 /*
3230  * To ensure that {quotecontinue} can be scanned without having to back up
3231  * if the full pattern isn't matched, we include trailing whitespace in
3232  * {quotestop}.  This matches all cases where {quotecontinue} fails to match,
3233  * except for {quote} followed by whitespace and just one "-" (not two,
3234  * which would start a {comment}).  To cover that we have {quotefail}.
3235  * The actions for {quotestop} and {quotefail} must throw back characters
3236  * beyond the quote proper.
3237  */
3238 /* Bit string
3239  * It is tempting to scan the string for only those characters
3240  * which are allowed. However, this leads to silently swallowed
3241  * characters if illegal characters are included in the string.
3242  * For example, if xbinside is [01] then B'ABCD' is interpreted
3243  * as a zero-length string, and the ABCD' is lost!
3244  * Better to pass the string forward and let the input routines
3245  * validate the contents.
3246  */
3247 /* Hexadecimal number */
3248 /* National character */
3249 /* Quoted string that allows backslash escapes */
3250 /* Extended quote
3251  * xqdouble implements embedded quote, ''''
3252  */
3253 /* $foo$ style quotes ("dollar quoting")
3254  * The quoted string starts with $foo$ where "foo" is an optional string
3255  * in the form of an identifier, except that it may not contain "$",
3256  * and extends to the first occurrence of an identical string.
3257  * There is *no* processing of the quoted text.
3258  *
3259  * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim}
3260  * fails to match its trailing "$".
3261  */
3262 /* Double quote
3263  * Allows embedded spaces and other special characters into identifiers.
3264  */
3265 /* Unicode escapes */
3266 /* error rule to avoid backup */
3267 /* Quoted identifier with Unicode escapes */
3268 /* Quoted string with Unicode escapes */
3269 /* Optional UESCAPE after a quoted string or identifier with Unicode escapes. */
3270 /* error rule to avoid backup */
3271 /* C-style comments
3272  *
3273  * The "extended comment" syntax closely resembles allowable operator syntax.
3274  * The tricky part here is to get lex to recognize a string starting with
3275  * slash-star as a comment, when interpreting it as an operator would produce
3276  * a longer match --- remember lex will prefer a longer match!  Also, if we
3277  * have something like plus-slash-star, lex will think this is a 3-character
3278  * operator whereas we want to see it as a + operator and a comment start.
3279  * The solution is two-fold:
3280  * 1. append {op_chars}* to xcstart so that it matches as much text as
3281  *    {operator} would. Then the tie-breaker (first matching rule of same
3282  *    length) ensures xcstart wins.  We put back the extra stuff with yyless()
3283  *    in case it contains a star-slash that should terminate the comment.
3284  * 2. In the operator rule, check for slash-star within the operator, and
3285  *    if found throw it back with yyless().  This handles the plus-slash-star
3286  *    problem.
3287  * Dash-dash comments have similar interactions with the operator rule.
3288  */
3289 /* Assorted special-case operators and operator-like tokens */
3290 /*
3291  * These operator-like tokens (unlike the above ones) also match the {operator}
3292  * rule, which means that they might be overridden by a longer match if they
3293  * are followed by a comment start or a + or - character. Accordingly, if you
3294  * add to this list, you must also add corresponding code to the {operator}
3295  * block to return the correct token in such cases. (This is not needed in
3296  * psqlscan.l since the token value is ignored there.)
3297  */
3298 /*
3299  * "self" is the set of chars that should be returned as single-character
3300  * tokens.  "op_chars" is the set of chars that can make up "Op" tokens,
3301  * which can be one or more characters long (but if a single-char token
3302  * appears in the "self" set, it is not to be returned as an Op).  Note
3303  * that the sets overlap, but each has some chars that are not in the other.
3304  *
3305  * If you change either set, adjust the character lists appearing in the
3306  * rule for "operator"!
3307  */
3308 /* we no longer allow unary minus in numbers.
3309  * instead we pass it separately to parser. there it gets
3310  * coerced via doNegate() -- Leon aug 20 1999
3311  *
3312  * {decimalfail} is used because we would like "1..10" to lex as 1, dot_dot, 10.
3313  *
3314  * {realfail1} and {realfail2} are added to prevent the need for scanner
3315  * backup when the {real} rule fails to match completely.
3316  */
3317 /* psql-specific: characters allowed in variable names */
3318 /*
3319  * Dollar quoted strings are totally opaque, and no escaping is done on them.
3320  * Other quoted strings must allow some special characters such as single-quote
3321  *  and newline.
3322  * Embedded single-quotes are implemented both in the SQL standard
3323  *  style of two adjacent single quotes "''" and in the Postgres/Java style
3324  *  of escaped-quote "\'".
3325  * Other embedded escaped characters are matched explicitly and the leading
3326  *  backslash is dropped from the string.
3327  * Note that xcstart must appear before operator, as explained above!
3328  *  Also whitespace (comment) must appear before operator.
3329  */
3330 #line 3331 "psqlscan.c"
3331 
3332 #define INITIAL 0
3333 #define xb 1
3334 #define xc 2
3335 #define xd 3
3336 #define xh 4
3337 #define xq 5
3338 #define xe 6
3339 #define xdolq 7
3340 #define xui 8
3341 #define xuiend 9
3342 #define xus 10
3343 #define xusend 11
3344 
3345 #ifndef YY_NO_UNISTD_H
3346 /* Special case for "unistd.h", since it is non-ANSI. We include it way
3347  * down here because we want the user's section 1 to have been scanned first.
3348  * The user has a chance to override it with an option.
3349  */
3350 #include <unistd.h>
3351 #endif
3352 
3353 #ifndef YY_EXTRA_TYPE
3354 #define YY_EXTRA_TYPE void *
3355 #endif
3356 
3357 /* Holds the entire state of the reentrant scanner. */
3358 struct yyguts_t
3359     {
3360 
3361     /* User-defined. Not touched by flex. */
3362     YY_EXTRA_TYPE yyextra_r;
3363 
3364     /* The rest are the same as the globals declared in the non-reentrant scanner. */
3365     FILE *yyin_r, *yyout_r;
3366     size_t yy_buffer_stack_top; /**< index of top of stack. */
3367     size_t yy_buffer_stack_max; /**< capacity of stack. */
3368     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
3369     char yy_hold_char;
3370     int yy_n_chars;
3371     int yyleng_r;
3372     char *yy_c_buf_p;
3373     int yy_init;
3374     int yy_start;
3375     int yy_did_buffer_switch_on_eof;
3376     int yy_start_stack_ptr;
3377     int yy_start_stack_depth;
3378     int *yy_start_stack;
3379     yy_state_type yy_last_accepting_state;
3380     char* yy_last_accepting_cpos;
3381 
3382     int yylineno_r;
3383     int yy_flex_debug_r;
3384 
3385     char *yytext_r;
3386     int yy_more_flag;
3387     int yy_more_len;
3388 
3389     YYSTYPE * yylval_r;
3390 
3391     }; /* end struct yyguts_t */
3392 
3393 static int yy_init_globals ( yyscan_t yyscanner );
3394 
3395     /* This must go here because YYSTYPE and YYLTYPE are included
3396      * from bison output in section 1.*/
3397     #    define yylval yyg->yylval_r
3398 
3399 int yylex_init (yyscan_t* scanner);
3400 
3401 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
3402 
3403 /* Accessor methods to globals.
3404    These are made visible to non-reentrant scanners for convenience. */
3405 
3406 int yylex_destroy ( yyscan_t yyscanner );
3407 
3408 int yyget_debug ( yyscan_t yyscanner );
3409 
3410 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
3411 
3412 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
3413 
3414 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
3415 
3416 FILE *yyget_in ( yyscan_t yyscanner );
3417 
3418 void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );
3419 
3420 FILE *yyget_out ( yyscan_t yyscanner );
3421 
3422 void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );
3423 
3424 			int yyget_leng ( yyscan_t yyscanner );
3425 
3426 char *yyget_text ( yyscan_t yyscanner );
3427 
3428 int yyget_lineno ( yyscan_t yyscanner );
3429 
3430 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
3431 
3432 int yyget_column  ( yyscan_t yyscanner );
3433 
3434 void yyset_column ( int _column_no , yyscan_t yyscanner );
3435 
3436 YYSTYPE * yyget_lval ( yyscan_t yyscanner );
3437 
3438 void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
3439 
3440 /* Macros after this point can all be overridden by user definitions in
3441  * section 1.
3442  */
3443 
3444 #ifndef YY_SKIP_YYWRAP
3445 #ifdef __cplusplus
3446 extern "C" int yywrap ( yyscan_t yyscanner );
3447 #else
3448 extern int yywrap ( yyscan_t yyscanner );
3449 #endif
3450 #endif
3451 
3452 #ifndef YY_NO_UNPUT
3453 
3454 #endif
3455 
3456 #ifndef yytext_ptr
3457 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
3458 #endif
3459 
3460 #ifdef YY_NEED_STRLEN
3461 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
3462 #endif
3463 
3464 #ifndef YY_NO_INPUT
3465 #ifdef __cplusplus
3466 static int yyinput ( yyscan_t yyscanner );
3467 #else
3468 static int input ( yyscan_t yyscanner );
3469 #endif
3470 
3471 #endif
3472 
3473 /* Amount of stuff to slurp up with each read. */
3474 #ifndef YY_READ_BUF_SIZE
3475 #ifdef __ia64__
3476 /* On IA-64, the buffer size is 16k, not 8k */
3477 #define YY_READ_BUF_SIZE 16384
3478 #else
3479 #define YY_READ_BUF_SIZE 8192
3480 #endif /* __ia64__ */
3481 #endif
3482 
3483 /* Copy whatever the last rule matched to the standard output. */
3484 #ifndef ECHO
3485 /* This used to be an fputs(), but since the string might contain NUL's,
3486  * we now use fwrite().
3487  */
3488 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
3489 #endif
3490 
3491 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
3492  * is returned in "result".
3493  */
3494 #ifndef YY_INPUT
3495 #define YY_INPUT(buf,result,max_size) \
3496 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
3497 		{ \
3498 		int c = '*'; \
3499 		int n; \
3500 		for ( n = 0; n < max_size && \
3501 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
3502 			buf[n] = (char) c; \
3503 		if ( c == '\n' ) \
3504 			buf[n++] = (char) c; \
3505 		if ( c == EOF && ferror( yyin ) ) \
3506 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
3507 		result = n; \
3508 		} \
3509 	else \
3510 		{ \
3511 		errno=0; \
3512 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
3513 			{ \
3514 			if( errno != EINTR) \
3515 				{ \
3516 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
3517 				break; \
3518 				} \
3519 			errno=0; \
3520 			clearerr(yyin); \
3521 			} \
3522 		}\
3523 \
3524 
3525 #endif
3526 
3527 /* No semi-colon after return; correct usage is to write "yyterminate();" -
3528  * we don't want an extra ';' after the "return" because that will cause
3529  * some compilers to complain about unreachable statements.
3530  */
3531 #ifndef yyterminate
3532 #define yyterminate() return YY_NULL
3533 #endif
3534 
3535 /* Number of entries by which start-condition stack grows. */
3536 #ifndef YY_START_STACK_INCR
3537 #define YY_START_STACK_INCR 25
3538 #endif
3539 
3540 /* Report a fatal error. */
3541 #ifndef YY_FATAL_ERROR
3542 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
3543 #endif
3544 
3545 /* end tables serialization structures and prototypes */
3546 
3547 /* Default declaration of generated scanner - a define so the user can
3548  * easily add parameters.
3549  */
3550 #ifndef YY_DECL
3551 #define YY_DECL_IS_OURS 1
3552 
3553 extern int yylex \
3554                (YYSTYPE * yylval_param , yyscan_t yyscanner);
3555 
3556 #define YY_DECL int yylex \
3557                (YYSTYPE * yylval_param , yyscan_t yyscanner)
3558 #endif /* !YY_DECL */
3559 
3560 /* Code executed at the beginning of each rule, after yytext and yyleng
3561  * have been set up.
3562  */
3563 #ifndef YY_USER_ACTION
3564 #define YY_USER_ACTION
3565 #endif
3566 
3567 /* Code executed at the end of each rule. */
3568 #ifndef YY_BREAK
3569 #define YY_BREAK /*LINTED*/break;
3570 #endif
3571 
3572 #define YY_RULE_SETUP \
3573 	YY_USER_ACTION
3574 
3575 /** The main scanner function which does all the work.
3576  */
3577 YY_DECL
3578 {
3579 	yy_state_type yy_current_state;
3580 	char *yy_cp, *yy_bp;
3581 	int yy_act;
3582     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3583 
3584     yylval = yylval_param;
3585 
3586 	if ( !yyg->yy_init )
3587 		{
3588 		yyg->yy_init = 1;
3589 
3590 #ifdef YY_USER_INIT
3591 		YY_USER_INIT;
3592 #endif
3593 
3594 		if ( ! yyg->yy_start )
3595 			yyg->yy_start = 1;	/* first start state */
3596 
3597 		if ( ! yyin )
3598 			yyin = stdin;
3599 
3600 		if ( ! yyout )
3601 			yyout = stdout;
3602 
3603 		if ( ! YY_CURRENT_BUFFER ) {
3604 			yyensure_buffer_stack (yyscanner);
3605 			YY_CURRENT_BUFFER_LVALUE =
3606 				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
3607 		}
3608 
3609 		yy_load_buffer_state( yyscanner );
3610 		}
3611 
3612 	{
3613 #line 370 "psqlscan.l"
3614 
3615 
3616 
3617 #line 374 "psqlscan.l"
3618 		/* Declare some local variables inside yylex(), for convenience */
3619 		PsqlScanState cur_state = yyextra;
3620 		PQExpBuffer output_buf = cur_state->output_buf;
3621 
3622 		/*
3623 		 * Force flex into the state indicated by start_state.  This has a
3624 		 * couple of purposes: it lets some of the functions below set a new
3625 		 * starting state without ugly direct access to flex variables, and it
3626 		 * allows us to transition from one flex lexer to another so that we
3627 		 * can lex different parts of the source string using separate lexers.
3628 		 */
3629 		BEGIN(cur_state->start_state);
3630 
3631 
3632 #line 3633 "psqlscan.c"
3633 
3634 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
3635 		{
3636 		yy_cp = yyg->yy_c_buf_p;
3637 
3638 		/* Support of yytext. */
3639 		*yy_cp = yyg->yy_hold_char;
3640 
3641 		/* yy_bp points to the position in yy_ch_buf of the start of
3642 		 * the current run.
3643 		 */
3644 		yy_bp = yy_cp;
3645 
3646 		yy_current_state = yyg->yy_start;
3647 yy_match:
3648 		while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)]  ]) > 0 )
3649 			++yy_cp;
3650 
3651 		yy_current_state = -yy_current_state;
3652 
3653 yy_find_action:
3654 		yy_act = yy_accept[yy_current_state];
3655 
3656 		YY_DO_BEFORE_ACTION;
3657 
3658 do_action:	/* This label is used only to access EOF actions. */
3659 
3660 		switch ( yy_act )
3661 	{ /* beginning of action switch */
3662 case 1:
3663 /* rule 1 can match eol */
3664 YY_RULE_SETUP
3665 #line 388 "psqlscan.l"
3666 {
3667 					/*
3668 					 * Note that the whitespace rule includes both true
3669 					 * whitespace and single-line ("--" style) comments.
3670 					 * We suppress whitespace at the start of the query
3671 					 * buffer.  We also suppress all single-line comments,
3672 					 * which is pretty dubious but is the historical
3673 					 * behavior.
3674 					 */
3675 					if (!(output_buf->len == 0 || yytext[0] == '-'))
3676 						ECHO;
3677 				}
3678 	YY_BREAK
3679 case 2:
3680 YY_RULE_SETUP
3681 #line 401 "psqlscan.l"
3682 {
3683 					cur_state->xcdepth = 0;
3684 					BEGIN(xc);
3685 					/* Put back any characters past slash-star; see above */
3686 					yyless(2);
3687 					ECHO;
3688 				}
3689 	YY_BREAK
3690 
3691 case 3:
3692 YY_RULE_SETUP
3693 #line 410 "psqlscan.l"
3694 {
3695 					cur_state->xcdepth++;
3696 					/* Put back any characters past slash-star; see above */
3697 					yyless(2);
3698 					ECHO;
3699 				}
3700 	YY_BREAK
3701 case 4:
3702 YY_RULE_SETUP
3703 #line 417 "psqlscan.l"
3704 {
3705 					if (cur_state->xcdepth <= 0)
3706 						BEGIN(INITIAL);
3707 					else
3708 						cur_state->xcdepth--;
3709 					ECHO;
3710 				}
3711 	YY_BREAK
3712 case 5:
3713 /* rule 5 can match eol */
3714 YY_RULE_SETUP
3715 #line 425 "psqlscan.l"
3716 {
3717 					ECHO;
3718 				}
3719 	YY_BREAK
3720 case 6:
3721 YY_RULE_SETUP
3722 #line 429 "psqlscan.l"
3723 {
3724 					ECHO;
3725 				}
3726 	YY_BREAK
3727 case 7:
3728 YY_RULE_SETUP
3729 #line 433 "psqlscan.l"
3730 {
3731 					ECHO;
3732 				}
3733 	YY_BREAK
3734 /* <xc> */
3735 case 8:
3736 YY_RULE_SETUP
3737 #line 438 "psqlscan.l"
3738 {
3739 					BEGIN(xb);
3740 					ECHO;
3741 				}
3742 	YY_BREAK
3743 case 9:
3744 /* rule 9 can match eol */
3745 #line 443 "psqlscan.l"
3746 case 10:
3747 /* rule 10 can match eol */
3748 YY_RULE_SETUP
3749 #line 443 "psqlscan.l"
3750 {
3751 					yyless(1);
3752 					BEGIN(INITIAL);
3753 					ECHO;
3754 				}
3755 	YY_BREAK
3756 case 11:
3757 /* rule 11 can match eol */
3758 #line 449 "psqlscan.l"
3759 case 12:
3760 /* rule 12 can match eol */
3761 YY_RULE_SETUP
3762 #line 449 "psqlscan.l"
3763 {
3764 					ECHO;
3765 				}
3766 	YY_BREAK
3767 case 13:
3768 /* rule 13 can match eol */
3769 #line 453 "psqlscan.l"
3770 case 14:
3771 /* rule 14 can match eol */
3772 YY_RULE_SETUP
3773 #line 453 "psqlscan.l"
3774 {
3775 					ECHO;
3776 				}
3777 	YY_BREAK
3778 case 15:
3779 YY_RULE_SETUP
3780 #line 457 "psqlscan.l"
3781 {
3782 					/* Hexadecimal bit type.
3783 					 * At some point we should simply pass the string
3784 					 * forward to the parser and label it there.
3785 					 * In the meantime, place a leading "x" on the string
3786 					 * to mark it for the input routine as a hex string.
3787 					 */
3788 					BEGIN(xh);
3789 					ECHO;
3790 				}
3791 	YY_BREAK
3792 case 16:
3793 /* rule 16 can match eol */
3794 #line 468 "psqlscan.l"
3795 case 17:
3796 /* rule 17 can match eol */
3797 YY_RULE_SETUP
3798 #line 468 "psqlscan.l"
3799 {
3800 					yyless(1);
3801 					BEGIN(INITIAL);
3802 					ECHO;
3803 				}
3804 	YY_BREAK
3805 case 18:
3806 YY_RULE_SETUP
3807 #line 474 "psqlscan.l"
3808 {
3809 					yyless(1);	/* eat only 'n' this time */
3810 					ECHO;
3811 				}
3812 	YY_BREAK
3813 case 19:
3814 YY_RULE_SETUP
3815 #line 479 "psqlscan.l"
3816 {
3817 					if (cur_state->std_strings)
3818 						BEGIN(xq);
3819 					else
3820 						BEGIN(xe);
3821 					ECHO;
3822 				}
3823 	YY_BREAK
3824 case 20:
3825 YY_RULE_SETUP
3826 #line 486 "psqlscan.l"
3827 {
3828 					BEGIN(xe);
3829 					ECHO;
3830 				}
3831 	YY_BREAK
3832 case 21:
3833 YY_RULE_SETUP
3834 #line 490 "psqlscan.l"
3835 {
3836 					BEGIN(xus);
3837 					ECHO;
3838 				}
3839 	YY_BREAK
3840 case 22:
3841 /* rule 22 can match eol */
3842 #line 495 "psqlscan.l"
3843 case 23:
3844 /* rule 23 can match eol */
3845 YY_RULE_SETUP
3846 #line 495 "psqlscan.l"
3847 {
3848 					yyless(1);
3849 					BEGIN(INITIAL);
3850 					ECHO;
3851 				}
3852 	YY_BREAK
3853 case 24:
3854 /* rule 24 can match eol */
3855 #line 501 "psqlscan.l"
3856 case 25:
3857 /* rule 25 can match eol */
3858 YY_RULE_SETUP
3859 #line 501 "psqlscan.l"
3860 {
3861 					/* throw back all but the quote */
3862 					yyless(1);
3863 					BEGIN(xusend);
3864 					ECHO;
3865 				}
3866 	YY_BREAK
3867 case 26:
3868 /* rule 26 can match eol */
3869 YY_RULE_SETUP
3870 #line 507 "psqlscan.l"
3871 {
3872 					ECHO;
3873 				}
3874 	YY_BREAK
3875 case 27:
3876 #line 511 "psqlscan.l"
3877 case 28:
3878 /* rule 28 can match eol */
3879 YY_RULE_SETUP
3880 #line 511 "psqlscan.l"
3881 {
3882 					yyless(0);
3883 					BEGIN(INITIAL);
3884 					ECHO;
3885 				}
3886 	YY_BREAK
3887 case 29:
3888 /* rule 29 can match eol */
3889 YY_RULE_SETUP
3890 #line 516 "psqlscan.l"
3891 {
3892 					BEGIN(INITIAL);
3893 					ECHO;
3894 				}
3895 	YY_BREAK
3896 case 30:
3897 YY_RULE_SETUP
3898 #line 520 "psqlscan.l"
3899 {
3900 					ECHO;
3901 				}
3902 	YY_BREAK
3903 case 31:
3904 /* rule 31 can match eol */
3905 YY_RULE_SETUP
3906 #line 523 "psqlscan.l"
3907 {
3908 					ECHO;
3909 				}
3910 	YY_BREAK
3911 case 32:
3912 /* rule 32 can match eol */
3913 YY_RULE_SETUP
3914 #line 526 "psqlscan.l"
3915 {
3916 					ECHO;
3917 				}
3918 	YY_BREAK
3919 case 33:
3920 YY_RULE_SETUP
3921 #line 529 "psqlscan.l"
3922 {
3923 					ECHO;
3924 				}
3925 	YY_BREAK
3926 case 34:
3927 YY_RULE_SETUP
3928 #line 532 "psqlscan.l"
3929 {
3930 					ECHO;
3931 				}
3932 	YY_BREAK
3933 case 35:
3934 /* rule 35 can match eol */
3935 YY_RULE_SETUP
3936 #line 535 "psqlscan.l"
3937 {
3938 					ECHO;
3939 				}
3940 	YY_BREAK
3941 case 36:
3942 YY_RULE_SETUP
3943 #line 538 "psqlscan.l"
3944 {
3945 					ECHO;
3946 				}
3947 	YY_BREAK
3948 case 37:
3949 YY_RULE_SETUP
3950 #line 541 "psqlscan.l"
3951 {
3952 					ECHO;
3953 				}
3954 	YY_BREAK
3955 case 38:
3956 /* rule 38 can match eol */
3957 YY_RULE_SETUP
3958 #line 544 "psqlscan.l"
3959 {
3960 					ECHO;
3961 				}
3962 	YY_BREAK
3963 case 39:
3964 YY_RULE_SETUP
3965 #line 547 "psqlscan.l"
3966 {
3967 					/* This is only needed for \ just before EOF */
3968 					ECHO;
3969 				}
3970 	YY_BREAK
3971 case 40:
3972 YY_RULE_SETUP
3973 #line 552 "psqlscan.l"
3974 {
3975 					cur_state->dolqstart = pg_strdup(yytext);
3976 					BEGIN(xdolq);
3977 					ECHO;
3978 				}
3979 	YY_BREAK
3980 case 41:
3981 YY_RULE_SETUP
3982 #line 557 "psqlscan.l"
3983 {
3984 					/* throw back all but the initial "$" */
3985 					yyless(1);
3986 					ECHO;
3987 				}
3988 	YY_BREAK
3989 case 42:
3990 YY_RULE_SETUP
3991 #line 562 "psqlscan.l"
3992 {
3993 					if (strcmp(yytext, cur_state->dolqstart) == 0)
3994 					{
3995 						free(cur_state->dolqstart);
3996 						cur_state->dolqstart = NULL;
3997 						BEGIN(INITIAL);
3998 					}
3999 					else
4000 					{
4001 						/*
4002 						 * When we fail to match $...$ to dolqstart, transfer
4003 						 * the $... part to the output, but put back the final
4004 						 * $ for rescanning.  Consider $delim$...$junk$delim$
4005 						 */
4006 						yyless(yyleng - 1);
4007 					}
4008 					ECHO;
4009 				}
4010 	YY_BREAK
4011 case 43:
4012 /* rule 43 can match eol */
4013 YY_RULE_SETUP
4014 #line 580 "psqlscan.l"
4015 {
4016 					ECHO;
4017 				}
4018 	YY_BREAK
4019 case 44:
4020 YY_RULE_SETUP
4021 #line 583 "psqlscan.l"
4022 {
4023 					ECHO;
4024 				}
4025 	YY_BREAK
4026 case 45:
4027 YY_RULE_SETUP
4028 #line 586 "psqlscan.l"
4029 {
4030 					/* This is only needed for $ inside the quoted text */
4031 					ECHO;
4032 				}
4033 	YY_BREAK
4034 case 46:
4035 YY_RULE_SETUP
4036 #line 591 "psqlscan.l"
4037 {
4038 					BEGIN(xd);
4039 					ECHO;
4040 				}
4041 	YY_BREAK
4042 case 47:
4043 YY_RULE_SETUP
4044 #line 595 "psqlscan.l"
4045 {
4046 					BEGIN(xui);
4047 					ECHO;
4048 				}
4049 	YY_BREAK
4050 case 48:
4051 YY_RULE_SETUP
4052 #line 599 "psqlscan.l"
4053 {
4054 					BEGIN(INITIAL);
4055 					ECHO;
4056 				}
4057 	YY_BREAK
4058 case 49:
4059 YY_RULE_SETUP
4060 #line 603 "psqlscan.l"
4061 {
4062 					yyless(1);
4063 					BEGIN(xuiend);
4064 					ECHO;
4065 				}
4066 	YY_BREAK
4067 case 50:
4068 /* rule 50 can match eol */
4069 YY_RULE_SETUP
4070 #line 608 "psqlscan.l"
4071 {
4072 					ECHO;
4073 				}
4074 	YY_BREAK
4075 case 51:
4076 #line 612 "psqlscan.l"
4077 case 52:
4078 /* rule 52 can match eol */
4079 YY_RULE_SETUP
4080 #line 612 "psqlscan.l"
4081 {
4082 					yyless(0);
4083 					BEGIN(INITIAL);
4084 					ECHO;
4085 				}
4086 	YY_BREAK
4087 case 53:
4088 /* rule 53 can match eol */
4089 YY_RULE_SETUP
4090 #line 617 "psqlscan.l"
4091 {
4092 					BEGIN(INITIAL);
4093 					ECHO;
4094 				}
4095 	YY_BREAK
4096 case 54:
4097 YY_RULE_SETUP
4098 #line 621 "psqlscan.l"
4099 {
4100 					ECHO;
4101 				}
4102 	YY_BREAK
4103 case 55:
4104 /* rule 55 can match eol */
4105 YY_RULE_SETUP
4106 #line 624 "psqlscan.l"
4107 {
4108 					ECHO;
4109 				}
4110 	YY_BREAK
4111 case 56:
4112 YY_RULE_SETUP
4113 #line 628 "psqlscan.l"
4114 {
4115 					/* throw back all but the initial u/U */
4116 					yyless(1);
4117 					ECHO;
4118 				}
4119 	YY_BREAK
4120 case 57:
4121 YY_RULE_SETUP
4122 #line 634 "psqlscan.l"
4123 {
4124 					ECHO;
4125 				}
4126 	YY_BREAK
4127 case 58:
4128 YY_RULE_SETUP
4129 #line 638 "psqlscan.l"
4130 {
4131 					ECHO;
4132 				}
4133 	YY_BREAK
4134 case 59:
4135 YY_RULE_SETUP
4136 #line 642 "psqlscan.l"
4137 {
4138 					ECHO;
4139 				}
4140 	YY_BREAK
4141 case 60:
4142 YY_RULE_SETUP
4143 #line 646 "psqlscan.l"
4144 {
4145 					ECHO;
4146 				}
4147 	YY_BREAK
4148 case 61:
4149 YY_RULE_SETUP
4150 #line 650 "psqlscan.l"
4151 {
4152 					ECHO;
4153 				}
4154 	YY_BREAK
4155 case 62:
4156 YY_RULE_SETUP
4157 #line 654 "psqlscan.l"
4158 {
4159 					ECHO;
4160 				}
4161 	YY_BREAK
4162 case 63:
4163 YY_RULE_SETUP
4164 #line 658 "psqlscan.l"
4165 {
4166 					ECHO;
4167 				}
4168 	YY_BREAK
4169 case 64:
4170 YY_RULE_SETUP
4171 #line 662 "psqlscan.l"
4172 {
4173 					ECHO;
4174 				}
4175 	YY_BREAK
4176 /*
4177 	 * These rules are specific to psql --- they implement parenthesis
4178 	 * counting and detection of command-ending semicolon.  These must
4179 	 * appear before the {self} rule so that they take precedence over it.
4180 	 */
4181 case 65:
4182 YY_RULE_SETUP
4183 #line 672 "psqlscan.l"
4184 {
4185 					cur_state->paren_depth++;
4186 					ECHO;
4187 				}
4188 	YY_BREAK
4189 case 66:
4190 YY_RULE_SETUP
4191 #line 677 "psqlscan.l"
4192 {
4193 					if (cur_state->paren_depth > 0)
4194 						cur_state->paren_depth--;
4195 					ECHO;
4196 				}
4197 	YY_BREAK
4198 case 67:
4199 YY_RULE_SETUP
4200 #line 683 "psqlscan.l"
4201 {
4202 					ECHO;
4203 					if (cur_state->paren_depth == 0)
4204 					{
4205 						/* Terminate lexing temporarily */
4206 						cur_state->start_state = YY_START;
4207 						return LEXRES_SEMI;
4208 					}
4209 				}
4210 	YY_BREAK
4211 /*
4212 	 * psql-specific rules to handle backslash commands and variable
4213 	 * substitution.  We want these before {self}, also.
4214 	 */
4215 case 68:
4216 YY_RULE_SETUP
4217 #line 698 "psqlscan.l"
4218 {
4219 					/* Force a semi-colon or colon into the query buffer */
4220 					psqlscan_emit(cur_state, yytext + 1, 1);
4221 				}
4222 	YY_BREAK
4223 case 69:
4224 YY_RULE_SETUP
4225 #line 703 "psqlscan.l"
4226 {
4227 					/* Terminate lexing temporarily */
4228 					cur_state->start_state = YY_START;
4229 					return LEXRES_BACKSLASH;
4230 				}
4231 	YY_BREAK
4232 case 70:
4233 YY_RULE_SETUP
4234 #line 709 "psqlscan.l"
4235 {
4236 					/* Possible psql variable substitution */
4237 					char	   *varname;
4238 					char	   *value;
4239 
4240 					varname = psqlscan_extract_substring(cur_state,
4241 														 yytext + 1,
4242 														 yyleng - 1);
4243 					if (cur_state->callbacks->get_variable)
4244 						value = cur_state->callbacks->get_variable(varname,
4245 																   PQUOTE_PLAIN,
4246 																   cur_state->cb_passthrough);
4247 					else
4248 						value = NULL;
4249 
4250 					if (value)
4251 					{
4252 						/* It is a variable, check for recursion */
4253 						if (psqlscan_var_is_current_source(cur_state, varname))
4254 						{
4255 							/* Recursive expansion --- don't go there */
4256 							pg_log_warning("skipping recursive expansion of variable \"%s\"",
4257 															  varname);
4258 							/* Instead copy the string as is */
4259 							ECHO;
4260 						}
4261 						else
4262 						{
4263 							/* OK, perform substitution */
4264 							psqlscan_push_new_buffer(cur_state, value, varname);
4265 							/* yy_scan_string already made buffer active */
4266 						}
4267 						free(value);
4268 					}
4269 					else
4270 					{
4271 						/*
4272 						 * if the variable doesn't exist we'll copy the string
4273 						 * as is
4274 						 */
4275 						ECHO;
4276 					}
4277 
4278 					free(varname);
4279 				}
4280 	YY_BREAK
4281 case 71:
4282 YY_RULE_SETUP
4283 #line 755 "psqlscan.l"
4284 {
4285 					psqlscan_escape_variable(cur_state, yytext, yyleng,
4286 											 PQUOTE_SQL_LITERAL);
4287 				}
4288 	YY_BREAK
4289 case 72:
4290 YY_RULE_SETUP
4291 #line 760 "psqlscan.l"
4292 {
4293 					psqlscan_escape_variable(cur_state, yytext, yyleng,
4294 											 PQUOTE_SQL_IDENT);
4295 				}
4296 	YY_BREAK
4297 case 73:
4298 YY_RULE_SETUP
4299 #line 765 "psqlscan.l"
4300 {
4301 					psqlscan_test_variable(cur_state, yytext, yyleng);
4302 				}
4303 	YY_BREAK
4304 /*
4305 	 * These rules just avoid the need for scanner backup if one of the
4306 	 * three rules above fails to match completely.
4307 	 */
4308 case 74:
4309 YY_RULE_SETUP
4310 #line 774 "psqlscan.l"
4311 {
4312 					/* Throw back everything but the colon */
4313 					yyless(1);
4314 					ECHO;
4315 				}
4316 	YY_BREAK
4317 case 75:
4318 YY_RULE_SETUP
4319 #line 780 "psqlscan.l"
4320 {
4321 					/* Throw back everything but the colon */
4322 					yyless(1);
4323 					ECHO;
4324 				}
4325 	YY_BREAK
4326 case 76:
4327 YY_RULE_SETUP
4328 #line 786 "psqlscan.l"
4329 {
4330 					/* Throw back everything but the colon */
4331 					yyless(1);
4332 					ECHO;
4333 				}
4334 	YY_BREAK
4335 case 77:
4336 YY_RULE_SETUP
4337 #line 791 "psqlscan.l"
4338 {
4339 					/* Throw back everything but the colon */
4340 					yyless(1);
4341 					ECHO;
4342 				}
4343 	YY_BREAK
4344 /*
4345 	 * Back to backend-compatible rules.
4346 	 */
4347 case 78:
4348 YY_RULE_SETUP
4349 #line 801 "psqlscan.l"
4350 {
4351 					ECHO;
4352 				}
4353 	YY_BREAK
4354 case 79:
4355 YY_RULE_SETUP
4356 #line 805 "psqlscan.l"
4357 {
4358 					/*
4359 					 * Check for embedded slash-star or dash-dash; those
4360 					 * are comment starts, so operator must stop there.
4361 					 * Note that slash-star or dash-dash at the first
4362 					 * character will match a prior rule, not this one.
4363 					 */
4364 					int			nchars = yyleng;
4365 					char	   *slashstar = strstr(yytext, "/*");
4366 					char	   *dashdash = strstr(yytext, "--");
4367 
4368 					if (slashstar && dashdash)
4369 					{
4370 						/* if both appear, take the first one */
4371 						if (slashstar > dashdash)
4372 							slashstar = dashdash;
4373 					}
4374 					else if (!slashstar)
4375 						slashstar = dashdash;
4376 					if (slashstar)
4377 						nchars = slashstar - yytext;
4378 
4379 					/*
4380 					 * For SQL compatibility, '+' and '-' cannot be the
4381 					 * last char of a multi-char operator unless the operator
4382 					 * contains chars that are not in SQL operators.
4383 					 * The idea is to lex '=-' as two operators, but not
4384 					 * to forbid operator names like '?-' that could not be
4385 					 * sequences of SQL operators.
4386 					 */
4387 					if (nchars > 1 &&
4388 						(yytext[nchars - 1] == '+' ||
4389 						 yytext[nchars - 1] == '-'))
4390 					{
4391 						int			ic;
4392 
4393 						for (ic = nchars - 2; ic >= 0; ic--)
4394 						{
4395 							char c = yytext[ic];
4396 							if (c == '~' || c == '!' || c == '@' ||
4397 								c == '#' || c == '^' || c == '&' ||
4398 								c == '|' || c == '`' || c == '?' ||
4399 								c == '%')
4400 								break;
4401 						}
4402 						if (ic < 0)
4403 						{
4404 							/*
4405 							 * didn't find a qualifying character, so remove
4406 							 * all trailing [+-]
4407 							 */
4408 							do {
4409 								nchars--;
4410 							} while (nchars > 1 &&
4411 								 (yytext[nchars - 1] == '+' ||
4412 								  yytext[nchars - 1] == '-'));
4413 						}
4414 					}
4415 
4416 					if (nchars < yyleng)
4417 					{
4418 						/* Strip the unwanted chars from the token */
4419 						yyless(nchars);
4420 					}
4421 					ECHO;
4422 				}
4423 	YY_BREAK
4424 case 80:
4425 YY_RULE_SETUP
4426 #line 872 "psqlscan.l"
4427 {
4428 					ECHO;
4429 				}
4430 	YY_BREAK
4431 case 81:
4432 YY_RULE_SETUP
4433 #line 876 "psqlscan.l"
4434 {
4435 					ECHO;
4436 				}
4437 	YY_BREAK
4438 case 82:
4439 YY_RULE_SETUP
4440 #line 879 "psqlscan.l"
4441 {
4442 					ECHO;
4443 				}
4444 	YY_BREAK
4445 case 83:
4446 YY_RULE_SETUP
4447 #line 882 "psqlscan.l"
4448 {
4449 					/* throw back the .., and treat as integer */
4450 					yyless(yyleng - 2);
4451 					ECHO;
4452 				}
4453 	YY_BREAK
4454 case 84:
4455 YY_RULE_SETUP
4456 #line 887 "psqlscan.l"
4457 {
4458 					ECHO;
4459 				}
4460 	YY_BREAK
4461 case 85:
4462 YY_RULE_SETUP
4463 #line 890 "psqlscan.l"
4464 {
4465 					/*
4466 					 * throw back the [Ee], and figure out whether what
4467 					 * remains is an {integer} or {decimal}.
4468 					 * (in psql, we don't actually care...)
4469 					 */
4470 					yyless(yyleng - 1);
4471 					ECHO;
4472 				}
4473 	YY_BREAK
4474 case 86:
4475 YY_RULE_SETUP
4476 #line 899 "psqlscan.l"
4477 {
4478 					/* throw back the [Ee][+-], and proceed as above */
4479 					yyless(yyleng - 2);
4480 					ECHO;
4481 				}
4482 	YY_BREAK
4483 case 87:
4484 YY_RULE_SETUP
4485 #line 906 "psqlscan.l"
4486 {
4487 					ECHO;
4488 				}
4489 	YY_BREAK
4490 case 88:
4491 YY_RULE_SETUP
4492 #line 910 "psqlscan.l"
4493 {
4494 					ECHO;
4495 				}
4496 	YY_BREAK
4497 case YY_STATE_EOF(INITIAL):
4498 case YY_STATE_EOF(xb):
4499 case YY_STATE_EOF(xc):
4500 case YY_STATE_EOF(xd):
4501 case YY_STATE_EOF(xh):
4502 case YY_STATE_EOF(xq):
4503 case YY_STATE_EOF(xe):
4504 case YY_STATE_EOF(xdolq):
4505 case YY_STATE_EOF(xui):
4506 case YY_STATE_EOF(xuiend):
4507 case YY_STATE_EOF(xus):
4508 case YY_STATE_EOF(xusend):
4509 #line 914 "psqlscan.l"
4510 {
4511 					if (cur_state->buffer_stack == NULL)
4512 					{
4513 						cur_state->start_state = YY_START;
4514 						return LEXRES_EOL;		/* end of input reached */
4515 					}
4516 
4517 					/*
4518 					 * We were expanding a variable, so pop the inclusion
4519 					 * stack and keep lexing
4520 					 */
4521 					psqlscan_pop_buffer_stack(cur_state);
4522 					psqlscan_select_top_buffer(cur_state);
4523 				}
4524 	YY_BREAK
4525 case 89:
4526 YY_RULE_SETUP
4527 #line 929 "psqlscan.l"
4528 YY_FATAL_ERROR( "flex scanner jammed" );
4529 	YY_BREAK
4530 #line 4531 "psqlscan.c"
4531 
4532 	case YY_END_OF_BUFFER:
4533 		{
4534 		/* Amount of text matched not including the EOB char. */
4535 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
4536 
4537 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
4538 		*yy_cp = yyg->yy_hold_char;
4539 		YY_RESTORE_YY_MORE_OFFSET
4540 
4541 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
4542 			{
4543 			/* We're scanning a new file or input source.  It's
4544 			 * possible that this happened because the user
4545 			 * just pointed yyin at a new source and called
4546 			 * yylex().  If so, then we have to assure
4547 			 * consistency between YY_CURRENT_BUFFER and our
4548 			 * globals.  Here is the right place to do so, because
4549 			 * this is the first action (other than possibly a
4550 			 * back-up) that will match for the new input source.
4551 			 */
4552 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4553 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
4554 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
4555 			}
4556 
4557 		/* Note that here we test for yy_c_buf_p "<=" to the position
4558 		 * of the first EOB in the buffer, since yy_c_buf_p will
4559 		 * already have been incremented past the NUL character
4560 		 * (since all states make transitions on EOB to the
4561 		 * end-of-buffer state).  Contrast this with the test
4562 		 * in input().
4563 		 */
4564 		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
4565 			{ /* This was really a NUL. */
4566 			yy_state_type yy_next_state;
4567 
4568 			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
4569 
4570 			yy_current_state = yy_get_previous_state( yyscanner );
4571 
4572 			/* Okay, we're now positioned to make the NUL
4573 			 * transition.  We couldn't have
4574 			 * yy_get_previous_state() go ahead and do it
4575 			 * for us because it doesn't know how to deal
4576 			 * with the possibility of jamming (and we don't
4577 			 * want to build jamming into it because then it
4578 			 * will run more slowly).
4579 			 */
4580 
4581 			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
4582 
4583 			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4584 
4585 			if ( yy_next_state )
4586 				{
4587 				/* Consume the NUL. */
4588 				yy_cp = ++yyg->yy_c_buf_p;
4589 				yy_current_state = yy_next_state;
4590 				goto yy_match;
4591 				}
4592 
4593 			else
4594 				{
4595 				yy_cp = yyg->yy_c_buf_p;
4596 				goto yy_find_action;
4597 				}
4598 			}
4599 
4600 		else switch ( yy_get_next_buffer( yyscanner ) )
4601 			{
4602 			case EOB_ACT_END_OF_FILE:
4603 				{
4604 				yyg->yy_did_buffer_switch_on_eof = 0;
4605 
4606 				if ( yywrap( yyscanner ) )
4607 					{
4608 					/* Note: because we've taken care in
4609 					 * yy_get_next_buffer() to have set up
4610 					 * yytext, we can now set up
4611 					 * yy_c_buf_p so that if some total
4612 					 * hoser (like flex itself) wants to
4613 					 * call the scanner after we return the
4614 					 * YY_NULL, it'll still work - another
4615 					 * YY_NULL will get returned.
4616 					 */
4617 					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
4618 
4619 					yy_act = YY_STATE_EOF(YY_START);
4620 					goto do_action;
4621 					}
4622 
4623 				else
4624 					{
4625 					if ( ! yyg->yy_did_buffer_switch_on_eof )
4626 						YY_NEW_FILE;
4627 					}
4628 				break;
4629 				}
4630 
4631 			case EOB_ACT_CONTINUE_SCAN:
4632 				yyg->yy_c_buf_p =
4633 					yyg->yytext_ptr + yy_amount_of_matched_text;
4634 
4635 				yy_current_state = yy_get_previous_state( yyscanner );
4636 
4637 				yy_cp = yyg->yy_c_buf_p;
4638 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4639 				goto yy_match;
4640 
4641 			case EOB_ACT_LAST_MATCH:
4642 				yyg->yy_c_buf_p =
4643 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
4644 
4645 				yy_current_state = yy_get_previous_state( yyscanner );
4646 
4647 				yy_cp = yyg->yy_c_buf_p;
4648 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4649 				goto yy_find_action;
4650 			}
4651 		break;
4652 		}
4653 
4654 	default:
4655 		YY_FATAL_ERROR(
4656 			"fatal flex scanner internal error--no action found" );
4657 	} /* end of action switch */
4658 		} /* end of scanning one token */
4659 	} /* end of user's declarations */
4660 } /* end of yylex */
4661 
4662 /* yy_get_next_buffer - try to read in a new buffer
4663  *
4664  * Returns a code representing an action:
4665  *	EOB_ACT_LAST_MATCH -
4666  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
4667  *	EOB_ACT_END_OF_FILE - end of file
4668  */
yy_get_next_buffer(yyscan_t yyscanner)4669 static int yy_get_next_buffer (yyscan_t yyscanner)
4670 {
4671     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4672 	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
4673 	char *source = yyg->yytext_ptr;
4674 	int number_to_move, i;
4675 	int ret_val;
4676 
4677 	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
4678 		YY_FATAL_ERROR(
4679 		"fatal flex scanner internal error--end of buffer missed" );
4680 
4681 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
4682 		{ /* Don't try to fill the buffer, so this is an EOF. */
4683 		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
4684 			{
4685 			/* We matched a single character, the EOB, so
4686 			 * treat this as a final EOF.
4687 			 */
4688 			return EOB_ACT_END_OF_FILE;
4689 			}
4690 
4691 		else
4692 			{
4693 			/* We matched some text prior to the EOB, first
4694 			 * process it.
4695 			 */
4696 			return EOB_ACT_LAST_MATCH;
4697 			}
4698 		}
4699 
4700 	/* Try to read more data. */
4701 
4702 	/* First move last chars to start of buffer. */
4703 	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
4704 
4705 	for ( i = 0; i < number_to_move; ++i )
4706 		*(dest++) = *(source++);
4707 
4708 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
4709 		/* don't do the read, it's not guaranteed to return an EOF,
4710 		 * just force an EOF
4711 		 */
4712 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
4713 
4714 	else
4715 		{
4716 			int num_to_read =
4717 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4718 
4719 		while ( num_to_read <= 0 )
4720 			{ /* Not enough room in the buffer - grow it. */
4721 
4722 			/* just a shorter name for the current buffer */
4723 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
4724 
4725 			int yy_c_buf_p_offset =
4726 				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
4727 
4728 			if ( b->yy_is_our_buffer )
4729 				{
4730 				int new_size = b->yy_buf_size * 2;
4731 
4732 				if ( new_size <= 0 )
4733 					b->yy_buf_size += b->yy_buf_size / 8;
4734 				else
4735 					b->yy_buf_size *= 2;
4736 
4737 				b->yy_ch_buf = (char *)
4738 					/* Include room in for 2 EOB chars. */
4739 					yyrealloc( (void *) b->yy_ch_buf,
4740 							 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
4741 				}
4742 			else
4743 				/* Can't grow it, we don't own it. */
4744 				b->yy_ch_buf = NULL;
4745 
4746 			if ( ! b->yy_ch_buf )
4747 				YY_FATAL_ERROR(
4748 				"fatal error - scanner input buffer overflow" );
4749 
4750 			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
4751 
4752 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
4753 						number_to_move - 1;
4754 
4755 			}
4756 
4757 		if ( num_to_read > YY_READ_BUF_SIZE )
4758 			num_to_read = YY_READ_BUF_SIZE;
4759 
4760 		/* Read in more data. */
4761 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
4762 			yyg->yy_n_chars, num_to_read );
4763 
4764 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4765 		}
4766 
4767 	if ( yyg->yy_n_chars == 0 )
4768 		{
4769 		if ( number_to_move == YY_MORE_ADJ )
4770 			{
4771 			ret_val = EOB_ACT_END_OF_FILE;
4772 			yyrestart( yyin  , yyscanner);
4773 			}
4774 
4775 		else
4776 			{
4777 			ret_val = EOB_ACT_LAST_MATCH;
4778 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
4779 				YY_BUFFER_EOF_PENDING;
4780 			}
4781 		}
4782 
4783 	else
4784 		ret_val = EOB_ACT_CONTINUE_SCAN;
4785 
4786 	if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
4787 		/* Extend the array by 50%, plus the number we really need. */
4788 		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
4789 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
4790 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
4791 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
4792 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
4793 		/* "- 2" to take care of EOB's */
4794 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
4795 	}
4796 
4797 	yyg->yy_n_chars += number_to_move;
4798 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
4799 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
4800 
4801 	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4802 
4803 	return ret_val;
4804 }
4805 
4806 /* yy_get_previous_state - get the state just before the EOB char was reached */
4807 
yy_get_previous_state(yyscan_t yyscanner)4808     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
4809 {
4810 	yy_state_type yy_current_state;
4811 	char *yy_cp;
4812     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4813 
4814 	yy_current_state = yyg->yy_start;
4815 
4816 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
4817 		{
4818 		yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
4819 		}
4820 
4821 	return yy_current_state;
4822 }
4823 
4824 /* yy_try_NUL_trans - try to make a transition on the NUL character
4825  *
4826  * synopsis
4827  *	next_state = yy_try_NUL_trans( current_state );
4828  */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)4829     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
4830 {
4831 	int yy_is_jam;
4832     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
4833 
4834 	yy_current_state = yy_nxt[yy_current_state][1];
4835 	yy_is_jam = (yy_current_state <= 0);
4836 
4837 	(void)yyg;
4838 	return yy_is_jam ? 0 : yy_current_state;
4839 }
4840 
4841 #ifndef YY_NO_UNPUT
4842 
4843 #endif
4844 
4845 #ifndef YY_NO_INPUT
4846 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)4847     static int yyinput (yyscan_t yyscanner)
4848 #else
4849     static int input  (yyscan_t yyscanner)
4850 #endif
4851 
4852 {
4853 	int c;
4854     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4855 
4856 	*yyg->yy_c_buf_p = yyg->yy_hold_char;
4857 
4858 	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
4859 		{
4860 		/* yy_c_buf_p now points to the character we want to return.
4861 		 * If this occurs *before* the EOB characters, then it's a
4862 		 * valid NUL; if not, then we've hit the end of the buffer.
4863 		 */
4864 		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
4865 			/* This was really a NUL. */
4866 			*yyg->yy_c_buf_p = '\0';
4867 
4868 		else
4869 			{ /* need more input */
4870 			int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
4871 			++yyg->yy_c_buf_p;
4872 
4873 			switch ( yy_get_next_buffer( yyscanner ) )
4874 				{
4875 				case EOB_ACT_LAST_MATCH:
4876 					/* This happens because yy_g_n_b()
4877 					 * sees that we've accumulated a
4878 					 * token and flags that we need to
4879 					 * try matching the token before
4880 					 * proceeding.  But for input(),
4881 					 * there's no matching to consider.
4882 					 * So convert the EOB_ACT_LAST_MATCH
4883 					 * to EOB_ACT_END_OF_FILE.
4884 					 */
4885 
4886 					/* Reset buffer status. */
4887 					yyrestart( yyin , yyscanner);
4888 
4889 					/*FALLTHROUGH*/
4890 
4891 				case EOB_ACT_END_OF_FILE:
4892 					{
4893 					if ( yywrap( yyscanner ) )
4894 						return 0;
4895 
4896 					if ( ! yyg->yy_did_buffer_switch_on_eof )
4897 						YY_NEW_FILE;
4898 #ifdef __cplusplus
4899 					return yyinput(yyscanner);
4900 #else
4901 					return input(yyscanner);
4902 #endif
4903 					}
4904 
4905 				case EOB_ACT_CONTINUE_SCAN:
4906 					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
4907 					break;
4908 				}
4909 			}
4910 		}
4911 
4912 	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
4913 	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
4914 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
4915 
4916 	return c;
4917 }
4918 #endif	/* ifndef YY_NO_INPUT */
4919 
4920 /** Immediately switch to a different input stream.
4921  * @param input_file A readable stream.
4922  * @param yyscanner The scanner object.
4923  * @note This function does not reset the start condition to @c INITIAL .
4924  */
yyrestart(FILE * input_file,yyscan_t yyscanner)4925     void yyrestart  (FILE * input_file , yyscan_t yyscanner)
4926 {
4927     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4928 
4929 	if ( ! YY_CURRENT_BUFFER ){
4930         yyensure_buffer_stack (yyscanner);
4931 		YY_CURRENT_BUFFER_LVALUE =
4932             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
4933 	}
4934 
4935 	yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
4936 	yy_load_buffer_state( yyscanner );
4937 }
4938 
4939 /** Switch to a different input buffer.
4940  * @param new_buffer The new input buffer.
4941  * @param yyscanner The scanner object.
4942  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)4943     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
4944 {
4945     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4946 
4947 	/* TODO. We should be able to replace this entire function body
4948 	 * with
4949 	 *		yypop_buffer_state();
4950 	 *		yypush_buffer_state(new_buffer);
4951      */
4952 	yyensure_buffer_stack (yyscanner);
4953 	if ( YY_CURRENT_BUFFER == new_buffer )
4954 		return;
4955 
4956 	if ( YY_CURRENT_BUFFER )
4957 		{
4958 		/* Flush out information for old buffer. */
4959 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
4960 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
4961 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4962 		}
4963 
4964 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
4965 	yy_load_buffer_state( yyscanner );
4966 
4967 	/* We don't actually know whether we did this switch during
4968 	 * EOF (yywrap()) processing, but the only time this flag
4969 	 * is looked at is after yywrap() is called, so it's safe
4970 	 * to go ahead and always set it.
4971 	 */
4972 	yyg->yy_did_buffer_switch_on_eof = 1;
4973 }
4974 
yy_load_buffer_state(yyscan_t yyscanner)4975 static void yy_load_buffer_state  (yyscan_t yyscanner)
4976 {
4977     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4978 	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4979 	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
4980 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
4981 	yyg->yy_hold_char = *yyg->yy_c_buf_p;
4982 }
4983 
4984 /** Allocate and initialize an input buffer state.
4985  * @param file A readable stream.
4986  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
4987  * @param yyscanner The scanner object.
4988  * @return the allocated buffer state.
4989  */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)4990     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
4991 {
4992 	YY_BUFFER_STATE b;
4993 
4994 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
4995 	if ( ! b )
4996 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
4997 
4998 	b->yy_buf_size = size;
4999 
5000 	/* yy_ch_buf has to be 2 characters longer than the size given because
5001 	 * we need to put in 2 end-of-buffer characters.
5002 	 */
5003 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
5004 	if ( ! b->yy_ch_buf )
5005 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5006 
5007 	b->yy_is_our_buffer = 1;
5008 
5009 	yy_init_buffer( b, file , yyscanner);
5010 
5011 	return b;
5012 }
5013 
5014 /** Destroy the buffer.
5015  * @param b a buffer created with yy_create_buffer()
5016  * @param yyscanner The scanner object.
5017  */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)5018     void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
5019 {
5020     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5021 
5022 	if ( ! b )
5023 		return;
5024 
5025 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
5026 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
5027 
5028 	if ( b->yy_is_our_buffer )
5029 		yyfree( (void *) b->yy_ch_buf , yyscanner );
5030 
5031 	yyfree( (void *) b , yyscanner );
5032 }
5033 
5034 /* Initializes or reinitializes a buffer.
5035  * This function is sometimes called more than once on the same buffer,
5036  * such as during a yyrestart() or at EOF.
5037  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)5038     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
5039 
5040 {
5041 	int oerrno = errno;
5042     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5043 
5044 	yy_flush_buffer( b , yyscanner);
5045 
5046 	b->yy_input_file = file;
5047 	b->yy_fill_buffer = 1;
5048 
5049     /* If b is the current buffer, then yy_init_buffer was _probably_
5050      * called from yyrestart() or through yy_get_next_buffer.
5051      * In that case, we don't want to reset the lineno or column.
5052      */
5053     if (b != YY_CURRENT_BUFFER){
5054         b->yy_bs_lineno = 1;
5055         b->yy_bs_column = 0;
5056     }
5057 
5058         b->yy_is_interactive = 0;
5059 
5060 	errno = oerrno;
5061 }
5062 
5063 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
5064  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
5065  * @param yyscanner The scanner object.
5066  */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)5067     void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
5068 {
5069     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5070 	if ( ! b )
5071 		return;
5072 
5073 	b->yy_n_chars = 0;
5074 
5075 	/* We always need two end-of-buffer characters.  The first causes
5076 	 * a transition to the end-of-buffer state.  The second causes
5077 	 * a jam in that state.
5078 	 */
5079 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
5080 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
5081 
5082 	b->yy_buf_pos = &b->yy_ch_buf[0];
5083 
5084 	b->yy_at_bol = 1;
5085 	b->yy_buffer_status = YY_BUFFER_NEW;
5086 
5087 	if ( b == YY_CURRENT_BUFFER )
5088 		yy_load_buffer_state( yyscanner );
5089 }
5090 
5091 /** Pushes the new state onto the stack. The new state becomes
5092  *  the current state. This function will allocate the stack
5093  *  if necessary.
5094  *  @param new_buffer The new state.
5095  *  @param yyscanner The scanner object.
5096  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)5097 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
5098 {
5099     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5100 	if (new_buffer == NULL)
5101 		return;
5102 
5103 	yyensure_buffer_stack(yyscanner);
5104 
5105 	/* This block is copied from yy_switch_to_buffer. */
5106 	if ( YY_CURRENT_BUFFER )
5107 		{
5108 		/* Flush out information for old buffer. */
5109 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
5110 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
5111 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
5112 		}
5113 
5114 	/* Only push if top exists. Otherwise, replace top. */
5115 	if (YY_CURRENT_BUFFER)
5116 		yyg->yy_buffer_stack_top++;
5117 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
5118 
5119 	/* copied from yy_switch_to_buffer. */
5120 	yy_load_buffer_state( yyscanner );
5121 	yyg->yy_did_buffer_switch_on_eof = 1;
5122 }
5123 
5124 /** Removes and deletes the top of the stack, if present.
5125  *  The next element becomes the new top.
5126  *  @param yyscanner The scanner object.
5127  */
yypop_buffer_state(yyscan_t yyscanner)5128 void yypop_buffer_state (yyscan_t yyscanner)
5129 {
5130     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5131 	if (!YY_CURRENT_BUFFER)
5132 		return;
5133 
5134 	yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
5135 	YY_CURRENT_BUFFER_LVALUE = NULL;
5136 	if (yyg->yy_buffer_stack_top > 0)
5137 		--yyg->yy_buffer_stack_top;
5138 
5139 	if (YY_CURRENT_BUFFER) {
5140 		yy_load_buffer_state( yyscanner );
5141 		yyg->yy_did_buffer_switch_on_eof = 1;
5142 	}
5143 }
5144 
5145 /* Allocates the stack if it does not exist.
5146  *  Guarantees space for at least one push.
5147  */
yyensure_buffer_stack(yyscan_t yyscanner)5148 static void yyensure_buffer_stack (yyscan_t yyscanner)
5149 {
5150 	yy_size_t num_to_alloc;
5151     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5152 
5153 	if (!yyg->yy_buffer_stack) {
5154 
5155 		/* First allocation is just for 2 elements, since we don't know if this
5156 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
5157 		 * immediate realloc on the next call.
5158          */
5159       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
5160 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
5161 								(num_to_alloc * sizeof(struct yy_buffer_state*)
5162 								, yyscanner);
5163 		if ( ! yyg->yy_buffer_stack )
5164 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
5165 
5166 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
5167 
5168 		yyg->yy_buffer_stack_max = num_to_alloc;
5169 		yyg->yy_buffer_stack_top = 0;
5170 		return;
5171 	}
5172 
5173 	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
5174 
5175 		/* Increase the buffer to prepare for a possible push. */
5176 		yy_size_t grow_size = 8 /* arbitrary grow size */;
5177 
5178 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
5179 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
5180 								(yyg->yy_buffer_stack,
5181 								num_to_alloc * sizeof(struct yy_buffer_state*)
5182 								, yyscanner);
5183 		if ( ! yyg->yy_buffer_stack )
5184 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
5185 
5186 		/* zero only the new slots.*/
5187 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
5188 		yyg->yy_buffer_stack_max = num_to_alloc;
5189 	}
5190 }
5191 
5192 /** Setup the input buffer state to scan directly from a user-specified character buffer.
5193  * @param base the character buffer
5194  * @param size the size in bytes of the character buffer
5195  * @param yyscanner The scanner object.
5196  * @return the newly allocated buffer state object.
5197  */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)5198 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
5199 {
5200 	YY_BUFFER_STATE b;
5201 
5202 	if ( size < 2 ||
5203 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
5204 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
5205 		/* They forgot to leave room for the EOB's. */
5206 		return NULL;
5207 
5208 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
5209 	if ( ! b )
5210 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
5211 
5212 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
5213 	b->yy_buf_pos = b->yy_ch_buf = base;
5214 	b->yy_is_our_buffer = 0;
5215 	b->yy_input_file = NULL;
5216 	b->yy_n_chars = b->yy_buf_size;
5217 	b->yy_is_interactive = 0;
5218 	b->yy_at_bol = 1;
5219 	b->yy_fill_buffer = 0;
5220 	b->yy_buffer_status = YY_BUFFER_NEW;
5221 
5222 	yy_switch_to_buffer( b , yyscanner );
5223 
5224 	return b;
5225 }
5226 
5227 /** Setup the input buffer state to scan a string. The next call to yylex() will
5228  * scan from a @e copy of @a str.
5229  * @param yystr a NUL-terminated string to scan
5230  * @param yyscanner The scanner object.
5231  * @return the newly allocated buffer state object.
5232  * @note If you want to scan bytes that may contain NUL values, then use
5233  *       yy_scan_bytes() instead.
5234  */
yy_scan_string(const char * yystr,yyscan_t yyscanner)5235 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
5236 {
5237 
5238 	return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
5239 }
5240 
5241 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
5242  * scan from a @e copy of @a bytes.
5243  * @param yybytes the byte buffer to scan
5244  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
5245  * @param yyscanner The scanner object.
5246  * @return the newly allocated buffer state object.
5247  */
yy_scan_bytes(const char * yybytes,int _yybytes_len,yyscan_t yyscanner)5248 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
5249 {
5250 	YY_BUFFER_STATE b;
5251 	char *buf;
5252 	yy_size_t n;
5253 	int i;
5254 
5255 	/* Get memory for full buffer, including space for trailing EOB's. */
5256 	n = (yy_size_t) (_yybytes_len + 2);
5257 	buf = (char *) yyalloc( n , yyscanner );
5258 	if ( ! buf )
5259 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5260 
5261 	for ( i = 0; i < _yybytes_len; ++i )
5262 		buf[i] = yybytes[i];
5263 
5264 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
5265 
5266 	b = yy_scan_buffer( buf, n , yyscanner);
5267 	if ( ! b )
5268 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
5269 
5270 	/* It's okay to grow etc. this buffer, and we should throw it
5271 	 * away when we're done.
5272 	 */
5273 	b->yy_is_our_buffer = 1;
5274 
5275 	return b;
5276 }
5277 
5278 #ifndef YY_EXIT_FAILURE
5279 #define YY_EXIT_FAILURE 2
5280 #endif
5281 
yy_fatal_error(const char * msg,yyscan_t yyscanner)5282 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
5283 {
5284 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5285 	(void)yyg;
5286 	fprintf( stderr, "%s\n", msg );
5287 	exit( YY_EXIT_FAILURE );
5288 }
5289 
5290 /* Redefine yyless() so it works in section 3 code. */
5291 
5292 #undef yyless
5293 #define yyless(n) \
5294 	do \
5295 		{ \
5296 		/* Undo effects of setting up yytext. */ \
5297         int yyless_macro_arg = (n); \
5298         YY_LESS_LINENO(yyless_macro_arg);\
5299 		yytext[yyleng] = yyg->yy_hold_char; \
5300 		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
5301 		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
5302 		*yyg->yy_c_buf_p = '\0'; \
5303 		yyleng = yyless_macro_arg; \
5304 		} \
5305 	while ( 0 )
5306 
5307 /* Accessor  methods (get/set functions) to struct members. */
5308 
5309 /** Get the user-defined data for this scanner.
5310  * @param yyscanner The scanner object.
5311  */
yyget_extra(yyscan_t yyscanner)5312 YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
5313 {
5314     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5315     return yyextra;
5316 }
5317 
5318 /** Get the current line number.
5319  * @param yyscanner The scanner object.
5320  */
yyget_lineno(yyscan_t yyscanner)5321 int yyget_lineno  (yyscan_t yyscanner)
5322 {
5323     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5324 
5325         if (! YY_CURRENT_BUFFER)
5326             return 0;
5327 
5328     return yylineno;
5329 }
5330 
5331 /** Get the current column number.
5332  * @param yyscanner The scanner object.
5333  */
yyget_column(yyscan_t yyscanner)5334 int yyget_column  (yyscan_t yyscanner)
5335 {
5336     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5337 
5338         if (! YY_CURRENT_BUFFER)
5339             return 0;
5340 
5341     return yycolumn;
5342 }
5343 
5344 /** Get the input stream.
5345  * @param yyscanner The scanner object.
5346  */
yyget_in(yyscan_t yyscanner)5347 FILE *yyget_in  (yyscan_t yyscanner)
5348 {
5349     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5350     return yyin;
5351 }
5352 
5353 /** Get the output stream.
5354  * @param yyscanner The scanner object.
5355  */
yyget_out(yyscan_t yyscanner)5356 FILE *yyget_out  (yyscan_t yyscanner)
5357 {
5358     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5359     return yyout;
5360 }
5361 
5362 /** Get the length of the current token.
5363  * @param yyscanner The scanner object.
5364  */
yyget_leng(yyscan_t yyscanner)5365 int yyget_leng  (yyscan_t yyscanner)
5366 {
5367     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5368     return yyleng;
5369 }
5370 
5371 /** Get the current token.
5372  * @param yyscanner The scanner object.
5373  */
5374 
yyget_text(yyscan_t yyscanner)5375 char *yyget_text  (yyscan_t yyscanner)
5376 {
5377     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5378     return yytext;
5379 }
5380 
5381 /** Set the user-defined data. This data is never touched by the scanner.
5382  * @param user_defined The data to be associated with this scanner.
5383  * @param yyscanner The scanner object.
5384  */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)5385 void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
5386 {
5387     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5388     yyextra = user_defined ;
5389 }
5390 
5391 /** Set the current line number.
5392  * @param _line_number line number
5393  * @param yyscanner The scanner object.
5394  */
yyset_lineno(int _line_number,yyscan_t yyscanner)5395 void yyset_lineno (int  _line_number , yyscan_t yyscanner)
5396 {
5397     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5398 
5399         /* lineno is only valid if an input buffer exists. */
5400         if (! YY_CURRENT_BUFFER )
5401            YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
5402 
5403     yylineno = _line_number;
5404 }
5405 
5406 /** Set the current column.
5407  * @param _column_no column number
5408  * @param yyscanner The scanner object.
5409  */
yyset_column(int _column_no,yyscan_t yyscanner)5410 void yyset_column (int  _column_no , yyscan_t yyscanner)
5411 {
5412     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5413 
5414         /* column is only valid if an input buffer exists. */
5415         if (! YY_CURRENT_BUFFER )
5416            YY_FATAL_ERROR( "yyset_column called with no buffer" );
5417 
5418     yycolumn = _column_no;
5419 }
5420 
5421 /** Set the input stream. This does not discard the current
5422  * input buffer.
5423  * @param _in_str A readable stream.
5424  * @param yyscanner The scanner object.
5425  * @see yy_switch_to_buffer
5426  */
yyset_in(FILE * _in_str,yyscan_t yyscanner)5427 void yyset_in (FILE *  _in_str , yyscan_t yyscanner)
5428 {
5429     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5430     yyin = _in_str ;
5431 }
5432 
yyset_out(FILE * _out_str,yyscan_t yyscanner)5433 void yyset_out (FILE *  _out_str , yyscan_t yyscanner)
5434 {
5435     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5436     yyout = _out_str ;
5437 }
5438 
yyget_debug(yyscan_t yyscanner)5439 int yyget_debug  (yyscan_t yyscanner)
5440 {
5441     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5442     return yy_flex_debug;
5443 }
5444 
yyset_debug(int _bdebug,yyscan_t yyscanner)5445 void yyset_debug (int  _bdebug , yyscan_t yyscanner)
5446 {
5447     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5448     yy_flex_debug = _bdebug ;
5449 }
5450 
5451 /* Accessor methods for yylval and yylloc */
5452 
yyget_lval(yyscan_t yyscanner)5453 YYSTYPE * yyget_lval  (yyscan_t yyscanner)
5454 {
5455     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5456     return yylval;
5457 }
5458 
yyset_lval(YYSTYPE * yylval_param,yyscan_t yyscanner)5459 void yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
5460 {
5461     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5462     yylval = yylval_param;
5463 }
5464 
5465 /* User-visible API */
5466 
5467 /* yylex_init is special because it creates the scanner itself, so it is
5468  * the ONLY reentrant function that doesn't take the scanner as the last argument.
5469  * That's why we explicitly handle the declaration, instead of using our macros.
5470  */
yylex_init(yyscan_t * ptr_yy_globals)5471 int yylex_init(yyscan_t* ptr_yy_globals)
5472 {
5473     if (ptr_yy_globals == NULL){
5474         errno = EINVAL;
5475         return 1;
5476     }
5477 
5478     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
5479 
5480     if (*ptr_yy_globals == NULL){
5481         errno = ENOMEM;
5482         return 1;
5483     }
5484 
5485     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
5486     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
5487 
5488     return yy_init_globals ( *ptr_yy_globals );
5489 }
5490 
5491 /* yylex_init_extra has the same functionality as yylex_init, but follows the
5492  * convention of taking the scanner as the last argument. Note however, that
5493  * this is a *pointer* to a scanner, as it will be allocated by this call (and
5494  * is the reason, too, why this function also must handle its own declaration).
5495  * The user defined value in the first argument will be available to yyalloc in
5496  * the yyextra field.
5497  */
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)5498 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
5499 {
5500     struct yyguts_t dummy_yyguts;
5501 
5502     yyset_extra (yy_user_defined, &dummy_yyguts);
5503 
5504     if (ptr_yy_globals == NULL){
5505         errno = EINVAL;
5506         return 1;
5507     }
5508 
5509     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
5510 
5511     if (*ptr_yy_globals == NULL){
5512         errno = ENOMEM;
5513         return 1;
5514     }
5515 
5516     /* By setting to 0xAA, we expose bugs in
5517     yy_init_globals. Leave at 0x00 for releases. */
5518     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
5519 
5520     yyset_extra (yy_user_defined, *ptr_yy_globals);
5521 
5522     return yy_init_globals ( *ptr_yy_globals );
5523 }
5524 
yy_init_globals(yyscan_t yyscanner)5525 static int yy_init_globals (yyscan_t yyscanner)
5526 {
5527     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5528     /* Initialization is the same as for the non-reentrant scanner.
5529      * This function is called from yylex_destroy(), so don't allocate here.
5530      */
5531 
5532     yyg->yy_buffer_stack = NULL;
5533     yyg->yy_buffer_stack_top = 0;
5534     yyg->yy_buffer_stack_max = 0;
5535     yyg->yy_c_buf_p = NULL;
5536     yyg->yy_init = 0;
5537     yyg->yy_start = 0;
5538 
5539     yyg->yy_start_stack_ptr = 0;
5540     yyg->yy_start_stack_depth = 0;
5541     yyg->yy_start_stack =  NULL;
5542 
5543 /* Defined in main.c */
5544 #ifdef YY_STDINIT
5545     yyin = stdin;
5546     yyout = stdout;
5547 #else
5548     yyin = NULL;
5549     yyout = NULL;
5550 #endif
5551 
5552     /* For future reference: Set errno on error, since we are called by
5553      * yylex_init()
5554      */
5555     return 0;
5556 }
5557 
5558 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)5559 int yylex_destroy  (yyscan_t yyscanner)
5560 {
5561     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5562 
5563     /* Pop the buffer stack, destroying each element. */
5564 	while(YY_CURRENT_BUFFER){
5565 		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
5566 		YY_CURRENT_BUFFER_LVALUE = NULL;
5567 		yypop_buffer_state(yyscanner);
5568 	}
5569 
5570 	/* Destroy the stack itself. */
5571 	yyfree(yyg->yy_buffer_stack , yyscanner);
5572 	yyg->yy_buffer_stack = NULL;
5573 
5574     /* Destroy the start condition stack. */
5575         yyfree( yyg->yy_start_stack , yyscanner );
5576         yyg->yy_start_stack = NULL;
5577 
5578     /* Reset the globals. This is important in a non-reentrant scanner so the next time
5579      * yylex() is called, initialization will occur. */
5580     yy_init_globals( yyscanner);
5581 
5582     /* Destroy the main struct (reentrant only). */
5583     yyfree ( yyscanner , yyscanner );
5584     yyscanner = NULL;
5585     return 0;
5586 }
5587 
5588 /*
5589  * Internal utility routines.
5590  */
5591 
5592 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n,yyscan_t yyscanner)5593 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
5594 {
5595 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5596 	(void)yyg;
5597 
5598 	int i;
5599 	for ( i = 0; i < n; ++i )
5600 		s1[i] = s2[i];
5601 }
5602 #endif
5603 
5604 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s,yyscan_t yyscanner)5605 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
5606 {
5607 	int n;
5608 	for ( n = 0; s[n]; ++n )
5609 		;
5610 
5611 	return n;
5612 }
5613 #endif
5614 
yyalloc(yy_size_t size,yyscan_t yyscanner)5615 void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
5616 {
5617 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5618 	(void)yyg;
5619 	return malloc(size);
5620 }
5621 
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)5622 void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
5623 {
5624 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5625 	(void)yyg;
5626 
5627 	/* The cast to (char *) in the following accommodates both
5628 	 * implementations that use char* generic pointers, and those
5629 	 * that use void* generic pointers.  It works with the latter
5630 	 * because both ANSI C and C++ allow castless assignment from
5631 	 * any pointer type to void*, and deal with argument conversions
5632 	 * as though doing an assignment.
5633 	 */
5634 	return realloc(ptr, size);
5635 }
5636 
yyfree(void * ptr,yyscan_t yyscanner)5637 void yyfree (void * ptr , yyscan_t yyscanner)
5638 {
5639 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5640 	(void)yyg;
5641 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
5642 }
5643 
5644 #define YYTABLES_NAME "yytables"
5645 
5646 #line 929 "psqlscan.l"
5647 
5648 
5649 /* LCOV_EXCL_STOP */
5650 
5651 /*
5652  * Create a lexer working state struct.
5653  *
5654  * callbacks is a struct of function pointers that encapsulate some
5655  * behavior we need from the surrounding program.  This struct must
5656  * remain valid for the lifespan of the PsqlScanState.
5657  */
5658 PsqlScanState
psql_scan_create(const PsqlScanCallbacks * callbacks)5659 psql_scan_create(const PsqlScanCallbacks *callbacks)
5660 {
5661 	PsqlScanState state;
5662 
5663 	state = (PsqlScanStateData *) pg_malloc0(sizeof(PsqlScanStateData));
5664 
5665 	state->callbacks = callbacks;
5666 
5667 	yylex_init(&state->scanner);
5668 
5669 	yyset_extra(state, state->scanner);
5670 
5671 	psql_scan_reset(state);
5672 
5673 	return state;
5674 }
5675 
5676 /*
5677  * Destroy a lexer working state struct, releasing all resources.
5678  */
5679 void
psql_scan_destroy(PsqlScanState state)5680 psql_scan_destroy(PsqlScanState state)
5681 {
5682 	psql_scan_finish(state);
5683 
5684 	psql_scan_reset(state);
5685 
5686 	yylex_destroy(state->scanner);
5687 
5688 	free(state);
5689 }
5690 
5691 /*
5692  * Set the callback passthrough pointer for the lexer.
5693  *
5694  * This could have been integrated into psql_scan_create, but keeping it
5695  * separate allows the application to change the pointer later, which might
5696  * be useful.
5697  */
5698 void
psql_scan_set_passthrough(PsqlScanState state,void * passthrough)5699 psql_scan_set_passthrough(PsqlScanState state, void *passthrough)
5700 {
5701 	state->cb_passthrough = passthrough;
5702 }
5703 
5704 /*
5705  * Set up to perform lexing of the given input line.
5706  *
5707  * The text at *line, extending for line_len bytes, will be scanned by
5708  * subsequent calls to the psql_scan routines.  psql_scan_finish should
5709  * be called when scanning is complete.  Note that the lexer retains
5710  * a pointer to the storage at *line --- this string must not be altered
5711  * or freed until after psql_scan_finish is called.
5712  *
5713  * encoding is the libpq identifier for the character encoding in use,
5714  * and std_strings says whether standard_conforming_strings is on.
5715  */
5716 void
psql_scan_setup(PsqlScanState state,const char * line,int line_len,int encoding,bool std_strings)5717 psql_scan_setup(PsqlScanState state,
5718 				const char *line, int line_len,
5719 				int encoding, bool std_strings)
5720 {
5721 	/* Mustn't be scanning already */
5722 	Assert(state->scanbufhandle == NULL);
5723 	Assert(state->buffer_stack == NULL);
5724 
5725 	/* Do we need to hack the character set encoding? */
5726 	state->encoding = encoding;
5727 	state->safe_encoding = pg_valid_server_encoding_id(encoding);
5728 
5729 	/* Save standard-strings flag as well */
5730 	state->std_strings = std_strings;
5731 
5732 	/* Set up flex input buffer with appropriate translation and padding */
5733 	state->scanbufhandle = psqlscan_prepare_buffer(state, line, line_len,
5734 												   &state->scanbuf);
5735 	state->scanline = line;
5736 
5737 	/* Set lookaside data in case we have to map unsafe encoding */
5738 	state->curline = state->scanbuf;
5739 	state->refline = state->scanline;
5740 }
5741 
5742 /*
5743  * Do lexical analysis of SQL command text.
5744  *
5745  * The text previously passed to psql_scan_setup is scanned, and appended
5746  * (possibly with transformation) to query_buf.
5747  *
5748  * The return value indicates the condition that stopped scanning:
5749  *
5750  * PSCAN_SEMICOLON: found a command-ending semicolon.  (The semicolon is
5751  * transferred to query_buf.)  The command accumulated in query_buf should
5752  * be executed, then clear query_buf and call again to scan the remainder
5753  * of the line.
5754  *
5755  * PSCAN_BACKSLASH: found a backslash that starts a special command.
5756  * Any previous data on the line has been transferred to query_buf.
5757  * The caller will typically next apply a separate flex lexer to scan
5758  * the special command.
5759  *
5760  * PSCAN_INCOMPLETE: the end of the line was reached, but we have an
5761  * incomplete SQL command.  *prompt is set to the appropriate prompt type.
5762  *
5763  * PSCAN_EOL: the end of the line was reached, and there is no lexical
5764  * reason to consider the command incomplete.  The caller may or may not
5765  * choose to send it.  *prompt is set to the appropriate prompt type if
5766  * the caller chooses to collect more input.
5767  *
5768  * In the PSCAN_INCOMPLETE and PSCAN_EOL cases, psql_scan_finish() should
5769  * be called next, then the cycle may be repeated with a fresh input line.
5770  *
5771  * In all cases, *prompt is set to an appropriate prompt type code for the
5772  * next line-input operation.
5773  */
5774 PsqlScanResult
psql_scan(PsqlScanState state,PQExpBuffer query_buf,promptStatus_t * prompt)5775 psql_scan(PsqlScanState state,
5776 		  PQExpBuffer query_buf,
5777 		  promptStatus_t *prompt)
5778 {
5779 	PsqlScanResult result;
5780 	int			lexresult;
5781 
5782 	/* Must be scanning already */
5783 	Assert(state->scanbufhandle != NULL);
5784 
5785 	/* Set current output target */
5786 	state->output_buf = query_buf;
5787 
5788 	/* Set input source */
5789 	if (state->buffer_stack != NULL)
5790 		yy_switch_to_buffer(state->buffer_stack->buf, state->scanner);
5791 	else
5792 		yy_switch_to_buffer(state->scanbufhandle, state->scanner);
5793 
5794 	/* And lex. */
5795 	lexresult = yylex(NULL, state->scanner);
5796 
5797 	/*
5798 	 * Check termination state and return appropriate result info.
5799 	 */
5800 	switch (lexresult)
5801 	{
5802 		case LEXRES_EOL:		/* end of input */
5803 			switch (state->start_state)
5804 			{
5805 				case INITIAL:
5806 				case xuiend:	/* we treat these like INITIAL */
5807 				case xusend:
5808 					if (state->paren_depth > 0)
5809 					{
5810 						result = PSCAN_INCOMPLETE;
5811 						*prompt = PROMPT_PAREN;
5812 					}
5813 					else if (query_buf->len > 0)
5814 					{
5815 						result = PSCAN_EOL;
5816 						*prompt = PROMPT_CONTINUE;
5817 					}
5818 					else
5819 					{
5820 						/* never bother to send an empty buffer */
5821 						result = PSCAN_INCOMPLETE;
5822 						*prompt = PROMPT_READY;
5823 					}
5824 					break;
5825 				case xb:
5826 					result = PSCAN_INCOMPLETE;
5827 					*prompt = PROMPT_SINGLEQUOTE;
5828 					break;
5829 				case xc:
5830 					result = PSCAN_INCOMPLETE;
5831 					*prompt = PROMPT_COMMENT;
5832 					break;
5833 				case xd:
5834 					result = PSCAN_INCOMPLETE;
5835 					*prompt = PROMPT_DOUBLEQUOTE;
5836 					break;
5837 				case xh:
5838 					result = PSCAN_INCOMPLETE;
5839 					*prompt = PROMPT_SINGLEQUOTE;
5840 					break;
5841 				case xe:
5842 					result = PSCAN_INCOMPLETE;
5843 					*prompt = PROMPT_SINGLEQUOTE;
5844 					break;
5845 				case xq:
5846 					result = PSCAN_INCOMPLETE;
5847 					*prompt = PROMPT_SINGLEQUOTE;
5848 					break;
5849 				case xdolq:
5850 					result = PSCAN_INCOMPLETE;
5851 					*prompt = PROMPT_DOLLARQUOTE;
5852 					break;
5853 				case xui:
5854 					result = PSCAN_INCOMPLETE;
5855 					*prompt = PROMPT_DOUBLEQUOTE;
5856 					break;
5857 				case xus:
5858 					result = PSCAN_INCOMPLETE;
5859 					*prompt = PROMPT_SINGLEQUOTE;
5860 					break;
5861 				default:
5862 					/* can't get here */
5863 					fprintf(stderr, "invalid YY_START\n");
5864 					exit(1);
5865 			}
5866 			break;
5867 		case LEXRES_SEMI:		/* semicolon */
5868 			result = PSCAN_SEMICOLON;
5869 			*prompt = PROMPT_READY;
5870 			break;
5871 		case LEXRES_BACKSLASH:	/* backslash */
5872 			result = PSCAN_BACKSLASH;
5873 			*prompt = PROMPT_READY;
5874 			break;
5875 		default:
5876 			/* can't get here */
5877 			fprintf(stderr, "invalid yylex result\n");
5878 			exit(1);
5879 	}
5880 
5881 	return result;
5882 }
5883 
5884 /*
5885  * Clean up after scanning a string.  This flushes any unread input and
5886  * releases resources (but not the PsqlScanState itself).  Note however
5887  * that this does not reset the lexer scan state; that can be done by
5888  * psql_scan_reset(), which is an orthogonal operation.
5889  *
5890  * It is legal to call this when not scanning anything (makes it easier
5891  * to deal with error recovery).
5892  */
5893 void
psql_scan_finish(PsqlScanState state)5894 psql_scan_finish(PsqlScanState state)
5895 {
5896 	/* Drop any incomplete variable expansions. */
5897 	while (state->buffer_stack != NULL)
5898 		psqlscan_pop_buffer_stack(state);
5899 
5900 	/* Done with the outer scan buffer, too */
5901 	if (state->scanbufhandle)
5902 		yy_delete_buffer(state->scanbufhandle, state->scanner);
5903 	state->scanbufhandle = NULL;
5904 	if (state->scanbuf)
5905 		free(state->scanbuf);
5906 	state->scanbuf = NULL;
5907 }
5908 
5909 /*
5910  * Reset lexer scanning state to start conditions.  This is appropriate
5911  * for executing \r psql commands (or any other time that we discard the
5912  * prior contents of query_buf).  It is not, however, necessary to do this
5913  * when we execute and clear the buffer after getting a PSCAN_SEMICOLON or
5914  * PSCAN_EOL scan result, because the scan state must be INITIAL when those
5915  * conditions are returned.
5916  *
5917  * Note that this is unrelated to flushing unread input; that task is
5918  * done by psql_scan_finish().
5919  */
5920 void
psql_scan_reset(PsqlScanState state)5921 psql_scan_reset(PsqlScanState state)
5922 {
5923 	state->start_state = INITIAL;
5924 	state->paren_depth = 0;
5925 	state->xcdepth = 0;			/* not really necessary */
5926 	if (state->dolqstart)
5927 		free(state->dolqstart);
5928 	state->dolqstart = NULL;
5929 }
5930 
5931 /*
5932  * Reselect this lexer (psqlscan.l) after using another one.
5933  *
5934  * Currently and for foreseeable uses, it's sufficient to reset to INITIAL
5935  * state, because we'd never switch to another lexer in a different state.
5936  * However, we don't want to reset e.g. paren_depth, so this can't be
5937  * the same as psql_scan_reset().
5938  *
5939  * Note: psql setjmp error recovery just calls psql_scan_reset(), so that
5940  * must be a superset of this.
5941  *
5942  * Note: it seems likely that other lexers could just assign INITIAL for
5943  * themselves, since that probably has the value zero in every flex-generated
5944  * lexer.  But let's not assume that.
5945  */
5946 void
psql_scan_reselect_sql_lexer(PsqlScanState state)5947 psql_scan_reselect_sql_lexer(PsqlScanState state)
5948 {
5949 	state->start_state = INITIAL;
5950 }
5951 
5952 /*
5953  * Return true if lexer is currently in an "inside quotes" state.
5954  *
5955  * This is pretty grotty but is needed to preserve the old behavior
5956  * that mainloop.c drops blank lines not inside quotes without even
5957  * echoing them.
5958  */
5959 bool
psql_scan_in_quote(PsqlScanState state)5960 psql_scan_in_quote(PsqlScanState state)
5961 {
5962 	return state->start_state != INITIAL;
5963 }
5964 
5965 /*
5966  * Push the given string onto the stack of stuff to scan.
5967  *
5968  * NOTE SIDE EFFECT: the new buffer is made the active flex input buffer.
5969  */
5970 void
psqlscan_push_new_buffer(PsqlScanState state,const char * newstr,const char * varname)5971 psqlscan_push_new_buffer(PsqlScanState state, const char *newstr,
5972 						 const char *varname)
5973 {
5974 	StackElem  *stackelem;
5975 
5976 	stackelem = (StackElem *) pg_malloc(sizeof(StackElem));
5977 
5978 	/*
5979 	 * In current usage, the passed varname points at the current flex input
5980 	 * buffer; we must copy it before calling psqlscan_prepare_buffer()
5981 	 * because that will change the buffer state.
5982 	 */
5983 	stackelem->varname = varname ? pg_strdup(varname) : NULL;
5984 
5985 	stackelem->buf = psqlscan_prepare_buffer(state, newstr, strlen(newstr),
5986 											 &stackelem->bufstring);
5987 	state->curline = stackelem->bufstring;
5988 	if (state->safe_encoding)
5989 	{
5990 		stackelem->origstring = NULL;
5991 		state->refline = stackelem->bufstring;
5992 	}
5993 	else
5994 	{
5995 		stackelem->origstring = pg_strdup(newstr);
5996 		state->refline = stackelem->origstring;
5997 	}
5998 	stackelem->next = state->buffer_stack;
5999 	state->buffer_stack = stackelem;
6000 }
6001 
6002 /*
6003  * Pop the topmost buffer stack item (there must be one!)
6004  *
6005  * NB: after this, the flex input state is unspecified; caller must
6006  * switch to an appropriate buffer to continue lexing.
6007  * See psqlscan_select_top_buffer().
6008  */
6009 void
psqlscan_pop_buffer_stack(PsqlScanState state)6010 psqlscan_pop_buffer_stack(PsqlScanState state)
6011 {
6012 	StackElem  *stackelem = state->buffer_stack;
6013 
6014 	state->buffer_stack = stackelem->next;
6015 	yy_delete_buffer(stackelem->buf, state->scanner);
6016 	free(stackelem->bufstring);
6017 	if (stackelem->origstring)
6018 		free(stackelem->origstring);
6019 	if (stackelem->varname)
6020 		free(stackelem->varname);
6021 	free(stackelem);
6022 }
6023 
6024 /*
6025  * Select the topmost surviving buffer as the active input.
6026  */
6027 void
psqlscan_select_top_buffer(PsqlScanState state)6028 psqlscan_select_top_buffer(PsqlScanState state)
6029 {
6030 	StackElem  *stackelem = state->buffer_stack;
6031 
6032 	if (stackelem != NULL)
6033 	{
6034 		yy_switch_to_buffer(stackelem->buf, state->scanner);
6035 		state->curline = stackelem->bufstring;
6036 		state->refline = stackelem->origstring ? stackelem->origstring : stackelem->bufstring;
6037 	}
6038 	else
6039 	{
6040 		yy_switch_to_buffer(state->scanbufhandle, state->scanner);
6041 		state->curline = state->scanbuf;
6042 		state->refline = state->scanline;
6043 	}
6044 }
6045 
6046 /*
6047  * Check if specified variable name is the source for any string
6048  * currently being scanned
6049  */
6050 bool
psqlscan_var_is_current_source(PsqlScanState state,const char * varname)6051 psqlscan_var_is_current_source(PsqlScanState state, const char *varname)
6052 {
6053 	StackElem  *stackelem;
6054 
6055 	for (stackelem = state->buffer_stack;
6056 		 stackelem != NULL;
6057 		 stackelem = stackelem->next)
6058 	{
6059 		if (stackelem->varname && strcmp(stackelem->varname, varname) == 0)
6060 			return true;
6061 	}
6062 	return false;
6063 }
6064 
6065 /*
6066  * Set up a flex input buffer to scan the given data.  We always make a
6067  * copy of the data.  If working in an unsafe encoding, the copy has
6068  * multibyte sequences replaced by FFs to avoid fooling the lexer rules.
6069  *
6070  * NOTE SIDE EFFECT: the new buffer is made the active flex input buffer.
6071  */
6072 YY_BUFFER_STATE
psqlscan_prepare_buffer(PsqlScanState state,const char * txt,int len,char ** txtcopy)6073 psqlscan_prepare_buffer(PsqlScanState state, const char *txt, int len,
6074 						char **txtcopy)
6075 {
6076 	char	   *newtxt;
6077 
6078 	/* Flex wants two \0 characters after the actual data */
6079 	newtxt = pg_malloc(len + 2);
6080 	*txtcopy = newtxt;
6081 	newtxt[len] = newtxt[len + 1] = YY_END_OF_BUFFER_CHAR;
6082 
6083 	if (state->safe_encoding)
6084 		memcpy(newtxt, txt, len);
6085 	else
6086 	{
6087 		/* Gotta do it the hard way */
6088 		int			i = 0;
6089 
6090 		while (i < len)
6091 		{
6092 			int			thislen = PQmblen(txt + i, state->encoding);
6093 
6094 			/* first byte should always be okay... */
6095 			newtxt[i] = txt[i];
6096 			i++;
6097 			while (--thislen > 0 && i < len)
6098 				newtxt[i++] = (char) 0xFF;
6099 		}
6100 	}
6101 
6102 	return yy_scan_buffer(newtxt, len + 2, state->scanner);
6103 }
6104 
6105 /*
6106  * psqlscan_emit() --- body for ECHO macro
6107  *
6108  * NB: this must be used for ALL and ONLY the text copied from the flex
6109  * input data.  If you pass it something that is not part of the yytext
6110  * string, you are making a mistake.  Internally generated text can be
6111  * appended directly to state->output_buf.
6112  */
6113 void
psqlscan_emit(PsqlScanState state,const char * txt,int len)6114 psqlscan_emit(PsqlScanState state, const char *txt, int len)
6115 {
6116 	PQExpBuffer output_buf = state->output_buf;
6117 
6118 	if (state->safe_encoding)
6119 		appendBinaryPQExpBuffer(output_buf, txt, len);
6120 	else
6121 	{
6122 		/* Gotta do it the hard way */
6123 		const char *reference = state->refline;
6124 		int			i;
6125 
6126 		reference += (txt - state->curline);
6127 
6128 		for (i = 0; i < len; i++)
6129 		{
6130 			char		ch = txt[i];
6131 
6132 			if (ch == (char) 0xFF)
6133 				ch = reference[i];
6134 			appendPQExpBufferChar(output_buf, ch);
6135 		}
6136 	}
6137 }
6138 
6139 /*
6140  * psqlscan_extract_substring --- fetch value of (part of) the current token
6141  *
6142  * This is like psqlscan_emit(), except that the data is returned as a
6143  * malloc'd string rather than being pushed directly to state->output_buf.
6144  */
6145 char *
psqlscan_extract_substring(PsqlScanState state,const char * txt,int len)6146 psqlscan_extract_substring(PsqlScanState state, const char *txt, int len)
6147 {
6148 	char	   *result = (char *) pg_malloc(len + 1);
6149 
6150 	if (state->safe_encoding)
6151 		memcpy(result, txt, len);
6152 	else
6153 	{
6154 		/* Gotta do it the hard way */
6155 		const char *reference = state->refline;
6156 		int			i;
6157 
6158 		reference += (txt - state->curline);
6159 
6160 		for (i = 0; i < len; i++)
6161 		{
6162 			char		ch = txt[i];
6163 
6164 			if (ch == (char) 0xFF)
6165 				ch = reference[i];
6166 			result[i] = ch;
6167 		}
6168 	}
6169 	result[len] = '\0';
6170 	return result;
6171 }
6172 
6173 /*
6174  * psqlscan_escape_variable --- process :'VARIABLE' or :"VARIABLE"
6175  *
6176  * If the variable name is found, escape its value using the appropriate
6177  * quoting method and emit the value to output_buf.  (Since the result is
6178  * surely quoted, there is never any reason to rescan it.)	If we don't
6179  * find the variable or escaping fails, emit the token as-is.
6180  */
6181 void
psqlscan_escape_variable(PsqlScanState state,const char * txt,int len,PsqlScanQuoteType quote)6182 psqlscan_escape_variable(PsqlScanState state, const char *txt, int len,
6183 						 PsqlScanQuoteType quote)
6184 {
6185 	char	   *varname;
6186 	char	   *value;
6187 
6188 	/* Variable lookup. */
6189 	varname = psqlscan_extract_substring(state, txt + 2, len - 3);
6190 	if (state->callbacks->get_variable)
6191 		value = state->callbacks->get_variable(varname, quote,
6192 											   state->cb_passthrough);
6193 	else
6194 		value = NULL;
6195 	free(varname);
6196 
6197 	if (value)
6198 	{
6199 		/* Emit the suitably-escaped value */
6200 		appendPQExpBufferStr(state->output_buf, value);
6201 		free(value);
6202 	}
6203 	else
6204 	{
6205 		/* Emit original token as-is */
6206 		psqlscan_emit(state, txt, len);
6207 	}
6208 }
6209 
6210 void
psqlscan_test_variable(PsqlScanState state,const char * txt,int len)6211 psqlscan_test_variable(PsqlScanState state, const char *txt, int len)
6212 {
6213 	char	*varname;
6214 	char	*value;
6215 
6216 	varname = psqlscan_extract_substring(state, txt + 3, len - 4);
6217 	if (state->callbacks->get_variable)
6218 		value = state->callbacks->get_variable(varname, PQUOTE_PLAIN,
6219 											   state->cb_passthrough);
6220 	else
6221 		value = NULL;
6222 	free(varname);
6223 
6224 	if (value != NULL)
6225 	{
6226 		psqlscan_emit(state, "TRUE", 4);
6227 		free(value);
6228 	}
6229 	else
6230 	{
6231 		psqlscan_emit(state, "FALSE", 5);
6232 	}
6233 }
6234 
6235