Kea  1.9.9-git
d2_lexer.cc
Go to the documentation of this file.
1 #line 1 "d2_lexer.cc"
2 
3 #line 3 "d2_lexer.cc"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 /* %not-for-header */
10 /* %if-c-only */
11 /* %if-not-reentrant */
12 #define yy_create_buffer d2_parser__create_buffer
13 #define yy_delete_buffer d2_parser__delete_buffer
14 #define yy_scan_buffer d2_parser__scan_buffer
15 #define yy_scan_string d2_parser__scan_string
16 #define yy_scan_bytes d2_parser__scan_bytes
17 #define yy_init_buffer d2_parser__init_buffer
18 #define yy_flush_buffer d2_parser__flush_buffer
19 #define yy_load_buffer_state d2_parser__load_buffer_state
20 #define yy_switch_to_buffer d2_parser__switch_to_buffer
21 #define yypush_buffer_state d2_parser_push_buffer_state
22 #define yypop_buffer_state d2_parser_pop_buffer_state
23 #define yyensure_buffer_stack d2_parser_ensure_buffer_stack
24 #define yy_flex_debug d2_parser__flex_debug
25 #define yyin d2_parser_in
26 #define yyleng d2_parser_leng
27 #define yylex d2_parser_lex
28 #define yylineno d2_parser_lineno
29 #define yyout d2_parser_out
30 #define yyrestart d2_parser_restart
31 #define yytext d2_parser_text
32 #define yywrap d2_parser_wrap
33 #define yyalloc d2_parser_alloc
34 #define yyrealloc d2_parser_realloc
35 #define yyfree d2_parser_free
36 
37 /* %endif */
38 /* %endif */
39 /* %ok-for-header */
40 
41 #define FLEX_SCANNER
42 #define YY_FLEX_MAJOR_VERSION 2
43 #define YY_FLEX_MINOR_VERSION 6
44 #define YY_FLEX_SUBMINOR_VERSION 4
45 #if YY_FLEX_SUBMINOR_VERSION > 0
46 #define FLEX_BETA
47 #endif
48 
49 /* %if-c++-only */
50 /* %endif */
51 
52 /* %if-c-only */
53 #ifdef yy_create_buffer
54 #define d2_parser__create_buffer_ALREADY_DEFINED
55 #else
56 #define yy_create_buffer d2_parser__create_buffer
57 #endif
58 
59 #ifdef yy_delete_buffer
60 #define d2_parser__delete_buffer_ALREADY_DEFINED
61 #else
62 #define yy_delete_buffer d2_parser__delete_buffer
63 #endif
64 
65 #ifdef yy_scan_buffer
66 #define d2_parser__scan_buffer_ALREADY_DEFINED
67 #else
68 #define yy_scan_buffer d2_parser__scan_buffer
69 #endif
70 
71 #ifdef yy_scan_string
72 #define d2_parser__scan_string_ALREADY_DEFINED
73 #else
74 #define yy_scan_string d2_parser__scan_string
75 #endif
76 
77 #ifdef yy_scan_bytes
78 #define d2_parser__scan_bytes_ALREADY_DEFINED
79 #else
80 #define yy_scan_bytes d2_parser__scan_bytes
81 #endif
82 
83 #ifdef yy_init_buffer
84 #define d2_parser__init_buffer_ALREADY_DEFINED
85 #else
86 #define yy_init_buffer d2_parser__init_buffer
87 #endif
88 
89 #ifdef yy_flush_buffer
90 #define d2_parser__flush_buffer_ALREADY_DEFINED
91 #else
92 #define yy_flush_buffer d2_parser__flush_buffer
93 #endif
94 
95 #ifdef yy_load_buffer_state
96 #define d2_parser__load_buffer_state_ALREADY_DEFINED
97 #else
98 #define yy_load_buffer_state d2_parser__load_buffer_state
99 #endif
100 
101 #ifdef yy_switch_to_buffer
102 #define d2_parser__switch_to_buffer_ALREADY_DEFINED
103 #else
104 #define yy_switch_to_buffer d2_parser__switch_to_buffer
105 #endif
106 
107 #ifdef yypush_buffer_state
108 #define d2_parser_push_buffer_state_ALREADY_DEFINED
109 #else
110 #define yypush_buffer_state d2_parser_push_buffer_state
111 #endif
112 
113 #ifdef yypop_buffer_state
114 #define d2_parser_pop_buffer_state_ALREADY_DEFINED
115 #else
116 #define yypop_buffer_state d2_parser_pop_buffer_state
117 #endif
118 
119 #ifdef yyensure_buffer_stack
120 #define d2_parser_ensure_buffer_stack_ALREADY_DEFINED
121 #else
122 #define yyensure_buffer_stack d2_parser_ensure_buffer_stack
123 #endif
124 
125 #ifdef yylex
126 #define d2_parser_lex_ALREADY_DEFINED
127 #else
128 #define yylex d2_parser_lex
129 #endif
130 
131 #ifdef yyrestart
132 #define d2_parser_restart_ALREADY_DEFINED
133 #else
134 #define yyrestart d2_parser_restart
135 #endif
136 
137 #ifdef yylex_init
138 #define d2_parser_lex_init_ALREADY_DEFINED
139 #else
140 #define yylex_init d2_parser_lex_init
141 #endif
142 
143 #ifdef yylex_init_extra
144 #define d2_parser_lex_init_extra_ALREADY_DEFINED
145 #else
146 #define yylex_init_extra d2_parser_lex_init_extra
147 #endif
148 
149 #ifdef yylex_destroy
150 #define d2_parser_lex_destroy_ALREADY_DEFINED
151 #else
152 #define yylex_destroy d2_parser_lex_destroy
153 #endif
154 
155 #ifdef yyget_debug
156 #define d2_parser_get_debug_ALREADY_DEFINED
157 #else
158 #define yyget_debug d2_parser_get_debug
159 #endif
160 
161 #ifdef yyset_debug
162 #define d2_parser_set_debug_ALREADY_DEFINED
163 #else
164 #define yyset_debug d2_parser_set_debug
165 #endif
166 
167 #ifdef yyget_extra
168 #define d2_parser_get_extra_ALREADY_DEFINED
169 #else
170 #define yyget_extra d2_parser_get_extra
171 #endif
172 
173 #ifdef yyset_extra
174 #define d2_parser_set_extra_ALREADY_DEFINED
175 #else
176 #define yyset_extra d2_parser_set_extra
177 #endif
178 
179 #ifdef yyget_in
180 #define d2_parser_get_in_ALREADY_DEFINED
181 #else
182 #define yyget_in d2_parser_get_in
183 #endif
184 
185 #ifdef yyset_in
186 #define d2_parser_set_in_ALREADY_DEFINED
187 #else
188 #define yyset_in d2_parser_set_in
189 #endif
190 
191 #ifdef yyget_out
192 #define d2_parser_get_out_ALREADY_DEFINED
193 #else
194 #define yyget_out d2_parser_get_out
195 #endif
196 
197 #ifdef yyset_out
198 #define d2_parser_set_out_ALREADY_DEFINED
199 #else
200 #define yyset_out d2_parser_set_out
201 #endif
202 
203 #ifdef yyget_leng
204 #define d2_parser_get_leng_ALREADY_DEFINED
205 #else
206 #define yyget_leng d2_parser_get_leng
207 #endif
208 
209 #ifdef yyget_text
210 #define d2_parser_get_text_ALREADY_DEFINED
211 #else
212 #define yyget_text d2_parser_get_text
213 #endif
214 
215 #ifdef yyget_lineno
216 #define d2_parser_get_lineno_ALREADY_DEFINED
217 #else
218 #define yyget_lineno d2_parser_get_lineno
219 #endif
220 
221 #ifdef yyset_lineno
222 #define d2_parser_set_lineno_ALREADY_DEFINED
223 #else
224 #define yyset_lineno d2_parser_set_lineno
225 #endif
226 
227 #ifdef yywrap
228 #define d2_parser_wrap_ALREADY_DEFINED
229 #else
230 #define yywrap d2_parser_wrap
231 #endif
232 
233 /* %endif */
234 
235 #ifdef yyalloc
236 #define d2_parser_alloc_ALREADY_DEFINED
237 #else
238 #define yyalloc d2_parser_alloc
239 #endif
240 
241 #ifdef yyrealloc
242 #define d2_parser_realloc_ALREADY_DEFINED
243 #else
244 #define yyrealloc d2_parser_realloc
245 #endif
246 
247 #ifdef yyfree
248 #define d2_parser_free_ALREADY_DEFINED
249 #else
250 #define yyfree d2_parser_free
251 #endif
252 
253 /* %if-c-only */
254 
255 #ifdef yytext
256 #define d2_parser_text_ALREADY_DEFINED
257 #else
258 #define yytext d2_parser_text
259 #endif
260 
261 #ifdef yyleng
262 #define d2_parser_leng_ALREADY_DEFINED
263 #else
264 #define yyleng d2_parser_leng
265 #endif
266 
267 #ifdef yyin
268 #define d2_parser_in_ALREADY_DEFINED
269 #else
270 #define yyin d2_parser_in
271 #endif
272 
273 #ifdef yyout
274 #define d2_parser_out_ALREADY_DEFINED
275 #else
276 #define yyout d2_parser_out
277 #endif
278 
279 #ifdef yy_flex_debug
280 #define d2_parser__flex_debug_ALREADY_DEFINED
281 #else
282 #define yy_flex_debug d2_parser__flex_debug
283 #endif
284 
285 #ifdef yylineno
286 #define d2_parser_lineno_ALREADY_DEFINED
287 #else
288 #define yylineno d2_parser_lineno
289 #endif
290 
291 /* %endif */
292 
293 /* First, we deal with platform-specific or compiler-specific issues. */
294 
295 /* begin standard C headers. */
296 /* %if-c-only */
297 #include <stdio.h>
298 #include <string.h>
299 #include <errno.h>
300 #include <stdlib.h>
301 /* %endif */
302 
303 /* %if-tables-serialization */
304 /* %endif */
305 /* end standard C headers. */
306 
307 /* %if-c-or-c++ */
308 /* flex integer type definitions */
309 
310 #ifndef FLEXINT_H
311 #define FLEXINT_H
312 
313 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
314 
315 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
316 
317 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
318  * if you want the limit (max/min) macros for int types.
319  */
320 #ifndef __STDC_LIMIT_MACROS
321 #define __STDC_LIMIT_MACROS 1
322 #endif
323 
324 #include <inttypes.h>
325 typedef int8_t flex_int8_t;
326 typedef uint8_t flex_uint8_t;
327 typedef int16_t flex_int16_t;
328 typedef uint16_t flex_uint16_t;
329 typedef int32_t flex_int32_t;
330 typedef uint32_t flex_uint32_t;
331 #else
332 typedef signed char flex_int8_t;
333 typedef short int flex_int16_t;
334 typedef int flex_int32_t;
335 typedef unsigned char flex_uint8_t;
336 typedef unsigned short int flex_uint16_t;
337 typedef unsigned int flex_uint32_t;
338 
339 /* Limits of integral types. */
340 #ifndef INT8_MIN
341 #define INT8_MIN (-128)
342 #endif
343 #ifndef INT16_MIN
344 #define INT16_MIN (-32767-1)
345 #endif
346 #ifndef INT32_MIN
347 #define INT32_MIN (-2147483647-1)
348 #endif
349 #ifndef INT8_MAX
350 #define INT8_MAX (127)
351 #endif
352 #ifndef INT16_MAX
353 #define INT16_MAX (32767)
354 #endif
355 #ifndef INT32_MAX
356 #define INT32_MAX (2147483647)
357 #endif
358 #ifndef UINT8_MAX
359 #define UINT8_MAX (255U)
360 #endif
361 #ifndef UINT16_MAX
362 #define UINT16_MAX (65535U)
363 #endif
364 #ifndef UINT32_MAX
365 #define UINT32_MAX (4294967295U)
366 #endif
367 
368 #ifndef SIZE_MAX
369 #define SIZE_MAX (~(size_t)0)
370 #endif
371 
372 #endif /* ! C99 */
373 
374 #endif /* ! FLEXINT_H */
375 
376 /* %endif */
377 
378 /* begin standard C++ headers. */
379 /* %if-c++-only */
380 /* %endif */
381 
382 /* TODO: this is always defined, so inline it */
383 #define yyconst const
384 
385 #if defined(__GNUC__) && __GNUC__ >= 3
386 #define yynoreturn __attribute__((__noreturn__))
387 #else
388 #define yynoreturn
389 #endif
390 
391 /* %not-for-header */
392 /* Returned upon end-of-file. */
393 #define YY_NULL 0
394 /* %ok-for-header */
395 
396 /* %not-for-header */
397 /* Promotes a possibly negative, possibly signed char to an
398  * integer in range [0..255] for use as an array index.
399  */
400 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
401 /* %ok-for-header */
402 
403 /* %if-reentrant */
404 /* %endif */
405 
406 /* %if-not-reentrant */
407 
408 /* %endif */
409 
410 /* Enter a start condition. This macro really ought to take a parameter,
411  * but we do it the disgusting crufty way forced on us by the ()-less
412  * definition of BEGIN.
413  */
414 #define BEGIN (yy_start) = 1 + 2 *
415 /* Translate the current start state into a value that can be later handed
416  * to BEGIN to return to the state. The YYSTATE alias is for lex
417  * compatibility.
418  */
419 #define YY_START (((yy_start) - 1) / 2)
420 #define YYSTATE YY_START
421 /* Action number for EOF rule of a given start state. */
422 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
423 /* Special action meaning "start processing a new file". */
424 #define YY_NEW_FILE yyrestart( yyin )
425 #define YY_END_OF_BUFFER_CHAR 0
426 
427 /* Size of default input buffer. */
428 #ifndef YY_BUF_SIZE
429 #ifdef __ia64__
430 /* On IA-64, the buffer size is 16k, not 8k.
431  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
432  * Ditto for the __ia64__ case accordingly.
433  */
434 #define YY_BUF_SIZE 32768
435 #else
436 #define YY_BUF_SIZE 16384
437 #endif /* __ia64__ */
438 #endif
439 
440 /* The state buf must be large enough to hold one state per character in the main buffer.
441  */
442 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
443 
444 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
445 #define YY_TYPEDEF_YY_BUFFER_STATE
447 #endif
448 
449 #ifndef YY_TYPEDEF_YY_SIZE_T
450 #define YY_TYPEDEF_YY_SIZE_T
451 typedef size_t yy_size_t;
452 #endif
453 
454 /* %if-not-reentrant */
455 extern int yyleng;
456 /* %endif */
457 
458 /* %if-c-only */
459 /* %if-not-reentrant */
460 extern FILE *yyin, *yyout;
461 /* %endif */
462 /* %endif */
463 
464 #define EOB_ACT_CONTINUE_SCAN 0
465 #define EOB_ACT_END_OF_FILE 1
466 #define EOB_ACT_LAST_MATCH 2
467 
468  #define YY_LESS_LINENO(n)
469  #define YY_LINENO_REWIND_TO(ptr)
470 
471 /* Return all but the first "n" matched characters back to the input stream. */
472 #define yyless(n) \
473  do \
474  { \
475  /* Undo effects of setting up yytext. */ \
476  int yyless_macro_arg = (n); \
477  YY_LESS_LINENO(yyless_macro_arg);\
478  *yy_cp = (yy_hold_char); \
479  YY_RESTORE_YY_MORE_OFFSET \
480  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
481  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
482  } \
483  while ( 0 )
484 #define unput(c) yyunput( c, (yytext_ptr) )
485 
486 #ifndef YY_STRUCT_YY_BUFFER_STATE
487 #define YY_STRUCT_YY_BUFFER_STATE
488 struct yy_buffer_state
489  {
490 /* %if-c-only */
491  FILE *yy_input_file;
492 /* %endif */
493 
494 /* %if-c++-only */
495 /* %endif */
496 
497  char *yy_ch_buf; /* input buffer */
498  char *yy_buf_pos; /* current position in input buffer */
499 
500  /* Size of input buffer in bytes, not including room for EOB
501  * characters.
502  */
503  int yy_buf_size;
504 
505  /* Number of characters read into yy_ch_buf, not including EOB
506  * characters.
507  */
508  int yy_n_chars;
509 
510  /* Whether we "own" the buffer - i.e., we know we created it,
511  * and can realloc() it to grow it, and should free() it to
512  * delete it.
513  */
514  int yy_is_our_buffer;
515 
516  /* Whether this is an "interactive" input source; if so, and
517  * if we're using stdio for input, then we want to use getc()
518  * instead of fread(), to make sure we stop fetching input after
519  * each newline.
520  */
521  int yy_is_interactive;
522 
523  /* Whether we're considered to be at the beginning of a line.
524  * If so, '^' rules will be active on the next match, otherwise
525  * not.
526  */
527  int yy_at_bol;
528 
529  int yy_bs_lineno;
530  int yy_bs_column;
532  /* Whether to try to fill the input buffer when we reach the
533  * end of it.
534  */
535  int yy_fill_buffer;
536 
537  int yy_buffer_status;
538 
539 #define YY_BUFFER_NEW 0
540 #define YY_BUFFER_NORMAL 1
541  /* When an EOF's been seen but there's still some text to process
542  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
543  * shouldn't try reading from the input source any more. We might
544  * still have a bunch of tokens to match, though, because of
545  * possible backing-up.
546  *
547  * When we actually see the EOF, we change the status to "new"
548  * (via yyrestart()), so that the user can continue scanning by
549  * just pointing yyin at a new input file.
550  */
551 #define YY_BUFFER_EOF_PENDING 2
552 
553  };
554 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
555 
556 /* %if-c-only Standard (non-C++) definition */
557 /* %not-for-header */
558 /* %if-not-reentrant */
559 
560 /* Stack of input buffers. */
561 static size_t yy_buffer_stack_top = 0;
562 static size_t yy_buffer_stack_max = 0;
563 static YY_BUFFER_STATE * yy_buffer_stack = NULL;
564 /* %endif */
565 /* %ok-for-header */
566 
567 /* %endif */
568 
569 /* We provide macros for accessing buffer states in case in the
570  * future we want to put the buffer states in a more general
571  * "scanner state".
572  *
573  * Returns the top of the stack, or NULL.
574  */
575 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
576  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
577  : NULL)
578 /* Same as previous macro, but useful when we know that the buffer stack is not
579  * NULL or when we need an lvalue. For internal use only.
580  */
581 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
582 
583 /* %if-c-only Standard (non-C++) definition */
584 
585 /* %if-not-reentrant */
586 /* %not-for-header */
587 /* yy_hold_char holds the character lost when yytext is formed. */
588 static char yy_hold_char;
589 static int yy_n_chars; /* number of characters read into yy_ch_buf */
590 int yyleng;
591 
592 /* Points to current character in buffer. */
593 static char *yy_c_buf_p = NULL;
594 static int yy_init = 0; /* whether we need to initialize */
595 static int yy_start = 0; /* start state number */
596 
597 /* Flag which is used to allow yywrap()'s to do buffer switches
598  * instead of setting up a fresh yyin. A bit of a hack ...
599  */
600 static int yy_did_buffer_switch_on_eof;
601 /* %ok-for-header */
602 
603 /* %endif */
604 
605 void yyrestart ( FILE *input_file );
606 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
607 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
608 void yy_delete_buffer ( YY_BUFFER_STATE b );
609 void yy_flush_buffer ( YY_BUFFER_STATE b );
610 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
611 void yypop_buffer_state ( void );
612 
613 static void yyensure_buffer_stack ( void );
614 static void yy_load_buffer_state ( void );
615 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
616 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
617 
618 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
619 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
620 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
621 
622 /* %endif */
623 
624 void *yyalloc ( yy_size_t );
625 void *yyrealloc ( void *, yy_size_t );
626 void yyfree ( void * );
627 
628 #define yy_new_buffer yy_create_buffer
629 #define yy_set_interactive(is_interactive) \
630  { \
631  if ( ! YY_CURRENT_BUFFER ){ \
632  yyensure_buffer_stack (); \
633  YY_CURRENT_BUFFER_LVALUE = \
634  yy_create_buffer( yyin, YY_BUF_SIZE ); \
635  } \
636  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
637  }
638 #define yy_set_bol(at_bol) \
639  { \
640  if ( ! YY_CURRENT_BUFFER ){\
641  yyensure_buffer_stack (); \
642  YY_CURRENT_BUFFER_LVALUE = \
643  yy_create_buffer( yyin, YY_BUF_SIZE ); \
644  } \
645  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
646  }
647 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
648 
649 /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
650 /* Begin user sect3 */
651 
652 #define d2_parser_wrap() (/*CONSTCOND*/1)
653 #define YY_SKIP_YYWRAP
654 
655 #define FLEX_DEBUG
657 
658 FILE *yyin = NULL, *yyout = NULL;
659 
660 typedef int yy_state_type;
661 
662 extern int yylineno;
663 int yylineno = 1;
664 
665 extern char *yytext;
666 #ifdef yytext_ptr
667 #undef yytext_ptr
668 #endif
669 #define yytext_ptr yytext
670 
671 /* %% [1.5] DFA */
672 
673 /* %if-c-only Standard (non-C++) definition */
674 
675 static yy_state_type yy_get_previous_state ( void );
676 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
677 static int yy_get_next_buffer ( void );
678 static void yynoreturn yy_fatal_error ( const char* msg );
679 
680 /* %endif */
681 
682 /* Done after the current pattern has been matched and before the
683  * corresponding action - sets up yytext.
684  */
685 #define YY_DO_BEFORE_ACTION \
686  (yytext_ptr) = yy_bp; \
687 /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
688  yyleng = (int) (yy_cp - yy_bp); \
689  (yy_hold_char) = *yy_cp; \
690  *yy_cp = '\0'; \
691 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
692  (yy_c_buf_p) = yy_cp;
693 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
694 #define YY_NUM_RULES 68
695 #define YY_END_OF_BUFFER 69
696 /* This struct is not used in this scanner,
697  but its presence is necessary. */
698 struct yy_trans_info
699  {
702  };
703 static const flex_int16_t yy_accept[425] =
704  { 0,
705  61, 61, 0, 0, 0, 0, 0, 0, 0, 0,
706  69, 67, 10, 11, 67, 1, 61, 58, 61, 61,
707  67, 60, 59, 67, 67, 67, 67, 67, 54, 55,
708  67, 67, 67, 56, 57, 5, 5, 5, 67, 67,
709  67, 10, 11, 0, 0, 49, 0, 0, 0, 0,
710  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
711  0, 0, 0, 0, 0, 0, 0, 1, 61, 61,
712  0, 60, 61, 3, 2, 6, 0, 61, 0, 0,
713  0, 0, 0, 0, 4, 0, 0, 9, 0, 50,
714  0, 0, 0, 0, 0, 0, 52, 0, 0, 0,
715 
716  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
717  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
718  0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
719  8, 0, 0, 0, 0, 0, 51, 53, 0, 0,
720  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
721  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
722  0, 0, 0, 0, 0, 0, 0, 0, 66, 64,
723  0, 63, 62, 0, 0, 0, 19, 18, 0, 0,
724  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
725  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
726 
727  0, 0, 0, 0, 0, 0, 0, 0, 65, 62,
728  0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
729  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
730  0, 46, 0, 0, 0, 0, 0, 14, 0, 0,
731  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
732  0, 0, 0, 42, 0, 0, 0, 0, 0, 0,
733  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
734  0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
735  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736  0, 44, 0, 0, 41, 0, 0, 0, 0, 32,
737 
738  0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
739  0, 0, 0, 0, 0, 0, 0, 38, 39, 43,
740  0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
741  0, 12, 0, 0, 0, 0, 0, 0, 0, 0,
742  28, 0, 26, 0, 0, 0, 0, 0, 48, 0,
743  0, 0, 0, 30, 0, 0, 0, 0, 0, 0,
744  0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
745  0, 0, 0, 47, 0, 0, 0, 0, 0, 13,
746  17, 0, 0, 37, 0, 0, 0, 0, 0, 0,
747  31, 0, 27, 0, 0, 0, 0, 0, 35, 34,
748 
749  0, 0, 25, 0, 23, 0, 16, 0, 24, 21,
750  0, 0, 0, 0, 33, 0, 0, 40, 0, 36,
751  0, 0, 15, 0
752  } ;
753 
754 static const YY_CHAR yy_ec[256] =
755  { 0,
756  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
757  1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
758  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
759  1, 4, 5, 6, 7, 5, 5, 5, 5, 5,
760  5, 8, 9, 10, 11, 12, 13, 14, 14, 14,
761  14, 14, 14, 14, 14, 14, 14, 15, 5, 16,
762  5, 17, 18, 5, 19, 20, 21, 22, 23, 24,
763  5, 5, 5, 25, 5, 26, 5, 27, 28, 29,
764  5, 30, 31, 32, 33, 5, 5, 5, 5, 5,
765  34, 35, 36, 5, 37, 5, 38, 39, 40, 41,
766 
767  42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
768  52, 53, 5, 54, 55, 56, 57, 58, 59, 60,
769  61, 62, 63, 5, 64, 5, 5, 5, 5, 5,
770  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
771  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
772  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
773  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
774  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
775  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
776  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
777 
778  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
779  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
780  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
781  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
782  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
783  5, 5, 5, 5, 5
784  } ;
785 
786 static const YY_CHAR yy_meta[65] =
787  { 0,
788  1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
789  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
790  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
791  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
792  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
793  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
794  1, 1, 1, 1
795  } ;
796 
797 static const flex_int16_t yy_base[433] =
798  { 0,
799  0, 63, 17, 27, 35, 42, 46, 51, 80, 89,
800  677, 678, 24, 673, 127, 0, 180, 678, 181, 66,
801  9, 184, 678, 657, 101, 21, 14, 31, 678, 678,
802  22, 61, 66, 678, 678, 678, 98, 661, 622, 0,
803  655, 99, 668, 27, 205, 678, 625, 166, 83, 177,
804  228, 620, 616, 159, 64, 615, 613, 623, 65, 626,
805  84, 606, 164, 620, 16, 185, 187, 0, 194, 252,
806  259, 260, 197, 678, 0, 678, 647, 646, 186, 198,
807  232, 243, 250, 244, 678, 619, 652, 678, 209, 678,
808  274, 617, 253, 257, 259, 650, 0, 326, 611, 163,
809 
810  603, 614, 608, 596, 593, 595, 177, 637, 586, 607,
811  601, 584, 593, 588, 585, 177, 586, 581, 238, 598,
812  591, 594, 0, 259, 267, 277, 260, 269, 280, 586,
813  678, 581, 270, 627, 626, 625, 678, 678, 356, 578,
814  579, 572, 572, 569, 583, 613, 568, 563, 573, 564,
815  581, 607, 563, 572, 249, 573, 603, 560, 574, 555,
816  554, 567, 554, 565, 558, 561, 550, 285, 678, 678,
817  297, 678, 678, 546, 580, 595, 678, 678, 386, 546,
818  557, 544, 586, 552, 540, 539, 548, 554, 536, 539,
819  548, 537, 549, 544, 539, 542, 577, 280, 525, 531,
820 
821  538, 573, 524, 535, 522, 533, 563, 562, 678, 678,
822  531, 530, 678, 416, 524, 518, 516, 526, 517, 509,
823  522, 557, 508, 550, 522, 518, 520, 503, 502, 493,
824  500, 678, 501, 498, 495, 508, 495, 678, 493, 491,
825  500, 489, 496, 503, 500, 490, 484, 483, 489, 485,
826  494, 524, 480, 678, 492, 483, 481, 476, 479, 467,
827  472, 484, 519, 470, 471, 292, 466, 470, 478, 513,
828  462, 506, 474, 463, 678, 459, 468, 506, 500, 460,
829  451, 469, 449, 495, 459, 462, 461, 460, 495, 494,
830  493, 678, 448, 441, 678, 444, 453, 488, 482, 678,
831 
832  431, 255, 430, 439, 483, 438, 678, 432, 448, 443,
833  438, 441, 441, 442, 470, 412, 447, 678, 678, 678,
834  414, 399, 397, 395, 678, 407, 441, 408, 384, 389,
835  387, 678, 436, 389, 388, 384, 376, 377, 382, 368,
836  678, 366, 678, 364, 379, 362, 362, 375, 678, 365,
837  361, 407, 370, 678, 371, 353, 397, 347, 326, 350,
838  355, 386, 385, 338, 343, 382, 336, 344, 343, 678,
839  324, 335, 327, 678, 368, 317, 366, 316, 309, 678,
840  678, 313, 309, 678, 305, 353, 352, 301, 314, 349,
841  678, 308, 678, 347, 306, 345, 293, 337, 678, 678,
842 
843  336, 285, 678, 288, 678, 294, 678, 280, 678, 678,
844  328, 284, 269, 243, 678, 167, 119, 678, 64, 678,
845  53, 2, 678, 678, 459, 462, 465, 0, 468, 471,
846  474, 477
847  } ;
848 
849 static const flex_int16_t yy_def[433] =
850  { 0,
851  425, 425, 426, 426, 425, 425, 425, 425, 425, 425,
852  424, 424, 424, 424, 424, 427, 424, 424, 424, 424,
853  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
854  424, 424, 424, 424, 424, 424, 424, 424, 424, 428,
855  424, 424, 424, 429, 15, 424, 45, 45, 45, 45,
856  430, 45, 45, 45, 45, 45, 45, 45, 45, 45,
857  45, 45, 45, 45, 45, 45, 45, 427, 424, 424,
858  424, 424, 424, 424, 431, 424, 424, 424, 424, 424,
859  424, 424, 424, 424, 424, 424, 428, 424, 429, 424,
860  424, 45, 45, 45, 45, 432, 45, 430, 45, 45,
861 
862  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
863  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
864  45, 45, 431, 424, 424, 424, 424, 424, 424, 424,
865  424, 45, 45, 45, 45, 432, 424, 424, 98, 45,
866  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
867  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
868  45, 45, 45, 45, 45, 45, 45, 424, 424, 424,
869  424, 424, 424, 424, 45, 45, 424, 424, 98, 45,
870  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
871  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
872 
873  45, 45, 45, 45, 45, 45, 45, 45, 424, 424,
874  424, 45, 424, 98, 45, 45, 45, 45, 45, 45,
875  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
876  45, 424, 45, 45, 45, 45, 45, 424, 45, 45,
877  45, 45, 45, 45, 424, 45, 45, 45, 45, 45,
878  45, 45, 45, 424, 45, 45, 45, 45, 45, 45,
879  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
880  45, 45, 45, 45, 424, 45, 45, 45, 45, 45,
881  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
882  45, 424, 45, 45, 424, 45, 45, 45, 45, 424,
883 
884  45, 45, 45, 45, 45, 45, 424, 45, 45, 45,
885  45, 45, 45, 45, 45, 45, 45, 424, 424, 424,
886  45, 45, 45, 45, 424, 45, 45, 45, 45, 45,
887  45, 424, 45, 45, 45, 45, 45, 45, 45, 45,
888  424, 45, 424, 45, 45, 45, 45, 45, 424, 45,
889  45, 45, 45, 424, 45, 45, 45, 45, 45, 45,
890  45, 45, 45, 45, 45, 45, 45, 45, 45, 424,
891  45, 45, 45, 424, 45, 45, 45, 45, 45, 424,
892  424, 45, 45, 424, 45, 45, 45, 45, 45, 45,
893  424, 45, 424, 45, 45, 45, 45, 45, 424, 424,
894 
895  45, 45, 424, 45, 424, 45, 424, 45, 424, 424,
896  45, 45, 45, 45, 424, 45, 45, 424, 45, 424,
897  45, 45, 424, 0, 424, 424, 424, 424, 424, 424,
898  424, 424
899  } ;
900 
901 static const flex_int16_t yy_nxt[743] =
902  { 0,
903  87, 13, 14, 13, 424, 15, 16, 423, 17, 18,
904  19, 20, 21, 22, 23, 24, 74, 424, 37, 14,
905  37, 75, 25, 26, 38, 42, 27, 42, 37, 14,
906  37, 28, 90, 29, 38, 30, 13, 14, 13, 79,
907  79, 25, 31, 13, 14, 13, 80, 13, 14, 13,
908  32, 40, 13, 14, 13, 33, 40, 119, 79, 82,
909  81, 91, 34, 35, 13, 14, 13, 120, 15, 16,
910  80, 17, 18, 19, 20, 21, 22, 23, 24, 73,
911  39, 13, 14, 13, 81, 25, 26, 39, 71, 27,
912  13, 14, 13, 80, 28, 81, 29, 41, 30, 42,
913 
914  42, 42, 42, 94, 25, 31, 41, 71, 422, 77,
915  110, 77, 105, 32, 78, 106, 111, 83, 33, 84,
916  421, 113, 94, 114, 420, 34, 35, 44, 44, 44,
917  45, 45, 46, 45, 45, 45, 45, 45, 45, 45,
918  45, 45, 45, 45, 45, 45, 45, 45, 47, 45,
919  45, 48, 45, 45, 45, 45, 45, 45, 49, 50,
920  45, 51, 45, 45, 52, 45, 53, 54, 45, 55,
921  45, 56, 57, 48, 58, 59, 60, 61, 62, 63,
922  64, 65, 66, 67, 45, 45, 45, 45, 45, 45,
923  45, 69, 69, 70, 72, 69, 93, 72, 95, 101,
924 
925  102, 116, 71, 71, 103, 94, 71, 73, 95, 104,
926  73, 124, 141, 142, 90, 117, 71, 95, 419, 71,
927  93, 71, 71, 125, 94, 71, 45, 95, 149, 45,
928  159, 150, 160, 97, 124, 71, 45, 45, 71, 121,
929  45, 122, 45, 91, 45, 45, 125, 45, 418, 45,
930  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
931  45, 45, 45, 69, 126, 70, 45, 77, 124, 77,
932  45, 69, 78, 72, 71, 125, 126, 163, 45, 89,
933  133, 45, 71, 45, 98, 134, 89, 135, 126, 168,
934  168, 127, 169, 71, 169, 164, 176, 295, 128, 170,
935 
936  129, 71, 170, 195, 133, 328, 196, 209, 89, 134,
937  329, 135, 89, 168, 171, 169, 89, 172, 170, 209,
938  176, 173, 233, 417, 89, 416, 209, 89, 296, 89,
939  89, 138, 234, 415, 414, 413, 376, 412, 210, 139,
940  411, 410, 409, 408, 139, 139, 139, 139, 139, 139,
941  407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
942  397, 396, 395, 139, 139, 139, 139, 139, 139, 179,
943  394, 393, 392, 391, 179, 179, 179, 179, 179, 179,
944  377, 390, 389, 388, 387, 386, 385, 384, 383, 382,
945  381, 380, 379, 179, 179, 179, 179, 179, 179, 214,
946 
947  378, 375, 374, 373, 214, 214, 214, 214, 214, 214,
948  372, 371, 370, 369, 368, 367, 366, 365, 364, 363,
949  362, 361, 360, 214, 214, 214, 214, 214, 214, 45,
950  359, 358, 357, 356, 45, 45, 45, 45, 45, 45,
951  355, 354, 353, 352, 351, 350, 349, 348, 347, 346,
952  345, 344, 343, 45, 45, 45, 45, 45, 45, 12,
953  12, 12, 36, 36, 36, 68, 342, 68, 89, 89,
954  89, 96, 96, 96, 123, 341, 123, 136, 136, 136,
955  340, 339, 338, 337, 336, 335, 334, 333, 332, 331,
956  330, 327, 326, 325, 324, 323, 322, 321, 320, 319,
957 
958  318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
959  308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
960  298, 297, 294, 293, 292, 291, 290, 289, 288, 287,
961  286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
962  276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
963  266, 265, 264, 263, 262, 261, 260, 259, 258, 257,
964  256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
965  246, 245, 244, 243, 242, 241, 240, 239, 238, 237,
966  236, 235, 232, 231, 230, 229, 228, 227, 226, 225,
967  224, 223, 222, 221, 220, 219, 218, 217, 216, 215,
968 
969  213, 212, 211, 208, 207, 206, 205, 204, 203, 202,
970  201, 200, 199, 198, 197, 194, 193, 192, 191, 190,
971  189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
972  137, 178, 177, 175, 174, 167, 166, 165, 162, 161,
973  158, 157, 156, 155, 154, 153, 152, 151, 148, 147,
974  146, 145, 144, 143, 140, 137, 132, 131, 130, 78,
975  78, 118, 115, 112, 109, 108, 107, 100, 99, 92,
976  43, 88, 86, 85, 76, 43, 424, 11, 424, 424,
977  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
978  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
979 
980  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
981  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
982  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
983  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
984  424, 424
985  } ;
986 
987 static const flex_int16_t yy_chk[743] =
988  { 0,
989  428, 1, 1, 1, 0, 1, 1, 422, 1, 1,
990  1, 1, 1, 1, 1, 1, 21, 0, 3, 3,
991  3, 21, 1, 1, 3, 13, 1, 13, 4, 4,
992  4, 1, 44, 1, 4, 1, 5, 5, 5, 26,
993  31, 1, 1, 6, 6, 6, 27, 7, 7, 7,
994  1, 7, 8, 8, 8, 1, 8, 65, 26, 31,
995  28, 44, 1, 1, 2, 2, 2, 65, 2, 2,
996  27, 2, 2, 2, 2, 2, 2, 2, 2, 20,
997  5, 9, 9, 9, 28, 2, 2, 6, 20, 2,
998  10, 10, 10, 32, 2, 33, 2, 9, 2, 37,
999 
1000  42, 37, 42, 49, 2, 2, 10, 20, 421, 25,
1001  59, 25, 55, 2, 25, 55, 59, 32, 2, 33,
1002  419, 61, 49, 61, 417, 2, 2, 15, 15, 15,
1003  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1004  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1005  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1006  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1007  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1008  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1009  15, 17, 19, 17, 19, 22, 48, 22, 50, 54,
1010 
1011  54, 63, 17, 19, 54, 66, 22, 69, 67, 54,
1012  73, 79, 100, 100, 89, 63, 69, 50, 416, 73,
1013  48, 17, 19, 80, 66, 22, 45, 67, 107, 45,
1014  116, 107, 116, 51, 79, 69, 45, 45, 73, 66,
1015  51, 67, 45, 89, 45, 45, 80, 45, 414, 45,
1016  45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1017  45, 45, 51, 70, 81, 70, 51, 71, 82, 71,
1018  51, 72, 71, 72, 70, 83, 84, 119, 51, 91,
1019  93, 51, 72, 51, 51, 94, 91, 95, 81, 124,
1020  127, 82, 125, 70, 128, 119, 133, 266, 83, 126,
1021 
1022  84, 72, 129, 155, 93, 302, 155, 168, 91, 94,
1023  302, 95, 91, 124, 127, 125, 91, 128, 126, 171,
1024  133, 129, 198, 413, 91, 412, 168, 91, 266, 91,
1025  91, 98, 198, 411, 408, 406, 359, 404, 171, 98,
1026  402, 401, 398, 397, 98, 98, 98, 98, 98, 98,
1027  396, 395, 394, 392, 390, 389, 388, 387, 386, 385,
1028  383, 382, 379, 98, 98, 98, 98, 98, 98, 139,
1029  378, 377, 376, 375, 139, 139, 139, 139, 139, 139,
1030  359, 373, 372, 371, 369, 368, 367, 366, 365, 364,
1031  363, 362, 361, 139, 139, 139, 139, 139, 139, 179,
1032 
1033  360, 358, 357, 356, 179, 179, 179, 179, 179, 179,
1034  355, 353, 352, 351, 350, 348, 347, 346, 345, 344,
1035  342, 340, 339, 179, 179, 179, 179, 179, 179, 214,
1036  338, 337, 336, 335, 214, 214, 214, 214, 214, 214,
1037  334, 333, 331, 330, 329, 328, 327, 326, 324, 323,
1038  322, 321, 317, 214, 214, 214, 214, 214, 214, 425,
1039  425, 425, 426, 426, 426, 427, 316, 427, 429, 429,
1040  429, 430, 430, 430, 431, 315, 431, 432, 432, 432,
1041  314, 313, 312, 311, 310, 309, 308, 306, 305, 304,
1042  303, 301, 299, 298, 297, 296, 294, 293, 291, 290,
1043 
1044  289, 288, 287, 286, 285, 284, 283, 282, 281, 280,
1045  279, 278, 277, 276, 274, 273, 272, 271, 270, 269,
1046  268, 267, 265, 264, 263, 262, 261, 260, 259, 258,
1047  257, 256, 255, 253, 252, 251, 250, 249, 248, 247,
1048  246, 245, 244, 243, 242, 241, 240, 239, 237, 236,
1049  235, 234, 233, 231, 230, 229, 228, 227, 226, 225,
1050  224, 223, 222, 221, 220, 219, 218, 217, 216, 215,
1051  212, 211, 208, 207, 206, 205, 204, 203, 202, 201,
1052  200, 199, 197, 196, 195, 194, 193, 192, 191, 190,
1053  189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
1054 
1055  176, 175, 174, 167, 166, 165, 164, 163, 162, 161,
1056  160, 159, 158, 157, 156, 154, 153, 152, 151, 150,
1057  149, 148, 147, 146, 145, 144, 143, 142, 141, 140,
1058  136, 135, 134, 132, 130, 122, 121, 120, 118, 117,
1059  115, 114, 113, 112, 111, 110, 109, 108, 106, 105,
1060  104, 103, 102, 101, 99, 96, 92, 87, 86, 78,
1061  77, 64, 62, 60, 58, 57, 56, 53, 52, 47,
1062  43, 41, 39, 38, 24, 14, 11, 424, 424, 424,
1063  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1064  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1065 
1066  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1067  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1068  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1069  424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1070  424, 424
1071  } ;
1072 
1073 static yy_state_type yy_last_accepting_state;
1074 static char *yy_last_accepting_cpos;
1075 
1076 extern int yy_flex_debug;
1078 
1079 static const flex_int16_t yy_rule_linenum[68] =
1080  { 0,
1081  136, 138, 140, 145, 146, 151, 152, 153, 165, 168,
1082  173, 179, 188, 199, 210, 219, 228, 237, 247, 257,
1083  267, 284, 301, 310, 319, 329, 339, 349, 360, 369,
1084  379, 389, 399, 408, 417, 426, 435, 444, 453, 462,
1085  471, 480, 489, 498, 507, 516, 529, 538, 547, 648,
1086  664, 713, 721, 736, 737, 738, 739, 740, 741, 743,
1087  761, 774, 779, 783, 785, 787, 789
1088  } ;
1089 
1090 /* The intent behind this definition is that it'll catch
1091  * any uses of REJECT which flex missed.
1092  */
1093 #define REJECT reject_used_but_not_detected
1094 #define yymore() yymore_used_but_not_detected
1095 #define YY_MORE_ADJ 0
1096 #define YY_RESTORE_YY_MORE_OFFSET
1097 char *yytext;
1098 #line 1 "d2_lexer.ll"
1099 /* Copyright (C) 2017-2021 Internet Systems Consortium, Inc. ("ISC")
1100 
1101  This Source Code Form is subject to the terms of the Mozilla Public
1102  License, v. 2.0. If a copy of the MPL was not distributed with this
1103  file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1104 #line 8 "d2_lexer.ll"
1105 
1106 /* Generated files do not make clang static analyser so happy */
1107 #ifndef __clang_analyzer__
1108 
1109 #include <cctype>
1110 #include <cerrno>
1111 #include <climits>
1112 #include <cstdlib>
1113 #include <string>
1114 #include <d2/parser_context.h>
1115 #include <asiolink/io_address.h>
1116 #include <boost/lexical_cast.hpp>
1117 #include <exceptions/exceptions.h>
1118 
1119 /* Please avoid C++ style comments (// ... eol) as they break flex 2.6.2 */
1120 
1121 /* Work around an incompatibility in flex (at least versions
1122  2.5.31 through 2.5.33): it generates code that does
1123  not conform to C89. See Debian bug 333231
1124  <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
1125 # undef yywrap
1126 # define yywrap() 1
1127 
1128 namespace {
1129 
1130 bool start_token_flag = false;
1131 
1132 isc::d2::D2ParserContext::ParserType start_token_value;
1133 unsigned int comment_start_line = 0;
1134 
1135 };
1136 
1137 /* To avoid the call to exit... oops! */
1138 #define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
1139 #line 1139 "d2_lexer.cc"
1140 /* noyywrap disables automatic rewinding for the next file to parse. Since we
1141  always parse only a single string, there's no need to do any wraps. And
1142  using yywrap requires linking with -lfl, which provides the default yywrap
1143  implementation that always returns 1 anyway. */
1144 /* nounput simplifies the lexer, by removing support for putting a character
1145  back into the input stream. We never use such capability anyway. */
1146 /* batch means that we'll never use the generated lexer interactively. */
1147 /* avoid to get static global variables to remain with C++. */
1148 /* in last resort %option reentrant */
1149 /* Enables debug mode. To see the debug messages, one needs to also set
1150  yy_flex_debug to 1, then the debug messages will be printed on stderr. */
1151 /* I have no idea what this option does, except it was specified in the bison
1152  examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
1153  be on the safe side and keep it. */
1154 #define YY_NO_INPUT 1
1155 
1156 /* These are not token expressions yet, just convenience expressions that
1157  can be used during actual token definitions. Note some can match
1158  incorrect inputs (e.g., IP addresses) which must be checked. */
1159 /* for errors */
1160 #line 93 "d2_lexer.ll"
1161 /* This code run each time a pattern is matched. It updates the location
1162  by moving it ahead by yyleng bytes. yyleng specifies the length of the
1163  currently matched token. */
1164 #define YY_USER_ACTION driver.loc_.columns(yyleng);
1165 #line 1165 "d2_lexer.cc"
1166 #line 1166 "d2_lexer.cc"
1167 
1168 #define INITIAL 0
1169 #define COMMENT 1
1170 #define DIR_ENTER 2
1171 #define DIR_INCLUDE 3
1172 #define DIR_EXIT 4
1173 
1174 #ifndef YY_NO_UNISTD_H
1175 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1176  * down here because we want the user's section 1 to have been scanned first.
1177  * The user has a chance to override it with an option.
1178  */
1179 /* %if-c-only */
1180 #include <unistd.h>
1181 /* %endif */
1182 /* %if-c++-only */
1183 /* %endif */
1184 #endif
1185 
1186 #ifndef YY_EXTRA_TYPE
1187 #define YY_EXTRA_TYPE void *
1188 #endif
1189 
1190 /* %if-c-only Reentrant structure and macros (non-C++). */
1191 /* %if-reentrant */
1192 /* %if-c-only */
1193 
1194 static int yy_init_globals ( void );
1195 
1196 /* %endif */
1197 /* %if-reentrant */
1198 /* %endif */
1199 /* %endif End reentrant structures and macros. */
1200 
1201 /* Accessor methods to globals.
1202  These are made visible to non-reentrant scanners for convenience. */
1203 
1204 int yylex_destroy ( void );
1205 
1206 int yyget_debug ( void );
1207 
1208 void yyset_debug ( int debug_flag );
1209 
1210 YY_EXTRA_TYPE yyget_extra ( void );
1211 
1212 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1213 
1214 FILE *yyget_in ( void );
1215 
1216 void yyset_in ( FILE * _in_str );
1217 
1218 FILE *yyget_out ( void );
1219 
1220 void yyset_out ( FILE * _out_str );
1221 
1222  int yyget_leng ( void );
1223 
1224 char *yyget_text ( void );
1225 
1226 int yyget_lineno ( void );
1227 
1228 void yyset_lineno ( int _line_number );
1229 
1230 /* %if-bison-bridge */
1231 /* %endif */
1232 
1233 /* Macros after this point can all be overridden by user definitions in
1234  * section 1.
1235  */
1236 
1237 #ifndef YY_SKIP_YYWRAP
1238 #ifdef __cplusplus
1239 extern "C" int yywrap ( void );
1240 #else
1241 extern int yywrap ( void );
1242 #endif
1243 #endif
1244 
1245 /* %not-for-header */
1246 #ifndef YY_NO_UNPUT
1247 
1248 #endif
1249 /* %ok-for-header */
1250 
1251 /* %endif */
1252 
1253 #ifndef yytext_ptr
1254 static void yy_flex_strncpy ( char *, const char *, int );
1255 #endif
1256 
1257 #ifdef YY_NEED_STRLEN
1258 static int yy_flex_strlen ( const char * );
1259 #endif
1260 
1261 #ifndef YY_NO_INPUT
1262 /* %if-c-only Standard (non-C++) definition */
1263 /* %not-for-header */
1264 #ifdef __cplusplus
1265 static int yyinput ( void );
1266 #else
1267 static int input ( void );
1268 #endif
1269 /* %ok-for-header */
1270 
1271 /* %endif */
1272 #endif
1273 
1274 /* %if-c-only */
1275 
1276 /* %endif */
1277 
1278 /* Amount of stuff to slurp up with each read. */
1279 #ifndef YY_READ_BUF_SIZE
1280 #ifdef __ia64__
1281 /* On IA-64, the buffer size is 16k, not 8k */
1282 #define YY_READ_BUF_SIZE 16384
1283 #else
1284 #define YY_READ_BUF_SIZE 8192
1285 #endif /* __ia64__ */
1286 #endif
1287 
1288 /* Copy whatever the last rule matched to the standard output. */
1289 #ifndef ECHO
1290 /* %if-c-only Standard (non-C++) definition */
1291 /* This used to be an fputs(), but since the string might contain NUL's,
1292  * we now use fwrite().
1293  */
1294 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1295 /* %endif */
1296 /* %if-c++-only C++ definition */
1297 /* %endif */
1298 #endif
1299 
1300 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1301  * is returned in "result".
1302  */
1303 #ifndef YY_INPUT
1304 #define YY_INPUT(buf,result,max_size) \
1305 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1306  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1307  { \
1308  int c = '*'; \
1309  int n; \
1310  for ( n = 0; n < max_size && \
1311  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1312  buf[n] = (char) c; \
1313  if ( c == '\n' ) \
1314  buf[n++] = (char) c; \
1315  if ( c == EOF && ferror( yyin ) ) \
1316  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1317  result = n; \
1318  } \
1319  else \
1320  { \
1321  errno=0; \
1322  while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1323  { \
1324  if( errno != EINTR) \
1325  { \
1326  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1327  break; \
1328  } \
1329  errno=0; \
1330  clearerr(yyin); \
1331  } \
1332  }\
1333 \
1334 /* %if-c++-only C++ definition \ */\
1335 /* %endif */
1336 
1337 #endif
1338 
1339 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1340  * we don't want an extra ';' after the "return" because that will cause
1341  * some compilers to complain about unreachable statements.
1342  */
1343 #ifndef yyterminate
1344 #define yyterminate() return YY_NULL
1345 #endif
1346 
1347 /* Number of entries by which start-condition stack grows. */
1348 #ifndef YY_START_STACK_INCR
1349 #define YY_START_STACK_INCR 25
1350 #endif
1351 
1352 /* Report a fatal error. */
1353 #ifndef YY_FATAL_ERROR
1354 /* %if-c-only */
1355 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1356 /* %endif */
1357 /* %if-c++-only */
1358 /* %endif */
1359 #endif
1360 
1361 /* %if-tables-serialization structures and prototypes */
1362 /* %not-for-header */
1363 /* %ok-for-header */
1364 
1365 /* %not-for-header */
1366 /* %tables-yydmap generated elements */
1367 /* %endif */
1368 /* end tables serialization structures and prototypes */
1369 
1370 /* %ok-for-header */
1371 
1372 /* Default declaration of generated scanner - a define so the user can
1373  * easily add parameters.
1374  */
1375 #ifndef YY_DECL
1376 #define YY_DECL_IS_OURS 1
1377 /* %if-c-only Standard (non-C++) definition */
1378 
1379 extern int yylex (void);
1380 
1381 #define YY_DECL int yylex (void)
1382 /* %endif */
1383 /* %if-c++-only C++ definition */
1384 /* %endif */
1385 #endif /* !YY_DECL */
1386 
1387 /* Code executed at the beginning of each rule, after yytext and yyleng
1388  * have been set up.
1389  */
1390 #ifndef YY_USER_ACTION
1391 #define YY_USER_ACTION
1392 #endif
1393 
1394 /* Code executed at the end of each rule. */
1395 #ifndef YY_BREAK
1396 #define YY_BREAK /*LINTED*/break;
1397 #endif
1398 
1399 /* %% [6.0] YY_RULE_SETUP definition goes here */
1400 #define YY_RULE_SETUP \
1401  YY_USER_ACTION
1402 
1403 /* %not-for-header */
1406 YY_DECL
1408  yy_state_type yy_current_state;
1409  char *yy_cp, *yy_bp;
1410  int yy_act;
1411 
1412  if ( !(yy_init) )
1413  {
1414  (yy_init) = 1;
1415 
1416 #ifdef YY_USER_INIT
1417  YY_USER_INIT;
1418 #endif
1419 
1420  if ( ! (yy_start) )
1421  (yy_start) = 1; /* first start state */
1422 
1423  if ( ! yyin )
1424 /* %if-c-only */
1425  yyin = stdin;
1426 /* %endif */
1427 /* %if-c++-only */
1428 /* %endif */
1429 
1430  if ( ! yyout )
1431 /* %if-c-only */
1432  yyout = stdout;
1433 /* %endif */
1434 /* %if-c++-only */
1435 /* %endif */
1436 
1437  if ( ! YY_CURRENT_BUFFER ) {
1441  }
1442 
1444  }
1445 
1446  {
1447 /* %% [7.0] user's declarations go here */
1448 #line 99 "d2_lexer.ll"
1449 
1450 
1451 
1452 #line 103 "d2_lexer.ll"
1453  /* This part of the code is copied over to the verbatim to the top
1454  of the generated yylex function. Explanation:
1455  http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
1456 
1457  /* Code run each time yylex is called. */
1458  driver.loc_.step();
1459 
1460  if (start_token_flag) {
1461  start_token_flag = false;
1462  switch (start_token_value) {
1463  case D2ParserContext::PARSER_JSON:
1464  default:
1465  return isc::d2::D2Parser::make_TOPLEVEL_JSON(driver.loc_);
1466  case D2ParserContext::PARSER_DHCPDDNS:
1467  return isc::d2::D2Parser::make_TOPLEVEL_DHCPDDNS(driver.loc_);
1468  case D2ParserContext::PARSER_SUB_DHCPDDNS:
1469  return isc::d2::D2Parser::make_SUB_DHCPDDNS(driver.loc_);
1470  case D2ParserContext::PARSER_TSIG_KEY:
1471  return isc::d2::D2Parser::make_SUB_TSIG_KEY(driver.loc_);
1472  case D2ParserContext::PARSER_TSIG_KEYS:
1473  return isc::d2::D2Parser::make_SUB_TSIG_KEYS(driver.loc_);
1474  case D2ParserContext::PARSER_DDNS_DOMAIN:
1475  return isc::d2::D2Parser::make_SUB_DDNS_DOMAIN(driver.loc_);
1476  case D2ParserContext::PARSER_DDNS_DOMAINS:
1477  return isc::d2::D2Parser::make_SUB_DDNS_DOMAINS(driver.loc_);
1478  case D2ParserContext::PARSER_DNS_SERVER:
1479  return isc::d2::D2Parser::make_SUB_DNS_SERVER(driver.loc_);
1480  case D2ParserContext::PARSER_HOOKS_LIBRARY:
1481  return isc::d2::D2Parser::make_SUB_HOOKS_LIBRARY(driver.loc_);
1482  }
1483  }
1484 
1485 
1486 #line 1486 "d2_lexer.cc"
1487 
1488  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1489  {
1490 /* %% [8.0] yymore()-related code goes here */
1491  yy_cp = (yy_c_buf_p);
1492 
1493  /* Support of yytext. */
1494  *yy_cp = (yy_hold_char);
1495 
1496  /* yy_bp points to the position in yy_ch_buf of the start of
1497  * the current run.
1498  */
1499  yy_bp = yy_cp;
1500 
1501 /* %% [9.0] code to set up and find next match goes here */
1502  yy_current_state = (yy_start);
1503 yy_match:
1504  do
1505  {
1506  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1507  if ( yy_accept[yy_current_state] )
1508  {
1509  (yy_last_accepting_state) = yy_current_state;
1510  (yy_last_accepting_cpos) = yy_cp;
1511  }
1512  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1513  {
1514  yy_current_state = (int) yy_def[yy_current_state];
1515  if ( yy_current_state >= 425 )
1516  yy_c = yy_meta[yy_c];
1517  }
1518  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1519  ++yy_cp;
1520  }
1521  while ( yy_current_state != 424 );
1522  yy_cp = (yy_last_accepting_cpos);
1523  yy_current_state = (yy_last_accepting_state);
1524 
1525 yy_find_action:
1526 /* %% [10.0] code to find the action number goes here */
1527  yy_act = yy_accept[yy_current_state];
1528 
1530 
1531 /* %% [11.0] code for yylineno update goes here */
1532 
1533 do_action: /* This label is used only to access EOF actions. */
1534 
1535 /* %% [12.0] debug code goes here */
1536  if ( yy_flex_debug )
1537  {
1538  if ( yy_act == 0 )
1539  fprintf( stderr, "--scanner backing up\n" );
1540  else if ( yy_act < 68 )
1541  fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1542  (long)yy_rule_linenum[yy_act], yytext );
1543  else if ( yy_act == 68 )
1544  fprintf( stderr, "--accepting default rule (\"%s\")\n",
1545  yytext );
1546  else if ( yy_act == 69 )
1547  fprintf( stderr, "--(end of buffer or a NUL)\n" );
1548  else
1549  fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1550  }
1551 
1552  switch ( yy_act )
1553  { /* beginning of action switch */
1554 /* %% [13.0] actions go here */
1555  case 0: /* must back up */
1556  /* undo the effects of YY_DO_BEFORE_ACTION */
1557  *yy_cp = (yy_hold_char);
1558  yy_cp = (yy_last_accepting_cpos);
1559  yy_current_state = (yy_last_accepting_state);
1560  goto yy_find_action;
1561 
1562 case 1:
1564 #line 136 "d2_lexer.ll"
1565 ;
1566  YY_BREAK
1567 case 2:
1569 #line 138 "d2_lexer.ll"
1570 ;
1571  YY_BREAK
1572 case 3:
1574 #line 140 "d2_lexer.ll"
1575 {
1576  BEGIN(COMMENT);
1577  comment_start_line = driver.loc_.end.line;;
1578 }
1579  YY_BREAK
1580 case 4:
1582 #line 145 "d2_lexer.ll"
1583 BEGIN(INITIAL);
1584  YY_BREAK
1585 case 5:
1587 #line 146 "d2_lexer.ll"
1588 ;
1589  YY_BREAK
1590 case YY_STATE_EOF(COMMENT):
1591 #line 147 "d2_lexer.ll"
1592 {
1593  isc_throw(D2ParseError, "Comment not closed. (/* in line " << comment_start_line);
1594 }
1595  YY_BREAK
1596 case 6:
1598 #line 151 "d2_lexer.ll"
1599 BEGIN(DIR_ENTER);
1600  YY_BREAK
1601 case 7:
1603 #line 152 "d2_lexer.ll"
1605  YY_BREAK
1606 case 8:
1608 #line 153 "d2_lexer.ll"
1609 {
1610  /* Include directive. */
1611 
1612  /* Extract the filename. */
1613  std::string tmp(yytext+1);
1614  tmp.resize(tmp.size() - 1);
1615 
1616  driver.includeFile(tmp);
1617 }
1618  YY_BREAK
1619 case YY_STATE_EOF(DIR_ENTER):
1621 case YY_STATE_EOF(DIR_EXIT):
1622 #line 162 "d2_lexer.ll"
1623 {
1624  isc_throw(D2ParseError, "Directive not closed.");
1625 }
1626  YY_BREAK
1627 case 9:
1629 #line 165 "d2_lexer.ll"
1630 BEGIN(INITIAL);
1631  YY_BREAK
1632 case 10:
1634 #line 168 "d2_lexer.ll"
1635 {
1636  /* Ok, we found a with space. Let's ignore it and update loc variable. */
1637  driver.loc_.step();
1638 }
1639  YY_BREAK
1640 case 11:
1641 /* rule 11 can match eol */
1643 #line 173 "d2_lexer.ll"
1644 {
1645  /* Newline found. Let's update the location and continue. */
1646  driver.loc_.lines(yyleng);
1647  driver.loc_.step();
1648 }
1649  YY_BREAK
1650 case 12:
1652 #line 179 "d2_lexer.ll"
1653 {
1654  switch(driver.ctx_) {
1656  return isc::d2::D2Parser::make_DHCPDDNS(driver.loc_);
1657  default:
1658  return isc::d2::D2Parser::make_STRING("DhcpDdns", driver.loc_);
1659  }
1660 }
1661  YY_BREAK
1662 case 13:
1664 #line 188 "d2_lexer.ll"
1665 {
1666  switch(driver.ctx_) {
1670  return isc::d2::D2Parser::make_IP_ADDRESS(driver.loc_);
1671  default:
1672  return isc::d2::D2Parser::make_STRING("ip-address", driver.loc_);
1673  }
1674 }
1675  YY_BREAK
1676 case 14:
1678 #line 199 "d2_lexer.ll"
1679 {
1680  switch(driver.ctx_) {
1684  return isc::d2::D2Parser::make_PORT(driver.loc_);
1685  default:
1686  return isc::d2::D2Parser::make_STRING("port", driver.loc_);
1687  }
1688 }
1689  YY_BREAK
1690 case 15:
1692 #line 210 "d2_lexer.ll"
1693 {
1694  switch(driver.ctx_) {
1696  return isc::d2::D2Parser::make_DNS_SERVER_TIMEOUT(driver.loc_);
1697  default:
1698  return isc::d2::D2Parser::make_STRING("dns-server-timeout", driver.loc_);
1699  }
1700 }
1701  YY_BREAK
1702 case 16:
1704 #line 219 "d2_lexer.ll"
1705 {
1706  switch(driver.ctx_) {
1708  return isc::d2::D2Parser::make_NCR_PROTOCOL(driver.loc_);
1709  default:
1710  return isc::d2::D2Parser::make_STRING("ncr-protocol", driver.loc_);
1711  }
1712 }
1713  YY_BREAK
1714 case 17:
1716 #line 228 "d2_lexer.ll"
1717 {
1718  switch(driver.ctx_) {
1720  return isc::d2::D2Parser::make_NCR_FORMAT(driver.loc_);
1721  default:
1722  return isc::d2::D2Parser::make_STRING("ncr-format", driver.loc_);
1723  }
1724 }
1725  YY_BREAK
1726 case 18:
1728 #line 237 "d2_lexer.ll"
1729 {
1730  /* dhcp-ddns value keywords are case insensitive */
1731  if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
1732  return isc::d2::D2Parser::make_UDP(driver.loc_);
1733  }
1734  std::string tmp(yytext+1);
1735  tmp.resize(tmp.size() - 1);
1736  return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1737 }
1738  YY_BREAK
1739 case 19:
1741 #line 247 "d2_lexer.ll"
1742 {
1743  /* dhcp-ddns value keywords are case insensitive */
1744  if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
1745  return isc::d2::D2Parser::make_TCP(driver.loc_);
1746  }
1747  std::string tmp(yytext+1);
1748  tmp.resize(tmp.size() - 1);
1749  return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1750 }
1751  YY_BREAK
1752 case 20:
1754 #line 257 "d2_lexer.ll"
1755 {
1756  /* dhcp-ddns value keywords are case insensitive */
1757  if (driver.ctx_ == isc::d2::D2ParserContext::NCR_FORMAT) {
1758  return isc::d2::D2Parser::make_JSON(driver.loc_);
1759  }
1760  std::string tmp(yytext+1);
1761  tmp.resize(tmp.size() - 1);
1762  return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1763 }
1764  YY_BREAK
1765 case 21:
1767 #line 267 "d2_lexer.ll"
1768 {
1769  switch(driver.ctx_) {
1779  return isc::d2::D2Parser::make_USER_CONTEXT(driver.loc_);
1780  default:
1781  return isc::d2::D2Parser::make_STRING("user-context", driver.loc_);
1782  }
1783 }
1784  YY_BREAK
1785 case 22:
1787 #line 284 "d2_lexer.ll"
1788 {
1789  switch(driver.ctx_) {
1799  return isc::d2::D2Parser::make_COMMENT(driver.loc_);
1800  default:
1801  return isc::d2::D2Parser::make_STRING("comment", driver.loc_);
1802  }
1803 }
1804  YY_BREAK
1805 case 23:
1807 #line 301 "d2_lexer.ll"
1808 {
1809  switch(driver.ctx_) {
1811  return isc::d2::D2Parser::make_FORWARD_DDNS(driver.loc_);
1812  default:
1813  return isc::d2::D2Parser::make_STRING("forward-ddns", driver.loc_);
1814  }
1815 }
1816  YY_BREAK
1817 case 24:
1819 #line 310 "d2_lexer.ll"
1820 {
1821  switch(driver.ctx_) {
1823  return isc::d2::D2Parser::make_REVERSE_DDNS(driver.loc_);
1824  default:
1825  return isc::d2::D2Parser::make_STRING("reverse-ddns", driver.loc_);
1826  }
1827 }
1828  YY_BREAK
1829 case 25:
1831 #line 319 "d2_lexer.ll"
1832 {
1833  switch(driver.ctx_) {
1836  return isc::d2::D2Parser::make_DDNS_DOMAINS(driver.loc_);
1837  default:
1838  return isc::d2::D2Parser::make_STRING("ddns-domains", driver.loc_);
1839  }
1840 }
1841  YY_BREAK
1842 case 26:
1844 #line 329 "d2_lexer.ll"
1845 {
1846  switch(driver.ctx_) {
1849  return isc::d2::D2Parser::make_KEY_NAME(driver.loc_);
1850  default:
1851  return isc::d2::D2Parser::make_STRING("key-name", driver.loc_);
1852  }
1853 }
1854  YY_BREAK
1855 case 27:
1857 #line 339 "d2_lexer.ll"
1858 {
1859  switch(driver.ctx_) {
1862  return isc::d2::D2Parser::make_DNS_SERVERS(driver.loc_);
1863  default:
1864  return isc::d2::D2Parser::make_STRING("dns-servers", driver.loc_);
1865  }
1866 }
1867  YY_BREAK
1868 case 28:
1870 #line 349 "d2_lexer.ll"
1871 {
1872  switch(driver.ctx_) {
1875  return isc::d2::D2Parser::make_HOSTNAME(driver.loc_);
1876  default:
1877  return isc::d2::D2Parser::make_STRING("hostname", driver.loc_);
1878  }
1879 }
1880  YY_BREAK
1881 case 29:
1883 #line 360 "d2_lexer.ll"
1884 {
1885  switch(driver.ctx_) {
1887  return isc::d2::D2Parser::make_TSIG_KEYS(driver.loc_);
1888  default:
1889  return isc::d2::D2Parser::make_STRING("tsig-keys", driver.loc_);
1890  }
1891 }
1892  YY_BREAK
1893 case 30:
1895 #line 369 "d2_lexer.ll"
1896 {
1897  switch(driver.ctx_) {
1900  return isc::d2::D2Parser::make_ALGORITHM(driver.loc_);
1901  default:
1902  return isc::d2::D2Parser::make_STRING("algorithm", driver.loc_);
1903  }
1904 }
1905  YY_BREAK
1906 case 31:
1908 #line 379 "d2_lexer.ll"
1909 {
1910  switch(driver.ctx_) {
1913  return isc::d2::D2Parser::make_DIGEST_BITS(driver.loc_);
1914  default:
1915  return isc::d2::D2Parser::make_STRING("digest-bits", driver.loc_);
1916  }
1917 }
1918  YY_BREAK
1919 case 32:
1921 #line 389 "d2_lexer.ll"
1922 {
1923  switch(driver.ctx_) {
1926  return isc::d2::D2Parser::make_SECRET(driver.loc_);
1927  default:
1928  return isc::d2::D2Parser::make_STRING("secret", driver.loc_);
1929  }
1930 }
1931  YY_BREAK
1932 case 33:
1934 #line 399 "d2_lexer.ll"
1935 {
1936  switch(driver.ctx_) {
1938  return isc::d2::D2Parser::make_CONTROL_SOCKET(driver.loc_);
1939  default:
1940  return isc::d2::D2Parser::make_STRING("control-socket", driver.loc_);
1941  }
1942 }
1943  YY_BREAK
1944 case 34:
1946 #line 408 "d2_lexer.ll"
1947 {
1948  switch(driver.ctx_) {
1950  return isc::d2::D2Parser::make_SOCKET_TYPE(driver.loc_);
1951  default:
1952  return isc::d2::D2Parser::make_STRING("socket-type", driver.loc_);
1953  }
1954 }
1955  YY_BREAK
1956 case 35:
1958 #line 417 "d2_lexer.ll"
1959 {
1960  switch(driver.ctx_) {
1962  return isc::d2::D2Parser::make_SOCKET_NAME(driver.loc_);
1963  default:
1964  return isc::d2::D2Parser::make_STRING("socket-name", driver.loc_);
1965  }
1966 }
1967  YY_BREAK
1968 case 36:
1970 #line 426 "d2_lexer.ll"
1971 {
1972  switch(driver.ctx_) {
1974  return isc::d2::D2Parser::make_HOOKS_LIBRARIES(driver.loc_);
1975  default:
1976  return isc::d2::D2Parser::make_STRING("hooks-libraries", driver.loc_);
1977  }
1978 }
1979  YY_BREAK
1980 case 37:
1982 #line 435 "d2_lexer.ll"
1983 {
1984  switch(driver.ctx_) {
1986  return isc::d2::D2Parser::make_PARAMETERS(driver.loc_);
1987  default:
1988  return isc::d2::D2Parser::make_STRING("parameters", driver.loc_);
1989  }
1990 }
1991  YY_BREAK
1992 case 38:
1994 #line 444 "d2_lexer.ll"
1995 {
1996  switch(driver.ctx_) {
1998  return isc::d2::D2Parser::make_LIBRARY(driver.loc_);
1999  default:
2000  return isc::d2::D2Parser::make_STRING("library", driver.loc_);
2001  }
2002 }
2003  YY_BREAK
2004 case 39:
2006 #line 453 "d2_lexer.ll"
2007 {
2008  switch(driver.ctx_) {
2010  return isc::d2::D2Parser::make_LOGGERS(driver.loc_);
2011  default:
2012  return isc::d2::D2Parser::make_STRING("loggers", driver.loc_);
2013  }
2014 }
2015  YY_BREAK
2016 case 40:
2018 #line 462 "d2_lexer.ll"
2019 {
2020  switch(driver.ctx_) {
2022  return isc::d2::D2Parser::make_OUTPUT_OPTIONS(driver.loc_);
2023  default:
2024  return isc::d2::D2Parser::make_STRING("output_options", driver.loc_);
2025  }
2026 }
2027  YY_BREAK
2028 case 41:
2030 #line 471 "d2_lexer.ll"
2031 {
2032  switch(driver.ctx_) {
2034  return isc::d2::D2Parser::make_OUTPUT(driver.loc_);
2035  default:
2036  return isc::d2::D2Parser::make_STRING("output", driver.loc_);
2037  }
2038 }
2039  YY_BREAK
2040 case 42:
2042 #line 480 "d2_lexer.ll"
2043 {
2044  switch(driver.ctx_) {
2046  return isc::d2::D2Parser::make_FLUSH(driver.loc_);
2047  default:
2048  return isc::d2::D2Parser::make_STRING("flush", driver.loc_);
2049  }
2050 }
2051  YY_BREAK
2052 case 43:
2054 #line 489 "d2_lexer.ll"
2055 {
2056  switch(driver.ctx_) {
2058  return isc::d2::D2Parser::make_MAXSIZE(driver.loc_);
2059  default:
2060  return isc::d2::D2Parser::make_STRING("maxsize", driver.loc_);
2061  }
2062 }
2063  YY_BREAK
2064 case 44:
2066 #line 498 "d2_lexer.ll"
2067 {
2068  switch(driver.ctx_) {
2070  return isc::d2::D2Parser::make_MAXVER(driver.loc_);
2071  default:
2072  return isc::d2::D2Parser::make_STRING("maxver", driver.loc_);
2073  }
2074 }
2075  YY_BREAK
2076 case 45:
2078 #line 507 "d2_lexer.ll"
2079 {
2080  switch(driver.ctx_) {
2082  return isc::d2::D2Parser::make_PATTERN(driver.loc_);
2083  default:
2084  return isc::d2::D2Parser::make_STRING("pattern", driver.loc_);
2085  }
2086 }
2087  YY_BREAK
2088 case 46:
2090 #line 516 "d2_lexer.ll"
2091 {
2092  switch(driver.ctx_) {
2098  return isc::d2::D2Parser::make_NAME(driver.loc_);
2099  default:
2100  return isc::d2::D2Parser::make_STRING("name", driver.loc_);
2101  }
2102 }
2103  YY_BREAK
2104 case 47:
2106 #line 529 "d2_lexer.ll"
2107 {
2108  switch(driver.ctx_) {
2110  return isc::d2::D2Parser::make_DEBUGLEVEL(driver.loc_);
2111  default:
2112  return isc::d2::D2Parser::make_STRING("debuglevel", driver.loc_);
2113  }
2114 }
2115  YY_BREAK
2116 case 48:
2118 #line 538 "d2_lexer.ll"
2119 {
2120  switch(driver.ctx_) {
2122  return isc::d2::D2Parser::make_SEVERITY(driver.loc_);
2123  default:
2124  return isc::d2::D2Parser::make_STRING("severity", driver.loc_);
2125  }
2126 }
2127  YY_BREAK
2128 case 49:
2130 #line 547 "d2_lexer.ll"
2131 {
2132  /* A string has been matched. It contains the actual string and single quotes.
2133  We need to get those quotes out of the way and just use its content, e.g.
2134  for 'foo' we should get foo */
2135  std::string raw(yytext+1);
2136  size_t len = raw.size() - 1;
2137  raw.resize(len);
2138  std::string decoded;
2139  decoded.reserve(len);
2140  for (size_t pos = 0; pos < len; ++pos) {
2141  int b = 0;
2142  char c = raw[pos];
2143  switch (c) {
2144  case '"':
2145  /* impossible condition */
2146  driver.error(driver.loc_, "Bad quote in \"" + raw + "\"");
2147  break;
2148  case '\\':
2149  ++pos;
2150  if (pos >= len) {
2151  /* impossible condition */
2152  driver.error(driver.loc_, "Overflow escape in \"" + raw + "\"");
2153  }
2154  c = raw[pos];
2155  switch (c) {
2156  case '"':
2157  case '\\':
2158  case '/':
2159  decoded.push_back(c);
2160  break;
2161  case 'b':
2162  decoded.push_back('\b');
2163  break;
2164  case 'f':
2165  decoded.push_back('\f');
2166  break;
2167  case 'n':
2168  decoded.push_back('\n');
2169  break;
2170  case 'r':
2171  decoded.push_back('\r');
2172  break;
2173  case 't':
2174  decoded.push_back('\t');
2175  break;
2176  case 'u':
2177  /* support only \u0000 to \u00ff */
2178  ++pos;
2179  if (pos + 4 > len) {
2180  /* impossible condition */
2181  driver.error(driver.loc_,
2182  "Overflow unicode escape in \"" + raw + "\"");
2183  }
2184  if ((raw[pos] != '0') || (raw[pos + 1] != '0')) {
2185  driver.error(driver.loc_,
2186  "Unsupported unicode escape in \"" + raw + "\"",
2187  pos + 1);
2188  }
2189  pos += 2;
2190  c = raw[pos];
2191  if ((c >= '0') && (c <= '9')) {
2192  b = (c - '0') << 4;
2193  } else if ((c >= 'A') && (c <= 'F')) {
2194  b = (c - 'A' + 10) << 4;
2195  } else if ((c >= 'a') && (c <= 'f')) {
2196  b = (c - 'a' + 10) << 4;
2197  } else {
2198  /* impossible condition */
2199  driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2200  }
2201  pos++;
2202  c = raw[pos];
2203  if ((c >= '0') && (c <= '9')) {
2204  b |= c - '0';
2205  } else if ((c >= 'A') && (c <= 'F')) {
2206  b |= c - 'A' + 10;
2207  } else if ((c >= 'a') && (c <= 'f')) {
2208  b |= c - 'a' + 10;
2209  } else {
2210  /* impossible condition */
2211  driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2212  }
2213  decoded.push_back(static_cast<char>(b & 0xff));
2214  break;
2215  default:
2216  /* impossible condition */
2217  driver.error(driver.loc_, "Bad escape in \"" + raw + "\"");
2218  }
2219  break;
2220  default:
2221  if ((c >= 0) && (c < 0x20)) {
2222  /* impossible condition */
2223  driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
2224  }
2225  decoded.push_back(c);
2226  }
2227  }
2228 
2229  return isc::d2::D2Parser::make_STRING(decoded, driver.loc_);
2230 }
2231  YY_BREAK
2232 case 50:
2233 /* rule 50 can match eol */
2235 #line 648 "d2_lexer.ll"
2236 {
2237  /* Bad string with a forbidden control character inside */
2238  std::string raw(yytext+1);
2239  size_t len = raw.size() - 1;
2240  size_t pos = 0;
2241  for (; pos < len; ++pos) {
2242  char c = raw[pos];
2243  if ((c >= 0) && (c < 0x20)) {
2244  break;
2245  }
2246  }
2247  driver.error(driver.loc_,
2248  "Invalid control in " + std::string(yytext),
2249  pos + 1);
2250 }
2251  YY_BREAK
2252 case 51:
2253 /* rule 51 can match eol */
2255 #line 664 "d2_lexer.ll"
2256 {
2257  /* Bad string with a bad escape inside */
2258  std::string raw(yytext+1);
2259  size_t len = raw.size() - 1;
2260  size_t pos = 0;
2261  bool found = false;
2262  for (; pos < len; ++pos) {
2263  if (found) {
2264  break;
2265  }
2266  char c = raw[pos];
2267  if (c == '\\') {
2268  ++pos;
2269  c = raw[pos];
2270  switch (c) {
2271  case '"':
2272  case '\\':
2273  case '/':
2274  case 'b':
2275  case 'f':
2276  case 'n':
2277  case 'r':
2278  case 't':
2279  break;
2280  case 'u':
2281  if ((pos + 4 > len) ||
2282  !std::isxdigit(raw[pos + 1]) ||
2283  !std::isxdigit(raw[pos + 2]) ||
2284  !std::isxdigit(raw[pos + 3]) ||
2285  !std::isxdigit(raw[pos + 4])) {
2286  found = true;
2287  }
2288  break;
2289  default:
2290  found = true;
2291  break;
2292  }
2293  }
2294  }
2295  /* The rule stops on the first " including on \" so add ... in this case */
2296  std::string trailer = "";
2297  if (raw[len - 1] == '\\') {
2298  trailer = "...";
2299  }
2300  driver.error(driver.loc_,
2301  "Bad escape in " + std::string(yytext) + trailer,
2302  pos);
2303 }
2304  YY_BREAK
2305 case 52:
2307 #line 713 "d2_lexer.ll"
2308 {
2309  /* Bad string with an open escape at the end */
2310  std::string raw(yytext+1);
2311  driver.error(driver.loc_,
2312  "Overflow escape in " + std::string(yytext),
2313  raw.size() + 1);
2314 }
2315  YY_BREAK
2316 case 53:
2318 #line 721 "d2_lexer.ll"
2319 {
2320  /* Bad string with an open unicode escape at the end */
2321  std::string raw(yytext+1);
2322  size_t pos = raw.size() - 1;
2323  for (; pos > 0; --pos) {
2324  char c = raw[pos];
2325  if (c == 'u') {
2326  break;
2327  }
2328  }
2329  driver.error(driver.loc_,
2330  "Overflow unicode escape in " + std::string(yytext),
2331  pos + 1);
2332 }
2333  YY_BREAK
2334 case 54:
2336 #line 736 "d2_lexer.ll"
2337 { return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
2338  YY_BREAK
2339 case 55:
2341 #line 737 "d2_lexer.ll"
2342 { return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
2343  YY_BREAK
2344 case 56:
2346 #line 738 "d2_lexer.ll"
2347 { return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
2348  YY_BREAK
2349 case 57:
2351 #line 739 "d2_lexer.ll"
2352 { return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
2353  YY_BREAK
2354 case 58:
2356 #line 740 "d2_lexer.ll"
2357 { return isc::d2::D2Parser::make_COMMA(driver.loc_); }
2358  YY_BREAK
2359 case 59:
2361 #line 741 "d2_lexer.ll"
2362 { return isc::d2::D2Parser::make_COLON(driver.loc_); }
2363  YY_BREAK
2364 case 60:
2366 #line 743 "d2_lexer.ll"
2367 {
2368  /* An integer was found. */
2369  std::string tmp(yytext);
2370  int64_t integer = 0;
2371  try {
2372  /* In substring we want to use negative values (e.g. -1).
2373  In enterprise-id we need to use values up to 0xffffffff.
2374  To cover both of those use cases, we need at least
2375  int64_t. */
2376  integer = boost::lexical_cast<int64_t>(tmp);
2377  } catch (const boost::bad_lexical_cast &) {
2378  driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
2379  }
2380 
2381  /* The parser needs the string form as double conversion is no lossless */
2382  return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
2383 }
2384  YY_BREAK
2385 case 61:
2387 #line 761 "d2_lexer.ll"
2388 {
2389  /* A floating point was found. */
2390  std::string tmp(yytext);
2391  double fp = 0.0;
2392  try {
2393  fp = boost::lexical_cast<double>(tmp);
2394  } catch (const boost::bad_lexical_cast &) {
2395  driver.error(driver.loc_, "Failed to convert " + tmp + " to a floating point.");
2396  }
2397 
2398  return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
2399 }
2400  YY_BREAK
2401 case 62:
2403 #line 774 "d2_lexer.ll"
2404 {
2405  string tmp(yytext);
2406  return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
2407 }
2408  YY_BREAK
2409 case 63:
2411 #line 779 "d2_lexer.ll"
2412 {
2413  return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
2414 }
2415  YY_BREAK
2416 case 64:
2418 #line 783 "d2_lexer.ll"
2419 driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
2420  YY_BREAK
2421 case 65:
2423 #line 785 "d2_lexer.ll"
2424 driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
2425  YY_BREAK
2426 case 66:
2428 #line 787 "d2_lexer.ll"
2429 driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
2430  YY_BREAK
2431 case 67:
2433 #line 789 "d2_lexer.ll"
2434 driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
2435  YY_BREAK
2436 case YY_STATE_EOF(INITIAL):
2437 #line 791 "d2_lexer.ll"
2438 {
2439  if (driver.states_.empty()) {
2440  return isc::d2::D2Parser::make_END(driver.loc_);
2441  }
2442  driver.loc_ = driver.locs_.back();
2443  driver.locs_.pop_back();
2444  driver.file_ = driver.files_.back();
2445  driver.files_.pop_back();
2446  if (driver.sfile_) {
2447  fclose(driver.sfile_);
2448  driver.sfile_ = 0;
2449  }
2450  if (!driver.sfiles_.empty()) {
2451  driver.sfile_ = driver.sfiles_.back();
2452  driver.sfiles_.pop_back();
2453  }
2454  d2_parser__delete_buffer(YY_CURRENT_BUFFER);
2455  d2_parser__switch_to_buffer(driver.states_.back());
2456  driver.states_.pop_back();
2457 
2458  BEGIN(DIR_EXIT);
2459 }
2460  YY_BREAK
2461 case 68:
2463 #line 814 "d2_lexer.ll"
2464 ECHO;
2465  YY_BREAK
2466 #line 2466 "d2_lexer.cc"
2467 
2468  case YY_END_OF_BUFFER:
2469  {
2470  /* Amount of text matched not including the EOB char. */
2471  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2472 
2473  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2474  *yy_cp = (yy_hold_char);
2476 
2477  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2478  {
2479  /* We're scanning a new file or input source. It's
2480  * possible that this happened because the user
2481  * just pointed yyin at a new source and called
2482  * yylex(). If so, then we have to assure
2483  * consistency between YY_CURRENT_BUFFER and our
2484  * globals. Here is the right place to do so, because
2485  * this is the first action (other than possibly a
2486  * back-up) that will match for the new input source.
2487  */
2488  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2489 /* %if-c-only */
2490  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2491 /* %endif */
2492 /* %if-c++-only */
2493 /* %endif */
2494  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2495  }
2496 
2497  /* Note that here we test for yy_c_buf_p "<=" to the position
2498  * of the first EOB in the buffer, since yy_c_buf_p will
2499  * already have been incremented past the NUL character
2500  * (since all states make transitions on EOB to the
2501  * end-of-buffer state). Contrast this with the test
2502  * in input().
2503  */
2504  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2505  { /* This was really a NUL. */
2506  yy_state_type yy_next_state;
2507 
2508  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2509 
2510  yy_current_state = yy_get_previous_state( );
2511 
2512  /* Okay, we're now positioned to make the NUL
2513  * transition. We couldn't have
2514  * yy_get_previous_state() go ahead and do it
2515  * for us because it doesn't know how to deal
2516  * with the possibility of jamming (and we don't
2517  * want to build jamming into it because then it
2518  * will run more slowly).
2519  */
2520 
2521  yy_next_state = yy_try_NUL_trans( yy_current_state );
2522 
2523  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2524 
2525  if ( yy_next_state )
2526  {
2527  /* Consume the NUL. */
2528  yy_cp = ++(yy_c_buf_p);
2529  yy_current_state = yy_next_state;
2530  goto yy_match;
2531  }
2532 
2533  else
2534  {
2535 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
2536  yy_cp = (yy_last_accepting_cpos);
2537  yy_current_state = (yy_last_accepting_state);
2538  goto yy_find_action;
2539  }
2540  }
2541 
2542  else switch ( yy_get_next_buffer( ) )
2543  {
2544  case EOB_ACT_END_OF_FILE:
2545  {
2546  (yy_did_buffer_switch_on_eof) = 0;
2547 
2548  if ( yywrap( ) )
2549  {
2550  /* Note: because we've taken care in
2551  * yy_get_next_buffer() to have set up
2552  * yytext, we can now set up
2553  * yy_c_buf_p so that if some total
2554  * hoser (like flex itself) wants to
2555  * call the scanner after we return the
2556  * YY_NULL, it'll still work - another
2557  * YY_NULL will get returned.
2558  */
2559  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2560 
2561  yy_act = YY_STATE_EOF(YY_START);
2562  goto do_action;
2563  }
2564 
2565  else
2566  {
2567  if ( ! (yy_did_buffer_switch_on_eof) )
2568  YY_NEW_FILE;
2569  }
2570  break;
2571  }
2572 
2573  case EOB_ACT_CONTINUE_SCAN:
2574  (yy_c_buf_p) =
2575  (yytext_ptr) + yy_amount_of_matched_text;
2576 
2577  yy_current_state = yy_get_previous_state( );
2578 
2579  yy_cp = (yy_c_buf_p);
2580  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2581  goto yy_match;
2582 
2583  case EOB_ACT_LAST_MATCH:
2584  (yy_c_buf_p) =
2585  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2586 
2587  yy_current_state = yy_get_previous_state( );
2588 
2589  yy_cp = (yy_c_buf_p);
2590  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2591  goto yy_find_action;
2592  }
2593  break;
2594  }
2595 
2596  default:
2598  "fatal flex scanner internal error--no action found" );
2599  } /* end of action switch */
2600  } /* end of scanning one token */
2601  } /* end of user's declarations */
2602 } /* end of yylex */
2603 /* %ok-for-header */
2604 
2605 /* %if-c++-only */
2606 /* %not-for-header */
2607 /* %ok-for-header */
2608 
2609 /* %endif */
2610 
2611 /* yy_get_next_buffer - try to read in a new buffer
2612  *
2613  * Returns a code representing an action:
2614  * EOB_ACT_LAST_MATCH -
2615  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2616  * EOB_ACT_END_OF_FILE - end of file
2617  */
2618 /* %if-c-only */
2619 static int yy_get_next_buffer (void)
2620 /* %endif */
2621 /* %if-c++-only */
2622 /* %endif */
2623 {
2624  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2625  char *source = (yytext_ptr);
2626  int number_to_move, i;
2627  int ret_val;
2628 
2629  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2631  "fatal flex scanner internal error--end of buffer missed" );
2632 
2633  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2634  { /* Don't try to fill the buffer, so this is an EOF. */
2635  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2636  {
2637  /* We matched a single character, the EOB, so
2638  * treat this as a final EOF.
2639  */
2640  return EOB_ACT_END_OF_FILE;
2641  }
2642 
2643  else
2644  {
2645  /* We matched some text prior to the EOB, first
2646  * process it.
2647  */
2648  return EOB_ACT_LAST_MATCH;
2649  }
2650  }
2651 
2652  /* Try to read more data. */
2653 
2654  /* First move last chars to start of buffer. */
2655  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2656 
2657  for ( i = 0; i < number_to_move; ++i )
2658  *(dest++) = *(source++);
2659 
2660  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2661  /* don't do the read, it's not guaranteed to return an EOF,
2662  * just force an EOF
2663  */
2664  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2665 
2666  else
2667  {
2668  int num_to_read =
2669  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2670 
2671  while ( num_to_read <= 0 )
2672  { /* Not enough room in the buffer - grow it. */
2673 
2674  /* just a shorter name for the current buffer */
2675  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2676 
2677  int yy_c_buf_p_offset =
2678  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2679 
2680  if ( b->yy_is_our_buffer )
2681  {
2682  int new_size = b->yy_buf_size * 2;
2683 
2684  if ( new_size <= 0 )
2685  b->yy_buf_size += b->yy_buf_size / 8;
2686  else
2687  b->yy_buf_size *= 2;
2688 
2689  b->yy_ch_buf = (char *)
2690  /* Include room in for 2 EOB chars. */
2691  yyrealloc( (void *) b->yy_ch_buf,
2692  (yy_size_t) (b->yy_buf_size + 2) );
2693  }
2694  else
2695  /* Can't grow it, we don't own it. */
2696  b->yy_ch_buf = NULL;
2697 
2698  if ( ! b->yy_ch_buf )
2700  "fatal error - scanner input buffer overflow" );
2701 
2702  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2703 
2704  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2705  number_to_move - 1;
2706 
2707  }
2708 
2709  if ( num_to_read > YY_READ_BUF_SIZE )
2710  num_to_read = YY_READ_BUF_SIZE;
2711 
2712  /* Read in more data. */
2713  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2714  (yy_n_chars), num_to_read );
2715 
2716  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2717  }
2718 
2719  if ( (yy_n_chars) == 0 )
2720  {
2721  if ( number_to_move == YY_MORE_ADJ )
2722  {
2723  ret_val = EOB_ACT_END_OF_FILE;
2724  yyrestart( yyin );
2725  }
2726 
2727  else
2728  {
2729  ret_val = EOB_ACT_LAST_MATCH;
2730  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2732  }
2733  }
2734 
2735  else
2736  ret_val = EOB_ACT_CONTINUE_SCAN;
2737 
2738  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2739  /* Extend the array by 50%, plus the number we really need. */
2740  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2741  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2742  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2743  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2744  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2745  /* "- 2" to take care of EOB's */
2746  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2747  }
2748 
2749  (yy_n_chars) += number_to_move;
2750  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2751  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2752 
2753  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2754 
2755  return ret_val;
2756 }
2757 
2758 /* yy_get_previous_state - get the state just before the EOB char was reached */
2759 
2760 /* %if-c-only */
2761 /* %not-for-header */
2762  static yy_state_type yy_get_previous_state (void)
2763 /* %endif */
2764 /* %if-c++-only */
2765 /* %endif */
2766 {
2767  yy_state_type yy_current_state;
2768  char *yy_cp;
2769 
2770 /* %% [15.0] code to get the start state into yy_current_state goes here */
2771  yy_current_state = (yy_start);
2772 
2773  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2774  {
2775 /* %% [16.0] code to find the next state goes here */
2776  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2777  if ( yy_accept[yy_current_state] )
2778  {
2779  (yy_last_accepting_state) = yy_current_state;
2780  (yy_last_accepting_cpos) = yy_cp;
2781  }
2782  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2783  {
2784  yy_current_state = (int) yy_def[yy_current_state];
2785  if ( yy_current_state >= 425 )
2786  yy_c = yy_meta[yy_c];
2787  }
2788  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2789  }
2790 
2791  return yy_current_state;
2792 }
2793 
2794 /* yy_try_NUL_trans - try to make a transition on the NUL character
2795  *
2796  * synopsis
2797  * next_state = yy_try_NUL_trans( current_state );
2798  */
2799 /* %if-c-only */
2800  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2801 /* %endif */
2802 /* %if-c++-only */
2803 /* %endif */
2804 {
2805  int yy_is_jam;
2806  /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
2807  char *yy_cp = (yy_c_buf_p);
2808 
2809  YY_CHAR yy_c = 1;
2810  if ( yy_accept[yy_current_state] )
2811  {
2812  (yy_last_accepting_state) = yy_current_state;
2813  (yy_last_accepting_cpos) = yy_cp;
2814  }
2815  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2816  {
2817  yy_current_state = (int) yy_def[yy_current_state];
2818  if ( yy_current_state >= 425 )
2819  yy_c = yy_meta[yy_c];
2820  }
2821  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2822  yy_is_jam = (yy_current_state == 424);
2823 
2824  return yy_is_jam ? 0 : yy_current_state;
2825 }
2826 
2827 #ifndef YY_NO_UNPUT
2828 /* %if-c-only */
2829 
2830 /* %endif */
2831 #endif
2832 
2833 /* %if-c-only */
2834 #ifndef YY_NO_INPUT
2835 #ifdef __cplusplus
2836  static int yyinput (void)
2837 #else
2838  static int input (void)
2839 #endif
2840 
2841 /* %endif */
2842 /* %if-c++-only */
2843 /* %endif */
2844 {
2845  int c;
2846 
2847  *(yy_c_buf_p) = (yy_hold_char);
2848 
2849  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2850  {
2851  /* yy_c_buf_p now points to the character we want to return.
2852  * If this occurs *before* the EOB characters, then it's a
2853  * valid NUL; if not, then we've hit the end of the buffer.
2854  */
2855  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2856  /* This was really a NUL. */
2857  *(yy_c_buf_p) = '\0';
2858 
2859  else
2860  { /* need more input */
2861  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2862  ++(yy_c_buf_p);
2863 
2864  switch ( yy_get_next_buffer( ) )
2865  {
2866  case EOB_ACT_LAST_MATCH:
2867  /* This happens because yy_g_n_b()
2868  * sees that we've accumulated a
2869  * token and flags that we need to
2870  * try matching the token before
2871  * proceeding. But for input(),
2872  * there's no matching to consider.
2873  * So convert the EOB_ACT_LAST_MATCH
2874  * to EOB_ACT_END_OF_FILE.
2875  */
2876 
2877  /* Reset buffer status. */
2878  yyrestart( yyin );
2879 
2880  /*FALLTHROUGH*/
2881 
2882  case EOB_ACT_END_OF_FILE:
2883  {
2884  if ( yywrap( ) )
2885  return 0;
2886 
2887  if ( ! (yy_did_buffer_switch_on_eof) )
2888  YY_NEW_FILE;
2889 #ifdef __cplusplus
2890  return yyinput();
2891 #else
2892  return input();
2893 #endif
2894  }
2895 
2896  case EOB_ACT_CONTINUE_SCAN:
2897  (yy_c_buf_p) = (yytext_ptr) + offset;
2898  break;
2899  }
2900  }
2901  }
2902 
2903  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2904  *(yy_c_buf_p) = '\0'; /* preserve yytext */
2905  (yy_hold_char) = *++(yy_c_buf_p);
2906 
2907 /* %% [19.0] update BOL and yylineno */
2908 
2909  return c;
2910 }
2911 /* %if-c-only */
2912 #endif /* ifndef YY_NO_INPUT */
2913 /* %endif */
2914 
2920 /* %if-c-only */
2921  void yyrestart (FILE * input_file )
2922 /* %endif */
2923 /* %if-c++-only */
2924 /* %endif */
2925 {
2926 
2927  if ( ! YY_CURRENT_BUFFER ){
2931  }
2932 
2933  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2935 }
2936 
2937 /* %if-c++-only */
2938 /* %endif */
2939 
2944 /* %if-c-only */
2945  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2946 /* %endif */
2947 /* %if-c++-only */
2948 /* %endif */
2949 {
2950 
2951  /* TODO. We should be able to replace this entire function body
2952  * with
2953  * yypop_buffer_state();
2954  * yypush_buffer_state(new_buffer);
2955  */
2957  if ( YY_CURRENT_BUFFER == new_buffer )
2958  return;
2959 
2960  if ( YY_CURRENT_BUFFER )
2961  {
2962  /* Flush out information for old buffer. */
2963  *(yy_c_buf_p) = (yy_hold_char);
2964  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2965  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2966  }
2967 
2968  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2970 
2971  /* We don't actually know whether we did this switch during
2972  * EOF (yywrap()) processing, but the only time this flag
2973  * is looked at is after yywrap() is called, so it's safe
2974  * to go ahead and always set it.
2975  */
2976  (yy_did_buffer_switch_on_eof) = 1;
2977 }
2978 
2979 /* %if-c-only */
2980 static void yy_load_buffer_state (void)
2981 /* %endif */
2982 /* %if-c++-only */
2983 /* %endif */
2984 {
2985  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2986  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2987 /* %if-c-only */
2988  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2989 /* %endif */
2990 /* %if-c++-only */
2991 /* %endif */
2992  (yy_hold_char) = *(yy_c_buf_p);
2993 }
2994 
3001 /* %if-c-only */
3002  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3003 /* %endif */
3004 /* %if-c++-only */
3005 /* %endif */
3006 {
3007  YY_BUFFER_STATE b;
3008 
3009  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3010  if ( ! b )
3011  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3012 
3013  b->yy_buf_size = size;
3014 
3015  /* yy_ch_buf has to be 2 characters longer than the size given because
3016  * we need to put in 2 end-of-buffer characters.
3017  */
3018  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
3019  if ( ! b->yy_ch_buf )
3020  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3021 
3022  b->yy_is_our_buffer = 1;
3023 
3024  yy_init_buffer( b, file );
3025 
3026  return b;
3027 }
3028 
3029 /* %if-c++-only */
3030 /* %endif */
3031 
3036 /* %if-c-only */
3037  void yy_delete_buffer (YY_BUFFER_STATE b )
3038 /* %endif */
3039 /* %if-c++-only */
3040 /* %endif */
3041 {
3042 
3043  if ( ! b )
3044  return;
3045 
3046  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3048 
3049  if ( b->yy_is_our_buffer )
3050  yyfree( (void *) b->yy_ch_buf );
3051 
3052  yyfree( (void *) b );
3053 }
3054 
3055 /* Initializes or reinitializes a buffer.
3056  * This function is sometimes called more than once on the same buffer,
3057  * such as during a yyrestart() or at EOF.
3058  */
3059 /* %if-c-only */
3060  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3061 /* %endif */
3062 /* %if-c++-only */
3063 /* %endif */
3064 
3065 {
3066  int oerrno = errno;
3067 
3068  yy_flush_buffer( b );
3069 
3070 /* %if-c-only */
3071  b->yy_input_file = file;
3072 /* %endif */
3073 /* %if-c++-only */
3074 /* %endif */
3075  b->yy_fill_buffer = 1;
3076 
3077  /* If b is the current buffer, then yy_init_buffer was _probably_
3078  * called from yyrestart() or through yy_get_next_buffer.
3079  * In that case, we don't want to reset the lineno or column.
3080  */
3081  if (b != YY_CURRENT_BUFFER){
3082  b->yy_bs_lineno = 1;
3083  b->yy_bs_column = 0;
3084  }
3085 
3086 /* %if-c-only */
3087 
3088  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3089 
3090 /* %endif */
3091 /* %if-c++-only */
3092 /* %endif */
3093  errno = oerrno;
3094 }
3095 
3100 /* %if-c-only */
3101  void yy_flush_buffer (YY_BUFFER_STATE b )
3102 /* %endif */
3103 /* %if-c++-only */
3104 /* %endif */
3105 {
3106  if ( ! b )
3107  return;
3108 
3109  b->yy_n_chars = 0;
3110 
3111  /* We always need two end-of-buffer characters. The first causes
3112  * a transition to the end-of-buffer state. The second causes
3113  * a jam in that state.
3114  */
3117 
3118  b->yy_buf_pos = &b->yy_ch_buf[0];
3119 
3120  b->yy_at_bol = 1;
3122 
3123  if ( b == YY_CURRENT_BUFFER )
3125 }
3126 
3127 /* %if-c-or-c++ */
3134 /* %if-c-only */
3135 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3136 /* %endif */
3137 /* %if-c++-only */
3138 /* %endif */
3139 {
3140  if (new_buffer == NULL)
3141  return;
3142 
3144 
3145  /* This block is copied from yy_switch_to_buffer. */
3146  if ( YY_CURRENT_BUFFER )
3147  {
3148  /* Flush out information for old buffer. */
3149  *(yy_c_buf_p) = (yy_hold_char);
3150  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3151  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3152  }
3153 
3154  /* Only push if top exists. Otherwise, replace top. */
3155  if (YY_CURRENT_BUFFER)
3156  (yy_buffer_stack_top)++;
3157  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3158 
3159  /* copied from yy_switch_to_buffer. */
3161  (yy_did_buffer_switch_on_eof) = 1;
3162 }
3163 /* %endif */
3164 
3165 /* %if-c-or-c++ */
3170 /* %if-c-only */
3172 /* %endif */
3173 /* %if-c++-only */
3174 /* %endif */
3175 {
3176  if (!YY_CURRENT_BUFFER)
3177  return;
3178 
3180  YY_CURRENT_BUFFER_LVALUE = NULL;
3181  if ((yy_buffer_stack_top) > 0)
3182  --(yy_buffer_stack_top);
3183 
3184  if (YY_CURRENT_BUFFER) {
3186  (yy_did_buffer_switch_on_eof) = 1;
3187  }
3188 }
3189 /* %endif */
3190 
3191 /* %if-c-or-c++ */
3192 /* Allocates the stack if it does not exist.
3193  * Guarantees space for at least one push.
3194  */
3195 /* %if-c-only */
3196 static void yyensure_buffer_stack (void)
3197 /* %endif */
3198 /* %if-c++-only */
3199 /* %endif */
3200 {
3201  yy_size_t num_to_alloc;
3202 
3203  if (!(yy_buffer_stack)) {
3204 
3205  /* First allocation is just for 2 elements, since we don't know if this
3206  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3207  * immediate realloc on the next call.
3208  */
3209  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3210  (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3211  (num_to_alloc * sizeof(struct yy_buffer_state*)
3212  );
3213  if ( ! (yy_buffer_stack) )
3214  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3215 
3216  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3217 
3218  (yy_buffer_stack_max) = num_to_alloc;
3219  (yy_buffer_stack_top) = 0;
3220  return;
3221  }
3222 
3223  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3224 
3225  /* Increase the buffer to prepare for a possible push. */
3226  yy_size_t grow_size = 8 /* arbitrary grow size */;
3227 
3228  num_to_alloc = (yy_buffer_stack_max) + grow_size;
3229  (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3230  ((yy_buffer_stack),
3231  num_to_alloc * sizeof(struct yy_buffer_state*)
3232  );
3233  if ( ! (yy_buffer_stack) )
3234  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3235 
3236  /* zero only the new slots.*/
3237  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3238  (yy_buffer_stack_max) = num_to_alloc;
3239  }
3240 }
3241 /* %endif */
3242 
3243 /* %if-c-only */
3250 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3251 {
3252  YY_BUFFER_STATE b;
3253 
3254  if ( size < 2 ||
3255  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3256  base[size-1] != YY_END_OF_BUFFER_CHAR )
3257  /* They forgot to leave room for the EOB's. */
3258  return NULL;
3259 
3260  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3261  if ( ! b )
3262  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3263 
3264  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3265  b->yy_buf_pos = b->yy_ch_buf = base;
3266  b->yy_is_our_buffer = 0;
3267  b->yy_input_file = NULL;
3268  b->yy_n_chars = b->yy_buf_size;
3269  b->yy_is_interactive = 0;
3270  b->yy_at_bol = 1;
3271  b->yy_fill_buffer = 0;
3273 
3274  yy_switch_to_buffer( b );
3275 
3276  return b;
3277 }
3278 /* %endif */
3279 
3280 /* %if-c-only */
3289 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3290 {
3291 
3292  return yy_scan_bytes( yystr, (int) strlen(yystr) );
3293 }
3294 /* %endif */
3295 
3296 /* %if-c-only */
3304 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3305 {
3306  YY_BUFFER_STATE b;
3307  char *buf;
3308  yy_size_t n;
3309  int i;
3310 
3311  /* Get memory for full buffer, including space for trailing EOB's. */
3312  n = (yy_size_t) (_yybytes_len + 2);
3313  buf = (char *) yyalloc( n );
3314  if ( ! buf )
3315  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3316 
3317  for ( i = 0; i < _yybytes_len; ++i )
3318  buf[i] = yybytes[i];
3319 
3320  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3321 
3322  b = yy_scan_buffer( buf, n );
3323  if ( ! b )
3324  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3325 
3326  /* It's okay to grow etc. this buffer, and we should throw it
3327  * away when we're done.
3328  */
3329  b->yy_is_our_buffer = 1;
3330 
3331  return b;
3332 }
3333 /* %endif */
3334 
3335 #ifndef YY_EXIT_FAILURE
3336 #define YY_EXIT_FAILURE 2
3337 #endif
3338 
3339 /* %if-c-only */
3340 static void yynoreturn yy_fatal_error (const char* msg )
3341 {
3342  fprintf( stderr, "%s\n", msg );
3343  exit( YY_EXIT_FAILURE );
3344 }
3345 /* %endif */
3346 /* %if-c++-only */
3347 /* %endif */
3348 
3349 /* Redefine yyless() so it works in section 3 code. */
3350 
3351 #undef yyless
3352 #define yyless(n) \
3353  do \
3354  { \
3355  /* Undo effects of setting up yytext. */ \
3356  int yyless_macro_arg = (n); \
3357  YY_LESS_LINENO(yyless_macro_arg);\
3358  yytext[yyleng] = (yy_hold_char); \
3359  (yy_c_buf_p) = yytext + yyless_macro_arg; \
3360  (yy_hold_char) = *(yy_c_buf_p); \
3361  *(yy_c_buf_p) = '\0'; \
3362  yyleng = yyless_macro_arg; \
3363  } \
3364  while ( 0 )
3365 
3366 /* Accessor methods (get/set functions) to struct members. */
3367 
3368 /* %if-c-only */
3369 /* %if-reentrant */
3370 /* %endif */
3371 
3375 int yyget_lineno (void)
3376 {
3377 
3378  return yylineno;
3379 }
3380 
3384 FILE *yyget_in (void)
3385 {
3386  return yyin;
3387 }
3388 
3392 FILE *yyget_out (void)
3393 {
3394  return yyout;
3395 }
3396 
3400 int yyget_leng (void)
3401 {
3402  return yyleng;
3403 }
3404 
3409 char *yyget_text (void)
3410 {
3411  return yytext;
3412 }
3413 
3414 /* %if-reentrant */
3415 /* %endif */
3416 
3421 void yyset_lineno (int _line_number )
3422 {
3423 
3424  yylineno = _line_number;
3425 }
3426 
3433 void yyset_in (FILE * _in_str )
3434 {
3435  yyin = _in_str ;
3436 }
3437 
3438 void yyset_out (FILE * _out_str )
3439 {
3440  yyout = _out_str ;
3441 }
3442 
3443 int yyget_debug (void)
3444 {
3445  return yy_flex_debug;
3446 }
3447 
3448 void yyset_debug (int _bdebug )
3449 {
3450  yy_flex_debug = _bdebug ;
3451 }
3452 
3453 /* %endif */
3454 
3455 /* %if-reentrant */
3456 /* %if-bison-bridge */
3457 /* %endif */
3458 /* %endif if-c-only */
3459 
3460 /* %if-c-only */
3461 static int yy_init_globals (void)
3462 {
3463  /* Initialization is the same as for the non-reentrant scanner.
3464  * This function is called from yylex_destroy(), so don't allocate here.
3465  */
3466 
3467  (yy_buffer_stack) = NULL;
3468  (yy_buffer_stack_top) = 0;
3469  (yy_buffer_stack_max) = 0;
3470  (yy_c_buf_p) = NULL;
3471  (yy_init) = 0;
3472  (yy_start) = 0;
3473 
3474 /* Defined in main.c */
3475 #ifdef YY_STDINIT
3476  yyin = stdin;
3477  yyout = stdout;
3478 #else
3479  yyin = NULL;
3480  yyout = NULL;
3481 #endif
3482 
3483  /* For future reference: Set errno on error, since we are called by
3484  * yylex_init()
3485  */
3486  return 0;
3487 }
3488 /* %endif */
3489 
3490 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
3491 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3492 int yylex_destroy (void)
3493 {
3494 
3495  /* Pop the buffer stack, destroying each element. */
3496  while(YY_CURRENT_BUFFER){
3498  YY_CURRENT_BUFFER_LVALUE = NULL;
3500  }
3501 
3502  /* Destroy the stack itself. */
3503  yyfree((yy_buffer_stack) );
3504  (yy_buffer_stack) = NULL;
3505 
3506  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3507  * yylex() is called, initialization will occur. */
3508  yy_init_globals( );
3509 
3510 /* %if-reentrant */
3511 /* %endif */
3512  return 0;
3513 }
3514 /* %endif */
3515 
3516 /*
3517  * Internal utility routines.
3518  */
3519 
3520 #ifndef yytext_ptr
3521 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3522 {
3523 
3524  int i;
3525  for ( i = 0; i < n; ++i )
3526  s1[i] = s2[i];
3527 }
3528 #endif
3529 
3530 #ifdef YY_NEED_STRLEN
3531 static int yy_flex_strlen (const char * s )
3532 {
3533  int n;
3534  for ( n = 0; s[n]; ++n )
3535  ;
3536 
3537  return n;
3538 }
3539 #endif
3540 
3541 void *yyalloc (yy_size_t size )
3542 {
3543  return malloc(size);
3544 }
3545 
3546 void *yyrealloc (void * ptr, yy_size_t size )
3547 {
3548 
3549  /* The cast to (char *) in the following accommodates both
3550  * implementations that use char* generic pointers, and those
3551  * that use void* generic pointers. It works with the latter
3552  * because both ANSI C and C++ allow castless assignment from
3553  * any pointer type to void*, and deal with argument conversions
3554  * as though doing an assignment.
3555  */
3556  return realloc(ptr, size);
3557 }
3558 
3559 void yyfree (void * ptr )
3560 {
3561  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3562 }
3563 
3564 /* %if-tables-serialization definitions */
3565 /* %define-yytables The name for this specific scanner's tables. */
3566 #define YYTABLES_NAME "yytables"
3567 /* %endif */
3568 
3569 /* %ok-for-header */
3570 
3571 #line 814 "d2_lexer.ll"
3572 
3573 
3574 using namespace isc::dhcp;
3575 
3576 void
3577 D2ParserContext::scanStringBegin(const std::string& str, ParserType parser_type)
3578 {
3579  start_token_flag = true;
3580  start_token_value = parser_type;
3581 
3582  file_ = "<string>";
3583  sfile_ = 0;
3584  loc_.initialize(&file_);
3585  yy_flex_debug = trace_scanning_;
3586  YY_BUFFER_STATE buffer;
3587  buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3588  if (!buffer) {
3589  fatal("cannot scan string");
3590  /* fatal() throws an exception so this can't be reached */
3591  }
3592 }
3593 
3594 void
3595 D2ParserContext::scanFileBegin(FILE * f,
3596  const std::string& filename,
3597  ParserType parser_type)
3598 {
3599  start_token_flag = true;
3600  start_token_value = parser_type;
3601 
3602  file_ = filename;
3603  sfile_ = f;
3604  loc_.initialize(&file_);
3605  yy_flex_debug = trace_scanning_;
3606  YY_BUFFER_STATE buffer;
3607 
3608  /* See d2_lexer.cc header for available definitions */
3609  buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
3610  if (!buffer) {
3611  fatal("cannot scan file " + filename);
3612  }
3613  d2_parser__switch_to_buffer(buffer);
3614 }
3615 
3616 void
3617 D2ParserContext::scanEnd() {
3618  if (sfile_)
3619  fclose(sfile_);
3620  sfile_ = 0;
3621  static_cast<void>(d2_parser_lex_destroy());
3622  /* Close files */
3623  while (!sfiles_.empty()) {
3624  FILE* f = sfiles_.back();
3625  if (f) {
3626  fclose(f);
3627  }
3628  sfiles_.pop_back();
3629  }
3630  /* Delete states */
3631  while (!states_.empty()) {
3632  d2_parser__delete_buffer(states_.back());
3633  states_.pop_back();
3634  }
3635 }
3636 
3637 void
3638 D2ParserContext::includeFile(const std::string& filename) {
3639  if (states_.size() > 10) {
3640  fatal("Too many nested include.");
3641  }
3642 
3643  FILE* f = fopen(filename.c_str(), "r");
3644  if (!f) {
3645  fatal("Can't open include file " + filename);
3646  }
3647  if (sfile_) {
3648  sfiles_.push_back(sfile_);
3649  }
3650  sfile_ = f;
3651  states_.push_back(YY_CURRENT_BUFFER);
3652  YY_BUFFER_STATE buffer;
3653  buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
3654  if (!buffer) {
3655  fatal( "Can't scan include file " + filename);
3656  }
3657  d2_parser__switch_to_buffer(buffer);
3658  files_.push_back(file_);
3659  file_ = filename;
3660  locs_.push_back(loc_);
3661  loc_.initialize(&file_);
3662 
3663  BEGIN(INITIAL);
3664 }
3665 
3666 namespace {
3668 class Dummy {
3669  /* cppcheck-suppress unusedPrivateFunction */
3670  void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
3671 };
3672 }
3673 #endif /* !__clang_analyzer__ */
3674 
#define YY_INPUT(buf, result, max_size)
Definition: d2_lexer.cc:1304
#define yytext
Definition: d2_lexer.cc:31
Used while parsing a list of tsig-keys.
#define COMMENT
Definition: d2_lexer.cc:1169
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition: d2_parser.h:2002
#define yylineno
Definition: d2_lexer.cc:28
FILE * yy_input_file
Definition: agent_lexer.cc:491
Used while parsing DhcpDdns/loggers/output_options structures.
#define YY_START
Definition: d2_lexer.cc:419
short int flex_int16_t
Definition: d2_lexer.cc:333
Used while parsing content of a dns-server.
static symbol_type make_PATTERN(const location_type &l)
Definition: d2_parser.h:1852
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:1537
#define YY_STATE_EOF(state)
Definition: d2_lexer.cc:422
#define YY_EXIT_FAILURE
Definition: d2_lexer.cc:3336
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition: d2_parser.h:1642
struct yy_buffer_state * YY_BUFFER_STATE
Definition: d2_lexer.cc:446
#define yyget_debug
Definition: d2_lexer.cc:158
unsigned short int flex_uint16_t
Definition: d2_lexer.cc:336
#define yyrealloc
Definition: d2_lexer.cc:34
#define yypop_buffer_state
Definition: d2_lexer.cc:22
#define YY_RESTORE_YY_MORE_OFFSET
Definition: d2_lexer.cc:1096
static symbol_type make_PORT(const location_type &l)
Definition: d2_parser.h:1342
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition: d2_parser.h:1912
#define YY_NEW_FILE
Definition: d2_lexer.cc:424
#define yyout
Definition: d2_lexer.cc:29
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1267
static symbol_type make_COLON(const location_type &l)
Definition: d2_parser.h:1222
#define yyset_debug
Definition: d2_lexer.cc:164
#define yyget_out
Definition: d2_lexer.cc:194
#define YY_CURRENT_BUFFER
Definition: d2_lexer.cc:575
static symbol_type make_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1312
static symbol_type make_NAME(const location_type &l)
Definition: d2_parser.h:1732
#define YY_BUF_SIZE
Definition: d2_lexer.cc:436
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition: d2_parser.h:1597
int yy_bs_lineno
The line count.
Definition: agent_lexer.cc:529
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1957
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition: d2_parser.h:1357
Used while parsing content of a tsig-key.
#define YY_DECL
Definition: d2_lexer.cc:1381
static symbol_type make_SECRET(const location_type &l)
Definition: d2_parser.h:1612
#define YY_EXTRA_TYPE
Definition: d2_lexer.cc:1187
#define YY_READ_BUF_SIZE
Definition: d2_lexer.cc:1284
Used while parsing DhcpDdns/loggers structures.
unsigned char flex_uint8_t
Definition: d2_lexer.cc:335
char * yy_bp
Definition: d2_lexer.cc:1409
int flex_int32_t
Definition: agent_lexer.cc:334
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition: d2_parser.h:1372
#define YY_SC_TO_UI(c)
Definition: d2_lexer.cc:400
#define EOB_ACT_CONTINUE_SCAN
Definition: d2_lexer.cc:464
#define yyset_extra
Definition: d2_lexer.cc:176
#define yyget_leng
Definition: d2_lexer.cc:206
#define DIR_INCLUDE
Definition: d2_lexer.cc:1171
Used while parsing content of a ddns-domain.
#define yy_switch_to_buffer
Definition: d2_lexer.cc:20
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Used while parsing DhcpDdns/hooks-libraries.
#define yyleng
Definition: d2_lexer.cc:26
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition: d2_parser.h:1447
#define yy_delete_buffer
Definition: d2_lexer.cc:13
Used while parsing content of DhcpDdns/reverse-ddns.
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition: d2_parser.h:1477
#define yylex_destroy
Definition: d2_lexer.cc:152
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Definition: d2_parser.h:1627
Used while parsing content of a control-socket.
int yy_bs_column
The column count.
Definition: agent_lexer.cc:530
Used while parsing DhcpDdns/ncr-protocol.
static symbol_type make_ALGORITHM(const location_type &l)
Definition: d2_parser.h:1582
#define yyget_in
Definition: d2_lexer.cc:182
#define yyget_lineno
Definition: d2_lexer.cc:218
#define YY_RULE_SETUP
Definition: d2_lexer.cc:1400
#define yywrap
Definition: d2_lexer.cc:1126
#define yy_flush_buffer
Definition: d2_lexer.cc:18
flex_uint8_t YY_CHAR
Definition: agent_lexer.cc:656
#define yyset_out
Definition: d2_lexer.cc:200
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition: d2_parser.h:1672
#define yyget_text
Definition: d2_lexer.cc:212
#define DIR_ENTER
Definition: d2_lexer.cc:1170
#define yy_scan_bytes
Definition: d2_lexer.cc:16
#define yyset_lineno
Definition: d2_lexer.cc:224
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition: d2_parser.h:1747
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition: d2_parser.h:2032
#define yypush_buffer_state
Definition: d2_lexer.cc:21
#define yyget_extra
Definition: d2_lexer.cc:170
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition: d2_parser.h:1972
int yy_act
Definition: d2_lexer.cc:1410
#define YY_END_OF_BUFFER_CHAR
Definition: d2_lexer.cc:425
static symbol_type make_TCP(const location_type &l)
Definition: d2_parser.h:1402
#define yy_create_buffer
Definition: d2_lexer.cc:12
#define yynoreturn
Definition: d2_lexer.cc:388
ParserType
Defines currently supported scopes.
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1252
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition: d2_parser.h:1492
static symbol_type make_LIBRARY(const location_type &l)
Definition: d2_parser.h:1687
#define YY_BUFFER_NORMAL
Definition: d2_lexer.cc:540
#define EOB_ACT_END_OF_FILE
Definition: d2_lexer.cc:465
static symbol_type make_END(const location_type &l)
Definition: d2_parser.h:1162
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition: d2_parser.h:1327
#define yyrestart
Definition: d2_lexer.cc:30
#define yy_load_buffer_state
Definition: d2_lexer.cc:19
Used while parsing DhcpDdns/ncr-format.
int flex_int32_t
Definition: d2_lexer.cc:334
#define YY_BUFFER_EOF_PENDING
Definition: d2_lexer.cc:551
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1507
#define yyensure_buffer_stack
Definition: d2_lexer.cc:23
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition: d2_parser.h:1942
char * yy_cp
Definition: d2_lexer.cc:1409
unsigned int flex_uint32_t
Definition: d2_lexer.cc:337
#define yy_flex_debug
Definition: d2_lexer.cc:24
#define yy_init_buffer
Definition: d2_lexer.cc:17
flex_uint8_t YY_CHAR
Definition: d2_lexer.cc:656
static symbol_type make_COMMA(const location_type &l)
Definition: d2_parser.h:1207
size_t yy_size_t
Definition: agent_lexer.cc:451
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1237
Evaluation error exception raised when trying to parse.
Used while parsing content of DhcpDdns.
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition: d2_parser.h:1417
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1882
unsigned char flex_uint8_t
Definition: agent_lexer.cc:335
#define yylex
Definition: d2_lexer.cc:27
Used while parsing a list of ddns-domains.
size_t yy_size_t
Definition: d2_lexer.cc:451
#define YY_DO_BEFORE_ACTION
Definition: d2_lexer.cc:685
#define BEGIN
Definition: d2_lexer.cc:414
#define yy_scan_string
Definition: d2_lexer.cc:15
#define yyfree
Definition: d2_lexer.cc:35
#define DIR_EXIT
Definition: d2_lexer.cc:1172
flex_int32_t yy_verify
Definition: agent_lexer.cc:700
static symbol_type make_NULL_TYPE(const location_type &l)
Definition: d2_parser.h:1297
#define yy_scan_buffer
Definition: d2_lexer.cc:14
static symbol_type make_LOGGERS(const location_type &l)
Definition: d2_parser.h:1717
static symbol_type make_FLUSH(const location_type &l)
Definition: d2_parser.h:1807
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1897
static symbol_type make_UDP(const location_type &l)
Definition: d2_parser.h:1387
static symbol_type make_PARAMETERS(const location_type &l)
Definition: d2_parser.h:1702
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition: d2_parser.h:1867
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition: d2_parser.h:2062
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition: d2_parser.h:1777
static symbol_type make_JSON(const location_type &l)
Definition: d2_parser.h:1432
short int flex_int16_t
Definition: agent_lexer.cc:333
#define yyin
Definition: d2_lexer.cc:25
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition: d2_parser.h:2047
static symbol_type make_HOSTNAME(const location_type &l)
Definition: d2_parser.h:1552
#define YY_END_OF_BUFFER
Definition: d2_lexer.cc:695
flex_int32_t yy_nxt
Definition: agent_lexer.cc:701
#define EOB_ACT_LAST_MATCH
Definition: d2_lexer.cc:466
int yy_state_type
Definition: agent_lexer.cc:660
#define yyalloc
Definition: d2_lexer.cc:33
#define YY_FATAL_ERROR(msg)
Definition: d2_lexer.cc:1138
static symbol_type make_COMMENT(const location_type &l)
Definition: d2_parser.h:1462
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1567
static symbol_type make_OUTPUT(const location_type &l)
Definition: d2_parser.h:1762
signed char flex_int8_t
Definition: d2_lexer.cc:332
#define INITIAL
Definition: d2_lexer.cc:1168
#define YY_MORE_ADJ
Definition: d2_lexer.cc:1095
static symbol_type make_MAXSIZE(const location_type &l)
Definition: d2_parser.h:1822
#define YY_BUFFER_NEW
Definition: d2_lexer.cc:539
Used while parsing content of list of dns-servers.
#define yytext_ptr
Definition: d2_lexer.cc:669
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1927
static symbol_type make_SEVERITY(const location_type &l)
Definition: d2_parser.h:1792
#define YY_CURRENT_BUFFER_LVALUE
Definition: d2_lexer.cc:581
#define YY_BREAK
Definition: d2_lexer.cc:1396
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition: d2_parser.h:1657
#define ECHO
Definition: d2_lexer.cc:1294
#define yyset_in
Definition: d2_lexer.cc:188
static symbol_type make_MAXVER(const location_type &l)
Definition: d2_parser.h:1837
static symbol_type make_KEY_NAME(const location_type &l)
Definition: d2_parser.h:1522
int yy_state_type
Definition: d2_lexer.cc:660
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition: d2_parser.h:2017
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1282