Debian Codegraph @

src/testpattern/testpatternl.c

raw symbols SCIP
1
2 #line 2 "testpatternl.c"
3
4 #define YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX (4294967295U)
84 #endif
85
86 #ifndef SIZE_MAX
87 #define SIZE_MAX (~(size_t)0)
88 #endif
89
90 #endif /* ! C99 */
91
92 #endif /* ! FLEXINT_H */
93
94 /* begin standard C++ headers. */
95
96 /* TODO: this is always defined, so inline it */
97 #define yyconst const
98
99 #if defined(__GNUC__) && __GNUC__ >= 3
100 #define yynoreturn __attribute__((__noreturn__))
101 #else
102 #define yynoreturn
103 #endif
104
105 /* Returned upon end-of-file. */
106 #define YY_NULL 0
107
108 /* Promotes a possibly negative, possibly signed char to an
109 * integer in range [0..255] for use as an array index.
110 */
111 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
112
113 /* Enter a start condition. This macro really ought to take a parameter,
114 * but we do it the disgusting crufty way forced on us by the ()-less
115 * definition of BEGIN.
116 */
117 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119 * to BEGIN to return to the state. The YYSTATE alias is for lex
120 * compatibility.
121 */
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
126 /* Special action meaning "start processing a new file". */
127 #define YY_NEW_FILE yyrestart( yyin )
128 #define YY_END_OF_BUFFER_CHAR 0
129
130 /* Size of default input buffer. */
131 #ifndef YY_BUF_SIZE
132 #ifdef __ia64__
133 /* On IA-64, the buffer size is 16k, not 8k.
134 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135 * Ditto for the __ia64__ case accordingly.
136 */
137 #define YY_BUF_SIZE 32768
138 #else
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
141 #endif
142
143 /* The state buf must be large enough to hold one state per character in the main buffer.
144 */
145 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
146
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state *YY_BUFFER_STATE;
150 #endif
151
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t;
155 #endif
156
157 extern int yyleng;
158
159 extern FILE *yyin, *yyout;
160
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
164
165 #define YY_LESS_LINENO(n)
166 #define YY_LINENO_REWIND_TO(ptr)
167
168 /* Return all but the first "n" matched characters back to the input stream. */
169 #define yyless(n) \
170 do \
171 { \
172 /* Undo effects of setting up yytext. */ \
173 int yyless_macro_arg = (n); \
174 YY_LESS_LINENO(yyless_macro_arg);\
175 *yy_cp = (yy_hold_char); \
176 YY_RESTORE_YY_MORE_OFFSET \
177 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
179 } \
180 while ( 0 )
181 #define unput(c) yyunput( c, (yytext_ptr) )
182
183 #ifndef YY_STRUCT_YY_BUFFER_STATE
184 #define YY_STRUCT_YY_BUFFER_STATE
185 struct yy_buffer_state
186 {
187 FILE *yy_input_file;
188
189 char *yy_ch_buf; /* input buffer */
190 char *yy_buf_pos; /* current position in input buffer */
191
192 /* Size of input buffer in bytes, not including room for EOB
193 * characters.
194 */
195 int yy_buf_size;
196
197 /* Number of characters read into yy_ch_buf, not including EOB
198 * characters.
199 */
200 int yy_n_chars;
201
202 /* Whether we "own" the buffer - i.e., we know we created it,
203 * and can realloc() it to grow it, and should free() it to
204 * delete it.
205 */
206 int yy_is_our_buffer;
207
208 /* Whether this is an "interactive" input source; if so, and
209 * if we're using stdio for input, then we want to use getc()
210 * instead of fread(), to make sure we stop fetching input after
211 * each newline.
212 */
213 int yy_is_interactive;
214
215 /* Whether we're considered to be at the beginning of a line.
216 * If so, '^' rules will be active on the next match, otherwise
217 * not.
218 */
219 int yy_at_bol;
220
221 int yy_bs_lineno; /**< The line count. */
222 int yy_bs_column; /**< The column count. */
223
224 /* Whether to try to fill the input buffer when we reach the
225 * end of it.
226 */
227 int yy_fill_buffer;
228
229 int yy_buffer_status;
230
231 #define YY_BUFFER_NEW 0
232 #define YY_BUFFER_NORMAL 1
233 /* When an EOF's been seen but there's still some text to process
234 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
235 * shouldn't try reading from the input source any more. We might
236 * still have a bunch of tokens to match, though, because of
237 * possible backing-up.
238 *
239 * When we actually see the EOF, we change the status to "new"
240 * (via yyrestart()), so that the user can continue scanning by
241 * just pointing yyin at a new input file.
242 */
243 #define YY_BUFFER_EOF_PENDING 2
244
245 };
246 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
247
248 /* Stack of input buffers. */
249 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
250 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
251 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
252
253 /* We provide macros for accessing buffer states in case in the
254 * future we want to put the buffer states in a more general
255 * "scanner state".
256 *
257 * Returns the top of the stack, or NULL.
258 */
259 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
260 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
261 : NULL)
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263 * NULL or when we need an lvalue. For internal use only.
264 */
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
266
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char;
269 static int yy_n_chars; /* number of characters read into yy_ch_buf */
270 int yyleng;
271
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p = NULL;
274 static int yy_init = 0; /* whether we need to initialize */
275 static int yy_start = 0; /* start state number */
276
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278 * instead of setting up a fresh yyin. A bit of a hack ...
279 */
280 static int yy_did_buffer_switch_on_eof;
281
282 void yyrestart ( FILE *input_file );
283 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
284 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
285 void yy_delete_buffer ( YY_BUFFER_STATE b );
286 void yy_flush_buffer ( YY_BUFFER_STATE b );
287 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
288 void yypop_buffer_state ( void );
289
290 static void yyensure_buffer_stack ( void );
291 static void yy_load_buffer_state ( void );
292 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
293 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
294
295 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
296 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
297 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
298
299 void *yyalloc ( yy_size_t );
300 void *yyrealloc ( void *, yy_size_t );
301 void yyfree ( void * );
302
303 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
305 { \
306 if ( ! YY_CURRENT_BUFFER ){ \
307 yyensure_buffer_stack (); \
308 YY_CURRENT_BUFFER_LVALUE = \
309 yy_create_buffer( yyin, YY_BUF_SIZE ); \
310 } \
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312 }
313 #define yy_set_bol(at_bol) \
314 { \
315 if ( ! YY_CURRENT_BUFFER ){\
316 yyensure_buffer_stack (); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer( yyin, YY_BUF_SIZE ); \
319 } \
320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321 }
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
323
324 #define yywrap() (/*CONSTCOND*/1)
325 #define YY_SKIP_YYWRAP
326 typedef flex_uint8_t YY_CHAR;
327
328 FILE *yyin = NULL, *yyout = NULL;
329
330 typedef int yy_state_type;
331
332 extern int yylineno;
333 int yylineno = 1;
334
335 extern char *yytext;
336 #ifdef yytext_ptr
337 #undef yytext_ptr
338 #endif
339 #define yytext_ptr yytext
340
341 static yy_state_type yy_get_previous_state ( void );
342 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
343 static int yy_get_next_buffer ( void );
344 static void yynoreturn yy_fatal_error ( const char* msg );
345
346 /* Done after the current pattern has been matched and before the
347 * corresponding action - sets up yytext.
348 */
349 #define YY_DO_BEFORE_ACTION \
350 (yytext_ptr) = yy_bp; \
351 yyleng = (int) (yy_cp - yy_bp); \
352 (yy_hold_char) = *yy_cp; \
353 *yy_cp = '\0'; \
354 (yy_c_buf_p) = yy_cp;
355 #define YY_NUM_RULES 54
356 #define YY_END_OF_BUFFER 55
357 /* This struct is not used in this scanner,
358 but its presence is necessary. */
359 struct yy_trans_info
360 {
361 flex_int32_t yy_verify;
362 flex_int32_t yy_nxt;
363 };
364 static const flex_int16_t yy_accept[297] =
365 { 0,
366 0, 0, 55, 54, 51, 53, 54, 52, 54, 54,
367 48, 48, 31, 50, 50, 50, 50, 50, 50, 50,
368 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
369 50, 50, 50, 50, 51, 0, 50, 52, 0, 48,
370 48, 50, 0, 48, 49, 50, 50, 48, 50, 50,
371 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
372 50, 18, 50, 50, 50, 50, 50, 19, 50, 50,
373 50, 50, 50, 17, 50, 50, 50, 50, 50, 50,
374 50, 50, 50, 50, 49, 0, 48, 49, 0, 50,
375 49, 48, 50, 50, 36, 50, 50, 50, 50, 46,
376
377 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
378 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
379 50, 50, 50, 50, 50, 50, 35, 50, 50, 50,
380 50, 13, 50, 50, 50, 50, 49, 50, 50, 33,
381 50, 47, 50, 50, 50, 50, 50, 38, 37, 28,
382 50, 50, 50, 34, 14, 50, 50, 50, 50, 50,
383 32, 50, 50, 50, 50, 50, 50, 50, 50, 50,
384 50, 50, 50, 50, 50, 50, 47, 50, 50, 50,
385 50, 50, 50, 1, 20, 26, 50, 2, 50, 50,
386 50, 50, 50, 50, 50, 50, 50, 50, 50, 43,
387
388 50, 50, 3, 21, 39, 50, 50, 50, 50, 50,
389 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
390 40, 50, 50, 50, 50, 50, 50, 50, 50, 47,
391 50, 29, 50, 12, 50, 45, 50, 50, 47, 50,
392 47, 41, 42, 50, 50, 24, 5, 50, 50, 50,
393 50, 50, 50, 47, 27, 50, 50, 50, 50, 16,
394 50, 50, 25, 22, 23, 4, 47, 30, 6, 15,
395 44, 50, 50, 50, 50, 50, 50, 50, 50, 50,
396 50, 50, 50, 50, 50, 7, 50, 8, 50, 50,
397 50, 11, 10, 50, 9, 0
398
399 } ;
400
401 static const YY_CHAR yy_ec[256] =
402 { 0,
403 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
407 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
408 11, 11, 11, 11, 11, 12, 12, 1, 13, 1,
409 1, 1, 1, 1, 14, 15, 16, 17, 18, 19,
410 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
411 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
412 1, 1, 1, 1, 40, 1, 41, 42, 43, 44,
413
414 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
415 55, 56, 30, 57, 58, 59, 60, 61, 62, 63,
416 64, 65, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1
431 } ;
432
433 static const YY_CHAR yy_meta[66] =
434 { 0,
435 1, 1, 2, 1, 1, 1, 1, 3, 3, 3,
436 3, 3, 1, 3, 3, 3, 3, 3, 3, 3,
437 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
438 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
439 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
440 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
441 3, 3, 3, 3, 3
442 } ;
443
444 static const flex_int16_t yy_base[301] =
445 { 0,
446 0, 0, 906, 947, 902, 947, 896, 0, 891, 56,
447 60, 64, 947, 872, 68, 74, 70, 71, 75, 72,
448 87, 76, 81, 119, 108, 109, 135, 130, 102, 143,
449 122, 158, 133, 137, 875, 861, 947, 0, 852, 190,
450 200, 844, 176, 204, 214, 229, 251, 246, 156, 164,
451 182, 219, 233, 194, 234, 187, 148, 224, 264, 266,
452 267, 275, 274, 271, 324, 294, 221, 833, 210, 278,
453 292, 298, 312, 828, 295, 175, 303, 307, 334, 313,
454 349, 351, 345, 355, 372, 384, 392, 401, 404, 411,
455 415, 0, 390, 378, 314, 380, 409, 419, 420, 369,
456
457 421, 344, 422, 431, 432, 425, 433, 434, 435, 438,
458 436, 450, 441, 443, 447, 439, 449, 446, 473, 476,
459 478, 480, 487, 484, 494, 497, 819, 499, 491, 501,
460 504, 773, 503, 506, 507, 505, 512, 511, 518, 772,
461 520, 752, 522, 538, 532, 537, 540, 750, 691, 665,
462 541, 543, 558, 604, 590, 560, 561, 564, 547, 575,
463 528, 578, 569, 567, 571, 586, 584, 585, 591, 587,
464 589, 596, 602, 605, 600, 606, 612, 621, 616, 623,
465 617, 629, 636, 463, 461, 459, 627, 453, 642, 637,
466 646, 643, 656, 658, 651, 668, 661, 669, 666, 384,
467
468 684, 631, 376, 365, 359, 685, 663, 689, 687, 697,
469 664, 688, 692, 686, 714, 711, 712, 713, 715, 723,
470 347, 720, 738, 736, 727, 735, 746, 741, 742, 335,
471 739, 326, 748, 321, 743, 319, 763, 767, 315, 740,
472 310, 302, 293, 756, 768, 280, 276, 769, 783, 776,
473 779, 785, 799, 243, 242, 789, 800, 801, 803, 225,
474 802, 814, 220, 186, 184, 174, 150, 147, 809, 144,
475 98, 852, 817, 806, 827, 816, 826, 841, 823, 848,
476 829, 832, 830, 855, 864, 94, 877, 92, 874, 878,
477 866, 85, 82, 882, 78, 947, 937, 940, 943, 83
478
479 } ;
480
481 static const flex_int16_t yy_def[301] =
482 { 0,
483 296, 1, 296, 296, 296, 296, 297, 298, 299, 296,
484 300, 300, 296, 300, 300, 300, 300, 300, 300, 300,
485 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
486 300, 300, 300, 300, 296, 297, 296, 298, 299, 296,
487 296, 300, 296, 300, 300, 300, 300, 300, 300, 300,
488 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
489 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
490 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
491 300, 300, 300, 300, 296, 296, 296, 296, 296, 300,
492 300, 47, 300, 300, 300, 300, 300, 300, 300, 300,
493
494 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
495 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
496 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
497 300, 300, 300, 300, 300, 300, 296, 300, 300, 300,
498 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
499 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
500 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
501 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
502 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
503 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
504
505 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
506 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
507 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
508 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
509 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
510 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
511 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
512 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
513 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
514 300, 300, 300, 300, 300, 0, 296, 296, 296, 296
515
516 } ;
517
518 static const flex_int16_t yy_nxt[1013] =
519 { 0,
520 4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
521 12, 12, 13, 14, 15, 16, 17, 18, 14, 19,
522 20, 21, 14, 22, 23, 24, 25, 26, 27, 14,
523 28, 29, 30, 14, 31, 32, 33, 34, 14, 14,
524 14, 15, 16, 17, 18, 14, 19, 20, 21, 14,
525 22, 23, 24, 25, 26, 27, 28, 29, 30, 14,
526 31, 32, 33, 34, 14, 40, 41, 41, 43, 44,
527 44, 45, 43, 48, 48, 48, 296, 46, 296, 296,
528 296, 46, 296, 296, 296, 42, 296, 54, 58, 296,
529 296, 63, 49, 296, 50, 296, 47, 56, 64, 51,
530
531 296, 52, 296, 60, 46, 59, 296, 57, 46, 55,
532 296, 53, 61, 62, 54, 58, 296, 296, 63, 49,
533 65, 50, 47, 78, 56, 64, 51, 296, 52, 60,
534 296, 59, 66, 57, 79, 70, 67, 53, 296, 61,
535 62, 296, 71, 296, 68, 296, 69, 75, 72, 76,
536 78, 296, 296, 81, 84, 296, 296, 77, 296, 66,
537 79, 83, 70, 67, 296, 73, 296, 74, 71, 93,
538 80, 68, 296, 69, 75, 72, 76, 94, 82, 81,
539 101, 84, 296, 296, 77, 88, 88, 88, 83, 127,
540 296, 73, 296, 74, 296, 296, 93, 80, 43, 85,
541
542 85, 85, 296, 100, 94, 82, 101, 86, 43, 87,
543 87, 87, 43, 44, 44, 45, 127, 86, 296, 95,
544 98, 46, 43, 45, 45, 45, 119, 296, 296, 296,
545 100, 46, 296, 296, 86, 89, 90, 296, 91, 91,
546 91, 296, 296, 96, 86, 95, 97, 98, 46, 102,
547 296, 296, 118, 119, 43, 48, 48, 48, 46, 296,
548 92, 92, 92, 46, 92, 92, 92, 92, 92, 92,
549 96, 99, 296, 97, 296, 296, 102, 103, 118, 296,
550 107, 104, 296, 296, 296, 105, 296, 106, 296, 110,
551 46, 92, 92, 92, 92, 92, 92, 99, 108, 109,
552
553 296, 296, 296, 296, 103, 111, 296, 107, 104, 120,
554 296, 296, 105, 117, 106, 296, 110, 122, 296, 126,
555 296, 296, 296, 296, 121, 108, 109, 296, 123, 296,
556 124, 111, 296, 125, 296, 120, 128, 140, 112, 113,
557 117, 132, 296, 296, 122, 129, 126, 130, 114, 115,
558 121, 131, 296, 296, 123, 296, 124, 296, 135, 296,
559 125, 116, 128, 296, 140, 112, 113, 296, 132, 147,
560 133, 129, 134, 296, 130, 114, 115, 296, 131, 136,
561 43, 85, 85, 85, 296, 135, 296, 116, 296, 86,
562 89, 89, 296, 137, 137, 137, 147, 133, 296, 134,
563
564 43, 87, 87, 87, 139, 138, 136, 141, 145, 86,
565 88, 88, 88, 137, 137, 137, 86, 296, 86, 296,
566 91, 91, 91, 296, 91, 91, 91, 296, 296, 296,
567 296, 139, 138, 296, 141, 142, 86, 144, 146, 296,
568 296, 296, 296, 296, 296, 86, 296, 296, 150, 296,
569 143, 296, 152, 156, 296, 296, 84, 296, 296, 148,
570 66, 296, 142, 151, 144, 146, 159, 296, 149, 296,
571 155, 296, 154, 153, 157, 150, 143, 160, 53, 152,
572 156, 296, 158, 84, 296, 148, 296, 66, 296, 151,
573 161, 162, 296, 159, 149, 296, 155, 164, 154, 296,
574
575 165, 157, 296, 160, 53, 296, 163, 296, 170, 296,
576 168, 296, 296, 296, 296, 296, 166, 161, 162, 296,
577 167, 137, 137, 137, 164, 169, 296, 165, 296, 176,
578 296, 171, 172, 163, 177, 170, 296, 168, 174, 175,
579 296, 173, 166, 180, 178, 296, 296, 167, 296, 296,
580 179, 296, 169, 184, 182, 296, 176, 171, 185, 172,
581 186, 177, 181, 183, 174, 175, 296, 173, 296, 296,
582 180, 178, 296, 191, 189, 296, 179, 296, 190, 296,
583 184, 182, 187, 296, 188, 185, 296, 186, 192, 181,
584 183, 193, 296, 296, 296, 296, 196, 296, 296, 296,
585
586 191, 189, 194, 197, 296, 190, 195, 200, 296, 187,
587 296, 188, 296, 296, 296, 192, 198, 199, 193, 204,
588 296, 202, 205, 196, 296, 296, 201, 203, 194, 296,
589 197, 296, 206, 207, 200, 296, 208, 296, 209, 296,
590 210, 212, 198, 199, 296, 296, 204, 202, 215, 205,
591 296, 296, 214, 203, 296, 211, 213, 216, 206, 296,
592 207, 217, 219, 208, 296, 209, 296, 210, 212, 296,
593 228, 296, 296, 296, 296, 215, 296, 296, 218, 214,
594 220, 211, 222, 213, 216, 223, 225, 226, 217, 219,
595 221, 224, 296, 296, 296, 296, 296, 296, 230, 296,
596
597 296, 234, 229, 237, 218, 296, 236, 220, 222, 227,
598 231, 232, 223, 225, 226, 235, 221, 224, 233, 296,
599 296, 296, 296, 296, 230, 240, 241, 234, 296, 229,
600 237, 296, 242, 236, 239, 296, 227, 231, 232, 238,
601 243, 244, 235, 296, 296, 233, 296, 296, 296, 296,
602 296, 296, 240, 241, 296, 257, 296, 247, 296, 242,
603 296, 239, 246, 250, 296, 252, 238, 243, 244, 248,
604 245, 296, 251, 249, 253, 296, 296, 296, 254, 255,
605 296, 296, 257, 247, 296, 259, 260, 296, 256, 246,
606 250, 296, 252, 296, 258, 248, 245, 296, 251, 261,
607
608 249, 253, 264, 262, 254, 263, 255, 296, 296, 296,
609 296, 296, 259, 260, 296, 256, 265, 296, 268, 270,
610 258, 266, 296, 267, 296, 296, 261, 296, 271, 264,
611 262, 296, 263, 269, 296, 296, 296, 296, 296, 279,
612 296, 296, 281, 265, 278, 268, 270, 266, 272, 296,
613 267, 280, 296, 284, 288, 271, 296, 37, 282, 269,
614 296, 286, 287, 296, 37, 279, 273, 274, 283, 281,
615 275, 278, 296, 276, 296, 285, 35, 290, 280, 284,
616 296, 288, 296, 277, 282, 296, 296, 286, 287, 289,
617 296, 292, 294, 273, 274, 283, 37, 275, 291, 37,
618
619 276, 295, 285, 35, 290, 296, 296, 296, 296, 277,
620 293, 296, 296, 296, 296, 289, 296, 296, 292, 294,
621 296, 296, 296, 296, 296, 291, 296, 296, 295, 296,
622 296, 296, 296, 296, 296, 296, 293, 36, 36, 36,
623 38, 296, 38, 39, 39, 39, 3, 296, 296, 296,
624 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
625 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
626 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
627 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
628 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
629
630 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
631 296, 296
632 } ;
633
634 static const flex_int16_t yy_chk[1013] =
635 { 0,
636 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
639 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
640 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
641 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642 1, 1, 1, 1, 1, 10, 10, 10, 11, 11,
643 11, 11, 12, 12, 12, 12, 15, 11, 17, 18,
644 20, 12, 16, 19, 22, 300, 295, 17, 19, 23,
645 293, 22, 15, 292, 16, 21, 11, 18, 23, 16,
646
647 288, 16, 286, 20, 11, 19, 271, 18, 12, 17,
648 29, 16, 21, 21, 17, 19, 25, 26, 22, 15,
649 23, 16, 11, 29, 18, 23, 16, 24, 16, 20,
650 31, 19, 24, 18, 29, 25, 24, 16, 28, 21,
651 21, 33, 26, 27, 24, 34, 24, 28, 27, 28,
652 29, 30, 270, 31, 34, 268, 57, 28, 267, 24,
653 29, 33, 25, 24, 49, 27, 32, 27, 26, 49,
654 30, 24, 50, 24, 28, 27, 28, 50, 32, 31,
655 57, 34, 266, 76, 28, 43, 43, 43, 33, 76,
656 51, 27, 265, 27, 264, 56, 49, 30, 40, 40,
657
658 40, 40, 54, 56, 50, 32, 57, 40, 41, 41,
659 41, 41, 44, 44, 44, 44, 76, 41, 69, 51,
660 54, 44, 45, 45, 45, 45, 69, 52, 263, 67,
661 56, 45, 58, 260, 40, 46, 46, 46, 46, 46,
662 46, 53, 55, 52, 41, 51, 53, 54, 44, 58,
663 255, 254, 67, 69, 48, 48, 48, 48, 45, 47,
664 47, 47, 47, 48, 47, 47, 47, 47, 47, 47,
665 52, 55, 59, 53, 60, 61, 58, 59, 67, 64,
666 61, 59, 63, 62, 247, 59, 70, 60, 246, 64,
667 48, 47, 47, 47, 47, 47, 47, 55, 62, 63,
668
669 71, 243, 66, 75, 59, 64, 72, 61, 59, 70,
670 242, 77, 59, 66, 60, 78, 64, 72, 241, 75,
671 73, 80, 95, 239, 71, 62, 63, 236, 72, 234,
672 72, 64, 65, 73, 232, 70, 77, 95, 65, 65,
673 66, 80, 79, 230, 72, 78, 75, 79, 65, 65,
674 71, 79, 102, 83, 72, 221, 72, 81, 83, 82,
675 73, 65, 77, 84, 95, 65, 65, 205, 80, 102,
676 81, 78, 82, 204, 79, 65, 65, 100, 79, 84,
677 85, 85, 85, 85, 203, 83, 94, 65, 96, 85,
678 86, 86, 200, 86, 86, 86, 102, 81, 93, 82,
679
680 87, 87, 87, 87, 94, 93, 84, 96, 100, 87,
681 88, 88, 88, 89, 89, 89, 85, 97, 88, 90,
682 90, 90, 90, 91, 91, 91, 91, 98, 99, 101,
683 103, 94, 93, 106, 96, 97, 87, 99, 101, 104,
684 105, 107, 108, 109, 111, 88, 110, 116, 105, 113,
685 98, 114, 107, 111, 118, 115, 116, 117, 112, 103,
686 115, 188, 97, 106, 99, 101, 117, 186, 104, 185,
687 110, 184, 109, 108, 112, 105, 98, 118, 113, 107,
688 111, 119, 114, 116, 120, 103, 121, 115, 122, 106,
689 119, 120, 124, 117, 104, 123, 110, 122, 109, 129,
690
691 123, 112, 125, 118, 113, 126, 121, 128, 129, 130,
692 126, 133, 131, 136, 134, 135, 124, 119, 120, 138,
693 125, 137, 137, 137, 122, 128, 139, 123, 141, 136,
694 143, 130, 131, 121, 138, 129, 161, 126, 134, 135,
695 145, 133, 124, 143, 139, 146, 144, 125, 147, 151,
696 141, 152, 128, 147, 145, 159, 136, 130, 151, 131,
697 152, 138, 144, 146, 134, 135, 153, 133, 156, 157,
698 143, 139, 158, 159, 157, 164, 141, 163, 158, 165,
699 147, 145, 153, 160, 156, 151, 162, 152, 160, 144,
700 146, 162, 167, 168, 166, 170, 165, 171, 155, 169,
701
702 159, 157, 163, 166, 172, 158, 164, 169, 175, 153,
703 173, 156, 154, 174, 176, 160, 167, 168, 162, 173,
704 177, 171, 174, 165, 179, 181, 170, 172, 163, 178,
705 166, 180, 175, 176, 169, 187, 177, 182, 178, 202,
706 179, 181, 167, 168, 183, 190, 173, 171, 187, 174,
707 189, 192, 183, 172, 191, 180, 182, 189, 175, 195,
708 176, 190, 192, 177, 193, 178, 194, 179, 181, 197,
709 202, 207, 211, 150, 199, 187, 196, 198, 191, 183,
710 193, 180, 195, 182, 189, 196, 198, 199, 190, 192,
711 194, 197, 201, 206, 214, 209, 212, 208, 207, 149,
712
713 213, 211, 206, 214, 191, 210, 213, 193, 195, 201,
714 208, 209, 196, 198, 199, 212, 194, 197, 210, 216,
715 217, 218, 215, 219, 207, 217, 218, 211, 222, 206,
716 214, 220, 219, 213, 216, 225, 201, 208, 209, 215,
717 220, 222, 212, 226, 224, 210, 223, 231, 240, 228,
718 229, 235, 217, 218, 227, 240, 233, 225, 148, 219,
719 142, 216, 224, 228, 244, 231, 215, 220, 222, 226,
720 223, 237, 229, 227, 233, 238, 245, 248, 235, 237,
721 140, 132, 240, 225, 250, 245, 248, 251, 238, 224,
722 228, 249, 231, 252, 244, 226, 223, 256, 229, 249,
723
724 227, 233, 252, 250, 235, 251, 237, 253, 257, 258,
725 261, 259, 245, 248, 274, 238, 253, 269, 258, 261,
726 244, 256, 262, 257, 276, 273, 249, 127, 262, 252,
727 250, 279, 251, 259, 277, 275, 74, 281, 283, 274,
728 282, 68, 276, 253, 273, 258, 261, 256, 269, 278,
729 257, 275, 42, 279, 283, 262, 280, 39, 277, 259,
730 272, 281, 282, 284, 36, 274, 272, 272, 278, 276,
731 272, 273, 285, 272, 291, 280, 35, 285, 275, 279,
732 14, 283, 289, 272, 277, 287, 290, 281, 282, 284,
733 294, 289, 291, 272, 272, 278, 9, 272, 287, 7,
734
735 272, 294, 280, 5, 285, 3, 0, 0, 0, 272,
736 290, 0, 0, 0, 0, 284, 0, 0, 289, 291,
737 0, 0, 0, 0, 0, 287, 0, 0, 294, 0,
738 0, 0, 0, 0, 0, 0, 290, 297, 297, 297,
739 298, 0, 298, 299, 299, 299, 296, 296, 296, 296,
740 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
741 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
742 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
743 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
744 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
745
746 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
747 296, 296
748 } ;
749
750 static yy_state_type yy_last_accepting_state;
751 static char *yy_last_accepting_cpos;
752
753 extern int yy_flex_debug;
754 int yy_flex_debug = 0;
755
756 /* The intent behind this definition is that it'll catch
757 * any uses of REJECT which flex missed.
758 */
759 #define REJECT reject_used_but_not_detected
760 #define yymore() yymore_used_but_not_detected
761 #define YY_MORE_ADJ 0
762 #define YY_RESTORE_YY_MORE_OFFSET
763 char *yytext;
764 #line 1 "testpatternl.l"
765 /*
766 *
767 * Test pattern generator for Gimp-Print
768 *
769 * Copyright 2001 Robert Krawitz <[email protected]>
770 *
771 * This program is free software; you can redistribute it and/or modify it
772 * under the terms of the GNU General Public License as published by the Free
773 * Software Foundation; either version 2 of the License, or (at your option)
774 * any later version.
775 *
776 * This program is distributed in the hope that it will be useful, but
777 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
778 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
779 * for more details.
780 *
781 * You should have received a copy of the GNU General Public License
782 * along with this program. If not, see <https://www.gnu.org/licenses/>.
783 */
784 #line 22 "testpatternl.l"
785
786 #ifdef HAVE_CONFIG_H
787 #include <config.h>
788 #endif
789
790 #include <string.h>
791 #include <stdio.h>
792 #include <stdlib.h>
793 #include "testpattern.h"
794
795 #pragma GCC diagnostic ignored "-Wredundant-decls"
796 #pragma GCC diagnostic ignored "-Wunused-function"
797
798 #define YY_NO_UNPUT
799
800 int mylineno = 1;
801
802 extern YYSTYPE yylval;
803
804 static char *
805 c_strstrip(char *s)
806 {
807 size_t len = strlen(s);
808 if (len >= 2 && ((s[0] == '"' && s[len - 1] == '"') ||
809 (s[0] == '\'' && s[len - 1] == '\'')))
810 {
811 char *sn = malloc(len - 1);
812 memcpy(sn, s + 1, len - 2);
813 sn[len - 2] = '\0';
814 return sn;
815 }
816 else
817 return stp_strdup(s);
818 }
819
820 #define DBG(x) \
821 do \
822 { \
823 if (getenv("STP_TESTPATTERN_DEBUG")) \
824 fprintf(stderr, "'%s' => %s\n", yytext, #x); \
825 } \
826 while (0)
827
828
829 #line 829 "testpatternl.c"
830 #line 830 "testpatternl.c"
831
832 #define INITIAL 0
833
834 #ifndef YY_NO_UNISTD_H
835 /* Special case for "unistd.h", since it is non-ANSI. We include it way
836 * down here because we want the user's section 1 to have been scanned first.
837 * The user has a chance to override it with an option.
838 */
839 #include <unistd.h>
840 #endif
841
842 #ifndef YY_EXTRA_TYPE
843 #define YY_EXTRA_TYPE void *
844 #endif
845
846 static int yy_init_globals ( void );
847
848 /* Accessor methods to globals.
849 These are made visible to non-reentrant scanners for convenience. */
850
851 int yylex_destroy ( void );
852
853 int yyget_debug ( void );
854
855 void yyset_debug ( int debug_flag );
856
857 YY_EXTRA_TYPE yyget_extra ( void );
858
859 void yyset_extra ( YY_EXTRA_TYPE user_defined );
860
861 FILE *yyget_in ( void );
862
863 void yyset_in ( FILE * _in_str );
864
865 FILE *yyget_out ( void );
866
867 void yyset_out ( FILE * _out_str );
868
869 int yyget_leng ( void );
870
871 char *yyget_text ( void );
872
873 int yyget_lineno ( void );
874
875 void yyset_lineno ( int _line_number );
876
877 /* Macros after this point can all be overridden by user definitions in
878 * section 1.
879 */
880
881 #ifndef YY_SKIP_YYWRAP
882 #ifdef __cplusplus
883 extern "C" int yywrap ( void );
884 #else
885 extern int yywrap ( void );
886 #endif
887 #endif
888
889 #ifndef YY_NO_UNPUT
890
891 static void yyunput ( int c, char *buf_ptr );
892
893 #endif
894
895 #ifndef yytext_ptr
896 static void yy_flex_strncpy ( char *, const char *, int );
897 #endif
898
899 #ifdef YY_NEED_STRLEN
900 static int yy_flex_strlen ( const char * );
901 #endif
902
903 #ifndef YY_NO_INPUT
904 #ifdef __cplusplus
905 static int yyinput ( void );
906 #else
907 static int input ( void );
908 #endif
909
910 #endif
911
912 /* Amount of stuff to slurp up with each read. */
913 #ifndef YY_READ_BUF_SIZE
914 #ifdef __ia64__
915 /* On IA-64, the buffer size is 16k, not 8k */
916 #define YY_READ_BUF_SIZE 16384
917 #else
918 #define YY_READ_BUF_SIZE 8192
919 #endif /* __ia64__ */
920 #endif
921
922 /* Copy whatever the last rule matched to the standard output. */
923 #ifndef ECHO
924 /* This used to be an fputs(), but since the string might contain NUL's,
925 * we now use fwrite().
926 */
927 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
928 #endif
929
930 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
931 * is returned in "result".
932 */
933 #ifndef YY_INPUT
934 #define YY_INPUT(buf,result,max_size) \
935 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
936 { \
937 int c = '*'; \
938 int n; \
939 for ( n = 0; n < max_size && \
940 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
941 buf[n] = (char) c; \
942 if ( c == '\n' ) \
943 buf[n++] = (char) c; \
944 if ( c == EOF && ferror( yyin ) ) \
945 YY_FATAL_ERROR( "input in flex scanner failed" ); \
946 result = n; \
947 } \
948 else \
949 { \
950 errno=0; \
951 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
952 { \
953 if( errno != EINTR) \
954 { \
955 YY_FATAL_ERROR( "input in flex scanner failed" ); \
956 break; \
957 } \
958 errno=0; \
959 clearerr(yyin); \
960 } \
961 }\
962 \
963
964 #endif
965
966 /* No semi-colon after return; correct usage is to write "yyterminate();" -
967 * we don't want an extra ';' after the "return" because that will cause
968 * some compilers to complain about unreachable statements.
969 */
970 #ifndef yyterminate
971 #define yyterminate() return YY_NULL
972 #endif
973
974 /* Number of entries by which start-condition stack grows. */
975 #ifndef YY_START_STACK_INCR
976 #define YY_START_STACK_INCR 25
977 #endif
978
979 /* Report a fatal error. */
980 #ifndef YY_FATAL_ERROR
981 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
982 #endif
983
984 /* end tables serialization structures and prototypes */
985
986 /* Default declaration of generated scanner - a define so the user can
987 * easily add parameters.
988 */
989 #ifndef YY_DECL
990 #define YY_DECL_IS_OURS 1
991
992 extern int yylex (void);
993
994 #define YY_DECL int yylex (void)
995 #endif /* !YY_DECL */
996
997 /* Code executed at the beginning of each rule, after yytext and yyleng
998 * have been set up.
999 */
1000 #ifndef YY_USER_ACTION
1001 #define YY_USER_ACTION
1002 #endif
1003
1004 /* Code executed at the end of each rule. */
1005 #ifndef YY_BREAK
1006 #define YY_BREAK /*LINTED*/break;
1007 #endif
1008
1009 #define YY_RULE_SETUP \
1010 YY_USER_ACTION
1011
1012 /** The main scanner function which does all the work.
1013 */
1014 YY_DECL
1015 {
1016 yy_state_type yy_current_state;
1017 char *yy_cp, *yy_bp;
1018 int yy_act;
1019
1020 if ( !(yy_init) )
1021 {
1022 (yy_init) = 1;
1023
1024 #ifdef YY_USER_INIT
1025 YY_USER_INIT;
1026 #endif
1027
1028 if ( ! (yy_start) )
1029 (yy_start) = 1; /* first start state */
1030
1031 if ( ! yyin )
1032 yyin = stdin;
1033
1034 if ( ! yyout )
1035 yyout = stdout;
1036
1037 if ( ! YY_CURRENT_BUFFER ) {
1038 yyensure_buffer_stack ();
1039 YY_CURRENT_BUFFER_LVALUE =
1040 yy_create_buffer( yyin, YY_BUF_SIZE );
1041 }
1042
1043 yy_load_buffer_state( );
1044 }
1045
1046 {
1047 #line 80 "testpatternl.l"
1048
1049
1050 #line 1050 "testpatternl.c"
1051
1052 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1053 {
1054 yy_cp = (yy_c_buf_p);
1055
1056 /* Support of yytext. */
1057 *yy_cp = (yy_hold_char);
1058
1059 /* yy_bp points to the position in yy_ch_buf of the start of
1060 * the current run.
1061 */
1062 yy_bp = yy_cp;
1063
1064 yy_current_state = (yy_start);
1065 yy_match:
1066 do
1067 {
1068 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1069 if ( yy_accept[yy_current_state] )
1070 {
1071 (yy_last_accepting_state) = yy_current_state;
1072 (yy_last_accepting_cpos) = yy_cp;
1073 }
1074 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1075 {
1076 yy_current_state = (int) yy_def[yy_current_state];
1077 if ( yy_current_state >= 297 )
1078 yy_c = yy_meta[yy_c];
1079 }
1080 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1081 ++yy_cp;
1082 }
1083 while ( yy_base[yy_current_state] != 947 );
1084
1085 yy_find_action:
1086 yy_act = yy_accept[yy_current_state];
1087 if ( yy_act == 0 )
1088 { /* have to back up */
1089 yy_cp = (yy_last_accepting_cpos);
1090 yy_current_state = (yy_last_accepting_state);
1091 yy_act = yy_accept[yy_current_state];
1092 }
1093
1094 YY_DO_BEFORE_ACTION;
1095
1096 do_action: /* This label is used only to access EOF actions. */
1097
1098 switch ( yy_act )
1099 { /* beginning of action switch */
1100 case 0: /* must back up */
1101 /* undo the effects of YY_DO_BEFORE_ACTION */
1102 *yy_cp = (yy_hold_char);
1103 yy_cp = (yy_last_accepting_cpos);
1104 yy_current_state = (yy_last_accepting_state);
1105 goto yy_find_action;
1106
1107 case 1:
1108 YY_RULE_SETUP
1109 #line 82 "testpatternl.l"
1110 DBG(GAMMA); return GAMMA;
1111 YY_BREAK
1112 case 2:
1113 YY_RULE_SETUP
1114 #line 83 "testpatternl.l"
1115 DBG(LEVEL); return LEVEL;
1116 YY_BREAK
1117 case 3:
1118 YY_RULE_SETUP
1119 #line 84 "testpatternl.l"
1120 DBG(STEPS); return STEPS;
1121 YY_BREAK
1122 case 4:
1123 YY_RULE_SETUP
1124 #line 85 "testpatternl.l"
1125 DBG(INK_LIMIT); return INK_LIMIT;
1126 YY_BREAK
1127 case 5:
1128 YY_RULE_SETUP
1129 #line 86 "testpatternl.l"
1130 DBG(PRINTER); return PRINTER;
1131 YY_BREAK
1132 case 6:
1133 YY_RULE_SETUP
1134 #line 87 "testpatternl.l"
1135 DBG(PARAMETER); return PARAMETER;
1136 YY_BREAK
1137 case 7:
1138 YY_RULE_SETUP
1139 #line 88 "testpatternl.l"
1140 DBG(PARAMETER_INT); return PARAMETER_INT;
1141 YY_BREAK
1142 case 8:
1143 YY_RULE_SETUP
1144 #line 89 "testpatternl.l"
1145 DBG(PARAMETER_BOOL); return PARAMETER_BOOL;
1146 YY_BREAK
1147 case 9:
1148 YY_RULE_SETUP
1149 #line 90 "testpatternl.l"
1150 DBG(PARAMETER); return PARAMETER;
1151 YY_BREAK
1152 case 10:
1153 YY_RULE_SETUP
1154 #line 91 "testpatternl.l"
1155 DBG(PARAMETER_FLOAT); return PARAMETER_FLOAT;
1156 YY_BREAK
1157 case 11:
1158 YY_RULE_SETUP
1159 #line 92 "testpatternl.l"
1160 DBG(PARAMETER_CURVE); return PARAMETER_CURVE;
1161 YY_BREAK
1162 case 12:
1163 YY_RULE_SETUP
1164 #line 93 "testpatternl.l"
1165 DBG(DENSITY); return DENSITY;
1166 YY_BREAK
1167 case 13:
1168 YY_RULE_SETUP
1169 #line 94 "testpatternl.l"
1170 DBG(TOP); return TOP;
1171 YY_BREAK
1172 case 14:
1173 YY_RULE_SETUP
1174 #line 95 "testpatternl.l"
1175 DBG(LEFT); return LEFT;
1176 YY_BREAK
1177 case 15:
1178 YY_RULE_SETUP
1179 #line 96 "testpatternl.l"
1180 DBG(SIZE_MODE); return SIZE_MODE;
1181 YY_BREAK
1182 case 16:
1183 YY_RULE_SETUP
1184 #line 97 "testpatternl.l"
1185 DBG(RELATIVE); return RELATIVE;
1186 YY_BREAK
1187 case 17:
1188 YY_RULE_SETUP
1189 #line 98 "testpatternl.l"
1190 DBG(PT); return PT;
1191 YY_BREAK
1192 case 18:
1193 YY_RULE_SETUP
1194 #line 99 "testpatternl.l"
1195 DBG(IN); return IN;
1196 YY_BREAK
1197 case 19:
1198 YY_RULE_SETUP
1199 #line 100 "testpatternl.l"
1200 DBG(MM); return MM;
1201 YY_BREAK
1202 case 20:
1203 YY_RULE_SETUP
1204 #line 101 "testpatternl.l"
1205 DBG(HSIZE); return HSIZE;
1206 YY_BREAK
1207 case 21:
1208 YY_RULE_SETUP
1209 #line 102 "testpatternl.l"
1210 DBG(VSIZE); return VSIZE;
1211 YY_BREAK
1212 case 22:
1213 YY_RULE_SETUP
1214 #line 103 "testpatternl.l"
1215 DBG(BLACKLINE); return BLACKLINE;
1216 YY_BREAK
1217 case 23:
1218 YY_RULE_SETUP
1219 #line 104 "testpatternl.l"
1220 DBG(COLORLINE); return COLORLINE;
1221 YY_BREAK
1222 case 24:
1223 YY_RULE_SETUP
1224 #line 105 "testpatternl.l"
1225 DBG(PATTERN); return PATTERN;
1226 YY_BREAK
1227 case 25:
1228 YY_RULE_SETUP
1229 #line 106 "testpatternl.l"
1230 DBG(XPATTERN); return XPATTERN;
1231 YY_BREAK
1232 case 26:
1233 YY_RULE_SETUP
1234 #line 107 "testpatternl.l"
1235 DBG(IMAGE); return IMAGE;
1236 YY_BREAK
1237 case 27:
1238 YY_RULE_SETUP
1239 #line 108 "testpatternl.l"
1240 DBG(EXTENDED); return EXTENDED;
1241 YY_BREAK
1242 case 28:
1243 YY_RULE_SETUP
1244 #line 109 "testpatternl.l"
1245 DBG(GRID); return GRID;
1246 YY_BREAK
1247 case 29:
1248 YY_RULE_SETUP
1249 #line 110 "testpatternl.l"
1250 DBG(CHANNEL); return CHANNEL;
1251 YY_BREAK
1252 case 30:
1253 YY_RULE_SETUP
1254 #line 111 "testpatternl.l"
1255 DBG(PAGESIZE); return PAGESIZE;
1256 YY_BREAK
1257 case 31:
1258 YY_RULE_SETUP
1259 #line 112 "testpatternl.l"
1260 DBG(SEMI); return SEMI;
1261 YY_BREAK
1262 case 32:
1263 YY_RULE_SETUP
1264 #line 113 "testpatternl.l"
1265 DBG(MODE); return MODE;
1266 YY_BREAK
1267 case 33:
1268 YY_RULE_SETUP
1269 #line 114 "testpatternl.l"
1270 yylval.ival = CMYK;DBG(CMYK); return CMYK;
1271 YY_BREAK
1272 case 34:
1273 YY_RULE_SETUP
1274 #line 115 "testpatternl.l"
1275 yylval.ival = CMYK;DBG(KCMY); return KCMY;
1276 YY_BREAK
1277 case 35:
1278 YY_RULE_SETUP
1279 #line 116 "testpatternl.l"
1280 yylval.ival = RGB;DBG(RGB); return RGB;
1281 YY_BREAK
1282 case 36:
1283 YY_RULE_SETUP
1284 #line 117 "testpatternl.l"
1285 yylval.ival = RGB;DBG(CMY); return CMY;
1286 YY_BREAK
1287 case 37:
1288 YY_RULE_SETUP
1289 #line 118 "testpatternl.l"
1290 yylval.ival = GRAY;DBG(GRAY); return GRAY;
1291 YY_BREAK
1292 case 38:
1293 YY_RULE_SETUP
1294 #line 119 "testpatternl.l"
1295 yylval.ival = GRAY;DBG(GRAY); return GRAY;
1296 YY_BREAK
1297 case 39:
1298 YY_RULE_SETUP
1299 #line 120 "testpatternl.l"
1300 yylval.ival = WHITE;DBG(WHITE); return WHITE;
1301 YY_BREAK
1302 case 40:
1303 YY_RULE_SETUP
1304 #line 121 "testpatternl.l"
1305 DBG(OUTPUT); return OUTPUT;
1306 YY_BREAK
1307 case 41:
1308 YY_RULE_SETUP
1309 #line 122 "testpatternl.l"
1310 DBG(MESSAGE); return MESSAGE;
1311 YY_BREAK
1312 case 42:
1313 YY_RULE_SETUP
1314 #line 123 "testpatternl.l"
1315 DBG(NOSCALE); return NOSCALE;
1316 YY_BREAK
1317 case 43:
1318 YY_RULE_SETUP
1319 #line 124 "testpatternl.l"
1320 DBG(ROUND); return ROUND;
1321 YY_BREAK
1322 case 44:
1323 YY_RULE_SETUP
1324 #line 125 "testpatternl.l"
1325 DBG(START_JOB); return START_JOB;
1326 YY_BREAK
1327 case 45:
1328 YY_RULE_SETUP
1329 #line 126 "testpatternl.l"
1330 DBG(END_JOB); return END_JOB;
1331 YY_BREAK
1332 case 46:
1333 YY_RULE_SETUP
1334 #line 127 "testpatternl.l"
1335 DBG(END); return END;
1336 YY_BREAK
1337 case 47:
1338 YY_RULE_SETUP
1339 #line 129 "testpatternl.l"
1340 yylval.sval = yytext;DBG(COLOR); return COLOR;
1341 YY_BREAK
1342 case 48:
1343 YY_RULE_SETUP
1344 #line 130 "testpatternl.l"
1345 yylval.ival = strtol(yytext, NULL, 0); yylval.dval = (double) yylval.ival; DBG(tINT); return tINT;
1346 YY_BREAK
1347 case 49:
1348 YY_RULE_SETUP
1349 #line 131 "testpatternl.l"
1350 yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
1351 YY_BREAK
1352 case 50:
1353 /* rule 50 can match eol */
1354 YY_RULE_SETUP
1355 #line 132 "testpatternl.l"
1356 yylval.sval = c_strstrip(yytext); DBG(tSTRING); return tSTRING;
1357 YY_BREAK
1358 case 51:
1359 YY_RULE_SETUP
1360 #line 133 "testpatternl.l"
1361 DBG(whitespace); /* Skip blanks/tabs */
1362 YY_BREAK
1363 case 52:
1364 YY_RULE_SETUP
1365 #line 134 "testpatternl.l"
1366 DBG(comment); /* Skip comments */
1367 YY_BREAK
1368 case 53:
1369 /* rule 53 can match eol */
1370 YY_RULE_SETUP
1371 #line 135 "testpatternl.l"
1372 DBG(newline); mylineno++;
1373 YY_BREAK
1374 case 54:
1375 YY_RULE_SETUP
1376 #line 136 "testpatternl.l"
1377 ECHO;
1378 YY_BREAK
1379 #line 1379 "testpatternl.c"
1380 case YY_STATE_EOF(INITIAL):
1381 yyterminate();
1382
1383 case YY_END_OF_BUFFER:
1384 {
1385 /* Amount of text matched not including the EOB char. */
1386 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1387
1388 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1389 *yy_cp = (yy_hold_char);
1390 YY_RESTORE_YY_MORE_OFFSET
1391
1392 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1393 {
1394 /* We're scanning a new file or input source. It's
1395 * possible that this happened because the user
1396 * just pointed yyin at a new source and called
1397 * yylex(). If so, then we have to assure
1398 * consistency between YY_CURRENT_BUFFER and our
1399 * globals. Here is the right place to do so, because
1400 * this is the first action (other than possibly a
1401 * back-up) that will match for the new input source.
1402 */
1403 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1404 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1405 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1406 }
1407
1408 /* Note that here we test for yy_c_buf_p "<=" to the position
1409 * of the first EOB in the buffer, since yy_c_buf_p will
1410 * already have been incremented past the NUL character
1411 * (since all states make transitions on EOB to the
1412 * end-of-buffer state). Contrast this with the test
1413 * in input().
1414 */
1415 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1416 { /* This was really a NUL. */
1417 yy_state_type yy_next_state;
1418
1419 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1420
1421 yy_current_state = yy_get_previous_state( );
1422
1423 /* Okay, we're now positioned to make the NUL
1424 * transition. We couldn't have
1425 * yy_get_previous_state() go ahead and do it
1426 * for us because it doesn't know how to deal
1427 * with the possibility of jamming (and we don't
1428 * want to build jamming into it because then it
1429 * will run more slowly).
1430 */
1431
1432 yy_next_state = yy_try_NUL_trans( yy_current_state );
1433
1434 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1435
1436 if ( yy_next_state )
1437 {
1438 /* Consume the NUL. */
1439 yy_cp = ++(yy_c_buf_p);
1440 yy_current_state = yy_next_state;
1441 goto yy_match;
1442 }
1443
1444 else
1445 {
1446 yy_cp = (yy_c_buf_p);
1447 goto yy_find_action;
1448 }
1449 }
1450
1451 else switch ( yy_get_next_buffer( ) )
1452 {
1453 case EOB_ACT_END_OF_FILE:
1454 {
1455 (yy_did_buffer_switch_on_eof) = 0;
1456
1457 if ( yywrap( ) )
1458 {
1459 /* Note: because we've taken care in
1460 * yy_get_next_buffer() to have set up
1461 * yytext, we can now set up
1462 * yy_c_buf_p so that if some total
1463 * hoser (like flex itself) wants to
1464 * call the scanner after we return the
1465 * YY_NULL, it'll still work - another
1466 * YY_NULL will get returned.
1467 */
1468 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1469
1470 yy_act = YY_STATE_EOF(YY_START);
1471 goto do_action;
1472 }
1473
1474 else
1475 {
1476 if ( ! (yy_did_buffer_switch_on_eof) )
1477 YY_NEW_FILE;
1478 }
1479 break;
1480 }
1481
1482 case EOB_ACT_CONTINUE_SCAN:
1483 (yy_c_buf_p) =
1484 (yytext_ptr) + yy_amount_of_matched_text;
1485
1486 yy_current_state = yy_get_previous_state( );
1487
1488 yy_cp = (yy_c_buf_p);
1489 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1490 goto yy_match;
1491
1492 case EOB_ACT_LAST_MATCH:
1493 (yy_c_buf_p) =
1494 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1495
1496 yy_current_state = yy_get_previous_state( );
1497
1498 yy_cp = (yy_c_buf_p);
1499 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1500 goto yy_find_action;
1501 }
1502 break;
1503 }
1504
1505 default:
1506 YY_FATAL_ERROR(
1507 "fatal flex scanner internal error--no action found" );
1508 } /* end of action switch */
1509 } /* end of scanning one token */
1510 } /* end of user's declarations */
1511 } /* end of yylex */
1512
1513 /* yy_get_next_buffer - try to read in a new buffer
1514 *
1515 * Returns a code representing an action:
1516 * EOB_ACT_LAST_MATCH -
1517 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1518 * EOB_ACT_END_OF_FILE - end of file
1519 */
1520 static int yy_get_next_buffer (void)
1521 {
1522 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1523 char *source = (yytext_ptr);
1524 int number_to_move, i;
1525 int ret_val;
1526
1527 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1528 YY_FATAL_ERROR(
1529 "fatal flex scanner internal error--end of buffer missed" );
1530
1531 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1532 { /* Don't try to fill the buffer, so this is an EOF. */
1533 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1534 {
1535 /* We matched a single character, the EOB, so
1536 * treat this as a final EOF.
1537 */
1538 return EOB_ACT_END_OF_FILE;
1539 }
1540
1541 else
1542 {
1543 /* We matched some text prior to the EOB, first
1544 * process it.
1545 */
1546 return EOB_ACT_LAST_MATCH;
1547 }
1548 }
1549
1550 /* Try to read more data. */
1551
1552 /* First move last chars to start of buffer. */
1553 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1554
1555 for ( i = 0; i < number_to_move; ++i )
1556 *(dest++) = *(source++);
1557
1558 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1559 /* don't do the read, it's not guaranteed to return an EOF,
1560 * just force an EOF
1561 */
1562 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1563
1564 else
1565 {
1566 int num_to_read =
1567 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1568
1569 while ( num_to_read <= 0 )
1570 { /* Not enough room in the buffer - grow it. */
1571
1572 /* just a shorter name for the current buffer */
1573 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1574
1575 int yy_c_buf_p_offset =
1576 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1577
1578 if ( b->yy_is_our_buffer )
1579 {
1580 int new_size = b->yy_buf_size * 2;
1581
1582 if ( new_size <= 0 )
1583 b->yy_buf_size += b->yy_buf_size / 8;
1584 else
1585 b->yy_buf_size *= 2;
1586
1587 b->yy_ch_buf = (char *)
1588 /* Include room in for 2 EOB chars. */
1589 yyrealloc( (void *) b->yy_ch_buf,
1590 (yy_size_t) (b->yy_buf_size + 2) );
1591 }
1592 else
1593 /* Can't grow it, we don't own it. */
1594 b->yy_ch_buf = NULL;
1595
1596 if ( ! b->yy_ch_buf )
1597 YY_FATAL_ERROR(
1598 "fatal error - scanner input buffer overflow" );
1599
1600 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1601
1602 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1603 number_to_move - 1;
1604
1605 }
1606
1607 if ( num_to_read > YY_READ_BUF_SIZE )
1608 num_to_read = YY_READ_BUF_SIZE;
1609
1610 /* Read in more data. */
1611 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1612 (yy_n_chars), num_to_read );
1613
1614 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1615 }
1616
1617 if ( (yy_n_chars) == 0 )
1618 {
1619 if ( number_to_move == YY_MORE_ADJ )
1620 {
1621 ret_val = EOB_ACT_END_OF_FILE;
1622 yyrestart( yyin );
1623 }
1624
1625 else
1626 {
1627 ret_val = EOB_ACT_LAST_MATCH;
1628 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1629 YY_BUFFER_EOF_PENDING;
1630 }
1631 }
1632
1633 else
1634 ret_val = EOB_ACT_CONTINUE_SCAN;
1635
1636 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1637 /* Extend the array by 50%, plus the number we really need. */
1638 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1639 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1640 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1641 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1642 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1643 /* "- 2" to take care of EOB's */
1644 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1645 }
1646
1647 (yy_n_chars) += number_to_move;
1648 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1649 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1650
1651 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1652
1653 return ret_val;
1654 }
1655
1656 /* yy_get_previous_state - get the state just before the EOB char was reached */
1657
1658 static yy_state_type yy_get_previous_state (void)
1659 {
1660 yy_state_type yy_current_state;
1661 char *yy_cp;
1662
1663 yy_current_state = (yy_start);
1664
1665 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1666 {
1667 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1668 if ( yy_accept[yy_current_state] )
1669 {
1670 (yy_last_accepting_state) = yy_current_state;
1671 (yy_last_accepting_cpos) = yy_cp;
1672 }
1673 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1674 {
1675 yy_current_state = (int) yy_def[yy_current_state];
1676 if ( yy_current_state >= 297 )
1677 yy_c = yy_meta[yy_c];
1678 }
1679 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1680 }
1681
1682 return yy_current_state;
1683 }
1684
1685 /* yy_try_NUL_trans - try to make a transition on the NUL character
1686 *
1687 * synopsis
1688 * next_state = yy_try_NUL_trans( current_state );
1689 */
1690 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1691 {
1692 int yy_is_jam;
1693 char *yy_cp = (yy_c_buf_p);
1694
1695 YY_CHAR yy_c = 1;
1696 if ( yy_accept[yy_current_state] )
1697 {
1698 (yy_last_accepting_state) = yy_current_state;
1699 (yy_last_accepting_cpos) = yy_cp;
1700 }
1701 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1702 {
1703 yy_current_state = (int) yy_def[yy_current_state];
1704 if ( yy_current_state >= 297 )
1705 yy_c = yy_meta[yy_c];
1706 }
1707 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1708 yy_is_jam = (yy_current_state == 296);
1709
1710 return yy_is_jam ? 0 : yy_current_state;
1711 }
1712
1713 #ifndef YY_NO_UNPUT
1714
1715 static void yyunput (int c, char * yy_bp )
1716 {
1717 char *yy_cp;
1718
1719 yy_cp = (yy_c_buf_p);
1720
1721 /* undo effects of setting up yytext */
1722 *yy_cp = (yy_hold_char);
1723
1724 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1725 { /* need to shift things up to make room */
1726 /* +2 for EOB chars. */
1727 int number_to_move = (yy_n_chars) + 2;
1728 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1729 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1730 char *source =
1731 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1732
1733 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1734 *--dest = *--source;
1735
1736 yy_cp += (int) (dest - source);
1737 yy_bp += (int) (dest - source);
1738 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1739 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1740
1741 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1742 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1743 }
1744
1745 *--yy_cp = (char) c;
1746
1747 (yytext_ptr) = yy_bp;
1748 (yy_hold_char) = *yy_cp;
1749 (yy_c_buf_p) = yy_cp;
1750 }
1751
1752 #endif
1753
1754 #ifndef YY_NO_INPUT
1755 #ifdef __cplusplus
1756 static int yyinput (void)
1757 #else
1758 static int input (void)
1759 #endif
1760
1761 {
1762 int c;
1763
1764 *(yy_c_buf_p) = (yy_hold_char);
1765
1766 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1767 {
1768 /* yy_c_buf_p now points to the character we want to return.
1769 * If this occurs *before* the EOB characters, then it's a
1770 * valid NUL; if not, then we've hit the end of the buffer.
1771 */
1772 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1773 /* This was really a NUL. */
1774 *(yy_c_buf_p) = '\0';
1775
1776 else
1777 { /* need more input */
1778 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1779 ++(yy_c_buf_p);
1780
1781 switch ( yy_get_next_buffer( ) )
1782 {
1783 case EOB_ACT_LAST_MATCH:
1784 /* This happens because yy_g_n_b()
1785 * sees that we've accumulated a
1786 * token and flags that we need to
1787 * try matching the token before
1788 * proceeding. But for input(),
1789 * there's no matching to consider.
1790 * So convert the EOB_ACT_LAST_MATCH
1791 * to EOB_ACT_END_OF_FILE.
1792 */
1793
1794 /* Reset buffer status. */
1795 yyrestart( yyin );
1796
1797 /*FALLTHROUGH*/
1798
1799 case EOB_ACT_END_OF_FILE:
1800 {
1801 if ( yywrap( ) )
1802 return 0;
1803
1804 if ( ! (yy_did_buffer_switch_on_eof) )
1805 YY_NEW_FILE;
1806 #ifdef __cplusplus
1807 return yyinput();
1808 #else
1809 return input();
1810 #endif
1811 }
1812
1813 case EOB_ACT_CONTINUE_SCAN:
1814 (yy_c_buf_p) = (yytext_ptr) + offset;
1815 break;
1816 }
1817 }
1818 }
1819
1820 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1821 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1822 (yy_hold_char) = *++(yy_c_buf_p);
1823
1824 return c;
1825 }
1826 #endif /* ifndef YY_NO_INPUT */
1827
1828 /** Immediately switch to a different input stream.
1829 * @param input_file A readable stream.
1830 *
1831 * @note This function does not reset the start condition to @c INITIAL .
1832 */
1833 void yyrestart (FILE * input_file )
1834 {
1835
1836 if ( ! YY_CURRENT_BUFFER ){
1837 yyensure_buffer_stack ();
1838 YY_CURRENT_BUFFER_LVALUE =
1839 yy_create_buffer( yyin, YY_BUF_SIZE );
1840 }
1841
1842 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1843 yy_load_buffer_state( );
1844 }
1845
1846 /** Switch to a different input buffer.
1847 * @param new_buffer The new input buffer.
1848 *
1849 */
1850 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1851 {
1852
1853 /* TODO. We should be able to replace this entire function body
1854 * with
1855 * yypop_buffer_state();
1856 * yypush_buffer_state(new_buffer);
1857 */
1858 yyensure_buffer_stack ();
1859 if ( YY_CURRENT_BUFFER == new_buffer )
1860 return;
1861
1862 if ( YY_CURRENT_BUFFER )
1863 {
1864 /* Flush out information for old buffer. */
1865 *(yy_c_buf_p) = (yy_hold_char);
1866 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1867 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1868 }
1869
1870 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1871 yy_load_buffer_state( );
1872
1873 /* We don't actually know whether we did this switch during
1874 * EOF (yywrap()) processing, but the only time this flag
1875 * is looked at is after yywrap() is called, so it's safe
1876 * to go ahead and always set it.
1877 */
1878 (yy_did_buffer_switch_on_eof) = 1;
1879 }
1880
1881 static void yy_load_buffer_state (void)
1882 {
1883 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1884 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1885 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1886 (yy_hold_char) = *(yy_c_buf_p);
1887 }
1888
1889 /** Allocate and initialize an input buffer state.
1890 * @param file A readable stream.
1891 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1892 *
1893 * @return the allocated buffer state.
1894 */
1895 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1896 {
1897 YY_BUFFER_STATE b;
1898
1899 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1900 if ( ! b )
1901 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1902
1903 b->yy_buf_size = size;
1904
1905 /* yy_ch_buf has to be 2 characters longer than the size given because
1906 * we need to put in 2 end-of-buffer characters.
1907 */
1908 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1909 if ( ! b->yy_ch_buf )
1910 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1911
1912 b->yy_is_our_buffer = 1;
1913
1914 yy_init_buffer( b, file );
1915
1916 return b;
1917 }
1918
1919 /** Destroy the buffer.
1920 * @param b a buffer created with yy_create_buffer()
1921 *
1922 */
1923 void yy_delete_buffer (YY_BUFFER_STATE b )
1924 {
1925
1926 if ( ! b )
1927 return;
1928
1929 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1930 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1931
1932 if ( b->yy_is_our_buffer )
1933 yyfree( (void *) b->yy_ch_buf );
1934
1935 yyfree( (void *) b );
1936 }
1937
1938 /* Initializes or reinitializes a buffer.
1939 * This function is sometimes called more than once on the same buffer,
1940 * such as during a yyrestart() or at EOF.
1941 */
1942 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1943
1944 {
1945 int oerrno = errno;
1946
1947 yy_flush_buffer( b );
1948
1949 b->yy_input_file = file;
1950 b->yy_fill_buffer = 1;
1951
1952 /* If b is the current buffer, then yy_init_buffer was _probably_
1953 * called from yyrestart() or through yy_get_next_buffer.
1954 * In that case, we don't want to reset the lineno or column.
1955 */
1956 if (b != YY_CURRENT_BUFFER){
1957 b->yy_bs_lineno = 1;
1958 b->yy_bs_column = 0;
1959 }
1960
1961 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1962
1963 errno = oerrno;
1964 }
1965
1966 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1967 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1968 *
1969 */
1970 void yy_flush_buffer (YY_BUFFER_STATE b )
1971 {
1972 if ( ! b )
1973 return;
1974
1975 b->yy_n_chars = 0;
1976
1977 /* We always need two end-of-buffer characters. The first causes
1978 * a transition to the end-of-buffer state. The second causes
1979 * a jam in that state.
1980 */
1981 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1982 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1983
1984 b->yy_buf_pos = &b->yy_ch_buf[0];
1985
1986 b->yy_at_bol = 1;
1987 b->yy_buffer_status = YY_BUFFER_NEW;
1988
1989 if ( b == YY_CURRENT_BUFFER )
1990 yy_load_buffer_state( );
1991 }
1992
1993 /** Pushes the new state onto the stack. The new state becomes
1994 * the current state. This function will allocate the stack
1995 * if necessary.
1996 * @param new_buffer The new state.
1997 *
1998 */
1999 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2000 {
2001 if (new_buffer == NULL)
2002 return;
2003
2004 yyensure_buffer_stack();
2005
2006 /* This block is copied from yy_switch_to_buffer. */
2007 if ( YY_CURRENT_BUFFER )
2008 {
2009 /* Flush out information for old buffer. */
2010 *(yy_c_buf_p) = (yy_hold_char);
2011 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2012 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2013 }
2014
2015 /* Only push if top exists. Otherwise, replace top. */
2016 if (YY_CURRENT_BUFFER)
2017 (yy_buffer_stack_top)++;
2018 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2019
2020 /* copied from yy_switch_to_buffer. */
2021 yy_load_buffer_state( );
2022 (yy_did_buffer_switch_on_eof) = 1;
2023 }
2024
2025 /** Removes and deletes the top of the stack, if present.
2026 * The next element becomes the new top.
2027 *
2028 */
2029 void yypop_buffer_state (void)
2030 {
2031 if (!YY_CURRENT_BUFFER)
2032 return;
2033
2034 yy_delete_buffer(YY_CURRENT_BUFFER );
2035 YY_CURRENT_BUFFER_LVALUE = NULL;
2036 if ((yy_buffer_stack_top) > 0)
2037 --(yy_buffer_stack_top);
2038
2039 if (YY_CURRENT_BUFFER) {
2040 yy_load_buffer_state( );
2041 (yy_did_buffer_switch_on_eof) = 1;
2042 }
2043 }
2044
2045 /* Allocates the stack if it does not exist.
2046 * Guarantees space for at least one push.
2047 */
2048 static void yyensure_buffer_stack (void)
2049 {
2050 yy_size_t num_to_alloc;
2051
2052 if (!(yy_buffer_stack)) {
2053
2054 /* First allocation is just for 2 elements, since we don't know if this
2055 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2056 * immediate realloc on the next call.
2057 */
2058 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2059 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2060 (num_to_alloc * sizeof(struct yy_buffer_state*)
2061 );
2062 if ( ! (yy_buffer_stack) )
2063 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2064
2065 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2066
2067 (yy_buffer_stack_max) = num_to_alloc;
2068 (yy_buffer_stack_top) = 0;
2069 return;
2070 }
2071
2072 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2073
2074 /* Increase the buffer to prepare for a possible push. */
2075 yy_size_t grow_size = 8 /* arbitrary grow size */;
2076
2077 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2078 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2079 ((yy_buffer_stack),
2080 num_to_alloc * sizeof(struct yy_buffer_state*)
2081 );
2082 if ( ! (yy_buffer_stack) )
2083 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2084
2085 /* zero only the new slots.*/
2086 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2087 (yy_buffer_stack_max) = num_to_alloc;
2088 }
2089 }
2090
2091 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2092 * @param base the character buffer
2093 * @param size the size in bytes of the character buffer
2094 *
2095 * @return the newly allocated buffer state object.
2096 */
2097 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2098 {
2099 YY_BUFFER_STATE b;
2100
2101 if ( size < 2 ||
2102 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2103 base[size-1] != YY_END_OF_BUFFER_CHAR )
2104 /* They forgot to leave room for the EOB's. */
2105 return NULL;
2106
2107 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2108 if ( ! b )
2109 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2110
2111 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2112 b->yy_buf_pos = b->yy_ch_buf = base;
2113 b->yy_is_our_buffer = 0;
2114 b->yy_input_file = NULL;
2115 b->yy_n_chars = b->yy_buf_size;
2116 b->yy_is_interactive = 0;
2117 b->yy_at_bol = 1;
2118 b->yy_fill_buffer = 0;
2119 b->yy_buffer_status = YY_BUFFER_NEW;
2120
2121 yy_switch_to_buffer( b );
2122
2123 return b;
2124 }
2125
2126 /** Setup the input buffer state to scan a string. The next call to yylex() will
2127 * scan from a @e copy of @a str.
2128 * @param yystr a NUL-terminated string to scan
2129 *
2130 * @return the newly allocated buffer state object.
2131 * @note If you want to scan bytes that may contain NUL values, then use
2132 * yy_scan_bytes() instead.
2133 */
2134 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2135 {
2136
2137 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2138 }
2139
2140 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2141 * scan from a @e copy of @a bytes.
2142 * @param yybytes the byte buffer to scan
2143 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2144 *
2145 * @return the newly allocated buffer state object.
2146 */
2147 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2148 {
2149 YY_BUFFER_STATE b;
2150 char *buf;
2151 yy_size_t n;
2152 int i;
2153
2154 /* Get memory for full buffer, including space for trailing EOB's. */
2155 n = (yy_size_t) (_yybytes_len + 2);
2156 buf = (char *) yyalloc( n );
2157 if ( ! buf )
2158 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2159
2160 for ( i = 0; i < _yybytes_len; ++i )
2161 buf[i] = yybytes[i];
2162
2163 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2164
2165 b = yy_scan_buffer( buf, n );
2166 if ( ! b )
2167 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2168
2169 /* It's okay to grow etc. this buffer, and we should throw it
2170 * away when we're done.
2171 */
2172 b->yy_is_our_buffer = 1;
2173
2174 return b;
2175 }
2176
2177 #ifndef YY_EXIT_FAILURE
2178 #define YY_EXIT_FAILURE 2
2179 #endif
2180
2181 static void yynoreturn yy_fatal_error (const char* msg )
2182 {
2183 fprintf( stderr, "%s\n", msg );
2184 exit( YY_EXIT_FAILURE );
2185 }
2186
2187 /* Redefine yyless() so it works in section 3 code. */
2188
2189 #undef yyless
2190 #define yyless(n) \
2191 do \
2192 { \
2193 /* Undo effects of setting up yytext. */ \
2194 int yyless_macro_arg = (n); \
2195 YY_LESS_LINENO(yyless_macro_arg);\
2196 yytext[yyleng] = (yy_hold_char); \
2197 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2198 (yy_hold_char) = *(yy_c_buf_p); \
2199 *(yy_c_buf_p) = '\0'; \
2200 yyleng = yyless_macro_arg; \
2201 } \
2202 while ( 0 )
2203
2204 /* Accessor methods (get/set functions) to struct members. */
2205
2206 /** Get the current line number.
2207 *
2208 */
2209 int yyget_lineno (void)
2210 {
2211
2212 return yylineno;
2213 }
2214
2215 /** Get the input stream.
2216 *
2217 */
2218 FILE *yyget_in (void)
2219 {
2220 return yyin;
2221 }
2222
2223 /** Get the output stream.
2224 *
2225 */
2226 FILE *yyget_out (void)
2227 {
2228 return yyout;
2229 }
2230
2231 /** Get the length of the current token.
2232 *
2233 */
2234 int yyget_leng (void)
2235 {
2236 return yyleng;
2237 }
2238
2239 /** Get the current token.
2240 *
2241 */
2242
2243 char *yyget_text (void)
2244 {
2245 return yytext;
2246 }
2247
2248 /** Set the current line number.
2249 * @param _line_number line number
2250 *
2251 */
2252 void yyset_lineno (int _line_number )
2253 {
2254
2255 yylineno = _line_number;
2256 }
2257
2258 /** Set the input stream. This does not discard the current
2259 * input buffer.
2260 * @param _in_str A readable stream.
2261 *
2262 * @see yy_switch_to_buffer
2263 */
2264 void yyset_in (FILE * _in_str )
2265 {
2266 yyin = _in_str ;
2267 }
2268
2269 void yyset_out (FILE * _out_str )
2270 {
2271 yyout = _out_str ;
2272 }
2273
2274 int yyget_debug (void)
2275 {
2276 return yy_flex_debug;
2277 }
2278
2279 void yyset_debug (int _bdebug )
2280 {
2281 yy_flex_debug = _bdebug ;
2282 }
2283
2284 static int yy_init_globals (void)
2285 {
2286 /* Initialization is the same as for the non-reentrant scanner.
2287 * This function is called from yylex_destroy(), so don't allocate here.
2288 */
2289
2290 (yy_buffer_stack) = NULL;
2291 (yy_buffer_stack_top) = 0;
2292 (yy_buffer_stack_max) = 0;
2293 (yy_c_buf_p) = NULL;
2294 (yy_init) = 0;
2295 (yy_start) = 0;
2296
2297 /* Defined in main.c */
2298 #ifdef YY_STDINIT
2299 yyin = stdin;
2300 yyout = stdout;
2301 #else
2302 yyin = NULL;
2303 yyout = NULL;
2304 #endif
2305
2306 /* For future reference: Set errno on error, since we are called by
2307 * yylex_init()
2308 */
2309 return 0;
2310 }
2311
2312 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2313 int yylex_destroy (void)
2314 {
2315
2316 /* Pop the buffer stack, destroying each element. */
2317 while(YY_CURRENT_BUFFER){
2318 yy_delete_buffer( YY_CURRENT_BUFFER );
2319 YY_CURRENT_BUFFER_LVALUE = NULL;
2320 yypop_buffer_state();
2321 }
2322
2323 /* Destroy the stack itself. */
2324 yyfree((yy_buffer_stack) );
2325 (yy_buffer_stack) = NULL;
2326
2327 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2328 * yylex() is called, initialization will occur. */
2329 yy_init_globals( );
2330
2331 return 0;
2332 }
2333
2334 /*
2335 * Internal utility routines.
2336 */
2337
2338 #ifndef yytext_ptr
2339 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2340 {
2341
2342 int i;
2343 for ( i = 0; i < n; ++i )
2344 s1[i] = s2[i];
2345 }
2346 #endif
2347
2348 #ifdef YY_NEED_STRLEN
2349 static int yy_flex_strlen (const char * s )
2350 {
2351 int n;
2352 for ( n = 0; s[n]; ++n )
2353 ;
2354
2355 return n;
2356 }
2357 #endif
2358
2359 void *yyalloc (yy_size_t size )
2360 {
2361 return malloc(size);
2362 }
2363
2364 void *yyrealloc (void * ptr, yy_size_t size )
2365 {
2366
2367 /* The cast to (char *) in the following accommodates both
2368 * implementations that use char* generic pointers, and those
2369 * that use void* generic pointers. It works with the latter
2370 * because both ANSI C and C++ allow castless assignment from
2371 * any pointer type to void*, and deal with argument conversions
2372 * as though doing an assignment.
2373 */
2374 return realloc(ptr, size);
2375 }
2376
2377 void yyfree (void * ptr )
2378 {
2379 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2380 }
2381
2382 #define YYTABLES_NAME "yytables"
2383
2384 #line 136 "testpatternl.l"