Vcsn  2.5
Be Rational
scan.cc
Go to the documentation of this file.
1 // Added by flex++.
2 #pragma GCC diagnostic ignored "-Wsign-compare"
3 // Check Clang first, as it does not support -Wzero... but it
4 // defines __GNUC__.
5 #if defined __clang__
6 # pragma clang diagnostic ignored "-Wdeprecated"
7 # pragma clang diagnostic ignored "-Wnull-conversion"
8 #elif defined __GNUC__
9 # pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
10 # pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
11 # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
12 # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
13 #endif
14 
15 #line 2 "lib/vcsn/dot/scan.cc"
16 #line 7 "lib/vcsn/dot/scan.ll"
17 // Define YY_DECL.
18 #include <lib/vcsn/dot/parse.hh>
19 
20 #define yyterminate() return parser::make_END(loc)
21 
22 
23 
24 #line 11 "lib/vcsn/dot/scan.cc"
25 
26 #define YY_INT_ALIGNED short int
27 
28 /* A lexical scanner generated by flex */
29 
30 /* %not-for-header */
31 
32 /* %if-c-only */
33 /* %if-not-reentrant */
34 /* %endif */
35 /* %endif */
36 /* %ok-for-header */
37 
38 #define FLEX_SCANNER
39 #define YY_FLEX_MAJOR_VERSION 2
40 #define YY_FLEX_MINOR_VERSION 6
41 #define YY_FLEX_SUBMINOR_VERSION 0
42 #if YY_FLEX_SUBMINOR_VERSION > 0
43 #define FLEX_BETA
44 #endif
45 
46 /* %if-c++-only */
47  /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
48  * following macro. This is required in order to pass the c++-multiple-scanners
49  * test in the regression suite. We get reports that it breaks inheritance.
50  * We will address this in a future release of flex, or omit the C++ scanner
51  * altogether.
52  */
53  #define yyFlexLexer yyFlexLexer
54 /* %endif */
55 
56 /* %if-c-only */
57 /* %endif */
58 
59 /* %if-c-only */
60 /* %endif */
61 
62 /* First, we deal with platform-specific or compiler-specific issues. */
63 
64 /* begin standard C headers. */
65 /* %if-c-only */
66 /* %endif */
67 
68 /* %if-tables-serialization */
69 /* %endif */
70 /* end standard C headers. */
71 
72 /* %if-c-or-c++ */
73 /* flex integer type definitions */
74 
75 #ifndef FLEXINT_H
76 #define FLEXINT_H
77 
78 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
79 
80 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
81 
82 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
83  * if you want the limit (max/min) macros for int types.
84  */
85 #ifndef __STDC_LIMIT_MACROS
86 #define __STDC_LIMIT_MACROS 1
87 #endif
88 
89 #include <inttypes.h>
90 typedef int8_t flex_int8_t;
91 typedef uint8_t flex_uint8_t;
92 typedef int16_t flex_int16_t;
93 typedef uint16_t flex_uint16_t;
94 typedef int32_t flex_int32_t;
95 typedef uint32_t flex_uint32_t;
96 #else
97 typedef signed char flex_int8_t;
98 typedef short int flex_int16_t;
99 typedef int flex_int32_t;
100 typedef unsigned char flex_uint8_t;
101 typedef unsigned short int flex_uint16_t;
102 typedef unsigned int flex_uint32_t;
103 
104 /* Limits of integral types. */
105 #ifndef INT8_MIN
106 #define INT8_MIN (-128)
107 #endif
108 #ifndef INT16_MIN
109 #define INT16_MIN (-32767-1)
110 #endif
111 #ifndef INT32_MIN
112 #define INT32_MIN (-2147483647-1)
113 #endif
114 #ifndef INT8_MAX
115 #define INT8_MAX (127)
116 #endif
117 #ifndef INT16_MAX
118 #define INT16_MAX (32767)
119 #endif
120 #ifndef INT32_MAX
121 #define INT32_MAX (2147483647)
122 #endif
123 #ifndef UINT8_MAX
124 #define UINT8_MAX (255U)
125 #endif
126 #ifndef UINT16_MAX
127 #define UINT16_MAX (65535U)
128 #endif
129 #ifndef UINT32_MAX
130 #define UINT32_MAX (4294967295U)
131 #endif
132 
133 #endif /* ! C99 */
134 
135 #endif /* ! FLEXINT_H */
136 
137 /* %endif */
138 
139 /* %if-c++-only */
140 /* begin standard C++ headers. */
141 #include <iostream>
142 #include <errno.h>
143 #include <cstdlib>
144 #include <cstdio>
145 #include <cstring>
146 /* end standard C++ headers. */
147 /* %endif */
148 
149 #ifdef __cplusplus
150 
151 /* The "const" storage-class-modifier is valid. */
152 #define YY_USE_CONST
153 
154 #else /* ! __cplusplus */
155 
156 /* C99 requires __STDC__ to be defined as 1. */
157 #if defined (__STDC__)
158 
159 #define YY_USE_CONST
160 
161 #endif /* defined (__STDC__) */
162 #endif /* ! __cplusplus */
163 
164 #ifdef YY_USE_CONST
165 #define yyconst const
166 #else
167 #define yyconst
168 #endif
169 
170 /* %not-for-header */
171 
172 /* Returned upon end-of-file. */
173 #define YY_NULL 0
174 /* %ok-for-header */
175 
176 /* %not-for-header */
177 
178 /* Promotes a possibly negative, possibly signed char to an unsigned
179  * integer for use as an array index. If the signed char is negative,
180  * we want to instead treat it as an 8-bit unsigned char, hence the
181  * double cast.
182  */
183 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
184 /* %ok-for-header */
185 
186 /* %if-reentrant */
187 /* %endif */
188 
189 /* %if-not-reentrant */
190 
191 /* %endif */
192 
193 /* Enter a start condition. This macro really ought to take a parameter,
194  * but we do it the disgusting crufty way forced on us by the ()-less
195  * definition of BEGIN.
196  */
197 #define BEGIN (yy_start) = 1 + 2 *
198 
199 /* Translate the current start state into a value that can be later handed
200  * to BEGIN to return to the state. The YYSTATE alias is for lex
201  * compatibility.
202  */
203 #define YY_START (((yy_start) - 1) / 2)
204 #define YYSTATE YY_START
205 
206 /* Action number for EOF rule of a given start state. */
207 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
208 
209 /* Special action meaning "start processing a new file". */
210 #define YY_NEW_FILE yyrestart( yyin )
211 
212 #define YY_END_OF_BUFFER_CHAR 0
213 
214 /* Size of default input buffer. */
215 #ifndef YY_BUF_SIZE
216 #ifdef __ia64__
217 /* On IA-64, the buffer size is 16k, not 8k.
218  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
219  * Ditto for the __ia64__ case accordingly.
220  */
221 #define YY_BUF_SIZE 32768
222 #else
223 #define YY_BUF_SIZE 16384
224 #endif /* __ia64__ */
225 #endif
226 
227 /* The state buf must be large enough to hold one state per character in the main buffer.
228  */
229 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
230 
231 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
232 #define YY_TYPEDEF_YY_BUFFER_STATE
234 #endif
235 
236 #ifndef YY_TYPEDEF_YY_SIZE_T
237 #define YY_TYPEDEF_YY_SIZE_T
238 typedef size_t yy_size_t;
239 #endif
240 
241 /* %if-not-reentrant */
242 extern yy_size_t yyleng;
243 /* %endif */
244 
245 /* %if-c-only */
246 /* %if-not-reentrant */
247 /* %endif */
248 /* %endif */
249 
250 #define EOB_ACT_CONTINUE_SCAN 0
251 #define EOB_ACT_END_OF_FILE 1
252 #define EOB_ACT_LAST_MATCH 2
253 
254  #define YY_LESS_LINENO(n)
255  #define YY_LINENO_REWIND_TO(ptr)
256 
257 /* Return all but the first "n" matched characters back to the input stream. */
258 #define yyless(n) \
259  do \
260  { \
261  /* Undo effects of setting up yytext. */ \
262  int yyless_macro_arg = (n); \
263  YY_LESS_LINENO(yyless_macro_arg);\
264  *yy_cp = (yy_hold_char); \
265  YY_RESTORE_YY_MORE_OFFSET \
266  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
267  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
268  } \
269  while ( 0 )
270 
271 #define unput(c) yyunput( c, (yytext_ptr) )
272 
273 #ifndef YY_STRUCT_YY_BUFFER_STATE
274 #define YY_STRUCT_YY_BUFFER_STATE
276  {
277 /* %if-c-only */
278 /* %endif */
279 
280 /* %if-c++-only */
281  std::streambuf* yy_input_file;
282 /* %endif */
283 
284  char *yy_ch_buf; /* input buffer */
285  char *yy_buf_pos; /* current position in input buffer */
286 
287  /* Size of input buffer in bytes, not including room for EOB
288  * characters.
289  */
291 
292  /* Number of characters read into yy_ch_buf, not including EOB
293  * characters.
294  */
296 
297  /* Whether we "own" the buffer - i.e., we know we created it,
298  * and can realloc() it to grow it, and should free() it to
299  * delete it.
300  */
302 
303  /* Whether this is an "interactive" input source; if so, and
304  * if we're using stdio for input, then we want to use getc()
305  * instead of fread(), to make sure we stop fetching input after
306  * each newline.
307  */
309 
310  /* Whether we're considered to be at the beginning of a line.
311  * If so, '^' rules will be active on the next match, otherwise
312  * not.
313  */
315 
319  /* Whether to try to fill the input buffer when we reach the
320  * end of it.
321  */
323 
325 
326 #define YY_BUFFER_NEW 0
327 #define YY_BUFFER_NORMAL 1
328  /* When an EOF's been seen but there's still some text to process
329  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
330  * shouldn't try reading from the input source any more. We might
331  * still have a bunch of tokens to match, though, because of
332  * possible backing-up.
333  *
334  * When we actually see the EOF, we change the status to "new"
335  * (via yyrestart()), so that the user can continue scanning by
336  * just pointing yyin at a new input file.
337  */
338 #define YY_BUFFER_EOF_PENDING 2
339 
340  };
341 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
342 
343 /* %if-c-only Standard (non-C++) definition */
344 /* %not-for-header */
345 
346 /* %if-not-reentrant */
347 /* %endif */
348 /* %ok-for-header */
349 
350 /* %endif */
351 
352 /* We provide macros for accessing buffer states in case in the
353  * future we want to put the buffer states in a more general
354  * "scanner state".
355  *
356  * Returns the top of the stack, or NULL.
357  */
358 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
359  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
360  : NULL)
361 
362 /* Same as previous macro, but useful when we know that the buffer stack is not
363  * NULL or when we need an lvalue. For internal use only.
364  */
365 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
366 
367 /* %if-c-only Standard (non-C++) definition */
368 /* %if-not-reentrant */
369 /* %not-for-header */
370 
371 /* %ok-for-header */
372 
373 /* %endif */
374 /* %endif */
375 
376 // void *yyalloc (yy_size_t );
377 // void *yyrealloc (void *,yy_size_t );
378 // void yyfree (void * );
379 
380 #define yy_new_buffer yy_create_buffer
381 
382 #define yy_set_interactive(is_interactive) \
383  { \
384  if ( ! YY_CURRENT_BUFFER ){ \
385  yyensure_buffer_stack (); \
386  YY_CURRENT_BUFFER_LVALUE = \
387  yy_create_buffer( yyin, YY_BUF_SIZE ); \
388  } \
389  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
390  }
391 
392 #define yy_set_bol(at_bol) \
393  { \
394  if ( ! YY_CURRENT_BUFFER ){\
395  yyensure_buffer_stack (); \
396  YY_CURRENT_BUFFER_LVALUE = \
397  yy_create_buffer( yyin, YY_BUF_SIZE ); \
398  } \
399  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
400  }
401 
402 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
403 
404 /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
405 /* Begin user sect3 */
406 
407 #define FLEX_DEBUG
408 
409 typedef unsigned char YY_CHAR;
410 
411 #define yytext_ptr yytext
412 #define YY_INTERACTIVE
413 
414 #include <lib/vcsn/dot/scan.hh>
415 
416 /* %% [1.5] DFA */
417 
418 /* %if-c-only Standard (non-C++) definition */
419 /* %endif */
420 
421 /* Done after the current pattern has been matched and before the
422  * corresponding action - sets up yytext.
423  */
424 #define YY_DO_BEFORE_ACTION \
425  (yytext_ptr) = yy_bp; \
426 /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
427  yyleng = (size_t) (yy_cp - yy_bp); \
428  (yy_hold_char) = *yy_cp; \
429  *yy_cp = '\0'; \
430 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
431  (yy_c_buf_p) = yy_cp;
432 
433 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
434 #define YY_NUM_RULES 35
435 #define YY_END_OF_BUFFER 36
436 /* This struct is not used in this scanner,
437  but its presence is necessary. */
439  {
442  };
444  { 0,
445  0, 0, 23, 23, 0, 0, 0, 0, 36, 22,
446  20, 21, 17, 13, 22, 22, 22, 19, 12, 14,
447  18, 10, 19, 8, 9, 19, 19, 19, 19, 19,
448  6, 7, 23, 25, 24, 29, 30, 27, 35, 33,
449  34, 32, 31, 20, 21, 0, 19, 11, 19, 16,
450  15, 19, 19, 19, 19, 19, 19, 19, 23, 25,
451  24, 24, 26, 29, 30, 28, 33, 34, 15, 19,
452  19, 19, 19, 19, 19, 19, 2, 19, 4, 19,
453  19, 3, 19, 19, 19, 1, 19, 5, 0
454  } ;
455 
456 static yyconst YY_CHAR yy_ec[256] =
457  { 0,
458  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
459  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461  1, 2, 1, 4, 1, 1, 1, 1, 1, 1,
462  1, 5, 1, 6, 7, 8, 9, 10, 10, 10,
463  10, 10, 10, 10, 10, 10, 10, 11, 12, 13,
464  14, 15, 1, 1, 16, 16, 16, 16, 16, 16,
465  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
466  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
467  17, 18, 19, 1, 16, 1, 20, 21, 16, 22,
468 
469  23, 16, 24, 25, 26, 16, 16, 16, 16, 27,
470  28, 29, 16, 30, 31, 16, 32, 16, 16, 16,
471  16, 16, 33, 1, 34, 1, 1, 16, 16, 16,
472  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
473  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
474  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
475  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
476  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
477  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
478  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
479 
480  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
481  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
482  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
483  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
484  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
485  16, 16, 16, 16, 16
486  } ;
487 
488 static yyconst YY_CHAR yy_meta[35] =
489  { 0,
490  1, 1, 2, 3, 4, 1, 1, 1, 1, 5,
491  1, 1, 6, 1, 6, 5, 1, 3, 1, 5,
492  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
493  5, 5, 1, 1
494  } ;
495 
497  { 0,
498  0, 0, 32, 33, 36, 38, 40, 44, 150, 151,
499  147, 145, 151, 151, 36, 137, 40, 40, 151, 151,
500  151, 151, 0, 151, 151, 120, 123, 114, 115, 110,
501  151, 151, 0, 138, 53, 0, 137, 151, 0, 0,
502  136, 151, 151, 136, 134, 126, 53, 151, 125, 151,
503  0, 124, 0, 109, 108, 111, 108, 108, 0, 125,
504  55, 60, 151, 0, 124, 151, 0, 123, 0, 115,
505  94, 100, 89, 90, 83, 82, 0, 76, 0, 65,
506  62, 0, 69, 43, 38, 0, 41, 0, 151, 69,
507  75, 81, 47, 87, 93, 99, 105, 111, 116
508 
509  } ;
510 
512  { 0,
513  89, 1, 90, 90, 91, 91, 92, 92, 89, 89,
514  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
515  89, 89, 93, 89, 89, 93, 93, 93, 93, 93,
516  89, 89, 94, 89, 95, 96, 89, 89, 97, 98,
517  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
518  99, 89, 93, 93, 93, 93, 93, 93, 94, 89,
519  95, 95, 89, 96, 89, 89, 98, 89, 99, 89,
520  93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
521  93, 93, 93, 93, 93, 93, 93, 93, 0, 89,
522  89, 89, 89, 89, 89, 89, 89, 89, 89
523 
524  } ;
525 
527  { 0,
528  10, 11, 12, 13, 10, 14, 15, 16, 17, 18,
529  19, 20, 21, 22, 10, 23, 24, 10, 25, 23,
530  23, 26, 27, 28, 23, 23, 29, 23, 23, 23,
531  30, 23, 31, 32, 34, 34, 35, 35, 37, 38,
532  37, 38, 41, 46, 50, 47, 41, 52, 51, 47,
533  48, 53, 42, 39, 43, 39, 42, 62, 43, 89,
534  52, 63, 47, 89, 62, 88, 87, 86, 63, 33,
535  33, 33, 33, 33, 33, 36, 36, 36, 36, 36,
536  36, 40, 40, 40, 40, 40, 40, 59, 85, 59,
537  84, 59, 59, 61, 83, 61, 61, 61, 61, 64,
538 
539  82, 81, 64, 64, 64, 66, 80, 66, 66, 66,
540  66, 67, 79, 67, 67, 67, 69, 78, 69, 69,
541  69, 69, 77, 76, 70, 68, 65, 60, 75, 74,
542  73, 72, 71, 70, 49, 49, 45, 44, 68, 65,
543  60, 58, 57, 56, 55, 54, 49, 45, 44, 89,
544  9, 89, 89, 89, 89, 89, 89, 89, 89, 89,
545  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
546  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
547  89, 89, 89, 89, 89
548  } ;
549 
551  { 0,
552  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
553  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
554  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
555  1, 1, 1, 1, 3, 4, 3, 4, 5, 5,
556  6, 6, 7, 15, 17, 15, 8, 18, 17, 18,
557  15, 93, 7, 5, 7, 6, 8, 35, 8, 61,
558  47, 35, 47, 61, 62, 87, 85, 84, 62, 90,
559  90, 90, 90, 90, 90, 91, 91, 91, 91, 91,
560  91, 92, 92, 92, 92, 92, 92, 94, 83, 94,
561  81, 94, 94, 95, 80, 95, 95, 95, 95, 96,
562 
563  78, 76, 96, 96, 96, 97, 75, 97, 97, 97,
564  97, 98, 74, 98, 98, 98, 99, 73, 99, 99,
565  99, 99, 72, 71, 70, 68, 65, 60, 58, 57,
566  56, 55, 54, 52, 49, 46, 45, 44, 41, 37,
567  34, 30, 29, 28, 27, 26, 16, 12, 11, 9,
568  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
569  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
570  89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
571  89, 89, 89, 89, 89
572  } ;
573 
575  { 0,
576  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
577  62, 63, 64, 65, 67, 68, 69, 70, 71, 76,
578  77, 78, 82, 83, 84, 85, 89, 94, 95, 96,
579  106, 116, 117, 118
580  } ;
581 
582 /* The intent behind this definition is that it'll catch
583  * any uses of REJECT which flex missed.
584  */
585 #define REJECT reject_used_but_not_detected
586 #define yymore() yymore_used_but_not_detected
587 #define YY_MORE_ADJ 0
588 #define YY_RESTORE_YY_MORE_OFFSET
589 #line 1 "lib/vcsn/dot/scan.ll"
590 /* See <http://www.graphviz.org/content/dot-language>. */
591 #define YY_NO_INPUT 1
592 
593 #line 14 "lib/vcsn/dot/scan.ll"
594 #include <string>
595 #include <iostream>
596 
597 #define LINE(Line) \
598  do { \
599  loc.end.column = 1; \
600  loc.lines(Line); \
601  } while (false)
602 
603 #define YY_USER_ACTION \
604  loc.columns(yyleng);
605 
606 #define TOK(Token) \
607  parser::make_ ## Token (loc)
608 
610 
611 
612 #line 599 "lib/vcsn/dot/scan.cc"
613 
614 #define INITIAL 0
615 #define SC_COMMENT 1
616 #define SC_STRING 2
617 #define SC_XML 3
618 
619 #ifndef YY_NO_UNISTD_H
620 /* Special case for "unistd.h", since it is non-ANSI. We include it way
621  * down here because we want the user's section 1 to have been scanned first.
622  * The user has a chance to override it with an option.
623  */
624 /* %if-c-only */
625 /* %endif */
626 /* %if-c++-only */
627 #include <unistd.h>
628 /* %endif */
629 #endif
630 
631 #ifndef YY_EXTRA_TYPE
632 #define YY_EXTRA_TYPE void *
633 #endif
634 
635 /* %if-c-only Reentrant structure and macros (non-C++). */
636 /* %if-reentrant */
637 /* %if-c-only */
638 /* %endif */
639 /* %if-reentrant */
640 /* %endif */
641 /* %endif End reentrant structures and macros. */
642 /* %if-bison-bridge */
643 /* %endif */
644 /* %not-for-header */
645 
646 /* %ok-for-header */
647 
648 /* %endif */
649 
650 #ifndef yytext_ptr
651 static void yy_flex_strncpy (char *,yyconst char *,int );
652 #endif
653 
654 #ifdef YY_NEED_STRLEN
655 static int yy_flex_strlen (yyconst char * );
656 #endif
657 
658 #ifndef YY_NO_INPUT
659 /* %if-c-only Standard (non-C++) definition */
660 /* %not-for-header */
661 
662 /* %ok-for-header */
663 
664 /* %endif */
665 #endif
666 
667 /* %if-c-only */
668 /* %endif */
669 
670 /* Amount of stuff to slurp up with each read. */
671 #ifndef YY_READ_BUF_SIZE
672 #ifdef __ia64__
673 /* On IA-64, the buffer size is 16k, not 8k */
674 #define YY_READ_BUF_SIZE 16384
675 #else
676 #define YY_READ_BUF_SIZE 8192
677 #endif /* __ia64__ */
678 #endif
679 
680 /* Copy whatever the last rule matched to the standard output. */
681 #ifndef ECHO
682 /* %if-c-only Standard (non-C++) definition */
683 /* %endif */
684 /* %if-c++-only C++ definition */
685 #define ECHO LexerOutput( yytext, yyleng )
686 /* %endif */
687 #endif
688 
689 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
690  * is returned in "result".
691  */
692 #ifndef YY_INPUT
693 #define YY_INPUT(buf,result,max_size) \
694 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
695 \
696 /* %if-c++-only C++ definition \ */\
697  if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
698  YY_FATAL_ERROR( "input in flex scanner failed" );
699 /* %endif */
700 
701 #endif
702 
703 /* No semi-colon after return; correct usage is to write "yyterminate();" -
704  * we don't want an extra ';' after the "return" because that will cause
705  * some compilers to complain about unreachable statements.
706  */
707 #ifndef yyterminate
708 #define yyterminate() return YY_NULL
709 #endif
710 
711 /* Number of entries by which start-condition stack grows. */
712 #ifndef YY_START_STACK_INCR
713 #define YY_START_STACK_INCR 25
714 #endif
715 
716 /* Report a fatal error. */
717 #ifndef YY_FATAL_ERROR
718 /* %if-c-only */
719 /* %endif */
720 /* %if-c++-only */
721 #define YY_FATAL_ERROR(msg) LexerError( msg )
722 /* %endif */
723 #endif
724 
725 /* %if-tables-serialization structures and prototypes */
726 /* %not-for-header */
727 
728 /* %ok-for-header */
729 
730 /* %not-for-header */
731 
732 /* %tables-yydmap generated elements */
733 /* %endif */
734 /* end tables serialization structures and prototypes */
735 
736 /* %ok-for-header */
737 
738 /* Default declaration of generated scanner - a define so the user can
739  * easily add parameters.
740  */
741 #ifndef YY_DECL
742 #define YY_DECL_IS_OURS 1
743 /* %if-c-only Standard (non-C++) definition */
744 /* %endif */
745 /* %if-c++-only C++ definition */
746 #define YY_DECL int yyFlexLexer::yylex()
747 /* %endif */
748 #endif /* !YY_DECL */
749 
750 /* Code executed at the beginning of each rule, after yytext and yyleng
751  * have been set up.
752  */
753 #ifndef YY_USER_ACTION
754 #define YY_USER_ACTION
755 #endif
756 
757 /* Code executed at the end of each rule. */
758 #ifndef YY_BREAK
759 #define YY_BREAK /*LINTED*/break;
760 #endif
761 
762 /* %% [6.0] YY_RULE_SETUP definition goes here */
763 #define YY_RULE_SETUP \
764  YY_USER_ACTION
765 
766 /* %not-for-header */
767 
770 YY_DECL
771 {
772  yy_state_type yy_current_state;
773  char *yy_cp, *yy_bp;
774  int yy_act;
775 
776  if ( !(yy_init) )
777  {
778  (yy_init) = 1;
779 
780 #ifdef YY_USER_INIT
781  YY_USER_INIT;
782 #endif
783 
784  if ( ! (yy_start) )
785  (yy_start) = 1; /* first start state */
786 
787  if ( ! yyin )
788 /* %if-c-only */
789 /* %endif */
790 /* %if-c++-only */
791  yyin.rdbuf(std::cin.rdbuf());
792 /* %endif */
793 
794  if ( ! yyout )
795 /* %if-c-only */
796 /* %endif */
797 /* %if-c++-only */
798  yyout.rdbuf(std::cout.rdbuf());
799 /* %endif */
800 
801  if ( ! YY_CURRENT_BUFFER ) {
802  yyensure_buffer_stack ();
804  yy_create_buffer( yyin, YY_BUF_SIZE );
805  }
806 
807  yy_load_buffer_state( );
808  }
809 
810  {
811 /* %% [7.0] user's declarations go here */
812 #line 41 "lib/vcsn/dot/scan.ll"
813 
814 
815  // Growing string, for SC_STRING/SC_XML.
816  auto s = std::string{};
817  // Level of nesting of "<"/">" for SC_XML.
818  int nesting = 0;
819  loc.step();
820 
821 
822 #line 809 "lib/vcsn/dot/scan.cc"
823 
824  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
825  {
826 /* %% [8.0] yymore()-related code goes here */
827  yy_cp = (yy_c_buf_p);
828 
829  /* Support of yytext. */
830  *yy_cp = (yy_hold_char);
831 
832  /* yy_bp points to the position in yy_ch_buf of the start of
833  * the current run.
834  */
835  yy_bp = yy_cp;
836 
837 /* %% [9.0] code to set up and find next match goes here */
838  yy_current_state = (yy_start);
839 yy_match:
840  do
841  {
842  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
843  if ( yy_accept[yy_current_state] )
844  {
845  (yy_last_accepting_state) = yy_current_state;
846  (yy_last_accepting_cpos) = yy_cp;
847  }
848  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
849  {
850  yy_current_state = (int) yy_def[yy_current_state];
851  if ( yy_current_state >= 90 )
852  yy_c = yy_meta[(unsigned int) yy_c];
853  }
854  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
855  ++yy_cp;
856  }
857  while ( yy_base[yy_current_state] != 151 );
858 
859 yy_find_action:
860 /* %% [10.0] code to find the action number goes here */
861  yy_act = yy_accept[yy_current_state];
862  if ( yy_act == 0 )
863  { /* have to back up */
864  yy_cp = (yy_last_accepting_cpos);
865  yy_current_state = (yy_last_accepting_state);
866  yy_act = yy_accept[yy_current_state];
867  }
868 
870 
871 /* %% [11.0] code for yylineno update goes here */
872 
873 do_action: /* This label is used only to access EOF actions. */
874 
875 /* %% [12.0] debug code goes here */
876  if ( yy_flex_debug )
877  {
878  if ( yy_act == 0 )
879  std::cerr << "--scanner backing up\n";
880  else if ( yy_act < 35 )
881  std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] <<
882  "(\"" << yytext << "\")\n";
883  else if ( yy_act == 35 )
884  std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
885  else if ( yy_act == 36 )
886  std::cerr << "--(end of buffer or a NUL)\n";
887  else
888  std::cerr << "--EOF (start condition " << YY_START << ")\n";
889  }
890 
891  switch ( yy_act )
892  { /* beginning of action switch */
893 /* %% [13.0] actions go here */
894  case 0: /* must back up */
895  /* undo the effects of YY_DO_BEFORE_ACTION */
896  *yy_cp = (yy_hold_char);
897  yy_cp = (yy_last_accepting_cpos);
898  yy_current_state = (yy_last_accepting_state);
899  goto yy_find_action;
900 
901 /* Vcsn Syntax */
902 case 1:
904 #line 52 "lib/vcsn/dot/scan.ll"
905 return TOK(DIGRAPH);
906  YY_BREAK
907 case 2:
909 #line 53 "lib/vcsn/dot/scan.ll"
910 return TOK(EDGE);
911  YY_BREAK
912 case 3:
914 #line 54 "lib/vcsn/dot/scan.ll"
915 return TOK(GRAPH);
916  YY_BREAK
917 case 4:
919 #line 55 "lib/vcsn/dot/scan.ll"
920 return TOK(NODE);
921  YY_BREAK
922 case 5:
924 #line 56 "lib/vcsn/dot/scan.ll"
925 return TOK(SUBGRAPH);
926  YY_BREAK
927 case 6:
929 #line 57 "lib/vcsn/dot/scan.ll"
930 return TOK(LBRACE);
931  YY_BREAK
932 case 7:
934 #line 58 "lib/vcsn/dot/scan.ll"
935 return TOK(RBRACE);
936  YY_BREAK
937 case 8:
939 #line 59 "lib/vcsn/dot/scan.ll"
940 return TOK(LBRACKET);
941  YY_BREAK
942 case 9:
944 #line 60 "lib/vcsn/dot/scan.ll"
945 return TOK(RBRACKET);
946  YY_BREAK
947 case 10:
949 #line 61 "lib/vcsn/dot/scan.ll"
950 return TOK(EQ);
951  YY_BREAK
952 case 11:
954 #line 62 "lib/vcsn/dot/scan.ll"
955 return TOK(ARROW);
956  YY_BREAK
957 case 12:
959 #line 63 "lib/vcsn/dot/scan.ll"
960 return TOK(COLON);
961  YY_BREAK
962 case 13:
964 #line 64 "lib/vcsn/dot/scan.ll"
965 return TOK(COMMA);
966  YY_BREAK
967 case 14:
969 #line 65 "lib/vcsn/dot/scan.ll"
970 return TOK(SEMI);
971  YY_BREAK
972 case 15:
974 #line 67 "lib/vcsn/dot/scan.ll"
975 loc.step(); continue;
976  YY_BREAK
977 case 16:
979 #line 68 "lib/vcsn/dot/scan.ll"
981  YY_BREAK
982 case 17:
984 #line 69 "lib/vcsn/dot/scan.ll"
986  YY_BREAK
987 case 18:
989 #line 70 "lib/vcsn/dot/scan.ll"
990 ++nesting; BEGIN(SC_XML);
991  YY_BREAK
992 case 19:
994 #line 71 "lib/vcsn/dot/scan.ll"
995 {
996  return parser::make_ID
997  (string_t{std::string{yytext, size_t(yyleng)}},
998  loc);
999  }
1000  YY_BREAK
1001 case 20:
1003 #line 76 "lib/vcsn/dot/scan.ll"
1004 loc.step(); continue;
1005  YY_BREAK
1006 case 21:
1007 /* rule 21 can match eol */
1009 #line 77 "lib/vcsn/dot/scan.ll"
1010 LINE(yyleng); loc.step(); continue;
1011  YY_BREAK
1012 case 22:
1014 #line 78 "lib/vcsn/dot/scan.ll"
1015 driver_.error(loc, std::string{"invalid character: "}+yytext);
1016  YY_BREAK
1017 
1018 
1019 case 23:
1021 #line 82 "lib/vcsn/dot/scan.ll"
1022 loc.step(); continue;
1023  YY_BREAK
1024 case 24:
1026 #line 83 "lib/vcsn/dot/scan.ll"
1027 loc.step(); continue;
1028  YY_BREAK
1029 case 25:
1030 /* rule 25 can match eol */
1032 #line 84 "lib/vcsn/dot/scan.ll"
1033 LINE(yyleng); loc.step(); continue;
1034  YY_BREAK
1035 case 26:
1037 #line 85 "lib/vcsn/dot/scan.ll"
1038 BEGIN(INITIAL);
1039  YY_BREAK
1040 
1041 /* Handling of the strings. Initial " is eaten. */
1042 case 27:
1044 #line 89 "lib/vcsn/dot/scan.ll"
1045 {
1046  BEGIN(INITIAL);
1047  return parser::make_ID(string_t{s}, loc);
1048  }
1049  YY_BREAK
1050 case 28:
1052 #line 94 "lib/vcsn/dot/scan.ll"
1053 s.push_back(yytext[1]);
1054  YY_BREAK
1055 case 29:
1057 #line 95 "lib/vcsn/dot/scan.ll"
1058 s.append(yytext, yyleng);
1059  YY_BREAK
1060 case 30:
1061 /* rule 30 can match eol */
1063 #line 96 "lib/vcsn/dot/scan.ll"
1064 LINE(yyleng); s.append(yytext, yyleng);
1065  YY_BREAK
1066 case YY_STATE_EOF(SC_STRING):
1067 #line 98 "lib/vcsn/dot/scan.ll"
1068 {
1069  driver_.error(loc, "unexpected end of file in a string");
1070  BEGIN(INITIAL);
1071  return parser::make_ID(string_t{s}, loc);
1072  }
1073  YY_BREAK
1074 
1075 /* Handling of the XML/HTML strings. Initial < is eaten. */
1076 case 31:
1078 #line 106 "lib/vcsn/dot/scan.ll"
1079 {
1080  if (--nesting == 0)
1081  {
1082  BEGIN(INITIAL);
1083  return parser::make_ID(string_t{s}, loc);
1084  }
1085  else
1086  s.push_back('>');
1087  }
1088  YY_BREAK
1089 case 32:
1091 #line 116 "lib/vcsn/dot/scan.ll"
1092 ++nesting; s.push_back('<');
1093  YY_BREAK
1094 case 33:
1096 #line 117 "lib/vcsn/dot/scan.ll"
1097 s.append(yytext, yyleng);
1098  YY_BREAK
1099 case 34:
1100 /* rule 34 can match eol */
1102 #line 118 "lib/vcsn/dot/scan.ll"
1103 LINE(yyleng); s.append(yytext, yyleng);
1104  YY_BREAK
1105 case YY_STATE_EOF(SC_XML):
1106 #line 120 "lib/vcsn/dot/scan.ll"
1107 {
1108  driver_.error(loc, "unexpected end of file in a XML string");
1109  BEGIN(INITIAL);
1110  return parser::make_ID(string_t{s}, loc);
1111  }
1112  YY_BREAK
1113 
1114 case 35:
1116 #line 127 "lib/vcsn/dot/scan.ll"
1117 ECHO;
1118  YY_BREAK
1119 #line 1106 "lib/vcsn/dot/scan.cc"
1120 case YY_STATE_EOF(INITIAL):
1121 case YY_STATE_EOF(SC_COMMENT):
1122  yyterminate();
1123 
1124  case YY_END_OF_BUFFER:
1125  {
1126  /* Amount of text matched not including the EOB char. */
1127  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1128 
1129  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1130  *yy_cp = (yy_hold_char);
1132 
1133  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1134  {
1135  /* We're scanning a new file or input source. It's
1136  * possible that this happened because the user
1137  * just pointed yyin at a new source and called
1138  * yylex(). If so, then we have to assure
1139  * consistency between YY_CURRENT_BUFFER and our
1140  * globals. Here is the right place to do so, because
1141  * this is the first action (other than possibly a
1142  * back-up) that will match for the new input source.
1143  */
1144  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1145 /* %if-c-only */
1146 /* %endif */
1147 /* %if-c++-only */
1148  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
1149 /* %endif */
1150  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1151  }
1152 
1153  /* Note that here we test for yy_c_buf_p "<=" to the position
1154  * of the first EOB in the buffer, since yy_c_buf_p will
1155  * already have been incremented past the NUL character
1156  * (since all states make transitions on EOB to the
1157  * end-of-buffer state). Contrast this with the test
1158  * in input().
1159  */
1160  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1161  { /* This was really a NUL. */
1162  yy_state_type yy_next_state;
1163 
1164  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1165 
1166  yy_current_state = yy_get_previous_state( );
1167 
1168  /* Okay, we're now positioned to make the NUL
1169  * transition. We couldn't have
1170  * yy_get_previous_state() go ahead and do it
1171  * for us because it doesn't know how to deal
1172  * with the possibility of jamming (and we don't
1173  * want to build jamming into it because then it
1174  * will run more slowly).
1175  */
1176 
1177  yy_next_state = yy_try_NUL_trans( yy_current_state );
1178 
1179  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1180 
1181  if ( yy_next_state )
1182  {
1183  /* Consume the NUL. */
1184  yy_cp = ++(yy_c_buf_p);
1185  yy_current_state = yy_next_state;
1186  goto yy_match;
1187  }
1188 
1189  else
1190  {
1191 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1192  yy_cp = (yy_c_buf_p);
1193  goto yy_find_action;
1194  }
1195  }
1196 
1197  else switch ( yy_get_next_buffer( ) )
1198  {
1199  case EOB_ACT_END_OF_FILE:
1200  {
1201  (yy_did_buffer_switch_on_eof) = 0;
1202 
1203  if ( yywrap( ) )
1204  {
1205  /* Note: because we've taken care in
1206  * yy_get_next_buffer() to have set up
1207  * yytext, we can now set up
1208  * yy_c_buf_p so that if some total
1209  * hoser (like flex itself) wants to
1210  * call the scanner after we return the
1211  * YY_NULL, it'll still work - another
1212  * YY_NULL will get returned.
1213  */
1214  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1215 
1216  yy_act = YY_STATE_EOF(YY_START);
1217  goto do_action;
1218  }
1219 
1220  else
1221  {
1222  if ( ! (yy_did_buffer_switch_on_eof) )
1223  YY_NEW_FILE;
1224  }
1225  break;
1226  }
1227 
1228  case EOB_ACT_CONTINUE_SCAN:
1229  (yy_c_buf_p) =
1230  (yytext_ptr) + yy_amount_of_matched_text;
1231 
1232  yy_current_state = yy_get_previous_state( );
1233 
1234  yy_cp = (yy_c_buf_p);
1235  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1236  goto yy_match;
1237 
1238  case EOB_ACT_LAST_MATCH:
1239  (yy_c_buf_p) =
1240  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1241 
1242  yy_current_state = yy_get_previous_state( );
1243 
1244  yy_cp = (yy_c_buf_p);
1245  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1246  goto yy_find_action;
1247  }
1248  break;
1249  }
1250 
1251  default:
1253  "fatal flex scanner internal error--no action found" );
1254  } /* end of action switch */
1255  } /* end of scanning one token */
1256  } /* end of user's declarations */
1257 } /* end of yylex */
1258 /* %ok-for-header */
1259 
1260 /* %if-c++-only */
1261 /* %not-for-header */
1262 
1263 /* The contents of this function are C++ specific, so the () macro is not used.
1264  * This constructor simply maintains backward compatibility.
1265  * DEPRECATED
1266  */
1267 yyFlexLexer::yyFlexLexer( FLEX_STD istream* arg_yyin, FLEX_STD ostream* arg_yyout ):
1268  yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),
1269  yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())
1270 {
1271  ctor_common();
1272 }
1273 
1274 /* The contents of this function are C++ specific, so the () macro is not used.
1275  */
1276 yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):
1277  yyin(arg_yyin.rdbuf()),
1278  yyout(arg_yyout.rdbuf())
1279 {
1280  ctor_common();
1281 }
1282 
1283 /* The contents of this function are C++ specific, so the () macro is not used.
1284  */
1286 {
1287  yy_c_buf_p = 0;
1288  yy_init = 0;
1289  yy_start = 0;
1290  yy_flex_debug = 0;
1291  yylineno = 1; // this will only get updated if %option yylineno
1292 
1294 
1296  yy_more_flag = 0;
1297  yy_more_len = 0;
1299 
1301  yy_start_stack = NULL;
1302 
1303  yy_buffer_stack = 0;
1304  yy_buffer_stack_top = 0;
1305  yy_buffer_stack_max = 0;
1306 
1307  yy_state_buf = 0;
1308 
1309 }
1310 
1311 /* The contents of this function are C++ specific, so the () macro is not used.
1312  */
1314 {
1315  delete [] yy_state_buf;
1319 }
1320 
1321 /* The contents of this function are C++ specific, so the () macro is not used.
1322  */
1323 void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
1324 {
1325  // was if( new_in )
1328 
1329  // was if( new_out )
1330  yyout.rdbuf(new_out.rdbuf());
1331 }
1332 
1333 /* The contents of this function are C++ specific, so the () macro is not used.
1334  */
1335 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1336 {
1337  if( ! new_in ) {
1338  new_in = &yyin;
1339  }
1340 
1341  if ( ! new_out ) {
1342  new_out = &yyout;
1343  }
1344 
1345  switch_streams(*new_in, *new_out);
1346 }
1347 
1348 #ifdef YY_INTERACTIVE
1349 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1350 #else
1351 int yyFlexLexer::LexerInput( char* buf, int max_size )
1352 #endif
1353 {
1354  if ( yyin.eof() || yyin.fail() )
1355  return 0;
1356 
1357 #ifdef YY_INTERACTIVE
1358  yyin.get( buf[0] );
1359 
1360  if ( yyin.eof() )
1361  return 0;
1362 
1363  if ( yyin.bad() )
1364  return -1;
1365 
1366  return 1;
1367 
1368 #else
1369  (void) yyin.read( buf, max_size );
1370 
1371  if ( yyin.bad() )
1372  return -1;
1373  else
1374  return yyin.gcount();
1375 #endif
1376 }
1377 
1378 void yyFlexLexer::LexerOutput( const char* buf, int size )
1379 {
1380  (void) yyout.write( buf, size );
1381 }
1382 /* %ok-for-header */
1383 
1384 /* %endif */
1385 
1386 /* yy_get_next_buffer - try to read in a new buffer
1387  *
1388  * Returns a code representing an action:
1389  * EOB_ACT_LAST_MATCH -
1390  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1391  * EOB_ACT_END_OF_FILE - end of file
1392  */
1393 /* %if-c-only */
1394 /* %endif */
1395 /* %if-c++-only */
1397 /* %endif */
1398 {
1399  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1400  char *source = (yytext_ptr);
1401  yy_size_t number_to_move, i;
1402  int ret_val;
1403 
1404  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1406  "fatal flex scanner internal error--end of buffer missed" );
1407 
1408  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1409  { /* Don't try to fill the buffer, so this is an EOF. */
1410  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1411  {
1412  /* We matched a single character, the EOB, so
1413  * treat this as a final EOF.
1414  */
1415  return EOB_ACT_END_OF_FILE;
1416  }
1417 
1418  else
1419  {
1420  /* We matched some text prior to the EOB, first
1421  * process it.
1422  */
1423  return EOB_ACT_LAST_MATCH;
1424  }
1425  }
1426 
1427  /* Try to read more data. */
1428 
1429  /* First move last chars to start of buffer. */
1430  number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1431 
1432  for ( i = 0; i < number_to_move; ++i )
1433  *(dest++) = *(source++);
1434 
1435  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1436  /* don't do the read, it's not guaranteed to return an EOF,
1437  * just force an EOF
1438  */
1439  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1440 
1441  else
1442  {
1443  yy_size_t num_to_read =
1444  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1445 
1446  while ( num_to_read <= 0 )
1447  { /* Not enough room in the buffer - grow it. */
1448 
1449  /* just a shorter name for the current buffer */
1450  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1451 
1452  int yy_c_buf_p_offset =
1453  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1454 
1455  if ( b->yy_is_our_buffer )
1456  {
1457  yy_size_t new_size = b->yy_buf_size * 2;
1458 
1459  if ( new_size <= 0 )
1460  b->yy_buf_size += b->yy_buf_size / 8;
1461  else
1462  b->yy_buf_size *= 2;
1463 
1464  b->yy_ch_buf = (char *)
1465  /* Include room in for 2 EOB chars. */
1466  yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1467  }
1468  else
1469  /* Can't grow it, we don't own it. */
1470  b->yy_ch_buf = 0;
1471 
1472  if ( ! b->yy_ch_buf )
1474  "fatal error - scanner input buffer overflow" );
1475 
1476  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1477 
1478  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1479  number_to_move - 1;
1480 
1481  }
1482 
1483  if ( num_to_read > YY_READ_BUF_SIZE )
1484  num_to_read = YY_READ_BUF_SIZE;
1485 
1486  /* Read in more data. */
1487  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1488  (yy_n_chars), num_to_read );
1489 
1490  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1491  }
1492 
1493  if ( (yy_n_chars) == 0 )
1494  {
1495  if ( number_to_move == YY_MORE_ADJ )
1496  {
1497  ret_val = EOB_ACT_END_OF_FILE;
1498  yyrestart( yyin );
1499  }
1500 
1501  else
1502  {
1503  ret_val = EOB_ACT_LAST_MATCH;
1504  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1506  }
1507  }
1508 
1509  else
1510  ret_val = EOB_ACT_CONTINUE_SCAN;
1511 
1512  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1513  /* Extend the array by 50%, plus the number we really need. */
1514  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1515  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1516  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1517  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1518  }
1519 
1520  (yy_n_chars) += number_to_move;
1523 
1524  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1525 
1526  return ret_val;
1527 }
1528 
1529 /* yy_get_previous_state - get the state just before the EOB char was reached */
1530 
1531 /* %if-c-only */
1532 /* %not-for-header */
1533 
1534 /* %endif */
1535 /* %if-c++-only */
1537 /* %endif */
1538 {
1539  yy_state_type yy_current_state;
1540  char *yy_cp;
1541 
1542 /* %% [15.0] code to get the start state into yy_current_state goes here */
1543  yy_current_state = (yy_start);
1544 
1545  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1546  {
1547 /* %% [16.0] code to find the next state goes here */
1548  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1549  if ( yy_accept[yy_current_state] )
1550  {
1551  (yy_last_accepting_state) = yy_current_state;
1552  (yy_last_accepting_cpos) = yy_cp;
1553  }
1554  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1555  {
1556  yy_current_state = (int) yy_def[yy_current_state];
1557  if ( yy_current_state >= 90 )
1558  yy_c = yy_meta[(unsigned int) yy_c];
1559  }
1560  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1561  }
1562 
1563  return yy_current_state;
1564 }
1565 
1566 /* yy_try_NUL_trans - try to make a transition on the NUL character
1567  *
1568  * synopsis
1569  * next_state = yy_try_NUL_trans( current_state );
1570  */
1571 /* %if-c-only */
1572 /* %endif */
1573 /* %if-c++-only */
1575 /* %endif */
1576 {
1577  int yy_is_jam;
1578  /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1579  char *yy_cp = (yy_c_buf_p);
1580 
1581  YY_CHAR yy_c = 1;
1582  if ( yy_accept[yy_current_state] )
1583  {
1584  (yy_last_accepting_state) = yy_current_state;
1585  (yy_last_accepting_cpos) = yy_cp;
1586  }
1587  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1588  {
1589  yy_current_state = (int) yy_def[yy_current_state];
1590  if ( yy_current_state >= 90 )
1591  yy_c = yy_meta[(unsigned int) yy_c];
1592  }
1593  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1594  yy_is_jam = (yy_current_state == 89);
1595 
1596  return yy_is_jam ? 0 : yy_current_state;
1597 }
1598 
1599 #ifndef YY_NO_UNPUT
1600 /* %if-c-only */
1601 /* %endif */
1602 /* %if-c++-only */
1603  void yyFlexLexer::yyunput( int c, char* yy_bp)
1604 /* %endif */
1605 {
1606  char *yy_cp;
1607 
1608  yy_cp = (yy_c_buf_p);
1609 
1610  /* undo effects of setting up yytext */
1611  *yy_cp = (yy_hold_char);
1612 
1613  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1614  { /* need to shift things up to make room */
1615  /* +2 for EOB chars. */
1616  yy_size_t number_to_move = (yy_n_chars) + 2;
1617  char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1618  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1619  char *source =
1620  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1621 
1622  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1623  *--dest = *--source;
1624 
1625  yy_cp += (int) (dest - source);
1626  yy_bp += (int) (dest - source);
1627  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1628  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1629 
1630  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1631  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1632  }
1633 
1634  *--yy_cp = (char) c;
1635 
1636 /* %% [18.0] update yylineno here */
1637 
1638  (yytext_ptr) = yy_bp;
1639  (yy_hold_char) = *yy_cp;
1640  (yy_c_buf_p) = yy_cp;
1641 }
1642 /* %if-c-only */
1643 /* %endif */
1644 #endif
1645 
1646 /* %if-c-only */
1647 /* %endif */
1648 /* %if-c++-only */
1650 /* %endif */
1651 {
1652  int c;
1653 
1654  *(yy_c_buf_p) = (yy_hold_char);
1655 
1656  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1657  {
1658  /* yy_c_buf_p now points to the character we want to return.
1659  * If this occurs *before* the EOB characters, then it's a
1660  * valid NUL; if not, then we've hit the end of the buffer.
1661  */
1662  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1663  /* This was really a NUL. */
1664  *(yy_c_buf_p) = '\0';
1665 
1666  else
1667  { /* need more input */
1668  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1669  ++(yy_c_buf_p);
1670 
1671  switch ( yy_get_next_buffer( ) )
1672  {
1673  case EOB_ACT_LAST_MATCH:
1674  /* This happens because yy_g_n_b()
1675  * sees that we've accumulated a
1676  * token and flags that we need to
1677  * try matching the token before
1678  * proceeding. But for input(),
1679  * there's no matching to consider.
1680  * So convert the EOB_ACT_LAST_MATCH
1681  * to EOB_ACT_END_OF_FILE.
1682  */
1683 
1684  /* Reset buffer status. */
1685  yyrestart( yyin );
1686 
1687  /*FALLTHROUGH*/
1688 
1689  case EOB_ACT_END_OF_FILE:
1690  {
1691  if ( yywrap( ) )
1692  return EOF;
1693 
1694  if ( ! (yy_did_buffer_switch_on_eof) )
1695  YY_NEW_FILE;
1696 #ifdef __cplusplus
1697  return yyinput();
1698 #else
1699  return input();
1700 #endif
1701  }
1702 
1703  case EOB_ACT_CONTINUE_SCAN:
1704  (yy_c_buf_p) = (yytext_ptr) + offset;
1705  break;
1706  }
1707  }
1708  }
1709 
1710  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1711  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1712  (yy_hold_char) = *++(yy_c_buf_p);
1713 
1714 /* %% [19.0] update BOL and yylineno */
1715 
1716  return c;
1717 }
1718 /* %if-c-only */
1719 /* %endif */
1720 
1726 /* %if-c-only */
1727 /* %endif */
1728 /* %if-c++-only */
1729  void yyFlexLexer::yyrestart( std::istream& input_file )
1730 /* %endif */
1731 {
1732 
1733  if ( ! YY_CURRENT_BUFFER ){
1737  }
1738 
1739  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1741 }
1742 
1743 /* %if-c++-only */
1749 void yyFlexLexer::yyrestart( std::istream* input_file )
1750 {
1751  yyrestart( *input_file );
1752 }
1753 /* %endif */
1754 
1759 /* %if-c-only */
1760 /* %endif */
1761 /* %if-c++-only */
1762  void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1763 /* %endif */
1764 {
1765 
1766  /* TODO. We should be able to replace this entire function body
1767  * with
1768  * yypop_buffer_state();
1769  * yypush_buffer_state(new_buffer);
1770  */
1772  if ( YY_CURRENT_BUFFER == new_buffer )
1773  return;
1774 
1775  if ( YY_CURRENT_BUFFER )
1776  {
1777  /* Flush out information for old buffer. */
1778  *(yy_c_buf_p) = (yy_hold_char);
1779  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1780  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1781  }
1782 
1783  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1785 
1786  /* We don't actually know whether we did this switch during
1787  * EOF (yywrap()) processing, but the only time this flag
1788  * is looked at is after yywrap() is called, so it's safe
1789  * to go ahead and always set it.
1790  */
1792 }
1793 
1794 /* %if-c-only */
1795 /* %endif */
1796 /* %if-c++-only */
1798 /* %endif */
1799 {
1800  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1801  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1802 /* %if-c-only */
1803 /* %endif */
1804 /* %if-c++-only */
1805  yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
1806 /* %endif */
1807  (yy_hold_char) = *(yy_c_buf_p);
1808 }
1809 
1816 /* %if-c-only */
1817 /* %endif */
1818 /* %if-c++-only */
1819  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
1820 /* %endif */
1821 {
1822  YY_BUFFER_STATE b;
1823 
1824  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1825  if ( ! b )
1826  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1827 
1828  b->yy_buf_size = (yy_size_t)size;
1829 
1830  /* yy_ch_buf has to be 2 characters longer than the size given because
1831  * we need to put in 2 end-of-buffer characters.
1832  */
1833  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1834  if ( ! b->yy_ch_buf )
1835  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1836 
1837  b->yy_is_our_buffer = 1;
1838 
1839  yy_init_buffer( b, file );
1840 
1841  return b;
1842 }
1843 
1844 /* %if-c++-only */
1851  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1852 {
1853  return yy_create_buffer( *file, size );
1854 }
1855 /* %endif */
1856 
1861 /* %if-c-only */
1862 /* %endif */
1863 /* %if-c++-only */
1864  void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1865 /* %endif */
1866 {
1867 
1868  if ( ! b )
1869  return;
1870 
1871  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1873 
1874  if ( b->yy_is_our_buffer )
1875  yyfree((void *) b->yy_ch_buf );
1876 
1877  yyfree((void *) b );
1878 }
1879 
1880 /* Initializes or reinitializes a buffer.
1881  * This function is sometimes called more than once on the same buffer,
1882  * such as during a yyrestart() or at EOF.
1883  */
1884 /* %if-c-only */
1885 /* %endif */
1886 /* %if-c++-only */
1887  void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
1888 /* %endif */
1889 
1890 {
1891  int oerrno = errno;
1892 
1893  yy_flush_buffer( b );
1894 
1895 /* %if-c-only */
1896 /* %endif */
1897 /* %if-c++-only */
1898  b->yy_input_file = file.rdbuf();
1899 /* %endif */
1900  b->yy_fill_buffer = 1;
1901 
1902  /* If b is the current buffer, then yy_init_buffer was _probably_
1903  * called from yyrestart() or through yy_get_next_buffer.
1904  * In that case, we don't want to reset the lineno or column.
1905  */
1906  if (b != YY_CURRENT_BUFFER){
1907  b->yy_bs_lineno = 1;
1908  b->yy_bs_column = 0;
1909  }
1910 
1911 /* %if-c-only */
1912 /* %endif */
1913 /* %if-c++-only */
1914  b->yy_is_interactive = 0;
1915 /* %endif */
1916  errno = oerrno;
1917 }
1918 
1923 /* %if-c-only */
1924 /* %endif */
1925 /* %if-c++-only */
1926  void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1927 /* %endif */
1928 {
1929  if ( ! b )
1930  return;
1931 
1932  b->yy_n_chars = 0;
1933 
1934  /* We always need two end-of-buffer characters. The first causes
1935  * a transition to the end-of-buffer state. The second causes
1936  * a jam in that state.
1937  */
1940 
1941  b->yy_buf_pos = &b->yy_ch_buf[0];
1942 
1943  b->yy_at_bol = 1;
1945 
1946  if ( b == YY_CURRENT_BUFFER )
1948 }
1949 
1950 /* %if-c-or-c++ */
1957 /* %if-c-only */
1958 /* %endif */
1959 /* %if-c++-only */
1960 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1961 /* %endif */
1962 {
1963  if (new_buffer == NULL)
1964  return;
1965 
1967 
1968  /* This block is copied from yy_switch_to_buffer. */
1969  if ( YY_CURRENT_BUFFER )
1970  {
1971  /* Flush out information for old buffer. */
1972  *(yy_c_buf_p) = (yy_hold_char);
1973  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1974  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1975  }
1976 
1977  /* Only push if top exists. Otherwise, replace top. */
1978  if (YY_CURRENT_BUFFER)
1979  (yy_buffer_stack_top)++;
1980  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1981 
1982  /* copied from yy_switch_to_buffer. */
1985 }
1986 /* %endif */
1987 
1988 /* %if-c-or-c++ */
1993 /* %if-c-only */
1994 /* %endif */
1995 /* %if-c++-only */
1997 /* %endif */
1998 {
1999  if (!YY_CURRENT_BUFFER)
2000  return;
2001 
2003  YY_CURRENT_BUFFER_LVALUE = NULL;
2004  if ((yy_buffer_stack_top) > 0)
2005  --(yy_buffer_stack_top);
2006 
2007  if (YY_CURRENT_BUFFER) {
2010  }
2011 }
2012 /* %endif */
2013 
2014 /* %if-c-or-c++ */
2015 /* Allocates the stack if it does not exist.
2016  * Guarantees space for at least one push.
2017  */
2018 /* %if-c-only */
2019 /* %endif */
2020 /* %if-c++-only */
2022 /* %endif */
2023 {
2024  yy_size_t num_to_alloc;
2025 
2026  if (!(yy_buffer_stack)) {
2027 
2028  /* First allocation is just for 2 elements, since we don't know if this
2029  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2030  * immediate realloc on the next call.
2031  */
2032  num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
2034  (num_to_alloc * sizeof(struct yy_buffer_state*)
2035  );
2036  if ( ! (yy_buffer_stack) )
2037  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2038 
2039  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2040 
2041  (yy_buffer_stack_max) = num_to_alloc;
2042  (yy_buffer_stack_top) = 0;
2043  return;
2044  }
2045 
2046  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2047 
2048  /* Increase the buffer to prepare for a possible push. */
2049  yy_size_t grow_size = 8 /* arbitrary grow size */;
2050 
2051  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2053  ((yy_buffer_stack),
2054  num_to_alloc * sizeof(struct yy_buffer_state*)
2055  );
2056  if ( ! (yy_buffer_stack) )
2057  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2058 
2059  /* zero only the new slots.*/
2060  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2061  (yy_buffer_stack_max) = num_to_alloc;
2062  }
2063 }
2064 /* %endif */
2065 
2066 /* %if-c-only */
2067 /* %endif */
2068 
2069 /* %if-c-only */
2070 /* %endif */
2071 
2072 /* %if-c-only */
2073 /* %endif */
2074 
2075 /* %if-c-only */
2076 /* %endif */
2077 /* %if-c++-only */
2078  void yyFlexLexer::yy_push_state( int _new_state )
2079 /* %endif */
2080 {
2082  {
2083  yy_size_t new_size;
2084 
2086  new_size = (yy_start_stack_depth) * sizeof( int );
2087 
2088  if ( ! (yy_start_stack) )
2089  (yy_start_stack) = (int *) yyalloc(new_size );
2090 
2091  else
2092  (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
2093 
2094  if ( ! (yy_start_stack) )
2095  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2096  }
2097 
2099 
2100  BEGIN(_new_state);
2101 }
2102 
2103 /* %if-c-only */
2104 /* %endif */
2105 /* %if-c++-only */
2107 /* %endif */
2108 {
2109  if ( --(yy_start_stack_ptr) < 0 )
2110  YY_FATAL_ERROR( "start-condition stack underflow" );
2111 
2113 }
2114 
2115 /* %if-c-only */
2116 /* %endif */
2117 /* %if-c++-only */
2119 /* %endif */
2120 {
2121  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2122 }
2123 
2124 #ifndef YY_EXIT_FAILURE
2125 #define YY_EXIT_FAILURE 2
2126 #endif
2127 
2128 /* %if-c-only */
2129 /* %endif */
2130 /* %if-c++-only */
2132 {
2133  std::cerr << msg << std::endl;
2134  exit( YY_EXIT_FAILURE );
2135 }
2136 /* %endif */
2137 
2138 /* Redefine yyless() so it works in section 3 code. */
2139 
2140 #undef yyless
2141 #define yyless(n) \
2142  do \
2143  { \
2144  /* Undo effects of setting up yytext. */ \
2145  int yyless_macro_arg = (n); \
2146  YY_LESS_LINENO(yyless_macro_arg);\
2147  yytext[yyleng] = (yy_hold_char); \
2148  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2149  (yy_hold_char) = *(yy_c_buf_p); \
2150  *(yy_c_buf_p) = '\0'; \
2151  yyleng = yyless_macro_arg; \
2152  } \
2153  while ( 0 )
2154 
2155 /* Accessor methods (get/set functions) to struct members. */
2156 
2157 /* %if-c-only */
2158 /* %if-reentrant */
2159 /* %endif */
2160 /* %if-reentrant */
2161 /* %endif */
2162 /* %endif */
2163 
2164 /* %if-reentrant */
2165 /* %if-bison-bridge */
2166 /* %endif */
2167 /* %endif if-c-only */
2168 
2169 /* %if-c-only */
2170 /* %endif */
2171 
2172 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
2173 /* %if-reentrant */
2174 /* %endif */
2175 /* %endif */
2176 
2177 /*
2178  * Internal utility routines.
2179  */
2180 
2181 #ifndef yytext_ptr
2182 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2183 {
2184 
2185  int i;
2186  for ( i = 0; i < n; ++i )
2187  s1[i] = s2[i];
2188 }
2189 #endif
2190 
2191 #ifdef YY_NEED_STRLEN
2192 static int yy_flex_strlen (yyconst char * s )
2193 {
2194  int n;
2195  for ( n = 0; s[n]; ++n )
2196  ;
2197 
2198  return n;
2199 }
2200 #endif
2201 
2202 void *yyalloc (yy_size_t size )
2203 {
2204  return (void *) malloc( size );
2205 }
2206 
2207 void *yyrealloc (void * ptr, yy_size_t size )
2208 {
2209 
2210  /* The cast to (char *) in the following accommodates both
2211  * implementations that use char* generic pointers, and those
2212  * that use void* generic pointers. It works with the latter
2213  * because both ANSI C and C++ allow castless assignment from
2214  * any pointer type to void*, and deal with argument conversions
2215  * as though doing an assignment.
2216  */
2217  return (void *) realloc( (char *) ptr, size );
2218 }
2219 
2220 void yyfree (void * ptr )
2221 {
2222  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2223 }
2224 
2225 /* %if-tables-serialization definitions */
2226 /* %define-yytables The name for this specific scanner's tables. */
2227 #define YYTABLES_NAME "yytables"
2228 /* %endif */
2229 
2230 /* %ok-for-header */
2231 
2232 #line 127 "lib/vcsn/dot/scan.ll"
2233 
2234 
2235 // Do not use %option noyywrap, because then flex generates the
2236 // same definition of yywrap, but outside the namespaces.
2237 int yyFlexLexer::yywrap() { return 1; }
2238 
2239 // Beware of the dummy Flex interface. One would like to use:
2240 //
2241 // yypush_buffer_state(yy_create_buffer(yyin, YY_BUF_SIZE));
2242 //
2243 // and
2244 //
2245 // yypush_buffer_state(yy_scan_bytes(e.c_str(), e.size()));
2246 //
2247 // but the latter (yy_scan_bytes) calls yy_switch_to_buffer, so in
2248 // effect calling yypush_buffer_state saves the new state instead
2249 // of the old one.
2250 //
2251 // So do it in two steps, quite different from what is suggested
2252 // in the documentation: save the old context, switch to the new
2253 // one.
2254 
2255 void yyFlexLexer::scan_open_(std::istream& f)
2256 {
2257  set_debug(!!getenv("YYSCAN"));
2260 }
2261 
2263 {
2265 }
2266 
2268 
2269 
2270 // Local Variables:
2271 // mode: C++
2272 // End:
2273 
void scan_open_(std::istream &f)
Definition: scan.cc:2255
yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: scan.cc:1574
virtual void LexerError(const char *msg)
Definition: scan.cc:2131
#define LINE(Line)
Definition: scan.cc:597
#define YY_MORE_ADJ
Definition: scan.cc:587
void yy_delete_buffer(yy_buffer_state *b)
Destroy the buffer.
Definition: scan.cc:1864
#define YY_BUFFER_NORMAL
Definition: scan.cc:327
Define the vcsn::detail::dot::parser class.
unsigned short int flex_uint16_t
Definition: scan.cc:101
std::istream * yyin
Definition: flex-lexer.hh:146
int yy_is_interactive
Definition: scan.cc:308
#define BEGIN
Definition: scan.cc:197
void yypush_buffer_state(yy_buffer_state *new_buffer)
Pushes the new state onto the stack.
Definition: scan.cc:1960
#define yyconst
Definition: scan.cc:167
#define YY_CURRENT_BUFFER
Definition: scan.cc:358
#define yytext_ptr
Definition: scan.cc:411
void yy_flush_buffer(yy_buffer_state *b)
Discard all buffered characters.
Definition: scan.cc:1926
yy_size_t yy_n_chars
Definition: scan.cc:295
weightset_mixin< detail::b_impl > b
Definition: fwd.hh:48
#define YY_BUFFER_NEW
Definition: scan.cc:326
#define YY_READ_BUF_SIZE
Definition: scan.cc:676
int yy_state_type
Definition: flex-lexer.hh:57
int yylineno
Definition: flex-lexer.hh:91
#define YY_BREAK
Definition: scan.cc:759
symbol string_t
Definition: parse.hh:66
if(exp.max==-1)
Definition: multiply.hh:381
#define YY_SC_TO_UI(c)
Definition: scan.cc:183
char * yy_c_buf_p
Definition: flex-lexer.hh:188
#define YY_INPUT(buf, result, max_size)
Definition: scan.cc:693
#define YY_START_STACK_INCR
Definition: scan.cc:713
void yy_push_state(int new_state)
Definition: scan.cc:2078
yy_size_t yyleng
#define yyterminate()
Definition: scan.cc:20
#define TOK(Token)
Definition: scan.cc:606
void * yyalloc(yy_size_t size)
Definition: scan.cc:2202
#define YY_CURRENT_BUFFER_LVALUE
Definition: scan.cc:365
int yy_did_buffer_switch_on_eof
Definition: flex-lexer.hh:195
flex_int32_t yy_verify
Definition: scan.cc:440
#define YY_START
Definition: scan.cc:203
static flex_int16_t yy_def[100]
Definition: scan.cc:511
void ctor_common()
Definition: scan.cc:1285
int yy_top_state()
Definition: scan.cc:2118
yy_state_type * yy_state_buf
Definition: flex-lexer.hh:209
char * yy_last_accepting_cpos
Definition: flex-lexer.hh:207
#define YY_EXIT_FAILURE
Definition: scan.cc:2125
#define EOB_ACT_LAST_MATCH
Definition: scan.cc:252
int yy_start_stack_ptr
Definition: flex-lexer.hh:163
void yy_switch_to_buffer(yy_buffer_state *new_buffer)
Switch to a different input buffer.
Definition: scan.cc:1762
int yy_more_flag
Definition: flex-lexer.hh:219
static flex_uint16_t yy_nxt[186]
Definition: scan.cc:526
void yy_pop_state()
Definition: scan.cc:2106
#define YY_FLEX_NAMESPACE_END
Definition: scan.hh:9
#define YY_DO_BEFORE_ACTION
Definition: scan.cc:424
void yypop_buffer_state()
Removes and deletes the top of the stack, if present.
Definition: scan.cc:1996
std::ostream * yyout
Definition: flex-lexer.hh:178
int yy_at_bol
Definition: scan.cc:314
void yyrestart(std::istream *s)
Immediately switch to a different input stream.
Definition: scan.cc:1729
int yy_looking_for_trail_begin
Definition: flex-lexer.hh:217
int yy_fill_buffer
Definition: scan.cc:322
void scan_close_()
Definition: scan.cc:2262
unsigned char flex_uint8_t
Definition: scan.cc:100
unsigned int flex_uint32_t
Definition: scan.cc:102
#define SC_STRING
Definition: scan.cc:616
yyFlexLexer(std::istream &arg_yyin, std::ostream &arg_yyout)
Definition: scan.cc:1276
int yy_more_offset
Definition: flex-lexer.hh:221
yy_buffer_state ** yy_buffer_stack
Stack as an array.
Definition: flex-lexer.hh:200
virtual int yywrap()
Definition: scan.cc:2237
void yyunput(int c, char *buf_ptr)
Definition: scan.cc:1603
void yy_init_buffer(yy_buffer_state *b, std::istream *s)
Definition: scan.cc:1887
#define YY_END_OF_BUFFER_CHAR
Definition: scan.cc:212
virtual void LexerOutput(const char *buf, int size)
Definition: scan.cc:1378
char * yy_ch_buf
Definition: scan.cc:284
void yy_load_buffer_state()
Definition: scan.cc:1797
static flex_int16_t yy_rule_linenum[35]
Definition: scan.cc:574
int yy_bs_column
The column count.
Definition: scan.cc:317
int yy_prev_more_offset
Definition: flex-lexer.hh:222
int yy_is_our_buffer
Definition: scan.cc:301
#define EOB_ACT_CONTINUE_SCAN
Definition: scan.cc:250
yy_state_type yy_last_accepting_state
Definition: flex-lexer.hh:206
int yyinput()
Definition: scan.cc:1649
static YY_CHAR yy_ec[256]
Definition: scan.cc:456
char yy_hold_char
Definition: flex-lexer.hh:182
#define YY_BUF_SIZE
Definition: scan.cc:223
#define INITIAL
Definition: scan.cc:614
#define YY_NEW_FILE
Definition: scan.cc:210
std::streambuf * yy_input_file
Definition: scan.cc:281
void * yyrealloc(void *ptr, yy_size_t size)
Definition: scan.cc:2207
int yy_start_stack_depth
Definition: flex-lexer.hh:164
int yy_bs_lineno
The line count.
Definition: scan.cc:316
#define YY_FATAL_ERROR(msg)
Definition: scan.cc:721
virtual int LexerInput(char *buf, int max_size)
Definition: scan.cc:1349
signed char flex_int8_t
Definition: scan.cc:97
size_t yy_size_t
Definition: scan.cc:238
#define SC_XML
Definition: scan.cc:617
int yy_buffer_status
Definition: scan.cc:324
flex_int32_t yy_nxt
Definition: scan.cc:441
void yyfree(void *ptr)
Definition: scan.cc:2220
#define YY_DECL
Definition: scan.cc:746
virtual void switch_streams(std::istream *new_in, std::ostream *new_out=nullptr)
Definition: scan.cc:1323
static YY_CHAR yy_meta[35]
Definition: scan.cc:488
int flex_int32_t
Definition: scan.cc:99
#define FLEX_STD
Definition: flex-lexer.hh:54
yy_state_type yy_get_previous_state()
Definition: scan.cc:1536
static flex_uint16_t yy_base[100]
Definition: scan.cc:496
#define YY_STATE_EOF(state)
Definition: scan.cc:207
short int flex_int16_t
Definition: scan.cc:98
#define EOB_ACT_END_OF_FILE
Definition: scan.cc:251
yy_buffer_state * yy_create_buffer(std::istream *s, int size)
Allocate and initialize an input buffer state.
Definition: scan.cc:1819
#define YY_BUFFER_EOF_PENDING
Definition: scan.cc:338
static flex_int16_t yy_chk[186]
Definition: scan.cc:550
char * yy_buf_pos
Definition: scan.cc:285
#define ECHO
Definition: scan.cc:685
int yy_get_next_buffer()
Definition: scan.cc:1396
static flex_int16_t yy_accept[90]
Definition: scan.cc:443
struct yy_buffer_state * YY_BUFFER_STATE
Definition: scan.cc:233
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
#define YY_END_OF_BUFFER
Definition: scan.cc:435
int yy_flex_debug
Definition: flex-lexer.hh:92
#define YY_RULE_SETUP
Definition: scan.cc:763
virtual ~yyFlexLexer()
Definition: scan.cc:1313
#define YY_RESTORE_YY_MORE_OFFSET
Definition: scan.cc:588
#define SC_COMMENT
Definition: scan.cc:615
void yyensure_buffer_stack(void)
Definition: scan.cc:2021
unsigned char YY_CHAR
Definition: scan.cc:409
size_t yy_buffer_stack_max
capacity of stack.
Definition: flex-lexer.hh:199
yy_size_t yy_buf_size
Definition: scan.cc:290
int * yy_start_stack
Definition: flex-lexer.hh:165
size_t yy_buffer_stack_top
index of top of stack.
Definition: flex-lexer.hh:198
void set_debug(int flag)
Definition: flex-lexer.hh:86