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