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 69
695#define YY_END_OF_BUFFER 70
705 62, 62, 0, 0, 0, 0, 0, 0, 0, 0,
706 70, 68, 10, 11, 68, 1, 62, 59, 62, 62,
707 68, 61, 60, 68, 68, 68, 68, 68, 55, 56,
708 68, 68, 68, 57, 58, 5, 5, 5, 68, 68,
709 68, 10, 11, 0, 0, 50, 0, 0, 0, 0,
710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
711 0, 0, 0, 0, 0, 0, 0, 1, 62, 62,
712 0, 61, 62, 3, 2, 6, 0, 62, 0, 0,
713 0, 0, 0, 0, 4, 0, 0, 9, 0, 51,
714 0, 0, 0, 0, 0, 0, 53, 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, 52, 54, 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, 67, 65,
723 0, 64, 63, 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, 66, 63,
728 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
730 0, 47, 0, 0, 0, 0, 0, 14, 0, 0,
731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
732 0, 0, 0, 43, 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, 45, 0, 0, 42, 0, 0, 0, 0, 0,
738 32, 0, 0, 0, 0, 0, 0, 22, 0, 0,
739 0, 0, 0, 0, 0, 0, 0, 0, 38, 39,
740 44, 0, 0, 0, 0, 0, 46, 0, 0, 0,
741 0, 0, 0, 12, 0, 0, 0, 0, 0, 0,
742 0, 0, 28, 0, 26, 0, 0, 0, 0, 0,
743 0, 49, 0, 0, 0, 0, 30, 0, 0, 0,
744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
745 0, 0, 0, 29, 0, 0, 0, 48, 0, 0,
746 0, 0, 0, 13, 17, 0, 0, 0, 37, 0,
747 0, 0, 0, 0, 0, 31, 0, 27, 0, 0,
749 0, 0, 0, 0, 35, 34, 0, 0, 25, 0,
750 23, 0, 16, 0, 0, 24, 21, 0, 0, 0,
751 0, 0, 33, 0, 0, 41, 40, 0, 36, 0,
755static const YY_CHAR yy_ec[256] =
757 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
758 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
759 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
760 1, 4, 5, 6, 7, 5, 5, 5, 5, 5,
761 5, 8, 9, 10, 11, 12, 13, 14, 14, 14,
762 14, 14, 14, 14, 14, 14, 14, 15, 5, 16,
763 5, 17, 18, 5, 19, 20, 21, 22, 23, 24,
764 5, 5, 5, 25, 5, 26, 5, 27, 28, 29,
765 5, 30, 31, 32, 33, 5, 5, 5, 5, 5,
766 34, 35, 36, 5, 37, 5, 38, 39, 40, 41,
768 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
769 52, 53, 5, 54, 55, 56, 57, 58, 59, 60,
770 61, 62, 63, 5, 64, 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 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, 5, 5, 5, 5, 5,
787static const YY_CHAR yy_meta[65] =
789 1, 1, 2, 1, 1, 3, 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, 1, 1, 1, 1, 1, 1,
800 0, 63, 17, 27, 35, 42, 46, 51, 80, 89,
801 686, 687, 24, 682, 127, 0, 180, 687, 181, 66,
802 9, 184, 687, 666, 101, 21, 14, 31, 687, 687,
803 22, 61, 66, 687, 687, 687, 98, 670, 631, 0,
804 664, 99, 677, 27, 205, 687, 634, 166, 83, 177,
805 228, 629, 625, 159, 64, 624, 622, 632, 65, 635,
806 84, 615, 164, 629, 16, 185, 187, 0, 194, 252,
807 259, 260, 197, 687, 0, 687, 656, 655, 186, 198,
808 232, 243, 250, 244, 687, 628, 661, 687, 209, 687,
809 274, 626, 253, 257, 259, 659, 0, 326, 620, 163,
811 612, 623, 617, 605, 602, 604, 177, 646, 595, 616,
812 610, 593, 602, 597, 594, 177, 595, 590, 238, 607,
813 600, 603, 0, 259, 267, 277, 260, 269, 280, 595,
814 687, 590, 270, 636, 635, 634, 687, 687, 356, 587,
815 588, 581, 581, 578, 592, 622, 577, 572, 582, 573,
816 590, 616, 572, 581, 249, 582, 612, 569, 583, 564,
817 563, 576, 563, 574, 567, 570, 559, 285, 687, 687,
818 297, 687, 687, 555, 589, 604, 687, 687, 386, 555,
819 566, 553, 595, 561, 549, 548, 557, 563, 545, 548,
820 557, 546, 558, 553, 548, 551, 586, 280, 534, 540,
822 547, 582, 533, 544, 531, 542, 572, 571, 687, 687,
823 540, 539, 687, 416, 533, 527, 525, 535, 526, 518,
824 531, 566, 517, 559, 531, 527, 529, 512, 511, 502,
825 509, 687, 510, 507, 504, 517, 504, 687, 502, 500,
826 509, 498, 505, 512, 509, 499, 493, 492, 498, 494,
827 503, 533, 489, 687, 501, 492, 490, 485, 488, 476,
828 481, 493, 528, 479, 480, 300, 475, 479, 487, 522,
829 471, 515, 483, 472, 687, 468, 477, 515, 509, 469,
830 460, 478, 458, 504, 468, 471, 470, 469, 504, 503,
831 502, 687, 457, 450, 687, 453, 452, 461, 496, 490,
833 687, 439, 273, 438, 447, 491, 446, 687, 440, 456,
834 451, 446, 449, 449, 450, 482, 432, 480, 687, 687,
835 687, 447, 432, 430, 429, 427, 687, 435, 461, 415,
836 391, 396, 394, 687, 443, 396, 401, 397, 389, 390,
837 402, 388, 687, 386, 687, 378, 393, 376, 375, 368,
838 381, 687, 371, 367, 413, 376, 687, 377, 365, 409,
839 359, 287, 362, 374, 405, 398, 351, 356, 355, 387,
840 341, 349, 348, 687, 329, 340, 332, 687, 380, 329,
841 378, 328, 328, 687, 687, 332, 322, 321, 687, 317,
842 365, 357, 306, 319, 354, 687, 313, 687, 352, 311,
844 350, 304, 303, 347, 687, 687, 346, 295, 687, 294,
845 687, 301, 687, 286, 283, 687, 687, 330, 293, 279,
846 320, 243, 687, 167, 119, 687, 687, 64, 687, 53,
847 2, 687, 687, 459, 462, 465, 0, 468, 471, 474,
853 434, 434, 435, 435, 434, 434, 434, 434, 434, 434,
854 433, 433, 433, 433, 433, 436, 433, 433, 433, 433,
855 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
856 433, 433, 433, 433, 433, 433, 433, 433, 433, 437,
857 433, 433, 433, 438, 15, 433, 45, 45, 45, 45,
858 439, 45, 45, 45, 45, 45, 45, 45, 45, 45,
859 45, 45, 45, 45, 45, 45, 45, 436, 433, 433,
860 433, 433, 433, 433, 440, 433, 433, 433, 433, 433,
861 433, 433, 433, 433, 433, 433, 437, 433, 438, 433,
862 433, 45, 45, 45, 45, 441, 45, 439, 45, 45,
864 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
865 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
866 45, 45, 440, 433, 433, 433, 433, 433, 433, 433,
867 433, 45, 45, 45, 45, 441, 433, 433, 98, 45,
868 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
869 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
870 45, 45, 45, 45, 45, 45, 45, 433, 433, 433,
871 433, 433, 433, 433, 45, 45, 433, 433, 98, 45,
872 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
873 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
875 45, 45, 45, 45, 45, 45, 45, 45, 433, 433,
876 433, 45, 433, 98, 45, 45, 45, 45, 45, 45,
877 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
878 45, 433, 45, 45, 45, 45, 45, 433, 45, 45,
879 45, 45, 45, 45, 433, 45, 45, 45, 45, 45,
880 45, 45, 45, 433, 45, 45, 45, 45, 45, 45,
881 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
882 45, 45, 45, 45, 433, 45, 45, 45, 45, 45,
883 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
884 45, 433, 45, 45, 433, 45, 45, 45, 45, 45,
886 433, 45, 45, 45, 45, 45, 45, 433, 45, 45,
887 45, 45, 45, 45, 45, 45, 45, 45, 433, 433,
888 433, 45, 45, 45, 45, 45, 433, 45, 45, 45,
889 45, 45, 45, 433, 45, 45, 45, 45, 45, 45,
890 45, 45, 433, 45, 433, 45, 45, 45, 45, 45,
891 45, 433, 45, 45, 45, 45, 433, 45, 45, 45,
892 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
893 45, 45, 45, 433, 45, 45, 45, 433, 45, 45,
894 45, 45, 45, 433, 433, 45, 45, 45, 433, 45,
895 45, 45, 45, 45, 45, 433, 45, 433, 45, 45,
897 45, 45, 45, 45, 433, 433, 45, 45, 433, 45,
898 433, 45, 433, 45, 45, 433, 433, 45, 45, 45,
899 45, 45, 433, 45, 45, 433, 433, 45, 433, 45,
900 45, 433, 0, 433, 433, 433, 433, 433, 433, 433,
906 87, 13, 14, 13, 433, 15, 16, 432, 17, 18,
907 19, 20, 21, 22, 23, 24, 74, 433, 37, 14,
908 37, 75, 25, 26, 38, 42, 27, 42, 37, 14,
909 37, 28, 90, 29, 38, 30, 13, 14, 13, 79,
910 79, 25, 31, 13, 14, 13, 80, 13, 14, 13,
911 32, 40, 13, 14, 13, 33, 40, 119, 79, 82,
912 81, 91, 34, 35, 13, 14, 13, 120, 15, 16,
913 80, 17, 18, 19, 20, 21, 22, 23, 24, 73,
914 39, 13, 14, 13, 81, 25, 26, 39, 71, 27,
915 13, 14, 13, 80, 28, 81, 29, 41, 30, 42,
917 42, 42, 42, 94, 25, 31, 41, 71, 431, 77,
918 110, 77, 105, 32, 78, 106, 111, 83, 33, 84,
919 430, 113, 94, 114, 429, 34, 35, 44, 44, 44,
920 45, 45, 46, 45, 45, 45, 45, 45, 45, 45,
921 45, 45, 45, 45, 45, 45, 45, 45, 47, 45,
922 45, 48, 45, 45, 45, 45, 45, 45, 49, 50,
923 45, 51, 45, 45, 52, 45, 53, 54, 45, 55,
924 45, 56, 57, 48, 58, 59, 60, 61, 62, 63,
925 64, 65, 66, 67, 45, 45, 45, 45, 45, 45,
926 45, 69, 69, 70, 72, 69, 93, 72, 95, 101,
928 102, 116, 71, 71, 103, 94, 71, 73, 95, 104,
929 73, 124, 141, 142, 90, 117, 71, 95, 428, 71,
930 93, 71, 71, 125, 94, 71, 45, 95, 149, 45,
931 159, 150, 160, 97, 124, 71, 45, 45, 71, 121,
932 45, 122, 45, 91, 45, 45, 125, 45, 427, 45,
933 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
934 45, 45, 45, 69, 126, 70, 45, 77, 124, 77,
935 45, 69, 78, 72, 71, 125, 126, 163, 45, 89,
936 133, 45, 71, 45, 98, 134, 89, 135, 126, 168,
937 168, 127, 169, 71, 169, 164, 176, 380, 128, 170,
939 129, 71, 170, 195, 133, 295, 196, 209, 89, 134,
940 296, 135, 89, 168, 171, 169, 89, 172, 170, 209,
941 176, 173, 233, 330, 89, 426, 209, 89, 331, 89,
942 89, 138, 234, 425, 424, 423, 297, 422, 210, 139,
943 421, 381, 420, 419, 139, 139, 139, 139, 139, 139,
944 418, 417, 416, 415, 414, 413, 412, 411, 410, 409,
945 408, 407, 406, 139, 139, 139, 139, 139, 139, 179,
946 405, 404, 403, 402, 179, 179, 179, 179, 179, 179,
947 401, 400, 399, 398, 397, 396, 395, 394, 393, 392,
948 391, 390, 389, 179, 179, 179, 179, 179, 179, 214,
950 388, 387, 386, 385, 214, 214, 214, 214, 214, 214,
951 384, 383, 382, 379, 378, 377, 376, 375, 374, 373,
952 372, 371, 370, 214, 214, 214, 214, 214, 214, 45,
953 369, 368, 367, 366, 45, 45, 45, 45, 45, 45,
954 365, 364, 363, 362, 361, 360, 359, 358, 357, 356,
955 355, 354, 353, 45, 45, 45, 45, 45, 45, 12,
956 12, 12, 36, 36, 36, 68, 352, 68, 89, 89,
957 89, 96, 96, 96, 123, 351, 123, 136, 136, 136,
958 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
959 340, 339, 338, 337, 336, 335, 334, 333, 332, 329,
961 328, 327, 326, 325, 324, 323, 322, 321, 320, 319,
962 318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
963 308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
964 298, 294, 293, 292, 291, 290, 289, 288, 287, 286,
965 285, 284, 283, 282, 281, 280, 279, 278, 277, 276,
966 275, 274, 273, 272, 271, 270, 269, 268, 267, 266,
967 265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
968 255, 254, 253, 252, 251, 250, 249, 248, 247, 246,
969 245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
970 235, 232, 231, 230, 229, 228, 227, 226, 225, 224,
972 223, 222, 221, 220, 219, 218, 217, 216, 215, 213,
973 212, 211, 208, 207, 206, 205, 204, 203, 202, 201,
974 200, 199, 198, 197, 194, 193, 192, 191, 190, 189,
975 188, 187, 186, 185, 184, 183, 182, 181, 180, 137,
976 178, 177, 175, 174, 167, 166, 165, 162, 161, 158,
977 157, 156, 155, 154, 153, 152, 151, 148, 147, 146,
978 145, 144, 143, 140, 137, 132, 131, 130, 78, 78,
979 118, 115, 112, 109, 108, 107, 100, 99, 92, 43,
980 88, 86, 85, 76, 43, 433, 11, 433, 433, 433,
981 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
983 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
984 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
985 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
986 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
987 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
993 437, 1, 1, 1, 0, 1, 1, 431, 1, 1,
994 1, 1, 1, 1, 1, 1, 21, 0, 3, 3,
995 3, 21, 1, 1, 3, 13, 1, 13, 4, 4,
996 4, 1, 44, 1, 4, 1, 5, 5, 5, 26,
997 31, 1, 1, 6, 6, 6, 27, 7, 7, 7,
998 1, 7, 8, 8, 8, 1, 8, 65, 26, 31,
999 28, 44, 1, 1, 2, 2, 2, 65, 2, 2,
1000 27, 2, 2, 2, 2, 2, 2, 2, 2, 20,
1001 5, 9, 9, 9, 28, 2, 2, 6, 20, 2,
1002 10, 10, 10, 32, 2, 33, 2, 9, 2, 37,
1004 42, 37, 42, 49, 2, 2, 10, 20, 430, 25,
1005 59, 25, 55, 2, 25, 55, 59, 32, 2, 33,
1006 428, 61, 49, 61, 425, 2, 2, 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, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1010 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1011 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1012 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1013 15, 17, 19, 17, 19, 22, 48, 22, 50, 54,
1015 54, 63, 17, 19, 54, 66, 22, 69, 67, 54,
1016 73, 79, 100, 100, 89, 63, 69, 50, 424, 73,
1017 48, 17, 19, 80, 66, 22, 45, 67, 107, 45,
1018 116, 107, 116, 51, 79, 69, 45, 45, 73, 66,
1019 51, 67, 45, 89, 45, 45, 80, 45, 422, 45,
1020 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1021 45, 45, 51, 70, 81, 70, 51, 71, 82, 71,
1022 51, 72, 71, 72, 70, 83, 84, 119, 51, 91,
1023 93, 51, 72, 51, 51, 94, 91, 95, 81, 124,
1024 127, 82, 125, 70, 128, 119, 133, 362, 83, 126,
1026 84, 72, 129, 155, 93, 266, 155, 168, 91, 94,
1027 266, 95, 91, 124, 127, 125, 91, 128, 126, 171,
1028 133, 129, 198, 303, 91, 421, 168, 91, 303, 91,
1029 91, 98, 198, 420, 419, 418, 266, 415, 171, 98,
1030 414, 362, 412, 410, 98, 98, 98, 98, 98, 98,
1031 408, 407, 404, 403, 402, 401, 400, 399, 397, 395,
1032 394, 393, 392, 98, 98, 98, 98, 98, 98, 139,
1033 391, 390, 388, 387, 139, 139, 139, 139, 139, 139,
1034 386, 383, 382, 381, 380, 379, 377, 376, 375, 373,
1035 372, 371, 370, 139, 139, 139, 139, 139, 139, 179,
1037 369, 368, 367, 366, 179, 179, 179, 179, 179, 179,
1038 365, 364, 363, 361, 360, 359, 358, 356, 355, 354,
1039 353, 351, 350, 179, 179, 179, 179, 179, 179, 214,
1040 349, 348, 347, 346, 214, 214, 214, 214, 214, 214,
1041 344, 342, 341, 340, 339, 338, 337, 336, 335, 333,
1042 332, 331, 330, 214, 214, 214, 214, 214, 214, 434,
1043 434, 434, 435, 435, 435, 436, 329, 436, 438, 438,
1044 438, 439, 439, 439, 440, 328, 440, 441, 441, 441,
1045 326, 325, 324, 323, 322, 318, 317, 316, 315, 314,
1046 313, 312, 311, 310, 309, 307, 306, 305, 304, 302,
1048 300, 299, 298, 297, 296, 294, 293, 291, 290, 289,
1049 288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
1050 278, 277, 276, 274, 273, 272, 271, 270, 269, 268,
1051 267, 265, 264, 263, 262, 261, 260, 259, 258, 257,
1052 256, 255, 253, 252, 251, 250, 249, 248, 247, 246,
1053 245, 244, 243, 242, 241, 240, 239, 237, 236, 235,
1054 234, 233, 231, 230, 229, 228, 227, 226, 225, 224,
1055 223, 222, 221, 220, 219, 218, 217, 216, 215, 212,
1056 211, 208, 207, 206, 205, 204, 203, 202, 201, 200,
1057 199, 197, 196, 195, 194, 193, 192, 191, 190, 189,
1059 188, 187, 186, 185, 184, 183, 182, 181, 180, 176,
1060 175, 174, 167, 166, 165, 164, 163, 162, 161, 160,
1061 159, 158, 157, 156, 154, 153, 152, 151, 150, 149,
1062 148, 147, 146, 145, 144, 143, 142, 141, 140, 136,
1063 135, 134, 132, 130, 122, 121, 120, 118, 117, 115,
1064 114, 113, 112, 111, 110, 109, 108, 106, 105, 104,
1065 103, 102, 101, 99, 96, 92, 87, 86, 78, 77,
1066 64, 62, 60, 58, 57, 56, 53, 52, 47, 43,
1067 41, 39, 38, 24, 14, 11, 433, 433, 433, 433,
1068 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1070 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1071 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1072 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1073 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1074 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1079static char *yy_last_accepting_cpos;
1086 137, 139, 141, 146, 147, 152, 153, 154, 166, 169,
1087 174, 180, 189, 200, 211, 220, 229, 238, 248, 258,
1088 268, 285, 302, 311, 320, 330, 342, 352, 363, 372,
1089 382, 392, 402, 411, 420, 429, 438, 447, 456, 465,
1090 474, 483, 492, 501, 510, 519, 528, 541, 550, 559,
1091 660, 676, 725, 733, 748, 749, 750, 751, 752, 753,
1092 755, 773, 786, 791, 795, 797, 799, 801
1098#define REJECT reject_used_but_not_detected
1099#define yymore() yymore_used_but_not_detected
1100#define YY_MORE_ADJ 0
1101#define YY_RESTORE_YY_MORE_OFFSET
1103#line 1 "d2_lexer.ll"
1109#line 8 "d2_lexer.ll"
1112#ifndef __clang_analyzer__
1122#include <boost/lexical_cast.hpp>
1136bool start_token_flag =
false;
1139unsigned int comment_start_line = 0;
1144#define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
1145#line 1145 "d2_lexer.cc"
1160#define YY_NO_INPUT 1
1166#line 94 "d2_lexer.ll"
1170#define YY_USER_ACTION driver.loc_.columns(yyleng);
1171#line 1171 "d2_lexer.cc"
1172#line 1172 "d2_lexer.cc"
1177#define DIR_INCLUDE 3
1180#ifndef YY_NO_UNISTD_H
1192#ifndef YY_EXTRA_TYPE
1193#define YY_EXTRA_TYPE void *
1200static int yy_init_globals (
void );
1243#ifndef YY_SKIP_YYWRAP
1245extern "C" int yywrap (
void );
1247extern int yywrap (
void );
1260static void yy_flex_strncpy (
char *,
const char *,
int );
1263#ifdef YY_NEED_STRLEN
1264static int yy_flex_strlen (
const char * );
1271static int yyinput (
void );
1273static int input (
void );
1285#ifndef YY_READ_BUF_SIZE
1288#define YY_READ_BUF_SIZE 16384
1290#define YY_READ_BUF_SIZE 8192
1300#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1310#define YY_INPUT(buf,result,max_size) \
1312 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1316 for ( n = 0; n < max_size && \
1317 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1318 buf[n] = (char) c; \
1320 buf[n++] = (char) c; \
1321 if ( c == EOF && ferror( yyin ) ) \
1322 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1328 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1330 if( errno != EINTR) \
1332 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1350#define yyterminate() return YY_NULL
1354#ifndef YY_START_STACK_INCR
1355#define YY_START_STACK_INCR 25
1359#ifndef YY_FATAL_ERROR
1361#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1382#define YY_DECL_IS_OURS 1
1385extern int yylex (
void);
1387#define YY_DECL int yylex (void)
1396#ifndef YY_USER_ACTION
1397#define YY_USER_ACTION
1402#define YY_BREAK break;
1406#define YY_RULE_SETUP \
1454#line 100 "d2_lexer.ll"
1458#line 104 "d2_lexer.ll"
1466 if (start_token_flag) {
1467 start_token_flag =
false;
1468 switch (start_token_value) {
1469 case D2ParserContext::PARSER_JSON:
1472 case D2ParserContext::PARSER_DHCPDDNS:
1474 case D2ParserContext::PARSER_SUB_DHCPDDNS:
1476 case D2ParserContext::PARSER_TSIG_KEY:
1478 case D2ParserContext::PARSER_TSIG_KEYS:
1480 case D2ParserContext::PARSER_DDNS_DOMAIN:
1482 case D2ParserContext::PARSER_DDNS_DOMAINS:
1484 case D2ParserContext::PARSER_DNS_SERVER:
1486 case D2ParserContext::PARSER_HOOKS_LIBRARY:
1492#line 1492 "d2_lexer.cc"
1497 yy_cp = (yy_c_buf_p);
1500 *
yy_cp = (yy_hold_char);
1508 yy_current_state = (yy_start);
1513 if ( yy_accept[yy_current_state] )
1515 (yy_last_accepting_state) = yy_current_state;
1516 (yy_last_accepting_cpos) =
yy_cp;
1518 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1520 yy_current_state = (int) yy_def[yy_current_state];
1521 if ( yy_current_state >= 434 )
1522 yy_c = yy_meta[yy_c];
1524 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1527 while ( yy_current_state != 433 );
1528 yy_cp = (yy_last_accepting_cpos);
1529 yy_current_state = (yy_last_accepting_state);
1533 yy_act = yy_accept[yy_current_state];
1545 fprintf( stderr,
"--scanner backing up\n" );
1547 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1550 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1553 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1555 fprintf( stderr,
"--EOF (start condition %d)\n",
YY_START );
1563 *
yy_cp = (yy_hold_char);
1564 yy_cp = (yy_last_accepting_cpos);
1565 yy_current_state = (yy_last_accepting_state);
1566 goto yy_find_action;
1570#line 137 "d2_lexer.ll"
1575#line 139 "d2_lexer.ll"
1580#line 141 "d2_lexer.ll"
1583 comment_start_line = driver.loc_.end.line;;
1588#line 146 "d2_lexer.ll"
1593#line 147 "d2_lexer.ll"
1597#line 148 "d2_lexer.ll"
1604#line 152 "d2_lexer.ll"
1609#line 153 "d2_lexer.ll"
1614#line 154 "d2_lexer.ll"
1619 std::string tmp(
yytext+1);
1620 tmp.resize(tmp.size() - 1);
1622 driver.includeFile(tmp);
1628#line 163 "d2_lexer.ll"
1635#line 166 "d2_lexer.ll"
1640#line 169 "d2_lexer.ll"
1649#line 174 "d2_lexer.ll"
1652 driver.loc_.lines(
yyleng);
1658#line 180 "d2_lexer.ll"
1660 switch(driver.ctx_) {
1670#line 189 "d2_lexer.ll"
1672 switch(driver.ctx_) {
1684#line 200 "d2_lexer.ll"
1686 switch(driver.ctx_) {
1698#line 211 "d2_lexer.ll"
1700 switch(driver.ctx_) {
1710#line 220 "d2_lexer.ll"
1712 switch(driver.ctx_) {
1722#line 229 "d2_lexer.ll"
1724 switch(driver.ctx_) {
1734#line 238 "d2_lexer.ll"
1740 std::string tmp(
yytext+1);
1741 tmp.resize(tmp.size() - 1);
1747#line 248 "d2_lexer.ll"
1753 std::string tmp(
yytext+1);
1754 tmp.resize(tmp.size() - 1);
1760#line 258 "d2_lexer.ll"
1766 std::string tmp(
yytext+1);
1767 tmp.resize(tmp.size() - 1);
1773#line 268 "d2_lexer.ll"
1775 switch(driver.ctx_) {
1793#line 285 "d2_lexer.ll"
1795 switch(driver.ctx_) {
1813#line 302 "d2_lexer.ll"
1815 switch(driver.ctx_) {
1825#line 311 "d2_lexer.ll"
1827 switch(driver.ctx_) {
1837#line 320 "d2_lexer.ll"
1839 switch(driver.ctx_) {
1850#line 330 "d2_lexer.ll"
1852 switch(driver.ctx_) {
1865#line 342 "d2_lexer.ll"
1867 switch(driver.ctx_) {
1878#line 352 "d2_lexer.ll"
1880 switch(driver.ctx_) {
1891#line 363 "d2_lexer.ll"
1893 switch(driver.ctx_) {
1903#line 372 "d2_lexer.ll"
1905 switch(driver.ctx_) {
1916#line 382 "d2_lexer.ll"
1918 switch(driver.ctx_) {
1929#line 392 "d2_lexer.ll"
1931 switch(driver.ctx_) {
1942#line 402 "d2_lexer.ll"
1944 switch(driver.ctx_) {
1954#line 411 "d2_lexer.ll"
1956 switch(driver.ctx_) {
1966#line 420 "d2_lexer.ll"
1968 switch(driver.ctx_) {
1978#line 429 "d2_lexer.ll"
1980 switch(driver.ctx_) {
1990#line 438 "d2_lexer.ll"
1992 switch(driver.ctx_) {
2002#line 447 "d2_lexer.ll"
2004 switch(driver.ctx_) {
2014#line 456 "d2_lexer.ll"
2016 switch(driver.ctx_) {
2026#line 465 "d2_lexer.ll"
2028 switch(driver.ctx_) {
2038#line 474 "d2_lexer.ll"
2040 switch(driver.ctx_) {
2050#line 483 "d2_lexer.ll"
2052 switch(driver.ctx_) {
2062#line 492 "d2_lexer.ll"
2064 switch(driver.ctx_) {
2074#line 501 "d2_lexer.ll"
2076 switch(driver.ctx_) {
2086#line 510 "d2_lexer.ll"
2088 switch(driver.ctx_) {
2098#line 519 "d2_lexer.ll"
2100 switch(driver.ctx_) {
2110#line 528 "d2_lexer.ll"
2112 switch(driver.ctx_) {
2126#line 541 "d2_lexer.ll"
2128 switch(driver.ctx_) {
2138#line 550 "d2_lexer.ll"
2140 switch(driver.ctx_) {
2150#line 559 "d2_lexer.ll"
2155 std::string raw(
yytext+1);
2156 size_t len = raw.size() - 1;
2158 std::string decoded;
2159 decoded.reserve(len);
2160 for (
size_t pos = 0; pos < len; ++pos) {
2166 driver.error(driver.loc_,
"Bad quote in \"" + raw +
"\"");
2172 driver.error(driver.loc_,
"Overflow escape in \"" + raw +
"\"");
2179 decoded.push_back(c);
2182 decoded.push_back(
'\b');
2185 decoded.push_back(
'\f');
2188 decoded.push_back(
'\n');
2191 decoded.push_back(
'\r');
2194 decoded.push_back(
'\t');
2199 if (pos + 4 > len) {
2201 driver.error(driver.loc_,
2202 "Overflow unicode escape in \"" + raw +
"\"");
2204 if ((raw[pos] !=
'0') || (raw[pos + 1] !=
'0')) {
2205 driver.error(driver.loc_,
2206 "Unsupported unicode escape in \"" + raw +
"\"",
2211 if ((c >=
'0') && (c <=
'9')) {
2213 }
else if ((c >=
'A') && (c <=
'F')) {
2214 b = (c -
'A' + 10) << 4;
2215 }
else if ((c >=
'a') && (c <=
'f')) {
2216 b = (c -
'a' + 10) << 4;
2219 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2223 if ((c >=
'0') && (c <=
'9')) {
2225 }
else if ((c >=
'A') && (c <=
'F')) {
2227 }
else if ((c >=
'a') && (c <=
'f')) {
2231 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2233 decoded.push_back(
static_cast<char>(b & 0xff));
2237 driver.error(driver.loc_,
"Bad escape in \"" + raw +
"\"");
2241 if ((c >= 0) && (c < 0x20)) {
2243 driver.error(driver.loc_,
"Invalid control in \"" + raw +
"\"");
2245 decoded.push_back(c);
2255#line 660 "d2_lexer.ll"
2258 std::string raw(
yytext+1);
2259 size_t len = raw.size() - 1;
2261 for (; pos < len; ++pos) {
2263 if ((c >= 0) && (c < 0x20)) {
2267 driver.error(driver.loc_,
2268 "Invalid control in " + std::string(
yytext),
2275#line 676 "d2_lexer.ll"
2278 std::string raw(
yytext+1);
2279 size_t len = raw.size() - 1;
2282 for (; pos < len; ++pos) {
2301 if ((pos + 4 > len) ||
2302 !std::isxdigit(raw[pos + 1]) ||
2303 !std::isxdigit(raw[pos + 2]) ||
2304 !std::isxdigit(raw[pos + 3]) ||
2305 !std::isxdigit(raw[pos + 4])) {
2316 std::string trailer =
"";
2317 if (raw[len - 1] ==
'\\') {
2320 driver.error(driver.loc_,
2321 "Bad escape in " + std::string(
yytext) + trailer,
2327#line 725 "d2_lexer.ll"
2330 std::string raw(
yytext+1);
2331 driver.error(driver.loc_,
2332 "Overflow escape in " + std::string(
yytext),
2338#line 733 "d2_lexer.ll"
2341 std::string raw(
yytext+1);
2342 size_t pos = raw.size() - 1;
2343 for (; pos > 0; --pos) {
2349 driver.error(driver.loc_,
2350 "Overflow unicode escape in " + std::string(
yytext),
2356#line 748 "d2_lexer.ll"
2361#line 749 "d2_lexer.ll"
2366#line 750 "d2_lexer.ll"
2371#line 751 "d2_lexer.ll"
2376#line 752 "d2_lexer.ll"
2381#line 753 "d2_lexer.ll"
2386#line 755 "d2_lexer.ll"
2390 int64_t integer = 0;
2396 integer = boost::lexical_cast<int64_t>(tmp);
2397 }
catch (
const boost::bad_lexical_cast &) {
2398 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to an integer.");
2407#line 773 "d2_lexer.ll"
2413 fp = boost::lexical_cast<double>(tmp);
2414 }
catch (
const boost::bad_lexical_cast &) {
2415 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to a floating point.");
2423#line 786 "d2_lexer.ll"
2431#line 791 "d2_lexer.ll"
2438#line 795 "d2_lexer.ll"
2439driver.error (driver.loc_,
"JSON true reserved keyword is lower case only");
2443#line 797 "d2_lexer.ll"
2444driver.error (driver.loc_,
"JSON false reserved keyword is lower case only");
2448#line 799 "d2_lexer.ll"
2449driver.error (driver.loc_,
"JSON null reserved keyword is lower case only");
2453#line 801 "d2_lexer.ll"
2454driver.error (driver.loc_,
"Invalid character: " + std::string(
yytext));
2457#line 803 "d2_lexer.ll"
2459 if (driver.states_.empty()) {
2462 driver.loc_ = driver.locs_.back();
2463 driver.locs_.pop_back();
2464 driver.file_ = driver.files_.back();
2465 driver.files_.pop_back();
2466 if (driver.sfile_) {
2467 fclose(driver.sfile_);
2470 if (!driver.sfiles_.empty()) {
2471 driver.sfile_ = driver.sfiles_.back();
2472 driver.sfiles_.pop_back();
2475 d2_parser__switch_to_buffer(driver.states_.back());
2476 driver.states_.pop_back();
2483#line 826 "d2_lexer.ll"
2486#line 2486 "d2_lexer.cc"
2494 *
yy_cp = (yy_hold_char);
2528 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
2530 yy_current_state = yy_get_previous_state( );
2541 yy_next_state = yy_try_NUL_trans( yy_current_state );
2545 if ( yy_next_state )
2548 yy_cp = ++(yy_c_buf_p);
2549 yy_current_state = yy_next_state;
2556 yy_cp = (yy_last_accepting_cpos);
2557 yy_current_state = (yy_last_accepting_state);
2558 goto yy_find_action;
2562 else switch ( yy_get_next_buffer( ) )
2566 (yy_did_buffer_switch_on_eof) = 0;
2587 if ( ! (yy_did_buffer_switch_on_eof) )
2597 yy_current_state = yy_get_previous_state( );
2599 yy_cp = (yy_c_buf_p);
2607 yy_current_state = yy_get_previous_state( );
2609 yy_cp = (yy_c_buf_p);
2611 goto yy_find_action;
2618 "fatal flex scanner internal error--no action found" );
2639static int yy_get_next_buffer (
void)
2646 int number_to_move, i;
2651 "fatal flex scanner internal error--end of buffer missed" );
2675 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr) - 1);
2677 for ( i = 0; i < number_to_move; ++i )
2678 *(dest++) = *(source++);
2691 while ( num_to_read <= 0 )
2697 int yy_c_buf_p_offset =
2704 if ( new_size <= 0 )
2720 "fatal error - scanner input buffer overflow" );
2722 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
2734 (yy_n_chars), num_to_read );
2739 if ( (yy_n_chars) == 0 )
2760 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2764 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
2769 (yy_n_chars) += number_to_move;
2791 yy_current_state = (yy_start);
2797 if ( yy_accept[yy_current_state] )
2799 (yy_last_accepting_state) = yy_current_state;
2800 (yy_last_accepting_cpos) =
yy_cp;
2802 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2804 yy_current_state = (int) yy_def[yy_current_state];
2805 if ( yy_current_state >= 434 )
2806 yy_c = yy_meta[yy_c];
2808 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2811 return yy_current_state;
2827 char *
yy_cp = (yy_c_buf_p);
2830 if ( yy_accept[yy_current_state] )
2832 (yy_last_accepting_state) = yy_current_state;
2833 (yy_last_accepting_cpos) =
yy_cp;
2835 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2837 yy_current_state = (int) yy_def[yy_current_state];
2838 if ( yy_current_state >= 434 )
2839 yy_c = yy_meta[yy_c];
2841 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2842 yy_is_jam = (yy_current_state == 433);
2844 return yy_is_jam ? 0 : yy_current_state;
2856 static int yyinput (
void)
2858 static int input (
void)
2867 *(yy_c_buf_p) = (yy_hold_char);
2877 *(yy_c_buf_p) =
'\0';
2881 int offset = (int) ((yy_c_buf_p) - (
yytext_ptr));
2884 switch ( yy_get_next_buffer( ) )
2907 if ( ! (yy_did_buffer_switch_on_eof) )
2923 c = *(
unsigned char *) (yy_c_buf_p);
2924 *(yy_c_buf_p) =
'\0';
2925 (yy_hold_char) = *++(yy_c_buf_p);
2983 *(yy_c_buf_p) = (yy_hold_char);
2996 (yy_did_buffer_switch_on_eof) = 1;
3012 (yy_hold_char) = *(yy_c_buf_p);
3160 if (new_buffer == NULL)
3169 *(yy_c_buf_p) = (yy_hold_char);
3176 (yy_buffer_stack_top)++;
3181 (yy_did_buffer_switch_on_eof) = 1;
3201 if ((yy_buffer_stack_top) > 0)
3202 --(yy_buffer_stack_top);
3206 (yy_did_buffer_switch_on_eof) = 1;
3223 if (!(yy_buffer_stack)) {
3233 if ( ! (yy_buffer_stack) )
3234 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3236 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
3238 (yy_buffer_stack_max) = num_to_alloc;
3239 (yy_buffer_stack_top) = 0;
3243 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3248 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3253 if ( ! (yy_buffer_stack) )
3254 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3257 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
3258 (yy_buffer_stack_max) = num_to_alloc;
3337 for ( i = 0; i < _yybytes_len; ++i )
3338 buf[i] = yybytes[i];
3355#ifndef YY_EXIT_FAILURE
3356#define YY_EXIT_FAILURE 2
3360static void yynoreturn yy_fatal_error (
const char* msg )
3362 fprintf( stderr,
"%s\n", msg );
3376 int yyless_macro_arg = (n); \
3377 YY_LESS_LINENO(yyless_macro_arg);\
3378 yytext[yyleng] = (yy_hold_char); \
3379 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3380 (yy_hold_char) = *(yy_c_buf_p); \
3381 *(yy_c_buf_p) = '\0'; \
3382 yyleng = yyless_macro_arg; \
3481static int yy_init_globals (
void)
3487 (yy_buffer_stack) = NULL;
3488 (yy_buffer_stack_top) = 0;
3489 (yy_buffer_stack_max) = 0;
3490 (yy_c_buf_p) = NULL;
3523 yyfree((yy_buffer_stack) );
3524 (yy_buffer_stack) = NULL;
3541static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
3545 for ( i = 0; i < n; ++i )
3550#ifdef YY_NEED_STRLEN
3551static int yy_flex_strlen (
const char * s )
3554 for ( n = 0; s[n]; ++n )
3563 return malloc(size);
3576 return realloc(ptr, size);
3581 free( (
char *) ptr );
3586#define YYTABLES_NAME "yytables"
3591#line 826 "d2_lexer.ll"
3597D2ParserContext::scanStringBegin(
const std::string& str,
ParserType parser_type)
3599 start_token_flag =
true;
3600 start_token_value = parser_type;
3607 buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3609 fatal(
"cannot scan string");
3616 const std::string& filename,
3619 start_token_flag =
true;
3620 start_token_value = parser_type;
3629 buffer = d2_parser__create_buffer(f, 65536 );
3631 fatal(
"cannot scan file " + filename);
3633 d2_parser__switch_to_buffer(buffer);
3641 static_cast<void>(d2_parser_lex_destroy());
3652 d2_parser__delete_buffer(
states_.back());
3660 fatal(
"Too many nested include.");
3663 FILE* f = fopen(filename.c_str(),
"r");
3665 fatal(
"Can't open include file " + filename);
3673 buffer = d2_parser__create_buffer(f, 65536 );
3675 fatal(
"Can't scan include file " + filename);
3677 d2_parser__switch_to_buffer(buffer);
3690 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.