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