Debian Codegraph @

src/gutenprintui2/printrcl.c

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