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;
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 )
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 64
695 #define YY_END_OF_BUFFER 65
705 57, 57, 0, 0, 0, 0, 0, 0, 0, 0,
706 65, 63, 10, 11, 63, 1, 57, 54, 57, 57,
707 63, 56, 55, 63, 63, 63, 63, 63, 50, 51,
708 63, 63, 63, 52, 53, 5, 5, 5, 63, 63,
709 63, 10, 11, 0, 0, 46, 0, 0, 0, 0,
710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
711 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
712 57, 57, 0, 56, 57, 3, 2, 6, 0, 57,
713 0, 0, 0, 0, 0, 0, 4, 0, 0, 9,
714 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
716 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
718 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
719 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
720 48, 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, 62, 60, 0, 59, 58,
723 0, 0, 0, 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, 61, 58, 0, 0, 0, 0, 0, 0,
728 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
730 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
731 43, 44, 0, 0, 0, 0, 0, 0, 0, 0,
732 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
733 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
735 0, 0, 39, 0, 0, 36, 0, 0, 32, 0,
736 0, 0, 0, 0, 33, 0, 22, 0, 0, 0,
738 0, 0, 0, 0, 0, 34, 38, 0, 0, 0,
739 0, 0, 0, 0, 0, 12, 0, 0, 0, 0,
740 0, 0, 28, 0, 26, 0, 0, 0, 0, 42,
741 0, 0, 0, 30, 0, 0, 0, 0, 0, 0,
742 0, 0, 0, 0, 29, 0, 0, 0, 41, 0,
743 0, 0, 0, 13, 17, 0, 0, 0, 0, 0,
744 0, 31, 0, 27, 0, 0, 0, 0, 0, 0,
745 25, 0, 23, 16, 0, 24, 21, 45, 0, 0,
746 0, 35, 0, 0, 0, 15, 0
749 static const YY_CHAR yy_ec[256] =
751 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
752 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
754 1, 4, 5, 6, 7, 5, 5, 5, 5, 5,
755 5, 8, 9, 10, 11, 12, 13, 14, 14, 14,
756 14, 15, 14, 16, 14, 14, 14, 17, 5, 18,
757 5, 19, 20, 5, 21, 22, 23, 24, 25, 26,
758 5, 5, 5, 27, 5, 28, 5, 29, 30, 31,
759 5, 32, 33, 34, 35, 5, 5, 5, 5, 5,
760 36, 37, 38, 5, 39, 5, 40, 41, 42, 43,
762 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
763 54, 55, 5, 56, 57, 58, 59, 60, 61, 62,
764 63, 64, 65, 5, 66, 5, 5, 5, 5, 5,
765 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
766 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
767 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
768 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
769 5, 5, 5, 5, 5, 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,
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,
781 static const YY_CHAR yy_meta[67] =
783 1, 1, 2, 3, 3, 4, 3, 3, 3, 3,
784 3, 3, 3, 5, 5, 5, 3, 3, 3, 3,
785 5, 5, 5, 5, 5, 5, 3, 3, 3, 3,
786 3, 3, 3, 3, 3, 3, 3, 3, 3, 5,
787 5, 5, 5, 5, 5, 3, 3, 3, 3, 3,
788 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
794 0, 0, 65, 68, 71, 0, 69, 73, 54, 70,
795 706, 707, 89, 702, 137, 0, 192, 707, 197, 200,
796 86, 212, 707, 684, 97, 74, 63, 69, 707, 707,
797 83, 68, 78, 707, 707, 707, 124, 690, 649, 0,
798 682, 128, 697, 212, 234, 707, 645, 651, 172, 643,
799 196, 196, 257, 645, 641, 187, 191, 640, 638, 648,
800 637, 650, 91, 630, 634, 643, 642, 209, 210, 0,
801 281, 289, 308, 314, 293, 707, 0, 707, 232, 257,
802 182, 224, 219, 283, 284, 285, 707, 643, 678, 707,
803 294, 707, 330, 630, 640, 291, 635, 296, 301, 674,
805 0, 376, 633, 626, 624, 635, 629, 617, 614, 616,
806 614, 659, 606, 622, 605, 614, 609, 606, 607, 602,
807 299, 613, 616, 0, 305, 312, 255, 309, 318, 324,
808 608, 707, 0, 600, 602, 319, 610, 649, 648, 647,
809 707, 408, 598, 599, 593, 590, 604, 636, 589, 584,
810 586, 603, 631, 595, 290, 596, 628, 583, 579, 592,
811 579, 590, 587, 576, 329, 707, 707, 330, 707, 707,
812 572, 0, 574, 337, 623, 580, 707, 707, 440, 571,
813 582, 614, 578, 566, 565, 574, 580, 566, 575, 564,
814 572, 567, 570, 607, 205, 553, 605, 554, 565, 552,
816 596, 595, 707, 707, 562, 0, 550, 597, 596, 558,
817 707, 547, 472, 551, 545, 554, 545, 537, 550, 587,
818 536, 551, 547, 549, 532, 523, 530, 707, 531, 528,
819 525, 707, 525, 523, 532, 529, 536, 533, 0, 525,
820 707, 707, 522, 528, 515, 514, 517, 526, 558, 512,
821 707, 524, 514, 509, 512, 506, 518, 555, 504, 505,
822 354, 514, 551, 498, 511, 500, 707, 542, 495, 545,
823 497, 525, 477, 464, 470, 450, 498, 464, 463, 462,
824 499, 498, 707, 451, 444, 707, 447, 489, 707, 436,
825 429, 438, 450, 483, 707, 427, 707, 438, 433, 428,
827 431, 431, 467, 415, 465, 707, 707, 430, 415, 413,
828 424, 454, 402, 400, 411, 707, 441, 398, 394, 386,
829 387, 399, 707, 384, 707, 382, 397, 380, 394, 707,
830 430, 391, 384, 707, 374, 420, 368, 346, 362, 408,
831 407, 358, 363, 357, 707, 347, 355, 350, 707, 400,
832 347, 398, 339, 707, 707, 344, 340, 330, 327, 326,
833 376, 707, 333, 707, 374, 373, 325, 371, 370, 364,
834 707, 313, 707, 707, 307, 707, 707, 707, 221, 258,
835 205, 707, 196, 185, 217, 707, 707, 517, 522, 527,
836 532, 537, 542, 545, 216, 130, 115, 87
842 387, 1, 388, 388, 1, 5, 5, 5, 5, 5,
843 387, 387, 387, 387, 387, 389, 387, 387, 387, 387,
844 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
845 387, 387, 387, 387, 387, 387, 387, 387, 387, 390,
846 387, 387, 387, 391, 15, 387, 45, 45, 45, 45,
847 45, 45, 392, 45, 45, 45, 45, 45, 45, 45,
848 45, 45, 45, 45, 45, 45, 45, 45, 45, 389,
849 387, 387, 387, 387, 387, 387, 393, 387, 387, 387,
850 387, 387, 387, 387, 387, 387, 387, 387, 390, 387,
851 391, 387, 387, 45, 45, 45, 45, 45, 45, 394,
853 45, 392, 45, 45, 45, 45, 45, 45, 45, 45,
854 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
855 45, 45, 45, 393, 387, 387, 387, 387, 387, 387,
856 387, 387, 395, 45, 45, 45, 45, 45, 45, 394,
857 387, 392, 45, 45, 45, 45, 45, 45, 45, 45,
858 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
859 45, 45, 45, 45, 387, 387, 387, 387, 387, 387,
860 387, 396, 45, 45, 45, 45, 387, 387, 392, 45,
861 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
862 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
864 45, 45, 387, 387, 387, 397, 45, 45, 45, 45,
865 387, 45, 392, 45, 45, 45, 45, 45, 45, 45,
866 45, 45, 45, 45, 45, 45, 45, 387, 45, 45,
867 45, 387, 45, 45, 45, 45, 45, 387, 398, 45,
868 387, 387, 45, 45, 45, 45, 45, 45, 45, 45,
869 387, 45, 45, 45, 45, 45, 45, 45, 45, 45,
870 45, 45, 45, 45, 45, 45, 387, 45, 45, 45,
871 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
872 45, 45, 387, 45, 45, 387, 45, 45, 387, 45,
873 45, 45, 45, 45, 387, 45, 387, 45, 45, 45,
875 45, 45, 45, 45, 45, 387, 387, 45, 45, 45,
876 45, 45, 45, 45, 45, 387, 45, 45, 45, 45,
877 45, 45, 387, 45, 387, 45, 45, 45, 45, 387,
878 45, 45, 45, 387, 45, 45, 45, 45, 45, 45,
879 45, 45, 45, 45, 387, 45, 45, 45, 387, 45,
880 45, 45, 45, 387, 387, 45, 45, 45, 45, 45,
881 45, 387, 45, 387, 45, 45, 45, 45, 45, 45,
882 387, 45, 387, 387, 45, 387, 387, 387, 45, 45,
883 45, 387, 45, 45, 45, 387, 0, 387, 387, 387,
884 387, 387, 387, 387, 387, 387, 387, 387
890 12, 13, 14, 13, 12, 15, 16, 12, 17, 18,
891 19, 20, 21, 22, 22, 22, 23, 24, 12, 12,
892 12, 12, 12, 12, 25, 26, 12, 12, 27, 12,
893 12, 12, 12, 28, 12, 29, 12, 30, 12, 12,
894 12, 12, 12, 25, 31, 12, 12, 12, 12, 12,
895 12, 12, 32, 12, 12, 12, 12, 33, 12, 12,
896 12, 12, 12, 12, 34, 35, 37, 14, 37, 37,
897 14, 37, 38, 41, 40, 38, 12, 12, 40, 12,
898 12, 12, 12, 12, 12, 12, 12, 12, 12, 41,
899 42, 91, 42, 76, 81, 12, 12, 82, 77, 12,
901 83, 12, 82, 81, 12, 79, 12, 79, 12, 83,
902 80, 80, 80, 81, 12, 12, 12, 12, 39, 239,
903 12, 82, 84, 12, 83, 42, 85, 42, 12, 42,
904 116, 42, 117, 86, 206, 12, 12, 44, 44, 44,
905 45, 45, 46, 45, 45, 45, 45, 45, 45, 45,
906 45, 45, 45, 45, 45, 45, 45, 45, 45, 47,
907 48, 45, 45, 49, 50, 45, 45, 45, 45, 45,
908 51, 52, 45, 53, 45, 45, 54, 45, 55, 56,
909 45, 57, 45, 58, 59, 49, 60, 61, 62, 63,
910 64, 65, 66, 67, 68, 69, 45, 45, 45, 45,
912 45, 45, 45, 71, 96, 72, 72, 72, 71, 125,
913 74, 74, 74, 75, 75, 75, 73, 92, 98, 99,
914 172, 73, 386, 71, 73, 74, 74, 74, 96, 105,
915 106, 98, 125, 99, 107, 73, 73, 98, 99, 108,
916 73, 109, 385, 73, 110, 80, 80, 80, 93, 229,
917 98, 126, 99, 127, 384, 73, 45, 45, 383, 230,
918 45, 45, 101, 382, 381, 122, 123, 45, 45, 45,
919 80, 80, 80, 45, 126, 45, 45, 127, 45, 167,
920 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
921 45, 45, 45, 45, 75, 75, 75, 45, 167, 92,
923 71, 45, 72, 72, 72, 73, 75, 75, 75, 45,
924 125, 126, 45, 73, 45, 102, 79, 73, 79, 127,
925 136, 80, 80, 80, 73, 71, 138, 74, 74, 74,
926 93, 139, 73, 128, 129, 91, 73, 165, 73, 166,
927 161, 165, 91, 130, 136, 166, 192, 175, 167, 193,
928 138, 208, 209, 203, 203, 139, 351, 73, 162, 286,
929 210, 165, 166, 380, 379, 168, 91, 170, 169, 378,
930 91, 175, 203, 204, 91, 377, 376, 375, 374, 373,
931 372, 371, 91, 370, 369, 91, 368, 91, 133, 142,
932 142, 142, 287, 367, 366, 365, 142, 142, 142, 142,
934 142, 142, 352, 364, 363, 362, 361, 360, 359, 358,
935 357, 356, 355, 354, 353, 142, 142, 142, 142, 142,
936 142, 179, 179, 179, 350, 349, 348, 347, 179, 179,
937 179, 179, 179, 179, 346, 345, 344, 343, 342, 341,
938 340, 339, 338, 337, 336, 335, 334, 179, 179, 179,
939 179, 179, 179, 213, 213, 213, 333, 332, 331, 330,
940 213, 213, 213, 213, 213, 213, 329, 328, 327, 326,
941 325, 324, 323, 322, 321, 320, 319, 318, 317, 213,
942 213, 213, 213, 213, 213, 45, 45, 45, 316, 315,
943 314, 313, 45, 45, 45, 45, 45, 45, 312, 311,
945 310, 309, 308, 307, 306, 305, 304, 303, 302, 301,
946 300, 45, 45, 45, 45, 45, 45, 36, 36, 36,
947 36, 36, 70, 299, 70, 70, 70, 89, 298, 89,
948 297, 89, 91, 91, 91, 91, 91, 100, 100, 100,
949 100, 100, 124, 296, 124, 124, 124, 140, 140, 140,
950 295, 294, 293, 292, 291, 290, 289, 288, 285, 284,
951 283, 282, 281, 280, 279, 278, 277, 276, 275, 274,
952 273, 272, 271, 270, 269, 268, 267, 266, 265, 264,
953 263, 262, 261, 260, 259, 258, 257, 256, 255, 254,
954 253, 252, 251, 250, 249, 248, 247, 246, 245, 244,
956 243, 242, 241, 240, 238, 237, 236, 235, 234, 233,
957 232, 231, 228, 227, 226, 225, 224, 223, 222, 221,
958 220, 219, 218, 217, 216, 215, 214, 212, 211, 207,
959 205, 202, 201, 200, 199, 198, 197, 196, 195, 194,
960 191, 190, 189, 188, 187, 186, 185, 184, 183, 182,
961 181, 180, 141, 178, 177, 176, 174, 173, 171, 164,
962 163, 160, 159, 158, 157, 156, 155, 154, 153, 152,
963 151, 150, 149, 148, 147, 146, 145, 144, 143, 141,
964 137, 135, 134, 132, 131, 121, 120, 119, 118, 115,
965 114, 113, 112, 111, 104, 103, 97, 95, 94, 43,
967 90, 88, 87, 78, 43, 387, 11, 387, 387, 387,
968 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
969 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
970 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
971 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
972 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
973 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
979 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
980 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
981 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
982 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
983 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
984 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
985 1, 1, 1, 1, 1, 1, 3, 3, 3, 4,
986 4, 4, 3, 9, 7, 4, 5, 5, 8, 5,
987 5, 5, 5, 5, 5, 5, 5, 5, 5, 10,
988 13, 398, 13, 21, 26, 5, 5, 27, 21, 5,
990 28, 9, 32, 31, 5, 25, 5, 25, 5, 33,
991 25, 25, 25, 26, 5, 5, 7, 10, 5, 397,
992 8, 27, 31, 5, 28, 37, 32, 37, 5, 42,
993 63, 42, 63, 33, 396, 5, 5, 15, 15, 15,
994 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
995 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
996 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
997 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
998 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
999 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1001 15, 15, 15, 17, 49, 17, 17, 17, 19, 81,
1002 19, 19, 19, 20, 20, 20, 17, 44, 51, 52,
1003 395, 19, 385, 22, 20, 22, 22, 22, 49, 56,
1004 56, 68, 81, 69, 56, 17, 22, 51, 52, 56,
1005 19, 57, 384, 20, 57, 79, 79, 79, 44, 195,
1006 68, 82, 69, 83, 383, 22, 45, 45, 381, 195,
1007 45, 45, 53, 380, 379, 68, 69, 45, 45, 53,
1008 80, 80, 80, 45, 82, 45, 45, 83, 45, 127,
1009 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1010 45, 45, 45, 53, 71, 71, 71, 53, 127, 91,
1012 72, 53, 72, 72, 72, 71, 75, 75, 75, 53,
1013 84, 85, 53, 72, 53, 53, 73, 75, 73, 86,
1014 96, 73, 73, 73, 71, 74, 98, 74, 74, 74,
1015 91, 99, 72, 84, 85, 93, 75, 125, 74, 126,
1016 121, 128, 93, 86, 96, 129, 155, 136, 130, 155,
1017 98, 174, 174, 165, 168, 99, 338, 74, 121, 261,
1018 174, 125, 126, 375, 372, 128, 93, 130, 129, 370,
1019 93, 136, 165, 168, 93, 369, 368, 367, 366, 365,
1020 363, 361, 93, 360, 359, 93, 358, 93, 93, 102,
1021 102, 102, 261, 357, 356, 353, 102, 102, 102, 102,
1023 102, 102, 338, 352, 351, 350, 348, 347, 346, 344,
1024 343, 342, 341, 340, 339, 102, 102, 102, 102, 102,
1025 102, 142, 142, 142, 337, 336, 335, 333, 142, 142,
1026 142, 142, 142, 142, 332, 331, 329, 328, 327, 326,
1027 324, 322, 321, 320, 319, 318, 317, 142, 142, 142,
1028 142, 142, 142, 179, 179, 179, 315, 314, 313, 312,
1029 179, 179, 179, 179, 179, 179, 311, 310, 309, 308,
1030 305, 304, 303, 302, 301, 300, 299, 298, 296, 179,
1031 179, 179, 179, 179, 179, 213, 213, 213, 294, 293,
1032 292, 291, 213, 213, 213, 213, 213, 213, 290, 288,
1034 287, 285, 284, 282, 281, 280, 279, 278, 277, 276,
1035 275, 213, 213, 213, 213, 213, 213, 388, 388, 388,
1036 388, 388, 389, 274, 389, 389, 389, 390, 273, 390,
1037 272, 390, 391, 391, 391, 391, 391, 392, 392, 392,
1038 392, 392, 393, 271, 393, 393, 393, 394, 394, 394,
1039 270, 269, 268, 266, 265, 264, 263, 262, 260, 259,
1040 258, 257, 256, 255, 254, 253, 252, 250, 249, 248,
1041 247, 246, 245, 244, 243, 240, 238, 237, 236, 235,
1042 234, 233, 231, 230, 229, 227, 226, 225, 224, 223,
1043 222, 221, 220, 219, 218, 217, 216, 215, 214, 212,
1045 210, 209, 208, 207, 205, 202, 201, 200, 199, 198,
1046 197, 196, 194, 193, 192, 191, 190, 189, 188, 187,
1047 186, 185, 184, 183, 182, 181, 180, 176, 175, 173,
1048 171, 164, 163, 162, 161, 160, 159, 158, 157, 156,
1049 154, 153, 152, 151, 150, 149, 148, 147, 146, 145,
1050 144, 143, 140, 139, 138, 137, 135, 134, 131, 123,
1051 122, 120, 119, 118, 117, 116, 115, 114, 113, 112,
1052 111, 110, 109, 108, 107, 106, 105, 104, 103, 100,
1053 97, 95, 94, 89, 88, 67, 66, 65, 64, 62,
1054 61, 60, 59, 58, 55, 54, 50, 48, 47, 43,
1056 41, 39, 38, 24, 14, 11, 387, 387, 387, 387,
1057 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1058 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1059 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1060 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1061 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1062 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
1067 static char *yy_last_accepting_cpos;
1074 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
1075 170, 176, 185, 196, 207, 216, 225, 234, 244, 254,
1076 264, 280, 296, 305, 314, 324, 334, 344, 355, 364,
1077 374, 384, 395, 404, 413, 422, 431, 440, 449, 458,
1078 471, 480, 489, 498, 507, 517, 616, 621, 626, 631,
1079 632, 633, 634, 635, 636, 638, 656, 669, 674, 678,
1086 #define REJECT reject_used_but_not_detected
1087 #define yymore() yymore_used_but_not_detected
1088 #define YY_MORE_ADJ 0
1089 #define YY_RESTORE_YY_MORE_OFFSET
1091 #line 1 "d2_lexer.ll"
1097 #line 8 "d2_lexer.ll"
1100 #ifndef __clang_analyzer__
1108 #include <boost/lexical_cast.hpp>
1122 bool start_token_flag =
false;
1125 unsigned int comment_start_line = 0;
1130 #define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
1131 #line 1131 "d2_lexer.cc"
1146 #define YY_NO_INPUT 1
1152 #line 92 "d2_lexer.ll"
1156 #define YY_USER_ACTION driver.loc_.columns(yyleng);
1157 #line 1157 "d2_lexer.cc"
1158 #line 1158 "d2_lexer.cc"
1163 #define DIR_INCLUDE 3
1166 #ifndef YY_NO_UNISTD_H
1178 #ifndef YY_EXTRA_TYPE
1179 #define YY_EXTRA_TYPE void *
1186 static int yy_init_globals (
void );
1229 #ifndef YY_SKIP_YYWRAP
1231 extern "C" int yywrap (
void );
1233 extern int yywrap (
void );
1246 static void yy_flex_strncpy (
char *,
const char *,
int );
1249 #ifdef YY_NEED_STRLEN
1250 static int yy_flex_strlen (
const char * );
1257 static int yyinput (
void );
1259 static int input (
void );
1271 #ifndef YY_READ_BUF_SIZE
1274 #define YY_READ_BUF_SIZE 16384
1276 #define YY_READ_BUF_SIZE 8192
1286 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1296 #define YY_INPUT(buf,result,max_size) \
1298 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1302 for ( n = 0; n < max_size && \
1303 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1304 buf[n] = (char) c; \
1306 buf[n++] = (char) c; \
1307 if ( c == EOF && ferror( yyin ) ) \
1308 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1314 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1316 if( errno != EINTR) \
1318 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1336 #define yyterminate() return YY_NULL
1340 #ifndef YY_START_STACK_INCR
1341 #define YY_START_STACK_INCR 25
1345 #ifndef YY_FATAL_ERROR
1347 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1368 #define YY_DECL_IS_OURS 1
1371 extern int yylex (
void);
1373 #define YY_DECL int yylex (void)
1382 #ifndef YY_USER_ACTION
1383 #define YY_USER_ACTION
1388 #define YY_BREAK break;
1392 #define YY_RULE_SETUP \
1440 #line 98 "d2_lexer.ll"
1444 #line 102 "d2_lexer.ll"
1452 if (start_token_flag) {
1453 start_token_flag =
false;
1454 switch (start_token_value) {
1455 case D2ParserContext::PARSER_JSON:
1458 case D2ParserContext::PARSER_DHCPDDNS:
1460 case D2ParserContext::PARSER_SUB_DHCPDDNS:
1462 case D2ParserContext::PARSER_TSIG_KEY:
1464 case D2ParserContext::PARSER_TSIG_KEYS:
1466 case D2ParserContext::PARSER_DDNS_DOMAIN:
1468 case D2ParserContext::PARSER_DDNS_DOMAINS:
1470 case D2ParserContext::PARSER_DNS_SERVER:
1476 #line 1476 "d2_lexer.cc"
1481 yy_cp = (yy_c_buf_p);
1484 *
yy_cp = (yy_hold_char);
1492 yy_current_state = (yy_start);
1497 if ( yy_accept[yy_current_state] )
1499 (yy_last_accepting_state) = yy_current_state;
1500 (yy_last_accepting_cpos) =
yy_cp;
1502 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1504 yy_current_state = (int) yy_def[yy_current_state];
1505 if ( yy_current_state >= 388 )
1506 yy_c = yy_meta[yy_c];
1508 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1511 while ( yy_current_state != 387 );
1512 yy_cp = (yy_last_accepting_cpos);
1513 yy_current_state = (yy_last_accepting_state);
1517 yy_act = yy_accept[yy_current_state];
1529 fprintf( stderr,
"--scanner backing up\n" );
1531 fprintf( stderr,
"--accepting rule at line %ld (\"%s\")\n",
1534 fprintf( stderr,
"--accepting default rule (\"%s\")\n",
1537 fprintf( stderr,
"--(end of buffer or a NUL)\n" );
1539 fprintf( stderr,
"--EOF (start condition %d)\n",
YY_START );
1547 *
yy_cp = (yy_hold_char);
1548 yy_cp = (yy_last_accepting_cpos);
1549 yy_current_state = (yy_last_accepting_state);
1550 goto yy_find_action;
1554 #line 133 "d2_lexer.ll"
1559 #line 135 "d2_lexer.ll"
1564 #line 137 "d2_lexer.ll"
1567 comment_start_line = driver.loc_.end.line;;
1572 #line 142 "d2_lexer.ll"
1577 #line 143 "d2_lexer.ll"
1581 #line 144 "d2_lexer.ll"
1588 #line 148 "d2_lexer.ll"
1593 #line 149 "d2_lexer.ll"
1598 #line 150 "d2_lexer.ll"
1603 std::string tmp(
yytext+1);
1604 tmp.resize(tmp.size() - 1);
1606 driver.includeFile(tmp);
1612 #line 159 "d2_lexer.ll"
1619 #line 162 "d2_lexer.ll"
1624 #line 165 "d2_lexer.ll"
1633 #line 170 "d2_lexer.ll"
1636 driver.loc_.lines(
yyleng);
1642 #line 176 "d2_lexer.ll"
1644 switch(driver.ctx_) {
1654 #line 185 "d2_lexer.ll"
1656 switch(driver.ctx_) {
1668 #line 196 "d2_lexer.ll"
1670 switch(driver.ctx_) {
1682 #line 207 "d2_lexer.ll"
1684 switch(driver.ctx_) {
1694 #line 216 "d2_lexer.ll"
1696 switch(driver.ctx_) {
1706 #line 225 "d2_lexer.ll"
1708 switch(driver.ctx_) {
1718 #line 234 "d2_lexer.ll"
1724 std::string tmp(
yytext+1);
1725 tmp.resize(tmp.size() - 1);
1731 #line 244 "d2_lexer.ll"
1737 std::string tmp(
yytext+1);
1738 tmp.resize(tmp.size() - 1);
1744 #line 254 "d2_lexer.ll"
1750 std::string tmp(
yytext+1);
1751 tmp.resize(tmp.size() - 1);
1757 #line 264 "d2_lexer.ll"
1759 switch(driver.ctx_) {
1776 #line 280 "d2_lexer.ll"
1778 switch(driver.ctx_) {
1795 #line 296 "d2_lexer.ll"
1797 switch(driver.ctx_) {
1807 #line 305 "d2_lexer.ll"
1809 switch(driver.ctx_) {
1819 #line 314 "d2_lexer.ll"
1821 switch(driver.ctx_) {
1832 #line 324 "d2_lexer.ll"
1834 switch(driver.ctx_) {
1845 #line 334 "d2_lexer.ll"
1847 switch(driver.ctx_) {
1858 #line 344 "d2_lexer.ll"
1860 switch(driver.ctx_) {
1871 #line 355 "d2_lexer.ll"
1873 switch(driver.ctx_) {
1883 #line 364 "d2_lexer.ll"
1885 switch(driver.ctx_) {
1896 #line 374 "d2_lexer.ll"
1898 switch(driver.ctx_) {
1909 #line 384 "d2_lexer.ll"
1911 switch(driver.ctx_) {
1922 #line 395 "d2_lexer.ll"
1924 switch(driver.ctx_) {
1934 #line 404 "d2_lexer.ll"
1936 switch(driver.ctx_) {
1946 #line 413 "d2_lexer.ll"
1948 switch(driver.ctx_) {
1958 #line 422 "d2_lexer.ll"
1960 switch(driver.ctx_) {
1970 #line 431 "d2_lexer.ll"
1972 switch(driver.ctx_) {
1982 #line 440 "d2_lexer.ll"
1984 switch(driver.ctx_) {
1994 #line 449 "d2_lexer.ll"
1996 switch(driver.ctx_) {
2006 #line 458 "d2_lexer.ll"
2008 switch(driver.ctx_) {
2022 #line 471 "d2_lexer.ll"
2024 switch(driver.ctx_) {
2034 #line 480 "d2_lexer.ll"
2036 switch(driver.ctx_) {
2046 #line 489 "d2_lexer.ll"
2048 switch(driver.ctx_) {
2058 #line 498 "d2_lexer.ll"
2060 switch(driver.ctx_) {
2070 #line 507 "d2_lexer.ll"
2072 switch(driver.ctx_) {
2082 #line 517 "d2_lexer.ll"
2087 std::string raw(
yytext+1);
2088 size_t len = raw.size() - 1;
2090 std::string decoded;
2091 decoded.reserve(len);
2092 for (
size_t pos = 0; pos < len; ++pos) {
2098 driver.error(driver.loc_,
"Bad quote in \"" + raw +
"\"");
2104 driver.error(driver.loc_,
"Overflow escape in \"" + raw +
"\"");
2111 decoded.push_back(c);
2114 decoded.push_back(
'\b');
2117 decoded.push_back(
'\f');
2120 decoded.push_back(
'\n');
2123 decoded.push_back(
'\r');
2126 decoded.push_back(
'\t');
2131 if (pos + 4 > len) {
2133 driver.error(driver.loc_,
2134 "Overflow unicode escape in \"" + raw +
"\"");
2136 if ((raw[pos] !=
'0') || (raw[pos + 1] !=
'0')) {
2137 driver.error(driver.loc_,
"Unsupported unicode escape in \"" + raw +
"\"");
2141 if ((c >=
'0') && (c <=
'9')) {
2143 }
else if ((c >=
'A') && (c <=
'F')) {
2144 b = (c -
'A' + 10) << 4;
2145 }
else if ((c >=
'a') && (c <=
'f')) {
2146 b = (c -
'a' + 10) << 4;
2149 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2153 if ((c >=
'0') && (c <=
'9')) {
2155 }
else if ((c >=
'A') && (c <=
'F')) {
2157 }
else if ((c >=
'a') && (c <=
'f')) {
2161 driver.error(driver.loc_,
"Not hexadecimal in unicode escape in \"" + raw +
"\"");
2163 decoded.push_back(
static_cast<char>(b & 0xff));
2167 driver.error(driver.loc_,
"Bad escape in \"" + raw +
"\"");
2171 if ((c >= 0) && (c < 0x20)) {
2173 driver.error(driver.loc_,
"Invalid control in \"" + raw +
"\"");
2175 decoded.push_back(c);
2185 #line 616 "d2_lexer.ll"
2188 driver.error(driver.loc_,
"Invalid control in " + std::string(
yytext));
2194 #line 621 "d2_lexer.ll"
2197 driver.error(driver.loc_,
"Bad escape in " + std::string(
yytext));
2202 #line 626 "d2_lexer.ll"
2205 driver.error(driver.loc_,
"Overflow escape in " + std::string(
yytext));
2210 #line 631 "d2_lexer.ll"
2215 #line 632 "d2_lexer.ll"
2220 #line 633 "d2_lexer.ll"
2225 #line 634 "d2_lexer.ll"
2230 #line 635 "d2_lexer.ll"
2235 #line 636 "d2_lexer.ll"
2240 #line 638 "d2_lexer.ll"
2244 int64_t integer = 0;
2250 integer = boost::lexical_cast<int64_t>(tmp);
2251 }
catch (
const boost::bad_lexical_cast &) {
2252 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to an integer.");
2261 #line 656 "d2_lexer.ll"
2267 fp = boost::lexical_cast<double>(tmp);
2268 }
catch (
const boost::bad_lexical_cast &) {
2269 driver.error(driver.loc_,
"Failed to convert " + tmp +
" to a floating point.");
2277 #line 669 "d2_lexer.ll"
2285 #line 674 "d2_lexer.ll"
2292 #line 678 "d2_lexer.ll"
2293 driver.error (driver.loc_,
"JSON true reserved keyword is lower case only");
2297 #line 680 "d2_lexer.ll"
2298 driver.error (driver.loc_,
"JSON false reserved keyword is lower case only");
2302 #line 682 "d2_lexer.ll"
2303 driver.error (driver.loc_,
"JSON null reserved keyword is lower case only");
2307 #line 684 "d2_lexer.ll"
2308 driver.error (driver.loc_,
"Invalid character: " + std::string(
yytext));
2311 #line 686 "d2_lexer.ll"
2313 if (driver.states_.empty()) {
2316 driver.loc_ = driver.locs_.back();
2317 driver.locs_.pop_back();
2318 driver.file_ = driver.files_.back();
2319 driver.files_.pop_back();
2320 if (driver.sfile_) {
2321 fclose(driver.sfile_);
2324 if (!driver.sfiles_.empty()) {
2325 driver.sfile_ = driver.sfiles_.back();
2326 driver.sfiles_.pop_back();
2329 d2_parser__switch_to_buffer(driver.states_.back());
2330 driver.states_.pop_back();
2337 #line 709 "d2_lexer.ll"
2340 #line 2340 "d2_lexer.cc"
2348 *
yy_cp = (yy_hold_char);
2382 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
2384 yy_current_state = yy_get_previous_state( );
2395 yy_next_state = yy_try_NUL_trans( yy_current_state );
2399 if ( yy_next_state )
2402 yy_cp = ++(yy_c_buf_p);
2403 yy_current_state = yy_next_state;
2410 yy_cp = (yy_last_accepting_cpos);
2411 yy_current_state = (yy_last_accepting_state);
2412 goto yy_find_action;
2416 else switch ( yy_get_next_buffer( ) )
2420 (yy_did_buffer_switch_on_eof) = 0;
2441 if ( ! (yy_did_buffer_switch_on_eof) )
2451 yy_current_state = yy_get_previous_state( );
2453 yy_cp = (yy_c_buf_p);
2461 yy_current_state = yy_get_previous_state( );
2463 yy_cp = (yy_c_buf_p);
2465 goto yy_find_action;
2472 "fatal flex scanner internal error--no action found" );
2493 static int yy_get_next_buffer (
void)
2500 int number_to_move, i;
2505 "fatal flex scanner internal error--end of buffer missed" );
2529 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr) - 1);
2531 for ( i = 0; i < number_to_move; ++i )
2532 *(dest++) = *(source++);
2545 while ( num_to_read <= 0 )
2551 int yy_c_buf_p_offset =
2558 if ( new_size <= 0 )
2574 "fatal error - scanner input buffer overflow" );
2576 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
2588 (yy_n_chars), num_to_read );
2593 if ( (yy_n_chars) == 0 )
2614 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2618 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
2623 (yy_n_chars) += number_to_move;
2645 yy_current_state = (yy_start);
2651 if ( yy_accept[yy_current_state] )
2653 (yy_last_accepting_state) = yy_current_state;
2654 (yy_last_accepting_cpos) =
yy_cp;
2656 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2658 yy_current_state = (int) yy_def[yy_current_state];
2659 if ( yy_current_state >= 388 )
2660 yy_c = yy_meta[yy_c];
2662 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2665 return yy_current_state;
2681 char *
yy_cp = (yy_c_buf_p);
2684 if ( yy_accept[yy_current_state] )
2686 (yy_last_accepting_state) = yy_current_state;
2687 (yy_last_accepting_cpos) =
yy_cp;
2689 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2691 yy_current_state = (int) yy_def[yy_current_state];
2692 if ( yy_current_state >= 388 )
2693 yy_c = yy_meta[yy_c];
2695 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2696 yy_is_jam = (yy_current_state == 387);
2698 return yy_is_jam ? 0 : yy_current_state;
2710 static int yyinput (
void)
2712 static int input (
void)
2721 *(yy_c_buf_p) = (yy_hold_char);
2731 *(yy_c_buf_p) =
'\0';
2735 int offset = (int) ((yy_c_buf_p) - (
yytext_ptr));
2738 switch ( yy_get_next_buffer( ) )
2761 if ( ! (yy_did_buffer_switch_on_eof) )
2777 c = *(
unsigned char *) (yy_c_buf_p);
2778 *(yy_c_buf_p) =
'\0';
2779 (yy_hold_char) = *++(yy_c_buf_p);
2837 *(yy_c_buf_p) = (yy_hold_char);
2850 (yy_did_buffer_switch_on_eof) = 1;
2866 (yy_hold_char) = *(yy_c_buf_p);
3014 if (new_buffer == NULL)
3023 *(yy_c_buf_p) = (yy_hold_char);
3030 (yy_buffer_stack_top)++;
3035 (yy_did_buffer_switch_on_eof) = 1;
3055 if ((yy_buffer_stack_top) > 0)
3056 --(yy_buffer_stack_top);
3060 (yy_did_buffer_switch_on_eof) = 1;
3077 if (!(yy_buffer_stack)) {
3087 if ( ! (yy_buffer_stack) )
3088 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3090 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
3092 (yy_buffer_stack_max) = num_to_alloc;
3093 (yy_buffer_stack_top) = 0;
3097 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3102 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3107 if ( ! (yy_buffer_stack) )
3108 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
3111 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
3112 (yy_buffer_stack_max) = num_to_alloc;
3191 for ( i = 0; i < _yybytes_len; ++i )
3192 buf[i] = yybytes[i];
3209 #ifndef YY_EXIT_FAILURE
3210 #define YY_EXIT_FAILURE 2
3214 static void yynoreturn yy_fatal_error (
const char* msg )
3216 fprintf( stderr,
"%s\n", msg );
3230 int yyless_macro_arg = (n); \
3231 YY_LESS_LINENO(yyless_macro_arg);\
3232 yytext[yyleng] = (yy_hold_char); \
3233 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3234 (yy_hold_char) = *(yy_c_buf_p); \
3235 *(yy_c_buf_p) = '\0'; \
3236 yyleng = yyless_macro_arg; \
3335 static int yy_init_globals (
void)
3341 (yy_buffer_stack) = NULL;
3342 (yy_buffer_stack_top) = 0;
3343 (yy_buffer_stack_max) = 0;
3344 (yy_c_buf_p) = NULL;
3377 yyfree((yy_buffer_stack) );
3378 (yy_buffer_stack) = NULL;
3395 static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
3399 for ( i = 0; i < n; ++i )
3404 #ifdef YY_NEED_STRLEN
3405 static int yy_flex_strlen (
const char * s )
3408 for ( n = 0; s[n]; ++n )
3417 return malloc(size);
3430 return realloc(ptr, size);
3435 free( (
char *) ptr );
3440 #define YYTABLES_NAME "yytables"
3445 #line 709 "d2_lexer.ll"
3451 D2ParserContext::scanStringBegin(
const std::string& str,
ParserType parser_type)
3453 start_token_flag =
true;
3454 start_token_value = parser_type;
3458 loc_.initialize(&file_);
3461 buffer = d2_parser__scan_bytes(str.c_str(), str.size());
3463 fatal(
"cannot scan string");
3469 D2ParserContext::scanFileBegin(FILE * f,
3470 const std::string& filename,
3473 start_token_flag =
true;
3474 start_token_value = parser_type;
3478 loc_.initialize(&file_);
3483 buffer = d2_parser__create_buffer(f, 65536 );
3485 fatal(
"cannot scan file " + filename);
3487 d2_parser__switch_to_buffer(buffer);
3491 D2ParserContext::scanEnd() {
3495 static_cast<void>(d2_parser_lex_destroy());
3497 while (!sfiles_.empty()) {
3498 FILE* f = sfiles_.back();
3505 while (!states_.empty()) {
3506 d2_parser__delete_buffer(states_.back());
3512 D2ParserContext::includeFile(
const std::string& filename) {
3513 if (states_.size() > 10) {
3514 fatal(
"Too many nested include.");
3517 FILE* f = fopen(filename.c_str(),
"r");
3519 fatal(
"Can't open include file " + filename);
3522 sfiles_.push_back(sfile_);
3527 buffer = d2_parser__create_buffer(f, 65536 );
3529 fatal(
"Can't scan include file " + filename);
3531 d2_parser__switch_to_buffer(buffer);
3532 files_.push_back(file_);
3534 locs_.push_back(loc_);
3535 loc_.initialize(&file_);
3544 void dummy() { yy_fatal_error(
"Fix me: how to disable its definition?"); }