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