Debian Codegraph @

texk/web2c/hitexdir/hilexer.c

raw
1 #line 2 "lexer.c"
2
3 #line 4 "lexer.c"
4
5 #define YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 /* %not-for-header */
10 /* %if-c-only */
11 /* %if-not-reentrant */
12
13 /* %endif */
14 /* %endif */
15 /* %ok-for-header */
16
17 #define FLEX_SCANNER
18 #define YY_FLEX_MAJOR_VERSION 2
19 #define YY_FLEX_MINOR_VERSION 6
20 #define YY_FLEX_SUBMINOR_VERSION 4
21 #if YY_FLEX_SUBMINOR_VERSION > 0
22 #define FLEX_BETA
23 #endif
24
25 /* %if-c++-only */
26 /* %endif */
27
28 /* %if-c-only */
29
30 /* %endif */
31
32 /* %if-c-only */
33
34 /* %endif */
35
36 /* First, we deal with platform-specific or compiler-specific issues. */
37
38 /* begin standard C headers. */
39 /* %if-c-only */
40 #include <stdio.h>
41 #include <string.h>
42 #include <errno.h>
43 #include <stdlib.h>
44 /* %endif */
45
46 /* %if-tables-serialization */
47 /* %endif */
48 /* end standard C headers. */
49
50 /* %if-c-or-c++ */
51 /* flex integer type definitions */
52
53 #ifndef FLEXINT_H
54 #define FLEXINT_H
55
56 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
57
58 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
59
60 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
61 * if you want the limit (max/min) macros for int types.
62 */
63 #ifndef __STDC_LIMIT_MACROS
64 #define __STDC_LIMIT_MACROS 1
65 #endif
66
67 #include <inttypes.h>
68 typedef int8_t flex_int8_t;
69 typedef uint8_t flex_uint8_t;
70 typedef int16_t flex_int16_t;
71 typedef uint16_t flex_uint16_t;
72 typedef int32_t flex_int32_t;
73 typedef uint32_t flex_uint32_t;
74 #else
75 typedef signed char flex_int8_t;
76 typedef short int flex_int16_t;
77 typedef int flex_int32_t;
78 typedef unsigned char flex_uint8_t;
79 typedef unsigned short int flex_uint16_t;
80 typedef unsigned int flex_uint32_t;
81
82 /* Limits of integral types. */
83 #ifndef INT8_MIN
84 #define INT8_MIN (-128)
85 #endif
86 #ifndef INT16_MIN
87 #define INT16_MIN (-32767-1)
88 #endif
89 #ifndef INT32_MIN
90 #define INT32_MIN (-2147483647-1)
91 #endif
92 #ifndef INT8_MAX
93 #define INT8_MAX (127)
94 #endif
95 #ifndef INT16_MAX
96 #define INT16_MAX (32767)
97 #endif
98 #ifndef INT32_MAX
99 #define INT32_MAX (2147483647)
100 #endif
101 #ifndef UINT8_MAX
102 #define UINT8_MAX (255U)
103 #endif
104 #ifndef UINT16_MAX
105 #define UINT16_MAX (65535U)
106 #endif
107 #ifndef UINT32_MAX
108 #define UINT32_MAX (4294967295U)
109 #endif
110
111 #ifndef SIZE_MAX
112 #define SIZE_MAX (~(size_t)0)
113 #endif
114
115 #endif /* ! C99 */
116
117 #endif /* ! FLEXINT_H */
118
119 /* %endif */
120
121 /* begin standard C++ headers. */
122 /* %if-c++-only */
123 /* %endif */
124
125 /* TODO: this is always defined, so inline it */
126 #define yyconst const
127
128 #if defined(__GNUC__) && __GNUC__ >= 3
129 #define yynoreturn __attribute__((__noreturn__))
130 #else
131 #define yynoreturn
132 #endif
133
134 /* %not-for-header */
135 /* Returned upon end-of-file. */
136 #define YY_NULL 0
137 /* %ok-for-header */
138
139 /* %not-for-header */
140 /* Promotes a possibly negative, possibly signed char to an
141 * integer in range [0..255] for use as an array index.
142 */
143 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
144 /* %ok-for-header */
145
146 /* %if-reentrant */
147 /* %endif */
148
149 /* %if-not-reentrant */
150
151 /* %endif */
152
153 /* Enter a start condition. This macro really ought to take a parameter,
154 * but we do it the disgusting crufty way forced on us by the ()-less
155 * definition of BEGIN.
156 */
157 #define BEGIN (yy_start) = 1 + 2 *
158 /* Translate the current start state into a value that can be later handed
159 * to BEGIN to return to the state. The YYSTATE alias is for lex
160 * compatibility.
161 */
162 #define YY_START (((yy_start) - 1) / 2)
163 #define YYSTATE YY_START
164 /* Action number for EOF rule of a given start state. */
165 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
166 /* Special action meaning "start processing a new file". */
167 #define YY_NEW_FILE yyrestart( yyin )
168 #define YY_END_OF_BUFFER_CHAR 0
169
170 /* Size of default input buffer. */
171 #ifndef YY_BUF_SIZE
172 #ifdef __ia64__
173 /* On IA-64, the buffer size is 16k, not 8k.
174 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
175 * Ditto for the __ia64__ case accordingly.
176 */
177 #define YY_BUF_SIZE 32768
178 #else
179 #define YY_BUF_SIZE 16384
180 #endif /* __ia64__ */
181 #endif
182
183 /* The state buf must be large enough to hold one state per character in the main buffer.
184 */
185 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
186
187 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
188 #define YY_TYPEDEF_YY_BUFFER_STATE
189 typedef struct yy_buffer_state *YY_BUFFER_STATE;
190 #endif
191
192 #ifndef YY_TYPEDEF_YY_SIZE_T
193 #define YY_TYPEDEF_YY_SIZE_T
194 typedef size_t yy_size_t;
195 #endif
196
197 /* %if-not-reentrant */
198 extern int yyleng;
199 /* %endif */
200
201 /* %if-c-only */
202 /* %if-not-reentrant */
203 extern FILE *yyin, *yyout;
204 /* %endif */
205 /* %endif */
206
207 #define EOB_ACT_CONTINUE_SCAN 0
208 #define EOB_ACT_END_OF_FILE 1
209 #define EOB_ACT_LAST_MATCH 2
210
211 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
212 * access to the local variable yy_act. Since yyless() is a macro, it would break
213 * existing scanners that call yyless() from OUTSIDE yylex.
214 * One obvious solution it to make yy_act a global. I tried that, and saw
215 * a 5% performance hit in a non-yylineno scanner, because yy_act is
216 * normally declared as a register variable-- so it is not worth it.
217 */
218 #define YY_LESS_LINENO(n) \
219 do { \
220 int yyl;\
221 for ( yyl = n; yyl < yyleng; ++yyl )\
222 if ( yytext[yyl] == '\n' )\
223 --yylineno;\
224 }while(0)
225 #define YY_LINENO_REWIND_TO(dst) \
226 do {\
227 const char *p;\
228 for ( p = yy_cp-1; p >= (dst); --p)\
229 if ( *p == '\n' )\
230 --yylineno;\
231 }while(0)
232
233 /* Return all but the first "n" matched characters back to the input stream. */
234 #define yyless(n) \
235 do \
236 { \
237 /* Undo effects of setting up yytext. */ \
238 int yyless_macro_arg = (n); \
239 YY_LESS_LINENO(yyless_macro_arg);\
240 *yy_cp = (yy_hold_char); \
241 YY_RESTORE_YY_MORE_OFFSET \
242 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
243 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
244 } \
245 while ( 0 )
246 #define unput(c) yyunput( c, (yytext_ptr) )
247
248 #ifndef YY_STRUCT_YY_BUFFER_STATE
249 #define YY_STRUCT_YY_BUFFER_STATE
250 struct yy_buffer_state
251 {
252 /* %if-c-only */
253 FILE *yy_input_file;
254 /* %endif */
255
256 /* %if-c++-only */
257 /* %endif */
258
259 char *yy_ch_buf; /* input buffer */
260 char *yy_buf_pos; /* current position in input buffer */
261
262 /* Size of input buffer in bytes, not including room for EOB
263 * characters.
264 */
265 int yy_buf_size;
266
267 /* Number of characters read into yy_ch_buf, not including EOB
268 * characters.
269 */
270 int yy_n_chars;
271
272 /* Whether we "own" the buffer - i.e., we know we created it,
273 * and can realloc() it to grow it, and should free() it to
274 * delete it.
275 */
276 int yy_is_our_buffer;
277
278 /* Whether this is an "interactive" input source; if so, and
279 * if we're using stdio for input, then we want to use getc()
280 * instead of fread(), to make sure we stop fetching input after
281 * each newline.
282 */
283 int yy_is_interactive;
284
285 /* Whether we're considered to be at the beginning of a line.
286 * If so, '^' rules will be active on the next match, otherwise
287 * not.
288 */
289 int yy_at_bol;
290
291 int yy_bs_lineno; /**< The line count. */
292 int yy_bs_column; /**< The column count. */
293
294 /* Whether to try to fill the input buffer when we reach the
295 * end of it.
296 */
297 int yy_fill_buffer;
298
299 int yy_buffer_status;
300
301 #define YY_BUFFER_NEW 0
302 #define YY_BUFFER_NORMAL 1
303 /* When an EOF's been seen but there's still some text to process
304 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
305 * shouldn't try reading from the input source any more. We might
306 * still have a bunch of tokens to match, though, because of
307 * possible backing-up.
308 *
309 * When we actually see the EOF, we change the status to "new"
310 * (via yyrestart()), so that the user can continue scanning by
311 * just pointing yyin at a new input file.
312 */
313 #define YY_BUFFER_EOF_PENDING 2
314
315 };
316 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
317
318 /* %if-c-only Standard (non-C++) definition */
319 /* %not-for-header */
320 /* %if-not-reentrant */
321
322 /* Stack of input buffers. */
323 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
324 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
325 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
326 /* %endif */
327 /* %ok-for-header */
328
329 /* %endif */
330
331 /* We provide macros for accessing buffer states in case in the
332 * future we want to put the buffer states in a more general
333 * "scanner state".
334 *
335 * Returns the top of the stack, or NULL.
336 */
337 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
338 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
339 : NULL)
340 /* Same as previous macro, but useful when we know that the buffer stack is not
341 * NULL or when we need an lvalue. For internal use only.
342 */
343 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
344
345 /* %if-c-only Standard (non-C++) definition */
346
347 /* %if-not-reentrant */
348 /* %not-for-header */
349 /* yy_hold_char holds the character lost when yytext is formed. */
350 static char yy_hold_char;
351 static int yy_n_chars; /* number of characters read into yy_ch_buf */
352 int yyleng;
353
354 /* Points to current character in buffer. */
355 static char *yy_c_buf_p = NULL;
356 static int yy_init = 0; /* whether we need to initialize */
357 static int yy_start = 0; /* start state number */
358
359 /* Flag which is used to allow yywrap()'s to do buffer switches
360 * instead of setting up a fresh yyin. A bit of a hack ...
361 */
362 static int yy_did_buffer_switch_on_eof;
363 /* %ok-for-header */
364
365 /* %endif */
366
367 void yyrestart ( FILE *input_file );
368 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
369 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
370 void yy_delete_buffer ( YY_BUFFER_STATE b );
371 void yy_flush_buffer ( YY_BUFFER_STATE b );
372 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
373 void yypop_buffer_state ( void );
374
375 static void yyensure_buffer_stack ( void );
376 static void yy_load_buffer_state ( void );
377 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
378 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
379
380 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
381 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
382 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
383
384 /* %endif */
385
386 void *yyalloc ( yy_size_t );
387 void *yyrealloc ( void *, yy_size_t );
388 void yyfree ( void * );
389
390 #define yy_new_buffer yy_create_buffer
391 #define yy_set_interactive(is_interactive) \
392 { \
393 if ( ! YY_CURRENT_BUFFER ){ \
394 yyensure_buffer_stack (); \
395 YY_CURRENT_BUFFER_LVALUE = \
396 yy_create_buffer( yyin, YY_BUF_SIZE ); \
397 } \
398 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
399 }
400 #define yy_set_bol(at_bol) \
401 { \
402 if ( ! YY_CURRENT_BUFFER ){\
403 yyensure_buffer_stack (); \
404 YY_CURRENT_BUFFER_LVALUE = \
405 yy_create_buffer( yyin, YY_BUF_SIZE ); \
406 } \
407 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
408 }
409 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
410
411 /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
412 /* Begin user sect3 */
413
414 #define FLEX_DEBUG
415 typedef flex_uint8_t YY_CHAR;
416
417 FILE *yyin = NULL, *yyout = NULL;
418
419 typedef int yy_state_type;
420
421 extern int yylineno;
422 int yylineno = 1;
423
424 extern char *yytext;
425 #ifdef yytext_ptr
426 #undef yytext_ptr
427 #endif
428 #define yytext_ptr yytext
429
430 /* %% [1.5] DFA */
431
432 /* %if-c-only Standard (non-C++) definition */
433
434 static yy_state_type yy_get_previous_state ( void );
435 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
436 static int yy_get_next_buffer ( void );
437 static void yynoreturn yy_fatal_error ( const char* msg );
438
439 /* %endif */
440
441 /* Done after the current pattern has been matched and before the
442 * corresponding action - sets up yytext.
443 */
444 #define YY_DO_BEFORE_ACTION \
445 (yytext_ptr) = yy_bp; \
446 /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
447 yyleng = (int) (yy_cp - yy_bp); \
448 (yy_hold_char) = *yy_cp; \
449 *yy_cp = '\0'; \
450 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
451 (yy_c_buf_p) = yy_cp;
452 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
453 #define YY_NUM_RULES 130
454 #define YY_END_OF_BUFFER 131
455 /* This struct is not used in this scanner,
456 but its presence is necessary. */
457 struct yy_trans_info
458 {
459 flex_int32_t yy_verify;
460 flex_int32_t yy_nxt;
461 };
462 static const flex_int16_t yy_accept[390] =
463 { 0,
464 0, 0, 0, 0, 0, 0, 131, 129, 6, 6,
465 43, 47, 10, 129, 118, 129, 4, 4, 1, 2,
466 41, 128, 128, 128, 128, 128, 128, 128, 31, 128,
467 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
468 32, 128, 128, 40, 14, 15, 13, 11, 74, 74,
469 58, 72, 48, 73, 49, 50, 74, 130, 130, 130,
470 130, 0, 0, 0, 0, 0, 0, 0, 7, 5,
471 5, 9, 9, 0, 0, 0, 4, 128, 128, 128,
472 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
473 128, 128, 128, 128, 128, 29, 128, 128, 128, 128,
474
475 128, 128, 128, 28, 128, 97, 128, 128, 128, 128,
476 27, 128, 128, 128, 128, 128, 128, 128, 86, 128,
477 128, 128, 128, 128, 128, 12, 0, 58, 58, 0,
478 59, 55, 52, 56, 60, 53, 54, 57, 0, 0,
479 0, 0, 0, 0, 0, 0, 0, 0, 51, 71,
480 75, 0, 0, 20, 20, 16, 0, 0, 0, 5,
481 0, 9, 24, 8, 85, 128, 128, 128, 108, 128,
482 128, 128, 128, 128, 128, 128, 128, 128, 33, 128,
483 128, 128, 128, 128, 128, 128, 128, 128, 37, 128,
484 128, 128, 128, 128, 128, 128, 128, 128, 124, 109,
485
486 128, 98, 128, 128, 95, 128, 128, 128, 102, 128,
487 128, 128, 128, 128, 117, 128, 128, 128, 128, 128,
488 128, 59, 0, 0, 0, 0, 0, 0, 0, 0,
489 0, 0, 76, 0, 18, 17, 21, 0, 0, 0,
490 0, 0, 128, 128, 128, 128, 128, 128, 128, 128,
491 128, 128, 128, 94, 128, 34, 128, 126, 44, 128,
492 78, 128, 128, 82, 128, 101, 42, 128, 128, 116,
493 128, 128, 110, 96, 128, 128, 119, 128, 128, 45,
494 128, 39, 128, 128, 128, 128, 128, 79, 128, 84,
495 128, 128, 70, 65, 61, 66, 69, 63, 64, 62,
496
497 68, 67, 77, 19, 22, 0, 0, 24, 25, 128,
498 89, 128, 128, 112, 128, 128, 128, 87, 26, 128,
499 128, 35, 115, 3, 128, 81, 104, 107, 128, 128,
500 128, 46, 128, 125, 128, 120, 128, 128, 128, 100,
501 128, 83, 105, 128, 23, 0, 99, 128, 90, 103,
502 128, 128, 128, 91, 106, 128, 128, 128, 128, 128,
503 128, 128, 114, 128, 30, 0, 25, 128, 127, 128,
504 128, 128, 88, 128, 111, 36, 122, 80, 113, 92,
505 128, 128, 38, 93, 128, 121, 128, 123, 0
506 } ;
507
508 static const YY_CHAR yy_ec[256] =
509 { 0,
510 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
511 4, 4, 2, 1, 1, 1, 1, 1, 1, 1,
512 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
513 1, 5, 6, 7, 8, 8, 8, 8, 9, 10,
514 11, 12, 13, 8, 14, 15, 8, 16, 17, 17,
515 17, 17, 17, 17, 17, 18, 18, 8, 8, 19,
516 8, 20, 8, 21, 22, 22, 23, 24, 22, 25,
517 26, 8, 27, 8, 28, 29, 8, 8, 8, 30,
518 8, 31, 32, 8, 8, 8, 8, 8, 8, 8,
519 8, 33, 8, 8, 34, 8, 35, 36, 37, 38,
520
521 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
522 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
523 59, 51, 8, 60, 8, 8, 1, 61, 61, 61,
524 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
525 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
526 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
527 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
528 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
529 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
530 61, 62, 62, 62, 62, 62, 62, 62, 62, 62,
531
532 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
533 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
534 62, 62, 62, 63, 63, 63, 63, 63, 63, 63,
535 63, 63, 63, 63, 63, 63, 63, 63, 63, 64,
536 64, 64, 64, 64, 64, 64, 64, 65, 65, 65,
537 65, 65, 65, 65, 65
538 } ;
539
540 static const YY_CHAR yy_meta[66] =
541 { 0,
542 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
543 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
544 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
545 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
546 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
547 3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
548 4, 1, 1, 1, 4
549 } ;
550
551 static const flex_int16_t yy_base[395] =
552 { 0,
553 0, 0, 65, 130, 194, 258, 646, 647, 647, 647,
554 647, 647, 74, 68, 64, 68, 77, 72, 647, 647,
555 647, 53, 61, 58, 59, 587, 57, 598, 65, 65,
556 0, 604, 81, 74, 100, 106, 107, 69, 108, 594,
557 108, 598, 602, 647, 647, 647, 647, 630, 647, 144,
558 148, 161, 647, 647, 647, 647, 322, 647, 577, 576,
559 575, 626, 625, 624, 571, 570, 569, 111, 647, 647,
560 151, 157, 161, 164, 168, 187, 172, 0, 121, 586,
561 575, 573, 578, 24, 166, 170, 575, 172, 576, 143,
562 574, 579, 586, 581, 584, 564, 578, 564, 183, 580,
563
564 159, 167, 182, 0, 574, 0, 559, 185, 564, 556,
565 0, 562, 552, 562, 570, 563, 553, 568, 553, 557,
566 552, 565, 560, 560, 554, 647, 230, 236, 240, 244,
567 246, 264, 647, 647, 647, 647, 647, 647, 236, 257,
568 263, 266, 269, 272, 276, 279, 282, 285, 647, 647,
569 647, 535, 534, 647, 585, 584, 583, 530, 529, 288,
570 291, 315, 353, 357, 0, 534, 547, 548, 0, 532,
571 179, 531, 541, 529, 543, 542, 543, 544, 532, 524,
572 522, 536, 524, 515, 531, 534, 516, 528, 0, 521,
573 519, 527, 524, 510, 525, 527, 516, 518, 0, 0,
574
575 504, 0, 512, 518, 521, 520, 501, 512, 0, 513,
576 497, 510, 510, 502, 0, 499, 488, 508, 490, 489,
577 495, 266, 360, 367, 370, 373, 378, 381, 391, 399,
578 402, 405, 647, 480, 647, 531, 647, 530, 477, 424,
579 412, 434, 484, 488, 489, 495, 481, 485, 492, 482,
580 487, 480, 490, 0, 478, 479, 470, 0, 0, 481,
581 0, 480, 474, 0, 462, 0, 0, 454, 441, 0,
582 456, 440, 0, 0, 440, 445, 0, 440, 440, 0,
583 439, 0, 434, 422, 437, 426, 415, 0, 418, 0,
584 413, 415, 647, 647, 647, 647, 647, 647, 647, 647,
585
586 647, 647, 647, 647, 647, 444, 294, 647, 444, 391,
587 0, 401, 391, 0, 389, 388, 391, 0, 0, 379,
588 393, 0, 0, 0, 373, 0, 0, 0, 378, 360,
589 355, 0, 357, 0, 350, 0, 353, 362, 309, 0,
590 287, 0, 0, 292, 647, 457, 0, 289, 0, 0,
591 281, 280, 279, 0, 0, 285, 265, 265, 237, 211,
592 216, 224, 0, 202, 0, 467, 481, 205, 0, 197,
593 177, 132, 0, 131, 0, 0, 0, 0, 0, 0,
594 105, 66, 0, 0, 57, 0, 50, 0, 647, 506,
595 510, 514, 517, 70
596
597 } ;
598
599 static const flex_int16_t yy_def[395] =
600 { 0,
601 389, 1, 390, 390, 391, 391, 389, 389, 389, 389,
602 389, 389, 392, 393, 389, 389, 389, 389, 389, 389,
603 389, 394, 394, 394, 394, 394, 394, 394, 394, 394,
604 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
605 394, 394, 394, 389, 389, 389, 389, 389, 389, 389,
606 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
607 389, 389, 389, 389, 389, 389, 389, 393, 389, 389,
608 389, 389, 389, 389, 389, 389, 389, 394, 394, 394,
609 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
610 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
611
612 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
613 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
614 394, 394, 394, 394, 394, 389, 389, 389, 389, 389,
615 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
616 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
617 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
618 389, 389, 389, 389, 394, 394, 394, 394, 394, 394,
619 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
620 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
621 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
622
623 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
624 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
625 394, 389, 389, 389, 389, 389, 389, 389, 389, 389,
626 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
627 389, 389, 394, 394, 394, 394, 394, 394, 394, 394,
628 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
629 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
630 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
631 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
632 394, 394, 389, 389, 389, 389, 389, 389, 389, 389,
633
634 389, 389, 389, 389, 389, 389, 389, 389, 389, 394,
635 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
636 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
637 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
638 394, 394, 394, 394, 389, 389, 394, 394, 394, 394,
639 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
640 394, 394, 394, 394, 394, 389, 389, 394, 394, 394,
641 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
642 394, 394, 394, 394, 394, 394, 394, 394, 0, 389,
643 389, 389, 389, 389
644
645 } ;
646
647 static const flex_int16_t yy_nxt[713] =
648 { 0,
649 8, 9, 10, 9, 9, 11, 12, 8, 13, 14,
650 8, 15, 16, 16, 8, 17, 18, 18, 19, 20,
651 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
652 8, 8, 8, 21, 22, 23, 24, 25, 26, 27,
653 28, 29, 30, 31, 32, 33, 34, 31, 35, 36,
654 31, 37, 38, 39, 40, 41, 42, 43, 31, 44,
655 8, 8, 8, 8, 8, 45, 45, 46, 45, 171,
656 69, 172, 78, 48, 62, 62, 62, 62, 69, 70,
657 71, 71, 64, 72, 73, 73, 74, 77, 77, 77,
658 79, 74, 75, 75, 75, 81, 83, 85, 80, 88,
659
660 91, 86, 388, 92, 387, 89, 84, 115, 102, 82,
661 116, 95, 96, 69, 93, 99, 103, 94, 97, 100,
662 104, 69, 117, 101, 386, 45, 45, 45, 45, 45,
663 45, 45, 46, 45, 76, 65, 66, 67, 48, 105,
664 108, 112, 118, 121, 109, 127, 128, 106, 127, 129,
665 128, 110, 129, 385, 107, 113, 119, 122, 165, 111,
666 123, 114, 127, 128, 166, 127, 160, 160, 160, 384,
667 383, 74, 75, 75, 75, 74, 162, 162, 162, 163,
668 163, 163, 74, 75, 75, 75, 74, 77, 77, 77,
669 45, 45, 45, 45, 45, 50, 51, 182, 52, 196,
670
671 53, 183, 164, 164, 164, 173, 197, 54, 164, 164,
672 164, 164, 55, 56, 161, 174, 175, 179, 192, 200,
673 198, 176, 177, 180, 199, 204, 57, 247, 382, 201,
674 193, 127, 128, 248, 127, 194, 205, 129, 128, 381,
675 129, 129, 128, 380, 129, 130, 131, 222, 130, 379,
676 222, 223, 223, 223, 58, 59, 60, 61, 58, 50,
677 51, 378, 52, 377, 53, 130, 131, 222, 130, 376,
678 222, 54, 224, 224, 224, 375, 55, 56, 225, 225,
679 225, 226, 226, 226, 227, 227, 227, 228, 228, 228,
680 57, 229, 229, 229, 230, 230, 230, 231, 231, 231,
681
682 232, 232, 232, 160, 160, 160, 240, 240, 240, 308,
683 308, 308, 240, 240, 240, 240, 374, 373, 58, 59,
684 60, 61, 58, 130, 131, 372, 132, 371, 133, 74,
685 162, 162, 162, 370, 369, 134, 368, 135, 135, 365,
686 136, 137, 138, 364, 139, 140, 141, 142, 143, 144,
687 145, 146, 147, 148, 149, 363, 150, 150, 150, 150,
688 150, 150, 150, 150, 150, 150, 150, 150, 163, 163,
689 163, 242, 164, 164, 164, 223, 223, 223, 164, 164,
690 164, 164, 224, 224, 224, 225, 225, 225, 226, 226,
691 226, 241, 293, 227, 227, 227, 228, 228, 228, 294,
692
693 362, 361, 295, 360, 359, 296, 229, 229, 229, 358,
694 297, 357, 356, 298, 230, 230, 230, 231, 231, 231,
695 232, 232, 232, 299, 307, 307, 355, 308, 308, 308,
696 354, 300, 353, 352, 301, 351, 350, 302, 242, 240,
697 240, 240, 349, 348, 347, 240, 240, 240, 240, 309,
698 309, 309, 345, 344, 343, 309, 309, 309, 309, 309,
699 309, 309, 342, 341, 340, 309, 309, 309, 309, 366,
700 366, 339, 367, 367, 367, 338, 337, 336, 367, 367,
701 367, 367, 367, 367, 367, 335, 334, 333, 367, 367,
702 367, 367, 332, 331, 330, 329, 367, 367, 367, 328,
703
704 327, 346, 367, 367, 367, 367, 47, 47, 47, 47,
705 49, 49, 49, 49, 63, 63, 63, 68, 326, 68,
706 68, 325, 324, 323, 322, 321, 320, 319, 318, 317,
707 316, 315, 314, 313, 312, 311, 310, 306, 305, 304,
708 303, 292, 291, 290, 289, 288, 287, 286, 285, 284,
709 283, 282, 281, 280, 279, 278, 277, 276, 275, 274,
710 273, 272, 271, 270, 269, 268, 267, 266, 265, 264,
711 263, 262, 261, 260, 259, 258, 257, 256, 255, 254,
712 253, 252, 251, 250, 249, 246, 245, 244, 243, 239,
713 238, 237, 236, 235, 234, 233, 221, 220, 219, 218,
714
715 217, 216, 215, 214, 213, 212, 211, 210, 209, 208,
716 207, 206, 203, 202, 195, 191, 190, 189, 188, 187,
717 186, 185, 184, 181, 178, 170, 169, 168, 167, 159,
718 158, 157, 156, 155, 154, 153, 152, 151, 126, 125,
719 124, 120, 98, 90, 87, 389, 7, 389, 389, 389,
720 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
721 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
722 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
723 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
724 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
725
726 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
727 389, 389
728 } ;
729
730 static const flex_int16_t yy_chk[713] =
731 { 0,
732 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
733 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
736 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
738 1, 1, 1, 1, 1, 3, 3, 3, 3, 84,
739 14, 84, 394, 3, 13, 13, 13, 13, 14, 15,
740 15, 15, 13, 16, 16, 16, 18, 18, 18, 18,
741 22, 17, 17, 17, 17, 23, 24, 25, 22, 27,
742
743 29, 25, 387, 29, 385, 27, 24, 38, 34, 23,
744 38, 30, 30, 68, 29, 33, 34, 29, 30, 33,
745 34, 68, 38, 33, 382, 3, 3, 3, 3, 3,
746 4, 4, 4, 4, 17, 13, 13, 13, 4, 35,
747 36, 37, 39, 41, 36, 50, 50, 35, 50, 51,
748 51, 36, 51, 381, 35, 37, 39, 41, 79, 36,
749 41, 37, 52, 52, 79, 52, 71, 71, 71, 374,
750 372, 72, 72, 72, 72, 73, 73, 73, 73, 74,
751 74, 74, 75, 75, 75, 75, 77, 77, 77, 77,
752 4, 4, 4, 4, 4, 5, 5, 90, 5, 101,
753
754 5, 90, 76, 76, 76, 85, 101, 5, 76, 76,
755 76, 76, 5, 5, 72, 85, 86, 88, 99, 103,
756 102, 86, 86, 88, 102, 108, 5, 171, 371, 103,
757 99, 127, 127, 171, 127, 99, 108, 128, 128, 370,
758 128, 129, 129, 368, 129, 130, 130, 131, 130, 364,
759 131, 139, 139, 139, 5, 5, 5, 5, 5, 6,
760 6, 362, 6, 361, 6, 132, 132, 222, 132, 360,
761 222, 6, 140, 140, 140, 359, 6, 6, 141, 141,
762 141, 142, 142, 142, 143, 143, 143, 144, 144, 144,
763 6, 145, 145, 145, 146, 146, 146, 147, 147, 147,
764
765 148, 148, 148, 160, 160, 160, 161, 161, 161, 307,
766 307, 307, 161, 161, 161, 161, 358, 357, 6, 6,
767 6, 6, 6, 57, 57, 356, 57, 353, 57, 162,
768 162, 162, 162, 352, 351, 57, 348, 57, 57, 344,
769 57, 57, 57, 341, 57, 57, 57, 57, 57, 57,
770 57, 57, 57, 57, 57, 339, 57, 57, 57, 57,
771 57, 57, 57, 57, 57, 57, 57, 57, 163, 163,
772 163, 164, 164, 164, 164, 223, 223, 223, 164, 164,
773 164, 164, 224, 224, 224, 225, 225, 225, 226, 226,
774 226, 163, 223, 227, 227, 227, 228, 228, 228, 224,
775
776 338, 337, 225, 335, 333, 226, 229, 229, 229, 331,
777 227, 330, 329, 228, 230, 230, 230, 231, 231, 231,
778 232, 232, 232, 229, 241, 241, 325, 241, 241, 241,
779 321, 230, 320, 317, 231, 316, 315, 232, 240, 240,
780 240, 240, 313, 312, 310, 240, 240, 240, 240, 242,
781 242, 242, 306, 292, 291, 242, 242, 242, 242, 309,
782 309, 309, 289, 287, 286, 309, 309, 309, 309, 346,
783 346, 285, 346, 346, 346, 284, 283, 281, 346, 346,
784 346, 346, 366, 366, 366, 279, 278, 276, 366, 366,
785 366, 366, 275, 272, 271, 269, 367, 367, 367, 268,
786
787 265, 309, 367, 367, 367, 367, 390, 390, 390, 390,
788 391, 391, 391, 391, 392, 392, 392, 393, 263, 393,
789 393, 262, 260, 257, 256, 255, 253, 252, 251, 250,
790 249, 248, 247, 246, 245, 244, 243, 239, 238, 236,
791 234, 221, 220, 219, 218, 217, 216, 214, 213, 212,
792 211, 210, 208, 207, 206, 205, 204, 203, 201, 198,
793 197, 196, 195, 194, 193, 192, 191, 190, 188, 187,
794 186, 185, 184, 183, 182, 181, 180, 179, 178, 177,
795 176, 175, 174, 173, 172, 170, 168, 167, 166, 159,
796 158, 157, 156, 155, 153, 152, 125, 124, 123, 122,
797
798 121, 120, 119, 118, 117, 116, 115, 114, 113, 112,
799 110, 109, 107, 105, 100, 98, 97, 96, 95, 94,
800 93, 92, 91, 89, 87, 83, 82, 81, 80, 67,
801 66, 65, 64, 63, 62, 61, 60, 59, 48, 43,
802 42, 40, 32, 28, 26, 7, 389, 389, 389, 389,
803 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
804 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
805 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
806 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
807 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
808
809 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
810 389, 389
811 } ;
812
813 /* Table of booleans, true if rule could match eol. */
814 static const flex_int32_t yy_rule_can_match_eol[131] =
815 { 0,
816 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
817 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
823
824 static yy_state_type yy_last_accepting_state;
825 static char *yy_last_accepting_cpos;
826
827 extern int yy_flex_debug;
828 int yy_flex_debug = 1;
829
830 static const flex_int16_t yy_rule_linenum[130] =
831 { 0,
832 171, 172, 173, 174, 175, 176, 177, 179, 181, 183,
833 185, 186, 187, 188, 189, 194, 195, 196, 197, 198,
834 199, 200, 201, 203, 205, 207, 208, 209, 210, 212,
835 213, 214, 216, 217, 218, 220, 221, 223, 225, 226,
836 227, 229, 230, 232, 233, 234, 236, 239, 241, 242,
837 244, 245, 246, 247, 248, 249, 250, 252, 253, 255,
838 257, 258, 259, 260, 261, 262, 263, 264, 265, 268,
839 270, 271, 272, 274, 275, 276, 277, 280, 281, 282,
840 284, 285, 286, 287, 288, 289, 290, 292, 293, 294,
841 295, 297, 299, 301, 303, 305, 307, 308, 310, 312,
842
843 313, 314, 315, 317, 318, 319, 321, 322, 323, 325,
844 327, 329, 331, 333, 334, 335, 336, 337, 339, 341,
845 343, 344, 346, 348, 350, 352, 354, 356, 357
846 } ;
847
848 /* The intent behind this definition is that it'll catch
849 * any uses of REJECT which flex missed.
850 */
851 #define REJECT reject_used_but_not_detected
852 #define yymore() yymore_used_but_not_detected
853 #define YY_MORE_ADJ 0
854 #define YY_RESTORE_YY_MORE_OFFSET
855 char *yytext;
856 #line 1 "lexer.l"
857 #line 2 "lexer.l"
858 /*555:*/
859 #line 11640 "format.w"
860
861 #include "hibasetypes.h"
862 #include "hierror.h"
863 #include "hiformat.h"
864 #include "hiput.h"
865
866 /*464:*/
867 #ifdef DEBUG
868 #define YYDEBUG 1
869 extern int yydebug;
870 #else
871 #define YYDEBUG 0
872 #endif
873 /*:464*/
874 #include "hiparser.h"
875
876 /*23:*/
877 #define SCAN_UDEC(S) yylval.u= strtoul(S,NULL,10)
878 /*:23*/ /*26:*/
879 #define SCAN_HEX(S) yylval.u= strtoul(S,NULL,16)
880 /*:26*/ /*29:*/
881 #define SCAN_DEC(S) yylval.i= strtol(S,NULL,10)
882 /*:29*/ /*32:*/
883 #define MAX_STR (1<<10)
884 static char str_buffer[MAX_STR];
885 static int str_length;
886 #define STR_START (str_length= 0)
887 #define STR_PUT(C) (str_buffer[str_length++]= (C))
888 #define STR_ADD(C) STR_PUT(C);RNG("String length",str_length,0,MAX_STR-1)
889 #define STR_END str_buffer[str_length]= 0
890 #define SCAN_STR yylval.s= str_buffer
891 /*:32*/ /*41:*/
892 #define SCAN_UTF8_1(S) yylval.u= ((S)[0]&0x7F)
893 /*:41*/ /*43:*/
894 #define SCAN_UTF8_2(S) yylval.u= (((S)[0]&0x1F)<<6)+((S)[1]&0x3F)
895 /*:43*/ /*45:*/
896 #define SCAN_UTF8_3(S) yylval.u= (((S)[0]&0x0F)<<12)+(((S)[1]&0x3F)<<6)+((S)[2]&0x3F)
897 /*:45*/ /*47:*/
898 #define SCAN_UTF8_4(S) yylval.u= (((S)[0]&0x07)<<18)+(((S)[1]&0x3F)<<12)+(((S)[2]&0x3F)<<6)+((S)[3]&0x3F)
899 /*:47*/ /*58:*/
900 #define SCAN_DECFLOAT yylval.f= atof(yytext)
901 /*:58*/ /*61:*/
902 #define SCAN_HEXFLOAT yylval.f= xtof(yytext)
903 /*:61*/ /*153:*/
904 #define SCAN_REF(K) yylval.rf.k= K; yylval.rf.n= atoi(yytext+2)
905 static int scan_level= 0;
906 #define SCAN_START yy_push_state(INITIAL);if (1==scan_level++) hpos0= hpos;
907 #define SCAN_END if (scan_level--) yy_pop_state(); else QUIT("Too many '>' in line %d",yylineno)
908 #define SCAN_TXT_START BEGIN(TXT)
909 #define SCAN_TXT_END BEGIN(INITIAL)
910 /*:153*/
911 /*62:*/
912
913 float64_t xtof(char*x)
914 {
915 #line 1390 "format.w"
916 int sign,digits,exp;
917 uint64_t mantissa= 0;
918 DBG(DBGFLOAT,"converting %s:\n",x);
919 /*63:*/
920 if(*x=='-'){sign= -1;x++;}
921 else if(*x=='+'){sign= +1;x++;}
922 else sign= +1;
923 DBG(DBGFLOAT,"\tsign=%d\n",sign);
924 /*:63*/
925 x= x+2;
926 /*64:*/
927 digits= 0;
928 while(*x=='0')x++;
929 while(*x!='.')
930 {mantissa= mantissa<<4;
931 if(*x<'A')mantissa= mantissa+*x-'0';
932 else mantissa= mantissa+*x-'A'+10;
933 x++;
934 digits++;
935 }
936 x++;
937 exp= 0;
938 while(*x!=0&&*x!='x')
939 {mantissa= mantissa<<4;
940 exp= exp-4;
941 if(*x<'A')mantissa= mantissa+*x-'0';
942 else mantissa= mantissa+*x-'A'+10;
943 x++;
944 digits++;
945 }
946 DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp);
947 /*:64*/
948 /*65:*/
949 if(mantissa==0)return 0.0;
950 {int s;
951 s= digits-DBL_M_BITS/4;
952 if(s>1)
953 mantissa= mantissa>>(4*(s-1));
954 else if(s<1)
955 mantissa= mantissa<<(4*(1-s));
956 exp= exp+4*(digits-1);
957 DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp);
958 while((mantissa>>DBL_M_BITS)>1){mantissa= mantissa>>1;exp++;}
959 DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp);
960 mantissa= mantissa&~((uint64_t)1<<DBL_M_BITS);
961 DBG(DBGFLOAT,"\tdigits=%d mantissa=0x%"PRIx64", exp=%d\n",digits,mantissa,exp);
962 }
963 /*:65*/
964 /*66:*/
965 if(*x=='x')
966 {int s;
967 x++;
968 if(*x=='-'){s= -1;x++;}
969 else if(*x=='+'){s= +1;x++;}
970 else s= +1;
971 DBG(DBGFLOAT,"\texpsign=%d\n",s);
972 DBG(DBGFLOAT,"\texp=%d\n",exp);
973 while(*x!=0)
974 {if(*x<'A')exp= exp+4*s*(*x-'0');
975 else exp= exp+4*s*(*x-'A'+10);
976 x++;
977 DBG(DBGFLOAT,"\texp=%d\n",exp);
978 }
979 }
980 RNG("Floating point exponent",exp,-DBL_EXCESS,DBL_EXCESS);
981 /*:66*/
982 /*67:*/
983 {union{float64_t d;uint64_t bits;}u;
984 if(sign<0)sign= 1;else sign= 0;
985 exp= exp+DBL_EXCESS;
986 u.bits= ((uint64_t)sign<<63)
987 |((uint64_t)exp<<DBL_M_BITS) |mantissa;
988 DBG(DBGFLOAT," return %f\n",u.d);
989 return u.d;
990 }
991 /*:67*/
992 }
993 /*:62*/
994 int yywrap(void){
995 #line 11651 "format.w"
996 return 1;}
997 #ifdef _MSC_VER
998 #pragma warning( disable : 4267)
999 #endif
1000
1001 #line 1002 "lexer.c"
1002 #define YY_NO_UNISTD_H 1
1003 #define YY_NO_INPUT 1
1004 #line 152 "lexer.l"
1005 /*24:*/
1006 /*:24*/ /*33:*/
1007
1008 /*:33*/ /*40:*/
1009 /*:40*/ /*42:*/
1010 /*:42*/ /*44:*/
1011 /*:44*/ /*46:*/
1012 /*:46*/ /*150:*/
1013
1014 /*:150*/
1015 #line 1016 "lexer.c"
1016
1017 #define INITIAL 0
1018 #define STR 1
1019 #define TXT 2
1020
1021 #ifndef YY_NO_UNISTD_H
1022 /* Special case for "hiunistd.h", since it is non-ANSI. We include it way
1023 * down here because we want the user's section 1 to have been scanned first.
1024 * The user has a chance to override it with an option.
1025 */
1026 /* %if-c-only */
1027 #include <unistd.h>
1028 /* %endif */
1029 /* %if-c++-only */
1030 /* %endif */
1031 #endif
1032
1033 #ifndef YY_EXTRA_TYPE
1034 #define YY_EXTRA_TYPE void *
1035 #endif
1036
1037 /* %if-c-only Reentrant structure and macros (non-C++). */
1038 /* %if-reentrant */
1039 /* %if-c-only */
1040
1041 static int yy_init_globals ( void );
1042
1043 /* %endif */
1044 /* %if-reentrant */
1045 /* %endif */
1046 /* %endif End reentrant structures and macros. */
1047
1048 /* Accessor methods to globals.
1049 These are made visible to non-reentrant scanners for convenience. */
1050
1051 int yylex_destroy ( void );
1052
1053 int yyget_debug ( void );
1054
1055 void yyset_debug ( int debug_flag );
1056
1057 YY_EXTRA_TYPE yyget_extra ( void );
1058
1059 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1060
1061 FILE *yyget_in ( void );
1062
1063 void yyset_in ( FILE * _in_str );
1064
1065 FILE *yyget_out ( void );
1066
1067 void yyset_out ( FILE * _out_str );
1068
1069 int yyget_leng ( void );
1070
1071 char *yyget_text ( void );
1072
1073 int yyget_lineno ( void );
1074
1075 void yyset_lineno ( int _line_number );
1076
1077 /* %if-bison-bridge */
1078 /* %endif */
1079
1080 /* Macros after this point can all be overridden by user definitions in
1081 * section 1.
1082 */
1083
1084 #ifndef YY_SKIP_YYWRAP
1085 #ifdef __cplusplus
1086 extern "C" int yywrap ( void );
1087 #else
1088 extern int yywrap ( void );
1089 #endif
1090 #endif
1091
1092 /* %not-for-header */
1093 #ifndef YY_NO_UNPUT
1094
1095 #endif
1096 /* %ok-for-header */
1097
1098 /* %endif */
1099
1100 #ifndef yytext_ptr
1101 static void yy_flex_strncpy ( char *, const char *, int );
1102 #endif
1103
1104 #ifdef YY_NEED_STRLEN
1105 static int yy_flex_strlen ( const char * );
1106 #endif
1107
1108 #ifndef YY_NO_INPUT
1109 /* %if-c-only Standard (non-C++) definition */
1110 /* %not-for-header */
1111 #ifdef __cplusplus
1112 static int yyinput ( void );
1113 #else
1114 static int input ( void );
1115 #endif
1116 /* %ok-for-header */
1117
1118 /* %endif */
1119 #endif
1120
1121 /* %if-c-only */
1122
1123 static int yy_start_stack_ptr = 0;
1124 static int yy_start_stack_depth = 0;
1125 static int *yy_start_stack = NULL;
1126
1127 static void yy_push_state ( int _new_state );
1128
1129 static void yy_pop_state ( void );
1130
1131 /* %endif */
1132
1133 /* Amount of stuff to slurp up with each read. */
1134 #ifndef YY_READ_BUF_SIZE
1135 #ifdef __ia64__
1136 /* On IA-64, the buffer size is 16k, not 8k */
1137 #define YY_READ_BUF_SIZE 16384
1138 #else
1139 #define YY_READ_BUF_SIZE 8192
1140 #endif /* __ia64__ */
1141 #endif
1142
1143 /* Copy whatever the last rule matched to the standard output. */
1144 #ifndef ECHO
1145 /* %if-c-only Standard (non-C++) definition */
1146 /* This used to be an fputs(), but since the string might contain NUL's,
1147 * we now use fwrite().
1148 */
1149 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1150 /* %endif */
1151 /* %if-c++-only C++ definition */
1152 /* %endif */
1153 #endif
1154
1155 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1156 * is returned in "result".
1157 */
1158 #ifndef YY_INPUT
1159 #define YY_INPUT(buf,result,max_size) \
1160 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1161 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1162 { \
1163 int c = '*'; \
1164 int n; \
1165 for ( n = 0; n < max_size && \
1166 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1167 buf[n] = (char) c; \
1168 if ( c == '\n' ) \
1169 buf[n++] = (char) c; \
1170 if ( c == EOF && ferror( yyin ) ) \
1171 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1172 result = n; \
1173 } \
1174 else \
1175 { \
1176 errno=0; \
1177 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1178 { \
1179 if( errno != EINTR) \
1180 { \
1181 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1182 break; \
1183 } \
1184 errno=0; \
1185 clearerr(yyin); \
1186 } \
1187 }\
1188 \
1189 /* %if-c++-only C++ definition \ */\
1190 /* %endif */
1191
1192 #endif
1193
1194 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1195 * we don't want an extra ';' after the "return" because that will cause
1196 * some compilers to complain about unreachable statements.
1197 */
1198 #ifndef yyterminate
1199 #define yyterminate() return YY_NULL
1200 #endif
1201
1202 /* Number of entries by which start-condition stack grows. */
1203 #ifndef YY_START_STACK_INCR
1204 #define YY_START_STACK_INCR 25
1205 #endif
1206
1207 /* Report a fatal error. */
1208 #ifndef YY_FATAL_ERROR
1209 /* %if-c-only */
1210 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1211 /* %endif */
1212 /* %if-c++-only */
1213 /* %endif */
1214 #endif
1215
1216 /* %if-tables-serialization structures and prototypes */
1217 /* %not-for-header */
1218 /* %ok-for-header */
1219
1220 /* %not-for-header */
1221 /* %tables-yydmap generated elements */
1222 /* %endif */
1223 /* end tables serialization structures and prototypes */
1224
1225 /* %ok-for-header */
1226
1227 /* Default declaration of generated scanner - a define so the user can
1228 * easily add parameters.
1229 */
1230 #ifndef YY_DECL
1231 #define YY_DECL_IS_OURS 1
1232 /* %if-c-only Standard (non-C++) definition */
1233
1234 extern int yylex (void);
1235
1236 #define YY_DECL int yylex (void)
1237 /* %endif */
1238 /* %if-c++-only C++ definition */
1239 /* %endif */
1240 #endif /* !YY_DECL */
1241
1242 /* Code executed at the beginning of each rule, after yytext and yyleng
1243 * have been set up.
1244 */
1245 #ifndef YY_USER_ACTION
1246 #define YY_USER_ACTION
1247 #endif
1248
1249 /* Code executed at the end of each rule. */
1250 #ifndef YY_BREAK
1251 #define YY_BREAK /*LINTED*/break;
1252 #endif
1253
1254 /* %% [6.0] YY_RULE_SETUP definition goes here */
1255 #define YY_RULE_SETUP \
1256 YY_USER_ACTION
1257
1258 /* %not-for-header */
1259 /** The main scanner function which does all the work.
1260 */
1261 YY_DECL
1262 {
1263 yy_state_type yy_current_state;
1264 char *yy_cp, *yy_bp;
1265 int yy_act;
1266
1267 if ( !(yy_init) )
1268 {
1269 (yy_init) = 1;
1270
1271 #ifdef YY_USER_INIT
1272 YY_USER_INIT;
1273 #endif
1274
1275 if ( ! (yy_start) )
1276 (yy_start) = 1; /* first start state */
1277
1278 if ( ! yyin )
1279 /* %if-c-only */
1280 yyin = stdin;
1281 /* %endif */
1282 /* %if-c++-only */
1283 /* %endif */
1284
1285 if ( ! yyout )
1286 /* %if-c-only */
1287 yyout = stdout;
1288 /* %endif */
1289 /* %if-c++-only */
1290 /* %endif */
1291
1292 if ( ! YY_CURRENT_BUFFER ) {
1293 yyensure_buffer_stack ();
1294 YY_CURRENT_BUFFER_LVALUE =
1295 yy_create_buffer( yyin, YY_BUF_SIZE );
1296 }
1297
1298 yy_load_buffer_state( );
1299 }
1300
1301 {
1302 /* %% [7.0] user's declarations go here */
1303 #line 168 "lexer.l"
1304
1305
1306 /*3:*/
1307 #line 1308 "lexer.c"
1308
1309 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1310 {
1311 /* %% [8.0] yymore()-related code goes here */
1312 yy_cp = (yy_c_buf_p);
1313
1314 /* Support of yytext. */
1315 *yy_cp = (yy_hold_char);
1316
1317 /* yy_bp points to the position in yy_ch_buf of the start of
1318 * the current run.
1319 */
1320 yy_bp = yy_cp;
1321
1322 /* %% [9.0] code to set up and find next match goes here */
1323 yy_current_state = (yy_start);
1324 yy_match:
1325 do
1326 {
1327 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1328 if ( yy_accept[yy_current_state] )
1329 {
1330 (yy_last_accepting_state) = yy_current_state;
1331 (yy_last_accepting_cpos) = yy_cp;
1332 }
1333 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1334 {
1335 yy_current_state = (int) yy_def[yy_current_state];
1336 if ( yy_current_state >= 390 )
1337 yy_c = yy_meta[yy_c];
1338 }
1339 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1340 ++yy_cp;
1341 }
1342 while ( yy_current_state != 389 );
1343 yy_cp = (yy_last_accepting_cpos);
1344 yy_current_state = (yy_last_accepting_state);
1345
1346 yy_find_action:
1347 /* %% [10.0] code to find the action number goes here */
1348 yy_act = yy_accept[yy_current_state];
1349
1350 YY_DO_BEFORE_ACTION;
1351
1352 /* %% [11.0] code for yylineno update goes here */
1353
1354 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1355 {
1356 int yyl;
1357 for ( yyl = 0; yyl < yyleng; ++yyl )
1358 if ( yytext[yyl] == '\n' )
1359
1360 yylineno++;
1361 ;
1362 }
1363
1364 do_action: /* This label is used only to access EOF actions. */
1365
1366 /* %% [12.0] debug code goes here */
1367 if ( yy_flex_debug )
1368 {
1369 if ( yy_act == 0 )
1370 fprintf( stderr, "--scanner backing up\n" );
1371 else if ( yy_act < 130 )
1372 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1373 (long)yy_rule_linenum[yy_act], yytext );
1374 else if ( yy_act == 130 )
1375 fprintf( stderr, "--accepting default rule (\"%s\")\n",
1376 yytext );
1377 else if ( yy_act == 131 )
1378 fprintf( stderr, "--(end of buffer or a NUL)\n" );
1379 else
1380 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1381 }
1382
1383 switch ( yy_act )
1384 { /* beginning of action switch */
1385 /* %% [13.0] actions go here */
1386 case 0: /* must back up */
1387 /* undo the effects of YY_DO_BEFORE_ACTION */
1388 *yy_cp = (yy_hold_char);
1389 yy_cp = (yy_last_accepting_cpos);
1390 yy_current_state = (yy_last_accepting_state);
1391 goto yy_find_action;
1392
1393 case 1:
1394 YY_RULE_SETUP
1395 #line 171 "lexer.l"
1396 SCAN_START;return START;
1397 YY_BREAK
1398 case 2:
1399 YY_RULE_SETUP
1400 #line 172 "lexer.l"
1401 SCAN_END;return END;
1402 YY_BREAK
1403 case 3:
1404 YY_RULE_SETUP
1405 #line 173 "lexer.l"
1406 return GLYPH;
1407 YY_BREAK
1408 case 4:
1409 YY_RULE_SETUP
1410 #line 174 "lexer.l"
1411 SCAN_UDEC(yytext);return UNSIGNED;
1412 YY_BREAK
1413 case 5:
1414 YY_RULE_SETUP
1415 #line 175 "lexer.l"
1416 SCAN_UDEC(yytext+1);return REFERENCE;
1417 YY_BREAK
1418 case 6:
1419 /* rule 6 can match eol */
1420 YY_RULE_SETUP
1421 #line 176 "lexer.l"
1422 ;
1423 YY_BREAK
1424 case 7:
1425 /* rule 7 can match eol */
1426 YY_RULE_SETUP
1427 #line 177 "lexer.l"
1428 ;
1429 YY_BREAK
1430 /*:3*/ /*25:*/
1431 case 8:
1432 YY_RULE_SETUP
1433 #line 179 "lexer.l"
1434 SCAN_HEX(yytext+2);return UNSIGNED;
1435 YY_BREAK
1436 /*:25*/ /*28:*/
1437 case 9:
1438 YY_RULE_SETUP
1439 #line 181 "lexer.l"
1440 SCAN_DEC(yytext);return SIGNED;
1441 YY_BREAK
1442 /*:28*/ /*35:*/
1443 case 10:
1444 YY_RULE_SETUP
1445 #line 183 "lexer.l"
1446 STR_START;BEGIN(STR);
1447 YY_BREAK
1448
1449 case 11:
1450 YY_RULE_SETUP
1451 #line 185 "lexer.l"
1452 STR_END;SCAN_STR;BEGIN(INITIAL);return STRING;
1453 YY_BREAK
1454 case 12:
1455 YY_RULE_SETUP
1456 #line 186 "lexer.l"
1457 STR_ADD('\'');
1458 YY_BREAK
1459 case 13:
1460 YY_RULE_SETUP
1461 #line 187 "lexer.l"
1462 STR_ADD(yytext[0]);
1463 YY_BREAK
1464 case 14:
1465 YY_RULE_SETUP
1466 #line 188 "lexer.l"
1467 RNG("String character",yytext[0],0x20,0x7E);
1468 YY_BREAK
1469 case 15:
1470 /* rule 15 can match eol */
1471 YY_RULE_SETUP
1472 #line 189 "lexer.l"
1473 QUIT("Unterminated String in line %d",yylineno);
1474 YY_BREAK
1475
1476 /*:35*/ /*49:*/
1477 case 16:
1478 YY_RULE_SETUP
1479 #line 194 "lexer.l"
1480 STR_START;STR_PUT('\'');BEGIN(STR);
1481 YY_BREAK
1482 case 17:
1483 YY_RULE_SETUP
1484 #line 195 "lexer.l"
1485 SCAN_UTF8_1(yytext+1);return CHARCODE;
1486 YY_BREAK
1487 case 18:
1488 YY_RULE_SETUP
1489 #line 196 "lexer.l"
1490 STR_START;STR_PUT(yytext[1]);STR_PUT('\'');BEGIN(STR);
1491 YY_BREAK
1492 case 19:
1493 YY_RULE_SETUP
1494 #line 197 "lexer.l"
1495 STR_START;STR_PUT('\'');STR_PUT('\'');BEGIN(STR);
1496 YY_BREAK
1497 case 20:
1498 /* rule 20 can match eol */
1499 YY_RULE_SETUP
1500 #line 198 "lexer.l"
1501 SCAN_UTF8_1(yytext+1);return CHARCODE;
1502 YY_BREAK
1503 case 21:
1504 YY_RULE_SETUP
1505 #line 199 "lexer.l"
1506 SCAN_UTF8_2(yytext+1);return CHARCODE;
1507 YY_BREAK
1508 case 22:
1509 YY_RULE_SETUP
1510 #line 200 "lexer.l"
1511 SCAN_UTF8_3(yytext+1);return CHARCODE;
1512 YY_BREAK
1513 case 23:
1514 YY_RULE_SETUP
1515 #line 201 "lexer.l"
1516 SCAN_UTF8_4(yytext+1);return CHARCODE;
1517 YY_BREAK
1518 /*:49*/ /*56:*/
1519 case 24:
1520 YY_RULE_SETUP
1521 #line 203 "lexer.l"
1522 SCAN_DECFLOAT;return FPNUM;
1523 YY_BREAK
1524 /*:56*/ /*60:*/
1525 case 25:
1526 YY_RULE_SETUP
1527 #line 205 "lexer.l"
1528 SCAN_HEXFLOAT;return FPNUM;
1529 YY_BREAK
1530 /*:60*/ /*81:*/
1531 case 26:
1532 YY_RULE_SETUP
1533 #line 207 "lexer.l"
1534 return DIMEN;
1535 YY_BREAK
1536 case 27:
1537 YY_RULE_SETUP
1538 #line 208 "lexer.l"
1539 return PT;
1540 YY_BREAK
1541 case 28:
1542 YY_RULE_SETUP
1543 #line 209 "lexer.l"
1544 return MM;
1545 YY_BREAK
1546 case 29:
1547 YY_RULE_SETUP
1548 #line 210 "lexer.l"
1549 return INCH;
1550 YY_BREAK
1551 /*:81*/ /*89:*/
1552 case 30:
1553 YY_RULE_SETUP
1554 #line 212 "lexer.l"
1555 return XDIMEN;
1556 YY_BREAK
1557 case 31:
1558 YY_RULE_SETUP
1559 #line 213 "lexer.l"
1560 return H;
1561 YY_BREAK
1562 case 32:
1563 YY_RULE_SETUP
1564 #line 214 "lexer.l"
1565 return V;
1566 YY_BREAK
1567 /*:89*/ /*100:*/
1568 case 33:
1569 YY_RULE_SETUP
1570 #line 216 "lexer.l"
1571 return FIL;
1572 YY_BREAK
1573 case 34:
1574 YY_RULE_SETUP
1575 #line 217 "lexer.l"
1576 return FILL;
1577 YY_BREAK
1578 case 35:
1579 YY_RULE_SETUP
1580 #line 218 "lexer.l"
1581 return FILLL;
1582 YY_BREAK
1583 /*:100*/ /*104:*/
1584 case 36:
1585 YY_RULE_SETUP
1586 #line 220 "lexer.l"
1587 return PENALTY;
1588 YY_BREAK
1589 case 37:
1590 YY_RULE_SETUP
1591 #line 221 "lexer.l"
1592 return INTEGER;
1593 YY_BREAK
1594 /*:104*/ /*110:*/
1595 case 38:
1596 YY_RULE_SETUP
1597 #line 223 "lexer.l"
1598 return LANGUAGE;
1599 YY_BREAK
1600 /*:110*/ /*116:*/
1601 case 39:
1602 YY_RULE_SETUP
1603 #line 225 "lexer.l"
1604 return RULE;
1605 YY_BREAK
1606 case 40:
1607 YY_RULE_SETUP
1608 #line 226 "lexer.l"
1609 return RUNNING;
1610 YY_BREAK
1611 case 41:
1612 YY_RULE_SETUP
1613 #line 227 "lexer.l"
1614 return RUNNING;
1615 YY_BREAK
1616 /*:116*/ /*125:*/
1617 case 42:
1618 YY_RULE_SETUP
1619 #line 229 "lexer.l"
1620 return KERN;
1621 YY_BREAK
1622 case 43:
1623 YY_RULE_SETUP
1624 #line 230 "lexer.l"
1625 return EXPLICIT;
1626 YY_BREAK
1627 /*:125*/ /*134:*/
1628 case 44:
1629 YY_RULE_SETUP
1630 #line 232 "lexer.l"
1631 return GLUE;
1632 YY_BREAK
1633 case 45:
1634 YY_RULE_SETUP
1635 #line 233 "lexer.l"
1636 return PLUS;
1637 YY_BREAK
1638 case 46:
1639 YY_RULE_SETUP
1640 #line 234 "lexer.l"
1641 return MINUS;
1642 YY_BREAK
1643 /*:134*/ /*152:*/
1644 case 47:
1645 YY_RULE_SETUP
1646 #line 236 "lexer.l"
1647 SCAN_TXT_START;return TXT_START;
1648 YY_BREAK
1649
1650 case 48:
1651 YY_RULE_SETUP
1652 #line 239 "lexer.l"
1653 SCAN_TXT_END;return TXT_END;
1654 YY_BREAK
1655 case 49:
1656 YY_RULE_SETUP
1657 #line 241 "lexer.l"
1658 SCAN_START;return START;
1659 YY_BREAK
1660 case 50:
1661 YY_RULE_SETUP
1662 #line 242 "lexer.l"
1663 QUIT("> not allowed in text mode");
1664 YY_BREAK
1665 case 51:
1666 YY_RULE_SETUP
1667 #line 244 "lexer.l"
1668 yylval.u= '\\';return TXT_CC;
1669 YY_BREAK
1670 case 52:
1671 YY_RULE_SETUP
1672 #line 245 "lexer.l"
1673 yylval.u= '"';return TXT_CC;
1674 YY_BREAK
1675 case 53:
1676 YY_RULE_SETUP
1677 #line 246 "lexer.l"
1678 yylval.u= '<';return TXT_CC;
1679 YY_BREAK
1680 case 54:
1681 YY_RULE_SETUP
1682 #line 247 "lexer.l"
1683 yylval.u= '>';return TXT_CC;
1684 YY_BREAK
1685 case 55:
1686 YY_RULE_SETUP
1687 #line 248 "lexer.l"
1688 yylval.u= ' ';return TXT_CC;
1689 YY_BREAK
1690 case 56:
1691 YY_RULE_SETUP
1692 #line 249 "lexer.l"
1693 yylval.u= '-';return TXT_CC;
1694 YY_BREAK
1695 case 57:
1696 YY_RULE_SETUP
1697 #line 250 "lexer.l"
1698 return TXT_IGNORE;
1699 YY_BREAK
1700 case 58:
1701 /* rule 58 can match eol */
1702 YY_RULE_SETUP
1703 #line 252 "lexer.l"
1704 return TXT_FONT_GLUE;
1705 YY_BREAK
1706 case 59:
1707 /* rule 59 can match eol */
1708 YY_RULE_SETUP
1709 #line 253 "lexer.l"
1710 ;
1711 YY_BREAK
1712 case 60:
1713 YY_RULE_SETUP
1714 #line 255 "lexer.l"
1715 yylval.u= yytext[1]-'0';return TXT_FONT;
1716 YY_BREAK
1717 case 61:
1718 YY_RULE_SETUP
1719 #line 257 "lexer.l"
1720 SCAN_REF(font_kind);return TXT_GLOBAL;
1721 YY_BREAK
1722 case 62:
1723 YY_RULE_SETUP
1724 #line 258 "lexer.l"
1725 SCAN_REF(penalty_kind);return TXT_GLOBAL;
1726 YY_BREAK
1727 case 63:
1728 YY_RULE_SETUP
1729 #line 259 "lexer.l"
1730 SCAN_REF(kern_kind);return TXT_GLOBAL;
1731 YY_BREAK
1732 case 64:
1733 YY_RULE_SETUP
1734 #line 260 "lexer.l"
1735 SCAN_REF(ligature_kind);return TXT_GLOBAL;
1736 YY_BREAK
1737 case 65:
1738 YY_RULE_SETUP
1739 #line 261 "lexer.l"
1740 SCAN_REF(disc_kind);return TXT_GLOBAL;
1741 YY_BREAK
1742 case 66:
1743 YY_RULE_SETUP
1744 #line 262 "lexer.l"
1745 SCAN_REF(glue_kind);return TXT_GLOBAL;
1746 YY_BREAK
1747 case 67:
1748 YY_RULE_SETUP
1749 #line 263 "lexer.l"
1750 SCAN_REF(language_kind);return TXT_GLOBAL;
1751 YY_BREAK
1752 case 68:
1753 YY_RULE_SETUP
1754 #line 264 "lexer.l"
1755 SCAN_REF(rule_kind);return TXT_GLOBAL;
1756 YY_BREAK
1757 case 69:
1758 YY_RULE_SETUP
1759 #line 265 "lexer.l"
1760 SCAN_REF(image_kind);return TXT_GLOBAL;
1761 YY_BREAK
1762 case 70:
1763 YY_RULE_SETUP
1764 #line 268 "lexer.l"
1765 SCAN_UDEC(yytext+2);return TXT_CC;
1766 YY_BREAK
1767 case 71:
1768 YY_RULE_SETUP
1769 #line 270 "lexer.l"
1770 yylval.u= yytext[1]-'a';return TXT_LOCAL;
1771 YY_BREAK
1772 case 72:
1773 YY_RULE_SETUP
1774 #line 271 "lexer.l"
1775 return TXT_FONT_GLUE;
1776 YY_BREAK
1777 case 73:
1778 YY_RULE_SETUP
1779 #line 272 "lexer.l"
1780 return TXT_FONT_HYPHEN;
1781 YY_BREAK
1782 case 74:
1783 /* rule 74 can match eol */
1784 YY_RULE_SETUP
1785 #line 274 "lexer.l"
1786 SCAN_UTF8_1(yytext);return TXT_CC;
1787 YY_BREAK
1788 case 75:
1789 YY_RULE_SETUP
1790 #line 275 "lexer.l"
1791 SCAN_UTF8_2(yytext);return TXT_CC;
1792 YY_BREAK
1793 case 76:
1794 YY_RULE_SETUP
1795 #line 276 "lexer.l"
1796 SCAN_UTF8_3(yytext);return TXT_CC;
1797 YY_BREAK
1798 case 77:
1799 YY_RULE_SETUP
1800 #line 277 "lexer.l"
1801 SCAN_UTF8_4(yytext);return TXT_CC;
1802 YY_BREAK
1803
1804 /*:152*/ /*162:*/
1805 case 78:
1806 YY_RULE_SETUP
1807 #line 280 "lexer.l"
1808 return HBOX;
1809 YY_BREAK
1810 case 79:
1811 YY_RULE_SETUP
1812 #line 281 "lexer.l"
1813 return VBOX;
1814 YY_BREAK
1815 case 80:
1816 YY_RULE_SETUP
1817 #line 282 "lexer.l"
1818 return SHIFTED;
1819 YY_BREAK
1820 /*:162*/ /*170:*/
1821 case 81:
1822 YY_RULE_SETUP
1823 #line 284 "lexer.l"
1824 return HPACK;
1825 YY_BREAK
1826 case 82:
1827 YY_RULE_SETUP
1828 #line 285 "lexer.l"
1829 return HSET;
1830 YY_BREAK
1831 case 83:
1832 YY_RULE_SETUP
1833 #line 286 "lexer.l"
1834 return VPACK;
1835 YY_BREAK
1836 case 84:
1837 YY_RULE_SETUP
1838 #line 287 "lexer.l"
1839 return VSET;
1840 YY_BREAK
1841 case 85:
1842 YY_RULE_SETUP
1843 #line 288 "lexer.l"
1844 return ADD;
1845 YY_BREAK
1846 case 86:
1847 YY_RULE_SETUP
1848 #line 289 "lexer.l"
1849 return TO;
1850 YY_BREAK
1851 case 87:
1852 YY_RULE_SETUP
1853 #line 290 "lexer.l"
1854 return DEPTH;
1855 YY_BREAK
1856 /*:170*/ /*175:*/
1857 case 88:
1858 YY_RULE_SETUP
1859 #line 292 "lexer.l"
1860 return LEADERS;
1861 YY_BREAK
1862 case 89:
1863 YY_RULE_SETUP
1864 #line 293 "lexer.l"
1865 return ALIGN;
1866 YY_BREAK
1867 case 90:
1868 YY_RULE_SETUP
1869 #line 294 "lexer.l"
1870 return CENTER;
1871 YY_BREAK
1872 case 91:
1873 YY_RULE_SETUP
1874 #line 295 "lexer.l"
1875 return EXPAND;
1876 YY_BREAK
1877 /*:175*/ /*182:*/
1878 case 92:
1879 YY_RULE_SETUP
1880 #line 297 "lexer.l"
1881 return BASELINE;
1882 YY_BREAK
1883 /*:182*/ /*189:*/
1884 case 93:
1885 YY_RULE_SETUP
1886 #line 299 "lexer.l"
1887 return LIGATURE;
1888 YY_BREAK
1889 /*:189*/ /*197:*/
1890 case 94:
1891 YY_RULE_SETUP
1892 #line 301 "lexer.l"
1893 return DISC;
1894 YY_BREAK
1895 /*:197*/ /*205:*/
1896 case 95:
1897 YY_RULE_SETUP
1898 #line 303 "lexer.l"
1899 return PAR;
1900 YY_BREAK
1901 /*:205*/ /*210:*/
1902 case 96:
1903 YY_RULE_SETUP
1904 #line 305 "lexer.l"
1905 return MATH;
1906 YY_BREAK
1907 /*:210*/ /*215:*/
1908 case 97:
1909 YY_RULE_SETUP
1910 #line 307 "lexer.l"
1911 return ON;
1912 YY_BREAK
1913 case 98:
1914 YY_RULE_SETUP
1915 #line 308 "lexer.l"
1916 return OFF;
1917 YY_BREAK
1918 /*:215*/ /*219:*/
1919 case 99:
1920 YY_RULE_SETUP
1921 #line 310 "lexer.l"
1922 return ADJUST;
1923 YY_BREAK
1924 /*:219*/ /*223:*/
1925 case 100:
1926 YY_RULE_SETUP
1927 #line 312 "lexer.l"
1928 return TABLE;
1929 YY_BREAK
1930 case 101:
1931 YY_RULE_SETUP
1932 #line 313 "lexer.l"
1933 return ITEM;
1934 YY_BREAK
1935 case 102:
1936 YY_RULE_SETUP
1937 #line 314 "lexer.l"
1938 return ITEM;
1939 YY_BREAK
1940 case 103:
1941 YY_RULE_SETUP
1942 #line 315 "lexer.l"
1943 return ITEM;
1944 YY_BREAK
1945 /*:223*/ /*230:*/
1946 case 104:
1947 YY_RULE_SETUP
1948 #line 317 "lexer.l"
1949 return IMAGE;
1950 YY_BREAK
1951 case 105:
1952 YY_RULE_SETUP
1953 #line 318 "lexer.l"
1954 return WIDTH;
1955 YY_BREAK
1956 case 106:
1957 YY_RULE_SETUP
1958 #line 319 "lexer.l"
1959 return HEIGHT;
1960 YY_BREAK
1961 /*:230*/ /*255:*/
1962 case 107:
1963 YY_RULE_SETUP
1964 #line 321 "lexer.l"
1965 return LABEL;
1966 YY_BREAK
1967 case 108:
1968 YY_RULE_SETUP
1969 #line 322 "lexer.l"
1970 return BOT;
1971 YY_BREAK
1972 case 109:
1973 YY_RULE_SETUP
1974 #line 323 "lexer.l"
1975 return MID;
1976 YY_BREAK
1977 /*:255*/ /*269:*/
1978 case 110:
1979 YY_RULE_SETUP
1980 #line 325 "lexer.l"
1981 return LINK;
1982 YY_BREAK
1983 /*:269*/ /*279:*/
1984 case 111:
1985 YY_RULE_SETUP
1986 #line 327 "lexer.l"
1987 return OUTLINE;
1988 YY_BREAK
1989 /*:279*/ /*288:*/
1990 case 112:
1991 YY_RULE_SETUP
1992 #line 329 "lexer.l"
1993 return COLOR;
1994 YY_BREAK
1995 /*:288*/ /*301:*/
1996 case 113:
1997 YY_RULE_SETUP
1998 #line 331 "lexer.l"
1999 return UNKNOWN;
2000 YY_BREAK
2001 /*:301*/ /*310:*/
2002 case 114:
2003 YY_RULE_SETUP
2004 #line 333 "lexer.l"
2005 if(section_no==1)return STREAMDEF;else return STREAM;
2006 YY_BREAK
2007 case 115:
2008 YY_RULE_SETUP
2009 #line 334 "lexer.l"
2010 return FIRST;
2011 YY_BREAK
2012 case 116:
2013 YY_RULE_SETUP
2014 #line 335 "lexer.l"
2015 return LAST;
2016 YY_BREAK
2017 case 117:
2018 YY_RULE_SETUP
2019 #line 336 "lexer.l"
2020 return TOP;
2021 YY_BREAK
2022 case 118:
2023 YY_RULE_SETUP
2024 #line 337 "lexer.l"
2025 return NOREFERENCE;
2026 YY_BREAK
2027 /*:310*/ /*320:*/
2028 case 119:
2029 YY_RULE_SETUP
2030 #line 339 "lexer.l"
2031 return PAGE;
2032 YY_BREAK
2033 /*:320*/ /*328:*/
2034 case 120:
2035 YY_RULE_SETUP
2036 #line 341 "lexer.l"
2037 return RANGE;
2038 YY_BREAK
2039 /*:328*/ /*355:*/
2040 case 121:
2041 YY_RULE_SETUP
2042 #line 343 "lexer.l"
2043 return DIRECTORY;
2044 YY_BREAK
2045 case 122:
2046 YY_RULE_SETUP
2047 #line 344 "lexer.l"
2048 return SECTION;
2049 YY_BREAK
2050 /*:355*/ /*378:*/
2051 case 123:
2052 YY_RULE_SETUP
2053 #line 346 "lexer.l"
2054 return DEFINITIONS;
2055 YY_BREAK
2056 /*:378*/ /*386:*/
2057 case 124:
2058 YY_RULE_SETUP
2059 #line 348 "lexer.l"
2060 return MAX;
2061 YY_BREAK
2062 /*:386*/ /*401:*/
2063 case 125:
2064 YY_RULE_SETUP
2065 #line 350 "lexer.l"
2066 return PARAM;
2067 YY_BREAK
2068 /*:401*/ /*410:*/
2069 case 126:
2070 YY_RULE_SETUP
2071 #line 352 "lexer.l"
2072 return FONT;
2073 YY_BREAK
2074 /*:410*/ /*443:*/
2075 case 127:
2076 YY_RULE_SETUP
2077 #line 354 "lexer.l"
2078 return CONTENT;
2079 YY_BREAK
2080 /*:443*/
2081 case 128:
2082 YY_RULE_SETUP
2083 #line 356 "lexer.l"
2084 QUIT("Unexpected keyword '%s' in line %d",yytext,yylineno);
2085 YY_BREAK
2086 case 129:
2087 YY_RULE_SETUP
2088 #line 357 "lexer.l"
2089 QUIT("Unexpected character '%c' (0x%02X) in line %d",yytext[0]>' '?yytext[0]:' ',yytext[0],yylineno);
2090 YY_BREAK
2091 case 130:
2092 YY_RULE_SETUP
2093 #line 359 "lexer.l"
2094 ECHO;
2095 YY_BREAK
2096 #line 2097 "lexer.c"
2097 case YY_STATE_EOF(INITIAL):
2098 case YY_STATE_EOF(STR):
2099 case YY_STATE_EOF(TXT):
2100 yyterminate();
2101
2102 case YY_END_OF_BUFFER:
2103 {
2104 /* Amount of text matched not including the EOB char. */
2105 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2106
2107 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2108 *yy_cp = (yy_hold_char);
2109 YY_RESTORE_YY_MORE_OFFSET
2110
2111 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2112 {
2113 /* We're scanning a new file or input source. It's
2114 * possible that this happened because the user
2115 * just pointed yyin at a new source and called
2116 * yylex(). If so, then we have to assure
2117 * consistency between YY_CURRENT_BUFFER and our
2118 * globals. Here is the right place to do so, because
2119 * this is the first action (other than possibly a
2120 * back-up) that will match for the new input source.
2121 */
2122 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2123 /* %if-c-only */
2124 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2125 /* %endif */
2126 /* %if-c++-only */
2127 /* %endif */
2128 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2129 }
2130
2131 /* Note that here we test for yy_c_buf_p "<=" to the position
2132 * of the first EOB in the buffer, since yy_c_buf_p will
2133 * already have been incremented past the NUL character
2134 * (since all states make transitions on EOB to the
2135 * end-of-buffer state). Contrast this with the test
2136 * in input().
2137 */
2138 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2139 { /* This was really a NUL. */
2140 yy_state_type yy_next_state;
2141
2142 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2143
2144 yy_current_state = yy_get_previous_state( );
2145
2146 /* Okay, we're now positioned to make the NUL
2147 * transition. We couldn't have
2148 * yy_get_previous_state() go ahead and do it
2149 * for us because it doesn't know how to deal
2150 * with the possibility of jamming (and we don't
2151 * want to build jamming into it because then it
2152 * will run more slowly).
2153 */
2154
2155 yy_next_state = yy_try_NUL_trans( yy_current_state );
2156
2157 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2158
2159 if ( yy_next_state )
2160 {
2161 /* Consume the NUL. */
2162 yy_cp = ++(yy_c_buf_p);
2163 yy_current_state = yy_next_state;
2164 goto yy_match;
2165 }
2166
2167 else
2168 {
2169 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
2170 yy_cp = (yy_last_accepting_cpos);
2171 yy_current_state = (yy_last_accepting_state);
2172 goto yy_find_action;
2173 }
2174 }
2175
2176 else switch ( yy_get_next_buffer( ) )
2177 {
2178 case EOB_ACT_END_OF_FILE:
2179 {
2180 (yy_did_buffer_switch_on_eof) = 0;
2181
2182 if ( yywrap( ) )
2183 {
2184 /* Note: because we've taken care in
2185 * yy_get_next_buffer() to have set up
2186 * yytext, we can now set up
2187 * yy_c_buf_p so that if some total
2188 * hoser (like flex itself) wants to
2189 * call the scanner after we return the
2190 * YY_NULL, it'll still work - another
2191 * YY_NULL will get returned.
2192 */
2193 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2194
2195 yy_act = YY_STATE_EOF(YY_START);
2196 goto do_action;
2197 }
2198
2199 else
2200 {
2201 if ( ! (yy_did_buffer_switch_on_eof) )
2202 YY_NEW_FILE;
2203 }
2204 break;
2205 }
2206
2207 case EOB_ACT_CONTINUE_SCAN:
2208 (yy_c_buf_p) =
2209 (yytext_ptr) + yy_amount_of_matched_text;
2210
2211 yy_current_state = yy_get_previous_state( );
2212
2213 yy_cp = (yy_c_buf_p);
2214 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2215 goto yy_match;
2216
2217 case EOB_ACT_LAST_MATCH:
2218 (yy_c_buf_p) =
2219 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2220
2221 yy_current_state = yy_get_previous_state( );
2222
2223 yy_cp = (yy_c_buf_p);
2224 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2225 goto yy_find_action;
2226 }
2227 break;
2228 }
2229
2230 default:
2231 YY_FATAL_ERROR(
2232 "fatal flex scanner internal error--no action found" );
2233 } /* end of action switch */
2234 } /* end of scanning one token */
2235 } /* end of user's declarations */
2236 } /* end of yylex */
2237 /* %ok-for-header */
2238
2239 /* %if-c++-only */
2240 /* %not-for-header */
2241 /* %ok-for-header */
2242
2243 /* %endif */
2244
2245 /* yy_get_next_buffer - try to read in a new buffer
2246 *
2247 * Returns a code representing an action:
2248 * EOB_ACT_LAST_MATCH -
2249 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2250 * EOB_ACT_END_OF_FILE - end of file
2251 */
2252 /* %if-c-only */
2253 static int yy_get_next_buffer (void)
2254 /* %endif */
2255 /* %if-c++-only */
2256 /* %endif */
2257 {
2258 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2259 char *source = (yytext_ptr);
2260 int number_to_move, i;
2261 int ret_val;
2262
2263 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2264 YY_FATAL_ERROR(
2265 "fatal flex scanner internal error--end of buffer missed" );
2266
2267 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2268 { /* Don't try to fill the buffer, so this is an EOF. */
2269 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2270 {
2271 /* We matched a single character, the EOB, so
2272 * treat this as a final EOF.
2273 */
2274 return EOB_ACT_END_OF_FILE;
2275 }
2276
2277 else
2278 {
2279 /* We matched some text prior to the EOB, first
2280 * process it.
2281 */
2282 return EOB_ACT_LAST_MATCH;
2283 }
2284 }
2285
2286 /* Try to read more data. */
2287
2288 /* First move last chars to start of buffer. */
2289 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2290
2291 for ( i = 0; i < number_to_move; ++i )
2292 *(dest++) = *(source++);
2293
2294 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2295 /* don't do the read, it's not guaranteed to return an EOF,
2296 * just force an EOF
2297 */
2298 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2299
2300 else
2301 {
2302 int num_to_read =
2303 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2304
2305 while ( num_to_read <= 0 )
2306 { /* Not enough room in the buffer - grow it. */
2307
2308 /* just a shorter name for the current buffer */
2309 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2310
2311 int yy_c_buf_p_offset =
2312 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2313
2314 if ( b->yy_is_our_buffer )
2315 {
2316 int new_size = b->yy_buf_size * 2;
2317
2318 if ( new_size <= 0 )
2319 b->yy_buf_size += b->yy_buf_size / 8;
2320 else
2321 b->yy_buf_size *= 2;
2322
2323 b->yy_ch_buf = (char *)
2324 /* Include room in for 2 EOB chars. */
2325 yyrealloc( (void *) b->yy_ch_buf,
2326 (yy_size_t) (b->yy_buf_size + 2) );
2327 }
2328 else
2329 /* Can't grow it, we don't own it. */
2330 b->yy_ch_buf = NULL;
2331
2332 if ( ! b->yy_ch_buf )
2333 YY_FATAL_ERROR(
2334 "fatal error - scanner input buffer overflow" );
2335
2336 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2337
2338 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2339 number_to_move - 1;
2340
2341 }
2342
2343 if ( num_to_read > YY_READ_BUF_SIZE )
2344 num_to_read = YY_READ_BUF_SIZE;
2345
2346 /* Read in more data. */
2347 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2348 (yy_n_chars), num_to_read );
2349
2350 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2351 }
2352
2353 if ( (yy_n_chars) == 0 )
2354 {
2355 if ( number_to_move == YY_MORE_ADJ )
2356 {
2357 ret_val = EOB_ACT_END_OF_FILE;
2358 yyrestart( yyin );
2359 }
2360
2361 else
2362 {
2363 ret_val = EOB_ACT_LAST_MATCH;
2364 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2365 YY_BUFFER_EOF_PENDING;
2366 }
2367 }
2368
2369 else
2370 ret_val = EOB_ACT_CONTINUE_SCAN;
2371
2372 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2373 /* Extend the array by 50%, plus the number we really need. */
2374 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2375 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2376 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2377 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2378 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2379 /* "- 2" to take care of EOB's */
2380 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2381 }
2382
2383 (yy_n_chars) += number_to_move;
2384 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2385 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2386
2387 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2388
2389 return ret_val;
2390 }
2391
2392 /* yy_get_previous_state - get the state just before the EOB char was reached */
2393
2394 /* %if-c-only */
2395 /* %not-for-header */
2396 static yy_state_type yy_get_previous_state (void)
2397 /* %endif */
2398 /* %if-c++-only */
2399 /* %endif */
2400 {
2401 yy_state_type yy_current_state;
2402 char *yy_cp;
2403
2404 /* %% [15.0] code to get the start state into yy_current_state goes here */
2405 yy_current_state = (yy_start);
2406
2407 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2408 {
2409 /* %% [16.0] code to find the next state goes here */
2410 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2411 if ( yy_accept[yy_current_state] )
2412 {
2413 (yy_last_accepting_state) = yy_current_state;
2414 (yy_last_accepting_cpos) = yy_cp;
2415 }
2416 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2417 {
2418 yy_current_state = (int) yy_def[yy_current_state];
2419 if ( yy_current_state >= 390 )
2420 yy_c = yy_meta[yy_c];
2421 }
2422 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2423 }
2424
2425 return yy_current_state;
2426 }
2427
2428 /* yy_try_NUL_trans - try to make a transition on the NUL character
2429 *
2430 * synopsis
2431 * next_state = yy_try_NUL_trans( current_state );
2432 */
2433 /* %if-c-only */
2434 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2435 /* %endif */
2436 /* %if-c++-only */
2437 /* %endif */
2438 {
2439 int yy_is_jam;
2440 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
2441 char *yy_cp = (yy_c_buf_p);
2442
2443 YY_CHAR yy_c = 1;
2444 if ( yy_accept[yy_current_state] )
2445 {
2446 (yy_last_accepting_state) = yy_current_state;
2447 (yy_last_accepting_cpos) = yy_cp;
2448 }
2449 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2450 {
2451 yy_current_state = (int) yy_def[yy_current_state];
2452 if ( yy_current_state >= 390 )
2453 yy_c = yy_meta[yy_c];
2454 }
2455 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2456 yy_is_jam = (yy_current_state == 389);
2457
2458 return yy_is_jam ? 0 : yy_current_state;
2459 }
2460
2461 #ifndef YY_NO_UNPUT
2462 /* %if-c-only */
2463
2464 /* %endif */
2465 #endif
2466
2467 /* %if-c-only */
2468 #ifndef YY_NO_INPUT
2469 #ifdef __cplusplus
2470 static int yyinput (void)
2471 #else
2472 static int input (void)
2473 #endif
2474
2475 /* %endif */
2476 /* %if-c++-only */
2477 /* %endif */
2478 {
2479 int c;
2480
2481 *(yy_c_buf_p) = (yy_hold_char);
2482
2483 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2484 {
2485 /* yy_c_buf_p now points to the character we want to return.
2486 * If this occurs *before* the EOB characters, then it's a
2487 * valid NUL; if not, then we've hit the end of the buffer.
2488 */
2489 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2490 /* This was really a NUL. */
2491 *(yy_c_buf_p) = '\0';
2492
2493 else
2494 { /* need more input */
2495 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2496 ++(yy_c_buf_p);
2497
2498 switch ( yy_get_next_buffer( ) )
2499 {
2500 case EOB_ACT_LAST_MATCH:
2501 /* This happens because yy_g_n_b()
2502 * sees that we've accumulated a
2503 * token and flags that we need to
2504 * try matching the token before
2505 * proceeding. But for input(),
2506 * there's no matching to consider.
2507 * So convert the EOB_ACT_LAST_MATCH
2508 * to EOB_ACT_END_OF_FILE.
2509 */
2510
2511 /* Reset buffer status. */
2512 yyrestart( yyin );
2513
2514 /*FALLTHROUGH*/
2515
2516 case EOB_ACT_END_OF_FILE:
2517 {
2518 if ( yywrap( ) )
2519 return 0;
2520
2521 if ( ! (yy_did_buffer_switch_on_eof) )
2522 YY_NEW_FILE;
2523 #ifdef __cplusplus
2524 return yyinput();
2525 #else
2526 return input();
2527 #endif
2528 }
2529
2530 case EOB_ACT_CONTINUE_SCAN:
2531 (yy_c_buf_p) = (yytext_ptr) + offset;
2532 break;
2533 }
2534 }
2535 }
2536
2537 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2538 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2539 (yy_hold_char) = *++(yy_c_buf_p);
2540
2541 /* %% [19.0] update BOL and yylineno */
2542 if ( c == '\n' )
2543
2544 yylineno++;
2545 ;
2546
2547 return c;
2548 }
2549 /* %if-c-only */
2550 #endif /* ifndef YY_NO_INPUT */
2551 /* %endif */
2552
2553 /** Immediately switch to a different input stream.
2554 * @param input_file A readable stream.
2555 *
2556 * @note This function does not reset the start condition to @c INITIAL .
2557 */
2558 /* %if-c-only */
2559 void yyrestart (FILE * input_file )
2560 /* %endif */
2561 /* %if-c++-only */
2562 /* %endif */
2563 {
2564
2565 if ( ! YY_CURRENT_BUFFER ){
2566 yyensure_buffer_stack ();
2567 YY_CURRENT_BUFFER_LVALUE =
2568 yy_create_buffer( yyin, YY_BUF_SIZE );
2569 }
2570
2571 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2572 yy_load_buffer_state( );
2573 }
2574
2575 /* %if-c++-only */
2576 /* %endif */
2577
2578 /** Switch to a different input buffer.
2579 * @param new_buffer The new input buffer.
2580 *
2581 */
2582 /* %if-c-only */
2583 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2584 /* %endif */
2585 /* %if-c++-only */
2586 /* %endif */
2587 {
2588
2589 /* TODO. We should be able to replace this entire function body
2590 * with
2591 * yypop_buffer_state();
2592 * yypush_buffer_state(new_buffer);
2593 */
2594 yyensure_buffer_stack ();
2595 if ( YY_CURRENT_BUFFER == new_buffer )
2596 return;
2597
2598 if ( YY_CURRENT_BUFFER )
2599 {
2600 /* Flush out information for old buffer. */
2601 *(yy_c_buf_p) = (yy_hold_char);
2602 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2603 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2604 }
2605
2606 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2607 yy_load_buffer_state( );
2608
2609 /* We don't actually know whether we did this switch during
2610 * EOF (yywrap()) processing, but the only time this flag
2611 * is looked at is after yywrap() is called, so it's safe
2612 * to go ahead and always set it.
2613 */
2614 (yy_did_buffer_switch_on_eof) = 1;
2615 }
2616
2617 /* %if-c-only */
2618 static void yy_load_buffer_state (void)
2619 /* %endif */
2620 /* %if-c++-only */
2621 /* %endif */
2622 {
2623 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2624 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2625 /* %if-c-only */
2626 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2627 /* %endif */
2628 /* %if-c++-only */
2629 /* %endif */
2630 (yy_hold_char) = *(yy_c_buf_p);
2631 }
2632
2633 /** Allocate and initialize an input buffer state.
2634 * @param file A readable stream.
2635 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2636 *
2637 * @return the allocated buffer state.
2638 */
2639 /* %if-c-only */
2640 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2641 /* %endif */
2642 /* %if-c++-only */
2643 /* %endif */
2644 {
2645 YY_BUFFER_STATE b;
2646
2647 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2648 if ( ! b )
2649 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2650
2651 b->yy_buf_size = size;
2652
2653 /* yy_ch_buf has to be 2 characters longer than the size given because
2654 * we need to put in 2 end-of-buffer characters.
2655 */
2656 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
2657 if ( ! b->yy_ch_buf )
2658 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2659
2660 b->yy_is_our_buffer = 1;
2661
2662 yy_init_buffer( b, file );
2663
2664 return b;
2665 }
2666
2667 /* %if-c++-only */
2668 /* %endif */
2669
2670 /** Destroy the buffer.
2671 * @param b a buffer created with yy_create_buffer()
2672 *
2673 */
2674 /* %if-c-only */
2675 void yy_delete_buffer (YY_BUFFER_STATE b )
2676 /* %endif */
2677 /* %if-c++-only */
2678 /* %endif */
2679 {
2680
2681 if ( ! b )
2682 return;
2683
2684 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2685 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2686
2687 if ( b->yy_is_our_buffer )
2688 yyfree( (void *) b->yy_ch_buf );
2689
2690 yyfree( (void *) b );
2691 }
2692
2693 /* Initializes or reinitializes a buffer.
2694 * This function is sometimes called more than once on the same buffer,
2695 * such as during a yyrestart() or at EOF.
2696 */
2697 /* %if-c-only */
2698 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2699 /* %endif */
2700 /* %if-c++-only */
2701 /* %endif */
2702
2703 {
2704 int oerrno = errno;
2705
2706 yy_flush_buffer( b );
2707
2708 /* %if-c-only */
2709 b->yy_input_file = file;
2710 /* %endif */
2711 /* %if-c++-only */
2712 /* %endif */
2713 b->yy_fill_buffer = 1;
2714
2715 /* If b is the current buffer, then yy_init_buffer was _probably_
2716 * called from yyrestart() or through yy_get_next_buffer.
2717 * In that case, we don't want to reset the lineno or column.
2718 */
2719 if (b != YY_CURRENT_BUFFER){
2720 b->yy_bs_lineno = 1;
2721 b->yy_bs_column = 0;
2722 }
2723
2724 /* %if-c-only */
2725
2726 b->yy_is_interactive = 0;
2727
2728 /* %endif */
2729 /* %if-c++-only */
2730 /* %endif */
2731 errno = oerrno;
2732 }
2733
2734 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2735 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2736 *
2737 */
2738 /* %if-c-only */
2739 void yy_flush_buffer (YY_BUFFER_STATE b )
2740 /* %endif */
2741 /* %if-c++-only */
2742 /* %endif */
2743 {
2744 if ( ! b )
2745 return;
2746
2747 b->yy_n_chars = 0;
2748
2749 /* We always need two end-of-buffer characters. The first causes
2750 * a transition to the end-of-buffer state. The second causes
2751 * a jam in that state.
2752 */
2753 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2754 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2755
2756 b->yy_buf_pos = &b->yy_ch_buf[0];
2757
2758 b->yy_at_bol = 1;
2759 b->yy_buffer_status = YY_BUFFER_NEW;
2760
2761 if ( b == YY_CURRENT_BUFFER )
2762 yy_load_buffer_state( );
2763 }
2764
2765 /* %if-c-or-c++ */
2766 /** Pushes the new state onto the stack. The new state becomes
2767 * the current state. This function will allocate the stack
2768 * if necessary.
2769 * @param new_buffer The new state.
2770 *
2771 */
2772 /* %if-c-only */
2773 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2774 /* %endif */
2775 /* %if-c++-only */
2776 /* %endif */
2777 {
2778 if (new_buffer == NULL)
2779 return;
2780
2781 yyensure_buffer_stack();
2782
2783 /* This block is copied from yy_switch_to_buffer. */
2784 if ( YY_CURRENT_BUFFER )
2785 {
2786 /* Flush out information for old buffer. */
2787 *(yy_c_buf_p) = (yy_hold_char);
2788 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2789 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2790 }
2791
2792 /* Only push if top exists. Otherwise, replace top. */
2793 if (YY_CURRENT_BUFFER)
2794 (yy_buffer_stack_top)++;
2795 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2796
2797 /* copied from yy_switch_to_buffer. */
2798 yy_load_buffer_state( );
2799 (yy_did_buffer_switch_on_eof) = 1;
2800 }
2801 /* %endif */
2802
2803 /* %if-c-or-c++ */
2804 /** Removes and deletes the top of the stack, if present.
2805 * The next element becomes the new top.
2806 *
2807 */
2808 /* %if-c-only */
2809 void yypop_buffer_state (void)
2810 /* %endif */
2811 /* %if-c++-only */
2812 /* %endif */
2813 {
2814 if (!YY_CURRENT_BUFFER)
2815 return;
2816
2817 yy_delete_buffer(YY_CURRENT_BUFFER );
2818 YY_CURRENT_BUFFER_LVALUE = NULL;
2819 if ((yy_buffer_stack_top) > 0)
2820 --(yy_buffer_stack_top);
2821
2822 if (YY_CURRENT_BUFFER) {
2823 yy_load_buffer_state( );
2824 (yy_did_buffer_switch_on_eof) = 1;
2825 }
2826 }
2827 /* %endif */
2828
2829 /* %if-c-or-c++ */
2830 /* Allocates the stack if it does not exist.
2831 * Guarantees space for at least one push.
2832 */
2833 /* %if-c-only */
2834 static void yyensure_buffer_stack (void)
2835 /* %endif */
2836 /* %if-c++-only */
2837 /* %endif */
2838 {
2839 yy_size_t num_to_alloc;
2840
2841 if (!(yy_buffer_stack)) {
2842
2843 /* First allocation is just for 2 elements, since we don't know if this
2844 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2845 * immediate realloc on the next call.
2846 */
2847 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2848 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2849 (num_to_alloc * sizeof(struct yy_buffer_state*)
2850 );
2851 if ( ! (yy_buffer_stack) )
2852 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2853
2854 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2855
2856 (yy_buffer_stack_max) = num_to_alloc;
2857 (yy_buffer_stack_top) = 0;
2858 return;
2859 }
2860
2861 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2862
2863 /* Increase the buffer to prepare for a possible push. */
2864 yy_size_t grow_size = 8 /* arbitrary grow size */;
2865
2866 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2867 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2868 ((yy_buffer_stack),
2869 num_to_alloc * sizeof(struct yy_buffer_state*)
2870 );
2871 if ( ! (yy_buffer_stack) )
2872 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2873
2874 /* zero only the new slots.*/
2875 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2876 (yy_buffer_stack_max) = num_to_alloc;
2877 }
2878 }
2879 /* %endif */
2880
2881 /* %if-c-only */
2882 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2883 * @param base the character buffer
2884 * @param size the size in bytes of the character buffer
2885 *
2886 * @return the newly allocated buffer state object.
2887 */
2888 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2889 {
2890 YY_BUFFER_STATE b;
2891
2892 if ( size < 2 ||
2893 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2894 base[size-1] != YY_END_OF_BUFFER_CHAR )
2895 /* They forgot to leave room for the EOB's. */
2896 return NULL;
2897
2898 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2899 if ( ! b )
2900 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2901
2902 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2903 b->yy_buf_pos = b->yy_ch_buf = base;
2904 b->yy_is_our_buffer = 0;
2905 b->yy_input_file = NULL;
2906 b->yy_n_chars = b->yy_buf_size;
2907 b->yy_is_interactive = 0;
2908 b->yy_at_bol = 1;
2909 b->yy_fill_buffer = 0;
2910 b->yy_buffer_status = YY_BUFFER_NEW;
2911
2912 yy_switch_to_buffer( b );
2913
2914 return b;
2915 }
2916 /* %endif */
2917
2918 /* %if-c-only */
2919 /** Setup the input buffer state to scan a string. The next call to yylex() will
2920 * scan from a @e copy of @a str.
2921 * @param yystr a NUL-terminated string to scan
2922 *
2923 * @return the newly allocated buffer state object.
2924 * @note If you want to scan bytes that may contain NUL values, then use
2925 * yy_scan_bytes() instead.
2926 */
2927 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2928 {
2929
2930 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2931 }
2932 /* %endif */
2933
2934 /* %if-c-only */
2935 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2936 * scan from a @e copy of @a bytes.
2937 * @param yybytes the byte buffer to scan
2938 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2939 *
2940 * @return the newly allocated buffer state object.
2941 */
2942 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2943 {
2944 YY_BUFFER_STATE b;
2945 char *buf;
2946 yy_size_t n;
2947 int i;
2948
2949 /* Get memory for full buffer, including space for trailing EOB's. */
2950 n = (yy_size_t) (_yybytes_len + 2);
2951 buf = (char *) yyalloc( n );
2952 if ( ! buf )
2953 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2954
2955 for ( i = 0; i < _yybytes_len; ++i )
2956 buf[i] = yybytes[i];
2957
2958 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2959
2960 b = yy_scan_buffer( buf, n );
2961 if ( ! b )
2962 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2963
2964 /* It's okay to grow etc. this buffer, and we should throw it
2965 * away when we're done.
2966 */
2967 b->yy_is_our_buffer = 1;
2968
2969 return b;
2970 }
2971 /* %endif */
2972
2973 /* %if-c-only */
2974 static void yy_push_state (int _new_state )
2975 /* %endif */
2976 /* %if-c++-only */
2977 /* %endif */
2978 {
2979 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2980 {
2981 yy_size_t new_size;
2982
2983 (yy_start_stack_depth) += YY_START_STACK_INCR;
2984 new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
2985
2986 if ( ! (yy_start_stack) )
2987 (yy_start_stack) = (int *) yyalloc( new_size );
2988
2989 else
2990 (yy_start_stack) = (int *) yyrealloc(
2991 (void *) (yy_start_stack), new_size );
2992
2993 if ( ! (yy_start_stack) )
2994 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2995 }
2996
2997 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2998
2999 BEGIN(_new_state);
3000 }
3001
3002 /* %if-c-only */
3003 static void yy_pop_state (void)
3004 /* %endif */
3005 /* %if-c++-only */
3006 /* %endif */
3007 {
3008 if ( --(yy_start_stack_ptr) < 0 )
3009 YY_FATAL_ERROR( "start-condition stack underflow" );
3010
3011 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
3012 }
3013
3014 #ifndef YY_EXIT_FAILURE
3015 #define YY_EXIT_FAILURE 2
3016 #endif
3017
3018 /* %if-c-only */
3019 static void yynoreturn yy_fatal_error (const char* msg )
3020 {
3021 fprintf( stderr, "%s\n", msg );
3022 exit( YY_EXIT_FAILURE );
3023 }
3024 /* %endif */
3025 /* %if-c++-only */
3026 /* %endif */
3027
3028 /* Redefine yyless() so it works in section 3 code. */
3029
3030 #undef yyless
3031 #define yyless(n) \
3032 do \
3033 { \
3034 /* Undo effects of setting up yytext. */ \
3035 int yyless_macro_arg = (n); \
3036 YY_LESS_LINENO(yyless_macro_arg);\
3037 yytext[yyleng] = (yy_hold_char); \
3038 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3039 (yy_hold_char) = *(yy_c_buf_p); \
3040 *(yy_c_buf_p) = '\0'; \
3041 yyleng = yyless_macro_arg; \
3042 } \
3043 while ( 0 )
3044
3045 /* Accessor methods (get/set functions) to struct members. */
3046
3047 /* %if-c-only */
3048 /* %if-reentrant */
3049 /* %endif */
3050
3051 /** Get the current line number.
3052 *
3053 */
3054 int yyget_lineno (void)
3055 {
3056
3057 return yylineno;
3058 }
3059
3060 /** Get the input stream.
3061 *
3062 */
3063 FILE *yyget_in (void)
3064 {
3065 return yyin;
3066 }
3067
3068 /** Get the output stream.
3069 *
3070 */
3071 FILE *yyget_out (void)
3072 {
3073 return yyout;
3074 }
3075
3076 /** Get the length of the current token.
3077 *
3078 */
3079 int yyget_leng (void)
3080 {
3081 return yyleng;
3082 }
3083
3084 /** Get the current token.
3085 *
3086 */
3087
3088 char *yyget_text (void)
3089 {
3090 return yytext;
3091 }
3092
3093 /* %if-reentrant */
3094 /* %endif */
3095
3096 /** Set the current line number.
3097 * @param _line_number line number
3098 *
3099 */
3100 void yyset_lineno (int _line_number )
3101 {
3102
3103 yylineno = _line_number;
3104 }
3105
3106 /** Set the input stream. This does not discard the current
3107 * input buffer.
3108 * @param _in_str A readable stream.
3109 *
3110 * @see yy_switch_to_buffer
3111 */
3112 void yyset_in (FILE * _in_str )
3113 {
3114 yyin = _in_str ;
3115 }
3116
3117 void yyset_out (FILE * _out_str )
3118 {
3119 yyout = _out_str ;
3120 }
3121
3122 int yyget_debug (void)
3123 {
3124 return yy_flex_debug;
3125 }
3126
3127 void yyset_debug (int _bdebug )
3128 {
3129 yy_flex_debug = _bdebug ;
3130 }
3131
3132 /* %endif */
3133
3134 /* %if-reentrant */
3135 /* %if-bison-bridge */
3136 /* %endif */
3137 /* %endif if-c-only */
3138
3139 /* %if-c-only */
3140 static int yy_init_globals (void)
3141 {
3142 /* Initialization is the same as for the non-reentrant scanner.
3143 * This function is called from yylex_destroy(), so don't allocate here.
3144 */
3145
3146 /* We do not touch yylineno unless the option is enabled. */
3147 yylineno = 1;
3148
3149 (yy_buffer_stack) = NULL;
3150 (yy_buffer_stack_top) = 0;
3151 (yy_buffer_stack_max) = 0;
3152 (yy_c_buf_p) = NULL;
3153 (yy_init) = 0;
3154 (yy_start) = 0;
3155
3156 (yy_start_stack_ptr) = 0;
3157 (yy_start_stack_depth) = 0;
3158 (yy_start_stack) = NULL;
3159
3160 /* Defined in main.c */
3161 #ifdef YY_STDINIT
3162 yyin = stdin;
3163 yyout = stdout;
3164 #else
3165 yyin = NULL;
3166 yyout = NULL;
3167 #endif
3168
3169 /* For future reference: Set errno on error, since we are called by
3170 * yylex_init()
3171 */
3172 return 0;
3173 }
3174 /* %endif */
3175
3176 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
3177 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3178 int yylex_destroy (void)
3179 {
3180
3181 /* Pop the buffer stack, destroying each element. */
3182 while(YY_CURRENT_BUFFER){
3183 yy_delete_buffer( YY_CURRENT_BUFFER );
3184 YY_CURRENT_BUFFER_LVALUE = NULL;
3185 yypop_buffer_state();
3186 }
3187
3188 /* Destroy the stack itself. */
3189 yyfree((yy_buffer_stack) );
3190 (yy_buffer_stack) = NULL;
3191
3192 /* Destroy the start condition stack. */
3193 yyfree( (yy_start_stack) );
3194 (yy_start_stack) = NULL;
3195
3196 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3197 * yylex() is called, initialization will occur. */
3198 yy_init_globals( );
3199
3200 /* %if-reentrant */
3201 /* %endif */
3202 return 0;
3203 }
3204 /* %endif */
3205
3206 /*
3207 * Internal utility routines.
3208 */
3209
3210 #ifndef yytext_ptr
3211 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3212 {
3213
3214 int i;
3215 for ( i = 0; i < n; ++i )
3216 s1[i] = s2[i];
3217 }
3218 #endif
3219
3220 #ifdef YY_NEED_STRLEN
3221 static int yy_flex_strlen (const char * s )
3222 {
3223 int n;
3224 for ( n = 0; s[n]; ++n )
3225 ;
3226
3227 return n;
3228 }
3229 #endif
3230
3231 void *yyalloc (yy_size_t size )
3232 {
3233 return malloc(size);
3234 }
3235
3236 void *yyrealloc (void * ptr, yy_size_t size )
3237 {
3238
3239 /* The cast to (char *) in the following accommodates both
3240 * implementations that use char* generic pointers, and those
3241 * that use void* generic pointers. It works with the latter
3242 * because both ANSI C and C++ allow castless assignment from
3243 * any pointer type to void*, and deal with argument conversions
3244 * as though doing an assignment.
3245 */
3246 return realloc(ptr, size);
3247 }
3248
3249 void yyfree (void * ptr )
3250 {
3251 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3252 }
3253
3254 /* %if-tables-serialization definitions */
3255 /* %define-yytables The name for this specific scanner's tables. */
3256 #define YYTABLES_NAME "yytables"
3257 /* %endif */
3258
3259 /* %ok-for-header */
3260
3261 #line 359 "lexer.l"
3262
3263 /*:555*/
3264