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