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