Logo AND Algorithmique Numérique Distribuée

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