GnuCOBOL  2.0
A free COBOL compiler
scanner.c
Go to the documentation of this file.
1 #line 2 "scanner.c"
2 
3 #line 4 "scanner.c"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 39
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* First, we deal with platform-specific or compiler-specific issues. */
18 
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24 
25 /* end standard C headers. */
26 
27 /* flex integer type definitions */
28 
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31 
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L \
35 &&(!defined(_MSC_VER) || _MSC_VER >= 1800)
36 
37 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
38  * if you want the limit (max/min) macros for int types.
39  */
40 #ifndef __STDC_LIMIT_MACROS
41 #define __STDC_LIMIT_MACROS 1
42 #endif
43 
44 #include <inttypes.h>
45 typedef int8_t flex_int8_t;
46 typedef uint8_t flex_uint8_t;
47 typedef int16_t flex_int16_t;
48 typedef uint16_t flex_uint16_t;
49 typedef int32_t flex_int32_t;
50 typedef uint32_t flex_uint32_t;
51 #else
52 typedef signed char flex_int8_t;
53 typedef short int flex_int16_t;
54 typedef int flex_int32_t;
55 typedef unsigned char flex_uint8_t;
56 typedef unsigned short int flex_uint16_t;
57 typedef unsigned int flex_uint32_t;
58 
59 /* Limits of integral types. */
60 #ifndef INT8_MIN
61 #define INT8_MIN (-128)
62 #endif
63 #ifndef INT16_MIN
64 #define INT16_MIN (-32767-1)
65 #endif
66 #ifndef INT32_MIN
67 #define INT32_MIN (-2147483647-1)
68 #endif
69 #ifndef INT8_MAX
70 #define INT8_MAX (127)
71 #endif
72 #ifndef INT16_MAX
73 #define INT16_MAX (32767)
74 #endif
75 #ifndef INT32_MAX
76 #define INT32_MAX (2147483647)
77 #endif
78 #ifndef UINT8_MAX
79 #define UINT8_MAX (255U)
80 #endif
81 #ifndef UINT16_MAX
82 #define UINT16_MAX (65535U)
83 #endif
84 #ifndef UINT32_MAX
85 #define UINT32_MAX (4294967295U)
86 #endif
87 
88 #endif /* ! C99 */
89 
90 #endif /* ! FLEXINT_H */
91 
92 #ifdef __cplusplus
93 
94 /* The "const" storage-class-modifier is valid. */
95 #define YY_USE_CONST
96 
97 #else /* ! __cplusplus */
98 
99 /* C99 requires __STDC__ to be defined as 1. */
100 #if defined (__STDC__)
101 
102 #define YY_USE_CONST
103 
104 #endif /* defined (__STDC__) */
105 #endif /* ! __cplusplus */
106 
107 #ifdef YY_USE_CONST
108 #define yyconst const
109 #else
110 #define yyconst
111 #endif
112 
113 /* Returned upon end-of-file. */
114 #define YY_NULL 0
115 
116 /* Promotes a possibly negative, possibly signed char to an unsigned
117  * integer for use as an array index. If the signed char is negative,
118  * we want to instead treat it as an 8-bit unsigned char, hence the
119  * double cast.
120  */
121 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
122 
123 /* Enter a start condition. This macro really ought to take a parameter,
124  * but we do it the disgusting crufty way forced on us by the ()-less
125  * definition of BEGIN.
126  */
127 #define BEGIN (yy_start) = 1 + 2 *
128 
129 /* Translate the current start state into a value that can be later handed
130  * to BEGIN to return to the state. The YYSTATE alias is for lex
131  * compatibility.
132  */
133 #define YY_START (((yy_start) - 1) / 2)
134 #define YYSTATE YY_START
135 
136 /* Action number for EOF rule of a given start state. */
137 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
138 
139 /* Special action meaning "start processing a new file". */
140 #define YY_NEW_FILE yyrestart(yyin )
141 
142 #define YY_END_OF_BUFFER_CHAR 0
143 
144 /* Size of default input buffer. */
145 #ifndef YY_BUF_SIZE
146 #ifdef __ia64__
147 /* On IA-64, the buffer size is 16k, not 8k.
148  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
149  * Ditto for the __ia64__ case accordingly.
150  */
151 #define YY_BUF_SIZE 32768
152 #else
153 #define YY_BUF_SIZE 16384
154 #endif /* __ia64__ */
155 #endif
156 
157 /* The state buf must be large enough to hold one state per character in the main buffer.
158  */
159 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
160 
161 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
162 #define YY_TYPEDEF_YY_BUFFER_STATE
164 #endif
165 
166 #ifndef YY_TYPEDEF_YY_SIZE_T
167 #define YY_TYPEDEF_YY_SIZE_T
168 typedef size_t yy_size_t;
169 #endif
170 
171 extern yy_size_t yyleng;
172 
173 extern FILE *yyin, *yyout;
174 
175 #define EOB_ACT_CONTINUE_SCAN 0
176 #define EOB_ACT_END_OF_FILE 1
177 #define EOB_ACT_LAST_MATCH 2
178 
179  #define YY_LESS_LINENO(n)
180  #define YY_LINENO_REWIND_TO(ptr)
181 
182 /* Return all but the first "n" matched characters back to the input stream. */
183 #define yyless(n) \
184  do \
185  { \
186  /* Undo effects of setting up yytext. */ \
187  int yyless_macro_arg = (n); \
188  YY_LESS_LINENO(yyless_macro_arg);\
189  *yy_cp = (yy_hold_char); \
190  YY_RESTORE_YY_MORE_OFFSET \
191  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
192  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
193  } \
194  while ( 0 )
195 
196 #define unput(c) yyunput( c, (yytext_ptr) )
197 
198 #ifndef YY_STRUCT_YY_BUFFER_STATE
199 #define YY_STRUCT_YY_BUFFER_STATE
200 struct yy_buffer_state
201  {
202  FILE *yy_input_file;
203 
204  char *yy_ch_buf; /* input buffer */
205  char *yy_buf_pos; /* current position in input buffer */
206 
207  /* Size of input buffer in bytes, not including room for EOB
208  * characters.
209  */
211 
212  /* Number of characters read into yy_ch_buf, not including EOB
213  * characters.
214  */
216 
217  /* Whether we "own" the buffer - i.e., we know we created it,
218  * and can realloc() it to grow it, and should free() it to
219  * delete it.
220  */
221  int yy_is_our_buffer;
222 
223  /* Whether this is an "interactive" input source; if so, and
224  * if we're using stdio for input, then we want to use getc()
225  * instead of fread(), to make sure we stop fetching input after
226  * each newline.
227  */
228  int yy_is_interactive;
229 
230  /* Whether we're considered to be at the beginning of a line.
231  * If so, '^' rules will be active on the next match, otherwise
232  * not.
233  */
234  int yy_at_bol;
235 
236  int yy_bs_lineno; /**< The line count. */
237  int yy_bs_column; /**< The column count. */
238 
239  /* Whether to try to fill the input buffer when we reach the
240  * end of it.
241  */
242  int yy_fill_buffer;
243 
244  int yy_buffer_status;
245 
246 #define YY_BUFFER_NEW 0
247 #define YY_BUFFER_NORMAL 1
248  /* When an EOF's been seen but there's still some text to process
249  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
250  * shouldn't try reading from the input source any more. We might
251  * still have a bunch of tokens to match, though, because of
252  * possible backing-up.
253  *
254  * When we actually see the EOF, we change the status to "new"
255  * (via yyrestart()), so that the user can continue scanning by
256  * just pointing yyin at a new input file.
257  */
258 #define YY_BUFFER_EOF_PENDING 2
259 
260  };
261 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
262 
263 /* Stack of input buffers. */
264 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
265 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
266 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
267 
268 /* We provide macros for accessing buffer states in case in the
269  * future we want to put the buffer states in a more general
270  * "scanner state".
271  *
272  * Returns the top of the stack, or NULL.
273  */
274 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
275  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
276  : NULL)
277 
278 /* Same as previous macro, but useful when we know that the buffer stack is not
279  * NULL or when we need an lvalue. For internal use only.
280  */
281 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
282 
283 /* yy_hold_char holds the character lost when yytext is formed. */
284 static char yy_hold_char;
285 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
287 
288 /* Points to current character in buffer. */
289 static char *yy_c_buf_p = (char *) 0;
290 static int yy_init = 0; /* whether we need to initialize */
291 static int yy_start = 0; /* start state number */
292 
293 /* Flag which is used to allow yywrap()'s to do buffer switches
294  * instead of setting up a fresh yyin. A bit of a hack ...
295  */
297 
298 void yyrestart (FILE *input_file );
299 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
300 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
301 void yy_delete_buffer (YY_BUFFER_STATE b );
302 void yy_flush_buffer (YY_BUFFER_STATE b );
303 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
304 void yypop_buffer_state (void );
305 
306 static void yyensure_buffer_stack (void );
307 static void yy_load_buffer_state (void );
308 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
309 
310 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
311 
312 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
313 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
314 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
315 
316 void *yyalloc (yy_size_t );
317 void *yyrealloc (void *,yy_size_t );
318 void yyfree (void * );
319 
320 #define yy_new_buffer yy_create_buffer
321 
322 #define yy_set_interactive(is_interactive) \
323  { \
324  if ( ! YY_CURRENT_BUFFER ){ \
325  yyensure_buffer_stack (); \
326  YY_CURRENT_BUFFER_LVALUE = \
327  yy_create_buffer(yyin,YY_BUF_SIZE ); \
328  } \
329  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
330  }
331 
332 #define yy_set_bol(at_bol) \
333  { \
334  if ( ! YY_CURRENT_BUFFER ){\
335  yyensure_buffer_stack (); \
336  YY_CURRENT_BUFFER_LVALUE = \
337  yy_create_buffer(yyin,YY_BUF_SIZE ); \
338  } \
339  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
340  }
341 
342 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
343 
344 /* Begin user sect3 */
345 
346 typedef unsigned char YY_CHAR;
347 
348 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
349 
350 typedef int yy_state_type;
351 
352 extern int yylineno;
353 
354 int yylineno = 1;
355 
356 extern char *yytext;
357 #define yytext_ptr yytext
358 
359 static yy_state_type yy_get_previous_state (void );
360 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
361 static int yy_get_next_buffer (void );
362 static void yy_fatal_error (yyconst char msg[] );
363 
364 /* Done after the current pattern has been matched and before the
365  * corresponding action - sets up yytext.
366  */
367 #define YY_DO_BEFORE_ACTION \
368  (yytext_ptr) = yy_bp; \
369  yyleng = (size_t) (yy_cp - yy_bp); \
370  (yy_hold_char) = *yy_cp; \
371  *yy_cp = '\0'; \
372  (yy_c_buf_p) = yy_cp;
373 
374 #define YY_NUM_RULES 129
375 #define YY_END_OF_BUFFER 130
376 /* This struct is not used in this scanner,
377  but its presence is necessary. */
378 struct yy_trans_info
379  {
382  };
384  { 0,
385  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
386  130, 124, 5, 30, 11, 115, 26, 27, 119, 120,
387  121, 114, 118, 28, 116, 31, 122, 117, 123, 109,
388  109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
389  109, 109, 109, 109, 109, 109, 109, 109, 30, 7,
390  120, 35, 121, 114, 28, 120, 40, 121, 28, 126,
391  30, 31, 126, 30, 126, 128, 30, 127, 31, 30,
392  128, 30, 113, 29, 0, 28, 109, 31, 110, 112,
393  111, 109, 109, 0, 22, 0, 109, 109, 109, 109,
394  109, 109, 109, 109, 0, 25, 0, 109, 0, 0,
395 
396  109, 109, 109, 109, 23, 109, 109, 109, 109, 109,
397  109, 109, 109, 109, 109, 0, 24, 0, 0, 0,
398  0, 7, 7, 7, 7, 0, 29, 35, 34, 28,
399  0, 29, 39, 38, 28, 126, 125, 126, 126, 127,
400  0, 0, 109, 0, 0, 21, 22, 0, 20, 109,
401  109, 109, 109, 109, 109, 109, 109, 0, 19, 25,
402  0, 18, 109, 0, 17, 0, 16, 109, 109, 109,
403  109, 0, 109, 23, 0, 109, 8, 109, 109, 109,
404  109, 109, 109, 109, 109, 0, 13, 24, 0, 12,
405  0, 15, 0, 14, 7, 7, 7, 0, 39, 0,
406 
407  126, 126, 0, 0, 109, 0, 0, 0, 0, 0,
408  95, 109, 109, 109, 109, 109, 109, 109, 109, 109,
409  109, 109, 0, 0, 0, 0, 0, 0, 109, 109,
410  109, 109, 109, 109, 109, 109, 109, 109, 7, 7,
411  7, 0, 0, 32, 0, 0, 36, 126, 126, 0,
412  0, 109, 0, 0, 0, 0, 0, 0, 109, 109,
413  109, 109, 0, 109, 109, 109, 109, 0, 109, 0,
414  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
415  0, 109, 109, 109, 109, 109, 0, 109, 0, 0,
416  0, 7, 7, 7, 7, 7, 33, 37, 126, 126,
417 
418  126, 126, 0, 0, 0, 0, 0, 0, 0, 0,
419  0, 0, 0, 109, 0, 0, 109, 0, 109, 109,
420  109, 109, 0, 0, 0, 0, 0, 0, 0, 0,
421  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
422  0, 109, 109, 0, 0, 109, 0, 109, 0, 0,
423  0, 0, 0, 7, 7, 7, 7, 7, 7, 126,
424  126, 126, 126, 0, 0, 0, 0, 0, 0, 85,
425  0, 93, 63, 0, 0, 0, 0, 0, 109, 0,
426  109, 109, 109, 0, 0, 0, 0, 0, 0, 0,
427  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
428 
429  0, 0, 0, 0, 0, 109, 9, 0, 0, 0,
430  0, 0, 0, 0, 0, 0, 0, 7, 7, 7,
431  6, 7, 126, 126, 126, 126, 0, 0, 0, 0,
432  0, 0, 0, 0, 0, 0, 109, 0, 0, 109,
433  44, 10, 0, 99, 0, 0, 0, 0, 0, 0,
434  0, 0, 0, 84, 0, 91, 0, 0, 0, 0,
435  0, 0, 0, 0, 0, 0, 0, 0, 0, 109,
436  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
437  0, 0, 7, 4, 7, 1, 7, 3, 6, 7,
438  2, 126, 0, 126, 0, 126, 0, 126, 0, 106,
439 
440  0, 0, 0, 0, 0, 109, 59, 0, 109, 0,
441  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
442  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
443  0, 0, 0, 0, 0, 0, 0, 0, 87, 0,
444  0, 0, 0, 0, 108, 0, 0, 0, 0, 0,
445  0, 66, 0, 0, 0, 109, 0, 0, 0, 0,
446  0, 107, 0, 58, 0, 0, 0, 62, 70, 0,
447  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
448  0, 0, 79, 0, 0, 0, 0, 0, 0, 0,
449  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
450 
451  41, 109, 0, 0, 0, 0, 0, 0, 0, 0,
452  0, 0, 0, 0, 83, 0, 89, 0, 76, 0,
453  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
454  0, 0, 47, 48, 0, 74, 0, 0, 0, 0,
455  0, 0, 0, 42, 94, 46, 0, 0, 0, 98,
456  0, 0, 0, 0, 0, 68, 0, 0, 0, 97,
457  0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
458  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
459  0, 53, 0, 0, 0, 61, 65, 0, 0, 0,
460  0, 0, 0, 0, 0, 0, 82, 0, 80, 69,
461 
462  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
463  0, 0, 0, 0, 55, 0, 0, 0, 0, 78,
464  0, 75, 0, 0, 0, 0, 73, 43, 45, 0,
465  0, 0, 0, 0, 0, 92, 0, 0, 0, 0,
466  0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
467  60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
468  0, 64, 0, 90, 96, 0, 81, 0, 0, 0,
469  0, 0, 0, 0, 50, 0, 54, 0, 0, 77,
470  0, 0, 103, 0, 67, 0, 0, 0, 0, 0,
471  0, 0, 71, 0, 0, 0, 0, 0, 0, 0,
472 
473  57, 88, 0, 0, 0, 0, 105, 49, 0, 0,
474  0, 102, 0, 0, 0, 0, 0, 100, 0, 0,
475  52, 56, 101, 0, 0, 0, 0, 0, 0, 51,
476  104, 0
477  } ;
478 
480  { 0,
481  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
482  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484  1, 3, 1, 4, 5, 1, 1, 6, 7, 8,
485  9, 10, 11, 12, 13, 14, 15, 16, 16, 16,
486  16, 16, 16, 16, 16, 16, 16, 17, 18, 19,
487  20, 21, 1, 1, 22, 23, 24, 25, 26, 27,
488  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
489  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
490  1, 1, 1, 1, 48, 1, 49, 50, 51, 52,
491 
492  53, 54, 55, 56, 57, 31, 58, 59, 60, 61,
493  62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
494  72, 73, 1, 1, 1, 1, 1, 74, 74, 74,
495  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
496  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
497  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
498  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
499  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
500  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
501  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
502 
503  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
504  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
505  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
506  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
507  74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
508  74, 74, 74, 74, 74
509  } ;
510 
512  { 0,
513  1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
514  1, 1, 4, 1, 1, 5, 1, 6, 1, 1,
515  1, 5, 5, 5, 5, 5, 5, 5, 5, 5,
516  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
517  5, 5, 5, 5, 5, 5, 5, 7, 5, 5,
518  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
519  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
520  5, 5, 5, 7
521  } ;
522 
524  { 0,
525  0, 72, 67, 79, 85, 97, 85, 102, 159, 233,
526  1025, 2644, 2644, 1020, 2644, 2644, 2644, 2644, 1011, 999,
527  977, 2644, 2644, 73, 2644, 965, 91, 2644, 962, 145,
528  133, 81, 295, 86, 136, 140, 169, 242, 170, 253,
529  93, 104, 243, 249, 256, 172, 209, 267, 111, 250,
530  108, 967, 117, 961, 176, 123, 175, 182, 215, 0,
531  971, 955, 155, 200, 285, 2644, 967, 0, 940, 205,
532  292, 923, 2644, 905, 212, 263, 213, 902, 2644, 2644,
533  2644, 279, 323, 915, 902, 909, 326, 305, 319, 332,
534  349, 336, 335, 356, 876, 0, 854, 347, 846, 825,
535 
536  366, 364, 362, 390, 798, 416, 398, 402, 400, 404,
537  407, 417, 410, 408, 446, 782, 0, 767, 767, 755,
538  436, 0, 263, 293, 222, 742, 195, 730, 451, 462,
539  704, 203, 702, 455, 470, 0, 0, 409, 240, 0,
540  415, 261, 447, 489, 679, 2644, 665, 671, 2644, 514,
541  522, 471, 493, 483, 489, 509, 516, 671, 2644, 0,
542  667, 2644, 530, 623, 2644, 616, 2644, 533, 532, 537,
543  534, 565, 590, 606, 637, 556, 558, 561, 563, 571,
544  581, 587, 583, 597, 604, 611, 2644, 0, 605, 2644,
545  601, 2644, 566, 2644, 494, 294, 322, 637, 547, 630,
546 
547  593, 324, 603, 438, 623, 449, 630, 620, 667, 648,
548  2644, 654, 667, 663, 704, 684, 688, 676, 692, 725,
549  699, 751, 612, 798, 678, 633, 650, 638, 718, 728,
550  733, 737, 735, 795, 743, 809, 823, 827, 756, 731,
551  730, 268, 542, 372, 487, 528, 539, 820, 738, 832,
552  745, 874, 736, 765, 743, 756, 781, 794, 835, 893,
553  895, 861, 912, 824, 886, 887, 875, 930, 943, 935,
554  801, 811, 914, 832, 917, 812, 839, 916, 839, 931,
555  854, 955, 951, 992, 999, 952, 1006, 993, 1017, 1024,
556  1049, 868, 932, 942, 140, 889, 498, 481, 946, 998,
557 
558  1003, 998, 1002, 1001, 1011, 1007, 1068, 1012, 1085, 1087,
559  1089, 1039, 1040, 578, 1106, 1110, 1101, 1039, 1093, 1072,
560  1020, 1114, 1054, 1010, 1141, 1032, 1074, 1133, 1090, 1093,
561  1101, 1109, 1096, 1165, 1108, 1093, 1126, 1128, 1105, 1130,
562  1131, 1157, 1161, 1176, 1194, 1198, 1150, 1189, 1145, 1160,
563  1167, 1169, 1171, 1170, 1177, 1193, 474, 378, 1187, 1180,
564  1183, 1199, 1193, 1188, 1191, 1209, 1199, 1214, 1204, 2644,
565  1205, 2644, 2644, 1218, 1217, 1214, 1216, 1214, 1243, 1223,
566  1258, 1284, 1286, 1305, 1298, 1246, 1242, 1256, 1258, 1248,
567  1276, 1310, 1312, 1336, 1304, 1303, 1309, 1343, 1282, 1307,
568 
569  1303, 1305, 1347, 1308, 1368, 1330, 1379, 1312, 1325, 1386,
570  1334, 550, 1338, 1329, 1342, 1342, 1404, 487, 443, 440,
571  0, 437, 1410, 1412, 1415, 1417, 435, 403, 374, 350,
572  1422, 1370, 1369, 1396, 1385, 1392, 1419, 1436, 1414, 1429,
573  2644, 818, 1443, 1441, 1420, 1463, 1421, 1468, 1421, 1432,
574  1423, 1427, 1456, 2644, 1436, 2644, 1446, 1448, 1454, 1456,
575  1450, 1464, 1470, 1523, 1476, 1463, 1530, 1475, 1534, 1537,
576  1541, 1498, 1509, 1476, 1492, 1554, 1559, 1530, 1522, 1531,
577  1521, 1580, 332, 2644, 304, 2644, 268, 2644, 0, 263,
578  2644, 1566, 262, 1577, 198, 1594, 195, 1597, 153, 2644,
579 
580  1548, 1601, 135, 1564, 1583, 1595, 2644, 1547, 1615, 1570,
581  1581, 1622, 1585, 1639, 1582, 1646, 1650, 1589, 1657, 1664,
582  1614, 1620, 1602, 1620, 1635, 1614, 1640, 1653, 1654, 1653,
583  1636, 1651, 1690, 1683, 1657, 1672, 1653, 1657, 2644, 1652,
584  1675, 1679, 1672, 1672, 2644, 1690, 1684, 1691, 1680, 1695,
585  1686, 2644, 1688, 1691, 1694, 1716, 1689, 1753, 1756, 1712,
586  1690, 2644, 1699, 1770, 1714, 1716, 1724, 2644, 2644, 1728,
587  1778, 1781, 123, 1795, 1718, 1760, 1765, 1766, 1740, 1768,
588  1764, 1762, 2644, 1766, 1767, 1759, 1769, 1775, 1784, 1785,
589  1774, 1821, 1792, 1791, 1785, 1789, 1787, 1790, 1796, 1801,
590 
591  2644, 1846, 1800, 1806, 1851, 1812, 1858, 1830, 1869, 1826,
592  1826, 1837, 1841, 1827, 2644, 1844, 2644, 1846, 2644, 1848,
593  1895, 1848, 1849, 1861, 1914, 1848, 1856, 1861, 1876, 1921,
594  1863, 1880, 2644, 2644, 1869, 2644, 1884, 1884, 1895, 1892,
595  1906, 1905, 1908, 2644, 2644, 2644, 1903, 1902, 1940, 2644,
596  1911, 1947, 1905, 1965, 1972, 2644, 1924, 1932, 1921, 1977,
597  1934, 1930, 1940, 1989, 2000, 1949, 2002, 2014, 2644, 1954,
598  1960, 1962, 1973, 1969, 114, 1979, 1986, 1987, 1935, 1975,
599  1983, 2026, 2028, 2051, 1997, 2644, 2644, 113, 2009, 2053,
600  2055, 2015, 2058, 2015, 2012, 2013, 2644, 2027, 2644, 2644,
601 
602  2077, 2042, 2048, 2054, 106, 2051, 2059, 2066, 2058, 2096,
603  2061, 2072, 2113, 2057, 2121, 2062, 2068, 2066, 2079, 2644,
604  2065, 2644, 2084, 2083, 2091, 2132, 2644, 2644, 2644, 2139,
605  2103, 2106, 2105, 2113, 2156, 2644, 2104, 2114, 2174, 2177,
606  2116, 2113, 2181, 2138, 2188, 2195, 2147, 2199, 2158, 2644,
607  2644, 2154, 2168, 2163, 2170, 2221, 2155, 2207, 2224, 2235,
608  2192, 2644, 2188, 2644, 2644, 2246, 2644, 2189, 2200, 2206,
609  105, 2207, 2204, 2216, 2253, 2219, 2644, 2228, 2220, 2644,
610  2267, 2240, 2644, 2232, 2644, 2239, 2241, 2286, 2244, 2239,
611  2293, 2306, 2644, 2260, 2270, 2277, 2278, 2313, 2320, 2288,
612 
613  2331, 2644, 2252, 2280, 2288, 2282, 2644, 2644, 2295, 2333,
614  2293, 2644, 2315, 2302, 2309, 2355, 2357, 2644, 2326, 2326,
615  2375, 2644, 2644, 2326, 2378, 2327, 2330, 2383, 2400, 2644,
616  2644, 2644, 2445, 2452, 2456, 2463, 2470, 2474, 2479, 2486,
617  2493, 80, 2500, 2507, 2514, 2521, 71, 2528, 2535, 2542,
618  2547, 2552, 2559, 2566, 2573, 2580, 2587, 2594, 2601, 2608,
619  2615, 2622, 2629, 2636
620  } ;
621 
623  { 0,
624  832, 1, 1, 1, 1, 1, 833, 833, 834, 834,
625  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
626  832, 832, 832, 835, 832, 832, 832, 832, 832, 835,
627  835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
628  835, 835, 835, 835, 835, 835, 835, 835, 832, 836,
629  832, 832, 832, 832, 835, 832, 832, 832, 835, 837,
630  832, 832, 837, 832, 837, 832, 832, 838, 832, 832,
631  832, 832, 832, 832, 835, 835, 835, 832, 832, 832,
632  832, 835, 835, 839, 832, 840, 835, 835, 835, 835,
633  835, 835, 835, 835, 841, 842, 843, 835, 844, 845,
634 
635  835, 835, 835, 835, 832, 835, 835, 835, 835, 835,
636  835, 835, 835, 835, 835, 846, 847, 848, 849, 850,
637  832, 836, 836, 836, 836, 832, 832, 832, 832, 835,
638  832, 832, 832, 832, 835, 837, 837, 837, 837, 838,
639  832, 832, 835, 832, 839, 832, 832, 840, 832, 835,
640  835, 835, 835, 835, 835, 835, 835, 841, 832, 842,
641  843, 832, 835, 844, 832, 845, 832, 835, 835, 835,
642  835, 832, 835, 832, 832, 835, 835, 835, 835, 835,
643  835, 835, 835, 835, 835, 846, 832, 847, 848, 832,
644  849, 832, 850, 832, 836, 836, 836, 832, 832, 832,
645 
646  837, 837, 832, 832, 835, 832, 832, 832, 832, 835,
647  832, 835, 835, 835, 835, 835, 835, 835, 835, 835,
648  835, 835, 832, 832, 832, 832, 832, 832, 835, 835,
649  835, 835, 835, 835, 835, 835, 835, 835, 836, 836,
650  836, 832, 832, 832, 832, 832, 832, 837, 837, 832,
651  832, 835, 832, 832, 832, 832, 832, 832, 835, 835,
652  835, 835, 832, 835, 835, 835, 835, 832, 835, 832,
653  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
654  832, 835, 835, 835, 835, 835, 832, 835, 832, 832,
655  832, 836, 836, 836, 836, 836, 832, 832, 837, 837,
656 
657  837, 837, 832, 832, 832, 832, 832, 832, 832, 832,
658  832, 832, 832, 835, 832, 832, 835, 832, 835, 835,
659  835, 835, 832, 832, 832, 832, 832, 832, 832, 832,
660  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
661  832, 835, 835, 832, 832, 835, 832, 835, 832, 832,
662  832, 832, 832, 836, 836, 836, 836, 836, 836, 837,
663  837, 837, 837, 832, 832, 832, 832, 832, 832, 832,
664  832, 832, 832, 832, 832, 835, 832, 832, 835, 832,
665  835, 835, 835, 832, 832, 832, 832, 832, 832, 832,
666  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
667 
668  832, 832, 832, 832, 832, 835, 835, 832, 832, 832,
669  832, 851, 832, 832, 832, 832, 832, 852, 853, 854,
670  855, 856, 857, 858, 859, 860, 861, 862, 863, 864,
671  832, 832, 832, 832, 832, 832, 835, 832, 832, 835,
672  832, 835, 832, 832, 832, 832, 832, 832, 832, 832,
673  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
674  832, 832, 832, 832, 832, 832, 832, 832, 832, 835,
675  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
676  832, 832, 852, 832, 853, 832, 854, 832, 855, 856,
677  832, 857, 861, 858, 862, 859, 863, 860, 864, 832,
678 
679  832, 832, 832, 832, 832, 835, 832, 832, 835, 832,
680  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
681  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
682  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
683  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
684  832, 832, 832, 832, 832, 835, 832, 832, 832, 832,
685  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
686  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
687  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
688  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
689 
690  832, 835, 832, 832, 832, 832, 832, 832, 832, 832,
691  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
692  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
693  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
694  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
695  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
696  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
697  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
698  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
699  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
700 
701  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
702  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
703  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
704  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
705  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
706  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
707  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
708  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
709  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
710  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
711 
712  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
713  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
714  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
715  832, 0, 832, 832, 832, 832, 832, 832, 832, 832,
716  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
717  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
718  832, 832, 832, 832
719  } ;
720 
722  { 0,
723  12, 13, 14, 15, 12, 16, 15, 17, 18, 19,
724  20, 12, 21, 22, 23, 24, 25, 26, 27, 28,
725  29, 30, 31, 32, 32, 33, 34, 35, 36, 37,
726  32, 32, 38, 32, 39, 40, 41, 32, 42, 43,
727  44, 45, 32, 46, 47, 32, 48, 12, 30, 31,
728  32, 32, 33, 34, 35, 36, 37, 32, 38, 32,
729  39, 40, 41, 32, 42, 43, 44, 45, 32, 46,
730  47, 32, 48, 32, 49, 188, 50, 51, 52, 53,
731  54, 49, 55, 50, 160, 75, 13, 61, 76, 51,
732  52, 53, 54, 75, 55, 56, 57, 58, 75, 49,
733 
734  59, 50, 62, 13, 64, 75, 65, 56, 57, 58,
735  79, 80, 59, 72, 63, 121, 75, 784, 731, 62,
736  75, 126, 108, 127, 92, 718, 706, 93, 75, 109,
737  126, 63, 127, 75, 131, 618, 84, 85, 132, 86,
738  75, 63, 357, 95, 96, 75, 97, 553, 75, 108,
739  92, 75, 75, 93, 491, 358, 109, 75, 63, 66,
740  13, 67, 66, 66, 66, 66, 66, 66, 66, 66,
741  66, 82, 66, 66, 94, 66, 69, 66, 66, 66,
742  75, 75, 75, 75, 75, 83, 133, 75, 75, 126,
743  134, 130, 75, 131, 137, 103, 488, 132, 82, 486,
744 
745  94, 115, 72, 98, 121, 104, 66, 72, 126, 121,
746  127, 83, 116, 117, 131, 118, 75, 75, 132, 75,
747  137, 75, 103, 75, 75, 75, 131, 75, 115, 98,
748  135, 104, 66, 66, 13, 70, 66, 71, 66, 66,
749  66, 66, 66, 66, 66, 99, 66, 66, 100, 66,
750  69, 66, 66, 66, 75, 75, 75, 105, 197, 75,
751  75, 75, 75, 484, 491, 75, 110, 101, 75, 488,
752  119, 102, 111, 120, 123, 75, 202, 113, 76, 75,
753  66, 243, 124, 244, 197, 125, 112, 106, 195, 75,
754  75, 75, 114, 110, 101, 107, 75, 204, 102, 111,
755 
756  75, 123, 202, 75, 113, 486, 66, 75, 124, 138,
757  75, 125, 112, 106, 75, 195, 141, 75, 114, 143,
758  139, 107, 196, 204, 144, 144, 75, 142, 240, 87,
759  88, 75, 89, 484, 144, 75, 138, 90, 75, 91,
760  144, 151, 75, 141, 75, 143, 139, 75, 75, 196,
761  150, 491, 75, 142, 240, 87, 88, 153, 89, 75,
762  152, 75, 241, 90, 249, 91, 75, 151, 75, 156,
763  75, 155, 154, 75, 75, 488, 75, 150, 75, 75,
764  421, 157, 75, 75, 153, 243, 152, 244, 241, 163,
765  249, 172, 172, 358, 75, 156, 75, 155, 170, 154,
766 
767  168, 172, 75, 75, 486, 169, 171, 172, 157, 75,
768  75, 75, 75, 75, 75, 163, 75, 175, 175, 75,
769  75, 178, 75, 176, 170, 177, 168, 175, 75, 75,
770  173, 169, 171, 175, 201, 183, 484, 75, 491, 179,
771  203, 488, 180, 184, 486, 75, 182, 75, 178, 75,
772  176, 75, 177, 181, 75, 75, 173, 75, 75, 75,
773  141, 201, 183, 75, 75, 179, 129, 203, 180, 184,
774  134, 142, 205, 182, 75, 126, 198, 130, 251, 181,
775  200, 131, 75, 75, 253, 135, 185, 141, 484, 358,
776  144, 144, 212, 75, 75, 75, 298, 142, 246, 205,
777 
778  144, 75, 247, 198, 251, 75, 144, 200, 214, 75,
779  253, 206, 185, 297, 207, 209, 209, 75, 75, 212,
780  239, 75, 215, 211, 211, 209, 210, 213, 75, 208,
781  75, 209, 216, 211, 75, 214, 75, 217, 206, 211,
782  75, 207, 75, 298, 75, 75, 75, 239, 215, 75,
783  246, 218, 412, 213, 247, 208, 75, 297, 199, 216,
784  219, 75, 221, 75, 217, 476, 172, 172, 75, 75,
785  75, 220, 194, 75, 222, 75, 172, 75, 218, 75,
786  75, 75, 172, 75, 75, 231, 223, 219, 232, 221,
787  376, 224, 224, 75, 229, 75, 233, 220, 230, 75,
788 
789  222, 224, 75, 75, 192, 75, 234, 224, 75, 75,
790  75, 190, 231, 223, 187, 232, 75, 236, 75, 248,
791  229, 174, 167, 233, 230, 75, 165, 235, 75, 250,
792  75, 237, 238, 234, 75, 75, 271, 75, 175, 175,
793  245, 246, 245, 236, 75, 247, 248, 242, 175, 242,
794  243, 75, 244, 235, 175, 256, 250, 237, 279, 238,
795  75, 252, 225, 271, 254, 255, 75, 281, 209, 209,
796  75, 226, 227, 162, 159, 75, 228, 149, 209, 75,
797  147, 256, 146, 259, 209, 279, 260, 252, 75, 225,
798  254, 255, 280, 257, 281, 75, 75, 226, 227, 262,
799 
800  75, 75, 228, 258, 75, 263, 263, 261, 266, 259,
801  75, 75, 260, 199, 75, 263, 75, 277, 280, 134,
802  257, 263, 278, 75, 264, 262, 268, 268, 265, 258,
803  75, 75, 267, 261, 266, 75, 268, 75, 269, 75,
804  75, 128, 268, 277, 282, 75, 75, 75, 278, 75,
805  264, 75, 270, 270, 265, 75, 295, 129, 267, 296,
806  286, 194, 270, 75, 269, 75, 288, 302, 270, 283,
807  192, 282, 75, 190, 306, 75, 308, 285, 284, 310,
808  75, 292, 75, 295, 75, 187, 296, 286, 293, 309,
809  75, 294, 311, 288, 302, 283, 287, 287, 75, 224,
810 
811  224, 306, 308, 285, 284, 310, 287, 75, 292, 224,
812  289, 289, 287, 174, 293, 224, 309, 294, 311, 272,
813  289, 75, 312, 273, 290, 290, 289, 274, 291, 291,
814  75, 167, 313, 275, 290, 75, 75, 276, 291, 75,
815  290, 336, 75, 327, 291, 299, 272, 75, 312, 165,
816  273, 328, 300, 319, 274, 301, 75, 303, 313, 275,
817  162, 314, 337, 276, 304, 75, 333, 305, 336, 327,
818  75, 75, 299, 75, 75, 307, 307, 328, 300, 159,
819  319, 301, 75, 339, 303, 307, 75, 75, 314, 337,
820  304, 307, 333, 305, 315, 315, 316, 316, 75, 75,
821 
822  341, 317, 354, 322, 315, 75, 316, 75, 75, 339,
823  315, 320, 316, 263, 263, 149, 321, 147, 146, 78,
824  74, 75, 75, 263, 359, 72, 341, 317, 354, 263,
825  322, 268, 268, 75, 75, 318, 270, 270, 320, 338,
826  75, 268, 75, 321, 325, 325, 270, 268, 329, 330,
827  359, 334, 270, 331, 325, 75, 340, 78, 332, 335,
828  325, 355, 318, 75, 75, 323, 338, 75, 356, 72,
829  324, 326, 78, 72, 329, 330, 129, 334, 128, 331,
830  360, 81, 78, 340, 332, 335, 346, 342, 355, 343,
831  75, 323, 74, 344, 344, 356, 324, 326, 75, 75,
832 
833  345, 345, 75, 344, 75, 75, 360, 287, 287, 344,
834  345, 75, 346, 342, 74, 343, 345, 287, 289, 289,
835  73, 348, 72, 287, 832, 290, 290, 361, 289, 362,
836  365, 347, 75, 363, 289, 290, 364, 366, 386, 75,
837  75, 290, 367, 832, 383, 350, 75, 351, 348, 352,
838  291, 291, 369, 390, 361, 349, 362, 365, 347, 363,
839  291, 832, 364, 832, 366, 386, 291, 75, 367, 307,
840  307, 383, 350, 374, 351, 375, 352, 380, 369, 307,
841  390, 349, 832, 353, 75, 307, 370, 370, 372, 372,
842  373, 373, 385, 368, 832, 391, 370, 371, 372, 374,
843 
844  373, 375, 370, 380, 372, 75, 373, 315, 315, 353,
845  382, 316, 316, 75, 393, 384, 384, 315, 385, 75,
846  368, 316, 391, 315, 395, 384, 75, 316, 381, 394,
847  379, 384, 396, 399, 392, 392, 382, 832, 397, 400,
848  75, 393, 325, 325, 392, 403, 377, 401, 75, 378,
849  392, 395, 325, 402, 381, 394, 405, 379, 325, 396,
850  399, 75, 387, 388, 397, 400, 398, 398, 404, 75,
851  413, 403, 377, 75, 401, 378, 398, 344, 344, 832,
852  402, 389, 398, 405, 832, 832, 407, 344, 411, 387,
853  388, 412, 406, 344, 404, 345, 345, 413, 414, 410,
854 
855  410, 75, 415, 416, 75, 345, 417, 389, 75, 410,
856  75, 345, 418, 407, 411, 410, 408, 419, 406, 420,
857  832, 422, 423, 424, 414, 425, 75, 426, 415, 416,
858  427, 428, 417, 430, 409, 429, 75, 431, 418, 433,
859  434, 435, 408, 419, 436, 75, 420, 422, 423, 424,
860  437, 438, 425, 426, 439, 75, 427, 428, 432, 430,
861  409, 75, 429, 441, 431, 433, 434, 447, 435, 832,
862  75, 436, 832, 832, 832, 451, 437, 438, 440, 832,
863  439, 832, 448, 832, 432, 443, 443, 444, 444, 441,
864  75, 449, 442, 450, 447, 443, 75, 444, 75, 446,
865 
866  446, 443, 451, 444, 440, 75, 384, 384, 448, 446,
867  452, 392, 392, 454, 454, 446, 384, 449, 442, 450,
868  463, 392, 384, 454, 455, 457, 832, 392, 458, 454,
869  459, 75, 464, 75, 468, 453, 452, 456, 456, 465,
870  445, 466, 75, 832, 398, 398, 463, 456, 467, 467,
871  472, 832, 457, 456, 398, 458, 479, 459, 467, 464,
872  398, 468, 453, 473, 467, 465, 445, 466, 460, 469,
873  469, 832, 475, 470, 478, 480, 472, 75, 461, 469,
874  471, 471, 462, 479, 481, 469, 832, 410, 410, 473,
875  471, 75, 832, 501, 832, 460, 471, 410, 475, 470,
876 
877  478, 480, 502, 410, 461, 482, 482, 832, 462, 474,
878  481, 484, 493, 486, 495, 482, 488, 497, 491, 499,
879  501, 482, 503, 500, 500, 504, 75, 493, 502, 495,
880  505, 75, 497, 500, 499, 508, 474, 507, 507, 500,
881  506, 75, 512, 512, 443, 443, 514, 507, 520, 503,
882  521, 504, 512, 507, 443, 516, 505, 832, 512, 832,
883  443, 518, 508, 509, 446, 446, 75, 506, 519, 517,
884  517, 524, 513, 514, 446, 520, 75, 521, 510, 517,
885  446, 516, 525, 511, 526, 517, 527, 518, 515, 509,
886  522, 523, 530, 531, 519, 528, 532, 524, 513, 832,
887 
888  529, 534, 832, 535, 510, 832, 832, 537, 525, 511,
889  526, 543, 527, 832, 832, 515, 522, 523, 530, 541,
890  531, 528, 832, 532, 533, 533, 529, 544, 534, 535,
891  542, 467, 467, 537, 533, 469, 469, 543, 539, 539,
892  533, 467, 471, 471, 832, 469, 541, 467, 539, 75,
893  549, 469, 471, 544, 539, 545, 545, 542, 471, 538,
894  545, 545, 546, 547, 548, 545, 536, 484, 493, 477,
895  545, 545, 832, 551, 832, 832, 545, 549, 486, 495,
896  540, 482, 482, 493, 75, 832, 538, 557, 546, 547,
897  548, 482, 536, 554, 495, 488, 497, 482, 491, 499,
898 
899  551, 550, 552, 552, 555, 832, 540, 75, 559, 560,
900  561, 497, 552, 557, 499, 832, 558, 558, 552, 563,
901  554, 832, 556, 512, 512, 832, 558, 75, 550, 567,
902  832, 555, 558, 512, 559, 832, 560, 561, 572, 512,
903  562, 562, 75, 570, 571, 563, 573, 564, 564, 556,
904  562, 517, 517, 513, 575, 567, 562, 564, 568, 568,
905  574, 517, 75, 564, 572, 569, 569, 517, 568, 576,
906  570, 571, 565, 573, 568, 569, 577, 578, 579, 513,
907  575, 569, 580, 581, 583, 583, 584, 574, 586, 832,
908  566, 533, 533, 585, 583, 587, 576, 588, 589, 565,
909 
910  583, 533, 590, 577, 578, 579, 591, 533, 580, 581,
911  592, 593, 595, 584, 586, 582, 566, 594, 596, 597,
912  585, 587, 598, 588, 599, 589, 600, 601, 75, 590,
913  603, 832, 591, 606, 832, 607, 592, 832, 593, 595,
914  608, 602, 582, 594, 596, 832, 597, 620, 598, 611,
915  599, 612, 600, 601, 558, 558, 603, 605, 605, 613,
916  606, 607, 614, 75, 558, 832, 608, 605, 602, 832,
917  558, 609, 609, 605, 620, 611, 604, 612, 624, 615,
918  615, 609, 617, 617, 621, 613, 622, 609, 614, 615,
919  616, 623, 617, 625, 629, 615, 619, 619, 617, 626,
920 
921  627, 628, 630, 604, 624, 610, 619, 631, 632, 633,
922  634, 621, 619, 622, 635, 637, 638, 643, 623, 639,
923  625, 629, 636, 636, 640, 626, 627, 628, 630, 641,
924  642, 610, 636, 631, 632, 644, 633, 634, 636, 646,
925  635, 647, 637, 638, 643, 639, 649, 645, 645, 832,
926  640, 651, 605, 605, 656, 641, 642, 645, 75, 650,
927  650, 644, 605, 645, 652, 646, 653, 647, 605, 650,
928  609, 609, 649, 654, 655, 650, 648, 832, 651, 657,
929  609, 656, 658, 659, 661, 662, 609, 663, 832, 832,
930  652, 665, 653, 75, 666, 667, 660, 660, 670, 654,
931 
932  655, 668, 671, 648, 610, 657, 660, 672, 658, 659,
933  661, 662, 660, 673, 663, 664, 664, 665, 674, 675,
934  666, 667, 669, 669, 670, 664, 676, 677, 668, 671,
935  610, 664, 669, 672, 678, 679, 832, 680, 669, 681,
936  673, 682, 682, 683, 674, 685, 675, 832, 684, 684,
937  688, 682, 676, 689, 677, 690, 832, 682, 684, 693,
938  710, 678, 679, 680, 684, 681, 686, 686, 832, 683,
939  694, 685, 695, 687, 687, 832, 686, 688, 691, 691,
940  689, 690, 686, 687, 698, 832, 693, 710, 691, 687,
941  664, 664, 701, 832, 691, 702, 694, 703, 695, 711,
942 
943  664, 697, 697, 699, 699, 832, 664, 704, 692, 705,
944  698, 697, 707, 699, 696, 700, 700, 697, 701, 699,
945  708, 702, 709, 703, 712, 700, 711, 713, 713, 715,
946  715, 700, 717, 704, 692, 705, 719, 713, 707, 715,
947  721, 696, 832, 713, 723, 715, 708, 724, 709, 832,
948  712, 725, 684, 684, 720, 720, 691, 691, 717, 722,
949  722, 714, 684, 719, 720, 726, 691, 721, 684, 722,
950  720, 723, 691, 724, 728, 722, 716, 725, 727, 727,
951  729, 730, 832, 732, 733, 832, 692, 714, 727, 734,
952  737, 726, 735, 738, 727, 739, 832, 736, 736, 742,
953 
954  728, 743, 744, 716, 745, 832, 729, 736, 730, 732,
955  746, 733, 692, 736, 713, 713, 734, 737, 735, 747,
956  738, 739, 740, 740, 713, 742, 748, 743, 744, 749,
957  713, 745, 740, 750, 750, 753, 746, 752, 740, 754,
958  751, 751, 755, 750, 757, 747, 758, 832, 714, 750,
959  751, 760, 748, 832, 761, 749, 751, 756, 756, 763,
960  832, 741, 753, 752, 832, 754, 832, 756, 832, 755,
961  757, 832, 758, 756, 714, 759, 759, 760, 740, 740,
962  761, 766, 762, 762, 774, 759, 763, 741, 740, 764,
963  764, 759, 762, 768, 740, 769, 765, 765, 762, 764,
964 
965  767, 767, 770, 771, 772, 764, 765, 766, 775, 775,
966  767, 774, 765, 778, 832, 779, 767, 741, 775, 768,
967  832, 769, 756, 756, 775, 759, 759, 781, 770, 771,
968  772, 783, 756, 782, 785, 759, 777, 777, 756, 786,
969  778, 759, 779, 741, 773, 792, 777, 780, 780, 776,
970  832, 787, 777, 781, 788, 788, 790, 780, 783, 782,
971  791, 785, 794, 780, 788, 786, 795, 832, 793, 793,
972  788, 773, 792, 797, 796, 798, 776, 787, 793, 799,
973  800, 832, 790, 832, 793, 803, 791, 788, 788, 794,
974  812, 804, 795, 789, 801, 801, 832, 788, 805, 797,
975 
976  796, 798, 806, 788, 801, 799, 800, 802, 802, 809,
977  801, 815, 803, 813, 807, 807, 812, 802, 804, 789,
978  814, 808, 808, 802, 807, 805, 789, 816, 817, 806,
979  807, 808, 810, 810, 810, 810, 809, 808, 815, 813,
980  818, 832, 810, 819, 810, 832, 814, 832, 810, 820,
981  810, 823, 789, 816, 817, 824, 821, 821, 822, 822,
982  832, 827, 828, 832, 829, 832, 821, 818, 822, 819,
983  832, 811, 821, 811, 822, 820, 825, 825, 823, 825,
984  825, 832, 824, 832, 830, 830, 825, 827, 828, 825,
985  829, 832, 825, 832, 830, 825, 832, 811, 832, 811,
986 
987  830, 831, 831, 832, 832, 832, 832, 832, 832, 832,
988  832, 831, 832, 832, 832, 826, 832, 831, 826, 832,
989  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
990  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
991  832, 826, 832, 832, 826, 60, 60, 60, 60, 60,
992  60, 60, 68, 68, 68, 68, 68, 68, 68, 77,
993  77, 832, 77, 122, 832, 122, 122, 122, 122, 122,
994  136, 832, 832, 136, 136, 832, 136, 140, 140, 145,
995  832, 145, 145, 145, 145, 145, 148, 832, 148, 148,
996  148, 148, 148, 158, 832, 158, 158, 158, 158, 158,
997 
998  161, 832, 161, 161, 161, 161, 161, 164, 832, 164,
999  164, 164, 164, 164, 166, 832, 166, 166, 166, 166,
1000  166, 186, 832, 186, 186, 186, 186, 186, 189, 832,
1001  189, 189, 189, 189, 189, 191, 832, 191, 191, 191,
1002  191, 191, 193, 832, 193, 193, 193, 193, 193, 477,
1003  832, 477, 483, 483, 483, 483, 483, 483, 483, 485,
1004  485, 485, 485, 485, 485, 485, 487, 487, 487, 487,
1005  487, 487, 487, 489, 832, 489, 489, 489, 489, 489,
1006  490, 490, 490, 490, 490, 490, 490, 492, 492, 492,
1007  492, 492, 492, 492, 494, 494, 494, 494, 494, 494,
1008 
1009  494, 496, 496, 496, 496, 496, 496, 496, 498, 498,
1010  498, 498, 498, 498, 498, 493, 493, 493, 493, 493,
1011  493, 493, 495, 495, 495, 495, 495, 495, 495, 497,
1012  497, 497, 497, 497, 497, 497, 499, 499, 499, 499,
1013  499, 499, 499, 11, 832, 832, 832, 832, 832, 832,
1014  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1015  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1016  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1017  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1018  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1019 
1020  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1021  832, 832, 832, 832, 832, 832, 832, 832
1022  } ;
1023 
1025  { 0,
1026  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1027  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1028  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1029  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1030  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1031  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1032  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1033  1, 1, 1, 1, 2, 847, 2, 3, 3, 3,
1034  3, 4, 3, 4, 842, 24, 7, 7, 24, 4,
1035  4, 4, 4, 32, 4, 5, 5, 5, 34, 6,
1036 
1037  5, 6, 7, 8, 8, 41, 8, 6, 6, 6,
1038  27, 27, 6, 49, 7, 49, 42, 771, 705, 8,
1039  24, 51, 41, 51, 34, 688, 675, 34, 32, 42,
1040  53, 8, 53, 34, 56, 573, 31, 31, 56, 31,
1041  41, 7, 295, 36, 36, 31, 36, 503, 35, 41,
1042  34, 42, 36, 34, 499, 295, 42, 30, 8, 9,
1043  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1044  9, 30, 9, 9, 35, 9, 9, 9, 9, 9,
1045  31, 37, 39, 35, 46, 30, 57, 36, 55, 55,
1046  57, 55, 30, 58, 63, 39, 497, 58, 30, 495,
1047 
1048  35, 46, 64, 37, 64, 39, 9, 70, 127, 70,
1049  127, 30, 47, 47, 132, 47, 37, 39, 132, 46,
1050  63, 47, 39, 55, 75, 77, 59, 59, 46, 37,
1051  59, 39, 9, 10, 10, 10, 10, 10, 10, 10,
1052  10, 10, 10, 10, 10, 38, 10, 10, 38, 10,
1053  10, 10, 10, 10, 38, 43, 47, 40, 125, 75,
1054  77, 44, 59, 493, 490, 40, 43, 38, 45, 487,
1055  48, 38, 43, 48, 50, 76, 139, 44, 76, 48,
1056  10, 242, 50, 242, 125, 50, 43, 40, 123, 38,
1057  43, 82, 45, 43, 38, 40, 44, 142, 38, 43,
1058 
1059  40, 50, 139, 45, 44, 485, 10, 33, 50, 65,
1060  76, 50, 43, 40, 48, 123, 71, 88, 45, 82,
1061  65, 40, 124, 142, 83, 83, 82, 71, 196, 33,
1062  33, 89, 33, 483, 83, 83, 65, 33, 87, 33,
1063  83, 88, 33, 71, 90, 82, 65, 93, 92, 124,
1064  87, 430, 88, 71, 196, 33, 33, 90, 33, 98,
1065  89, 91, 197, 33, 202, 33, 89, 88, 94, 93,
1066  83, 92, 91, 87, 103, 429, 102, 87, 101, 90,
1067  358, 94, 93, 92, 90, 244, 89, 244, 197, 98,
1068  202, 104, 104, 358, 98, 93, 91, 92, 102, 91,
1069 
1070  101, 104, 104, 94, 428, 101, 103, 104, 94, 103,
1071  107, 102, 109, 101, 108, 98, 110, 106, 106, 111,
1072  114, 109, 113, 107, 102, 108, 101, 106, 106, 112,
1073  104, 101, 103, 106, 138, 113, 427, 104, 422, 109,
1074  141, 420, 110, 114, 419, 107, 112, 109, 109, 108,
1075  107, 110, 108, 111, 111, 114, 104, 113, 115, 143,
1076  121, 138, 113, 106, 112, 109, 129, 141, 110, 114,
1077  134, 121, 143, 112, 130, 130, 129, 130, 204, 111,
1078  134, 135, 135, 152, 206, 135, 115, 121, 418, 357,
1079  144, 144, 152, 115, 143, 154, 298, 121, 245, 143,
1080 
1081  144, 155, 245, 129, 204, 153, 144, 134, 154, 130,
1082  206, 144, 115, 297, 144, 150, 150, 135, 152, 152,
1083  195, 156, 155, 151, 151, 150, 150, 153, 157, 144,
1084  154, 150, 156, 151, 151, 154, 155, 157, 144, 151,
1085  153, 144, 163, 246, 169, 168, 171, 195, 155, 170,
1086  247, 163, 412, 153, 247, 144, 156, 243, 199, 156,
1087  168, 150, 170, 157, 157, 412, 172, 172, 176, 151,
1088  177, 169, 193, 178, 171, 179, 172, 163, 163, 169,
1089  168, 171, 172, 180, 170, 178, 172, 168, 179, 170,
1090  314, 173, 173, 181, 176, 183, 180, 169, 177, 182,
1091 
1092  171, 173, 173, 176, 191, 177, 181, 173, 178, 184,
1093  179, 189, 178, 172, 186, 179, 185, 183, 180, 201,
1094  176, 174, 166, 180, 177, 314, 164, 182, 181, 203,
1095  183, 184, 185, 181, 182, 205, 223, 173, 175, 175,
1096  200, 200, 200, 183, 184, 200, 201, 198, 175, 198,
1097  198, 185, 198, 182, 175, 208, 203, 184, 226, 185,
1098  210, 205, 175, 223, 207, 207, 212, 228, 209, 209,
1099  205, 175, 175, 161, 158, 214, 175, 148, 209, 213,
1100  147, 208, 145, 210, 209, 226, 212, 205, 218, 175,
1101  207, 207, 227, 209, 228, 210, 216, 175, 175, 214,
1102 
1103  217, 212, 175, 209, 219, 215, 215, 213, 218, 210,
1104  214, 221, 212, 133, 213, 215, 215, 225, 227, 131,
1105  209, 215, 225, 218, 216, 214, 220, 220, 217, 209,
1106  229, 216, 219, 213, 218, 217, 220, 220, 221, 219,
1107  230, 128, 220, 225, 229, 231, 221, 233, 225, 232,
1108  216, 215, 222, 222, 217, 235, 240, 126, 219, 241,
1109  233, 120, 222, 222, 221, 229, 235, 249, 222, 230,
1110  119, 229, 220, 118, 251, 230, 253, 232, 231, 255,
1111  231, 239, 233, 240, 232, 116, 241, 233, 239, 254,
1112  235, 239, 256, 235, 249, 230, 234, 234, 222, 224,
1113 
1114  224, 251, 253, 232, 231, 255, 234, 234, 239, 224,
1115  236, 236, 234, 105, 239, 224, 254, 239, 256, 224,
1116  236, 236, 257, 224, 237, 237, 236, 224, 238, 238,
1117  442, 100, 258, 224, 237, 237, 264, 224, 238, 238,
1118  237, 276, 234, 271, 238, 248, 224, 259, 257, 99,
1119  224, 272, 248, 264, 224, 248, 236, 250, 258, 224,
1120  97, 259, 277, 224, 250, 442, 274, 250, 276, 271,
1121  237, 264, 248, 262, 238, 252, 252, 272, 248, 95,
1122  264, 248, 259, 279, 250, 252, 252, 267, 259, 277,
1123  250, 252, 274, 250, 260, 260, 261, 261, 265, 266,
1124 
1125  281, 262, 292, 267, 260, 260, 261, 261, 262, 279,
1126  260, 265, 261, 263, 263, 86, 266, 85, 84, 78,
1127  74, 252, 267, 263, 296, 72, 281, 262, 292, 263,
1128  267, 268, 268, 265, 266, 263, 270, 270, 265, 278,
1129  260, 268, 261, 266, 269, 269, 270, 268, 273, 273,
1130  296, 275, 270, 273, 269, 269, 280, 69, 273, 275,
1131  269, 293, 263, 283, 286, 268, 278, 282, 294, 67,
1132  268, 270, 62, 61, 273, 273, 54, 275, 52, 273,
1133  299, 29, 26, 280, 273, 275, 286, 282, 293, 283,
1134  269, 268, 21, 284, 284, 294, 268, 270, 283, 286,
1135 
1136  285, 285, 282, 284, 284, 288, 299, 287, 287, 284,
1137  285, 285, 286, 282, 20, 283, 285, 287, 289, 289,
1138  19, 288, 14, 287, 11, 290, 290, 300, 289, 301,
1139  304, 287, 321, 302, 289, 290, 303, 305, 324, 284,
1140  288, 290, 306, 0, 321, 290, 285, 290, 288, 290,
1141  291, 291, 308, 326, 300, 289, 301, 304, 287, 302,
1142  291, 0, 303, 0, 305, 324, 291, 321, 306, 307,
1143  307, 321, 290, 312, 290, 313, 290, 318, 308, 307,
1144  326, 289, 0, 291, 320, 307, 309, 309, 310, 310,
1145  311, 311, 323, 307, 0, 327, 309, 309, 310, 312,
1146 
1147  311, 313, 309, 318, 310, 319, 311, 315, 315, 291,
1148  320, 316, 316, 317, 329, 322, 322, 315, 323, 320,
1149  307, 316, 327, 315, 331, 322, 322, 316, 319, 330,
1150  317, 322, 332, 335, 328, 328, 320, 0, 333, 336,
1151  319, 329, 325, 325, 328, 339, 315, 337, 317, 316,
1152  328, 331, 325, 338, 319, 330, 341, 317, 325, 332,
1153  335, 322, 325, 325, 333, 336, 334, 334, 340, 342,
1154  349, 339, 315, 343, 337, 316, 334, 344, 344, 0,
1155  338, 325, 334, 341, 0, 0, 343, 344, 347, 325,
1156  325, 348, 342, 344, 340, 345, 345, 349, 350, 346,
1157 
1158  346, 348, 351, 352, 342, 345, 353, 325, 343, 346,
1159  346, 345, 354, 343, 347, 346, 344, 355, 342, 356,
1160  0, 359, 360, 361, 350, 362, 376, 363, 351, 352,
1161  364, 365, 353, 367, 345, 366, 348, 368, 354, 369,
1162  371, 374, 344, 355, 375, 346, 356, 359, 360, 361,
1163  376, 377, 362, 363, 378, 379, 364, 365, 368, 367,
1164  345, 376, 366, 380, 368, 369, 371, 386, 374, 0,
1165  381, 375, 0, 0, 0, 390, 376, 377, 379, 0,
1166  378, 0, 387, 0, 368, 382, 382, 383, 383, 380,
1167  379, 388, 381, 389, 386, 382, 382, 383, 383, 385,
1168 
1169  385, 382, 390, 383, 379, 381, 384, 384, 387, 385,
1170  391, 392, 392, 393, 393, 385, 384, 388, 381, 389,
1171  399, 392, 384, 393, 393, 395, 0, 392, 396, 393,
1172  397, 382, 400, 383, 404, 392, 391, 394, 394, 401,
1173  384, 402, 406, 0, 398, 398, 399, 394, 403, 403,
1174  408, 0, 395, 394, 398, 396, 414, 397, 403, 400,
1175  398, 404, 392, 409, 403, 401, 384, 402, 398, 405,
1176  405, 0, 411, 406, 413, 415, 408, 406, 398, 405,
1177  407, 407, 398, 414, 416, 405, 0, 410, 410, 409,
1178  407, 407, 0, 432, 0, 398, 407, 410, 411, 406,
1179 
1180  413, 415, 433, 410, 398, 417, 417, 0, 398, 410,
1181  416, 423, 423, 424, 424, 417, 425, 425, 426, 426,
1182  432, 417, 434, 431, 431, 435, 407, 423, 433, 424,
1183  436, 437, 425, 431, 426, 439, 410, 438, 438, 431,
1184  437, 440, 444, 444, 443, 443, 445, 438, 451, 434,
1185  452, 435, 444, 438, 443, 447, 436, 0, 444, 0,
1186  443, 449, 439, 440, 446, 446, 437, 437, 450, 448,
1187  448, 455, 444, 445, 446, 451, 440, 452, 443, 448,
1188  446, 447, 457, 443, 458, 448, 459, 449, 446, 440,
1189  453, 453, 461, 462, 450, 460, 463, 455, 444, 0,
1190 
1191  460, 465, 0, 466, 443, 0, 0, 468, 457, 443,
1192  458, 474, 459, 0, 0, 446, 453, 453, 461, 472,
1193  462, 460, 0, 463, 464, 464, 460, 475, 465, 466,
1194  473, 467, 467, 468, 464, 469, 469, 474, 470, 470,
1195  464, 467, 471, 471, 0, 469, 472, 467, 470, 470,
1196  481, 469, 471, 475, 470, 476, 476, 473, 471, 469,
1197  477, 477, 478, 479, 480, 476, 467, 492, 492, 476,
1198  477, 476, 0, 501, 0, 0, 477, 481, 494, 494,
1199  471, 482, 482, 492, 470, 0, 469, 508, 478, 479,
1200  480, 482, 467, 504, 494, 496, 496, 482, 498, 498,
1201 
1202  501, 482, 502, 502, 505, 0, 471, 506, 510, 511,
1203  513, 496, 502, 508, 498, 0, 509, 509, 502, 515,
1204  504, 0, 506, 512, 512, 0, 509, 509, 482, 518,
1205  0, 505, 509, 512, 510, 0, 511, 513, 523, 512,
1206  514, 514, 506, 521, 522, 515, 524, 516, 516, 506,
1207  514, 517, 517, 512, 526, 518, 514, 516, 519, 519,
1208  525, 517, 509, 516, 523, 520, 520, 517, 519, 527,
1209  521, 522, 517, 524, 519, 520, 528, 529, 530, 512,
1210  526, 520, 531, 532, 534, 534, 535, 525, 537, 0,
1211  517, 533, 533, 536, 534, 538, 527, 540, 541, 517,
1212 
1213  534, 533, 542, 528, 529, 530, 543, 533, 531, 532,
1214  544, 546, 548, 535, 537, 533, 517, 547, 549, 550,
1215  536, 538, 551, 540, 553, 541, 554, 555, 556, 542,
1216  557, 0, 543, 560, 0, 561, 544, 0, 546, 548,
1217  563, 556, 533, 547, 549, 0, 550, 575, 551, 565,
1218  553, 566, 554, 555, 558, 558, 557, 559, 559, 567,
1219  560, 561, 570, 556, 558, 0, 563, 559, 556, 0,
1220  558, 564, 564, 559, 575, 565, 558, 566, 579, 571,
1221  571, 564, 572, 572, 576, 567, 577, 564, 570, 571,
1222  571, 578, 572, 580, 585, 571, 574, 574, 572, 581,
1223 
1224  582, 584, 586, 558, 579, 564, 574, 587, 588, 589,
1225  590, 576, 574, 577, 591, 593, 594, 599, 578, 595,
1226  580, 585, 592, 592, 596, 581, 582, 584, 586, 597,
1227  598, 564, 592, 587, 588, 600, 589, 590, 592, 603,
1228  591, 604, 593, 594, 599, 595, 606, 602, 602, 0,
1229  596, 608, 605, 605, 614, 597, 598, 602, 602, 607,
1230  607, 600, 605, 602, 610, 603, 611, 604, 605, 607,
1231  609, 609, 606, 612, 613, 607, 605, 0, 608, 616,
1232  609, 614, 618, 620, 622, 623, 609, 624, 0, 0,
1233  610, 626, 611, 602, 627, 628, 621, 621, 631, 612,
1234 
1235  613, 629, 632, 605, 609, 616, 621, 635, 618, 620,
1236  622, 623, 621, 637, 624, 625, 625, 626, 638, 639,
1237  627, 628, 630, 630, 631, 625, 640, 641, 629, 632,
1238  609, 625, 630, 635, 642, 643, 0, 647, 630, 648,
1239  637, 649, 649, 651, 638, 653, 639, 0, 652, 652,
1240  657, 649, 640, 658, 641, 659, 0, 649, 652, 661,
1241  679, 642, 643, 647, 652, 648, 654, 654, 0, 651,
1242  662, 653, 663, 655, 655, 0, 654, 657, 660, 660,
1243  658, 659, 654, 655, 666, 0, 661, 679, 660, 655,
1244  664, 664, 670, 0, 660, 671, 662, 672, 663, 680,
1245 
1246  664, 665, 665, 667, 667, 0, 664, 673, 660, 674,
1247  666, 665, 676, 667, 664, 668, 668, 665, 670, 667,
1248  677, 671, 678, 672, 681, 668, 680, 682, 682, 683,
1249  683, 668, 685, 673, 660, 674, 689, 682, 676, 683,
1250  692, 664, 0, 682, 694, 683, 677, 695, 678, 0,
1251  681, 696, 684, 684, 690, 690, 691, 691, 685, 693,
1252  693, 682, 684, 689, 690, 698, 691, 692, 684, 693,
1253  690, 694, 691, 695, 702, 693, 684, 696, 701, 701,
1254  703, 704, 0, 706, 707, 0, 691, 682, 701, 708,
1255  711, 698, 709, 712, 701, 714, 0, 710, 710, 716,
1256 
1257  702, 717, 718, 684, 719, 0, 703, 710, 704, 706,
1258  721, 707, 691, 710, 713, 713, 708, 711, 709, 723,
1259  712, 714, 715, 715, 713, 716, 724, 717, 718, 725,
1260  713, 719, 715, 726, 726, 732, 721, 731, 715, 733,
1261  730, 730, 734, 726, 737, 723, 738, 0, 713, 726,
1262  730, 741, 724, 0, 742, 725, 730, 735, 735, 744,
1263  0, 715, 732, 731, 0, 733, 0, 735, 0, 734,
1264  737, 0, 738, 735, 713, 739, 739, 741, 740, 740,
1265  742, 747, 743, 743, 757, 739, 744, 715, 740, 745,
1266  745, 739, 743, 749, 740, 752, 746, 746, 743, 745,
1267 
1268  748, 748, 753, 754, 755, 745, 746, 747, 758, 758,
1269  748, 757, 746, 761, 0, 763, 748, 740, 758, 749,
1270  0, 752, 756, 756, 758, 759, 759, 768, 753, 754,
1271  755, 770, 756, 769, 772, 759, 760, 760, 756, 773,
1272  761, 759, 763, 740, 756, 779, 760, 766, 766, 759,
1273  0, 774, 760, 768, 775, 775, 776, 766, 770, 769,
1274  778, 772, 782, 766, 775, 773, 784, 0, 781, 781,
1275  775, 756, 779, 786, 784, 787, 759, 774, 781, 789,
1276  790, 0, 776, 0, 781, 794, 778, 788, 788, 782,
1277  803, 795, 784, 775, 791, 791, 0, 788, 796, 786,
1278 
1279  784, 787, 797, 788, 791, 789, 790, 792, 792, 800,
1280  791, 806, 794, 804, 798, 798, 803, 792, 795, 775,
1281  805, 799, 799, 792, 798, 796, 788, 809, 811, 797,
1282  798, 799, 801, 801, 810, 810, 800, 799, 806, 804,
1283  813, 0, 801, 814, 810, 0, 805, 0, 801, 815,
1284  810, 819, 788, 809, 811, 820, 816, 816, 817, 817,
1285  0, 824, 826, 0, 827, 0, 816, 813, 817, 814,
1286  0, 801, 816, 810, 817, 815, 821, 821, 819, 825,
1287  825, 0, 820, 0, 828, 828, 821, 824, 826, 825,
1288  827, 0, 821, 0, 828, 825, 0, 801, 0, 810,
1289 
1290  828, 829, 829, 0, 0, 0, 0, 0, 0, 0,
1291  0, 829, 0, 0, 0, 821, 0, 829, 825, 0,
1292  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1293  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1294  0, 821, 0, 0, 825, 833, 833, 833, 833, 833,
1295  833, 833, 834, 834, 834, 834, 834, 834, 834, 835,
1296  835, 0, 835, 836, 0, 836, 836, 836, 836, 836,
1297  837, 0, 0, 837, 837, 0, 837, 838, 838, 839,
1298  0, 839, 839, 839, 839, 839, 840, 0, 840, 840,
1299  840, 840, 840, 841, 0, 841, 841, 841, 841, 841,
1300 
1301  843, 0, 843, 843, 843, 843, 843, 844, 0, 844,
1302  844, 844, 844, 844, 845, 0, 845, 845, 845, 845,
1303  845, 846, 0, 846, 846, 846, 846, 846, 848, 0,
1304  848, 848, 848, 848, 848, 849, 0, 849, 849, 849,
1305  849, 849, 850, 0, 850, 850, 850, 850, 850, 851,
1306  0, 851, 852, 852, 852, 852, 852, 852, 852, 853,
1307  853, 853, 853, 853, 853, 853, 854, 854, 854, 854,
1308  854, 854, 854, 855, 0, 855, 855, 855, 855, 855,
1309  856, 856, 856, 856, 856, 856, 856, 857, 857, 857,
1310  857, 857, 857, 857, 858, 858, 858, 858, 858, 858,
1311 
1312  858, 859, 859, 859, 859, 859, 859, 859, 860, 860,
1313  860, 860, 860, 860, 860, 861, 861, 861, 861, 861,
1314  861, 861, 862, 862, 862, 862, 862, 862, 862, 863,
1315  863, 863, 863, 863, 863, 863, 864, 864, 864, 864,
1316  864, 864, 864, 832, 832, 832, 832, 832, 832, 832,
1317  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1318  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1319  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1320  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1321  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1322 
1323  832, 832, 832, 832, 832, 832, 832, 832, 832, 832,
1324  832, 832, 832, 832, 832, 832, 832, 832
1325  } ;
1326 
1327 static yy_state_type yy_last_accepting_state;
1329 
1330 extern int yy_flex_debug;
1331 int yy_flex_debug = 0;
1332 
1333 /* The intent behind this definition is that it'll catch
1334  * any uses of REJECT which flex missed.
1335  */
1336 #define REJECT reject_used_but_not_detected
1337 #define yymore() yymore_used_but_not_detected
1338 #define YY_MORE_ADJ 0
1339 #define YY_RESTORE_YY_MORE_OFFSET
1340 char *yytext;
1341 #line 1 "scanner.l"
1342 /*
1343  Copyright (C) 2001-2012, 2014-2016 Free Software Foundation, Inc.
1344  Written by Keisuke Nishida, Roger While, Simon Sobisch
1345 
1346  This file is part of GnuCOBOL.
1347 
1348  The GnuCOBOL compiler is free software: you can redistribute it
1349  and/or modify it under the terms of the GNU General Public License
1350  as published by the Free Software Foundation, either version 3 of the
1351  License, or (at your option) any later version.
1352 
1353  GnuCOBOL is distributed in the hope that it will be useful,
1354  but WITHOUT ANY WARRANTY; without even the implied warranty of
1355  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1356  GNU General Public License for more details.
1357 
1358  You should have received a copy of the GNU General Public License
1359  along with GnuCOBOL. If not, see <http://www.gnu.org/licenses/>.
1360 */
1361 #line 47 "scanner.l"
1362 
1363 #undef YY_READ_BUF_SIZE
1364 #define YY_READ_BUF_SIZE 32768
1365 #undef YY_BUF_SIZE
1366 #define YY_BUF_SIZE 32768
1367 
1368 #define YY_SKIP_YYWRAP
1369 static int yywrap (void) {
1370  return 1;
1371 }
1372 
1373 #define YY_INPUT(buf,result,max_size) \
1374  { \
1375  if (fgets (buf, (int)max_size, yyin) == NULL) { \
1376  result = YY_NULL; \
1377  } else { \
1378  result = strlen (buf); \
1379  } \
1380  }
1381 
1382 #define YY_USER_INIT \
1383  if (!plexbuff) { \
1384  plexsize = COB_MINI_BUFF; \
1385  plexbuff = cobc_malloc (plexsize); \
1386  } \
1387  if (!picbuff1) { \
1388  pic1size = COB_MINI_BUFF; \
1389  picbuff1 = cobc_malloc (pic1size); \
1390  } \
1391  if (!picbuff2) { \
1392  pic2size = COB_MINI_BUFF; \
1393  picbuff2 = cobc_malloc (pic2size); \
1394  }
1395 
1396 #include "config.h"
1397 
1398 #include <stdio.h>
1399 #include <stdlib.h>
1400 #include <string.h>
1401 #include <ctype.h>
1402 
1403 #ifdef HAVE_UNISTD_H
1404 #include <unistd.h>
1405 #else
1406 #define YY_NO_UNISTD_H 1
1407 #endif
1408 
1409 #define COB_IN_SCANNER 1
1410 #include "cobc.h"
1411 #include "tree.h"
1412 
1413 #define YYSTYPE cb_tree
1414 #include "parser.h"
1415 
1416 /* CONSTANT (78 level) structure */
1417 struct cb_level_78 {
1418  struct cb_level_78 *next; /* Next in chain */
1419  struct cb_level_78 *globnext; /* Continued next in chain */
1420  struct cb_level_78 *last; /* Last in chain */
1421  struct cb_field *fld78; /* Pointer to field */
1422  struct cb_program *prog; /* Program where defined */
1423  const char *pic_replace; /* Can replace in PICTURE */
1424  cob_u32_t name_len; /* Length of name */
1425  cob_u32_t pic_len; /* Length of pic_replace */
1426  cob_u32_t not_const; /* Invalid usage check */
1427  cob_u32_t chk_const; /* Check global level use */
1428 };
1429 
1433 };
1434 
1435 /* Local variables */
1436 static struct cb_level_78 *top78ptr = NULL;
1437 static struct cb_level_78 *const78ptr = NULL;
1438 static struct cb_level_78 *lev78ptr = NULL;
1439 static struct cb_level_78 *globlev78ptr = NULL;
1440 static char *plexbuff = NULL;
1441 static char *picbuff1 = NULL;
1442 static char *picbuff2 = NULL;
1443 static size_t plexsize;
1444 static size_t pic1size;
1445 static size_t pic2size;
1446 static unsigned int last_token_is_dot = 0;
1447 static unsigned int integer_is_label = 0;
1448 static unsigned int inside_bracket = 0;
1449 static unsigned int literal_error;
1450 static char err_msg[COB_MINI_BUFF];
1451 
1452 #ifdef HAVE_DESIGNATED_INITS
1453 static const unsigned char valid_char[256] = {
1454  ['-'] = 1,
1455  ['0'] = 1,
1456  ['1'] = 1,
1457  ['2'] = 1,
1458  ['3'] = 1,
1459  ['4'] = 1,
1460  ['5'] = 1,
1461  ['6'] = 1,
1462  ['7'] = 1,
1463  ['8'] = 1,
1464  ['9'] = 1,
1465  ['A'] = 1,
1466  ['B'] = 1,
1467  ['C'] = 1,
1468  ['D'] = 1,
1469  ['E'] = 1,
1470  ['F'] = 1,
1471  ['G'] = 1,
1472  ['H'] = 1,
1473  ['I'] = 1,
1474  ['J'] = 1,
1475  ['K'] = 1,
1476  ['L'] = 1,
1477  ['M'] = 1,
1478  ['N'] = 1,
1479  ['O'] = 1,
1480  ['P'] = 1,
1481  ['Q'] = 1,
1482  ['R'] = 1,
1483  ['S'] = 1,
1484  ['T'] = 1,
1485  ['U'] = 1,
1486  ['V'] = 1,
1487  ['W'] = 1,
1488  ['X'] = 1,
1489  ['Y'] = 1,
1490  ['Z'] = 1,
1491  ['_'] = 1,
1492  ['a'] = 1,
1493  ['b'] = 1,
1494  ['c'] = 1,
1495  ['d'] = 1,
1496  ['e'] = 1,
1497  ['f'] = 1,
1498  ['g'] = 1,
1499  ['h'] = 1,
1500  ['i'] = 1,
1501  ['j'] = 1,
1502  ['k'] = 1,
1503  ['l'] = 1,
1504  ['m'] = 1,
1505  ['n'] = 1,
1506  ['o'] = 1,
1507  ['p'] = 1,
1508  ['q'] = 1,
1509  ['r'] = 1,
1510  ['s'] = 1,
1511  ['t'] = 1,
1512  ['u'] = 1,
1513  ['v'] = 1,
1514  ['w'] = 1,
1515  ['x'] = 1,
1516  ['y'] = 1,
1517  ['z'] = 1
1518 };
1519 #else
1520 static unsigned char valid_char[256];
1521 static const unsigned char pvalid_char[] =
1522  "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
1523 #endif
1524 
1525 /* Function declarations */
1526 static void read_literal (const char);
1527 static int scan_x (const char *);
1528 static int scan_z (const char *, const cob_u32_t);
1529 static int scan_h (const char *, const cob_u32_t);
1530 static int scan_b (const char *, const cob_u32_t);
1531 static int scan_o (const char *);
1532 static int scan_numeric (const char *);
1533 static int scan_floating_numeric (const char *);
1534 static void scan_picture (const char *);
1535 static void count_lines (const char *);
1536 static void scan_define_options (const char *);
1537 static void scan_options (const char *, const unsigned int);
1538 
1539 
1540 
1541 #line 1541 "scanner.c"
1542 
1543 #define INITIAL 0
1544 #define DECIMAL_IS_PERIOD 1
1545 #define DECIMAL_IS_COMMA 2
1546 #define PICTURE_STATE 3
1547 #define FUNCTION_STATE 4
1548 
1549 #ifndef YY_NO_UNISTD_H
1550 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1551  * down here because we want the user's section 1 to have been scanned first.
1552  * The user has a chance to override it with an option.
1553  */
1554 #include <unistd.h>
1555 #endif
1556 
1557 #ifndef YY_EXTRA_TYPE
1558 #define YY_EXTRA_TYPE void *
1559 #endif
1560 
1561 static int yy_init_globals (void );
1562 
1563 /* Accessor methods to globals.
1564  These are made visible to non-reentrant scanners for convenience. */
1565 
1566 int yylex_destroy (void );
1567 
1568 /* Macros after this point can all be overridden by user definitions in
1569  * section 1.
1570  */
1571 
1572 #ifndef YY_SKIP_YYWRAP
1573 #ifdef __cplusplus
1574 extern "C" int yywrap (void );
1575 #else
1576 extern int yywrap (void );
1577 #endif
1578 #endif
1579 
1580  static void yyunput (int c,char *buf_ptr );
1581 
1582 #ifndef yytext_ptr
1583 static void yy_flex_strncpy (char *,yyconst char *,int );
1584 #endif
1585 
1586 #ifdef YY_NEED_STRLEN
1587 static int yy_flex_strlen (yyconst char * );
1588 #endif
1589 
1590 #ifndef YY_NO_INPUT
1591 
1592 #ifdef __cplusplus
1593 static int yyinput (void );
1594 #else
1595 static int input (void );
1596 #endif
1597 
1598 #endif
1599 
1600 /* Amount of stuff to slurp up with each read. */
1601 #ifndef YY_READ_BUF_SIZE
1602 #ifdef __ia64__
1603 /* On IA-64, the buffer size is 16k, not 8k */
1604 #define YY_READ_BUF_SIZE 16384
1605 #else
1606 #define YY_READ_BUF_SIZE 8192
1607 #endif /* __ia64__ */
1608 #endif
1609 
1610 /* Copy whatever the last rule matched to the standard output. */
1611 #ifndef ECHO
1612 /* This used to be an fputs(), but since the string might contain NUL's,
1613  * we now use fwrite().
1614  */
1615 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1616 #endif
1617 
1618 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1619  * is returned in "result".
1620  */
1621 #ifndef YY_INPUT
1622 #define YY_INPUT(buf,result,max_size) \
1623  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1624  { \
1625  int c = '*'; \
1626  size_t n; \
1627  for ( n = 0; n < max_size && \
1628  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1629  buf[n] = (char) c; \
1630  if ( c == '\n' ) \
1631  buf[n++] = (char) c; \
1632  if ( c == EOF && ferror( yyin ) ) \
1633  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1634  result = n; \
1635  } \
1636  else \
1637  { \
1638  errno=0; \
1639  while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1640  { \
1641  if( errno != EINTR) \
1642  { \
1643  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1644  break; \
1645  } \
1646  errno=0; \
1647  clearerr(yyin); \
1648  } \
1649  }\
1650 \
1651 
1652 #endif
1653 
1654 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1655  * we don't want an extra ';' after the "return" because that will cause
1656  * some compilers to complain about unreachable statements.
1657  */
1658 #ifndef yyterminate
1659 #define yyterminate() return YY_NULL
1660 #endif
1661 
1662 /* Number of entries by which start-condition stack grows. */
1663 #ifndef YY_START_STACK_INCR
1664 #define YY_START_STACK_INCR 25
1665 #endif
1666 
1667 /* Report a fatal error. */
1668 #ifndef YY_FATAL_ERROR
1669 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1670 #endif
1671 
1672 /* end tables serialization structures and prototypes */
1673 
1674 /* Default declaration of generated scanner - a define so the user can
1675  * easily add parameters.
1676  */
1677 #ifndef YY_DECL
1678 #define YY_DECL_IS_OURS 1
1679 
1680 extern int yylex (void);
1681 
1682 #define YY_DECL int yylex (void)
1683 #endif /* !YY_DECL */
1684 
1685 /* Code executed at the beginning of each rule, after yytext and yyleng
1686  * have been set up.
1687  */
1688 #ifndef YY_USER_ACTION
1689 #define YY_USER_ACTION
1690 #endif
1691 
1692 /* Code executed at the end of each rule. */
1693 #ifndef YY_BREAK
1694 #define YY_BREAK break;
1695 #endif
1696 
1697 #define YY_RULE_SETUP \
1698  if ( yyleng > 0 ) \
1699  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1700  (yytext[yyleng - 1] == '\n'); \
1701  YY_USER_ACTION
1702 
1703 /** The main scanner function which does all the work.
1704  */
1706 {
1707  register yy_state_type yy_current_state;
1708  register char *yy_cp, *yy_bp;
1709  register int yy_act;
1710 
1711  if ( !(yy_init) )
1712  {
1713  (yy_init) = 1;
1714 
1715 #ifdef YY_USER_INIT
1716  YY_USER_INIT;
1717 #endif
1718 
1719  if ( ! (yy_start) )
1720  (yy_start) = 1; /* first start state */
1721 
1722  if ( ! yyin )
1723  yyin = stdin;
1724 
1725  if ( ! yyout )
1726  yyout = stdout;
1727 
1728  if ( ! YY_CURRENT_BUFFER ) {
1732  }
1733 
1735  }
1736 
1737  {
1738 #line 229 "scanner.l"
1739 
1740 
1741 
1742  if (likely(current_program)) {
1743  if (current_program->decimal_point == '.') {
1745  } else {
1747  }
1748  }
1749 
1750  /* We treat integer literals immediately after '.' as labels;
1751  that is, they must be level numbers or section names. */
1752  if (last_token_is_dot) {
1753  integer_is_label = 1;
1754  last_token_is_dot = 0;
1755  } else {
1756  integer_is_label = 0;
1757  }
1758 
1759 
1760 
1761 #line 1761 "scanner.c"
1762 
1763  while ( 1 ) /* loops until end-of-file is reached */
1764  {
1765  yy_cp = (yy_c_buf_p);
1766 
1767  /* Support of yytext. */
1768  *yy_cp = (yy_hold_char);
1769 
1770  /* yy_bp points to the position in yy_ch_buf of the start of
1771  * the current run.
1772  */
1773  yy_bp = yy_cp;
1774 
1775  yy_current_state = (yy_start);
1776  yy_current_state += YY_AT_BOL();
1777 yy_match:
1778  do
1779  {
1780  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1781  if ( yy_accept[yy_current_state] )
1782  {
1783  (yy_last_accepting_state) = yy_current_state;
1784  (yy_last_accepting_cpos) = yy_cp;
1785  }
1786  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1787  {
1788  yy_current_state = (int) yy_def[yy_current_state];
1789  if ( yy_current_state >= 833 )
1790  yy_c = yy_meta[(unsigned int) yy_c];
1791  }
1792  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1793  ++yy_cp;
1794  }
1795  while ( yy_current_state != 832 );
1796  yy_cp = (yy_last_accepting_cpos);
1797  yy_current_state = (yy_last_accepting_state);
1798 
1799 yy_find_action:
1800  yy_act = yy_accept[yy_current_state];
1801 
1803 
1804 do_action: /* This label is used only to access EOF actions. */
1805 
1806  switch ( yy_act )
1807  { /* beginning of action switch */
1808  case 0: /* must back up */
1809  /* undo the effects of YY_DO_BEFORE_ACTION */
1810  *yy_cp = (yy_hold_char);
1811  yy_cp = (yy_last_accepting_cpos);
1812  yy_current_state = (yy_last_accepting_state);
1813  goto yy_find_action;
1814 
1815 case 1:
1816 /* rule 1 can match eol */
1818 #line 251 "scanner.l"
1819 {
1820  scan_define_options (yytext);
1821 }
1822  YY_BREAK
1823 case 2:
1824 /* rule 2 can match eol */
1826 #line 255 "scanner.l"
1827 {
1828  scan_options (yytext, 1);
1829 }
1830  YY_BREAK
1831 case 3:
1832 /* rule 3 can match eol */
1834 #line 259 "scanner.l"
1835 {
1836  scan_options (yytext, 2);
1837 }
1838  YY_BREAK
1839 case 4:
1840 /* rule 4 can match eol */
1842 #line 263 "scanner.l"
1843 {
1844  scan_options (yytext, 3);
1845 }
1846  YY_BREAK
1847 case 5:
1848 /* rule 5 can match eol */
1850 #line 267 "scanner.l"
1851 {
1852  cb_source_line++;
1853 }
1854  YY_BREAK
1855 case 6:
1857 #line 271 "scanner.l"
1858 {
1859  /* Line directive */
1860  char *p1;
1861  char *p2;
1862 
1863  p1 = strchr (yytext, '"');
1864  if (p1) {
1865  p2 = cobc_strdup (p1 + 1);
1866  p1 = strrchr (p2, '"');
1867  if (p1) {
1868  *p1 = 0;
1870  cb_source_line = (int)strtol (yytext + 5, NULL, 10) - 1;
1871  }
1872  cobc_free (p2);
1873  }
1874 }
1875  YY_BREAK
1876 case 7:
1878 #line 289 "scanner.l"
1879 {
1880  /* Ignore */
1881 }
1882  YY_BREAK
1883 case 8:
1884 #line 294 "scanner.l"
1885 case 9:
1887 #line 294 "scanner.l"
1888 {
1890 }
1891  YY_BREAK
1892 case 10:
1894 #line 298 "scanner.l"
1895 {
1897  yylval = NULL;
1898  return FUNCTION;
1899  }
1901 }
1902  YY_BREAK
1903 case 11:
1905 #line 306 "scanner.l"
1906 {
1907  /* String literal */
1908  cobc_force_literal = 0;
1909  read_literal (yytext[0]);
1910  return LITERAL;
1911 }
1912  YY_BREAK
1913 case 12:
1914 #line 314 "scanner.l"
1915 case 13:
1917 #line 314 "scanner.l"
1918 {
1919  /* X string literal */
1920  cobc_force_literal = 0;
1921  return scan_x (yytext + 2);
1922 }
1923  YY_BREAK
1924 case 14:
1925 #line 321 "scanner.l"
1926 case 15:
1928 #line 321 "scanner.l"
1929 {
1930  /* Z string literal */
1931  cobc_force_literal = 0;
1932  return scan_z (yytext + 2, 0);
1933 }
1934  YY_BREAK
1935 case 16:
1936 #line 328 "scanner.l"
1937 case 17:
1939 #line 328 "scanner.l"
1940 {
1941  /* L string literal */
1942  cobc_force_literal = 0;
1943  return scan_z (yytext + 2, 1);
1944 }
1945  YY_BREAK
1946 case 18:
1947 #line 335 "scanner.l"
1948 case 19:
1950 #line 335 "scanner.l"
1951 {
1952  /* H numeric literal */
1953  cobc_force_literal = 0;
1954  return scan_h (yytext + 2, 1);
1955 }
1956  YY_BREAK
1957 case 20:
1958 #line 342 "scanner.l"
1959 case 21:
1961 #line 342 "scanner.l"
1962 {
1963  /* B boolean/numeric literal */
1964  cobc_force_literal = 0;
1965  return scan_b (yytext + 2, 1);
1966 }
1967  YY_BREAK
1968 case 22:
1970 #line 348 "scanner.l"
1971 {
1972  /*
1973  To avoid subtle silent errors, such as B#021, this rule (and the ones
1974  following) here admit some invalid literals which emit errors when
1975  they are processed.
1976  */
1977  /* ACUCOBOL binary numeric literal */
1978  cobc_force_literal = 0;
1979  return scan_b (yytext + 2, 0);
1980 }
1981  YY_BREAK
1982 case 23:
1984 #line 359 "scanner.l"
1985 {
1986  /* ACUCOBOL octal numeric literal */
1987  cobc_force_literal = 0;
1988  return scan_o (yytext + 2);
1989 }
1990  YY_BREAK
1991 case 24:
1992 #line 366 "scanner.l"
1993 case 25:
1995 #line 366 "scanner.l"
1996 {
1997  /* ACUCOBOL hexadecimal numeric literal */
1998  cobc_force_literal = 0;
1999  return scan_h (yytext + 2, 0);
2000 }
2001  YY_BREAK
2002 case 26:
2004 #line 372 "scanner.l"
2005 {
2006  inside_bracket++;
2007  return TOK_OPEN_PAREN;
2008 }
2009  YY_BREAK
2010 case 27:
2012 #line 377 "scanner.l"
2013 {
2014  if (inside_bracket > 0) {
2015  inside_bracket--;
2016  }
2017  return TOK_CLOSE_PAREN;
2018 }
2019  YY_BREAK
2020 case 28:
2022 #line 384 "scanner.l"
2023 {
2024  cobc_force_literal = 0;
2025  if (integer_is_label) {
2026  /* Integer label or level number */
2027  yylval = cb_build_reference (yytext);
2028  return WORD;
2029  }
2030  /* Numeric literal or referenced integer label */
2031  /* All transformations/checks are postponed to tree.c */
2032  yylval = cb_build_numeric_literal (0, yytext, 0);
2033  return LITERAL;
2034 }
2035  YY_BREAK
2036 case 29:
2038 #line 397 "scanner.l"
2039 {
2040  /* Numeric literal (signed) */
2041  return scan_numeric (yytext);
2042 }
2043  YY_BREAK
2044 case 30:
2046 #line 402 "scanner.l"
2047 {
2048  /* Ignore */
2049 }
2050  YY_BREAK
2051 case 31:
2053 #line 406 "scanner.l"
2054 {
2055  if (inside_bracket) {
2056  return SEMI_COLON;
2057  }
2058  /* Ignore */
2059 }
2060  YY_BREAK
2061 case 32:
2063 #line 413 "scanner.l"
2064 {
2065  /* Numeric floating point literal */
2066  return scan_floating_numeric (yytext);
2067 }
2068  YY_BREAK
2069 case 33:
2071 #line 418 "scanner.l"
2072 {
2073  /* Invalid numeric floating point literal */
2074  return scan_floating_numeric (yytext);
2075 }
2076  YY_BREAK
2077 case 34:
2079 #line 423 "scanner.l"
2080 {
2081  /* Numeric literal */
2082  return scan_numeric (yytext);
2083 }
2084  YY_BREAK
2085 case 35:
2087 #line 428 "scanner.l"
2088 {
2089  if (inside_bracket) {
2090  return COMMA_DELIM;
2091  }
2092  /* Ignore */
2093 }
2094  YY_BREAK
2095 case 36:
2097 #line 435 "scanner.l"
2098 {
2099  /* Numeric floating point literal */
2100  return scan_floating_numeric (yytext);
2101 }
2102  YY_BREAK
2103 case 37:
2105 #line 440 "scanner.l"
2106 {
2107  /* Invalid numeric floating point literal */
2108  return scan_floating_numeric (yytext);
2109 }
2110  YY_BREAK
2111 case 38:
2113 #line 445 "scanner.l"
2114 {
2115  /* Numeric literal */
2116  return scan_numeric (yytext);
2117 }
2118  YY_BREAK
2119 case 39:
2121 #line 450 "scanner.l"
2122 {
2123  unput (',');
2124 }
2125  YY_BREAK
2126 case 40:
2128 #line 454 "scanner.l"
2129 {
2130  if (inside_bracket) {
2131  return COMMA_DELIM;
2132  }
2133  /* Ignore */
2134 }
2135  YY_BREAK
2136 case 41:
2137 /* rule 41 can match eol */
2139 #line 461 "scanner.l"
2140 {
2141  cobc_force_literal = 1;
2142  count_lines (yytext);
2143  return END_PROGRAM;
2144 }
2145  YY_BREAK
2146 case 42:
2147 /* rule 42 can match eol */
2149 #line 467 "scanner.l"
2150 {
2151  cobc_force_literal = 1;
2152  count_lines (yytext);
2153  return END_FUNCTION;
2154 }
2155  YY_BREAK
2156 case 43:
2157 /* rule 43 can match eol */
2159 #line 473 "scanner.l"
2160 {
2161  count_lines (yytext);
2162  return PICTURE_SYMBOL;
2163 }
2164  YY_BREAK
2165 case 44:
2166 /* rule 44 can match eol */
2168 #line 478 "scanner.l"
2169 {
2170  count_lines (yytext);
2171  return FROM_CRT;
2172 }
2173  YY_BREAK
2174 case 45:
2175 /* rule 45 can match eol */
2177 #line 483 "scanner.l"
2178 {
2179  count_lines (yytext);
2180  return SCREEN_CONTROL;
2181 }
2182  YY_BREAK
2183 case 46:
2184 /* rule 46 can match eol */
2186 #line 488 "scanner.l"
2187 {
2188  count_lines (yytext);
2189  return EVENT_STATUS;
2190 }
2191  YY_BREAK
2192 case 47:
2193 /* rule 47 can match eol */
2195 #line 493 "scanner.l"
2196 {
2197  count_lines (yytext);
2198  return READY_TRACE;
2199 }
2200  YY_BREAK
2201 case 48:
2202 /* rule 48 can match eol */
2204 #line 498 "scanner.l"
2205 {
2206  count_lines (yytext);
2207  return RESET_TRACE;
2208 }
2209  YY_BREAK
2210 case 49:
2211 /* rule 49 can match eol */
2212 #line 504 "scanner.l"
2213 case 50:
2214 /* rule 50 can match eol */
2215 #line 505 "scanner.l"
2216 case 51:
2217 /* rule 51 can match eol */
2218 #line 506 "scanner.l"
2219 case 52:
2220 /* rule 52 can match eol */
2222 #line 506 "scanner.l"
2223 {
2224  count_lines (yytext);
2225  return GREATER_OR_EQUAL;
2226 }
2227  YY_BREAK
2228 case 53:
2229 /* rule 53 can match eol */
2231 #line 511 "scanner.l"
2232 {
2233  count_lines (yytext);
2234  return GREATER;
2235 }
2236  YY_BREAK
2237 case 54:
2238 /* rule 54 can match eol */
2239 #line 517 "scanner.l"
2240 case 55:
2241 /* rule 55 can match eol */
2242 #line 518 "scanner.l"
2243 case 56:
2244 /* rule 56 can match eol */
2245 #line 519 "scanner.l"
2246 case 57:
2247 /* rule 57 can match eol */
2249 #line 519 "scanner.l"
2250 {
2251  count_lines (yytext);
2252  return LESS_OR_EQUAL;
2253 }
2254  YY_BREAK
2255 case 58:
2256 /* rule 58 can match eol */
2258 #line 524 "scanner.l"
2259 {
2260  count_lines (yytext);
2261  return LESS;
2262 }
2263  YY_BREAK
2264 case 59:
2265 /* rule 59 can match eol */
2267 #line 529 "scanner.l"
2268 {
2269  count_lines (yytext);
2270  return EQUAL;
2271 }
2272  YY_BREAK
2273 case 60:
2274 /* rule 60 can match eol */
2276 #line 534 "scanner.l"
2277 {
2278  count_lines (yytext);
2279  return REPLACING;
2280 }
2281  YY_BREAK
2282 case 61:
2283 /* rule 61 can match eol */
2284 #line 540 "scanner.l"
2285 case 62:
2286 /* rule 62 can match eol */
2287 #line 541 "scanner.l"
2288 case 63:
2289 /* rule 63 can match eol */
2291 #line 541 "scanner.l"
2292 {
2293  count_lines (yytext);
2294  return TOP;
2295 }
2296  YY_BREAK
2297 case 64:
2298 /* rule 64 can match eol */
2299 #line 547 "scanner.l"
2300 case 65:
2301 /* rule 65 can match eol */
2302 #line 548 "scanner.l"
2303 case 66:
2304 /* rule 66 can match eol */
2306 #line 548 "scanner.l"
2307 {
2308  count_lines (yytext);
2309  return BOTTOM;
2310 }
2311  YY_BREAK
2312 case 67:
2313 /* rule 67 can match eol */
2314 #line 554 "scanner.l"
2315 case 68:
2316 /* rule 68 can match eol */
2318 #line 554 "scanner.l"
2319 {
2320  count_lines (yytext);
2321  return NO_ADVANCING;
2322 }
2323  YY_BREAK
2324 case 69:
2325 /* rule 69 can match eol */
2326 #line 560 "scanner.l"
2327 case 70:
2328 /* rule 70 can match eol */
2330 #line 560 "scanner.l"
2331 {
2332  count_lines (yytext);
2333  return NEXT_PAGE;
2334 }
2335  YY_BREAK
2336 case 71:
2337 /* rule 71 can match eol */
2338 #line 566 "scanner.l"
2339 case 72:
2340 /* rule 72 can match eol */
2342 #line 566 "scanner.l"
2343 {
2344  count_lines (yytext);
2345  return NOT_SIZE_ERROR;
2346 }
2347  YY_BREAK
2348 case 73:
2349 /* rule 73 can match eol */
2350 #line 572 "scanner.l"
2351 case 74:
2352 /* rule 74 can match eol */
2354 #line 572 "scanner.l"
2355 {
2356  count_lines (yytext);
2357  return SIZE_ERROR;
2358 }
2359  YY_BREAK
2360 case 75:
2361 /* rule 75 can match eol */
2362 #line 578 "scanner.l"
2363 case 76:
2364 /* rule 76 can match eol */
2366 #line 578 "scanner.l"
2367 {
2368  count_lines (yytext);
2369  return NOT_ESCAPE;
2370 }
2371  YY_BREAK
2372 case 77:
2373 /* rule 77 can match eol */
2374 #line 584 "scanner.l"
2375 case 78:
2376 /* rule 78 can match eol */
2378 #line 584 "scanner.l"
2379 {
2380  count_lines (yytext);
2381  return NOT_EXCEPTION;
2382 }
2383  YY_BREAK
2384 case 79:
2385 /* rule 79 can match eol */
2387 #line 589 "scanner.l"
2388 {
2389  count_lines (yytext);
2390  return ESCAPE;
2391 }
2392  YY_BREAK
2393 case 80:
2394 /* rule 80 can match eol */
2396 #line 594 "scanner.l"
2397 {
2398  count_lines (yytext);
2399  return EXCEPTION;
2400 }
2401  YY_BREAK
2402 case 81:
2403 /* rule 81 can match eol */
2404 #line 600 "scanner.l"
2405 case 82:
2406 /* rule 82 can match eol */
2408 #line 600 "scanner.l"
2409 {
2410  count_lines (yytext);
2411  return NOT_OVERFLOW;
2412 }
2413  YY_BREAK
2414 case 83:
2415 /* rule 83 can match eol */
2416 #line 606 "scanner.l"
2417 case 84:
2418 /* rule 84 can match eol */
2420 #line 606 "scanner.l"
2421 {
2422  count_lines (yytext);
2423  return NOT_END;
2424 }
2425  YY_BREAK
2426 case 85:
2427 /* rule 85 can match eol */
2429 #line 611 "scanner.l"
2430 {
2431  count_lines (yytext);
2432  return END;
2433 }
2434  YY_BREAK
2435 case 86:
2436 /* rule 86 can match eol */
2437 #line 617 "scanner.l"
2438 case 87:
2439 /* rule 87 can match eol */
2441 #line 617 "scanner.l"
2442 {
2443  count_lines (yytext);
2444  return TOK_OVERFLOW;
2445 }
2446  YY_BREAK
2447 case 88:
2448 /* rule 88 can match eol */
2449 #line 623 "scanner.l"
2450 case 89:
2451 /* rule 89 can match eol */
2452 #line 624 "scanner.l"
2453 case 90:
2454 /* rule 90 can match eol */
2455 #line 625 "scanner.l"
2456 case 91:
2457 /* rule 91 can match eol */
2459 #line 625 "scanner.l"
2460 {
2461  count_lines (yytext);
2462  return NOT_EOP;
2463 }
2464  YY_BREAK
2465 case 92:
2466 /* rule 92 can match eol */
2467 #line 631 "scanner.l"
2468 case 93:
2469 /* rule 93 can match eol */
2470 #line 632 "scanner.l"
2471 case 94:
2472 /* rule 94 can match eol */
2473 #line 633 "scanner.l"
2474 case 95:
2475 /* rule 95 can match eol */
2477 #line 633 "scanner.l"
2478 {
2479  count_lines (yytext);
2480  return EOP;
2481 }
2482  YY_BREAK
2483 case 96:
2484 /* rule 96 can match eol */
2486 #line 638 "scanner.l"
2487 {
2488  count_lines (yytext);
2489  return NOT_INVALID_KEY;
2490 }
2491  YY_BREAK
2492 case 97:
2493 /* rule 97 can match eol */
2495 #line 643 "scanner.l"
2496 {
2497  count_lines (yytext);
2498  return NOT_INVALID_KEY;
2499 }
2500  YY_BREAK
2501 case 98:
2502 /* rule 98 can match eol */
2504 #line 648 "scanner.l"
2505 {
2506  count_lines (yytext);
2507  return INVALID_KEY;
2508 }
2509  YY_BREAK
2510 case 99:
2511 /* rule 99 can match eol */
2513 #line 653 "scanner.l"
2514 {
2515  count_lines (yytext);
2516  return INVALID_KEY;
2517 }
2518  YY_BREAK
2519 case 100:
2520 /* rule 100 can match eol */
2522 #line 658 "scanner.l"
2523 {
2524  count_lines (yytext);
2525  return UPON_ENVIRONMENT_NAME;
2526 }
2527  YY_BREAK
2528 case 101:
2529 /* rule 101 can match eol */
2531 #line 663 "scanner.l"
2532 {
2533  count_lines (yytext);
2534  return UPON_ENVIRONMENT_VALUE;
2535 }
2536  YY_BREAK
2537 case 102:
2538 /* rule 102 can match eol */
2540 #line 668 "scanner.l"
2541 {
2542  count_lines (yytext);
2543  return UPON_ARGUMENT_NUMBER;
2544 }
2545  YY_BREAK
2546 case 103:
2547 /* rule 103 can match eol */
2549 #line 673 "scanner.l"
2550 {
2551  count_lines (yytext);
2552  return UPON_COMMAND_LINE;
2553 }
2554  YY_BREAK
2555 case 104:
2556 /* rule 104 can match eol */
2558 #line 678 "scanner.l"
2559 {
2560  count_lines (yytext);
2561  return EXCEPTION_CONDITION;
2562 }
2563  YY_BREAK
2564 case 105:
2565 /* rule 105 can match eol */
2567 #line 683 "scanner.l"
2568 {
2569  count_lines (yytext);
2570  return EXCEPTION_CONDITION;
2571 }
2572  YY_BREAK
2573 case 106:
2574 /* rule 106 can match eol */
2576 #line 688 "scanner.l"
2577 {
2578  count_lines (yytext);
2579  return EC;
2580 }
2581  YY_BREAK
2582 case 107:
2583 /* rule 107 can match eol */
2585 #line 693 "scanner.l"
2586 {
2587  count_lines (yytext);
2588  return LENGTH_OF;
2589 }
2590  YY_BREAK
2591 case 108:
2592 /* rule 108 can match eol */
2594 #line 698 "scanner.l"
2595 {
2596  /* ACUCOBOL extension: switch-names with space and with letter */
2597  char suffix[3] = "";
2598  char name[10] = "";
2599 
2600  unput (yytext[yyleng-1]); /* unput seperator */
2601  if (cobc_in_procedure) {
2602  /* unput characters */
2603  yylval = cb_build_reference ("SWITCH");
2604  if (isdigit((unsigned char)yytext[yyleng-3])) {
2605  unput (yytext[yyleng-2]);
2606  unput (yytext[yyleng-3]);
2607  } else {
2608  unput (yytext[yyleng-2]);
2609  }
2610  } else {
2611  /* we need to return a single word, reverted later in parser.y */
2612  if (yytext[yyleng-3] == ' ' && isdigit((unsigned char)yytext[yyleng-2])) {
2613  /* SWITCH 0 to SWITCH 9 */
2614  suffix[0] = yytext[yyleng-2];
2615  } else if (isdigit((unsigned char)yytext[yyleng-3])) {
2616  /* SWITCH 00 to SWITCH 99 */
2617  suffix[0] = yytext[yyleng-3];
2618  suffix[1] = yytext[yyleng-2];
2619  } else {
2620  suffix[0] = yytext[yyleng-2];
2621  }
2622  strncpy(name, yytext, 6);
2623  strcat(name, "_");
2624  strcat(name, suffix);
2625  yylval = cb_build_reference (name);
2626  }
2627  return WORD;
2628 }
2629  YY_BREAK
2630 case 109:
2632 #line 733 "scanner.l"
2633 {
2634  struct cb_level_78 *p78;
2635  struct cb_intrinsic_table *cbp;
2636  struct cobc_reserved *resptr;
2637  struct cb_text_list *tlp;
2638  cb_tree x;
2639  cb_tree l;
2640  struct cb_program *program;
2641 
2642  /* Check word length */
2643  if (unlikely(yyleng > cb_word_length)) {
2644  if (yyleng > COB_MAX_WORDLEN) {
2645  /* Absolute limit */
2646  cb_error (_("Word length exceeds maximum of %d characters - '%s'"),
2647  COB_MAX_WORDLEN, yytext);
2648  } else if (!cb_relaxed_syntax_check) {
2649  cb_error (_("Word length exceeds %d characters - '%s'"),
2650  cb_word_length, yytext);
2651  } else if (warningopt) {
2652  cb_warning (_("Word length exceeds %d characters - '%s'"),
2653  cb_word_length, yytext);
2654  }
2655  }
2656 
2657  /* Check Intrinsic FUNCTION name without keyword */
2660  cbp = lookup_intrinsic (yytext, 1, 0);
2661  if (cbp) {
2662  if (cobc_in_repository) {
2663  yylval = cb_build_alphanumeric_literal (yytext, (size_t)yyleng);
2664  return FUNCTION_NAME;
2665  }
2666  if (functions_are_all) {
2667  yylval = cb_build_reference (yytext);
2668  return (enum yytokentype)(cbp->token);
2669  }
2670  for (tlp = cb_intrinsic_list; tlp; tlp = tlp->next) {
2671  if (!strcasecmp (yytext, tlp->text)) {
2672  yylval = cb_build_reference (yytext);
2673  return (enum yytokentype)(cbp->token);
2674  }
2675  }
2677  for (; l; l = CB_CHAIN(l)) {
2678  x = CB_VALUE (l);
2679  if (!strcasecmp (yytext,
2680  (char *)(CB_LITERAL(x)->data))) {
2681  yylval = cb_build_reference (yytext);
2682  return (enum yytokentype)(cbp->token);
2683  }
2684  }
2685  }
2686  }
2687 
2688  /* Bail early for (END) PROGRAM-ID when not a literal */
2690  /* Force PROGRAM-ID / END PROGRAM */
2691  cobc_force_literal = 0;
2692  if (cb_fold_call) {
2693  yylval = cb_build_reference (yytext);
2694  return PROGRAM_NAME;
2695  } else {
2696  yylval = cb_build_alphanumeric_literal (yytext, (size_t)yyleng);
2697  return LITERAL;
2698  }
2699  }
2700 
2701  /* Check reserved word */
2702  resptr = lookup_reserved_word (yytext);
2703  if (resptr != NULL) {
2704  if (resptr->nodegen) {
2705  /* Save location for terminator checking */
2706  /* Misuse comment tree to mark statement */
2708  } else {
2709  yylval = NULL;
2710  }
2711  return resptr->token;
2712  }
2713 
2714  /* Check user function */
2715  if (cobc_in_repository) {
2716  yylval = cb_build_reference (yytext);
2717  return WORD;
2718  } else {
2720  !functions_are_all &&
2721  !strcasecmp (yytext, current_program->orig_program_id)) {
2722  /* Direct recursive reference */
2723  yylval = cb_build_reference (yytext);
2724  return USER_FUNCTION_NAME;
2725  }
2726  for (l = current_program->user_spec_list; l; l = CB_CHAIN(l)) {
2727  x = CB_VALUE (l);
2728  if (!strcasecmp (yytext, CB_FUNC_PROTOTYPE (x)->name)) {
2729  yylval = cb_build_reference (yytext);
2730  return USER_FUNCTION_NAME;
2731  }
2732  }
2733  }
2734 
2735  /* Check user programs */
2736  program = cb_find_defined_program_by_name (yytext);
2737  if (program) {
2738  yylval = cb_build_reference (yytext);
2739  return PROGRAM_NAME;
2740  }
2741 
2742  /* User word */
2743 
2744  /* Check local, global and source global CONSTANT (78) items */
2745 
2746  for (p78 = top78ptr; p78; p78 = p78->globnext) {
2747  if (strcasecmp (yytext, p78->fld78->name) == 0) {
2748  if (unlikely(non_const_word)) {
2749  if (p78->prog == current_program) {
2750  cb_error (_("A constant may not be used here - '%s'"), yytext);
2752  return WORD;
2753  }
2754  if (p78->chk_const) {
2755  p78->not_const = 1;
2756  }
2757  break;
2758  }
2759  if (p78->chk_const && p78->not_const) {
2760  break;
2761  }
2762  yylval = CB_VALUE (p78->fld78->values);
2763  return LITERAL;
2764  }
2765  }
2766 
2767  yylval = cb_build_reference (yytext);
2768 
2769  /* Special name handling */
2770  if (CB_WORD_COUNT (yylval) > 0 && CB_WORD_ITEMS (yylval)) {
2771  x = CB_VALUE (CB_WORD_ITEMS (yylval));
2772  if (CB_SYSTEM_NAME_P (x)) {
2773  return MNEMONIC_NAME;
2774  }
2775  }
2776 
2777  return WORD;
2778 }
2779  YY_BREAK
2780 case 110:
2782 #line 880 "scanner.l"
2783 {
2784  yylval = NULL;
2785  return LESS_OR_EQUAL;
2786 }
2787  YY_BREAK
2788 case 111:
2790 #line 885 "scanner.l"
2791 {
2792  yylval = NULL;
2793  return GREATER_OR_EQUAL;
2794 }
2795  YY_BREAK
2796 case 112:
2798 #line 890 "scanner.l"
2799 {
2800  yylval = NULL;
2801  return NOT_EQUAL;
2802 }
2803  YY_BREAK
2804 case 113:
2806 #line 895 "scanner.l"
2807 {
2808  yylval = NULL;
2809  return EXPONENTIATION;
2810 }
2811  YY_BREAK
2812 case 114:
2814 #line 900 "scanner.l"
2815 {
2816  last_token_is_dot = 1;
2817  yylval = NULL;
2818  return TOK_DOT;
2819 }
2820  YY_BREAK
2821 case 115:
2823 #line 906 "scanner.l"
2824 {
2825  yylval = NULL;
2826  return TOK_AMPER;
2827 }
2828  YY_BREAK
2829 case 116:
2831 #line 911 "scanner.l"
2832 {
2833  yylval = NULL;
2834  return TOK_COLON;
2835 }
2836  YY_BREAK
2837 case 117:
2839 #line 916 "scanner.l"
2840 {
2841  yylval = NULL;
2842  return TOK_EQUAL;
2843 }
2844  YY_BREAK
2845 case 118:
2847 #line 921 "scanner.l"
2848 {
2849  yylval = NULL;
2850  return TOK_DIV;
2851 }
2852  YY_BREAK
2853 case 119:
2855 #line 926 "scanner.l"
2856 {
2857  yylval = NULL;
2858  return TOK_MUL;
2859 }
2860  YY_BREAK
2861 case 120:
2863 #line 931 "scanner.l"
2864 {
2865  yylval = NULL;
2866  return TOK_PLUS;
2867 }
2868  YY_BREAK
2869 case 121:
2871 #line 936 "scanner.l"
2872 {
2873  yylval = NULL;
2874  return TOK_MINUS;
2875 }
2876  YY_BREAK
2877 case 122:
2879 #line 941 "scanner.l"
2880 {
2881  yylval = NULL;
2882  return TOK_LESS;
2883 }
2884  YY_BREAK
2885 case 123:
2887 #line 946 "scanner.l"
2888 {
2889  yylval = NULL;
2890  return TOK_GREATER;
2891 }
2892  YY_BREAK
2893 case 124:
2895 #line 951 "scanner.l"
2896 {
2897  int c;
2898 
2899  cb_error (_("Invalid symbol: %s - Skipping word"), yytext);
2900  while ((c = input ()) != EOF) {
2901  if (c == '\n' || c == ' ') {
2902  break;
2903  }
2904  }
2905  if (c != EOF) {
2906  unput (c);
2907  }
2908 }
2909  YY_BREAK
2910 
2911 case 125:
2913 #line 967 "scanner.l"
2914 {
2915  /* Ignore */
2916  }
2917  YY_BREAK
2918 case 126:
2920 #line 970 "scanner.l"
2921 {
2922  BEGIN INITIAL;
2923  scan_picture (yytext);
2924  return PICTURE;
2925  }
2926  YY_BREAK
2927 
2928 
2929 case 127:
2931 #line 978 "scanner.l"
2932 {
2933  struct cb_intrinsic_table *cbp;
2934  cb_tree l;
2935  cb_tree x;
2936 
2937  BEGIN INITIAL;
2938  yylval = cb_build_reference (yytext);
2939  for (l = current_program->user_spec_list; l; l = CB_CHAIN(l)) {
2940  x = CB_VALUE (l);
2941  if (!strcasecmp (yytext, CB_FUNC_PROTOTYPE (x)->name)) {
2942  return USER_FUNCTION_NAME;
2943  }
2944  }
2945  cbp = lookup_intrinsic (yytext, 1, 0);
2946  if (cbp) {
2947  return (enum yytokentype)(cbp->token);
2948  }
2949  return FUNCTION_NAME;
2950  }
2951  YY_BREAK
2952 case 128:
2954 #line 997 "scanner.l"
2955 {
2956  yylval = NULL;
2957  return yytext[0];
2958  }
2959  YY_BREAK
2960 
2961 case YY_STATE_EOF(INITIAL):
2966 #line 1003 "scanner.l"
2967 {
2968  struct cb_level_78 *p78;
2969  struct cb_level_78 *p782;
2970 
2971  /* At EOF - Clear variables */
2972  for (p78 = lev78ptr; p78; ) {
2973  p782 = p78->next;
2974  cobc_free (p78);
2975  p78 = p782;
2976  }
2977  for (p78 = globlev78ptr; p78; ) {
2978  p782 = p78->next;
2979  cobc_free (p78);
2980  p78 = p782;
2981  }
2982  for (p78 = const78ptr; p78; ) {
2983  p782 = p78->next;
2984  cobc_free (p78);
2985  p78 = p782;
2986  }
2987  top78ptr = NULL;
2988  last_token_is_dot = 0;
2989  integer_is_label = 0;
2990  inside_bracket = 0;
2991  lev78ptr = NULL;
2992  globlev78ptr = NULL;
2993  cobc_force_literal = 0;
2994  yyterminate ();
2995 }
2996  YY_BREAK
2997 case 129:
2999 #line 1033 "scanner.l"
3000 YY_FATAL_ERROR( "flex scanner jammed" );
3001  YY_BREAK
3002 #line 3002 "scanner.c"
3003 
3004  case YY_END_OF_BUFFER:
3005  {
3006  /* Amount of text matched not including the EOB char. */
3007  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3008 
3009  /* Undo the effects of YY_DO_BEFORE_ACTION. */
3010  *yy_cp = (yy_hold_char);
3012 
3013  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3014  {
3015  /* We're scanning a new file or input source. It's
3016  * possible that this happened because the user
3017  * just pointed yyin at a new source and called
3018  * yylex(). If so, then we have to assure
3019  * consistency between YY_CURRENT_BUFFER and our
3020  * globals. Here is the right place to do so, because
3021  * this is the first action (other than possibly a
3022  * back-up) that will match for the new input source.
3023  */
3024  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3025  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3026  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3027  }
3028 
3029  /* Note that here we test for yy_c_buf_p "<=" to the position
3030  * of the first EOB in the buffer, since yy_c_buf_p will
3031  * already have been incremented past the NUL character
3032  * (since all states make transitions on EOB to the
3033  * end-of-buffer state). Contrast this with the test
3034  * in input().
3035  */
3036  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3037  { /* This was really a NUL. */
3038  yy_state_type yy_next_state;
3039 
3040  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3041 
3042  yy_current_state = yy_get_previous_state( );
3043 
3044  /* Okay, we're now positioned to make the NUL
3045  * transition. We couldn't have
3046  * yy_get_previous_state() go ahead and do it
3047  * for us because it doesn't know how to deal
3048  * with the possibility of jamming (and we don't
3049  * want to build jamming into it because then it
3050  * will run more slowly).
3051  */
3052 
3053  yy_next_state = yy_try_NUL_trans( yy_current_state );
3054 
3055  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3056 
3057  if ( yy_next_state )
3058  {
3059  /* Consume the NUL. */
3060  yy_cp = ++(yy_c_buf_p);
3061  yy_current_state = yy_next_state;
3062  goto yy_match;
3063  }
3064 
3065  else
3066  {
3067  yy_cp = (yy_last_accepting_cpos);
3068  yy_current_state = (yy_last_accepting_state);
3069  goto yy_find_action;
3070  }
3071  }
3072 
3073  else switch ( yy_get_next_buffer( ) )
3074  {
3075  case EOB_ACT_END_OF_FILE:
3076  {
3078 
3079  if ( yywrap( ) )
3080  {
3081  /* Note: because we've taken care in
3082  * yy_get_next_buffer() to have set up
3083  * yytext, we can now set up
3084  * yy_c_buf_p so that if some total
3085  * hoser (like flex itself) wants to
3086  * call the scanner after we return the
3087  * YY_NULL, it'll still work - another
3088  * YY_NULL will get returned.
3089  */
3091 
3092  yy_act = YY_STATE_EOF(YY_START);
3093  goto do_action;
3094  }
3095 
3096  else
3097  {
3098  if ( ! (yy_did_buffer_switch_on_eof) )
3099  YY_NEW_FILE;
3100  }
3101  break;
3102  }
3103 
3104  case EOB_ACT_CONTINUE_SCAN:
3105  (yy_c_buf_p) =
3106  (yytext_ptr) + yy_amount_of_matched_text;
3107 
3108  yy_current_state = yy_get_previous_state( );
3109 
3110  yy_cp = (yy_c_buf_p);
3111  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3112  goto yy_match;
3113 
3114  case EOB_ACT_LAST_MATCH:
3115  (yy_c_buf_p) =
3116  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3117 
3118  yy_current_state = yy_get_previous_state( );
3119 
3120  yy_cp = (yy_c_buf_p);
3121  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3122  goto yy_find_action;
3123  }
3124  break;
3125  }
3126 
3127  default:
3129  "fatal flex scanner internal error--no action found" );
3130  } /* end of action switch */
3131  } /* end of scanning one token */
3132  } /* end of user's declarations */
3133 } /* end of yylex */
3134 
3135 /* yy_get_next_buffer - try to read in a new buffer
3136  *
3137  * Returns a code representing an action:
3138  * EOB_ACT_LAST_MATCH -
3139  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3140  * EOB_ACT_END_OF_FILE - end of file
3141  */
3142 static int yy_get_next_buffer (void)
3143 {
3144  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3145  register char *source = (yytext_ptr);
3146  register int number_to_move, i;
3147  int ret_val;
3148 
3149  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3151  "fatal flex scanner internal error--end of buffer missed" );
3152 
3153  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3154  { /* Don't try to fill the buffer, so this is an EOF. */
3155  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3156  {
3157  /* We matched a single character, the EOB, so
3158  * treat this as a final EOF.
3159  */
3160  return EOB_ACT_END_OF_FILE;
3161  }
3162 
3163  else
3164  {
3165  /* We matched some text prior to the EOB, first
3166  * process it.
3167  */
3168  return EOB_ACT_LAST_MATCH;
3169  }
3170  }
3171 
3172  /* Try to read more data. */
3173 
3174  /* First move last chars to start of buffer. */
3175  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3176 
3177  for ( i = 0; i < number_to_move; ++i )
3178  *(dest++) = *(source++);
3179 
3180  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3181  /* don't do the read, it's not guaranteed to return an EOF,
3182  * just force an EOF
3183  */
3184  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3185 
3186  else
3187  {
3188  yy_size_t num_to_read =
3189  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3190 
3191  while ( num_to_read <= 0 )
3192  { /* Not enough room in the buffer - grow it. */
3193 
3194  /* just a shorter name for the current buffer */
3195  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
3196 
3197  int yy_c_buf_p_offset =
3198  (int) ((yy_c_buf_p) - b->yy_ch_buf);
3199 
3200  if ( b->yy_is_our_buffer )
3201  {
3202  yy_size_t new_size = b->yy_buf_size * 2;
3203 
3204  if ( new_size <= 0 )
3205  b->yy_buf_size += b->yy_buf_size / 8;
3206  else
3207  b->yy_buf_size *= 2;
3208 
3209  b->yy_ch_buf = (char *)
3210  /* Include room in for 2 EOB chars. */
3211  yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
3212  }
3213  else
3214  /* Can't grow it, we don't own it. */
3215  b->yy_ch_buf = 0;
3216 
3217  if ( ! b->yy_ch_buf )
3219  "fatal error - scanner input buffer overflow" );
3220 
3221  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
3222 
3223  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3224  number_to_move - 1;
3225 
3226  }
3227 
3228  if ( num_to_read > YY_READ_BUF_SIZE )
3229  num_to_read = YY_READ_BUF_SIZE;
3230 
3231  /* Read in more data. */
3232  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3233  (yy_n_chars), num_to_read );
3234 
3235  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3236  }
3237 
3238  if ( (yy_n_chars) == 0 )
3239  {
3240  if ( number_to_move == YY_MORE_ADJ )
3241  {
3242  ret_val = EOB_ACT_END_OF_FILE;
3243  yyrestart(yyin );
3244  }
3245 
3246  else
3247  {
3248  ret_val = EOB_ACT_LAST_MATCH;
3249  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3251  }
3252  }
3253 
3254  else
3255  ret_val = EOB_ACT_CONTINUE_SCAN;
3256 
3257  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3258  /* Extend the array by 50%, plus the number we really need. */
3259  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3260  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
3261  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3262  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3263  }
3264 
3265  (yy_n_chars) += number_to_move;
3268 
3269  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3270 
3271  return ret_val;
3272 }
3273 
3274 /* yy_get_previous_state - get the state just before the EOB char was reached */
3275 
3276  static yy_state_type yy_get_previous_state (void)
3277 {
3278  register yy_state_type yy_current_state;
3279  register char *yy_cp;
3280 
3281  yy_current_state = (yy_start);
3282  yy_current_state += YY_AT_BOL();
3283 
3284  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3285  {
3286  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3287  if ( yy_accept[yy_current_state] )
3288  {
3289  (yy_last_accepting_state) = yy_current_state;
3290  (yy_last_accepting_cpos) = yy_cp;
3291  }
3292  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3293  {
3294  yy_current_state = (int) yy_def[yy_current_state];
3295  if ( yy_current_state >= 833 )
3296  yy_c = yy_meta[(unsigned int) yy_c];
3297  }
3298  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3299  }
3300 
3301  return yy_current_state;
3302 }
3303 
3304 /* yy_try_NUL_trans - try to make a transition on the NUL character
3305  *
3306  * synopsis
3307  * next_state = yy_try_NUL_trans( current_state );
3308  */
3309  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3310 {
3311  register int yy_is_jam;
3312  register char *yy_cp = (yy_c_buf_p);
3313 
3314  register YY_CHAR yy_c = 1;
3315  if ( yy_accept[yy_current_state] )
3316  {
3317  (yy_last_accepting_state) = yy_current_state;
3318  (yy_last_accepting_cpos) = yy_cp;
3319  }
3320  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3321  {
3322  yy_current_state = (int) yy_def[yy_current_state];
3323  if ( yy_current_state >= 833 )
3324  yy_c = yy_meta[(unsigned int) yy_c];
3325  }
3326  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3327  yy_is_jam = (yy_current_state == 832);
3328 
3329  return yy_is_jam ? 0 : yy_current_state;
3330 }
3331 
3332  static void yyunput (int c, register char * yy_bp )
3333 {
3334  register char *yy_cp;
3335 
3336  yy_cp = (yy_c_buf_p);
3337 
3338  /* undo effects of setting up yytext */
3339  *yy_cp = (yy_hold_char);
3340 
3341  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3342  { /* need to shift things up to make room */
3343  /* +2 for EOB chars. */
3344  register yy_size_t number_to_move = (yy_n_chars) + 2;
3345  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3346  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3347  register char *source =
3348  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3349 
3350  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3351  *--dest = *--source;
3352 
3353  yy_cp += (int) (dest - source);
3354  yy_bp += (int) (dest - source);
3355  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3356  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3357 
3358  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3359  YY_FATAL_ERROR( "flex scanner push-back overflow" );
3360  }
3361 
3362  *--yy_cp = (char) c;
3363 
3364  (yytext_ptr) = yy_bp;
3365  (yy_hold_char) = *yy_cp;
3366  (yy_c_buf_p) = yy_cp;
3367 }
3368 
3369 #ifndef YY_NO_INPUT
3370 #ifdef __cplusplus
3371  static int yyinput (void)
3372 #else
3373  static int input (void)
3374 #endif
3375 
3376 {
3377  int c;
3378 
3379  *(yy_c_buf_p) = (yy_hold_char);
3380 
3381  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3382  {
3383  /* yy_c_buf_p now points to the character we want to return.
3384  * If this occurs *before* the EOB characters, then it's a
3385  * valid NUL; if not, then we've hit the end of the buffer.
3386  */
3387  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3388  /* This was really a NUL. */
3389  *(yy_c_buf_p) = '\0';
3390 
3391  else
3392  { /* need more input */
3393  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3394  ++(yy_c_buf_p);
3395 
3396  switch ( yy_get_next_buffer( ) )
3397  {
3398  case EOB_ACT_LAST_MATCH:
3399  /* This happens because yy_g_n_b()
3400  * sees that we've accumulated a
3401  * token and flags that we need to
3402  * try matching the token before
3403  * proceeding. But for input(),
3404  * there's no matching to consider.
3405  * So convert the EOB_ACT_LAST_MATCH
3406  * to EOB_ACT_END_OF_FILE.
3407  */
3408 
3409  /* Reset buffer status. */
3410  yyrestart(yyin );
3411 
3412  /*FALLTHROUGH*/
3413 
3414  case EOB_ACT_END_OF_FILE:
3415  {
3416  if ( yywrap( ) )
3417  return EOF;
3418 
3419  if ( ! (yy_did_buffer_switch_on_eof) )
3420  YY_NEW_FILE;
3421 #ifdef __cplusplus
3422  return yyinput();
3423 #else
3424  return input();
3425 #endif
3426  }
3427 
3428  case EOB_ACT_CONTINUE_SCAN:
3429  (yy_c_buf_p) = (yytext_ptr) + offset;
3430  break;
3431  }
3432  }
3433  }
3434 
3435  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3436  *(yy_c_buf_p) = '\0'; /* preserve yytext */
3437  (yy_hold_char) = *++(yy_c_buf_p);
3438 
3439  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3440 
3441  return c;
3442 }
3443 #endif /* ifndef YY_NO_INPUT */
3444 
3445 /** Immediately switch to a different input stream.
3446  * @param input_file A readable stream.
3447  *
3448  * @note This function does not reset the start condition to @c INITIAL .
3449  */
3450  void yyrestart (FILE * input_file )
3451 {
3452 
3453  if ( ! YY_CURRENT_BUFFER ){
3457  }
3458 
3459  yy_init_buffer(YY_CURRENT_BUFFER,input_file );
3461 }
3462 
3463 /** Switch to a different input buffer.
3464  * @param new_buffer The new input buffer.
3465  *
3466  */
3467  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3468 {
3469 
3470  /* TODO. We should be able to replace this entire function body
3471  * with
3472  * yypop_buffer_state();
3473  * yypush_buffer_state(new_buffer);
3474  */
3476  if ( YY_CURRENT_BUFFER == new_buffer )
3477  return;
3478 
3479  if ( YY_CURRENT_BUFFER )
3480  {
3481  /* Flush out information for old buffer. */
3482  *(yy_c_buf_p) = (yy_hold_char);
3483  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3484  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3485  }
3486 
3487  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3489 
3490  /* We don't actually know whether we did this switch during
3491  * EOF (yywrap()) processing, but the only time this flag
3492  * is looked at is after yywrap() is called, so it's safe
3493  * to go ahead and always set it.
3494  */
3496 }
3497 
3498 static void yy_load_buffer_state (void)
3499 {
3500  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3501  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3502  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3503  (yy_hold_char) = *(yy_c_buf_p);
3504 }
3505 
3506 /** Allocate and initialize an input buffer state.
3507  * @param file A readable stream.
3508  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3509  *
3510  * @return the allocated buffer state.
3511  */
3512  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3513 {
3514  YY_BUFFER_STATE b;
3515 
3516  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3517  if ( ! b )
3518  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3519 
3520  b->yy_buf_size = size;
3521 
3522  /* yy_ch_buf has to be 2 characters longer than the size given because
3523  * we need to put in 2 end-of-buffer characters.
3524  */
3525  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
3526  if ( ! b->yy_ch_buf )
3527  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3528 
3529  b->yy_is_our_buffer = 1;
3530 
3531  yy_init_buffer(b,file );
3532 
3533  return b;
3534 }
3535 
3536 /** Destroy the buffer.
3537  * @param b a buffer created with yy_create_buffer()
3538  *
3539  */
3540  void yy_delete_buffer (YY_BUFFER_STATE b )
3541 {
3542 
3543  if ( ! b )
3544  return;
3545 
3546  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3548 
3549  if ( b->yy_is_our_buffer )
3550  yyfree((void *) b->yy_ch_buf );
3551 
3552  yyfree((void *) b );
3553 }
3554 
3555 /* Initializes or reinitializes a buffer.
3556  * This function is sometimes called more than once on the same buffer,
3557  * such as during a yyrestart() or at EOF.
3558  */
3559  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3560 
3561 {
3562  int oerrno = errno;
3563 
3564  yy_flush_buffer(b );
3565 
3566  b->yy_input_file = file;
3567  b->yy_fill_buffer = 1;
3568 
3569  /* If b is the current buffer, then yy_init_buffer was _probably_
3570  * called from yyrestart() or through yy_get_next_buffer.
3571  * In that case, we don't want to reset the lineno or column.
3572  */
3573  if (b != YY_CURRENT_BUFFER){
3574  b->yy_bs_lineno = 1;
3575  b->yy_bs_column = 0;
3576  }
3577 
3578  b->yy_is_interactive = 0;
3579 
3580  errno = oerrno;
3581 }
3582 
3583 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3584  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3585  *
3586  */
3587  void yy_flush_buffer (YY_BUFFER_STATE b )
3588 {
3589  if ( ! b )
3590  return;
3591 
3592  b->yy_n_chars = 0;
3593 
3594  /* We always need two end-of-buffer characters. The first causes
3595  * a transition to the end-of-buffer state. The second causes
3596  * a jam in that state.
3597  */
3600 
3601  b->yy_buf_pos = &b->yy_ch_buf[0];
3602 
3603  b->yy_at_bol = 1;
3605 
3606  if ( b == YY_CURRENT_BUFFER )
3608 }
3609 
3610 /** Pushes the new state onto the stack. The new state becomes
3611  * the current state. This function will allocate the stack
3612  * if necessary.
3613  * @param new_buffer The new state.
3614  *
3615  */
3616 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3617 {
3618  if (new_buffer == NULL)
3619  return;
3620 
3622 
3623  /* This block is copied from yy_switch_to_buffer. */
3624  if ( YY_CURRENT_BUFFER )
3625  {
3626  /* Flush out information for old buffer. */
3627  *(yy_c_buf_p) = (yy_hold_char);
3628  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3629  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3630  }
3631 
3632  /* Only push if top exists. Otherwise, replace top. */
3633  if (YY_CURRENT_BUFFER)
3634  (yy_buffer_stack_top)++;
3635  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3636 
3637  /* copied from yy_switch_to_buffer. */
3640 }
3641 
3642 /** Removes and deletes the top of the stack, if present.
3643  * The next element becomes the new top.
3644  *
3645  */
3647 {
3648  if (!YY_CURRENT_BUFFER)
3649  return;
3650 
3653  if ((yy_buffer_stack_top) > 0)
3654  --(yy_buffer_stack_top);
3655 
3656  if (YY_CURRENT_BUFFER) {
3659  }
3660 }
3661 
3662 /* Allocates the stack if it does not exist.
3663  * Guarantees space for at least one push.
3664  */
3665 static void yyensure_buffer_stack (void)
3666 {
3667  yy_size_t num_to_alloc;
3668 
3669  if (!(yy_buffer_stack)) {
3670 
3671  /* First allocation is just for 2 elements, since we don't know if this
3672  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3673  * immediate realloc on the next call.
3674  */
3675  num_to_alloc = 1;
3677  (num_to_alloc * sizeof(struct yy_buffer_state*)
3678  );
3679  if ( ! (yy_buffer_stack) )
3680  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3681 
3682  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3683 
3684  (yy_buffer_stack_max) = num_to_alloc;
3685  (yy_buffer_stack_top) = 0;
3686  return;
3687  }
3688 
3689  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3690 
3691  /* Increase the buffer to prepare for a possible push. */
3692  int grow_size = 8 /* arbitrary grow size */;
3693 
3694  num_to_alloc = (yy_buffer_stack_max) + grow_size;
3696  ((yy_buffer_stack),
3697  num_to_alloc * sizeof(struct yy_buffer_state*)
3698  );
3699  if ( ! (yy_buffer_stack) )
3700  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3701 
3702  /* zero only the new slots.*/
3703  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3704  (yy_buffer_stack_max) = num_to_alloc;
3705  }
3706 }
3707 
3708 #ifndef YY_EXIT_FAILURE
3709 #define YY_EXIT_FAILURE 2
3710 #endif
3711 
3712 static void yy_fatal_error (yyconst char* msg )
3713 {
3714  (void) fprintf( stderr, "%s\n", msg );
3715  exit( YY_EXIT_FAILURE );
3716 }
3717 
3718 /* Redefine yyless() so it works in section 3 code. */
3719 
3720 #undef yyless
3721 #define yyless(n) \
3722  do \
3723  { \
3724  /* Undo effects of setting up yytext. */ \
3725  int yyless_macro_arg = (n); \
3726  YY_LESS_LINENO(yyless_macro_arg);\
3727  yytext[yyleng] = (yy_hold_char); \
3728  (yy_c_buf_p) = yytext + yyless_macro_arg; \
3729  (yy_hold_char) = *(yy_c_buf_p); \
3730  *(yy_c_buf_p) = '\0'; \
3731  yyleng = yyless_macro_arg; \
3732  } \
3733  while ( 0 )
3734 
3735 /* Accessor methods (get/set functions) to struct members. */
3736 
3737 /** Get the current token.
3738  *
3739  */
3740 
3741 static int yy_init_globals (void)
3742 {
3743  /* Initialization is the same as for the non-reentrant scanner.
3744  * This function is called from yylex_destroy(), so don't allocate here.
3745  */
3746 
3747  (yy_buffer_stack) = 0;
3748  (yy_buffer_stack_top) = 0;
3749  (yy_buffer_stack_max) = 0;
3750  (yy_c_buf_p) = (char *) 0;
3751  (yy_init) = 0;
3752  (yy_start) = 0;
3753 
3754 /* Defined in main.c */
3755 #ifdef YY_STDINIT
3756  yyin = stdin;
3757  yyout = stdout;
3758 #else
3759  yyin = (FILE *) 0;
3760  yyout = (FILE *) 0;
3761 #endif
3762 
3763  /* For future reference: Set errno on error, since we are called by
3764  * yylex_init()
3765  */
3766  return 0;
3767 }
3768 
3769 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3770 int yylex_destroy (void)
3771 {
3772 
3773  /* Pop the buffer stack, destroying each element. */
3774  while(YY_CURRENT_BUFFER){
3778  }
3779 
3780  /* Destroy the stack itself. */
3781  yyfree((yy_buffer_stack) );
3782  (yy_buffer_stack) = NULL;
3783 
3784  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3785  * yylex() is called, initialization will occur. */
3786  yy_init_globals( );
3787 
3788  return 0;
3789 }
3790 
3791 /*
3792  * Internal utility routines.
3793  */
3794 
3795 #ifndef yytext_ptr
3796 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3797 {
3798  register int i;
3799  for ( i = 0; i < n; ++i )
3800  s1[i] = s2[i];
3801 }
3802 #endif
3803 
3804 #ifdef YY_NEED_STRLEN
3805 static int yy_flex_strlen (yyconst char * s )
3806 {
3807  register int n;
3808  for ( n = 0; s[n]; ++n )
3809  ;
3810 
3811  return n;
3812 }
3813 #endif
3814 
3815 void *yyalloc (yy_size_t size )
3816 {
3817  return (void *) malloc( size );
3818 }
3819 
3820 void *yyrealloc (void * ptr, yy_size_t size )
3821 {
3822  /* The cast to (char *) in the following accommodates both
3823  * implementations that use char* generic pointers, and those
3824  * that use void* generic pointers. It works with the latter
3825  * because both ANSI C and C++ allow castless assignment from
3826  * any pointer type to void*, and deal with argument conversions
3827  * as though doing an assignment.
3828  */
3829  return (void *) realloc( (char *) ptr, size );
3830 }
3831 
3832 void yyfree (void * ptr )
3833 {
3834  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3835 }
3836 
3837 #define YYTABLES_NAME "yytables"
3838 
3839 #line 1032 "scanner.l"
3840 
3841 
3842 
3843 static void
3844 error_literal (const char *type, const char *literal)
3845 {
3846  char lit_out[39];
3847 
3848  if (!literal_error) {
3849  /* snip literal for output, if too long */
3850  strncpy (lit_out, literal, 38);
3851  if (strlen (literal) > 38) {
3852  strcpy (lit_out + 35, "...");
3853  } else {
3854  lit_out[38] = '\0';
3855  }
3856  if (strcmp (type, "") == 0) {
3857  cb_error (_("Invalid literal: '%s'"), lit_out);
3858  } else if (strcmp (type, "hex") == 0) {
3859  cb_error (_("Invalid hexadecimal literal: '%s'"), lit_out);
3860  } else if (strcmp (type, "num") == 0) {
3861  cb_error (_("Invalid numeric literal: '%s'"), lit_out);
3862  } else if (strcmp (type, "float") == 0) {
3863  cb_error (_("Invalid floating-point literal: '%s'"), lit_out);
3864  } else {
3865  cb_error (_("Invalid %s literal: '%s'"), type, lit_out);
3866  }
3867  }
3868  literal_error++;
3869  cb_error (err_msg);
3870 }
3871 
3872 static void
3873 read_literal (const char mark)
3874 {
3875  size_t i;
3876  int c;
3877 
3878  literal_error = 0;
3879 
3880  i = 0;
3881  while ((c = input ()) != EOF) {
3882  if (!literal_error) {
3883  if (unlikely(i == plexsize)) {
3884  plexsize *= 2;
3885  if (unlikely (plexsize > (cb_lit_length + 1))) {
3886  plexsize = cb_lit_length + 1;
3887  }
3888  plexbuff = cobc_realloc (plexbuff, plexsize);
3889  }
3890  plexbuff[i] = (cob_u8_t)c;
3891  }
3892  if (c == mark && (c = input ()) != (int)mark) {
3893  if (c == '-') {
3894  /* Free format continuation ("a"- 'b'- ) */
3895  /* Hack it as concatenation */
3896  unput ('&');
3897  } else {
3898  unput (c);
3899  }
3900  break;
3901  }
3902  /* check literal size here as we have to adjust and check
3903  for (escaped) mark before checking the max length */
3904  if (unlikely (i++ == cb_lit_length)) {
3905  plexbuff[i] = 0;
3906  snprintf (err_msg, COB_MINI_MAX,
3907  _ ("Literal length exceeds %d characters"),
3908  cb_lit_length);
3909  error_literal ("", plexbuff);
3910  }
3911  }
3912  /* fixme: cobol 2014 allows this (and needs it for DYNAMIC LENGTH items),
3913  while other versions do not allow this at all
3914  --> add a compiler support configuration for "OK" => zero length,
3915  "warning" => current implementation, "error" (for example in cobol2002),
3916  "ignore" => assume a space without warning; make sure zero length items
3917  work everywhere (should do as we support zero lengths via ODO items already)
3918  */
3919  if (!i) {
3920  cb_warning (_("Alphanumeric literal has zero length"));
3921  cb_warning (_("A SPACE will be assumed"));
3922  plexbuff[0] = ' ';
3923  i = 1;
3924  }
3925  plexbuff[i] = 0;
3926  yylval = cb_build_alphanumeric_literal (plexbuff, i);
3927 }
3928 
3929 static int
3930 scan_x (const char *text)
3931 {
3932  char *p;
3933  char *e;
3934  char *dst;
3935  size_t currlen;
3936  int high = 1;
3937  int c;
3938 
3939  literal_error = 0;
3940 
3941  /* currlen includes the terminating quote */
3942  currlen = strlen (text);
3943  if (unlikely(currlen - 1 > cb_lit_length)) {
3944  currlen--;
3945  snprintf (err_msg, COB_MINI_MAX,
3946  _("Literal length %d exceeds %d characters"),
3947  (int) currlen, cb_lit_length);
3948  error_literal ("X", text);
3949  goto error;
3950  }
3951  if (unlikely(currlen > plexsize)) {
3952  plexsize = currlen;
3953  plexbuff = cobc_realloc (plexbuff, plexsize);
3954  }
3955  p = (char *)text;
3956  e = (char *)p + currlen - 1;
3957  dst = plexbuff;
3958  for (; *p != *e; p++) {
3959  c = (int)*p;
3960  if ('0' <= c && c <= '9') {
3961  c = c - '0';
3962  } else if ('A' <= c && c <= 'F') {
3963  c = c - 'A' + 10;
3964  } else if ('a' <= c && c <= 'f') {
3965  c = c - 'a' + 10;
3966  } else {
3967  snprintf (err_msg, COB_MINI_MAX,
3968  _("Literal contains invalid character '%c'"), c);
3969  if (likely (literal_error == 0)) {
3970  memcpy (plexbuff, text, currlen);
3971  plexbuff[currlen - 1] = 0;
3972  }
3973  error_literal ("X", plexbuff);
3974  continue;
3975  /* By not breaking immediately, we detect any following
3976  invalid chars
3977  */
3978  }
3979  if (likely (literal_error == 0)) {
3980  if (high) {
3981  *dst = (cob_u8_t)(c << 4);
3982  } else {
3983  *dst++ += (cob_u8_t)c;
3984  }
3985  }
3986  high = 1 - high;
3987  }
3988 
3989  if (!high) {
3990  /* This is non-standard behaviour */
3991  snprintf (err_msg, COB_MINI_MAX,
3992  _("Literal does not have an even number of digits"));
3993  if (likely (literal_error == 0)) {
3994  memcpy (plexbuff, text, currlen);
3995  plexbuff[currlen - 1] = 0;
3996  }
3997  error_literal ("X", plexbuff);
3998  }
3999 
4000  if (unlikely(literal_error != 0)) {
4001  goto error;
4002  }
4003 
4004  yylval = cb_build_alphanumeric_literal (plexbuff, (size_t)(dst - plexbuff));
4005  return LITERAL;
4006 
4007 error:
4009  return LITERAL;
4010 }
4011 
4012 static int
4013 scan_z (const char *text, const cob_u32_t llit)
4014 {
4015  size_t currlen;
4016 
4017  literal_error = 0;
4018 
4019  /* currlen includes the terminating quote */
4020  currlen = strlen (text);
4021  if (unlikely((currlen - 1) > cb_lit_length)) {
4022  currlen--;
4023  snprintf (err_msg, COB_MINI_MAX,
4024  _("Literal length %d exceeds %d characters"),
4025  (int) currlen, cb_lit_length);
4026  if (llit) {
4027  error_literal ("L", text);
4028  } else {
4029  error_literal ("Z", text);
4030  }
4032  return LITERAL;
4033  }
4034  if (unlikely(currlen > plexsize)) {
4035  plexsize = currlen;
4036  plexbuff = cobc_realloc (plexbuff, plexsize);
4037  }
4038  memcpy (plexbuff, text, currlen);
4039  plexbuff[currlen - 1] = 0;
4040 
4041  /* Count is correct here as the trailing quote is now a null */
4042  yylval = cb_build_alphanumeric_literal (plexbuff, currlen);
4043  CB_LITERAL(yylval)->llit = llit;
4044  return LITERAL;
4045 }
4046 
4047 static int
4048 scan_h (const char *text, const cob_u32_t with_mark)
4049 {
4050  size_t currlen;
4051  char *p;
4052  cob_u64_t val = 0;
4053  int c;
4054 
4055  literal_error = 0;
4056 
4057  if (!with_mark &&
4058  !cb_verify (cb_acucobol_literals, _("ACUCOBOL numeric literal"))) {
4059  goto error;
4060  }
4061 
4062 
4063  /* currlen can include the terminating quote */
4064  currlen = strlen (text);
4065  memcpy (plexbuff, text, currlen + 1);
4066  if (with_mark) {
4067  currlen--;
4068  plexbuff[currlen] = 0;
4069  }
4070  if (unlikely(currlen > 16)) {
4071  snprintf (err_msg, COB_MINI_MAX,
4072  _("Literal length %d exceeds %d characters"),
4073  (int) currlen, 16);
4074  error_literal ("hex", plexbuff);
4075  goto error;
4076  }
4077 
4078  for (p = plexbuff; *p != 0; p++) {
4079  c = (int)*p;
4080  if ('0' <= c && c <= '9') {
4081  c = c - '0';
4082  } else if ('A' <= c && c <= 'F') {
4083  c = c - 'A' + 10;
4084  } else if ('a' <= c && c <= 'f') {
4085  c = c - 'a' + 10;
4086  } else {
4087  snprintf (err_msg, COB_MINI_MAX,
4088  _("Literal contains invalid character '%c'"), c);
4089  error_literal ("hex", plexbuff);
4090  continue;
4091  }
4092 
4093  val = (val << 4) + c;
4094  }
4095 
4096  if (literal_error) {
4097  goto error;
4098  }
4099 
4100  /* Duplication? */
4101  sprintf ((char *)plexbuff, CB_FMT_LLU, val);
4102  yylval = cb_build_numeric_literal (0, (const void *)plexbuff, 0);
4103 
4104  return LITERAL;
4105 
4106 error:
4108  return LITERAL;
4109 }
4110 
4111 static int
4112 scan_b (const char *text, const cob_u32_t with_mark)
4113 {
4114  size_t currlen;
4115  char *p;
4116  cob_u64_t val = 0;
4117  int c;
4118 
4119  literal_error = 0;
4120 
4121  if (( with_mark &&
4122  !cb_verify (cb_numeric_boolean, _ ("Numeric boolean literal"))) ||
4123  (!with_mark &&
4124  !cb_verify (cb_acucobol_literals, _ ("ACUCOBOL numeric literal")))) {
4125  goto error;
4126  }
4127 
4128  /* currlen can include the terminating quote */
4129  currlen = strlen (text);
4130  memcpy (plexbuff, text, currlen + 1);
4131  if (with_mark) {
4132  currlen--;
4133  plexbuff[currlen] = 0;
4134  }
4135  if (unlikely(currlen > 64)) {
4136  snprintf (err_msg, COB_MINI_MAX,
4137  _("Literal length %d exceeds %d characters"),
4138  (int) currlen, 64);
4139  error_literal ("B", plexbuff);
4140  goto error;
4141  }
4142 
4143  for (p = plexbuff; *p != 0; p++) {
4144  c = (int) *p;
4145  if (c == '0') {
4146  c = 0;
4147  } else if (c == '1') {
4148  c = 1;
4149  } else {
4150  snprintf (err_msg, COB_MINI_MAX,
4151  _("Literal contains invalid character '%c'"), c);
4152  error_literal ("B", plexbuff);
4153  continue;
4154  }
4155 
4156  val = (val << 1) + c;
4157  }
4158 
4159  if (literal_error) {
4160  goto error;
4161  }
4162 
4163  sprintf ((char *)plexbuff, CB_FMT_LLU, val);
4164  yylval = cb_build_numeric_literal (0, (const void *)plexbuff, 0);
4165 
4166  return LITERAL;
4167 
4168  error:
4170  return LITERAL;
4171 }
4172 
4173 static int
4174 scan_o (const char *text)
4175 {
4176  size_t currlen;
4177  char *p;
4178  cob_u64_t val = 0;
4179  int c;
4180 
4181  literal_error = 0;
4182 
4183  if (!cb_verify (cb_acucobol_literals, _("ACUCOBOL numeric literal"))) {
4184  goto error;
4185  }
4186 
4187  currlen = strlen (text);
4188  memcpy (plexbuff, text, currlen + 1);
4189  if (unlikely(currlen > 22)) {
4190  snprintf (err_msg, COB_MINI_MAX,
4191  _("Literal length %d exceeds %d characters"),
4192  (int) currlen, 22);
4193  error_literal ("O", plexbuff);
4194  goto error;
4195  }
4196 
4197  for (p = plexbuff; *p != 0; p++) {
4198  c = (int) *p;
4199  if (!('0' <= c && c <= '7')) {
4200  snprintf (err_msg, COB_MINI_MAX,
4201  _("Literal contains invalid character '%c'"), c);
4202  error_literal ("O", plexbuff);
4203  continue;
4204  }
4205 
4206  c = c - '0';
4207  val = (val << 3) + c;
4208  }
4209 
4210  if (literal_error) {
4211  goto error;
4212  }
4213 
4214  sprintf ((char *)plexbuff, CB_FMT_LLU, val);
4215  yylval = cb_build_numeric_literal (0, (const void *)plexbuff, 0);
4216 
4217  return LITERAL;
4218 
4219  error:
4221  return LITERAL;
4222 }
4223 
4224 static int
4225 get_sign (const char sign)
4226 {
4227  if (sign == '+') {
4228  return 1;
4229  } else if (sign == '-') {
4230  return -1;
4231  } else {
4232  return 0;
4233  }
4234 }
4235 
4236 #define INCREMENT_IF_SIGNED(text, sign) \
4237  do { \
4238  if (sign) { \
4239  (text)++; \
4240  } \
4241  } ONCE_COB
4242 
4243 static int
4244 scan_numeric (const char *text)
4245 {
4246  char *p = (char *)text;
4247  char *s;
4248  int sign;
4249  int scale;
4250 
4251  /* Get sign */
4252  sign = get_sign (*p);
4253  INCREMENT_IF_SIGNED (p, sign);
4254 
4255  /* Get decimal point */
4256  s = strchr (p, current_program->decimal_point);
4257  if (s) {
4258  scale = (int)strlen (s) - 1;
4259  /* Remove decimal point */
4260  /* Moves trailing null */
4261  memmove (s, s + 1, (size_t)(scale + 1));
4262  } else {
4263  scale = 0;
4264  }
4265 
4266  /* leading zeroes should be removed here, shouldn't they ? */
4267 
4268  if (unlikely(strlen (p) > COB_MAX_DIGITS)) {
4269  /* Absolute limit */
4270  snprintf (err_msg, COB_MINI_MAX,
4271  _("Literal length %d exceeds maximum of %d digits"),
4272  (int) strlen (p), COB_MAX_DIGITS);
4273  error_literal ("num", text);
4275  } else if (unlikely(strlen (p) > cb_numlit_length)) {
4276  snprintf (err_msg, COB_MINI_MAX,
4277  _("Literal length %d exceeds %d digits"),
4278  (int) strlen (p), cb_numlit_length);
4279  error_literal ("num", text);
4281  } else {
4282  yylval = cb_build_numeric_literal (sign, p, scale);
4283  }
4284  return LITERAL;
4285 }
4286 
4287 static int
4288 all_zeroes (const char *str)
4289 {
4290  int i;
4291 
4292  for (i = 0; str[i] != '\0'; ++i) {
4293  if (str[i] != '0') {
4294  return 0;
4295  }
4296  }
4297 
4298  return 1;
4299 }
4300 
4301 static int
4302 significand_is_zero (const char *int_part, const char *dec_part)
4303 {
4304  return all_zeroes (int_part)
4305  && all_zeroes (dec_part);
4306 }
4307 
4308 static int
4309 scan_floating_numeric (const char *text)
4310 {
4311  size_t sig_int_len;
4312  size_t sig_dec_len;
4313  int sig_sign;
4314  int exp_sign;
4315  int scale;
4316  int exponent;
4317  int n;
4318  char significand_str[37];
4319  char *significand_pos;
4320  char significand_dec[36];
4321  char significand_int[36];
4322  char exponent_str[8];
4323  char *exponent_pos;
4324 
4325  char result[128];
4326 
4327  literal_error = 0;
4328 
4329  /* Separate into significand and exponent */
4330  n = sscanf (text, "%36[0-9.,+-]%*[Ee]%7[0-9.,+-]",
4331  significand_str, exponent_str);
4332  /* We check the return for silencing warnings,
4333  this should never happen as the flex rule ensures this */
4334  if (n == 0) {
4336  return LITERAL;
4337  }
4338 
4339  /* Get signs and adjust string positions accordingly */
4340  significand_pos = &significand_str[0];
4341  sig_sign = get_sign (*significand_pos);
4342  INCREMENT_IF_SIGNED (significand_pos, sig_sign);
4343 
4344  exponent_pos = &exponent_str[0];
4345  exp_sign = get_sign (*exponent_pos);
4346  INCREMENT_IF_SIGNED (exponent_pos, exp_sign);
4347 
4348  /* Separate into integer and decimal */
4349  n = sscanf (significand_pos, "%35[0-9]%*[.,]%35[0-9]",
4350  significand_int, significand_dec);
4351  if (n == 0) { /* no integer part, copy after decimal-point */
4352  significand_int[0] = 0;
4353  strncpy (significand_dec, significand_pos + 1, 35);
4354  significand_dec[35] = 0;
4355  } else {
4356  /* silencing some warnings */
4357  significand_int[35] = significand_dec[35] = 0;
4358  }
4359 
4360  /* Validation */
4361  sig_int_len = strlen (significand_int);
4362  sig_dec_len = strlen (significand_dec);
4363  if (sig_int_len + sig_dec_len > 34U) {
4364  snprintf (err_msg, COB_MINI_MAX,
4365  _("Significand has more than 34 digits"));
4366  error_literal ("float", text);
4367  }
4368  if (strchr (exponent_pos, current_program->decimal_point)) {
4369  snprintf (err_msg, COB_MINI_MAX,
4370  _("Exponent has decimal point"));
4371  error_literal ("float", text);
4372  exponent = 0;
4373  } else {
4374  if (strlen (exponent_pos) > 4) {
4375  snprintf (err_msg, COB_MINI_MAX,
4376  _("Exponent has more than 4 digits"));
4377  error_literal ("float", text);
4378  }
4379  n = sscanf (exponent_pos, "%d", &exponent);
4380  /* We check the return for silencing warnings,
4381  this should never happen as the flex rule ensures this */
4382  if (n == 0) {
4384  return LITERAL;
4385  }
4386 
4387  if (exp_sign == -1) {
4388  exponent = -exponent;
4389  }
4390 
4391  if (!(-78 <= exponent && exponent <= 76)) {
4392  snprintf (err_msg, COB_MINI_MAX,
4393  _("Exponent not between -78 and 76"));
4394  error_literal ("float", text);
4395  }
4396  }
4397 
4398  if (significand_is_zero (significand_int, significand_dec)) {
4399  if (sig_sign == -1) {
4400  snprintf (err_msg, COB_MINI_MAX,
4401  _("Significand of 0 must be positive"));
4402  error_literal ("float", text);
4403  }
4404  if (exponent != 0) {
4405  snprintf (err_msg, COB_MINI_MAX,
4406  _("Exponent of 0 must be 0"));
4407  error_literal ("float", text);
4408  }
4409  if (exp_sign == -1) {
4410  snprintf (err_msg, COB_MINI_MAX,
4411  _("Exponent of 0 must be positive"));
4412  error_literal ("float", text);
4413  }
4414  }
4415 
4416  if (literal_error) {
4418  return LITERAL;
4419  }
4420 
4421  /* Determine scale */
4422  /* Base scale is decimal part of the significant */
4423  scale = (int)sig_dec_len;
4424  /* Adjust according to exponent */
4425  if (exponent < 0) {
4426  /* Decimals; power down by scale difference */
4427  exponent = -exponent;
4428  scale += exponent;
4429  result[0] = 0;
4430  if (exponent > (int)sig_int_len) {
4431  n = exponent - (int)sig_int_len;
4432  for (; n; --n) {
4433  strcat (result, "0");
4434  }
4435  }
4436  strcat (result, significand_int);
4437  strcat (result, significand_dec);
4438  } else if (exponent > 0) {
4439  /* No decimals; power up by scale difference */
4440  strcpy (result, significand_int);
4441  strcat (result, significand_dec);
4442  if (exponent >= scale) {
4443  n = exponent - scale;
4444  for (; n; --n) {
4445  strcat (result, "0");
4446  }
4447  scale = 0;
4448  } else {
4449  scale -= exponent;
4450  }
4451  } else {
4452  /* Exponent is 0; take as is */
4453  strcpy (result, significand_int);
4454  strcat (result, significand_dec);
4455  }
4456 
4457  yylval = cb_build_numeric_literal (sig_sign, result,
4458  scale);
4459  return LITERAL;
4460 }
4461 
4462 static int
4463 can_replace (const char *src1, const char *src2, const size_t size,
4464  const size_t iteration)
4465 {
4466  const unsigned char *p;
4467 
4468  /* Check if we can do a replacement */
4469  if (strncasecmp (src1, src2, size)) {
4470  return 0;
4471  }
4472  p = (const unsigned char *)src1 + size;
4473  if (valid_char[*p]) {
4474  return 0;
4475  }
4476  if (iteration) {
4477  p = (const unsigned char *)src1 - 1;
4478  if (valid_char[*p]) {
4479  return 0;
4480  }
4481  }
4482  return 1;
4483 }
4484 
4485 static const char *
4487 {
4488  /* Check if we can do a constant replacement within PICTURE */
4489  if (CB_LITERAL_P (p)) {
4490  if (CB_LITERAL(p)->size > 50) {
4491  return NULL;
4492  }
4493  return (const char *)(CB_LITERAL(p)->data);
4494  }
4495  if (p == cb_low) {
4496  return "LOW-VALUE";
4497  }
4498  if (p == cb_high) {
4499  return "HIGH-VALUE";
4500  }
4501  if (p == cb_space) {
4502  return "SPACE";
4503  }
4504  if (p == cb_zero) {
4505  return "ZERO";
4506  }
4507  if (p == cb_quote) {
4508  return "QUOTE";
4509  }
4510  if (p == cb_null) {
4511  return "NULL";
4512  }
4513  return NULL;
4514 }
4515 
4516 static void
4517 scan_picture (const char *text)
4518 {
4519  unsigned char *p;
4520  const struct cb_level_78 *p78;
4521  size_t n;
4522  size_t i;
4523  size_t size;
4524  size_t sizep;
4525 
4526  /* Scan a PICTURE clause */
4527  /* Normalize the input */
4528  for (p = (unsigned char *)text; *p; p++) {
4529  /* unput trailing '.' or ',' */
4530  if (p[1] == 0 && (*p == '.' || *p == ',')) {
4531  unput (*p);
4532  *p = 0;
4533  break;
4534  }
4535  *p = (unsigned char)toupper (*p);
4536  }
4537 
4538  if (!top78ptr) {
4539  yylval = cb_build_picture (text);
4540  return;
4541  }
4542 
4543  memset (picbuff1, 0, pic1size);
4544  memset (picbuff2, 0, pic2size);
4545  strcpy (picbuff1, text);
4546  for (p78 = top78ptr; p78; p78 = p78->globnext) {
4547  if (!p78->pic_replace) {
4548  strcpy (picbuff2, picbuff1);
4549  continue;
4550  }
4551  size = p78->name_len;
4552  sizep = p78->pic_len;
4553  i = 0;
4554  for (n = 0; n < strlen (picbuff1); n++) {
4555  if (can_replace (&picbuff1[n], p78->fld78->name, size, n)) {
4556  memcpy (&picbuff2[i], p78->pic_replace, sizep);
4557  n += size - 1;
4558  i += sizep;
4559  } else {
4560  picbuff2[i++] = picbuff1[n];
4561  }
4562  }
4563  picbuff2[i] = 0;
4564  strcpy (picbuff1, picbuff2);
4565  }
4566  yylval = cb_build_picture (picbuff2);
4567 }
4568 
4569 static void
4570 count_lines (const char *text)
4571 {
4572  const char *p;
4573 
4574  /* Count newlines in text */
4575  for (p = text; *p; p++) {
4576  if (*p == '\n') {
4577  cb_source_line++;
4578  }
4579  }
4580 }
4581 
4582 static void
4583 cb_add_const_var (const char *name, cb_tree value)
4584 {
4585  cb_tree x;
4586  struct cb_level_78 *p78;
4587  struct cb_field *f;
4588 
4589 
4590  /* Add an inline constant */
4591  x = cb_build_constant (cb_build_reference (name), value);
4592  f = CB_FIELD (x);
4593  f->flag_item_78 = 1;
4594  f->flag_is_global = 1;
4595  f->level = 1;
4596  (void)cb_validate_78_item (f, 1);
4597 
4598  /* Add constant item */
4599  p78 = cobc_malloc (sizeof(struct cb_level_78));
4600  p78->fld78 = f;
4601  p78->prog = NULL;
4603  if (p78->pic_replace) {
4604  p78->pic_len = (cob_u32_t)strlen (p78->pic_replace);
4605  }
4606  p78->name_len = (cob_u32_t)strlen (f->name);
4607  /* RXWRXW - Check this */
4608  p78->chk_const = 0;
4609  if (!const78ptr) {
4610  p78->last = p78;
4611  } else {
4612  p78->last = const78ptr->last;
4613  }
4614  p78->next = const78ptr;
4615  p78->globnext = const78ptr;
4616  const78ptr = p78;
4617  if (globlev78ptr) {
4618  globlev78ptr->last->globnext = const78ptr;
4619  } else if (lev78ptr) {
4620  lev78ptr->last->globnext = const78ptr;
4621  } else {
4622  top78ptr = const78ptr;
4623  }
4624 }
4625 
4626 static void
4627 scan_options (const char *text, const unsigned int optype)
4628 {
4629  COB_UNUSED (text);
4630  COB_UNUSED (optype);
4631 }
4632 
4633 static void
4634 scan_define_options (const char *text)
4635 {
4636  char *p;
4637  char *s;
4638  char *var;
4639  const struct cb_level_78 *p78;
4640  char *q;
4641  unsigned char *t;
4642  cb_tree x;
4643  size_t size;
4644  int scale;
4645  int sign;
4646 
4647  /* Scan a source inline define */
4648  p = cobc_strdup (text);
4649 
4650  /* Ignore first part */
4651  s = strtok (p, " ");
4652 
4653  /* Variable name */
4654  s = strtok (NULL, " \n");
4655  if (!s) {
4656  cobc_free (p);
4657  return;
4658  }
4659 
4660  /* Check for already defined constant */
4661  for (p78 = top78ptr; p78; p78 = p78->globnext) {
4662  if (strcasecmp (s, p78->fld78->name) == 0) {
4663  cobc_free (p);
4664  return;
4665  }
4666  }
4667 
4668  var = cobc_strdup (s);
4669 
4670  /* Value */
4671  s = strtok (NULL, "\n");
4672  if (!s) {
4673  cb_error (_("Invalid CONSTANT - %s"), var);
4674  goto freevar;
4675  }
4676 
4677  if (*s == '"' || *s == '\'') {
4678  /* Alphanumeric literal */
4679  sign = *s;
4680  size = strlen (s);
4681  q = s + size - 1;
4682  if (q == s || *q != sign) {
4683  cb_error (_("Invalid alphanumeric CONSTANT - %s"), s);
4684  goto freevar;
4685  }
4686  if (size < 3) {
4687  cb_error (_("Empty alphanumeric CONSTANT - %s"), s);
4688  goto freevar;
4689  }
4690  *q = 0;
4691  size -= 2;
4692  x = cb_build_alphanumeric_literal (s + 1, size);
4693  } else {
4694  /* Get sign */
4695  sign = get_sign (*s);
4696  INCREMENT_IF_SIGNED (s, sign);
4697 
4698  /* Get decimal point */
4699  scale = 0;
4700  q = strchr (s, '.');
4701  if (q) {
4702  scale = (int)strlen (q) - 1;
4703  if (scale < 1) {
4704  cb_error (_("Invalid numeric CONSTANT - %s"), s);
4705  goto freevar;
4706  }
4707  /* Remove decimal point */
4708  memmove (q, q + 1, (size_t)(scale + 1));
4709  }
4710  for (t = (unsigned char *)s; *t; ++t) {
4711  if (*t < '0' || *t > '9') {
4712  cb_error (_("Invalid numeric CONSTANT - %s"), s);
4713  goto freevar;
4714  }
4715  }
4716  if (strlen (s) > COB_MAX_DIGITS) {
4717  cb_error (_("Invalid numeric CONSTANT - %s"), s);
4718  goto freevar;
4719  }
4720 
4721  x = cb_build_numeric_literal (sign, s, scale);
4722  }
4723  /* Add to constant list */
4724  cb_add_const_var (var, x);
4725 
4726 freevar:
4727  cobc_free (p);
4728  cobc_free (var);
4729 }
4730 
4731 #undef INCREMENT_IF_SIGNED
4732 
4733 /* Global functions */
4734 
4735 void
4737 {
4738  /* Clear buffers after parsing all source elements */
4739  if (picbuff2) {
4740  cobc_free (picbuff2);
4741  picbuff2 = NULL;
4742  }
4743  if (picbuff1) {
4744  cobc_free (picbuff1);
4745  picbuff1 = NULL;
4746  }
4747  if (plexbuff) {
4748  cobc_free (plexbuff);
4749  plexbuff = NULL;
4750  }
4751  plexsize = 0;
4752  pic1size = 0;
4753  pic2size = 0;
4754 }
4755 
4756 void
4758 {
4759  /* Release flex buffers */
4760  (void)yylex_destroy ();
4761  const78ptr = NULL;
4762 }
4763 
4764 void
4766 {
4767  unput ('.');
4768 }
4769 
4770 void
4772 {
4773  struct cb_level_78 *p78;
4774  struct cb_level_78 *p782;
4775 
4776  /* Remove constant (78 level) items for current program */
4777  for (p78 = lev78ptr; p78; ) {
4778  p782 = p78->next;
4779  cobc_free (p78);
4780  p78 = p782;
4781  }
4782  lev78ptr = NULL;
4783  for (p78 = globlev78ptr; p78; p78 = p78->next) {
4784  p78->not_const = 0;
4785  }
4786  if (globlev78ptr) {
4787  top78ptr = globlev78ptr;
4788  } else {
4789  top78ptr = const78ptr;
4790  }
4791 }
4792 
4793 void
4795 {
4796  struct cb_level_78 *p78;
4797  struct cb_level_78 *p782;
4798 
4799  /* Remove constant (78 level) items for top program */
4800  for (p78 = globlev78ptr; p78; ) {
4801  p782 = p78->next;
4802  cobc_free (p78);
4803  p78 = p782;
4804  }
4805  globlev78ptr = NULL;
4806  top78ptr = const78ptr;
4807 }
4808 
4809 void
4810 cb_add_78 (struct cb_field *f)
4811 {
4812  struct cb_level_78 *p78;
4813 
4814  /* Add a constant (78 level) item */
4815  p78 = cobc_malloc (sizeof(struct cb_level_78));
4816  p78->fld78 = f;
4817  p78->prog = current_program;
4819  if (p78->pic_replace) {
4820  p78->pic_len = (cob_u32_t)strlen (p78->pic_replace);
4821  }
4822  p78->name_len = (cob_u32_t)strlen (f->name);
4823  if (f->flag_is_global) {
4824  if (!globlev78ptr) {
4825  p78->last = p78;
4826  } else {
4827  p78->last = globlev78ptr->last;
4828  }
4829  p78->last->globnext = const78ptr;
4830  p78->next = globlev78ptr;
4831  p78->globnext = globlev78ptr;
4832  p78->chk_const = 1;
4833  globlev78ptr = p78;
4834  if (lev78ptr) {
4835  lev78ptr->last->globnext = globlev78ptr;
4836  } else {
4837  top78ptr = globlev78ptr;
4838  }
4839  } else {
4840  if (!lev78ptr) {
4841  p78->last = p78;
4842  } else {
4843  p78->last = lev78ptr->last;
4844  }
4845  if (globlev78ptr) {
4846  p78->last->globnext = globlev78ptr;
4847  } else {
4848  p78->last->globnext = const78ptr;
4849  }
4850  p78->next = lev78ptr;
4851  p78->globnext = lev78ptr;
4852  lev78ptr = p78;
4853  top78ptr = lev78ptr;
4854  }
4855 }
4856 
4857 struct cb_field *
4858 check_level_78 (const char *name)
4859 {
4860  const struct cb_level_78 *p78;
4861 
4862  /* Check against a current constant (78 level) */
4863  for (p78 = lev78ptr; p78; p78 = p78->next) {
4864  if (strcasecmp (name, p78->fld78->name) == 0) {
4865  return p78->fld78;
4866  }
4867  }
4868  /* Check against a global constant (78 level) */
4869  for (p78 = globlev78ptr; p78; p78 = p78->next) {
4870  if (strcasecmp (name, p78->fld78->name) == 0) {
4871  return p78->fld78;
4872  }
4873  }
4874  return NULL;
4875 }
4876 
4877 /*
4878  Find program with the program-name name in defined_prog_list. If it is not
4879  there, return NULL.
4880 */
4881 struct cb_program *
4883 {
4884  int (*cmp_func)(const char *, const char *);
4885  cb_tree l;
4886  cb_tree x;
4887 
4888  if (cb_fold_call) {
4889  cmp_func = &strcasecmp;
4890  } else {
4891  cmp_func = &strcmp;
4892  }
4893 
4894  for (l = defined_prog_list; l; l = CB_CHAIN (l)) {
4895  x = CB_VALUE (l);
4896  if ((*cmp_func)(name, CB_PROGRAM (x)->program_name) == 0) {
4897  return CB_PROGRAM (x);
4898  }
4899  }
4900 
4901  return NULL;
4902 }
4903 
4904 struct cb_program *
4905 cb_find_defined_program_by_id (const char *orig_id)
4906 {
4907  cb_tree l;
4908  cb_tree x;
4909 
4910  for (l = defined_prog_list; l; l = CB_CHAIN (l)) {
4911  x = CB_VALUE (l);
4912  if (strcmp (orig_id, CB_PROGRAM (x)->orig_program_id) == 0) {
4913  return CB_PROGRAM (x);
4914  }
4915  }
4916 
4917  return NULL;
4918 }
4919 
4920 #ifndef HAVE_DESIGNATED_INITS
4921 void
4923 {
4924  const unsigned char *p;
4925 
4926  memset (valid_char, 0, sizeof(valid_char));
4927  for (p = pvalid_char; *p; ++p) {
4928  valid_char[*p] = 1;
4929  }
4930 }
4931 #endif
4932 
void yy_flush_buffer(YY_BUFFER_STATE b)
Discard all buffered characters.
Definition: scanner.c:3587
static flex_int16_t yy_accept[833]
Definition: scanner.c:383
const char * name
Definition: tree.h:645
struct cb_text_list * next
Definition: cobc.h:160
static void scan_define_options(const char *)
Definition: scanner.c:4634
struct cb_tree_common * defined_prog_list
Definition: parser.c:172
static char yy_hold_char
Definition: scanner.c:284
YY_BUFFER_STATE yy_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
Definition: scanner.c:3512
char * yy_buf_pos
Definition: pplex.c:224
static int scan_o(const char *)
Definition: scanner.c:4174
FILE * yy_input_file
Definition: pplex.c:221
const char * name
Definition: tree.h:979
static void cb_add_const_var(const char *name, cb_tree value)
Definition: scanner.c:4583
void * yyrealloc(void *, yy_size_t)
Definition: scanner.c:3820
struct cb_level_78 * lev78ptr
Definition: scanner.c:1432
void * cobc_realloc(void *prevptr, const size_t size)
Definition: cobc.c:687
unsigned int cobc_force_literal
Definition: parser.c:181
#define cob_u32_t
Definition: common.h:31
cb_tree cb_build_comment(const char *str)
Definition: tree.c:1540
const char * cb_source_file
Definition: cobc.c:145
static void read_literal(const char)
Definition: scanner.c:3873
struct cb_text_list * cb_intrinsic_list
Definition: cobc.c:150
#define CB_FMT_LLU
Definition: common.h:57
#define EOB_ACT_LAST_MATCH
Definition: scanner.c:177
cb_tree cb_build_constant(cb_tree name, cb_tree value)
Definition: tree.c:2189
void yypop_buffer_state(void)
Removes and deletes the top of the stack, if present.
Definition: scanner.c:3646
static struct cb_level_78 * globlev78ptr
Definition: scanner.c:1439
const char * text
Definition: cobc.h:162
#define EOB_ACT_END_OF_FILE
Definition: scanner.c:176
int flex_int32_t
Definition: pplex.c:73
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: scanner.c:266
int yylex_destroy(void)
Definition: scanner.c:3770
#define YY_END_OF_BUFFER
Definition: scanner.c:375
int yy_fill_buffer
Definition: pplex.c:261
unsigned short int flex_uint16_t
Definition: scanner.c:56
#define CB_LITERAL(x)
Definition: tree.h:601
#define YY_CURRENT_BUFFER_LVALUE
Definition: scanner.c:281
static yy_size_t yy_n_chars
Definition: scanner.c:285
#define yytext_ptr
Definition: scanner.c:357
void yy_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
Definition: scanner.c:3540
#define YY_BREAK
Definition: scanner.c:1694
const int token
Definition: tree.h:982
size_t yy_size_t
Definition: scanner.c:168
unsigned int flex_uint32_t
Definition: scanner.c:57
struct cb_level_78 * last
Definition: scanner.c:1420
int warningopt
Definition: cobc.c:176
unsigned int cb_verify(const enum cb_support, const char *)
Definition: error.c:246
unsigned char YY_CHAR
Definition: pplex.c:365
static int yy_did_buffer_switch_on_eof
Definition: scanner.c:296
void cobc_free(void *mptr)
Definition: cobc.c:657
#define YY_FATAL_ERROR(msg)
Definition: scanner.c:1669
struct cb_level_78 * globnext
Definition: scanner.c:1419
#define INCREMENT_IF_SIGNED(text, sign)
Definition: scanner.c:4236
struct cb_intrinsic_table * lookup_intrinsic(const char *name, const int checkres, const int checkimpl)
Definition: reserved.c:2976
cb_tree cb_zero
Definition: tree.c:125
int yy_bs_lineno
The line count.
Definition: pplex.c:255
static flex_int16_t yy_def[865]
Definition: scanner.c:622
static flex_int16_t yy_nxt[2719]
Definition: scanner.c:721
#define COB_MINI_BUFF
Definition: common.h:539
void yyfree(void *)
Definition: scanner.c:3832
#define YY_BUFFER_NORMAL
Definition: scanner.c:247
static size_t pic1size
Definition: scanner.c:1444
#define YY_RULE_SETUP
Definition: scanner.c:1697
static void scan_options(const char *, const unsigned int)
Definition: scanner.c:4627
int level
Definition: tree.h:673
unsigned char flag_is_global
Definition: tree.h:699
static void yy_fatal_error(char msg[])
#define YY_BUFFER_EOF_PENDING
Definition: scanner.c:258
cb_tree cb_quote
Definition: tree.c:132
void * cobc_parse_strdup(const char *dupstr)
Definition: cobc.c:827
#define unput(c)
Definition: scanner.c:196
#define CB_WORD_ITEMS(x)
Definition: tree.h:906
static flex_int16_t yy_chk[2719]
Definition: scanner.c:1024
cb_tree cb_space
Definition: tree.c:127
static char * yy_c_buf_p
Definition: scanner.c:289
#define CB_CS_EXIT
Definition: cobc.h:112
#define YY_STATE_EOF(state)
Definition: scanner.c:137
yy_size_t yy_buf_size
Definition: pplex.c:229
static yy_state_type yy_last_accepting_state
Definition: scanner.c:1327
if fold fold static computed alternate extra correct stack on syntax debugging source implicit stack syntax write single recursive relax optional file
Definition: flag.def:129
static char * yy_last_accepting_cpos
Definition: scanner.c:1328
struct cb_field * fld78
Definition: scanner.c:1421
static void count_lines(const char *)
Definition: scanner.c:4570
yy_size_t yy_n_chars
Definition: pplex.c:234
#define CB_LITERAL_P(x)
Definition: tree.h:602
static size_t yy_buffer_stack_top
index of top of stack.
Definition: scanner.c:264
static unsigned int inside_bracket
Definition: scanner.c:1448
cb_tree cb_build_picture(const char *str)
Definition: tree.c:1800
#define COB_MAX_DIGITS
Definition: common.h:562
#define cob_u8_t
Definition: common.h:27
#define CB_VALUE(x)
Definition: tree.h:1193
Definition: parser.c:1815
struct cb_level_78 * next
Definition: scanner.c:1418
short int flex_int16_t
Definition: pplex.c:72
Definition: parser.c:1471
unsigned int flag_item_78
Definition: tree.h:711
static int scan_numeric(const char *)
Definition: scanner.c:4244
#define COB_MAX_WORDLEN
Definition: common.h:574
#define PICTURE_STATE
Definition: scanner.c:1546
static struct cb_level_78 * lev78ptr
Definition: scanner.c:1438
cb_tree cb_build_alphanumeric_literal(const void *data, const size_t size)
Definition: tree.c:1716
static int scan_floating_numeric(const char *)
Definition: scanner.c:4309
void ylex_call_destroy(void)
Definition: scanner.c:4757
#define YY_MORE_ADJ
Definition: scanner.c:1338
#define YY_USER_INIT
Definition: scanner.c:1382
#define YY_SC_TO_UI(c)
Definition: scanner.c:121
#define YY_BUF_SIZE
Definition: scanner.c:1366
static void scan_picture(const char *)
Definition: scanner.c:4517
#define EOB_ACT_CONTINUE_SCAN
Definition: scanner.c:175
void yypush_buffer_state(YY_BUFFER_STATE new_buffer)
Pushes the new state onto the stack.
Definition: scanner.c:3616
static flex_int32_t yy_ec[256]
Definition: scanner.c:479
cb_tree cb_build_numeric_literal(const int sign, const void *data, const int scale)
Definition: tree.c:1681
int yy_at_bol
Definition: pplex.c:253
static unsigned int literal_error
Definition: scanner.c:1449
static int yy_init
Definition: scanner.c:290
static void error_literal(const char *type, const char *literal)
Definition: scanner.c:3844
#define YY_START
Definition: scanner.c:133
#define YY_CURRENT_BUFFER
Definition: scanner.c:274
strict implicit external value
Definition: warning.def:54
static size_t pic2size
Definition: scanner.c:1445
static int all_zeroes(const char *str)
Definition: scanner.c:4288
#define YY_INPUT(buf, result, max_size)
Definition: scanner.c:1373
#define YY_EXIT_FAILURE
Definition: scanner.c:3709
static int scan_x(const char *)
Definition: scanner.c:3930
static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: scanner.c:3559
cb_tree function_spec_list
Definition: tree.h:1271
int yy_bs_column
The column count.
Definition: pplex.c:256
unsigned int cobc_in_repository
Definition: parser.c:180
static int significand_is_zero(const char *int_part, const char *dec_part)
Definition: scanner.c:4302
FILE * yyin
Definition: scanner.c:348
#define _(s)
Definition: cobcrun.c:59
struct cb_program * prog
Definition: scanner.c:1422
static int scan_b(const char *, const cob_u32_t)
Definition: scanner.c:4112
Definition: tree.h:643
#define unlikely(x)
Definition: common.h:437
#define BEGIN
Definition: scanner.c:127
static const unsigned char pvalid_char[]
Definition: scanner.c:1521
unsigned char YY_CHAR
Definition: scanner.c:346
#define CB_CHAIN(x)
Definition: tree.h:1194
cob_u32_t name_len
Definition: scanner.c:1424
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
Definition: exception.def:95
static const char * check_78_replace(const cb_tree p)
Definition: scanner.c:4486
#define YY_END_OF_BUFFER_CHAR
Definition: scanner.c:142
if sign
Definition: flag.def:42
#define INITIAL
Definition: scanner.c:1543
Definition: parser.c:1590
#define DECIMAL_IS_COMMA
Definition: scanner.c:1545
struct cobc_reserved * lookup_reserved_word(const char *name)
Definition: reserved.c:2910
struct cb_program * cb_find_defined_program_by_id(const char *orig_id)
Definition: scanner.c:4905
int yylineno
Definition: scanner.c:354
unsigned char prog_type
Definition: tree.h:1303
struct cb_field * cb_validate_78_item(struct cb_field *f, const cob_u32_t no78add)
Definition: field.c:1415
static void yyunput(int c, char *buf_ptr)
static char * picbuff1
Definition: scanner.c:1441
#define CB_PROGRAM(x)
Definition: tree.h:1328
char * yy_ch_buf
Definition: pplex.c:223
static int input(void)
Definition: scanner.c:3373
void cb_add_78(struct cb_field *f)
Definition: scanner.c:4810
#define CB_FUNC_PROTOTYPE(x)
Definition: tree.h:1339
#define YY_NEW_FILE
Definition: scanner.c:140
static char err_msg[COB_MINI_BUFF]
Definition: scanner.c:1450
Definition: parser.c:1473
static int scan_h(const char *, const cob_u32_t)
Definition: scanner.c:4048
cob_u32_t pic_len
Definition: scanner.c:1425
static void yyensure_buffer_stack(void)
Definition: scanner.c:3665
int non_const_word
Definition: parser.c:178
cb_tree cb_build_reference(const char *name)
Definition: tree.c:2572
#define yyterminate()
Definition: scanner.c:1659
unsigned char flex_uint8_t
Definition: scanner.c:55
unsigned short nodegen
Definition: tree.h:419
cb_tree cb_error_node
Definition: tree.c:140
int yy_is_our_buffer
Definition: pplex.c:240
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: scanner.c:3309
Definition: parser.c:1503
static int scan_z(const char *, const cob_u32_t)
Definition: scanner.c:4013
void * cobc_strdup(const char *dupstr)
Definition: cobc.c:669
void cb_error(const char *,...) COB_A_FORMAT12
Definition: error.c:98
static size_t plexsize
Definition: scanner.c:1443
const char * program_name
Definition: tree.h:1243
YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size)
static struct cb_level_78 * const78ptr
Definition: scanner.c:1437
signed char flex_int8_t
Definition: scanner.c:52
int functions_are_all
Definition: parser.c:177
#define YY_RESTORE_YY_MORE_OFFSET
Definition: scanner.c:1339
#define CB_FUNCTION_TYPE
Definition: tree.h:42
struct cb_program * current_program
Definition: parser.c:168
static int get_sign(const char sign)
Definition: scanner.c:4225
struct cb_top_level_78 * next
Definition: scanner.c:1431
cb_tree cb_null
Definition: tree.c:124
const char * pic_replace
Definition: scanner.c:1423
void * yyalloc(yy_size_t)
Definition: scanner.c:3815
void ylex_clear_all(void)
Definition: scanner.c:4736
unsigned int cobc_in_procedure
Definition: parser.c:179
flex_int32_t yy_verify
Definition: pplex.c:399
static unsigned int integer_is_label
Definition: scanner.c:1447
cb_tree cb_high
Definition: tree.c:129
#define FUNCTION_STATE
Definition: scanner.c:1547
yytokentype
Definition: parser.c:1343
#define CB_WORD_COUNT(x)
Definition: tree.h:905
static char * plexbuff
Definition: scanner.c:1440
void cb_warning(const char *,...) COB_A_FORMAT12
Definition: error.c:87
yy_size_t yyleng
Definition: scanner.c:286
#define yylval
Definition: ppparse.c:69
static int yy_init_globals(void)
Get the current token.
Definition: scanner.c:3741
#define YY_READ_BUF_SIZE
Definition: scanner.c:1364
int yylex(void)
The main scanner function which does all the work.
Definition: scanner.c:1705
int yy_state_type
Definition: scanner.c:350
static int yy_get_next_buffer(void)
Definition: scanner.c:3142
int token
Definition: tree.h:421
void * cobc_malloc(const size_t size)
Definition: cobc.c:643
void cb_reset_global_78(void)
Definition: scanner.c:4794
static struct cb_level_78 * top78ptr
Definition: scanner.c:1436
int flex_int32_t
Definition: scanner.c:54
int cb_source_line
Definition: cobc.c:178
cob_u32_t not_const
Definition: scanner.c:1426
static int yywrap(void)
Definition: scanner.c:1369
static unsigned char valid_char[256]
Definition: scanner.c:1520
struct cb_program * cb_find_defined_program_by_name(const char *name)
Definition: scanner.c:4882
static unsigned int last_token_is_dot
Definition: scanner.c:1446
flex_int32_t yy_nxt
Definition: pplex.c:400
cob_u32_t chk_const
Definition: scanner.c:1427
static int can_replace(const char *src1, const char *src2, const size_t size, const size_t iteration)
Definition: scanner.c:4463
int yy_flex_debug
Definition: scanner.c:1331
int yy_is_interactive
Definition: pplex.c:247
short int flex_int16_t
Definition: scanner.c:53
YY_BUFFER_STATE yy_scan_string(char *yy_str)
#define yyconst
Definition: scanner.c:110
FILE * yyout
Definition: scanner.c:348
#define CB_SYSTEM_NAME_P(x)
Definition: tree.h:587
void cb_reset_78(void)
Definition: scanner.c:4771
#define YY_AT_BOL()
Definition: scanner.c:342
Definition: parser.c:1501
unsigned int cobc_cs_check
Definition: parser.c:182
cb_tree user_spec_list
Definition: tree.h:1272
cb_tree values
Definition: tree.h:648
#define cob_u64_t
Definition: common.h:52
#define COB_UNUSED(z)
Definition: common.h:535
static flex_int16_t yy_base[865]
Definition: scanner.c:523
char * yytext
Definition: scanner.c:1340
#define DECIMAL_IS_PERIOD
Definition: scanner.c:1544
static char * picbuff2
Definition: scanner.c:1442
#define YY_DECL
Definition: scanner.c:1682
struct yy_buffer_state * YY_BUFFER_STATE
Definition: scanner.c:163
static int yy_start
Definition: scanner.c:291
struct cb_field * check_level_78(const char *name)
Definition: scanner.c:4858
int yy_buffer_status
Definition: pplex.c:263
Definition: parser.c:1853
static void yy_load_buffer_state(void)
Definition: scanner.c:3498
void cb_unput_dot(void)
Definition: scanner.c:4765
void cobc_init_scanner(void)
Definition: scanner.c:4922
#define likely(x)
Definition: common.h:436
void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Switch to a different input buffer.
Definition: scanner.c:3467
static flex_int32_t yy_meta[75]
Definition: scanner.c:511
cb_tree cb_low
Definition: tree.c:128
static yy_state_type yy_get_previous_state(void)
Definition: scanner.c:3276
unsigned char decimal_point
Definition: tree.h:1300
static size_t yy_buffer_stack_max
capacity of stack.
Definition: scanner.c:265
#define CB_FIELD(x)
Definition: tree.h:740
#define YY_BUFFER_NEW
Definition: scanner.c:246
char * orig_program_id
Definition: tree.h:1246
YY_BUFFER_STATE yy_scan_bytes(char *bytes, yy_size_t len)
#define COB_MINI_MAX
Definition: common.h:545
#define YY_DO_BEFORE_ACTION
Definition: scanner.c:367
size_t yy_size_t
Definition: pplex.c:187
void yyrestart(FILE *input_file)
Immediately switch to a different input stream.
Definition: scanner.c:3450