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