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
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
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)
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
561static size_t yy_buffer_stack_top = 0;
562static size_t yy_buffer_stack_max = 0;
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)]
588static char yy_hold_char;
589static int yy_n_chars;
593static char *yy_c_buf_p = NULL;
594static int yy_init = 0;
595static int yy_start = 0;
600static int yy_did_buffer_switch_on_eof;
616#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
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
677static int yy_get_next_buffer (
void );
678static 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,
754static 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,
786static 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,
1074static 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, 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
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>
1130bool start_token_flag =
false;
1133unsigned 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 *
1194static int yy_init_globals (
void );
1237#ifndef YY_SKIP_YYWRAP
1239extern "C" int yywrap (
void );
1241extern int yywrap (
void );
1254static void yy_flex_strncpy (
char *,
const char *,
int );
1257#ifdef YY_NEED_STRLEN
1258static int yy_flex_strlen (
const char * );
1265static int yyinput (
void );
1267static 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
1379extern 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" );
1541 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1544 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
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_) {
1859#line 341 "d2_lexer.ll"
1861 switch(driver.ctx_) {
1872#line 351 "d2_lexer.ll"
1874 switch(driver.ctx_) {
1885#line 362 "d2_lexer.ll"
1887 switch(driver.ctx_) {
1897#line 371 "d2_lexer.ll"
1899 switch(driver.ctx_) {
1910#line 381 "d2_lexer.ll"
1912 switch(driver.ctx_) {
1923#line 391 "d2_lexer.ll"
1925 switch(driver.ctx_) {
1936#line 401 "d2_lexer.ll"
1938 switch(driver.ctx_) {
1948#line 410 "d2_lexer.ll"
1950 switch(driver.ctx_) {
1960#line 419 "d2_lexer.ll"
1962 switch(driver.ctx_) {
1972#line 428 "d2_lexer.ll"
1974 switch(driver.ctx_) {
1984#line 437 "d2_lexer.ll"
1986 switch(driver.ctx_) {
1996#line 446 "d2_lexer.ll"
1998 switch(driver.ctx_) {
2008#line 455 "d2_lexer.ll"
2010 switch(driver.ctx_) {
2020#line 464 "d2_lexer.ll"
2022 switch(driver.ctx_) {
2032#line 473 "d2_lexer.ll"
2034 switch(driver.ctx_) {
2044#line 482 "d2_lexer.ll"
2046 switch(driver.ctx_) {
2056#line 491 "d2_lexer.ll"
2058 switch(driver.ctx_) {
2068#line 500 "d2_lexer.ll"
2070 switch(driver.ctx_) {
2080#line 509 "d2_lexer.ll"
2082 switch(driver.ctx_) {
2092#line 518 "d2_lexer.ll"
2094 switch(driver.ctx_) {
2108#line 531 "d2_lexer.ll"
2110 switch(driver.ctx_) {
2120#line 540 "d2_lexer.ll"
2122 switch(driver.ctx_) {
2132#line 549 "d2_lexer.ll"
2137 std::string raw(
yytext+1);
2138 size_t len = raw.size() - 1;
2140 std::string decoded;
2141 decoded.reserve(len);
2142 for (
size_t pos = 0; pos < len; ++pos) {
2148 driver.error(driver.loc_,
"Bad quote in \"" + raw +
"\"");
2154 driver.error(driver.loc_,
"Overflow escape in \"" + raw +
"\"");
2161 decoded.push_back(c);
2164 decoded.push_back(
'\b');
2167 decoded.push_back(
'\f');
2170 decoded.push_back(
'\n');
2173 decoded.push_back(
'\r');
2176 decoded.push_back(
'\t');
2181 if (pos + 4 > len) {
2183 driver.error(driver.loc_,
2184 "Overflow unicode escape in \"" + raw +
"\"");
2186 if ((raw[pos] !=
'0') || (raw[pos + 1] !=
'0')) {
2187 driver.error(driver.loc_,
2188 "Unsupported unicode escape in \"" + raw +
"\"",
2193 if ((c >=
'0') && (c <=
'9')) {
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;
2201 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2205 if ((c >=
'0') && (c <=
'9')) {
2207 }
else if ((c >=
'A') && (c <=
'F')) {
2209 }
else if ((c >=
'a') && (c <=
'f')) {
2213 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2215 decoded.push_back(
static_cast<char>(b & 0xff));
2219 driver.error(driver.loc_,
"Bad escape in \"" + raw +
"\"");
2223 if ((c >= 0) && (c < 0x20)) {
2225 driver.error(driver.loc_,
"Invalid control in \"" + raw +
"\"");
2227 decoded.push_back(c);
2237#line 650 "d2_lexer.ll"
2240 std::string raw(
yytext+1);
2241 size_t len = raw.size() - 1;
2243 for (; pos < len; ++pos) {
2245 if ((c >= 0) && (c < 0x20)) {
2249 driver.error(driver.loc_,
2250 "Invalid control in " + std::string(
yytext),
2257#line 666 "d2_lexer.ll"
2260 std::string raw(
yytext+1);
2261 size_t len = raw.size() - 1;
2264 for (; pos < len; ++pos) {
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])) {
2298 std::string trailer =
"";
2299 if (raw[len - 1] ==
'\\') {
2302 driver.error(driver.loc_,
2303 "Bad escape in " + std::string(
yytext) + trailer,
2309#line 715 "d2_lexer.ll"
2312 std::string raw(
yytext+1);
2313 driver.error(driver.loc_,
2314 "Overflow escape in " + std::string(
yytext),
2320#line 723 "d2_lexer.ll"
2323 std::string raw(
yytext+1);
2324 size_t pos = raw.size() - 1;
2325 for (; pos > 0; --pos) {
2331 driver.error(driver.loc_,
2332 "Overflow unicode escape in " + std::string(
yytext),
2338#line 738 "d2_lexer.ll"
2343#line 739 "d2_lexer.ll"
2348#line 740 "d2_lexer.ll"
2353#line 741 "d2_lexer.ll"
2358#line 742 "d2_lexer.ll"
2363#line 743 "d2_lexer.ll"
2368#line 745 "d2_lexer.ll"
2372 int64_t integer = 0;
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.");
2389#line 763 "d2_lexer.ll"
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.");
2405#line 776 "d2_lexer.ll"
2413#line 781 "d2_lexer.ll"
2420#line 785 "d2_lexer.ll"
2421driver.error (driver.loc_,
"JSON true reserved keyword is lower case only");
2425#line 787 "d2_lexer.ll"
2426driver.error (driver.loc_,
"JSON false reserved keyword is lower case only");
2430#line 789 "d2_lexer.ll"
2431driver.error (driver.loc_,
"JSON null reserved keyword is lower case only");
2435#line 791 "d2_lexer.ll"
2436driver.error (driver.loc_,
"Invalid character: " + std::string(
yytext));
2439#line 793 "d2_lexer.ll"
2441 if (driver.states_.empty()) {
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_);
2452 if (!driver.sfiles_.empty()) {
2453 driver.sfile_ = driver.sfiles_.back();
2454 driver.sfiles_.pop_back();
2457 d2_parser__switch_to_buffer(driver.states_.back());
2458 driver.states_.pop_back();
2465#line 816 "d2_lexer.ll"
2468#line 2468 "d2_lexer.cc"
2476 *
yy_cp = (yy_hold_char);
2510 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
2512 yy_current_state = yy_get_previous_state( );
2523 yy_next_state = yy_try_NUL_trans( yy_current_state );
2527 if ( yy_next_state )
2530 yy_cp = ++(yy_c_buf_p);
2531 yy_current_state = yy_next_state;
2538 yy_cp = (yy_last_accepting_cpos);
2539 yy_current_state = (yy_last_accepting_state);
2540 goto yy_find_action;
2544 else switch ( yy_get_next_buffer( ) )
2548 (yy_did_buffer_switch_on_eof) = 0;
2569 if ( ! (yy_did_buffer_switch_on_eof) )
2579 yy_current_state = yy_get_previous_state( );
2581 yy_cp = (yy_c_buf_p);
2589 yy_current_state = yy_get_previous_state( );
2591 yy_cp = (yy_c_buf_p);
2593 goto yy_find_action;
2600 "fatal flex scanner internal error--no action found" );
2621static int yy_get_next_buffer (
void)
2628 int number_to_move, i;
2633 "fatal flex scanner internal error--end of buffer missed" );
2657 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr) - 1);
2659 for ( i = 0; i < number_to_move; ++i )
2660 *(dest++) = *(source++);
2673 while ( num_to_read <= 0 )
2679 int yy_c_buf_p_offset =
2686 if ( new_size <= 0 )
2702 "fatal error - scanner input buffer overflow" );
2704 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
2716 (yy_n_chars), num_to_read );
2721 if ( (yy_n_chars) == 0 )
2742 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2746 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
2751 (yy_n_chars) += number_to_move;
2773 yy_current_state = (yy_start);
2779 if ( yy_accept[yy_current_state] )
2781 (yy_last_accepting_state) = yy_current_state;
2782 (yy_last_accepting_cpos) =
yy_cp;
2784 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2786 yy_current_state = (int) yy_def[yy_current_state];
2787 if ( yy_current_state >= 425 )
2788 yy_c = yy_meta[yy_c];
2790 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2793 return yy_current_state;
2809 char *
yy_cp = (yy_c_buf_p);
2812 if ( yy_accept[yy_current_state] )
2814 (yy_last_accepting_state) = yy_current_state;
2815 (yy_last_accepting_cpos) =
yy_cp;
2817 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2819 yy_current_state = (int) yy_def[yy_current_state];
2820 if ( yy_current_state >= 425 )
2821 yy_c = yy_meta[yy_c];
2823 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2824 yy_is_jam = (yy_current_state == 424);
2826 return yy_is_jam ? 0 : yy_current_state;
2838 static int yyinput (
void)
2840 static int input (
void)
2849 *(yy_c_buf_p) = (yy_hold_char);
2859 *(yy_c_buf_p) =
'\0';
2863 int offset = (int) ((yy_c_buf_p) - (
yytext_ptr));
2866 switch ( yy_get_next_buffer( ) )
2889 if ( ! (yy_did_buffer_switch_on_eof) )
2905 c = *(
unsigned char *) (yy_c_buf_p);
2906 *(yy_c_buf_p) =
'\0';
2907 (yy_hold_char) = *++(yy_c_buf_p);
2965 *(yy_c_buf_p) = (yy_hold_char);
2978 (yy_did_buffer_switch_on_eof) = 1;
2994 (yy_hold_char) = *(yy_c_buf_p);
3142 if (new_buffer == NULL)
3151 *(yy_c_buf_p) = (yy_hold_char);
3158 (yy_buffer_stack_top)++;
3163 (yy_did_buffer_switch_on_eof) = 1;
3183 if ((yy_buffer_stack_top) > 0)
3184 --(yy_buffer_stack_top);
3188 (yy_did_buffer_switch_on_eof) = 1;
3205 if (!(yy_buffer_stack)) {
3215 if ( ! (yy_buffer_stack) )
3216 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3218 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
3220 (yy_buffer_stack_max) = num_to_alloc;
3221 (yy_buffer_stack_top) = 0;
3225 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3230 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3235 if ( ! (yy_buffer_stack) )
3236 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
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;
3319 for ( i = 0; i < _yybytes_len; ++i )
3320 buf[i] = yybytes[i];
3337#ifndef YY_EXIT_FAILURE
3338#define YY_EXIT_FAILURE 2
3342static void yynoreturn yy_fatal_error (
const char* msg )
3344 fprintf( stderr,
"%s\n", msg );
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; \
3463static int yy_init_globals (
void)
3469 (yy_buffer_stack) = NULL;
3470 (yy_buffer_stack_top) = 0;
3471 (yy_buffer_stack_max) = 0;
3472 (yy_c_buf_p) = NULL;
3505 yyfree((yy_buffer_stack) );
3506 (yy_buffer_stack) = NULL;
3523static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
3527 for ( i = 0; i < n; ++i )
3532#ifdef YY_NEED_STRLEN
3533static int yy_flex_strlen (
const char * s )
3536 for ( n = 0; s[n]; ++n )
3545 return malloc(size);
3558 return realloc(ptr, size);
3563 free( (
char *) ptr );
3568#define YYTABLES_NAME "yytables"
3573#line 816 "d2_lexer.ll"
3579D2ParserContext::scanStringBegin(
const std::string& str,
ParserType parser_type)
3581 start_token_flag =
true;
3582 start_token_value = parser_type;
3589 buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3591 fatal(
"cannot scan string");
3598 const std::string& filename,
3601 start_token_flag =
true;
3602 start_token_value = parser_type;
3611 buffer = d2_parser__create_buffer(f, 65536 );
3613 fatal(
"cannot scan file " + filename);
3615 d2_parser__switch_to_buffer(buffer);
3623 static_cast<void>(d2_parser_lex_destroy());
3634 d2_parser__delete_buffer(
states_.back());
3642 fatal(
"Too many nested include.");
3645 FILE* f = fopen(filename.c_str(),
"r");
3647 fatal(
"Can't open include file " + filename);
3655 buffer = d2_parser__create_buffer(f, 65536 );
3657 fatal(
"Can't scan include file " + filename);
3659 d2_parser__switch_to_buffer(buffer);
3672 void dummy() { yy_fatal_error(
"Fix me: how to disable its definition?"); }
unsigned char flex_uint8_t
Evaluation error exception raised when trying to parse.
ParserType
Defines currently supported scopes.
isc::d2::location loc_
Location of the current token.
std::string file_
File name.
void includeFile(const std::string &filename)
Divert input to an include file.
@ DDNS_DOMAIN
Used while parsing a list of ddns-domains.
@ DNS_SERVERS
Used while parsing content of a control-socket.
@ DDNS_DOMAINS
Used while parsing content of a dns-server.
@ NCR_FORMAT
Used while parsing DhcpDdns/ncr-format.
@ NCR_PROTOCOL
Used while parsing DhcpDdns/ncr-protocol.
@ DHCPDDNS
Used while parsing content of a tsig-key.
@ OUTPUT_OPTIONS
Used while parsing DhcpDdns/loggers/output_options structures.
@ FORWARD_DDNS
Used while parsing content of DhcpDdns/reverse-ddns.
@ TSIG_KEY
Used while parsing a list of tsig-keys.
@ REVERSE_DDNS
Used while parsing content of a ddns-domain.
@ LOGGERS
Used while parsing DhcpDdns/loggers structures.
@ HOOKS_LIBRARIES
Used while parsing DhcpDdns/hooks-libraries.
@ TSIG_KEYS
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
@ CONFIG
Used while parsing content of DhcpDdns.
@ DNS_SERVER
Used while parsing content of list of dns-servers.
std::vector< FILE * > sfiles_
sFile (aka FILE) stack
FILE * sfile_
sFile (aka FILE)
void scanFileBegin(FILE *f, const std::string &filename, ParserType type)
Method called before scanning starts on a file.
std::vector< isc::d2::location > locs_
Location stack.
std::vector< struct yy_buffer_state * > states_
Lexer state stack.
static void fatal(const std::string &what)
Fatal error handler.
std::vector< std::string > files_
File name stack.
void scanEnd()
Method called after the last tokens are scanned.
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_KEY_NAME(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
static symbol_type make_FORWARD_DDNS(const location_type &l)
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
static symbol_type make_SOCKET_TYPE(const location_type &l)
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
static symbol_type make_TCP(const location_type &l)
static symbol_type make_NAME(const location_type &l)
static symbol_type make_MAXSIZE(const location_type &l)
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_LCURLY_BRACKET(const location_type &l)
static symbol_type make_DIGEST_BITS(const location_type &l)
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
static symbol_type make_SOCKET_NAME(const location_type &l)
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
static symbol_type make_NULL_TYPE(const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
static symbol_type make_UDP(const location_type &l)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
static symbol_type make_COLON(const location_type &l)
static symbol_type make_COMMA(const location_type &l)
static symbol_type make_SECRET(const location_type &l)
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)
static symbol_type make_OUTPUT(const location_type &l)
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
static symbol_type make_DHCPDDNS(const location_type &l)
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_DDNS_DOMAINS(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_HOSTNAME(const location_type &l)
static symbol_type make_USER_CONTEXT(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_REVERSE_DDNS(const location_type &l)
static symbol_type make_PATTERN(const location_type &l)
static symbol_type make_ALGORITHM(const location_type &l)
static symbol_type make_IP_ADDRESS(const location_type &l)
static symbol_type make_PORT(const location_type &l)
static symbol_type make_FLOAT(const double &v, const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_JSON(const location_type &l)
static symbol_type make_END(const location_type &l)
static symbol_type make_CONTROL_SOCKET(const location_type &l)
static symbol_type make_NCR_PROTOCOL(const location_type &l)
static symbol_type make_DNS_SERVERS(const location_type &l)
static symbol_type make_TSIG_KEYS(const location_type &l)
static symbol_type make_NCR_FORMAT(const location_type &l)
#define yy_load_buffer_state
unsigned char flex_uint8_t
unsigned int flex_uint32_t
#define yypush_buffer_state
#define yyget_in
Get the input stream.
struct yy_buffer_state * YY_BUFFER_STATE
#define YY_RESTORE_YY_MORE_OFFSET
#define yyget_leng
Get the length of the current token.
#define yyget_out
Get the output stream.
#define yyensure_buffer_stack
#define EOB_ACT_END_OF_FILE
#define YY_CURRENT_BUFFER_LVALUE
#define yyget_text
Get the current token.
#define yy_switch_to_buffer
#define YY_CURRENT_BUFFER
#define YY_INPUT(buf, result, max_size)
#define YY_STATE_EOF(state)
#define YY_END_OF_BUFFER_CHAR
#define YY_FATAL_ERROR(msg)
unsigned short int flex_uint16_t
#define yypop_buffer_state
Removes and deletes the top of the stack, if present.
#define YY_DO_BEFORE_ACTION
#define EOB_ACT_LAST_MATCH
#define YY_BUFFER_EOF_PENDING
#define EOB_ACT_CONTINUE_SCAN
#define yyget_lineno
Get the current line number.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
int yy_bs_column
The column count.
int yy_bs_lineno
The line count.