5 #define YY_INT_ALIGNED short int
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
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
53 #ifdef yy_create_buffer
54 #define d2_parser__create_buffer_ALREADY_DEFINED
56 #define yy_create_buffer d2_parser__create_buffer
59 #ifdef yy_delete_buffer
60 #define d2_parser__delete_buffer_ALREADY_DEFINED
62 #define yy_delete_buffer d2_parser__delete_buffer
66 #define d2_parser__scan_buffer_ALREADY_DEFINED
68 #define yy_scan_buffer d2_parser__scan_buffer
72 #define d2_parser__scan_string_ALREADY_DEFINED
74 #define yy_scan_string d2_parser__scan_string
78 #define d2_parser__scan_bytes_ALREADY_DEFINED
80 #define yy_scan_bytes d2_parser__scan_bytes
84 #define d2_parser__init_buffer_ALREADY_DEFINED
86 #define yy_init_buffer d2_parser__init_buffer
89 #ifdef yy_flush_buffer
90 #define d2_parser__flush_buffer_ALREADY_DEFINED
92 #define yy_flush_buffer d2_parser__flush_buffer
95 #ifdef yy_load_buffer_state
96 #define d2_parser__load_buffer_state_ALREADY_DEFINED
98 #define yy_load_buffer_state d2_parser__load_buffer_state
101 #ifdef yy_switch_to_buffer
102 #define d2_parser__switch_to_buffer_ALREADY_DEFINED
104 #define yy_switch_to_buffer d2_parser__switch_to_buffer
107 #ifdef yypush_buffer_state
108 #define d2_parser_push_buffer_state_ALREADY_DEFINED
110 #define yypush_buffer_state d2_parser_push_buffer_state
113 #ifdef yypop_buffer_state
114 #define d2_parser_pop_buffer_state_ALREADY_DEFINED
116 #define yypop_buffer_state d2_parser_pop_buffer_state
119 #ifdef yyensure_buffer_stack
120 #define d2_parser_ensure_buffer_stack_ALREADY_DEFINED
122 #define yyensure_buffer_stack d2_parser_ensure_buffer_stack
126 #define d2_parser_lex_ALREADY_DEFINED
128 #define yylex d2_parser_lex
132 #define d2_parser_restart_ALREADY_DEFINED
134 #define yyrestart d2_parser_restart
138 #define d2_parser_lex_init_ALREADY_DEFINED
140 #define yylex_init d2_parser_lex_init
143 #ifdef yylex_init_extra
144 #define d2_parser_lex_init_extra_ALREADY_DEFINED
146 #define yylex_init_extra d2_parser_lex_init_extra
150 #define d2_parser_lex_destroy_ALREADY_DEFINED
152 #define yylex_destroy d2_parser_lex_destroy
156 #define d2_parser_get_debug_ALREADY_DEFINED
158 #define yyget_debug d2_parser_get_debug
162 #define d2_parser_set_debug_ALREADY_DEFINED
164 #define yyset_debug d2_parser_set_debug
168 #define d2_parser_get_extra_ALREADY_DEFINED
170 #define yyget_extra d2_parser_get_extra
174 #define d2_parser_set_extra_ALREADY_DEFINED
176 #define yyset_extra d2_parser_set_extra
180 #define d2_parser_get_in_ALREADY_DEFINED
182 #define yyget_in d2_parser_get_in
186 #define d2_parser_set_in_ALREADY_DEFINED
188 #define yyset_in d2_parser_set_in
192 #define d2_parser_get_out_ALREADY_DEFINED
194 #define yyget_out d2_parser_get_out
198 #define d2_parser_set_out_ALREADY_DEFINED
200 #define yyset_out d2_parser_set_out
204 #define d2_parser_get_leng_ALREADY_DEFINED
206 #define yyget_leng d2_parser_get_leng
210 #define d2_parser_get_text_ALREADY_DEFINED
212 #define yyget_text d2_parser_get_text
216 #define d2_parser_get_lineno_ALREADY_DEFINED
218 #define yyget_lineno d2_parser_get_lineno
222 #define d2_parser_set_lineno_ALREADY_DEFINED
224 #define yyset_lineno d2_parser_set_lineno
228 #define d2_parser_wrap_ALREADY_DEFINED
230 #define yywrap d2_parser_wrap
236 #define d2_parser_alloc_ALREADY_DEFINED
238 #define yyalloc d2_parser_alloc
242 #define d2_parser_realloc_ALREADY_DEFINED
244 #define yyrealloc d2_parser_realloc
248 #define d2_parser_free_ALREADY_DEFINED
250 #define yyfree d2_parser_free
256 #define d2_parser_text_ALREADY_DEFINED
258 #define yytext d2_parser_text
262 #define d2_parser_leng_ALREADY_DEFINED
264 #define yyleng d2_parser_leng
268 #define d2_parser_in_ALREADY_DEFINED
270 #define yyin d2_parser_in
274 #define d2_parser_out_ALREADY_DEFINED
276 #define yyout d2_parser_out
280 #define d2_parser__flex_debug_ALREADY_DEFINED
282 #define yy_flex_debug d2_parser__flex_debug
286 #define d2_parser_lineno_ALREADY_DEFINED
288 #define yylineno d2_parser_lineno
315 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
320 #ifndef __STDC_LIMIT_MACROS
321 #define __STDC_LIMIT_MACROS 1
324 #include <inttypes.h>
341 #define INT8_MIN (-128)
344 #define INT16_MIN (-32767-1)
347 #define INT32_MIN (-2147483647-1)
350 #define INT8_MAX (127)
353 #define INT16_MAX (32767)
356 #define INT32_MAX (2147483647)
359 #define UINT8_MAX (255U)
362 #define UINT16_MAX (65535U)
365 #define UINT32_MAX (4294967295U)
369 #define SIZE_MAX (~(size_t)0)
383 #define yyconst const
385 #if defined(__GNUC__) && __GNUC__ >= 3
386 #define yynoreturn __attribute__((__noreturn__))
400 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
414 #define BEGIN (yy_start) = 1 + 2 *
419 #define YY_START (((yy_start) - 1) / 2)
420 #define YYSTATE YY_START
422 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
424 #define YY_NEW_FILE yyrestart( yyin )
425 #define YY_END_OF_BUFFER_CHAR 0
434 #define YY_BUF_SIZE 32768
436 #define YY_BUF_SIZE 16384
442 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
444 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
445 #define YY_TYPEDEF_YY_BUFFER_STATE
449 #ifndef YY_TYPEDEF_YY_SIZE_T
450 #define YY_TYPEDEF_YY_SIZE_T
464 #define EOB_ACT_CONTINUE_SCAN 0
465 #define EOB_ACT_END_OF_FILE 1
466 #define EOB_ACT_LAST_MATCH 2
468 #define YY_LESS_LINENO(n)
469 #define YY_LINENO_REWIND_TO(ptr)
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; \
484 #define unput(c) yyunput( c, (yytext_ptr) )
486 #ifndef YY_STRUCT_YY_BUFFER_STATE
487 #define YY_STRUCT_YY_BUFFER_STATE
539 #define YY_BUFFER_NEW 0
540 #define YY_BUFFER_NORMAL 1
551 #define YY_BUFFER_EOF_PENDING 2
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;
575 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
576 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
581 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
588 static char yy_hold_char;
589 static int yy_n_chars;
593 static char *yy_c_buf_p = NULL;
594 static int yy_init = 0;
595 static int yy_start = 0;
600 static int yy_did_buffer_switch_on_eof;
616 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
620 YY_BUFFER_STATE
yy_scan_bytes (
const char *bytes,
int len );
628 #define yy_new_buffer yy_create_buffer
629 #define yy_set_interactive(is_interactive) \
631 if ( ! YY_CURRENT_BUFFER ){ \
632 yyensure_buffer_stack (); \
633 YY_CURRENT_BUFFER_LVALUE = \
634 yy_create_buffer( yyin, YY_BUF_SIZE ); \
636 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
638 #define yy_set_bol(at_bol) \
640 if ( ! YY_CURRENT_BUFFER ){\
641 yyensure_buffer_stack (); \
642 YY_CURRENT_BUFFER_LVALUE = \
643 yy_create_buffer( yyin, YY_BUF_SIZE ); \
645 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
647 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
652 #define d2_parser_wrap() (1)
653 #define YY_SKIP_YYWRAP
669 #define yytext_ptr yytext
677 static int yy_get_next_buffer (
void );
678 static void yynoreturn yy_fatal_error (
const char* msg );
685 #define YY_DO_BEFORE_ACTION \
686 (yytext_ptr) = yy_bp; \
688 yyleng = (int) (yy_cp - yy_bp); \
689 (yy_hold_char) = *yy_cp; \
692 (yy_c_buf_p) = yy_cp;
694 #define YY_NUM_RULES 68
695 #define YY_END_OF_BUFFER 69
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,
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,
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,
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,
749 0, 0, 25, 0, 23, 0, 16, 0, 24, 21,
750 0, 0, 0, 0, 33, 0, 0, 40, 0, 36,
754 static const YY_CHAR yy_ec[256] =
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,
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,
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,
786 static const YY_CHAR yy_meta[65] =
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
1074 static char *yy_last_accepting_cpos;
1081 136, 138, 140, 145, 146, 151, 152, 153, 165, 168,
1082 173, 179, 188, 199, 210, 219, 228, 237, 247, 257,
1083 267, 284, 301, 310, 319, 329, 339, 349, 360, 369,
1084 379, 389, 399, 408, 417, 426, 435, 444, 453, 462,
1085 471, 480, 489, 498, 507, 516, 529, 538, 547, 648,
1086 664, 713, 721, 736, 737, 738, 739, 740, 741, 743,
1087 761, 774, 779, 783, 785, 787, 789
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
1098 #line 1 "d2_lexer.ll"
1104 #line 8 "d2_lexer.ll"
1107 #ifndef __clang_analyzer__
1116 #include <boost/lexical_cast.hpp>
1130 bool start_token_flag =
false;
1133 unsigned int comment_start_line = 0;
1138 #define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
1139 #line 1139 "d2_lexer.cc"
1154 #define YY_NO_INPUT 1
1160 #line 93 "d2_lexer.ll"
1164 #define YY_USER_ACTION driver.loc_.columns(yyleng);
1165 #line 1165 "d2_lexer.cc"
1166 #line 1166 "d2_lexer.cc"
1171 #define DIR_INCLUDE 3
1174 #ifndef YY_NO_UNISTD_H
1186 #ifndef YY_EXTRA_TYPE
1187 #define YY_EXTRA_TYPE void *
1194 static int yy_init_globals (
void );
1237 #ifndef YY_SKIP_YYWRAP
1239 extern "C" int yywrap (
void );
1241 extern int yywrap (
void );
1254 static void yy_flex_strncpy (
char *,
const char *,
int );
1257 #ifdef YY_NEED_STRLEN
1258 static int yy_flex_strlen (
const char * );
1265 static int yyinput (
void );
1267 static int input (
void );
1279 #ifndef YY_READ_BUF_SIZE
1282 #define YY_READ_BUF_SIZE 16384
1284 #define YY_READ_BUF_SIZE 8192
1294 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1304 #define YY_INPUT(buf,result,max_size) \
1306 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1310 for ( n = 0; n < max_size && \
1311 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1312 buf[n] = (char) c; \
1314 buf[n++] = (char) c; \
1315 if ( c == EOF && ferror( yyin ) ) \
1316 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1322 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1324 if( errno != EINTR) \
1326 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1344 #define yyterminate() return YY_NULL
1348 #ifndef YY_START_STACK_INCR
1349 #define YY_START_STACK_INCR 25
1353 #ifndef YY_FATAL_ERROR
1355 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1376 #define YY_DECL_IS_OURS 1
1379 extern int yylex (
void);
1381 #define YY_DECL int yylex (void)
1390 #ifndef YY_USER_ACTION
1391 #define YY_USER_ACTION
1396 #define YY_BREAK break;
1400 #define YY_RULE_SETUP \
1448 #line 99 "d2_lexer.ll"
1452 #line 103 "d2_lexer.ll"
1460 if (start_token_flag) {
1461 start_token_flag =
false;
1462 switch (start_token_value) {
1463 case D2ParserContext::PARSER_JSON:
1466 case D2ParserContext::PARSER_DHCPDDNS:
1468 case D2ParserContext::PARSER_SUB_DHCPDDNS:
1470 case D2ParserContext::PARSER_TSIG_KEY:
1472 case D2ParserContext::PARSER_TSIG_KEYS:
1474 case D2ParserContext::PARSER_DDNS_DOMAIN:
1476 case D2ParserContext::PARSER_DDNS_DOMAINS:
1478 case D2ParserContext::PARSER_DNS_SERVER:
1480 case D2ParserContext::PARSER_HOOKS_LIBRARY:
1486 #line 1486 "d2_lexer.cc"
1491 yy_cp = (yy_c_buf_p);
1494 *yy_cp = (yy_hold_char);
1502 yy_current_state = (yy_start);
1507 if ( yy_accept[yy_current_state] )
1509 (yy_last_accepting_state) = yy_current_state;
1510 (yy_last_accepting_cpos) = yy_cp;
1512 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1514 yy_current_state = (int) yy_def[yy_current_state];
1515 if ( yy_current_state >= 425 )
1516 yy_c = yy_meta[yy_c];
1518 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1521 while ( yy_current_state != 424 );
1522 yy_cp = (yy_last_accepting_cpos);
1523 yy_current_state = (yy_last_accepting_state);
1527 yy_act = yy_accept[yy_current_state];
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",
1546 else if ( yy_act == 69 )
1547 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1549 fprintf( stderr,
"--EOF (start condition %d)\n",
YY_START );
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;
1564 #line 136 "d2_lexer.ll"
1569 #line 138 "d2_lexer.ll"
1574 #line 140 "d2_lexer.ll"
1577 comment_start_line = driver.loc_.end.line;;
1582 #line 145 "d2_lexer.ll"
1587 #line 146 "d2_lexer.ll"
1591 #line 147 "d2_lexer.ll"
1598 #line 151 "d2_lexer.ll"
1603 #line 152 "d2_lexer.ll"
1608 #line 153 "d2_lexer.ll"
1613 std::string tmp(
yytext+1);
1614 tmp.resize(tmp.size() - 1);
1616 driver.includeFile(tmp);
1622 #line 162 "d2_lexer.ll"
1629 #line 165 "d2_lexer.ll"
1634 #line 168 "d2_lexer.ll"
1643 #line 173 "d2_lexer.ll"
1646 driver.loc_.lines(
yyleng);
1652 #line 179 "d2_lexer.ll"
1654 switch(driver.ctx_) {
1664 #line 188 "d2_lexer.ll"
1666 switch(driver.ctx_) {
1678 #line 199 "d2_lexer.ll"
1680 switch(driver.ctx_) {
1692 #line 210 "d2_lexer.ll"
1694 switch(driver.ctx_) {
1704 #line 219 "d2_lexer.ll"
1706 switch(driver.ctx_) {
1716 #line 228 "d2_lexer.ll"
1718 switch(driver.ctx_) {
1728 #line 237 "d2_lexer.ll"
1734 std::string tmp(
yytext+1);
1735 tmp.resize(tmp.size() - 1);
1741 #line 247 "d2_lexer.ll"
1747 std::string tmp(
yytext+1);
1748 tmp.resize(tmp.size() - 1);
1754 #line 257 "d2_lexer.ll"
1760 std::string tmp(
yytext+1);
1761 tmp.resize(tmp.size() - 1);
1767 #line 267 "d2_lexer.ll"
1769 switch(driver.ctx_) {
1787 #line 284 "d2_lexer.ll"
1789 switch(driver.ctx_) {
1807 #line 301 "d2_lexer.ll"
1809 switch(driver.ctx_) {
1819 #line 310 "d2_lexer.ll"
1821 switch(driver.ctx_) {
1831 #line 319 "d2_lexer.ll"
1833 switch(driver.ctx_) {
1844 #line 329 "d2_lexer.ll"
1846 switch(driver.ctx_) {
1857 #line 339 "d2_lexer.ll"
1859 switch(driver.ctx_) {
1870 #line 349 "d2_lexer.ll"
1872 switch(driver.ctx_) {
1883 #line 360 "d2_lexer.ll"
1885 switch(driver.ctx_) {
1895 #line 369 "d2_lexer.ll"
1897 switch(driver.ctx_) {
1908 #line 379 "d2_lexer.ll"
1910 switch(driver.ctx_) {
1921 #line 389 "d2_lexer.ll"
1923 switch(driver.ctx_) {
1934 #line 399 "d2_lexer.ll"
1936 switch(driver.ctx_) {
1946 #line 408 "d2_lexer.ll"
1948 switch(driver.ctx_) {
1958 #line 417 "d2_lexer.ll"
1960 switch(driver.ctx_) {
1970 #line 426 "d2_lexer.ll"
1972 switch(driver.ctx_) {
1982 #line 435 "d2_lexer.ll"
1984 switch(driver.ctx_) {
1994 #line 444 "d2_lexer.ll"
1996 switch(driver.ctx_) {
2006 #line 453 "d2_lexer.ll"
2008 switch(driver.ctx_) {
2018 #line 462 "d2_lexer.ll"
2020 switch(driver.ctx_) {
2030 #line 471 "d2_lexer.ll"
2032 switch(driver.ctx_) {
2042 #line 480 "d2_lexer.ll"
2044 switch(driver.ctx_) {
2054 #line 489 "d2_lexer.ll"
2056 switch(driver.ctx_) {
2066 #line 498 "d2_lexer.ll"
2068 switch(driver.ctx_) {
2078 #line 507 "d2_lexer.ll"
2080 switch(driver.ctx_) {
2090 #line 516 "d2_lexer.ll"
2092 switch(driver.ctx_) {
2106 #line 529 "d2_lexer.ll"
2108 switch(driver.ctx_) {
2118 #line 538 "d2_lexer.ll"
2120 switch(driver.ctx_) {
2130 #line 547 "d2_lexer.ll"
2135 std::string raw(
yytext+1);
2136 size_t len = raw.size() - 1;
2138 std::string decoded;
2139 decoded.reserve(len);
2140 for (
size_t pos = 0; pos < len; ++pos) {
2146 driver.error(driver.loc_,
"Bad quote in \"" + raw +
"\"");
2152 driver.error(driver.loc_,
"Overflow escape in \"" + raw +
"\"");
2159 decoded.push_back(c);
2162 decoded.push_back(
'\b');
2165 decoded.push_back(
'\f');
2168 decoded.push_back(
'\n');
2171 decoded.push_back(
'\r');
2174 decoded.push_back(
'\t');
2179 if (pos + 4 > len) {
2181 driver.error(driver.loc_,
2182 "Overflow unicode escape in \"" + raw +
"\"");
2184 if ((raw[pos] !=
'0') || (raw[pos + 1] !=
'0')) {
2185 driver.error(driver.loc_,
2186 "Unsupported unicode escape in \"" + raw +
"\"",
2191 if ((c >=
'0') && (c <=
'9')) {
2193 }
else if ((c >=
'A') && (c <=
'F')) {
2194 b = (c -
'A' + 10) << 4;
2195 }
else if ((c >=
'a') && (c <=
'f')) {
2196 b = (c -
'a' + 10) << 4;
2199 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2203 if ((c >=
'0') && (c <=
'9')) {
2205 }
else if ((c >=
'A') && (c <=
'F')) {
2207 }
else if ((c >=
'a') && (c <=
'f')) {
2211 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2213 decoded.push_back(static_cast<char>(b & 0xff));
2217 driver.error(driver.loc_,
"Bad escape in \"" + raw +
"\"");
2221 if ((c >= 0) && (c < 0x20)) {
2223 driver.error(driver.loc_,
"Invalid control in \"" + raw +
"\"");
2225 decoded.push_back(c);
2235 #line 648 "d2_lexer.ll"
2238 std::string raw(
yytext+1);
2239 size_t len = raw.size() - 1;
2241 for (; pos < len; ++pos) {
2243 if ((c >= 0) && (c < 0x20)) {
2247 driver.error(driver.loc_,
2248 "Invalid control in " + std::string(
yytext),
2255 #line 664 "d2_lexer.ll"
2258 std::string raw(
yytext+1);
2259 size_t len = raw.size() - 1;
2262 for (; pos < len; ++pos) {
2281 if ((pos + 4 > len) ||
2282 !std::isxdigit(raw[pos + 1]) ||
2283 !std::isxdigit(raw[pos + 2]) ||
2284 !std::isxdigit(raw[pos + 3]) ||
2285 !std::isxdigit(raw[pos + 4])) {
2296 std::string trailer =
"";
2297 if (raw[len - 1] ==
'\\') {
2300 driver.error(driver.loc_,
2301 "Bad escape in " + std::string(
yytext) + trailer,
2307 #line 713 "d2_lexer.ll"
2310 std::string raw(
yytext+1);
2311 driver.error(driver.loc_,
2312 "Overflow escape in " + std::string(
yytext),
2318 #line 721 "d2_lexer.ll"
2321 std::string raw(
yytext+1);
2322 size_t pos = raw.size() - 1;
2323 for (; pos > 0; --pos) {
2329 driver.error(driver.loc_,
2330 "Overflow unicode escape in " + std::string(
yytext),
2336 #line 736 "d2_lexer.ll"
2341 #line 737 "d2_lexer.ll"
2346 #line 738 "d2_lexer.ll"
2351 #line 739 "d2_lexer.ll"
2356 #line 740 "d2_lexer.ll"
2361 #line 741 "d2_lexer.ll"
2366 #line 743 "d2_lexer.ll"
2370 int64_t integer = 0;
2376 integer = boost::lexical_cast<int64_t>(tmp);
2377 }
catch (
const boost::bad_lexical_cast &) {
2378 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to an integer.");
2387 #line 761 "d2_lexer.ll"
2393 fp = boost::lexical_cast<
double>(tmp);
2394 }
catch (
const boost::bad_lexical_cast &) {
2395 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to a floating point.");
2403 #line 774 "d2_lexer.ll"
2411 #line 779 "d2_lexer.ll"
2418 #line 783 "d2_lexer.ll"
2419 driver.error (driver.loc_,
"JSON true reserved keyword is lower case only");
2423 #line 785 "d2_lexer.ll"
2424 driver.error (driver.loc_,
"JSON false reserved keyword is lower case only");
2428 #line 787 "d2_lexer.ll"
2429 driver.error (driver.loc_,
"JSON null reserved keyword is lower case only");
2433 #line 789 "d2_lexer.ll"
2434 driver.error (driver.loc_,
"Invalid character: " + std::string(
yytext));
2437 #line 791 "d2_lexer.ll"
2439 if (driver.states_.empty()) {
2442 driver.loc_ = driver.locs_.back();
2443 driver.locs_.pop_back();
2444 driver.file_ = driver.files_.back();
2445 driver.files_.pop_back();
2446 if (driver.sfile_) {
2447 fclose(driver.sfile_);
2450 if (!driver.sfiles_.empty()) {
2451 driver.sfile_ = driver.sfiles_.back();
2452 driver.sfiles_.pop_back();
2455 d2_parser__switch_to_buffer(driver.states_.back());
2456 driver.states_.pop_back();
2463 #line 814 "d2_lexer.ll"
2466 #line 2466 "d2_lexer.cc"
2471 int yy_amount_of_matched_text = (int) (yy_cp - (
yytext_ptr)) - 1;
2474 *yy_cp = (yy_hold_char);
2508 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
2510 yy_current_state = yy_get_previous_state( );
2521 yy_next_state = yy_try_NUL_trans( yy_current_state );
2525 if ( yy_next_state )
2528 yy_cp = ++(yy_c_buf_p);
2529 yy_current_state = yy_next_state;
2536 yy_cp = (yy_last_accepting_cpos);
2537 yy_current_state = (yy_last_accepting_state);
2538 goto yy_find_action;
2542 else switch ( yy_get_next_buffer( ) )
2546 (yy_did_buffer_switch_on_eof) = 0;
2567 if ( ! (yy_did_buffer_switch_on_eof) )
2577 yy_current_state = yy_get_previous_state( );
2579 yy_cp = (yy_c_buf_p);
2587 yy_current_state = yy_get_previous_state( );
2589 yy_cp = (yy_c_buf_p);
2591 goto yy_find_action;
2598 "fatal flex scanner internal error--no action found" );
2619 static int yy_get_next_buffer (
void)
2626 int number_to_move, i;
2631 "fatal flex scanner internal error--end of buffer missed" );
2655 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr) - 1);
2657 for ( i = 0; i < number_to_move; ++i )
2658 *(dest++) = *(source++);
2671 while ( num_to_read <= 0 )
2677 int yy_c_buf_p_offset =
2684 if ( new_size <= 0 )
2700 "fatal error - scanner input buffer overflow" );
2702 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
2714 (yy_n_chars), num_to_read );
2719 if ( (yy_n_chars) == 0 )
2740 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2744 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
2749 (yy_n_chars) += number_to_move;
2771 yy_current_state = (yy_start);
2777 if ( yy_accept[yy_current_state] )
2779 (yy_last_accepting_state) = yy_current_state;
2780 (yy_last_accepting_cpos) = yy_cp;
2782 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2784 yy_current_state = (int) yy_def[yy_current_state];
2785 if ( yy_current_state >= 425 )
2786 yy_c = yy_meta[yy_c];
2788 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2791 return yy_current_state;
2807 char *yy_cp = (yy_c_buf_p);
2810 if ( yy_accept[yy_current_state] )
2812 (yy_last_accepting_state) = yy_current_state;
2813 (yy_last_accepting_cpos) = yy_cp;
2815 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2817 yy_current_state = (int) yy_def[yy_current_state];
2818 if ( yy_current_state >= 425 )
2819 yy_c = yy_meta[yy_c];
2821 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2822 yy_is_jam = (yy_current_state == 424);
2824 return yy_is_jam ? 0 : yy_current_state;
2836 static int yyinput (
void)
2838 static int input (
void)
2847 *(yy_c_buf_p) = (yy_hold_char);
2857 *(yy_c_buf_p) =
'\0';
2861 int offset = (int) ((yy_c_buf_p) - (
yytext_ptr));
2864 switch ( yy_get_next_buffer( ) )
2887 if ( ! (yy_did_buffer_switch_on_eof) )
2903 c = *(
unsigned char *) (yy_c_buf_p);
2904 *(yy_c_buf_p) =
'\0';
2905 (yy_hold_char) = *++(yy_c_buf_p);
2963 *(yy_c_buf_p) = (yy_hold_char);
2976 (yy_did_buffer_switch_on_eof) = 1;
2992 (yy_hold_char) = *(yy_c_buf_p);
3140 if (new_buffer == NULL)
3149 *(yy_c_buf_p) = (yy_hold_char);
3156 (yy_buffer_stack_top)++;
3161 (yy_did_buffer_switch_on_eof) = 1;
3181 if ((yy_buffer_stack_top) > 0)
3182 --(yy_buffer_stack_top);
3186 (yy_did_buffer_switch_on_eof) = 1;
3203 if (!(yy_buffer_stack)) {
3213 if ( ! (yy_buffer_stack) )
3214 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3216 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
3218 (yy_buffer_stack_max) = num_to_alloc;
3219 (yy_buffer_stack_top) = 0;
3223 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3228 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3233 if ( ! (yy_buffer_stack) )
3234 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3237 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
3238 (yy_buffer_stack_max) = num_to_alloc;
3317 for ( i = 0; i < _yybytes_len; ++i )
3318 buf[i] = yybytes[i];
3335 #ifndef YY_EXIT_FAILURE
3336 #define YY_EXIT_FAILURE 2
3340 static void yynoreturn yy_fatal_error (
const char* msg )
3342 fprintf( stderr,
"%s\n", msg );
3356 int yyless_macro_arg = (n); \
3357 YY_LESS_LINENO(yyless_macro_arg);\
3358 yytext[yyleng] = (yy_hold_char); \
3359 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3360 (yy_hold_char) = *(yy_c_buf_p); \
3361 *(yy_c_buf_p) = '\0'; \
3362 yyleng = yyless_macro_arg; \
3461 static int yy_init_globals (
void)
3467 (yy_buffer_stack) = NULL;
3468 (yy_buffer_stack_top) = 0;
3469 (yy_buffer_stack_max) = 0;
3470 (yy_c_buf_p) = NULL;
3503 yyfree((yy_buffer_stack) );
3504 (yy_buffer_stack) = NULL;
3521 static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
3525 for ( i = 0; i < n; ++i )
3530 #ifdef YY_NEED_STRLEN
3531 static int yy_flex_strlen (
const char * s )
3534 for ( n = 0; s[n]; ++n )
3543 return malloc(size);
3556 return realloc(ptr, size);
3561 free( (
char *) ptr );
3566 #define YYTABLES_NAME "yytables"
3571 #line 814 "d2_lexer.ll"
3577 D2ParserContext::scanStringBegin(
const std::string& str,
ParserType parser_type)
3579 start_token_flag =
true;
3580 start_token_value = parser_type;
3584 loc_.initialize(&file_);
3586 YY_BUFFER_STATE buffer;
3587 buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3589 fatal(
"cannot scan string");
3595 D2ParserContext::scanFileBegin(FILE * f,
3596 const std::string& filename,
3599 start_token_flag =
true;
3600 start_token_value = parser_type;
3604 loc_.initialize(&file_);
3606 YY_BUFFER_STATE buffer;
3609 buffer = d2_parser__create_buffer(f, 65536 );
3611 fatal(
"cannot scan file " + filename);
3613 d2_parser__switch_to_buffer(buffer);
3617 D2ParserContext::scanEnd() {
3621 static_cast<void>(d2_parser_lex_destroy());
3623 while (!sfiles_.empty()) {
3624 FILE* f = sfiles_.back();
3631 while (!states_.empty()) {
3632 d2_parser__delete_buffer(states_.back());
3638 D2ParserContext::includeFile(
const std::string& filename) {
3639 if (states_.size() > 10) {
3640 fatal(
"Too many nested include.");
3643 FILE* f = fopen(filename.c_str(),
"r");
3645 fatal(
"Can't open include file " + filename);
3648 sfiles_.push_back(sfile_);
3652 YY_BUFFER_STATE buffer;
3653 buffer = d2_parser__create_buffer(f, 65536 );
3655 fatal(
"Can't scan include file " + filename);
3657 d2_parser__switch_to_buffer(buffer);
3658 files_.push_back(file_);
3660 locs_.push_back(loc_);
3661 loc_.initialize(&file_);
3670 void dummy() { yy_fatal_error(
"Fix me: how to disable its definition?"); }
#define YY_INPUT(buf, result, max_size)
Used while parsing a list of tsig-keys.
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Used while parsing DhcpDdns/loggers/output_options structures.
Used while parsing content of a dns-server.
static symbol_type make_PATTERN(const location_type &l)
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
static symbol_type make_DNS_SERVERS(const location_type &l)
#define YY_STATE_EOF(state)
static symbol_type make_SOCKET_TYPE(const location_type &l)
struct yy_buffer_state * YY_BUFFER_STATE
unsigned short int flex_uint16_t
#define yypop_buffer_state
#define YY_RESTORE_YY_MORE_OFFSET
static symbol_type make_PORT(const location_type &l)
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
static symbol_type make_LCURLY_BRACKET(const location_type &l)
static symbol_type make_COLON(const location_type &l)
#define YY_CURRENT_BUFFER
static symbol_type make_DHCPDDNS(const location_type &l)
static symbol_type make_NAME(const location_type &l)
static symbol_type make_DIGEST_BITS(const location_type &l)
int yy_bs_lineno
The line count.
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Used while parsing content of a tsig-key.
static symbol_type make_SECRET(const location_type &l)
Used while parsing DhcpDdns/loggers structures.
unsigned char flex_uint8_t
static symbol_type make_NCR_PROTOCOL(const location_type &l)
#define EOB_ACT_CONTINUE_SCAN
Used while parsing content of a ddns-domain.
#define yy_switch_to_buffer
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Used while parsing DhcpDdns/hooks-libraries.
static symbol_type make_USER_CONTEXT(const location_type &l)
Used while parsing content of DhcpDdns/reverse-ddns.
static symbol_type make_FORWARD_DDNS(const location_type &l)
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Used while parsing content of a control-socket.
int yy_bs_column
The column count.
Used while parsing DhcpDdns/ncr-protocol.
static symbol_type make_ALGORITHM(const location_type &l)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
#define yypush_buffer_state
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
#define YY_END_OF_BUFFER_CHAR
static symbol_type make_TCP(const location_type &l)
ParserType
Defines currently supported scopes.
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_REVERSE_DDNS(const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
#define EOB_ACT_END_OF_FILE
static symbol_type make_END(const location_type &l)
static symbol_type make_IP_ADDRESS(const location_type &l)
#define yy_load_buffer_state
Used while parsing DhcpDdns/ncr-format.
#define YY_BUFFER_EOF_PENDING
static symbol_type make_DDNS_DOMAINS(const location_type &l)
#define yyensure_buffer_stack
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
unsigned int flex_uint32_t
static symbol_type make_COMMA(const location_type &l)
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Evaluation error exception raised when trying to parse.
Used while parsing content of DhcpDdns.
static symbol_type make_NCR_FORMAT(const location_type &l)
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
unsigned char flex_uint8_t
Used while parsing a list of ddns-domains.
#define YY_DO_BEFORE_ACTION
static symbol_type make_NULL_TYPE(const location_type &l)
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
static symbol_type make_UDP(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_JSON(const location_type &l)
static symbol_type make_FLOAT(const double &v, const location_type &l)
static symbol_type make_HOSTNAME(const location_type &l)
#define EOB_ACT_LAST_MATCH
#define YY_FATAL_ERROR(msg)
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_TSIG_KEYS(const location_type &l)
static symbol_type make_OUTPUT(const location_type &l)
static symbol_type make_MAXSIZE(const location_type &l)
Used while parsing content of list of dns-servers.
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
#define YY_CURRENT_BUFFER_LVALUE
static symbol_type make_SOCKET_NAME(const location_type &l)
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_KEY_NAME(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)