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