Kea  2.3.5-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  {
700  flex_int32_t yy_verify;
701  flex_int32_t yy_nxt;
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, 341, 351, 362, 371,
1084  381, 391, 401, 410, 419, 428, 437, 446, 455, 464,
1085  473, 482, 491, 500, 509, 518, 531, 540, 549, 650,
1086  666, 715, 723, 738, 739, 740, 741, 742, 743, 745,
1087  763, 776, 781, 785, 787, 789, 791
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_) {
1851  return isc::d2::D2Parser::make_KEY_NAME(driver.loc_);
1852  default:
1853  return isc::d2::D2Parser::make_STRING("key-name", driver.loc_);
1854  }
1855 }
1856  YY_BREAK
1857 case 27:
1859 #line 341 "d2_lexer.ll"
1860 {
1861  switch(driver.ctx_) {
1864  return isc::d2::D2Parser::make_DNS_SERVERS(driver.loc_);
1865  default:
1866  return isc::d2::D2Parser::make_STRING("dns-servers", driver.loc_);
1867  }
1868 }
1869  YY_BREAK
1870 case 28:
1872 #line 351 "d2_lexer.ll"
1873 {
1874  switch(driver.ctx_) {
1877  return isc::d2::D2Parser::make_HOSTNAME(driver.loc_);
1878  default:
1879  return isc::d2::D2Parser::make_STRING("hostname", driver.loc_);
1880  }
1881 }
1882  YY_BREAK
1883 case 29:
1885 #line 362 "d2_lexer.ll"
1886 {
1887  switch(driver.ctx_) {
1889  return isc::d2::D2Parser::make_TSIG_KEYS(driver.loc_);
1890  default:
1891  return isc::d2::D2Parser::make_STRING("tsig-keys", driver.loc_);
1892  }
1893 }
1894  YY_BREAK
1895 case 30:
1897 #line 371 "d2_lexer.ll"
1898 {
1899  switch(driver.ctx_) {
1902  return isc::d2::D2Parser::make_ALGORITHM(driver.loc_);
1903  default:
1904  return isc::d2::D2Parser::make_STRING("algorithm", driver.loc_);
1905  }
1906 }
1907  YY_BREAK
1908 case 31:
1910 #line 381 "d2_lexer.ll"
1911 {
1912  switch(driver.ctx_) {
1915  return isc::d2::D2Parser::make_DIGEST_BITS(driver.loc_);
1916  default:
1917  return isc::d2::D2Parser::make_STRING("digest-bits", driver.loc_);
1918  }
1919 }
1920  YY_BREAK
1921 case 32:
1923 #line 391 "d2_lexer.ll"
1924 {
1925  switch(driver.ctx_) {
1928  return isc::d2::D2Parser::make_SECRET(driver.loc_);
1929  default:
1930  return isc::d2::D2Parser::make_STRING("secret", driver.loc_);
1931  }
1932 }
1933  YY_BREAK
1934 case 33:
1936 #line 401 "d2_lexer.ll"
1937 {
1938  switch(driver.ctx_) {
1940  return isc::d2::D2Parser::make_CONTROL_SOCKET(driver.loc_);
1941  default:
1942  return isc::d2::D2Parser::make_STRING("control-socket", driver.loc_);
1943  }
1944 }
1945  YY_BREAK
1946 case 34:
1948 #line 410 "d2_lexer.ll"
1949 {
1950  switch(driver.ctx_) {
1952  return isc::d2::D2Parser::make_SOCKET_TYPE(driver.loc_);
1953  default:
1954  return isc::d2::D2Parser::make_STRING("socket-type", driver.loc_);
1955  }
1956 }
1957  YY_BREAK
1958 case 35:
1960 #line 419 "d2_lexer.ll"
1961 {
1962  switch(driver.ctx_) {
1964  return isc::d2::D2Parser::make_SOCKET_NAME(driver.loc_);
1965  default:
1966  return isc::d2::D2Parser::make_STRING("socket-name", driver.loc_);
1967  }
1968 }
1969  YY_BREAK
1970 case 36:
1972 #line 428 "d2_lexer.ll"
1973 {
1974  switch(driver.ctx_) {
1976  return isc::d2::D2Parser::make_HOOKS_LIBRARIES(driver.loc_);
1977  default:
1978  return isc::d2::D2Parser::make_STRING("hooks-libraries", driver.loc_);
1979  }
1980 }
1981  YY_BREAK
1982 case 37:
1984 #line 437 "d2_lexer.ll"
1985 {
1986  switch(driver.ctx_) {
1988  return isc::d2::D2Parser::make_PARAMETERS(driver.loc_);
1989  default:
1990  return isc::d2::D2Parser::make_STRING("parameters", driver.loc_);
1991  }
1992 }
1993  YY_BREAK
1994 case 38:
1996 #line 446 "d2_lexer.ll"
1997 {
1998  switch(driver.ctx_) {
2000  return isc::d2::D2Parser::make_LIBRARY(driver.loc_);
2001  default:
2002  return isc::d2::D2Parser::make_STRING("library", driver.loc_);
2003  }
2004 }
2005  YY_BREAK
2006 case 39:
2008 #line 455 "d2_lexer.ll"
2009 {
2010  switch(driver.ctx_) {
2012  return isc::d2::D2Parser::make_LOGGERS(driver.loc_);
2013  default:
2014  return isc::d2::D2Parser::make_STRING("loggers", driver.loc_);
2015  }
2016 }
2017  YY_BREAK
2018 case 40:
2020 #line 464 "d2_lexer.ll"
2021 {
2022  switch(driver.ctx_) {
2024  return isc::d2::D2Parser::make_OUTPUT_OPTIONS(driver.loc_);
2025  default:
2026  return isc::d2::D2Parser::make_STRING("output_options", driver.loc_);
2027  }
2028 }
2029  YY_BREAK
2030 case 41:
2032 #line 473 "d2_lexer.ll"
2033 {
2034  switch(driver.ctx_) {
2036  return isc::d2::D2Parser::make_OUTPUT(driver.loc_);
2037  default:
2038  return isc::d2::D2Parser::make_STRING("output", driver.loc_);
2039  }
2040 }
2041  YY_BREAK
2042 case 42:
2044 #line 482 "d2_lexer.ll"
2045 {
2046  switch(driver.ctx_) {
2048  return isc::d2::D2Parser::make_FLUSH(driver.loc_);
2049  default:
2050  return isc::d2::D2Parser::make_STRING("flush", driver.loc_);
2051  }
2052 }
2053  YY_BREAK
2054 case 43:
2056 #line 491 "d2_lexer.ll"
2057 {
2058  switch(driver.ctx_) {
2060  return isc::d2::D2Parser::make_MAXSIZE(driver.loc_);
2061  default:
2062  return isc::d2::D2Parser::make_STRING("maxsize", driver.loc_);
2063  }
2064 }
2065  YY_BREAK
2066 case 44:
2068 #line 500 "d2_lexer.ll"
2069 {
2070  switch(driver.ctx_) {
2072  return isc::d2::D2Parser::make_MAXVER(driver.loc_);
2073  default:
2074  return isc::d2::D2Parser::make_STRING("maxver", driver.loc_);
2075  }
2076 }
2077  YY_BREAK
2078 case 45:
2080 #line 509 "d2_lexer.ll"
2081 {
2082  switch(driver.ctx_) {
2084  return isc::d2::D2Parser::make_PATTERN(driver.loc_);
2085  default:
2086  return isc::d2::D2Parser::make_STRING("pattern", driver.loc_);
2087  }
2088 }
2089  YY_BREAK
2090 case 46:
2092 #line 518 "d2_lexer.ll"
2093 {
2094  switch(driver.ctx_) {
2100  return isc::d2::D2Parser::make_NAME(driver.loc_);
2101  default:
2102  return isc::d2::D2Parser::make_STRING("name", driver.loc_);
2103  }
2104 }
2105  YY_BREAK
2106 case 47:
2108 #line 531 "d2_lexer.ll"
2109 {
2110  switch(driver.ctx_) {
2112  return isc::d2::D2Parser::make_DEBUGLEVEL(driver.loc_);
2113  default:
2114  return isc::d2::D2Parser::make_STRING("debuglevel", driver.loc_);
2115  }
2116 }
2117  YY_BREAK
2118 case 48:
2120 #line 540 "d2_lexer.ll"
2121 {
2122  switch(driver.ctx_) {
2124  return isc::d2::D2Parser::make_SEVERITY(driver.loc_);
2125  default:
2126  return isc::d2::D2Parser::make_STRING("severity", driver.loc_);
2127  }
2128 }
2129  YY_BREAK
2130 case 49:
2132 #line 549 "d2_lexer.ll"
2133 {
2134  /* A string has been matched. It contains the actual string and single quotes.
2135  We need to get those quotes out of the way and just use its content, e.g.
2136  for 'foo' we should get foo */
2137  std::string raw(yytext+1);
2138  size_t len = raw.size() - 1;
2139  raw.resize(len);
2140  std::string decoded;
2141  decoded.reserve(len);
2142  for (size_t pos = 0; pos < len; ++pos) {
2143  int b = 0;
2144  char c = raw[pos];
2145  switch (c) {
2146  case '"':
2147  /* impossible condition */
2148  driver.error(driver.loc_, "Bad quote in \"" + raw + "\"");
2149  break;
2150  case '\\':
2151  ++pos;
2152  if (pos >= len) {
2153  /* impossible condition */
2154  driver.error(driver.loc_, "Overflow escape in \"" + raw + "\"");
2155  }
2156  c = raw[pos];
2157  switch (c) {
2158  case '"':
2159  case '\\':
2160  case '/':
2161  decoded.push_back(c);
2162  break;
2163  case 'b':
2164  decoded.push_back('\b');
2165  break;
2166  case 'f':
2167  decoded.push_back('\f');
2168  break;
2169  case 'n':
2170  decoded.push_back('\n');
2171  break;
2172  case 'r':
2173  decoded.push_back('\r');
2174  break;
2175  case 't':
2176  decoded.push_back('\t');
2177  break;
2178  case 'u':
2179  /* support only \u0000 to \u00ff */
2180  ++pos;
2181  if (pos + 4 > len) {
2182  /* impossible condition */
2183  driver.error(driver.loc_,
2184  "Overflow unicode escape in \"" + raw + "\"");
2185  }
2186  if ((raw[pos] != '0') || (raw[pos + 1] != '0')) {
2187  driver.error(driver.loc_,
2188  "Unsupported unicode escape in \"" + raw + "\"",
2189  pos + 1);
2190  }
2191  pos += 2;
2192  c = raw[pos];
2193  if ((c >= '0') && (c <= '9')) {
2194  b = (c - '0') << 4;
2195  } else if ((c >= 'A') && (c <= 'F')) {
2196  b = (c - 'A' + 10) << 4;
2197  } else if ((c >= 'a') && (c <= 'f')) {
2198  b = (c - 'a' + 10) << 4;
2199  } else {
2200  /* impossible condition */
2201  driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2202  }
2203  pos++;
2204  c = raw[pos];
2205  if ((c >= '0') && (c <= '9')) {
2206  b |= c - '0';
2207  } else if ((c >= 'A') && (c <= 'F')) {
2208  b |= c - 'A' + 10;
2209  } else if ((c >= 'a') && (c <= 'f')) {
2210  b |= c - 'a' + 10;
2211  } else {
2212  /* impossible condition */
2213  driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2214  }
2215  decoded.push_back(static_cast<char>(b & 0xff));
2216  break;
2217  default:
2218  /* impossible condition */
2219  driver.error(driver.loc_, "Bad escape in \"" + raw + "\"");
2220  }
2221  break;
2222  default:
2223  if ((c >= 0) && (c < 0x20)) {
2224  /* impossible condition */
2225  driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
2226  }
2227  decoded.push_back(c);
2228  }
2229  }
2230 
2231  return isc::d2::D2Parser::make_STRING(decoded, driver.loc_);
2232 }
2233  YY_BREAK
2234 case 50:
2235 /* rule 50 can match eol */
2237 #line 650 "d2_lexer.ll"
2238 {
2239  /* Bad string with a forbidden control character inside */
2240  std::string raw(yytext+1);
2241  size_t len = raw.size() - 1;
2242  size_t pos = 0;
2243  for (; pos < len; ++pos) {
2244  char c = raw[pos];
2245  if ((c >= 0) && (c < 0x20)) {
2246  break;
2247  }
2248  }
2249  driver.error(driver.loc_,
2250  "Invalid control in " + std::string(yytext),
2251  pos + 1);
2252 }
2253  YY_BREAK
2254 case 51:
2255 /* rule 51 can match eol */
2257 #line 666 "d2_lexer.ll"
2258 {
2259  /* Bad string with a bad escape inside */
2260  std::string raw(yytext+1);
2261  size_t len = raw.size() - 1;
2262  size_t pos = 0;
2263  bool found = false;
2264  for (; pos < len; ++pos) {
2265  if (found) {
2266  break;
2267  }
2268  char c = raw[pos];
2269  if (c == '\\') {
2270  ++pos;
2271  c = raw[pos];
2272  switch (c) {
2273  case '"':
2274  case '\\':
2275  case '/':
2276  case 'b':
2277  case 'f':
2278  case 'n':
2279  case 'r':
2280  case 't':
2281  break;
2282  case 'u':
2283  if ((pos + 4 > len) ||
2284  !std::isxdigit(raw[pos + 1]) ||
2285  !std::isxdigit(raw[pos + 2]) ||
2286  !std::isxdigit(raw[pos + 3]) ||
2287  !std::isxdigit(raw[pos + 4])) {
2288  found = true;
2289  }
2290  break;
2291  default:
2292  found = true;
2293  break;
2294  }
2295  }
2296  }
2297  /* The rule stops on the first " including on \" so add ... in this case */
2298  std::string trailer = "";
2299  if (raw[len - 1] == '\\') {
2300  trailer = "...";
2301  }
2302  driver.error(driver.loc_,
2303  "Bad escape in " + std::string(yytext) + trailer,
2304  pos);
2305 }
2306  YY_BREAK
2307 case 52:
2309 #line 715 "d2_lexer.ll"
2310 {
2311  /* Bad string with an open escape at the end */
2312  std::string raw(yytext+1);
2313  driver.error(driver.loc_,
2314  "Overflow escape in " + std::string(yytext),
2315  raw.size() + 1);
2316 }
2317  YY_BREAK
2318 case 53:
2320 #line 723 "d2_lexer.ll"
2321 {
2322  /* Bad string with an open unicode escape at the end */
2323  std::string raw(yytext+1);
2324  size_t pos = raw.size() - 1;
2325  for (; pos > 0; --pos) {
2326  char c = raw[pos];
2327  if (c == 'u') {
2328  break;
2329  }
2330  }
2331  driver.error(driver.loc_,
2332  "Overflow unicode escape in " + std::string(yytext),
2333  pos + 1);
2334 }
2335  YY_BREAK
2336 case 54:
2338 #line 738 "d2_lexer.ll"
2339 { return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
2340  YY_BREAK
2341 case 55:
2343 #line 739 "d2_lexer.ll"
2344 { return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
2345  YY_BREAK
2346 case 56:
2348 #line 740 "d2_lexer.ll"
2349 { return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
2350  YY_BREAK
2351 case 57:
2353 #line 741 "d2_lexer.ll"
2354 { return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
2355  YY_BREAK
2356 case 58:
2358 #line 742 "d2_lexer.ll"
2359 { return isc::d2::D2Parser::make_COMMA(driver.loc_); }
2360  YY_BREAK
2361 case 59:
2363 #line 743 "d2_lexer.ll"
2364 { return isc::d2::D2Parser::make_COLON(driver.loc_); }
2365  YY_BREAK
2366 case 60:
2368 #line 745 "d2_lexer.ll"
2369 {
2370  /* An integer was found. */
2371  std::string tmp(yytext);
2372  int64_t integer = 0;
2373  try {
2374  /* In substring we want to use negative values (e.g. -1).
2375  In enterprise-id we need to use values up to 0xffffffff.
2376  To cover both of those use cases, we need at least
2377  int64_t. */
2378  integer = boost::lexical_cast<int64_t>(tmp);
2379  } catch (const boost::bad_lexical_cast &) {
2380  driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
2381  }
2382 
2383  /* The parser needs the string form as double conversion is no lossless */
2384  return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
2385 }
2386  YY_BREAK
2387 case 61:
2389 #line 763 "d2_lexer.ll"
2390 {
2391  /* A floating point was found. */
2392  std::string tmp(yytext);
2393  double fp = 0.0;
2394  try {
2395  fp = boost::lexical_cast<double>(tmp);
2396  } catch (const boost::bad_lexical_cast &) {
2397  driver.error(driver.loc_, "Failed to convert " + tmp + " to a floating point.");
2398  }
2399 
2400  return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
2401 }
2402  YY_BREAK
2403 case 62:
2405 #line 776 "d2_lexer.ll"
2406 {
2407  string tmp(yytext);
2408  return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
2409 }
2410  YY_BREAK
2411 case 63:
2413 #line 781 "d2_lexer.ll"
2414 {
2415  return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
2416 }
2417  YY_BREAK
2418 case 64:
2420 #line 785 "d2_lexer.ll"
2421 driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
2422  YY_BREAK
2423 case 65:
2425 #line 787 "d2_lexer.ll"
2426 driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
2427  YY_BREAK
2428 case 66:
2430 #line 789 "d2_lexer.ll"
2431 driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
2432  YY_BREAK
2433 case 67:
2435 #line 791 "d2_lexer.ll"
2436 driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
2437  YY_BREAK
2438 case YY_STATE_EOF(INITIAL):
2439 #line 793 "d2_lexer.ll"
2440 {
2441  if (driver.states_.empty()) {
2442  return isc::d2::D2Parser::make_END(driver.loc_);
2443  }
2444  driver.loc_ = driver.locs_.back();
2445  driver.locs_.pop_back();
2446  driver.file_ = driver.files_.back();
2447  driver.files_.pop_back();
2448  if (driver.sfile_) {
2449  fclose(driver.sfile_);
2450  driver.sfile_ = 0;
2451  }
2452  if (!driver.sfiles_.empty()) {
2453  driver.sfile_ = driver.sfiles_.back();
2454  driver.sfiles_.pop_back();
2455  }
2456  d2_parser__delete_buffer(YY_CURRENT_BUFFER);
2457  d2_parser__switch_to_buffer(driver.states_.back());
2458  driver.states_.pop_back();
2459 
2460  BEGIN(DIR_EXIT);
2461 }
2462  YY_BREAK
2463 case 68:
2465 #line 816 "d2_lexer.ll"
2466 ECHO;
2467  YY_BREAK
2468 #line 2468 "d2_lexer.cc"
2469 
2470  case YY_END_OF_BUFFER:
2471  {
2472  /* Amount of text matched not including the EOB char. */
2473  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2474 
2475  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2476  *yy_cp = (yy_hold_char);
2478 
2479  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2480  {
2481  /* We're scanning a new file or input source. It's
2482  * possible that this happened because the user
2483  * just pointed yyin at a new source and called
2484  * yylex(). If so, then we have to assure
2485  * consistency between YY_CURRENT_BUFFER and our
2486  * globals. Here is the right place to do so, because
2487  * this is the first action (other than possibly a
2488  * back-up) that will match for the new input source.
2489  */
2490  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2491 /* %if-c-only */
2492  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2493 /* %endif */
2494 /* %if-c++-only */
2495 /* %endif */
2496  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2497  }
2498 
2499  /* Note that here we test for yy_c_buf_p "<=" to the position
2500  * of the first EOB in the buffer, since yy_c_buf_p will
2501  * already have been incremented past the NUL character
2502  * (since all states make transitions on EOB to the
2503  * end-of-buffer state). Contrast this with the test
2504  * in input().
2505  */
2506  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2507  { /* This was really a NUL. */
2508  yy_state_type yy_next_state;
2509 
2510  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2511 
2512  yy_current_state = yy_get_previous_state( );
2513 
2514  /* Okay, we're now positioned to make the NUL
2515  * transition. We couldn't have
2516  * yy_get_previous_state() go ahead and do it
2517  * for us because it doesn't know how to deal
2518  * with the possibility of jamming (and we don't
2519  * want to build jamming into it because then it
2520  * will run more slowly).
2521  */
2522 
2523  yy_next_state = yy_try_NUL_trans( yy_current_state );
2524 
2525  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2526 
2527  if ( yy_next_state )
2528  {
2529  /* Consume the NUL. */
2530  yy_cp = ++(yy_c_buf_p);
2531  yy_current_state = yy_next_state;
2532  goto yy_match;
2533  }
2534 
2535  else
2536  {
2537 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
2538  yy_cp = (yy_last_accepting_cpos);
2539  yy_current_state = (yy_last_accepting_state);
2540  goto yy_find_action;
2541  }
2542  }
2543 
2544  else switch ( yy_get_next_buffer( ) )
2545  {
2546  case EOB_ACT_END_OF_FILE:
2547  {
2548  (yy_did_buffer_switch_on_eof) = 0;
2549 
2550  if ( yywrap( ) )
2551  {
2552  /* Note: because we've taken care in
2553  * yy_get_next_buffer() to have set up
2554  * yytext, we can now set up
2555  * yy_c_buf_p so that if some total
2556  * hoser (like flex itself) wants to
2557  * call the scanner after we return the
2558  * YY_NULL, it'll still work - another
2559  * YY_NULL will get returned.
2560  */
2561  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2562 
2563  yy_act = YY_STATE_EOF(YY_START);
2564  goto do_action;
2565  }
2566 
2567  else
2568  {
2569  if ( ! (yy_did_buffer_switch_on_eof) )
2570  YY_NEW_FILE;
2571  }
2572  break;
2573  }
2574 
2575  case EOB_ACT_CONTINUE_SCAN:
2576  (yy_c_buf_p) =
2577  (yytext_ptr) + yy_amount_of_matched_text;
2578 
2579  yy_current_state = yy_get_previous_state( );
2580 
2581  yy_cp = (yy_c_buf_p);
2582  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2583  goto yy_match;
2584 
2585  case EOB_ACT_LAST_MATCH:
2586  (yy_c_buf_p) =
2587  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2588 
2589  yy_current_state = yy_get_previous_state( );
2590 
2591  yy_cp = (yy_c_buf_p);
2592  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2593  goto yy_find_action;
2594  }
2595  break;
2596  }
2597 
2598  default:
2600  "fatal flex scanner internal error--no action found" );
2601  } /* end of action switch */
2602  } /* end of scanning one token */
2603  } /* end of user's declarations */
2604 } /* end of yylex */
2605 /* %ok-for-header */
2606 
2607 /* %if-c++-only */
2608 /* %not-for-header */
2609 /* %ok-for-header */
2610 
2611 /* %endif */
2612 
2613 /* yy_get_next_buffer - try to read in a new buffer
2614  *
2615  * Returns a code representing an action:
2616  * EOB_ACT_LAST_MATCH -
2617  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2618  * EOB_ACT_END_OF_FILE - end of file
2619  */
2620 /* %if-c-only */
2621 static int yy_get_next_buffer (void)
2622 /* %endif */
2623 /* %if-c++-only */
2624 /* %endif */
2625 {
2626  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2627  char *source = (yytext_ptr);
2628  int number_to_move, i;
2629  int ret_val;
2630 
2631  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2633  "fatal flex scanner internal error--end of buffer missed" );
2634 
2635  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2636  { /* Don't try to fill the buffer, so this is an EOF. */
2637  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2638  {
2639  /* We matched a single character, the EOB, so
2640  * treat this as a final EOF.
2641  */
2642  return EOB_ACT_END_OF_FILE;
2643  }
2644 
2645  else
2646  {
2647  /* We matched some text prior to the EOB, first
2648  * process it.
2649  */
2650  return EOB_ACT_LAST_MATCH;
2651  }
2652  }
2653 
2654  /* Try to read more data. */
2655 
2656  /* First move last chars to start of buffer. */
2657  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2658 
2659  for ( i = 0; i < number_to_move; ++i )
2660  *(dest++) = *(source++);
2661 
2662  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2663  /* don't do the read, it's not guaranteed to return an EOF,
2664  * just force an EOF
2665  */
2666  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2667 
2668  else
2669  {
2670  int num_to_read =
2671  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2672 
2673  while ( num_to_read <= 0 )
2674  { /* Not enough room in the buffer - grow it. */
2675 
2676  /* just a shorter name for the current buffer */
2677  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2678 
2679  int yy_c_buf_p_offset =
2680  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2681 
2682  if ( b->yy_is_our_buffer )
2683  {
2684  int new_size = b->yy_buf_size * 2;
2685 
2686  if ( new_size <= 0 )
2687  b->yy_buf_size += b->yy_buf_size / 8;
2688  else
2689  b->yy_buf_size *= 2;
2690 
2691  b->yy_ch_buf = (char *)
2692  /* Include room in for 2 EOB chars. */
2693  yyrealloc( (void *) b->yy_ch_buf,
2694  (yy_size_t) (b->yy_buf_size + 2) );
2695  }
2696  else
2697  /* Can't grow it, we don't own it. */
2698  b->yy_ch_buf = NULL;
2699 
2700  if ( ! b->yy_ch_buf )
2702  "fatal error - scanner input buffer overflow" );
2703 
2704  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2705 
2706  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2707  number_to_move - 1;
2708 
2709  }
2710 
2711  if ( num_to_read > YY_READ_BUF_SIZE )
2712  num_to_read = YY_READ_BUF_SIZE;
2713 
2714  /* Read in more data. */
2715  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2716  (yy_n_chars), num_to_read );
2717 
2718  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2719  }
2720 
2721  if ( (yy_n_chars) == 0 )
2722  {
2723  if ( number_to_move == YY_MORE_ADJ )
2724  {
2725  ret_val = EOB_ACT_END_OF_FILE;
2726  yyrestart( yyin );
2727  }
2728 
2729  else
2730  {
2731  ret_val = EOB_ACT_LAST_MATCH;
2732  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2734  }
2735  }
2736 
2737  else
2738  ret_val = EOB_ACT_CONTINUE_SCAN;
2739 
2740  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2741  /* Extend the array by 50%, plus the number we really need. */
2742  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2743  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2744  (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2745  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2746  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2747  /* "- 2" to take care of EOB's */
2748  YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2749  }
2750 
2751  (yy_n_chars) += number_to_move;
2754 
2755  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2756 
2757  return ret_val;
2758 }
2759 
2760 /* yy_get_previous_state - get the state just before the EOB char was reached */
2761 
2762 /* %if-c-only */
2763 /* %not-for-header */
2764  static yy_state_type yy_get_previous_state (void)
2765 /* %endif */
2766 /* %if-c++-only */
2767 /* %endif */
2768 {
2769  yy_state_type yy_current_state;
2770  char *yy_cp;
2771 
2772 /* %% [15.0] code to get the start state into yy_current_state goes here */
2773  yy_current_state = (yy_start);
2774 
2775  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2776  {
2777 /* %% [16.0] code to find the next state goes here */
2778  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2779  if ( yy_accept[yy_current_state] )
2780  {
2781  (yy_last_accepting_state) = yy_current_state;
2782  (yy_last_accepting_cpos) = yy_cp;
2783  }
2784  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2785  {
2786  yy_current_state = (int) yy_def[yy_current_state];
2787  if ( yy_current_state >= 425 )
2788  yy_c = yy_meta[yy_c];
2789  }
2790  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2791  }
2792 
2793  return yy_current_state;
2794 }
2795 
2796 /* yy_try_NUL_trans - try to make a transition on the NUL character
2797  *
2798  * synopsis
2799  * next_state = yy_try_NUL_trans( current_state );
2800  */
2801 /* %if-c-only */
2802  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2803 /* %endif */
2804 /* %if-c++-only */
2805 /* %endif */
2806 {
2807  int yy_is_jam;
2808  /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
2809  char *yy_cp = (yy_c_buf_p);
2810 
2811  YY_CHAR yy_c = 1;
2812  if ( yy_accept[yy_current_state] )
2813  {
2814  (yy_last_accepting_state) = yy_current_state;
2815  (yy_last_accepting_cpos) = yy_cp;
2816  }
2817  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2818  {
2819  yy_current_state = (int) yy_def[yy_current_state];
2820  if ( yy_current_state >= 425 )
2821  yy_c = yy_meta[yy_c];
2822  }
2823  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2824  yy_is_jam = (yy_current_state == 424);
2825 
2826  return yy_is_jam ? 0 : yy_current_state;
2827 }
2828 
2829 #ifndef YY_NO_UNPUT
2830 /* %if-c-only */
2831 
2832 /* %endif */
2833 #endif
2834 
2835 /* %if-c-only */
2836 #ifndef YY_NO_INPUT
2837 #ifdef __cplusplus
2838  static int yyinput (void)
2839 #else
2840  static int input (void)
2841 #endif
2842 
2843 /* %endif */
2844 /* %if-c++-only */
2845 /* %endif */
2846 {
2847  int c;
2848 
2849  *(yy_c_buf_p) = (yy_hold_char);
2850 
2851  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2852  {
2853  /* yy_c_buf_p now points to the character we want to return.
2854  * If this occurs *before* the EOB characters, then it's a
2855  * valid NUL; if not, then we've hit the end of the buffer.
2856  */
2857  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2858  /* This was really a NUL. */
2859  *(yy_c_buf_p) = '\0';
2860 
2861  else
2862  { /* need more input */
2863  int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2864  ++(yy_c_buf_p);
2865 
2866  switch ( yy_get_next_buffer( ) )
2867  {
2868  case EOB_ACT_LAST_MATCH:
2869  /* This happens because yy_g_n_b()
2870  * sees that we've accumulated a
2871  * token and flags that we need to
2872  * try matching the token before
2873  * proceeding. But for input(),
2874  * there's no matching to consider.
2875  * So convert the EOB_ACT_LAST_MATCH
2876  * to EOB_ACT_END_OF_FILE.
2877  */
2878 
2879  /* Reset buffer status. */
2880  yyrestart( yyin );
2881 
2882  /*FALLTHROUGH*/
2883 
2884  case EOB_ACT_END_OF_FILE:
2885  {
2886  if ( yywrap( ) )
2887  return 0;
2888 
2889  if ( ! (yy_did_buffer_switch_on_eof) )
2890  YY_NEW_FILE;
2891 #ifdef __cplusplus
2892  return yyinput();
2893 #else
2894  return input();
2895 #endif
2896  }
2897 
2898  case EOB_ACT_CONTINUE_SCAN:
2899  (yy_c_buf_p) = (yytext_ptr) + offset;
2900  break;
2901  }
2902  }
2903  }
2904 
2905  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2906  *(yy_c_buf_p) = '\0'; /* preserve yytext */
2907  (yy_hold_char) = *++(yy_c_buf_p);
2908 
2909 /* %% [19.0] update BOL and yylineno */
2910 
2911  return c;
2912 }
2913 /* %if-c-only */
2914 #endif /* ifndef YY_NO_INPUT */
2915 /* %endif */
2916 
2922 /* %if-c-only */
2923  void yyrestart (FILE * input_file )
2924 /* %endif */
2925 /* %if-c++-only */
2926 /* %endif */
2927 {
2928 
2929  if ( ! YY_CURRENT_BUFFER ){
2933  }
2934 
2935  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2937 }
2938 
2939 /* %if-c++-only */
2940 /* %endif */
2941 
2946 /* %if-c-only */
2947  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2948 /* %endif */
2949 /* %if-c++-only */
2950 /* %endif */
2951 {
2952 
2953  /* TODO. We should be able to replace this entire function body
2954  * with
2955  * yypop_buffer_state();
2956  * yypush_buffer_state(new_buffer);
2957  */
2959  if ( YY_CURRENT_BUFFER == new_buffer )
2960  return;
2961 
2962  if ( YY_CURRENT_BUFFER )
2963  {
2964  /* Flush out information for old buffer. */
2965  *(yy_c_buf_p) = (yy_hold_char);
2966  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2967  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2968  }
2969 
2970  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2972 
2973  /* We don't actually know whether we did this switch during
2974  * EOF (yywrap()) processing, but the only time this flag
2975  * is looked at is after yywrap() is called, so it's safe
2976  * to go ahead and always set it.
2977  */
2978  (yy_did_buffer_switch_on_eof) = 1;
2979 }
2980 
2981 /* %if-c-only */
2982 static void yy_load_buffer_state (void)
2983 /* %endif */
2984 /* %if-c++-only */
2985 /* %endif */
2986 {
2987  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2988  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2989 /* %if-c-only */
2990  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2991 /* %endif */
2992 /* %if-c++-only */
2993 /* %endif */
2994  (yy_hold_char) = *(yy_c_buf_p);
2995 }
2996 
3003 /* %if-c-only */
3004  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3005 /* %endif */
3006 /* %if-c++-only */
3007 /* %endif */
3008 {
3009  YY_BUFFER_STATE b;
3010 
3011  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3012  if ( ! b )
3013  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3014 
3015  b->yy_buf_size = size;
3016 
3017  /* yy_ch_buf has to be 2 characters longer than the size given because
3018  * we need to put in 2 end-of-buffer characters.
3019  */
3020  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
3021  if ( ! b->yy_ch_buf )
3022  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3023 
3024  b->yy_is_our_buffer = 1;
3025 
3026  yy_init_buffer( b, file );
3027 
3028  return b;
3029 }
3030 
3031 /* %if-c++-only */
3032 /* %endif */
3033 
3038 /* %if-c-only */
3039  void yy_delete_buffer (YY_BUFFER_STATE b )
3040 /* %endif */
3041 /* %if-c++-only */
3042 /* %endif */
3043 {
3044 
3045  if ( ! b )
3046  return;
3047 
3048  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3050 
3051  if ( b->yy_is_our_buffer )
3052  yyfree( (void *) b->yy_ch_buf );
3053 
3054  yyfree( (void *) b );
3055 }
3056 
3057 /* Initializes or reinitializes a buffer.
3058  * This function is sometimes called more than once on the same buffer,
3059  * such as during a yyrestart() or at EOF.
3060  */
3061 /* %if-c-only */
3062  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3063 /* %endif */
3064 /* %if-c++-only */
3065 /* %endif */
3066 
3067 {
3068  int oerrno = errno;
3069 
3070  yy_flush_buffer( b );
3071 
3072 /* %if-c-only */
3073  b->yy_input_file = file;
3074 /* %endif */
3075 /* %if-c++-only */
3076 /* %endif */
3077  b->yy_fill_buffer = 1;
3078 
3079  /* If b is the current buffer, then yy_init_buffer was _probably_
3080  * called from yyrestart() or through yy_get_next_buffer.
3081  * In that case, we don't want to reset the lineno or column.
3082  */
3083  if (b != YY_CURRENT_BUFFER){
3084  b->yy_bs_lineno = 1;
3085  b->yy_bs_column = 0;
3086  }
3087 
3088 /* %if-c-only */
3089 
3090  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3091 
3092 /* %endif */
3093 /* %if-c++-only */
3094 /* %endif */
3095  errno = oerrno;
3096 }
3097 
3102 /* %if-c-only */
3103  void yy_flush_buffer (YY_BUFFER_STATE b )
3104 /* %endif */
3105 /* %if-c++-only */
3106 /* %endif */
3107 {
3108  if ( ! b )
3109  return;
3110 
3111  b->yy_n_chars = 0;
3112 
3113  /* We always need two end-of-buffer characters. The first causes
3114  * a transition to the end-of-buffer state. The second causes
3115  * a jam in that state.
3116  */
3119 
3120  b->yy_buf_pos = &b->yy_ch_buf[0];
3121 
3122  b->yy_at_bol = 1;
3124 
3125  if ( b == YY_CURRENT_BUFFER )
3127 }
3128 
3129 /* %if-c-or-c++ */
3136 /* %if-c-only */
3137 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3138 /* %endif */
3139 /* %if-c++-only */
3140 /* %endif */
3141 {
3142  if (new_buffer == NULL)
3143  return;
3144 
3146 
3147  /* This block is copied from yy_switch_to_buffer. */
3148  if ( YY_CURRENT_BUFFER )
3149  {
3150  /* Flush out information for old buffer. */
3151  *(yy_c_buf_p) = (yy_hold_char);
3152  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3153  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3154  }
3155 
3156  /* Only push if top exists. Otherwise, replace top. */
3157  if (YY_CURRENT_BUFFER)
3158  (yy_buffer_stack_top)++;
3159  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3160 
3161  /* copied from yy_switch_to_buffer. */
3163  (yy_did_buffer_switch_on_eof) = 1;
3164 }
3165 /* %endif */
3166 
3167 /* %if-c-or-c++ */
3172 /* %if-c-only */
3174 /* %endif */
3175 /* %if-c++-only */
3176 /* %endif */
3177 {
3178  if (!YY_CURRENT_BUFFER)
3179  return;
3180 
3182  YY_CURRENT_BUFFER_LVALUE = NULL;
3183  if ((yy_buffer_stack_top) > 0)
3184  --(yy_buffer_stack_top);
3185 
3186  if (YY_CURRENT_BUFFER) {
3188  (yy_did_buffer_switch_on_eof) = 1;
3189  }
3190 }
3191 /* %endif */
3192 
3193 /* %if-c-or-c++ */
3194 /* Allocates the stack if it does not exist.
3195  * Guarantees space for at least one push.
3196  */
3197 /* %if-c-only */
3198 static void yyensure_buffer_stack (void)
3199 /* %endif */
3200 /* %if-c++-only */
3201 /* %endif */
3202 {
3203  yy_size_t num_to_alloc;
3204 
3205  if (!(yy_buffer_stack)) {
3206 
3207  /* First allocation is just for 2 elements, since we don't know if this
3208  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3209  * immediate realloc on the next call.
3210  */
3211  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3212  (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3213  (num_to_alloc * sizeof(struct yy_buffer_state*)
3214  );
3215  if ( ! (yy_buffer_stack) )
3216  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3217 
3218  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3219 
3220  (yy_buffer_stack_max) = num_to_alloc;
3221  (yy_buffer_stack_top) = 0;
3222  return;
3223  }
3224 
3225  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3226 
3227  /* Increase the buffer to prepare for a possible push. */
3228  yy_size_t grow_size = 8 /* arbitrary grow size */;
3229 
3230  num_to_alloc = (yy_buffer_stack_max) + grow_size;
3231  (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3232  ((yy_buffer_stack),
3233  num_to_alloc * sizeof(struct yy_buffer_state*)
3234  );
3235  if ( ! (yy_buffer_stack) )
3236  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3237 
3238  /* zero only the new slots.*/
3239  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3240  (yy_buffer_stack_max) = num_to_alloc;
3241  }
3242 }
3243 /* %endif */
3244 
3245 /* %if-c-only */
3252 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3253 {
3254  YY_BUFFER_STATE b;
3255 
3256  if ( size < 2 ||
3257  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3258  base[size-1] != YY_END_OF_BUFFER_CHAR )
3259  /* They forgot to leave room for the EOB's. */
3260  return NULL;
3261 
3262  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3263  if ( ! b )
3264  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3265 
3266  b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3267  b->yy_buf_pos = b->yy_ch_buf = base;
3268  b->yy_is_our_buffer = 0;
3269  b->yy_input_file = NULL;
3270  b->yy_n_chars = b->yy_buf_size;
3271  b->yy_is_interactive = 0;
3272  b->yy_at_bol = 1;
3273  b->yy_fill_buffer = 0;
3275 
3276  yy_switch_to_buffer( b );
3277 
3278  return b;
3279 }
3280 /* %endif */
3281 
3282 /* %if-c-only */
3291 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3292 {
3293 
3294  return yy_scan_bytes( yystr, (int) strlen(yystr) );
3295 }
3296 /* %endif */
3297 
3298 /* %if-c-only */
3306 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3307 {
3308  YY_BUFFER_STATE b;
3309  char *buf;
3310  yy_size_t n;
3311  int i;
3312 
3313  /* Get memory for full buffer, including space for trailing EOB's. */
3314  n = (yy_size_t) (_yybytes_len + 2);
3315  buf = (char *) yyalloc( n );
3316  if ( ! buf )
3317  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3318 
3319  for ( i = 0; i < _yybytes_len; ++i )
3320  buf[i] = yybytes[i];
3321 
3322  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3323 
3324  b = yy_scan_buffer( buf, n );
3325  if ( ! b )
3326  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3327 
3328  /* It's okay to grow etc. this buffer, and we should throw it
3329  * away when we're done.
3330  */
3331  b->yy_is_our_buffer = 1;
3332 
3333  return b;
3334 }
3335 /* %endif */
3336 
3337 #ifndef YY_EXIT_FAILURE
3338 #define YY_EXIT_FAILURE 2
3339 #endif
3340 
3341 /* %if-c-only */
3342 static void yynoreturn yy_fatal_error (const char* msg )
3343 {
3344  fprintf( stderr, "%s\n", msg );
3345  exit( YY_EXIT_FAILURE );
3346 }
3347 /* %endif */
3348 /* %if-c++-only */
3349 /* %endif */
3350 
3351 /* Redefine yyless() so it works in section 3 code. */
3352 
3353 #undef yyless
3354 #define yyless(n) \
3355  do \
3356  { \
3357  /* Undo effects of setting up yytext. */ \
3358  int yyless_macro_arg = (n); \
3359  YY_LESS_LINENO(yyless_macro_arg);\
3360  yytext[yyleng] = (yy_hold_char); \
3361  (yy_c_buf_p) = yytext + yyless_macro_arg; \
3362  (yy_hold_char) = *(yy_c_buf_p); \
3363  *(yy_c_buf_p) = '\0'; \
3364  yyleng = yyless_macro_arg; \
3365  } \
3366  while ( 0 )
3367 
3368 /* Accessor methods (get/set functions) to struct members. */
3369 
3370 /* %if-c-only */
3371 /* %if-reentrant */
3372 /* %endif */
3373 
3377 int yyget_lineno (void)
3378 {
3379 
3380  return yylineno;
3381 }
3382 
3386 FILE *yyget_in (void)
3387 {
3388  return yyin;
3389 }
3390 
3394 FILE *yyget_out (void)
3395 {
3396  return yyout;
3397 }
3398 
3402 int yyget_leng (void)
3403 {
3404  return yyleng;
3405 }
3406 
3411 char *yyget_text (void)
3412 {
3413  return yytext;
3414 }
3415 
3416 /* %if-reentrant */
3417 /* %endif */
3418 
3423 void yyset_lineno (int _line_number )
3424 {
3425 
3426  yylineno = _line_number;
3427 }
3428 
3435 void yyset_in (FILE * _in_str )
3436 {
3437  yyin = _in_str ;
3438 }
3439 
3440 void yyset_out (FILE * _out_str )
3441 {
3442  yyout = _out_str ;
3443 }
3444 
3445 int yyget_debug (void)
3446 {
3447  return yy_flex_debug;
3448 }
3449 
3450 void yyset_debug (int _bdebug )
3451 {
3452  yy_flex_debug = _bdebug ;
3453 }
3454 
3455 /* %endif */
3456 
3457 /* %if-reentrant */
3458 /* %if-bison-bridge */
3459 /* %endif */
3460 /* %endif if-c-only */
3461 
3462 /* %if-c-only */
3463 static int yy_init_globals (void)
3464 {
3465  /* Initialization is the same as for the non-reentrant scanner.
3466  * This function is called from yylex_destroy(), so don't allocate here.
3467  */
3468 
3469  (yy_buffer_stack) = NULL;
3470  (yy_buffer_stack_top) = 0;
3471  (yy_buffer_stack_max) = 0;
3472  (yy_c_buf_p) = NULL;
3473  (yy_init) = 0;
3474  (yy_start) = 0;
3475 
3476 /* Defined in main.c */
3477 #ifdef YY_STDINIT
3478  yyin = stdin;
3479  yyout = stdout;
3480 #else
3481  yyin = NULL;
3482  yyout = NULL;
3483 #endif
3484 
3485  /* For future reference: Set errno on error, since we are called by
3486  * yylex_init()
3487  */
3488  return 0;
3489 }
3490 /* %endif */
3491 
3492 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
3493 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3494 int yylex_destroy (void)
3495 {
3496 
3497  /* Pop the buffer stack, destroying each element. */
3498  while(YY_CURRENT_BUFFER){
3500  YY_CURRENT_BUFFER_LVALUE = NULL;
3502  }
3503 
3504  /* Destroy the stack itself. */
3505  yyfree((yy_buffer_stack) );
3506  (yy_buffer_stack) = NULL;
3507 
3508  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3509  * yylex() is called, initialization will occur. */
3510  yy_init_globals( );
3511 
3512 /* %if-reentrant */
3513 /* %endif */
3514  return 0;
3515 }
3516 /* %endif */
3517 
3518 /*
3519  * Internal utility routines.
3520  */
3521 
3522 #ifndef yytext_ptr
3523 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3524 {
3525 
3526  int i;
3527  for ( i = 0; i < n; ++i )
3528  s1[i] = s2[i];
3529 }
3530 #endif
3531 
3532 #ifdef YY_NEED_STRLEN
3533 static int yy_flex_strlen (const char * s )
3534 {
3535  int n;
3536  for ( n = 0; s[n]; ++n )
3537  ;
3538 
3539  return n;
3540 }
3541 #endif
3542 
3543 void *yyalloc (yy_size_t size )
3544 {
3545  return malloc(size);
3546 }
3547 
3548 void *yyrealloc (void * ptr, yy_size_t size )
3549 {
3550 
3551  /* The cast to (char *) in the following accommodates both
3552  * implementations that use char* generic pointers, and those
3553  * that use void* generic pointers. It works with the latter
3554  * because both ANSI C and C++ allow castless assignment from
3555  * any pointer type to void*, and deal with argument conversions
3556  * as though doing an assignment.
3557  */
3558  return realloc(ptr, size);
3559 }
3560 
3561 void yyfree (void * ptr )
3562 {
3563  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3564 }
3565 
3566 /* %if-tables-serialization definitions */
3567 /* %define-yytables The name for this specific scanner's tables. */
3568 #define YYTABLES_NAME "yytables"
3569 /* %endif */
3570 
3571 /* %ok-for-header */
3572 
3573 #line 816 "d2_lexer.ll"
3574 
3575 
3576 using namespace isc::dhcp;
3577 
3578 void
3579 D2ParserContext::scanStringBegin(const std::string& str, ParserType parser_type)
3580 {
3581  start_token_flag = true;
3582  start_token_value = parser_type;
3583 
3584  file_ = "<string>";
3585  sfile_ = 0;
3586  loc_.initialize(&file_);
3587  yy_flex_debug = trace_scanning_;
3588  YY_BUFFER_STATE buffer;
3589  buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3590  if (!buffer) {
3591  fatal("cannot scan string");
3592  /* fatal() throws an exception so this can't be reached */
3593  }
3594 }
3595 
3596 void
3597 D2ParserContext::scanFileBegin(FILE * f,
3598  const std::string& filename,
3599  ParserType parser_type)
3600 {
3601  start_token_flag = true;
3602  start_token_value = parser_type;
3603 
3604  file_ = filename;
3605  sfile_ = f;
3606  loc_.initialize(&file_);
3607  yy_flex_debug = trace_scanning_;
3608  YY_BUFFER_STATE buffer;
3609 
3610  /* See d2_lexer.cc header for available definitions */
3611  buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
3612  if (!buffer) {
3613  fatal("cannot scan file " + filename);
3614  }
3615  d2_parser__switch_to_buffer(buffer);
3616 }
3617 
3618 void
3619 D2ParserContext::scanEnd() {
3620  if (sfile_)
3621  fclose(sfile_);
3622  sfile_ = 0;
3623  static_cast<void>(d2_parser_lex_destroy());
3624  /* Close files */
3625  while (!sfiles_.empty()) {
3626  FILE* f = sfiles_.back();
3627  if (f) {
3628  fclose(f);
3629  }
3630  sfiles_.pop_back();
3631  }
3632  /* Delete states */
3633  while (!states_.empty()) {
3634  d2_parser__delete_buffer(states_.back());
3635  states_.pop_back();
3636  }
3637 }
3638 
3639 void
3640 D2ParserContext::includeFile(const std::string& filename) {
3641  if (states_.size() > 10) {
3642  fatal("Too many nested include.");
3643  }
3644 
3645  FILE* f = fopen(filename.c_str(), "r");
3646  if (!f) {
3647  fatal("Can't open include file " + filename);
3648  }
3649  if (sfile_) {
3650  sfiles_.push_back(sfile_);
3651  }
3652  sfile_ = f;
3653  states_.push_back(YY_CURRENT_BUFFER);
3654  YY_BUFFER_STATE buffer;
3655  buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
3656  if (!buffer) {
3657  fatal( "Can't scan include file " + filename);
3658  }
3659  d2_parser__switch_to_buffer(buffer);
3660  files_.push_back(file_);
3661  file_ = filename;
3662  locs_.push_back(loc_);
3663  loc_.initialize(&file_);
3664 
3665  BEGIN(INITIAL);
3666 }
3667 
3668 namespace {
3670 class Dummy {
3671  /* cppcheck-suppress unusedPrivateFunction */
3672  void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
3673 };
3674 }
3675 #endif /* !__clang_analyzer__ */
3676 
#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:2029
#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:1879
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:1564
#define YY_STATE_EOF(state)
Definition: d2_lexer.cc:422
#define YY_EXIT_FAILURE
Definition: d2_lexer.cc:3338
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition: d2_parser.h:1669
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:1369
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition: d2_parser.h:1939
#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:1294
static symbol_type make_COLON(const location_type &l)
Definition: d2_parser.h:1249
#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:1339
static symbol_type make_NAME(const location_type &l)
Definition: d2_parser.h:1759
#define YY_BUF_SIZE
Definition: d2_lexer.cc:436
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition: d2_parser.h:1624
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:1984
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition: d2_parser.h:1384
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:1639
#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:1399
#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:1474
#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:1504
#define yylex_destroy
Definition: d2_lexer.cc:152
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Definition: d2_parser.h:1654
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:1609
#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:1699
#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:1774
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition: d2_parser.h:2059
#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:1999
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:1429
#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:1279
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition: d2_parser.h:1519
static symbol_type make_LIBRARY(const location_type &l)
Definition: d2_parser.h:1714
#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:1189
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition: d2_parser.h:1354
#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:1534
#define yyensure_buffer_stack
Definition: d2_lexer.cc:23
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition: d2_parser.h:1969
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:1234
size_t yy_size_t
Definition: agent_lexer.cc:451
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1264
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:1444
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1909
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
static symbol_type make_NULL_TYPE(const location_type &l)
Definition: d2_parser.h:1324
#define yy_scan_buffer
Definition: d2_lexer.cc:14
static symbol_type make_LOGGERS(const location_type &l)
Definition: d2_parser.h:1744
static symbol_type make_FLUSH(const location_type &l)
Definition: d2_parser.h:1834
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1924
static symbol_type make_UDP(const location_type &l)
Definition: d2_parser.h:1414
static symbol_type make_PARAMETERS(const location_type &l)
Definition: d2_parser.h:1729
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition: d2_parser.h:1894
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition: d2_parser.h:2089
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition: d2_parser.h:1804
static symbol_type make_JSON(const location_type &l)
Definition: d2_parser.h:1459
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:2074
static symbol_type make_HOSTNAME(const location_type &l)
Definition: d2_parser.h:1579
#define YY_END_OF_BUFFER
Definition: d2_lexer.cc:695
#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:1489
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1594
static symbol_type make_OUTPUT(const location_type &l)
Definition: d2_parser.h:1789
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:1849
#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:1954
static symbol_type make_SEVERITY(const location_type &l)
Definition: d2_parser.h:1819
#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:1684
#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:1864
static symbol_type make_KEY_NAME(const location_type &l)
Definition: d2_parser.h:1549
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:2044
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1309