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