Kea 3.3.4
d2_lexer.cc
Go to the documentation of this file.
1#line 1 "d2_lexer.cc"
2/* Pre-emptively include the headers needed by flex */
3#include <cstdint>
4#include <climits>
5
6#line 6 "d2_lexer.cc"
7
8#define YY_INT_ALIGNED short int
9
10/* A lexical scanner generated by flex */
11
12/* %not-for-header */
13/* %if-c-only */
14/* %if-not-reentrant */
15#define yy_create_buffer d2_parser__create_buffer
16#define yy_delete_buffer d2_parser__delete_buffer
17#define yy_scan_buffer d2_parser__scan_buffer
18#define yy_scan_string d2_parser__scan_string
19#define yy_scan_bytes d2_parser__scan_bytes
20#define yy_init_buffer d2_parser__init_buffer
21#define yy_flush_buffer d2_parser__flush_buffer
22#define yy_load_buffer_state d2_parser__load_buffer_state
23#define yy_switch_to_buffer d2_parser__switch_to_buffer
24#define yypush_buffer_state d2_parser_push_buffer_state
25#define yypop_buffer_state d2_parser_pop_buffer_state
26#define yyensure_buffer_stack d2_parser_ensure_buffer_stack
27#define yy_flex_debug d2_parser__flex_debug
28#define yyin d2_parser_in
29#define yyleng d2_parser_leng
30#define yylex d2_parser_lex
31#define yylineno d2_parser_lineno
32#define yyout d2_parser_out
33#define yyrestart d2_parser_restart
34#define yytext d2_parser_text
35#define yywrap d2_parser_wrap
36#define yyalloc d2_parser_alloc
37#define yyrealloc d2_parser_realloc
38#define yyfree d2_parser_free
39
40/* %endif */
41/* %endif */
42/* %ok-for-header */
43
44#define FLEX_SCANNER
45#define YY_FLEX_MAJOR_VERSION 2
46#define YY_FLEX_MINOR_VERSION 6
47#define YY_FLEX_SUBMINOR_VERSION 4
48#if YY_FLEX_SUBMINOR_VERSION > 0
49#define FLEX_BETA
50#endif
51
52/* %if-c++-only */
53/* %endif */
54
55/* %if-c-only */
56#ifdef yy_create_buffer
57#define d2_parser__create_buffer_ALREADY_DEFINED
58#else
59#define yy_create_buffer d2_parser__create_buffer
60#endif
61
62#ifdef yy_delete_buffer
63#define d2_parser__delete_buffer_ALREADY_DEFINED
64#else
65#define yy_delete_buffer d2_parser__delete_buffer
66#endif
67
68#ifdef yy_scan_buffer
69#define d2_parser__scan_buffer_ALREADY_DEFINED
70#else
71#define yy_scan_buffer d2_parser__scan_buffer
72#endif
73
74#ifdef yy_scan_string
75#define d2_parser__scan_string_ALREADY_DEFINED
76#else
77#define yy_scan_string d2_parser__scan_string
78#endif
79
80#ifdef yy_scan_bytes
81#define d2_parser__scan_bytes_ALREADY_DEFINED
82#else
83#define yy_scan_bytes d2_parser__scan_bytes
84#endif
85
86#ifdef yy_init_buffer
87#define d2_parser__init_buffer_ALREADY_DEFINED
88#else
89#define yy_init_buffer d2_parser__init_buffer
90#endif
91
92#ifdef yy_flush_buffer
93#define d2_parser__flush_buffer_ALREADY_DEFINED
94#else
95#define yy_flush_buffer d2_parser__flush_buffer
96#endif
97
98#ifdef yy_load_buffer_state
99#define d2_parser__load_buffer_state_ALREADY_DEFINED
100#else
101#define yy_load_buffer_state d2_parser__load_buffer_state
102#endif
103
104#ifdef yy_switch_to_buffer
105#define d2_parser__switch_to_buffer_ALREADY_DEFINED
106#else
107#define yy_switch_to_buffer d2_parser__switch_to_buffer
108#endif
109
110#ifdef yypush_buffer_state
111#define d2_parser_push_buffer_state_ALREADY_DEFINED
112#else
113#define yypush_buffer_state d2_parser_push_buffer_state
114#endif
115
116#ifdef yypop_buffer_state
117#define d2_parser_pop_buffer_state_ALREADY_DEFINED
118#else
119#define yypop_buffer_state d2_parser_pop_buffer_state
120#endif
121
122#ifdef yyensure_buffer_stack
123#define d2_parser_ensure_buffer_stack_ALREADY_DEFINED
124#else
125#define yyensure_buffer_stack d2_parser_ensure_buffer_stack
126#endif
127
128#ifdef yylex
129#define d2_parser_lex_ALREADY_DEFINED
130#else
131#define yylex d2_parser_lex
132#endif
133
134#ifdef yyrestart
135#define d2_parser_restart_ALREADY_DEFINED
136#else
137#define yyrestart d2_parser_restart
138#endif
139
140#ifdef yylex_init
141#define d2_parser_lex_init_ALREADY_DEFINED
142#else
143#define yylex_init d2_parser_lex_init
144#endif
145
146#ifdef yylex_init_extra
147#define d2_parser_lex_init_extra_ALREADY_DEFINED
148#else
149#define yylex_init_extra d2_parser_lex_init_extra
150#endif
151
152#ifdef yylex_destroy
153#define d2_parser_lex_destroy_ALREADY_DEFINED
154#else
155#define yylex_destroy d2_parser_lex_destroy
156#endif
157
158#ifdef yyget_debug
159#define d2_parser_get_debug_ALREADY_DEFINED
160#else
161#define yyget_debug d2_parser_get_debug
162#endif
163
164#ifdef yyset_debug
165#define d2_parser_set_debug_ALREADY_DEFINED
166#else
167#define yyset_debug d2_parser_set_debug
168#endif
169
170#ifdef yyget_extra
171#define d2_parser_get_extra_ALREADY_DEFINED
172#else
173#define yyget_extra d2_parser_get_extra
174#endif
175
176#ifdef yyset_extra
177#define d2_parser_set_extra_ALREADY_DEFINED
178#else
179#define yyset_extra d2_parser_set_extra
180#endif
181
182#ifdef yyget_in
183#define d2_parser_get_in_ALREADY_DEFINED
184#else
185#define yyget_in d2_parser_get_in
186#endif
187
188#ifdef yyset_in
189#define d2_parser_set_in_ALREADY_DEFINED
190#else
191#define yyset_in d2_parser_set_in
192#endif
193
194#ifdef yyget_out
195#define d2_parser_get_out_ALREADY_DEFINED
196#else
197#define yyget_out d2_parser_get_out
198#endif
199
200#ifdef yyset_out
201#define d2_parser_set_out_ALREADY_DEFINED
202#else
203#define yyset_out d2_parser_set_out
204#endif
205
206#ifdef yyget_leng
207#define d2_parser_get_leng_ALREADY_DEFINED
208#else
209#define yyget_leng d2_parser_get_leng
210#endif
211
212#ifdef yyget_text
213#define d2_parser_get_text_ALREADY_DEFINED
214#else
215#define yyget_text d2_parser_get_text
216#endif
217
218#ifdef yyget_lineno
219#define d2_parser_get_lineno_ALREADY_DEFINED
220#else
221#define yyget_lineno d2_parser_get_lineno
222#endif
223
224#ifdef yyset_lineno
225#define d2_parser_set_lineno_ALREADY_DEFINED
226#else
227#define yyset_lineno d2_parser_set_lineno
228#endif
229
230#ifdef yywrap
231#define d2_parser_wrap_ALREADY_DEFINED
232#else
233#define yywrap d2_parser_wrap
234#endif
235
236/* %endif */
237
238#ifdef yyalloc
239#define d2_parser_alloc_ALREADY_DEFINED
240#else
241#define yyalloc d2_parser_alloc
242#endif
243
244#ifdef yyrealloc
245#define d2_parser_realloc_ALREADY_DEFINED
246#else
247#define yyrealloc d2_parser_realloc
248#endif
249
250#ifdef yyfree
251#define d2_parser_free_ALREADY_DEFINED
252#else
253#define yyfree d2_parser_free
254#endif
255
256/* %if-c-only */
257
258#ifdef yytext
259#define d2_parser_text_ALREADY_DEFINED
260#else
261#define yytext d2_parser_text
262#endif
263
264#ifdef yyleng
265#define d2_parser_leng_ALREADY_DEFINED
266#else
267#define yyleng d2_parser_leng
268#endif
269
270#ifdef yyin
271#define d2_parser_in_ALREADY_DEFINED
272#else
273#define yyin d2_parser_in
274#endif
275
276#ifdef yyout
277#define d2_parser_out_ALREADY_DEFINED
278#else
279#define yyout d2_parser_out
280#endif
281
282#ifdef yy_flex_debug
283#define d2_parser__flex_debug_ALREADY_DEFINED
284#else
285#define yy_flex_debug d2_parser__flex_debug
286#endif
287
288#ifdef yylineno
289#define d2_parser_lineno_ALREADY_DEFINED
290#else
291#define yylineno d2_parser_lineno
292#endif
293
294/* %endif */
295
296/* First, we deal with platform-specific or compiler-specific issues. */
297
298/* begin standard C headers. */
299/* %if-c-only */
300#include <stdio.h>
301#include <string.h>
302#include <errno.h>
303#include <stdlib.h>
304/* %endif */
305
306/* %if-tables-serialization */
307/* %endif */
308/* end standard C headers. */
309
310/* %if-c-or-c++ */
311/* flex integer type definitions */
312
313#ifndef FLEXINT_H
314#define FLEXINT_H
315
316/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
317
318#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
319
320/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
321 * if you want the limit (max/min) macros for int types.
322 */
323#ifndef __STDC_LIMIT_MACROS
324#define __STDC_LIMIT_MACROS 1
325#endif
326
327#include <inttypes.h>
328typedef int8_t flex_int8_t;
329typedef uint8_t flex_uint8_t;
330typedef int16_t flex_int16_t;
331typedef uint16_t flex_uint16_t;
332typedef int32_t flex_int32_t;
333typedef uint32_t flex_uint32_t;
334#else
335typedef signed char flex_int8_t;
336typedef short int flex_int16_t;
337typedef int flex_int32_t;
338typedef unsigned char flex_uint8_t;
339typedef unsigned short int flex_uint16_t;
340typedef unsigned int flex_uint32_t;
341
342/* Limits of integral types. */
343#ifndef INT8_MIN
344#define INT8_MIN (-128)
345#endif
346#ifndef INT16_MIN
347#define INT16_MIN (-32767-1)
348#endif
349#ifndef INT32_MIN
350#define INT32_MIN (-2147483647-1)
351#endif
352#ifndef INT8_MAX
353#define INT8_MAX (127)
354#endif
355#ifndef INT16_MAX
356#define INT16_MAX (32767)
357#endif
358#ifndef INT32_MAX
359#define INT32_MAX (2147483647)
360#endif
361#ifndef UINT8_MAX
362#define UINT8_MAX (255U)
363#endif
364#ifndef UINT16_MAX
365#define UINT16_MAX (65535U)
366#endif
367#ifndef UINT32_MAX
368#define UINT32_MAX (4294967295U)
369#endif
370
371#ifndef SIZE_MAX
372#define SIZE_MAX (~(size_t)0)
373#endif
374
375#endif /* ! C99 */
376
377#endif /* ! FLEXINT_H */
378
379/* %endif */
380
381/* begin standard C++ headers. */
382/* %if-c++-only */
383/* %endif */
384
385/* TODO: this is always defined, so inline it */
386#define yyconst const
387
388#if defined(__GNUC__) && __GNUC__ >= 3
389#define yynoreturn __attribute__((__noreturn__))
390#else
391#define yynoreturn
392#endif
393
394/* %not-for-header */
395/* Returned upon end-of-file. */
396#define YY_NULL 0
397/* %ok-for-header */
398
399/* %not-for-header */
400/* Promotes a possibly negative, possibly signed char to an
401 * integer in range [0..255] for use as an array index.
402 */
403#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
404/* %ok-for-header */
405
406/* %if-reentrant */
407/* %endif */
408
409/* %if-not-reentrant */
410
411/* %endif */
412
413/* Enter a start condition. This macro really ought to take a parameter,
414 * but we do it the disgusting crufty way forced on us by the ()-less
415 * definition of BEGIN.
416 */
417#define BEGIN (yy_start) = 1 + 2 *
418/* Translate the current start state into a value that can be later handed
419 * to BEGIN to return to the state. The YYSTATE alias is for lex
420 * compatibility.
421 */
422#define YY_START (((yy_start) - 1) / 2)
423#define YYSTATE YY_START
424/* Action number for EOF rule of a given start state. */
425#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
426/* Special action meaning "start processing a new file". */
427#define YY_NEW_FILE yyrestart( yyin )
428#define YY_END_OF_BUFFER_CHAR 0
429
430/* Size of default input buffer. */
431#ifndef YY_BUF_SIZE
432#ifdef __ia64__
433/* On IA-64, the buffer size is 16k, not 8k.
434 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
435 * Ditto for the __ia64__ case accordingly.
436 */
437#define YY_BUF_SIZE 32768
438#else
439#define YY_BUF_SIZE 16384
440#endif /* __ia64__ */
441#endif
442
443/* The state buf must be large enough to hold one state per character in the main buffer.
444 */
445#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
446
447#ifndef YY_TYPEDEF_YY_BUFFER_STATE
448#define YY_TYPEDEF_YY_BUFFER_STATE
450#endif
451
452#ifndef YY_TYPEDEF_YY_SIZE_T
453#define YY_TYPEDEF_YY_SIZE_T
454typedef size_t yy_size_t;
455#endif
456
457/* %if-not-reentrant */
458extern int yyleng;
459/* %endif */
460
461/* %if-c-only */
462/* %if-not-reentrant */
463extern FILE *yyin, *yyout;
464/* %endif */
465/* %endif */
466
467#define EOB_ACT_CONTINUE_SCAN 0
468#define EOB_ACT_END_OF_FILE 1
469#define EOB_ACT_LAST_MATCH 2
470
471 #define YY_LESS_LINENO(n)
472 #define YY_LINENO_REWIND_TO(ptr)
473
474/* Return all but the first "n" matched characters back to the input stream. */
475#define yyless(n) \
476 do \
477 { \
478 /* Undo effects of setting up yytext. */ \
479 int yyless_macro_arg = (n); \
480 YY_LESS_LINENO(yyless_macro_arg);\
481 *yy_cp = (yy_hold_char); \
482 YY_RESTORE_YY_MORE_OFFSET \
483 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
484 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
485 } \
486 while ( 0 )
487#define unput(c) yyunput( c, (yytext_ptr) )
488
489#ifndef YY_STRUCT_YY_BUFFER_STATE
490#define YY_STRUCT_YY_BUFFER_STATE
492 {
493/* %if-c-only */
495/* %endif */
496
497/* %if-c++-only */
498/* %endif */
499
500 char *yy_ch_buf; /* input buffer */
501 char *yy_buf_pos; /* current position in input buffer */
502
503 /* Size of input buffer in bytes, not including room for EOB
504 * characters.
505 */
507
508 /* Number of characters read into yy_ch_buf, not including EOB
509 * characters.
510 */
512
513 /* Whether we "own" the buffer - i.e., we know we created it,
514 * and can realloc() it to grow it, and should free() it to
515 * delete it.
516 */
518
519 /* Whether this is an "interactive" input source; if so, and
520 * if we're using stdio for input, then we want to use getc()
521 * instead of fread(), to make sure we stop fetching input after
522 * each newline.
523 */
525
526 /* Whether we're considered to be at the beginning of a line.
527 * If so, '^' rules will be active on the next match, otherwise
528 * not.
529 */
531
534
535 /* Whether to try to fill the input buffer when we reach the
536 * end of it.
537 */
539
541
542#define YY_BUFFER_NEW 0
543#define YY_BUFFER_NORMAL 1
544 /* When an EOF's been seen but there's still some text to process
545 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
546 * shouldn't try reading from the input source any more. We might
547 * still have a bunch of tokens to match, though, because of
548 * possible backing-up.
549 *
550 * When we actually see the EOF, we change the status to "new"
551 * (via yyrestart()), so that the user can continue scanning by
552 * just pointing yyin at a new input file.
553 */
554#define YY_BUFFER_EOF_PENDING 2
555
556 };
557#endif /* !YY_STRUCT_YY_BUFFER_STATE */
558
559/* %if-c-only Standard (non-C++) definition */
560/* %not-for-header */
561/* %if-not-reentrant */
562
563/* Stack of input buffers. */
564static size_t yy_buffer_stack_top = 0;
565static size_t yy_buffer_stack_max = 0;
566static YY_BUFFER_STATE * yy_buffer_stack = NULL;
567/* %endif */
568/* %ok-for-header */
569
570/* %endif */
571
572/* We provide macros for accessing buffer states in case in the
573 * future we want to put the buffer states in a more general
574 * "scanner state".
575 *
576 * Returns the top of the stack, or NULL.
577 */
578#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
579 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
580 : NULL)
581/* Same as previous macro, but useful when we know that the buffer stack is not
582 * NULL or when we need an lvalue. For internal use only.
583 */
584#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
585
586/* %if-c-only Standard (non-C++) definition */
587
588/* %if-not-reentrant */
589/* %not-for-header */
590/* yy_hold_char holds the character lost when yytext is formed. */
591static char yy_hold_char;
592static int yy_n_chars; /* number of characters read into yy_ch_buf */
594
595/* Points to current character in buffer. */
596static char *yy_c_buf_p = NULL;
597static int yy_init = 0; /* whether we need to initialize */
598static int yy_start = 0; /* start state number */
599
600/* Flag which is used to allow yywrap()'s to do buffer switches
601 * instead of setting up a fresh yyin. A bit of a hack ...
602 */
603static int yy_did_buffer_switch_on_eof;
604/* %ok-for-header */
605
606/* %endif */
607
608void yyrestart ( FILE *input_file );
609void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
610YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
613void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
614void yypop_buffer_state ( void );
615
616static void yyensure_buffer_stack ( void );
617static void yy_load_buffer_state ( void );
618static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
619#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
620
621YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
622YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
623YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
624
625/* %endif */
626
627void *yyalloc ( yy_size_t );
628void *yyrealloc ( void *, yy_size_t );
629void yyfree ( void * );
630
631#define yy_new_buffer yy_create_buffer
632#define yy_set_interactive(is_interactive) \
633 { \
634 if ( ! YY_CURRENT_BUFFER ){ \
635 yyensure_buffer_stack (); \
636 YY_CURRENT_BUFFER_LVALUE = \
637 yy_create_buffer( yyin, YY_BUF_SIZE ); \
638 } \
639 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
640 }
641#define yy_set_bol(at_bol) \
642 { \
643 if ( ! YY_CURRENT_BUFFER ){\
644 yyensure_buffer_stack (); \
645 YY_CURRENT_BUFFER_LVALUE = \
646 yy_create_buffer( yyin, YY_BUF_SIZE ); \
647 } \
648 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
649 }
650#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
651
652/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
653/* Begin user sect3 */
654
655#define d2_parser_wrap() (/*CONSTCOND*/1)
656#define YY_SKIP_YYWRAP
657
658#define FLEX_DEBUG
660
661FILE *yyin = NULL, *yyout = NULL;
662
663typedef int yy_state_type;
664
665extern int yylineno;
666int yylineno = 1;
667
668extern char *yytext;
669#ifdef yytext_ptr
670#undef yytext_ptr
671#endif
672#define yytext_ptr yytext
673
674/* %% [1.5] DFA */
675
676/* %if-c-only Standard (non-C++) definition */
677
678static yy_state_type yy_get_previous_state ( void );
679static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
680static int yy_get_next_buffer ( void );
681static void yynoreturn yy_fatal_error ( const char* msg );
682
683/* %endif */
684
685/* Done after the current pattern has been matched and before the
686 * corresponding action - sets up yytext.
687 */
688#define YY_DO_BEFORE_ACTION \
689 (yytext_ptr) = yy_bp; \
690/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
691 yyleng = (int) (yy_cp - yy_bp); \
692 (yy_hold_char) = *yy_cp; \
693 *yy_cp = '\0'; \
694/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
695 (yy_c_buf_p) = yy_cp;
696/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
697#define YY_NUM_RULES 92
698#define YY_END_OF_BUFFER 93
699/* This struct is not used in this scanner,
700 but its presence is necessary. */
706static const flex_int16_t yy_accept[579] =
707 { 0,
708 85, 85, 0, 0, 0, 0, 0, 0, 0, 0,
709 93, 91, 10, 11, 91, 1, 83, 79, 85, 85,
710 91, 82, 82, 80, 91, 91, 91, 91, 91, 75,
711 76, 91, 91, 91, 77, 78, 5, 5, 5, 91,
712 91, 91, 10, 11, 0, 0, 70, 0, 0, 0,
713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
714 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
715 83, 83, 0, 85, 82, 82, 0, 85, 3, 2,
716 81, 82, 6, 0, 85, 0, 0, 0, 0, 0,
717 0, 4, 0, 0, 9, 0, 71, 0, 0, 0,
718
719 0, 0, 0, 73, 0, 0, 0, 0, 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, 83, 0, 83,
723 2, 84, 81, 0, 0, 0, 0, 0, 0, 0,
724 0, 8, 0, 0, 0, 0, 0, 72, 74, 0,
725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,
729
730 0, 0, 84, 0, 90, 88, 0, 87, 86, 0,
731 0, 0, 19, 18, 0, 0, 0, 0, 0, 0,
732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
735 0, 0, 0, 0, 0, 0, 84, 89, 86, 0,
736 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
737 0, 0, 0, 0, 0, 0, 0, 0, 0, 37,
738 0, 0, 0, 0, 0, 0, 0, 0, 67, 0,
739 0, 0, 0, 0, 0, 14, 0, 0, 0, 0,
740
741 0, 0, 0, 43, 36, 48, 0, 0, 0, 0,
742 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
743 0, 0, 63, 0, 0, 0, 38, 0, 0, 0,
744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
745 45, 0, 0, 0, 0, 0, 0, 0, 0, 7,
746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
747 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
748 0, 0, 65, 0, 0, 62, 0, 0, 0, 0,
749 0, 0, 32, 0, 0, 0, 0, 0, 0, 0,
750 0, 0, 0, 0, 0, 47, 22, 0, 0, 0,
751
752 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,
753 59, 64, 0, 0, 0, 0, 0, 0, 66, 0,
754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
755 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
756 0, 0, 0, 28, 0, 54, 26, 0, 0, 0,
757 0, 0, 50, 0, 0, 0, 69, 0, 0, 0,
758 0, 0, 0, 0, 0, 30, 0, 53, 0, 0,
759 0, 0, 0, 46, 0, 0, 0, 0, 0, 0,
760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
761 0, 29, 0, 49, 0, 0, 0, 0, 68, 0,
762
763 0, 0, 0, 0, 13, 17, 0, 0, 0, 57,
764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
765 0, 0, 0, 31, 0, 27, 0, 0, 0, 0,
766 0, 0, 0, 33, 0, 39, 41, 35, 0, 0,
767 0, 0, 0, 25, 0, 23, 0, 16, 0, 0,
768 0, 24, 0, 52, 21, 0, 55, 0, 0, 0,
769 0, 0, 51, 0, 42, 0, 0, 0, 61, 60,
770 40, 34, 0, 56, 0, 0, 15, 0
771 } ;
772
773static const YY_CHAR yy_ec[256] =
774 { 0,
775 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
776 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
777 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
778 1, 4, 5, 6, 7, 5, 5, 5, 5, 5,
779 5, 8, 9, 10, 11, 12, 13, 14, 15, 15,
780 15, 15, 15, 15, 15, 15, 15, 16, 5, 17,
781 5, 18, 19, 5, 20, 21, 22, 23, 24, 25,
782 5, 5, 5, 26, 5, 27, 5, 28, 29, 30,
783 5, 31, 32, 33, 34, 5, 5, 5, 5, 5,
784 35, 36, 37, 5, 38, 5, 39, 40, 41, 42,
785
786 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
787 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
788 63, 64, 65, 5, 66, 5, 5, 5, 5, 5,
789 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
790 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
791 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
792 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
793 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
794 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
795 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
796
797 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
798 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
799 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
800 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
801 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
802 5, 5, 5, 5, 5
803 } ;
804
805static const YY_CHAR yy_meta[67] =
806 { 0,
807 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
808 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
809 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
810 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
811 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
812 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
813 1, 1, 1, 1, 1, 1
814 } ;
815
816static const flex_int16_t yy_base[587] =
817 { 0,
818 0, 65, 18, 28, 36, 44, 47, 53, 82, 92,
819 900, 901, 25, 896, 131, 0, 49, 901, 186, 73,
820 10, 190, 194, 901, 879, 104, 21, 11, 68, 901,
821 901, 83, 70, 168, 901, 901, 901, 103, 884, 844,
822 0, 877, 108, 891, 205, 219, 901, 847, 171, 84,
823 184, 243, 162, 853, 170, 188, 166, 68, 837, 847,
824 67, 850, 176, 829, 183, 844, 191, 233, 258, 0,
825 270, 292, 277, 294, 305, 309, 316, 325, 901, 0,
826 329, 342, 901, 113, 224, 198, 200, 198, 253, 255,
827 263, 901, 845, 879, 901, 292, 901, 352, 843, 283,
828
829 284, 296, 877, 0, 406, 837, 823, 823, 823, 831,
830 195, 825, 836, 198, 818, 815, 817, 289, 814, 860,
831 807, 829, 823, 805, 815, 809, 806, 303, 807, 272,
832 304, 821, 802, 813, 805, 811, 814, 355, 348, 359,
833 0, 362, 366, 380, 343, 356, 358, 361, 357, 373,
834 806, 901, 801, 319, 848, 847, 846, 901, 901, 437,
835 798, 804, 802, 790, 804, 795, 787, 787, 784, 799,
836 798, 829, 782, 777, 788, 778, 781, 795, 822, 776,
837 786, 342, 787, 818, 774, 788, 769, 767, 766, 773,
838 779, 765, 777, 770, 761, 772, 773, 753, 758, 399,
839
840 423, 410, 421, 379, 901, 901, 420, 901, 901, 754,
841 789, 805, 901, 901, 468, 754, 766, 767, 796, 754,
842 762, 748, 792, 757, 744, 759, 742, 752, 758, 739,
843 743, 409, 752, 10, 754, 749, 744, 747, 783, 389,
844 729, 736, 725, 742, 778, 732, 726, 738, 724, 736,
845 720, 766, 770, 769, 458, 425, 439, 901, 901, 732,
846 731, 901, 499, 725, 719, 764, 311, 711, 716, 714,
847 724, 715, 706, 705, 719, 755, 704, 748, 719, 901,
848 751, 714, 708, 715, 697, 696, 687, 694, 901, 696,
849 692, 689, 703, 692, 688, 901, 737, 685, 683, 693,
850
851 681, 727, 688, 901, 901, 901, 424, 693, 683, 676,
852 675, 901, 685, 688, 673, 671, 678, 674, 683, 714,
853 671, 667, 901, 680, 671, 669, 901, 663, 668, 666,
854 653, 658, 671, 707, 656, 658, 461, 652, 653, 656,
855 901, 664, 464, 648, 694, 665, 660, 649, 654, 901,
856 643, 653, 651, 647, 641, 689, 688, 682, 641, 631,
857 650, 633, 628, 676, 639, 642, 641, 640, 639, 675,
858 674, 673, 901, 627, 619, 901, 623, 622, 631, 631,
859 666, 660, 901, 626, 606, 446, 616, 604, 614, 615,
860 658, 612, 621, 618, 601, 901, 901, 602, 619, 614,
861
862 609, 592, 611, 611, 612, 645, 593, 643, 642, 901,
863 901, 901, 608, 593, 591, 590, 587, 490, 901, 600,
864 594, 634, 597, 599, 584, 573, 594, 577, 575, 589,
865 901, 625, 591, 623, 581, 574, 579, 575, 566, 617,
866 566, 579, 564, 901, 562, 901, 901, 560, 576, 558,
867 557, 557, 901, 569, 570, 561, 901, 568, 558, 552,
868 553, 560, 599, 561, 597, 901, 544, 901, 545, 559,
869 547, 592, 540, 901, 430, 544, 556, 588, 587, 539,
870 544, 543, 583, 541, 535, 543, 529, 541, 525, 539,
871 528, 901, 518, 901, 532, 535, 528, 519, 901, 569,
872
873 516, 567, 515, 515, 901, 901, 520, 516, 515, 901,
874 517, 509, 559, 517, 545, 531, 530, 479, 476, 480,
875 490, 488, 524, 901, 482, 901, 522, 480, 520, 473,
876 466, 474, 510, 901, 458, 901, 901, 901, 500, 499,
877 451, 496, 439, 901, 444, 901, 451, 901, 429, 427,
878 468, 901, 416, 901, 901, 465, 901, 399, 412, 362,
879 411, 381, 901, 345, 901, 328, 240, 258, 901, 901,
880 901, 901, 203, 901, 193, 2, 901, 901, 543, 546,
881 549, 0, 552, 555, 558, 561
882 } ;
883
884static const flex_int16_t yy_def[587] =
885 { 0,
886 579, 579, 580, 580, 579, 579, 579, 579, 579, 579,
887 578, 578, 578, 578, 578, 581, 578, 578, 578, 578,
888 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
889 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
890 582, 578, 578, 578, 583, 15, 578, 46, 46, 46,
891 46, 584, 46, 46, 46, 46, 46, 46, 46, 46,
892 46, 46, 46, 46, 46, 46, 46, 46, 46, 581,
893 578, 578, 578, 578, 578, 578, 578, 578, 578, 585,
894 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
895 578, 578, 578, 582, 578, 583, 578, 578, 46, 46,
896
897 46, 46, 586, 46, 584, 46, 46, 46, 46, 46,
898 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
899 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
900 46, 46, 46, 46, 46, 46, 46, 578, 578, 578,
901 585, 578, 578, 578, 578, 578, 578, 578, 578, 578,
902 578, 578, 46, 46, 46, 46, 586, 578, 578, 105,
903 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
904 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
905 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
906 46, 46, 46, 46, 46, 46, 46, 46, 46, 578,
907
908 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
909 46, 46, 578, 578, 105, 46, 46, 46, 46, 46,
910 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
911 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
912 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
913 46, 46, 46, 46, 46, 578, 578, 578, 578, 578,
914 46, 578, 105, 46, 46, 46, 46, 46, 46, 46,
915 46, 46, 46, 46, 46, 46, 46, 46, 46, 578,
916 46, 46, 46, 46, 46, 46, 46, 46, 578, 46,
917 46, 46, 46, 46, 46, 578, 46, 46, 46, 46,
918
919 46, 46, 46, 578, 578, 578, 46, 578, 46, 46,
920 46, 578, 46, 46, 46, 46, 46, 46, 46, 46,
921 46, 46, 578, 46, 46, 46, 578, 46, 46, 46,
922 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
923 578, 46, 46, 46, 46, 46, 46, 46, 46, 578,
924 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
925 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
926 46, 46, 578, 46, 46, 578, 46, 46, 46, 46,
927 46, 46, 578, 46, 46, 46, 46, 46, 46, 46,
928 46, 46, 46, 46, 46, 578, 578, 46, 46, 46,
929
930 46, 46, 46, 46, 46, 46, 46, 46, 46, 578,
931 578, 578, 46, 46, 46, 46, 46, 46, 578, 46,
932 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
933 578, 46, 46, 46, 46, 46, 46, 46, 46, 46,
934 46, 46, 46, 578, 46, 578, 578, 46, 46, 46,
935 46, 46, 578, 46, 46, 46, 578, 46, 46, 46,
936 46, 46, 46, 46, 46, 578, 46, 578, 46, 46,
937 46, 46, 46, 578, 46, 46, 46, 46, 46, 46,
938 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
939 46, 578, 46, 578, 46, 46, 46, 46, 578, 46,
940
941 46, 46, 46, 46, 578, 578, 46, 46, 46, 578,
942 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
943 46, 46, 46, 578, 46, 578, 46, 46, 46, 46,
944 46, 46, 46, 578, 46, 578, 578, 578, 46, 46,
945 46, 46, 46, 578, 46, 578, 46, 578, 46, 46,
946 46, 578, 46, 578, 578, 46, 578, 46, 46, 46,
947 46, 46, 578, 46, 578, 46, 46, 46, 578, 578,
948 578, 578, 46, 578, 46, 46, 578, 0, 578, 578,
949 578, 578, 578, 578, 578, 578
950 } ;
951
952static const flex_int16_t yy_nxt[968] =
953 { 0,
954 94, 13, 14, 13, 578, 15, 16, 577, 17, 18,
955 19, 20, 21, 22, 23, 24, 25, 79, 578, 38,
956 14, 38, 80, 26, 27, 39, 43, 28, 43, 38,
957 14, 38, 29, 578, 30, 39, 31, 13, 14, 13,
958 86, 578, 26, 32, 87, 13, 14, 13, 13, 14,
959 13, 33, 41, 283, 13, 14, 13, 34, 41, 86,
960 71, 284, 72, 72, 35, 36, 13, 14, 13, 87,
961 15, 16, 73, 17, 18, 19, 20, 21, 22, 23,
962 24, 25, 40, 13, 14, 13, 78, 78, 26, 27,
963 40, 73, 28, 13, 14, 13, 77, 29, 88, 30,
964
965 42, 31, 86, 87, 43, 101, 43, 26, 32, 43,
966 42, 43, 84, 122, 84, 77, 33, 85, 85, 123,
967 118, 89, 34, 88, 101, 119, 85, 85, 90, 35,
968 36, 45, 45, 45, 46, 46, 47, 46, 46, 46,
969 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
970 46, 46, 46, 48, 46, 46, 49, 46, 46, 46,
971 46, 46, 46, 50, 51, 46, 52, 46, 46, 53,
972 54, 55, 56, 46, 57, 46, 58, 59, 49, 60,
973 61, 62, 63, 64, 65, 46, 66, 67, 68, 69,
974 46, 46, 46, 46, 46, 46, 46, 74, 88, 75,
975
976 76, 74, 100, 81, 81, 74, 102, 82, 82, 77,
977 97, 106, 109, 77, 125, 116, 126, 77, 117, 110,
978 107, 128, 111, 91, 145, 102, 146, 100, 77, 112,
979 113, 147, 77, 131, 114, 129, 77, 85, 85, 115,
980 98, 46, 170, 132, 46, 166, 167, 145, 104, 146,
981 576, 46, 46, 171, 101, 46, 147, 46, 46, 46,
982 46, 575, 46, 574, 46, 46, 46, 46, 46, 46,
983 46, 46, 46, 101, 46, 46, 46, 46, 46, 145,
984 102, 146, 46, 138, 138, 139, 46, 139, 133, 134,
985 140, 140, 573, 73, 46, 135, 147, 97, 46, 102,
986
987 46, 105, 148, 71, 149, 72, 72, 78, 78, 136,
988 190, 154, 73, 155, 137, 73, 74, 77, 81, 81,
989 74, 150, 82, 82, 84, 156, 84, 98, 77, 85,
990 85, 191, 77, 572, 73, 154, 77, 155, 78, 78,
991 142, 175, 143, 143, 192, 176, 212, 77, 77, 156,
992 571, 77, 144, 74, 313, 82, 82, 96, 186, 187,
993 188, 140, 140, 193, 96, 77, 314, 77, 138, 138,
994 212, 144, 140, 140, 204, 200, 200, 142, 73, 143,
995 143, 206, 205, 205, 77, 201, 570, 96, 202, 144,
996 202, 96, 204, 203, 203, 96, 206, 73, 237, 204,
997
998 206, 238, 258, 96, 201, 205, 208, 96, 144, 96,
999 96, 159, 200, 200, 280, 209, 569, 207, 568, 160,
1000 160, 258, 201, 203, 203, 160, 160, 160, 160, 160,
1001 160, 256, 290, 256, 203, 203, 257, 257, 257, 257,
1002 501, 201, 291, 258, 160, 160, 160, 160, 160, 160,
1003 215, 215, 257, 257, 567, 566, 215, 215, 215, 215,
1004 215, 215, 259, 306, 348, 281, 376, 349, 307, 383,
1005 565, 377, 564, 563, 384, 215, 215, 215, 215, 215,
1006 215, 263, 263, 562, 423, 561, 502, 263, 263, 263,
1007 263, 263, 263, 560, 559, 453, 558, 424, 378, 425,
1008
1009 454, 557, 556, 426, 555, 554, 263, 263, 263, 263,
1010 263, 263, 46, 46, 553, 552, 551, 550, 46, 46,
1011 46, 46, 46, 46, 549, 548, 547, 546, 545, 544,
1012 543, 542, 541, 540, 539, 538, 537, 46, 46, 46,
1013 46, 46, 46, 12, 12, 12, 37, 37, 37, 70,
1014 536, 70, 96, 96, 96, 103, 103, 103, 141, 535,
1015 141, 157, 157, 157, 534, 533, 532, 531, 530, 529,
1016 528, 527, 526, 525, 524, 523, 522, 521, 520, 519,
1017 518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
1018 508, 507, 506, 505, 504, 503, 500, 499, 498, 497,
1019
1020 496, 495, 494, 493, 492, 491, 490, 489, 488, 487,
1021 486, 485, 484, 483, 482, 481, 480, 479, 478, 477,
1022 476, 475, 474, 473, 472, 471, 470, 469, 468, 467,
1023 466, 465, 464, 463, 462, 461, 460, 459, 458, 457,
1024 456, 455, 452, 451, 450, 449, 448, 447, 446, 445,
1025 444, 443, 442, 441, 440, 439, 438, 437, 436, 435,
1026 434, 433, 432, 431, 430, 429, 428, 427, 422, 421,
1027 420, 419, 418, 417, 416, 415, 414, 413, 412, 411,
1028 410, 409, 408, 407, 406, 405, 404, 403, 402, 401,
1029 400, 399, 398, 397, 396, 395, 394, 393, 392, 391,
1030
1031 390, 389, 388, 387, 386, 385, 382, 381, 380, 379,
1032 375, 374, 373, 372, 371, 370, 369, 368, 367, 366,
1033 365, 364, 363, 362, 361, 360, 359, 358, 357, 356,
1034 355, 354, 353, 352, 351, 350, 347, 346, 345, 344,
1035 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
1036 333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
1037 323, 322, 321, 320, 319, 318, 317, 316, 315, 312,
1038 311, 310, 309, 308, 305, 304, 303, 302, 301, 300,
1039 299, 298, 297, 296, 295, 294, 293, 292, 289, 288,
1040 287, 286, 285, 282, 279, 278, 277, 276, 275, 274,
1041
1042 273, 272, 271, 270, 269, 268, 267, 266, 265, 264,
1043 262, 261, 260, 255, 254, 253, 252, 251, 250, 249,
1044 248, 247, 246, 245, 244, 243, 242, 241, 240, 239,
1045 236, 235, 234, 233, 232, 231, 230, 229, 228, 227,
1046 226, 225, 224, 223, 222, 221, 220, 219, 218, 217,
1047 216, 158, 214, 213, 211, 210, 199, 198, 197, 196,
1048 195, 194, 189, 185, 184, 183, 182, 181, 180, 179,
1049 178, 177, 174, 173, 172, 169, 168, 165, 164, 163,
1050 162, 161, 158, 153, 152, 151, 130, 127, 124, 121,
1051 120, 108, 99, 44, 95, 93, 92, 83, 44, 578,
1052
1053 11, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1054 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1055 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1056 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1057 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1058 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1059 578, 578, 578, 578, 578, 578, 578
1060 } ;
1061
1062static const flex_int16_t yy_chk[968] =
1063 { 0,
1064 582, 1, 1, 1, 0, 1, 1, 576, 1, 1,
1065 1, 1, 1, 1, 1, 1, 1, 21, 0, 3,
1066 3, 3, 21, 1, 1, 3, 13, 1, 13, 4,
1067 4, 4, 1, 0, 1, 4, 1, 5, 5, 5,
1068 27, 0, 1, 1, 28, 6, 6, 6, 7, 7,
1069 7, 1, 7, 234, 8, 8, 8, 1, 8, 27,
1070 17, 234, 17, 17, 1, 1, 2, 2, 2, 28,
1071 2, 2, 17, 2, 2, 2, 2, 2, 2, 2,
1072 2, 2, 5, 9, 9, 9, 20, 20, 2, 2,
1073 6, 17, 2, 10, 10, 10, 20, 2, 29, 2,
1074
1075 9, 2, 32, 33, 38, 50, 38, 2, 2, 43,
1076 10, 43, 26, 61, 26, 20, 2, 26, 26, 61,
1077 58, 32, 2, 29, 50, 58, 84, 84, 33, 2,
1078 2, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1079 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1080 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1081 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1082 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1083 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1084 15, 15, 15, 15, 15, 15, 15, 19, 34, 19,
1085
1086 19, 22, 49, 22, 22, 23, 51, 23, 23, 19,
1087 45, 53, 55, 22, 63, 57, 63, 23, 57, 55,
1088 53, 65, 55, 34, 86, 51, 87, 49, 19, 56,
1089 56, 88, 22, 67, 56, 65, 23, 85, 85, 56,
1090 45, 46, 114, 67, 46, 111, 111, 86, 52, 87,
1091 575, 46, 46, 114, 68, 52, 88, 46, 46, 46,
1092 46, 573, 46, 568, 46, 46, 46, 46, 46, 46,
1093 46, 46, 46, 68, 46, 46, 46, 46, 52, 89,
1094 69, 90, 52, 71, 71, 73, 52, 73, 68, 68,
1095 73, 73, 567, 71, 52, 68, 91, 96, 52, 69,
1096
1097 52, 52, 89, 72, 90, 72, 72, 74, 74, 69,
1098 130, 100, 71, 101, 69, 72, 75, 74, 75, 75,
1099 76, 91, 76, 76, 77, 102, 77, 96, 75, 77,
1100 77, 130, 76, 566, 72, 100, 74, 101, 78, 78,
1101 81, 118, 81, 81, 131, 118, 154, 75, 78, 102,
1102 564, 76, 81, 82, 267, 82, 82, 98, 128, 128,
1103 128, 139, 139, 131, 98, 82, 267, 78, 138, 138,
1104 154, 81, 140, 140, 145, 142, 142, 143, 138, 143,
1105 143, 147, 146, 149, 82, 142, 562, 98, 144, 143,
1106 144, 98, 148, 144, 144, 98, 150, 138, 182, 145,
1107
1108 147, 182, 204, 98, 142, 146, 149, 98, 143, 98,
1109 98, 105, 200, 200, 232, 150, 561, 148, 560, 105,
1110 105, 204, 200, 202, 202, 105, 105, 105, 105, 105,
1111 105, 201, 240, 201, 203, 203, 201, 201, 256, 256,
1112 475, 200, 240, 207, 105, 105, 105, 105, 105, 105,
1113 160, 160, 257, 257, 559, 558, 160, 160, 160, 160,
1114 160, 160, 207, 255, 307, 232, 337, 307, 255, 343,
1115 556, 337, 553, 551, 343, 160, 160, 160, 160, 160,
1116 160, 215, 215, 550, 386, 549, 475, 215, 215, 215,
1117 215, 215, 215, 547, 545, 418, 543, 386, 337, 386,
1118
1119 418, 542, 541, 386, 540, 539, 215, 215, 215, 215,
1120 215, 215, 263, 263, 535, 533, 532, 531, 263, 263,
1121 263, 263, 263, 263, 530, 529, 528, 527, 525, 523,
1122 522, 521, 520, 519, 518, 517, 516, 263, 263, 263,
1123 263, 263, 263, 579, 579, 579, 580, 580, 580, 581,
1124 515, 581, 583, 583, 583, 584, 584, 584, 585, 514,
1125 585, 586, 586, 586, 513, 512, 511, 509, 508, 507,
1126 504, 503, 502, 501, 500, 498, 497, 496, 495, 493,
1127 491, 490, 489, 488, 487, 486, 485, 484, 483, 482,
1128 481, 480, 479, 478, 477, 476, 473, 472, 471, 470,
1129
1130 469, 467, 465, 464, 463, 462, 461, 460, 459, 458,
1131 456, 455, 454, 452, 451, 450, 449, 448, 445, 443,
1132 442, 441, 440, 439, 438, 437, 436, 435, 434, 433,
1133 432, 430, 429, 428, 427, 426, 425, 424, 423, 422,
1134 421, 420, 417, 416, 415, 414, 413, 409, 408, 407,
1135 406, 405, 404, 403, 402, 401, 400, 399, 398, 395,
1136 394, 393, 392, 391, 390, 389, 388, 387, 385, 384,
1137 382, 381, 380, 379, 378, 377, 375, 374, 372, 371,
1138 370, 369, 368, 367, 366, 365, 364, 363, 362, 361,
1139 360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
1140
1141 349, 348, 347, 346, 345, 344, 342, 340, 339, 338,
1142 336, 335, 334, 333, 332, 331, 330, 329, 328, 326,
1143 325, 324, 322, 321, 320, 319, 318, 317, 316, 315,
1144 314, 313, 311, 310, 309, 308, 303, 302, 301, 300,
1145 299, 298, 297, 295, 294, 293, 292, 291, 290, 288,
1146 287, 286, 285, 284, 283, 282, 281, 279, 278, 277,
1147 276, 275, 274, 273, 272, 271, 270, 269, 268, 266,
1148 265, 264, 261, 260, 254, 253, 252, 251, 250, 249,
1149 248, 247, 246, 245, 244, 243, 242, 241, 239, 238,
1150 237, 236, 235, 233, 231, 230, 229, 228, 227, 226,
1151
1152 225, 224, 223, 222, 221, 220, 219, 218, 217, 216,
1153 212, 211, 210, 199, 198, 197, 196, 195, 194, 193,
1154 192, 191, 190, 189, 188, 187, 186, 185, 184, 183,
1155 181, 180, 179, 178, 177, 176, 175, 174, 173, 172,
1156 171, 170, 169, 168, 167, 166, 165, 164, 163, 162,
1157 161, 157, 156, 155, 153, 151, 137, 136, 135, 134,
1158 133, 132, 129, 127, 126, 125, 124, 123, 122, 121,
1159 120, 119, 117, 116, 115, 113, 112, 110, 109, 108,
1160 107, 106, 103, 99, 94, 93, 66, 64, 62, 60,
1161 59, 54, 48, 44, 42, 40, 39, 25, 14, 11,
1162
1163 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1164 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1165 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1166 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1167 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1168 578, 578, 578, 578, 578, 578, 578, 578, 578, 578,
1169 578, 578, 578, 578, 578, 578, 578
1170 } ;
1171
1172static yy_state_type yy_last_accepting_state;
1173static char *yy_last_accepting_cpos;
1174
1175extern int yy_flex_debug;
1177
1178static const flex_int16_t yy_rule_linenum[92] =
1179 { 0,
1180 144, 146, 148, 153, 154, 159, 160, 161, 173, 176,
1181 181, 187, 196, 207, 218, 227, 236, 245, 255, 265,
1182 275, 294, 313, 322, 331, 341, 353, 363, 374, 383,
1183 393, 403, 413, 423, 432, 441, 450, 459, 468, 477,
1184 486, 495, 504, 513, 522, 531, 540, 549, 558, 567,
1185 576, 585, 594, 603, 612, 621, 630, 639, 648, 657,
1186 666, 675, 684, 693, 702, 711, 720, 733, 742, 751,
1187 852, 868, 917, 925, 940, 941, 942, 943, 944, 945,
1188 947, 966, 983, 989, 1004, 1017, 1022, 1026, 1028, 1030,
1189 1032
1190
1191 } ;
1192
1193/* The intent behind this definition is that it'll catch
1194 * any uses of REJECT which flex missed.
1195 */
1196#define REJECT reject_used_but_not_detected
1197#define yymore() yymore_used_but_not_detected
1198#define YY_MORE_ADJ 0
1199#define YY_RESTORE_YY_MORE_OFFSET
1201#line 1 "d2_lexer.ll"
1202/* Copyright (C) 2017-2026 Internet Systems Consortium, Inc. ("ISC")
1203
1204 This Source Code Form is subject to the terms of the Mozilla Public
1205 License, v. 2.0. If a copy of the MPL was not distributed with this
1206 file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1207
1208#line 15 "d2_lexer.ll"
1209
1210/* Generated files do not make clang static analyser so happy */
1211#ifndef __clang_analyzer__
1212
1213#include <config.h>
1214
1215#include <cctype>
1216#include <cerrno>
1217#include <cstdlib>
1218#include <string>
1219#include <d2/parser_context.h>
1220#include <asiolink/io_address.h>
1221#include <boost/lexical_cast.hpp>
1222#include <exceptions/exceptions.h>
1223
1224/* Please avoid C++ style comments (// ... eol) as they break flex 2.6.2 */
1225
1226/* Work around an incompatibility in flex (at least versions
1227 2.5.31 through 2.5.33): it generates code that does
1228 not conform to C89. See Debian bug 333231
1229 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
1230# undef yywrap
1231# define yywrap() 1
1232
1233namespace {
1234
1235bool start_token_flag = false;
1236
1237isc::d2::D2ParserContext::ParserType start_token_value;
1238unsigned int comment_start_line = 0;
1239
1240};
1241
1242/* To avoid the call to exit... oops! */
1243#define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
1244#line 1244 "d2_lexer.cc"
1245/* noyywrap disables automatic rewinding for the next file to parse. Since we
1246 always parse only a single string, there's no need to do any wraps. And
1247 using yywrap requires linking with -lfl, which provides the default yywrap
1248 implementation that always returns 1 anyway. */
1249/* nounput simplifies the lexer, by removing support for putting a character
1250 back into the input stream. We never use such capability anyway. */
1251/* batch means that we'll never use the generated lexer interactively. */
1252/* avoid to get static global variables to remain with C++. */
1253/* in last resort %option reentrant */
1254/* Enables debug mode. To see the debug messages, one needs to also set
1255 yy_flex_debug to 1, then the debug messages will be printed on stderr. */
1256/* I have no idea what this option does, except it was specified in the bison
1257 examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
1258 be on the safe side and keep it. */
1259#define YY_NO_INPUT 1
1260
1261/* These are not token expressions yet, just convenience expressions that
1262 can be used during actual token definitions. Note some can match
1263 incorrect inputs (e.g., IP addresses) which must be checked. */
1264/* for errors */
1265#line 101 "d2_lexer.ll"
1266/* This code run each time a pattern is matched. It updates the location
1267 by moving it ahead by yyleng bytes. yyleng specifies the length of the
1268 currently matched token. */
1269#define YY_USER_ACTION driver.loc_.columns(yyleng);
1270#line 1270 "d2_lexer.cc"
1271#line 1271 "d2_lexer.cc"
1272
1273#define INITIAL 0
1274#define COMMENT 1
1275#define DIR_ENTER 2
1276#define DIR_INCLUDE 3
1277#define DIR_EXIT 4
1278
1279#ifndef YY_NO_UNISTD_H
1280/* Special case for "unistd.h", since it is non-ANSI. We include it way
1281 * down here because we want the user's section 1 to have been scanned first.
1282 * The user has a chance to override it with an option.
1283 */
1284/* %if-c-only */
1285#include <unistd.h>
1286/* %endif */
1287/* %if-c++-only */
1288/* %endif */
1289#endif
1290
1291#ifndef YY_EXTRA_TYPE
1292#define YY_EXTRA_TYPE void *
1293#endif
1294
1295/* %if-c-only Reentrant structure and macros (non-C++). */
1296/* %if-reentrant */
1297/* %if-c-only */
1298
1299static int yy_init_globals ( void );
1300
1301/* %endif */
1302/* %if-reentrant */
1303/* %endif */
1304/* %endif End reentrant structures and macros. */
1305
1306/* Accessor methods to globals.
1307 These are made visible to non-reentrant scanners for convenience. */
1308
1309int yylex_destroy ( void );
1310
1311int yyget_debug ( void );
1312
1313void yyset_debug ( int debug_flag );
1314
1315YY_EXTRA_TYPE yyget_extra ( void );
1316
1317void yyset_extra ( YY_EXTRA_TYPE user_defined );
1318
1319FILE *yyget_in ( void );
1320
1321void yyset_in ( FILE * _in_str );
1322
1323FILE *yyget_out ( void );
1324
1325void yyset_out ( FILE * _out_str );
1326
1327 int yyget_leng ( void );
1328
1329char *yyget_text ( void );
1330
1331int yyget_lineno ( void );
1332
1333void yyset_lineno ( int _line_number );
1334
1335/* %if-bison-bridge */
1336/* %endif */
1337
1338/* Macros after this point can all be overridden by user definitions in
1339 * section 1.
1340 */
1341
1342#ifndef YY_SKIP_YYWRAP
1343#ifdef __cplusplus
1344extern "C" int yywrap ( void );
1345#else
1346extern int yywrap ( void );
1347#endif
1348#endif
1349
1350/* %not-for-header */
1351#ifndef YY_NO_UNPUT
1352
1353#endif
1354/* %ok-for-header */
1355
1356/* %endif */
1357
1358#ifndef yytext_ptr
1359static void yy_flex_strncpy ( char *, const char *, int );
1360#endif
1361
1362#ifdef YY_NEED_STRLEN
1363static int yy_flex_strlen ( const char * );
1364#endif
1365
1366#ifndef YY_NO_INPUT
1367/* %if-c-only Standard (non-C++) definition */
1368/* %not-for-header */
1369#ifdef __cplusplus
1370static int yyinput ( void );
1371#else
1372static int input ( void );
1373#endif
1374/* %ok-for-header */
1375
1376/* %endif */
1377#endif
1378
1379/* %if-c-only */
1380
1381/* %endif */
1382
1383/* Amount of stuff to slurp up with each read. */
1384#ifndef YY_READ_BUF_SIZE
1385#ifdef __ia64__
1386/* On IA-64, the buffer size is 16k, not 8k */
1387#define YY_READ_BUF_SIZE 16384
1388#else
1389#define YY_READ_BUF_SIZE 8192
1390#endif /* __ia64__ */
1391#endif
1392
1393/* Copy whatever the last rule matched to the standard output. */
1394#ifndef ECHO
1395/* %if-c-only Standard (non-C++) definition */
1396/* This used to be an fputs(), but since the string might contain NUL's,
1397 * we now use fwrite().
1398 */
1399#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1400/* %endif */
1401/* %if-c++-only C++ definition */
1402/* %endif */
1403#endif
1404
1405/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1406 * is returned in "result".
1407 */
1408#ifndef YY_INPUT
1409#define YY_INPUT(buf,result,max_size) \
1410/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1411 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1412 { \
1413 int c = '*'; \
1414 int n; \
1415 for ( n = 0; n < max_size && \
1416 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1417 buf[n] = (char) c; \
1418 if ( c == '\n' ) \
1419 buf[n++] = (char) c; \
1420 if ( c == EOF && ferror( yyin ) ) \
1421 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1422 result = n; \
1423 } \
1424 else \
1425 { \
1426 errno=0; \
1427 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1428 { \
1429 if( errno != EINTR) \
1430 { \
1431 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1432 break; \
1433 } \
1434 errno=0; \
1435 clearerr(yyin); \
1436 } \
1437 }\
1438\
1439/* %if-c++-only C++ definition \ */\
1440/* %endif */
1441
1442#endif
1443
1444/* No semi-colon after return; correct usage is to write "yyterminate();" -
1445 * we don't want an extra ';' after the "return" because that will cause
1446 * some compilers to complain about unreachable statements.
1447 */
1448#ifndef yyterminate
1449#define yyterminate() return YY_NULL
1450#endif
1451
1452/* Number of entries by which start-condition stack grows. */
1453#ifndef YY_START_STACK_INCR
1454#define YY_START_STACK_INCR 25
1455#endif
1456
1457/* Report a fatal error. */
1458#ifndef YY_FATAL_ERROR
1459/* %if-c-only */
1460#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1461/* %endif */
1462/* %if-c++-only */
1463/* %endif */
1464#endif
1465
1466/* %if-tables-serialization structures and prototypes */
1467/* %not-for-header */
1468/* %ok-for-header */
1469
1470/* %not-for-header */
1471/* %tables-yydmap generated elements */
1472/* %endif */
1473/* end tables serialization structures and prototypes */
1474
1475/* %ok-for-header */
1476
1477/* Default declaration of generated scanner - a define so the user can
1478 * easily add parameters.
1479 */
1480#ifndef YY_DECL
1481#define YY_DECL_IS_OURS 1
1482/* %if-c-only Standard (non-C++) definition */
1483
1484extern int yylex (void);
1485
1486#define YY_DECL int yylex (void)
1487/* %endif */
1488/* %if-c++-only C++ definition */
1489/* %endif */
1490#endif /* !YY_DECL */
1491
1492/* Code executed at the beginning of each rule, after yytext and yyleng
1493 * have been set up.
1494 */
1495#ifndef YY_USER_ACTION
1496#define YY_USER_ACTION
1497#endif
1498
1499/* Code executed at the end of each rule. */
1500#ifndef YY_BREAK
1501#define YY_BREAK /*LINTED*/break;
1502#endif
1503
1504/* %% [6.0] YY_RULE_SETUP definition goes here */
1505#define YY_RULE_SETUP \
1506 YY_USER_ACTION
1507
1508/* %not-for-header */
1512{
1513 yy_state_type yy_current_state;
1514 char *yy_cp, *yy_bp;
1516
1517 if ( !(yy_init) )
1518 {
1519 (yy_init) = 1;
1520
1521#ifdef YY_USER_INIT
1522 YY_USER_INIT;
1523#endif
1524
1525 if ( ! (yy_start) )
1526 (yy_start) = 1; /* first start state */
1527
1528 if ( ! yyin )
1529/* %if-c-only */
1530 yyin = stdin;
1531/* %endif */
1532/* %if-c++-only */
1533/* %endif */
1534
1535 if ( ! yyout )
1536/* %if-c-only */
1537 yyout = stdout;
1538/* %endif */
1539/* %if-c++-only */
1540/* %endif */
1541
1542 if ( ! YY_CURRENT_BUFFER ) {
1546 }
1547
1549 }
1550
1551 {
1552/* %% [7.0] user's declarations go here */
1553#line 107 "d2_lexer.ll"
1554
1555
1556
1557#line 111 "d2_lexer.ll"
1558 /* This part of the code is copied over to the verbatim to the top
1559 of the generated yylex function. Explanation:
1560 http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
1561
1562 /* Code run each time yylex is called. */
1563 driver.loc_.step();
1564
1565 if (start_token_flag) {
1566 start_token_flag = false;
1567 switch (start_token_value) {
1569 default:
1570 return isc::d2::D2Parser::make_TOPLEVEL_JSON(driver.loc_);
1574 return isc::d2::D2Parser::make_SUB_DHCPDDNS(driver.loc_);
1576 return isc::d2::D2Parser::make_SUB_TSIG_KEY(driver.loc_);
1578 return isc::d2::D2Parser::make_SUB_TSIG_KEYS(driver.loc_);
1580 return isc::d2::D2Parser::make_SUB_DDNS_DOMAIN(driver.loc_);
1582 return isc::d2::D2Parser::make_SUB_DDNS_DOMAINS(driver.loc_);
1584 return isc::d2::D2Parser::make_SUB_DNS_SERVER(driver.loc_);
1587 }
1588 }
1589
1590
1591#line 1591 "d2_lexer.cc"
1592
1593 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1594 {
1595/* %% [8.0] yymore()-related code goes here */
1596 yy_cp = (yy_c_buf_p);
1597
1598 /* Support of yytext. */
1599 *yy_cp = (yy_hold_char);
1600
1601 /* yy_bp points to the position in yy_ch_buf of the start of
1602 * the current run.
1603 */
1604 yy_bp = yy_cp;
1605
1606/* %% [9.0] code to set up and find next match goes here */
1607 yy_current_state = (yy_start);
1608yy_match:
1609 do
1610 {
1611 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1612 if ( yy_accept[yy_current_state] )
1613 {
1614 (yy_last_accepting_state) = yy_current_state;
1615 (yy_last_accepting_cpos) = yy_cp;
1616 }
1617 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1618 {
1619 yy_current_state = (int) yy_def[yy_current_state];
1620 if ( yy_current_state >= 579 )
1621 yy_c = yy_meta[yy_c];
1622 }
1623 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1624 ++yy_cp;
1625 }
1626 while ( yy_current_state != 578 );
1627 yy_cp = (yy_last_accepting_cpos);
1628 yy_current_state = (yy_last_accepting_state);
1629
1630yy_find_action:
1631/* %% [10.0] code to find the action number goes here */
1632 yy_act = yy_accept[yy_current_state];
1633
1635
1636/* %% [11.0] code for yylineno update goes here */
1637
1638do_action: /* This label is used only to access EOF actions. */
1639
1640/* %% [12.0] debug code goes here */
1641 if ( yy_flex_debug )
1642 {
1643 if ( yy_act == 0 )
1644 fprintf( stderr, "--scanner backing up\n" );
1645 else if ( yy_act < 92 )
1646 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1647 (long)yy_rule_linenum[yy_act], yytext );
1648 else if ( yy_act == 92 )
1649 fprintf( stderr, "--accepting default rule (\"%s\")\n",
1650 yytext );
1651 else if ( yy_act == 93 )
1652 fprintf( stderr, "--(end of buffer or a NUL)\n" );
1653 else
1654 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1655 }
1656
1657 switch ( yy_act )
1658 { /* beginning of action switch */
1659/* %% [13.0] actions go here */
1660 case 0: /* must back up */
1661 /* undo the effects of YY_DO_BEFORE_ACTION */
1662 *yy_cp = (yy_hold_char);
1663 yy_cp = (yy_last_accepting_cpos);
1664 yy_current_state = (yy_last_accepting_state);
1665 goto yy_find_action;
1666
1667case 1:
1669#line 144 "d2_lexer.ll"
1670;
1671 YY_BREAK
1672case 2:
1674#line 146 "d2_lexer.ll"
1675;
1676 YY_BREAK
1677case 3:
1679#line 148 "d2_lexer.ll"
1680{
1681 BEGIN(COMMENT);
1682 comment_start_line = driver.loc_.end.line;;
1683}
1684 YY_BREAK
1685case 4:
1687#line 153 "d2_lexer.ll"
1688BEGIN(INITIAL);
1689 YY_BREAK
1690case 5:
1692#line 154 "d2_lexer.ll"
1693;
1694 YY_BREAK
1695case YY_STATE_EOF(COMMENT):
1696#line 155 "d2_lexer.ll"
1697{
1698 isc_throw(D2ParseError, "Comment not closed. (/* in line " << comment_start_line);
1699}
1700 YY_BREAK
1701case 6:
1703#line 159 "d2_lexer.ll"
1705 YY_BREAK
1706case 7:
1708#line 160 "d2_lexer.ll"
1710 YY_BREAK
1711case 8:
1713#line 161 "d2_lexer.ll"
1714{
1715 /* Include directive. */
1716
1717 /* Extract the filename. */
1718 std::string tmp(yytext+1);
1719 tmp.resize(tmp.size() - 1);
1720
1721 driver.includeFile(tmp);
1722}
1723 YY_BREAK
1727#line 170 "d2_lexer.ll"
1728{
1729 isc_throw(D2ParseError, "Directive not closed.");
1730}
1731 YY_BREAK
1732case 9:
1734#line 173 "d2_lexer.ll"
1735BEGIN(INITIAL);
1736 YY_BREAK
1737case 10:
1739#line 176 "d2_lexer.ll"
1740{
1741 /* Ok, we found a with space. Let's ignore it and update loc variable. */
1742 driver.loc_.step();
1743}
1744 YY_BREAK
1745case 11:
1746/* rule 11 can match eol */
1748#line 181 "d2_lexer.ll"
1749{
1750 /* Newline found. Let's update the location and continue. */
1751 driver.loc_.lines(yyleng);
1752 driver.loc_.step();
1753}
1754 YY_BREAK
1755case 12:
1757#line 187 "d2_lexer.ll"
1758{
1759 switch(driver.ctx_) {
1761 return isc::d2::D2Parser::make_DHCPDDNS(driver.loc_);
1762 default:
1763 return isc::d2::D2Parser::make_STRING("DhcpDdns", driver.loc_);
1764 }
1765}
1766 YY_BREAK
1767case 13:
1769#line 196 "d2_lexer.ll"
1770{
1771 switch(driver.ctx_) {
1775 return isc::d2::D2Parser::make_IP_ADDRESS(driver.loc_);
1776 default:
1777 return isc::d2::D2Parser::make_STRING("ip-address", driver.loc_);
1778 }
1779}
1780 YY_BREAK
1781case 14:
1783#line 207 "d2_lexer.ll"
1784{
1785 switch(driver.ctx_) {
1789 return isc::d2::D2Parser::make_PORT(driver.loc_);
1790 default:
1791 return isc::d2::D2Parser::make_STRING("port", driver.loc_);
1792 }
1793}
1794 YY_BREAK
1795case 15:
1797#line 218 "d2_lexer.ll"
1798{
1799 switch(driver.ctx_) {
1802 default:
1803 return isc::d2::D2Parser::make_STRING("dns-server-timeout", driver.loc_);
1804 }
1805}
1806 YY_BREAK
1807case 16:
1809#line 227 "d2_lexer.ll"
1810{
1811 switch(driver.ctx_) {
1813 return isc::d2::D2Parser::make_NCR_PROTOCOL(driver.loc_);
1814 default:
1815 return isc::d2::D2Parser::make_STRING("ncr-protocol", driver.loc_);
1816 }
1817}
1818 YY_BREAK
1819case 17:
1821#line 236 "d2_lexer.ll"
1822{
1823 switch(driver.ctx_) {
1825 return isc::d2::D2Parser::make_NCR_FORMAT(driver.loc_);
1826 default:
1827 return isc::d2::D2Parser::make_STRING("ncr-format", driver.loc_);
1828 }
1829}
1830 YY_BREAK
1831case 18:
1833#line 245 "d2_lexer.ll"
1834{
1835 /* dhcp-ddns value keywords are case insensitive */
1836 if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
1837 return isc::d2::D2Parser::make_UDP(driver.loc_);
1838 }
1839 std::string tmp(yytext+1);
1840 tmp.resize(tmp.size() - 1);
1841 return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1842}
1843 YY_BREAK
1844case 19:
1846#line 255 "d2_lexer.ll"
1847{
1848 /* dhcp-ddns value keywords are case insensitive */
1849 if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
1850 return isc::d2::D2Parser::make_TCP(driver.loc_);
1851 }
1852 std::string tmp(yytext+1);
1853 tmp.resize(tmp.size() - 1);
1854 return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1855}
1856 YY_BREAK
1857case 20:
1859#line 265 "d2_lexer.ll"
1860{
1861 /* dhcp-ddns value keywords are case insensitive */
1862 if (driver.ctx_ == isc::d2::D2ParserContext::NCR_FORMAT) {
1863 return isc::d2::D2Parser::make_JSON(driver.loc_);
1864 }
1865 std::string tmp(yytext+1);
1866 tmp.resize(tmp.size() - 1);
1867 return isc::d2::D2Parser::make_STRING(tmp, driver.loc_);
1868}
1869 YY_BREAK
1870case 21:
1872#line 275 "d2_lexer.ll"
1873{
1874 switch(driver.ctx_) {
1886 return isc::d2::D2Parser::make_USER_CONTEXT(driver.loc_);
1887 default:
1888 return isc::d2::D2Parser::make_STRING("user-context", driver.loc_);
1889 }
1890}
1891 YY_BREAK
1892case 22:
1894#line 294 "d2_lexer.ll"
1895{
1896 switch(driver.ctx_) {
1908 return isc::d2::D2Parser::make_COMMENT(driver.loc_);
1909 default:
1910 return isc::d2::D2Parser::make_STRING("comment", driver.loc_);
1911 }
1912}
1913 YY_BREAK
1914case 23:
1916#line 313 "d2_lexer.ll"
1917{
1918 switch(driver.ctx_) {
1920 return isc::d2::D2Parser::make_FORWARD_DDNS(driver.loc_);
1921 default:
1922 return isc::d2::D2Parser::make_STRING("forward-ddns", driver.loc_);
1923 }
1924}
1925 YY_BREAK
1926case 24:
1928#line 322 "d2_lexer.ll"
1929{
1930 switch(driver.ctx_) {
1932 return isc::d2::D2Parser::make_REVERSE_DDNS(driver.loc_);
1933 default:
1934 return isc::d2::D2Parser::make_STRING("reverse-ddns", driver.loc_);
1935 }
1936}
1937 YY_BREAK
1938case 25:
1940#line 331 "d2_lexer.ll"
1941{
1942 switch(driver.ctx_) {
1945 return isc::d2::D2Parser::make_DDNS_DOMAINS(driver.loc_);
1946 default:
1947 return isc::d2::D2Parser::make_STRING("ddns-domains", driver.loc_);
1948 }
1949}
1950 YY_BREAK
1951case 26:
1953#line 341 "d2_lexer.ll"
1954{
1955 switch(driver.ctx_) {
1960 return isc::d2::D2Parser::make_KEY_NAME(driver.loc_);
1961 default:
1962 return isc::d2::D2Parser::make_STRING("key-name", driver.loc_);
1963 }
1964}
1965 YY_BREAK
1966case 27:
1968#line 353 "d2_lexer.ll"
1969{
1970 switch(driver.ctx_) {
1973 return isc::d2::D2Parser::make_DNS_SERVERS(driver.loc_);
1974 default:
1975 return isc::d2::D2Parser::make_STRING("dns-servers", driver.loc_);
1976 }
1977}
1978 YY_BREAK
1979case 28:
1981#line 363 "d2_lexer.ll"
1982{
1983 switch(driver.ctx_) {
1986 return isc::d2::D2Parser::make_HOSTNAME(driver.loc_);
1987 default:
1988 return isc::d2::D2Parser::make_STRING("hostname", driver.loc_);
1989 }
1990}
1991 YY_BREAK
1992case 29:
1994#line 374 "d2_lexer.ll"
1995{
1996 switch(driver.ctx_) {
1998 return isc::d2::D2Parser::make_TSIG_KEYS(driver.loc_);
1999 default:
2000 return isc::d2::D2Parser::make_STRING("tsig-keys", driver.loc_);
2001 }
2002}
2003 YY_BREAK
2004case 30:
2006#line 383 "d2_lexer.ll"
2007{
2008 switch(driver.ctx_) {
2011 return isc::d2::D2Parser::make_ALGORITHM(driver.loc_);
2012 default:
2013 return isc::d2::D2Parser::make_STRING("algorithm", driver.loc_);
2014 }
2015}
2016 YY_BREAK
2017case 31:
2019#line 393 "d2_lexer.ll"
2020{
2021 switch(driver.ctx_) {
2024 return isc::d2::D2Parser::make_DIGEST_BITS(driver.loc_);
2025 default:
2026 return isc::d2::D2Parser::make_STRING("digest-bits", driver.loc_);
2027 }
2028}
2029 YY_BREAK
2030case 32:
2032#line 403 "d2_lexer.ll"
2033{
2034 switch(driver.ctx_) {
2037 return isc::d2::D2Parser::make_SECRET(driver.loc_);
2038 default:
2039 return isc::d2::D2Parser::make_STRING("secret", driver.loc_);
2040 }
2041}
2042 YY_BREAK
2043case 33:
2045#line 413 "d2_lexer.ll"
2046{
2047 switch(driver.ctx_) {
2050 return isc::d2::D2Parser::make_SECRET_FILE(driver.loc_);
2051 default:
2052 return isc::d2::D2Parser::make_STRING("secret-file", driver.loc_);
2053 }
2054}
2055 YY_BREAK
2056case 34:
2058#line 423 "d2_lexer.ll"
2059{
2060 switch(driver.ctx_) {
2062 return isc::d2::D2Parser::make_CONTROL_SOCKETS(driver.loc_);
2063 default:
2064 return isc::d2::D2Parser::make_STRING("control-sockets", driver.loc_);
2065 }
2066}
2067 YY_BREAK
2068case 35:
2070#line 432 "d2_lexer.ll"
2071{
2072 switch(driver.ctx_) {
2074 return isc::d2::D2Parser::make_SOCKET_TYPE(driver.loc_);
2075 default:
2076 return isc::d2::D2Parser::make_STRING("socket-type", driver.loc_);
2077 }
2078}
2079 YY_BREAK
2080case 36:
2082#line 441 "d2_lexer.ll"
2083{
2084 switch(driver.ctx_) {
2086 return isc::d2::D2Parser::make_UNIX(driver.loc_);
2087 default:
2088 return isc::d2::D2Parser::make_STRING("unix", driver.loc_);
2089 }
2090}
2091 YY_BREAK
2092case 37:
2094#line 450 "d2_lexer.ll"
2095{
2096 switch(driver.ctx_) {
2098 return isc::d2::D2Parser::make_HTTP(driver.loc_);
2099 default:
2100 return isc::d2::D2Parser::make_STRING("http", driver.loc_);
2101 }
2102}
2103 YY_BREAK
2104case 38:
2106#line 459 "d2_lexer.ll"
2107{
2108 switch(driver.ctx_) {
2110 return isc::d2::D2Parser::make_HTTPS(driver.loc_);
2111 default:
2112 return isc::d2::D2Parser::make_STRING("https", driver.loc_);
2113 }
2114}
2115 YY_BREAK
2116case 39:
2118#line 468 "d2_lexer.ll"
2119{
2120 switch(driver.ctx_) {
2122 return isc::d2::D2Parser::make_SOCKET_NAME(driver.loc_);
2123 default:
2124 return isc::d2::D2Parser::make_STRING("socket-name", driver.loc_);
2125 }
2126}
2127 YY_BREAK
2128case 40:
2130#line 477 "d2_lexer.ll"
2131{
2132 switch(driver.ctx_) {
2134 return isc::d2::D2Parser::make_SOCKET_ADDRESS(driver.loc_);
2135 default:
2136 return isc::d2::D2Parser::make_STRING("socket-address", driver.loc_);
2137 }
2138}
2139 YY_BREAK
2140case 41:
2142#line 486 "d2_lexer.ll"
2143{
2144 switch(driver.ctx_) {
2146 return isc::d2::D2Parser::make_SOCKET_PORT(driver.loc_);
2147 default:
2148 return isc::d2::D2Parser::make_STRING("socket-port", driver.loc_);
2149 }
2150}
2151 YY_BREAK
2152case 42:
2154#line 495 "d2_lexer.ll"
2155{
2156 switch(driver.ctx_) {
2158 return isc::d2::D2Parser::make_AUTHENTICATION(driver.loc_);
2159 default:
2160 return isc::d2::D2Parser::make_STRING("authentication", driver.loc_);
2161 }
2162}
2163 YY_BREAK
2164case 43:
2166#line 504 "d2_lexer.ll"
2167{
2168 switch(driver.ctx_) {
2170 return isc::d2::D2Parser::make_TYPE(driver.loc_);
2171 default:
2172 return isc::d2::D2Parser::make_STRING("type", driver.loc_);
2173 }
2174}
2175 YY_BREAK
2176case 44:
2178#line 513 "d2_lexer.ll"
2179{
2180 switch(driver.ctx_) {
2182 return isc::d2::D2Parser::make_BASIC(driver.loc_);
2183 default:
2184 return isc::d2::D2Parser::make_STRING("basic", driver.loc_);
2185 }
2186}
2187 YY_BREAK
2188case 45:
2190#line 522 "d2_lexer.ll"
2191{
2192 switch(driver.ctx_) {
2194 return isc::d2::D2Parser::make_REALM(driver.loc_);
2195 default:
2196 return isc::d2::D2Parser::make_STRING("realm", driver.loc_);
2197 }
2198}
2199 YY_BREAK
2200case 46:
2202#line 531 "d2_lexer.ll"
2203{
2204 switch(driver.ctx_) {
2206 return isc::d2::D2Parser::make_DIRECTORY(driver.loc_);
2207 default:
2208 return isc::d2::D2Parser::make_STRING("directory", driver.loc_);
2209 }
2210}
2211 YY_BREAK
2212case 47:
2214#line 540 "d2_lexer.ll"
2215{
2216 switch(driver.ctx_) {
2218 return isc::d2::D2Parser::make_CLIENTS(driver.loc_);
2219 default:
2220 return isc::d2::D2Parser::make_STRING("clients", driver.loc_);
2221 }
2222}
2223 YY_BREAK
2224case 48:
2226#line 549 "d2_lexer.ll"
2227{
2228 switch(driver.ctx_) {
2230 return isc::d2::D2Parser::make_USER(driver.loc_);
2231 default:
2232 return isc::d2::D2Parser::make_STRING("user", driver.loc_);
2233 }
2234}
2235 YY_BREAK
2236case 49:
2238#line 558 "d2_lexer.ll"
2239{
2240 switch(driver.ctx_) {
2242 return isc::d2::D2Parser::make_USER_FILE(driver.loc_);
2243 default:
2244 return isc::d2::D2Parser::make_STRING("user-file", driver.loc_);
2245 }
2246}
2247 YY_BREAK
2248case 50:
2250#line 567 "d2_lexer.ll"
2251{
2252 switch(driver.ctx_) {
2254 return isc::d2::D2Parser::make_PASSWORD(driver.loc_);
2255 default:
2256 return isc::d2::D2Parser::make_STRING("password", driver.loc_);
2257 }
2258}
2259 YY_BREAK
2260case 51:
2262#line 576 "d2_lexer.ll"
2263{
2264 switch(driver.ctx_) {
2266 return isc::d2::D2Parser::make_PASSWORD_FILE(driver.loc_);
2267 default:
2268 return isc::d2::D2Parser::make_STRING("password-file", driver.loc_);
2269 }
2270}
2271 YY_BREAK
2272case 52:
2274#line 585 "d2_lexer.ll"
2275{
2276 switch(driver.ctx_) {
2278 return isc::d2::D2Parser::make_TRUST_ANCHOR(driver.loc_);
2279 default:
2280 return isc::d2::D2Parser::make_STRING("trust-anchor", driver.loc_);
2281 }
2282}
2283 YY_BREAK
2284case 53:
2286#line 594 "d2_lexer.ll"
2287{
2288 switch(driver.ctx_) {
2290 return isc::d2::D2Parser::make_CERT_FILE(driver.loc_);
2291 default:
2292 return isc::d2::D2Parser::make_STRING("cert-file", driver.loc_);
2293 }
2294}
2295 YY_BREAK
2296case 54:
2298#line 603 "d2_lexer.ll"
2299{
2300 switch(driver.ctx_) {
2302 return isc::d2::D2Parser::make_KEY_FILE(driver.loc_);
2303 default:
2304 return isc::d2::D2Parser::make_STRING("key-file", driver.loc_);
2305 }
2306}
2307 YY_BREAK
2308case 55:
2310#line 612 "d2_lexer.ll"
2311{
2312 switch(driver.ctx_) {
2314 return isc::d2::D2Parser::make_CERT_REQUIRED(driver.loc_);
2315 default:
2316 return isc::d2::D2Parser::make_STRING("cert-required", driver.loc_);
2317 }
2318}
2319 YY_BREAK
2320case 56:
2322#line 621 "d2_lexer.ll"
2323{
2324 switch(driver.ctx_) {
2326 return isc::d2::D2Parser::make_HOOKS_LIBRARIES(driver.loc_);
2327 default:
2328 return isc::d2::D2Parser::make_STRING("hooks-libraries", driver.loc_);
2329 }
2330}
2331 YY_BREAK
2332case 57:
2334#line 630 "d2_lexer.ll"
2335{
2336 switch(driver.ctx_) {
2338 return isc::d2::D2Parser::make_PARAMETERS(driver.loc_);
2339 default:
2340 return isc::d2::D2Parser::make_STRING("parameters", driver.loc_);
2341 }
2342}
2343 YY_BREAK
2344case 58:
2346#line 639 "d2_lexer.ll"
2347{
2348 switch(driver.ctx_) {
2350 return isc::d2::D2Parser::make_LIBRARY(driver.loc_);
2351 default:
2352 return isc::d2::D2Parser::make_STRING("library", driver.loc_);
2353 }
2354}
2355 YY_BREAK
2356case 59:
2358#line 648 "d2_lexer.ll"
2359{
2360 switch(driver.ctx_) {
2362 return isc::d2::D2Parser::make_LOGGERS(driver.loc_);
2363 default:
2364 return isc::d2::D2Parser::make_STRING("loggers", driver.loc_);
2365 }
2366}
2367 YY_BREAK
2368case 60:
2370#line 657 "d2_lexer.ll"
2371{
2372 switch(driver.ctx_) {
2374 return isc::d2::D2Parser::make_OUTPUT_OPTIONS(driver.loc_);
2375 default:
2376 return isc::d2::D2Parser::make_STRING("output_options", driver.loc_);
2377 }
2378}
2379 YY_BREAK
2380case 61:
2382#line 666 "d2_lexer.ll"
2383{
2384 switch(driver.ctx_) {
2386 return isc::d2::D2Parser::make_OUTPUT_OPTIONS(driver.loc_);
2387 default:
2388 return isc::d2::D2Parser::make_STRING("output-options", driver.loc_);
2389 }
2390}
2391 YY_BREAK
2392case 62:
2394#line 675 "d2_lexer.ll"
2395{
2396 switch(driver.ctx_) {
2398 return isc::d2::D2Parser::make_OUTPUT(driver.loc_);
2399 default:
2400 return isc::d2::D2Parser::make_STRING("output", driver.loc_);
2401 }
2402}
2403 YY_BREAK
2404case 63:
2406#line 684 "d2_lexer.ll"
2407{
2408 switch(driver.ctx_) {
2410 return isc::d2::D2Parser::make_FLUSH(driver.loc_);
2411 default:
2412 return isc::d2::D2Parser::make_STRING("flush", driver.loc_);
2413 }
2414}
2415 YY_BREAK
2416case 64:
2418#line 693 "d2_lexer.ll"
2419{
2420 switch(driver.ctx_) {
2422 return isc::d2::D2Parser::make_MAXSIZE(driver.loc_);
2423 default:
2424 return isc::d2::D2Parser::make_STRING("maxsize", driver.loc_);
2425 }
2426}
2427 YY_BREAK
2428case 65:
2430#line 702 "d2_lexer.ll"
2431{
2432 switch(driver.ctx_) {
2434 return isc::d2::D2Parser::make_MAXVER(driver.loc_);
2435 default:
2436 return isc::d2::D2Parser::make_STRING("maxver", driver.loc_);
2437 }
2438}
2439 YY_BREAK
2440case 66:
2442#line 711 "d2_lexer.ll"
2443{
2444 switch(driver.ctx_) {
2446 return isc::d2::D2Parser::make_PATTERN(driver.loc_);
2447 default:
2448 return isc::d2::D2Parser::make_STRING("pattern", driver.loc_);
2449 }
2450}
2451 YY_BREAK
2452case 67:
2454#line 720 "d2_lexer.ll"
2455{
2456 switch(driver.ctx_) {
2462 return isc::d2::D2Parser::make_NAME(driver.loc_);
2463 default:
2464 return isc::d2::D2Parser::make_STRING("name", driver.loc_);
2465 }
2466}
2467 YY_BREAK
2468case 68:
2470#line 733 "d2_lexer.ll"
2471{
2472 switch(driver.ctx_) {
2474 return isc::d2::D2Parser::make_DEBUGLEVEL(driver.loc_);
2475 default:
2476 return isc::d2::D2Parser::make_STRING("debuglevel", driver.loc_);
2477 }
2478}
2479 YY_BREAK
2480case 69:
2482#line 742 "d2_lexer.ll"
2483{
2484 switch(driver.ctx_) {
2486 return isc::d2::D2Parser::make_SEVERITY(driver.loc_);
2487 default:
2488 return isc::d2::D2Parser::make_STRING("severity", driver.loc_);
2489 }
2490}
2491 YY_BREAK
2492case 70:
2494#line 751 "d2_lexer.ll"
2495{
2496 /* A string has been matched. It contains the actual string and single quotes.
2497 We need to get those quotes out of the way and just use its content, e.g.
2498 for 'foo' we should get foo */
2499 std::string raw(yytext+1);
2500 size_t len = raw.size() - 1;
2501 raw.resize(len);
2502 std::string decoded;
2503 decoded.reserve(len);
2504 for (size_t pos = 0; pos < len; ++pos) {
2505 int b = 0;
2506 char c = raw[pos];
2507 switch (c) {
2508 case '"':
2509 /* impossible condition */
2510 driver.error(driver.loc_, "Bad quote in \"" + raw + "\"");
2511 break;
2512 case '\\':
2513 ++pos;
2514 if (pos >= len) {
2515 /* impossible condition */
2516 driver.error(driver.loc_, "Overflow escape in \"" + raw + "\"");
2517 }
2518 c = raw[pos];
2519 switch (c) {
2520 case '"':
2521 case '\\':
2522 case '/':
2523 decoded.push_back(c);
2524 break;
2525 case 'b':
2526 decoded.push_back('\b');
2527 break;
2528 case 'f':
2529 decoded.push_back('\f');
2530 break;
2531 case 'n':
2532 decoded.push_back('\n');
2533 break;
2534 case 'r':
2535 decoded.push_back('\r');
2536 break;
2537 case 't':
2538 decoded.push_back('\t');
2539 break;
2540 case 'u':
2541 /* support only \u0000 to \u00ff */
2542 ++pos;
2543 if (pos + 4 > len) {
2544 /* impossible condition */
2545 driver.error(driver.loc_,
2546 "Overflow unicode escape in \"" + raw + "\"");
2547 }
2548 if ((raw[pos] != '0') || (raw[pos + 1] != '0')) {
2549 driver.error(driver.loc_,
2550 "Unsupported unicode escape in \"" + raw + "\"",
2551 pos + 1);
2552 }
2553 pos += 2;
2554 c = raw[pos];
2555 if ((c >= '0') && (c <= '9')) {
2556 b = (c - '0') << 4;
2557 } else if ((c >= 'A') && (c <= 'F')) {
2558 b = (c - 'A' + 10) << 4;
2559 } else if ((c >= 'a') && (c <= 'f')) {
2560 b = (c - 'a' + 10) << 4;
2561 } else {
2562 /* impossible condition */
2563 driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2564 }
2565 pos++;
2566 c = raw[pos];
2567 if ((c >= '0') && (c <= '9')) {
2568 b |= c - '0';
2569 } else if ((c >= 'A') && (c <= 'F')) {
2570 b |= c - 'A' + 10;
2571 } else if ((c >= 'a') && (c <= 'f')) {
2572 b |= c - 'a' + 10;
2573 } else {
2574 /* impossible condition */
2575 driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
2576 }
2577 decoded.push_back(static_cast<char>(b & 0xff));
2578 break;
2579 default:
2580 /* impossible condition */
2581 driver.error(driver.loc_, "Bad escape in \"" + raw + "\"");
2582 }
2583 break;
2584 default:
2585 if ((c >= 0) && (c < 0x20)) {
2586 /* impossible condition */
2587 driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
2588 }
2589 decoded.push_back(c);
2590 }
2591 }
2592
2593 return isc::d2::D2Parser::make_STRING(decoded, driver.loc_);
2594}
2595 YY_BREAK
2596case 71:
2597/* rule 71 can match eol */
2599#line 852 "d2_lexer.ll"
2600{
2601 /* Bad string with a forbidden control character inside */
2602 std::string raw(yytext+1, yyleng-1);
2603 size_t len = raw.size() - 1;
2604 size_t pos = 0;
2605 for (; pos < len; ++pos) {
2606 char c = raw[pos];
2607 if ((c >= 0) && (c < 0x20)) {
2608 break;
2609 }
2610 }
2611 driver.error(driver.loc_,
2612 "Invalid control in " + std::string(yytext, yyleng),
2613 pos + 1);
2614}
2615 YY_BREAK
2616case 72:
2617/* rule 72 can match eol */
2619#line 868 "d2_lexer.ll"
2620{
2621 /* Bad string with a bad escape inside */
2622 std::string raw(yytext+1, yyleng-1);
2623 size_t len = raw.size() - 1;
2624 size_t pos = 0;
2625 bool found = false;
2626 for (; pos < len; ++pos) {
2627 if (found) {
2628 break;
2629 }
2630 char c = raw[pos];
2631 if (c == '\\') {
2632 ++pos;
2633 c = raw[pos];
2634 switch (c) {
2635 case '"':
2636 case '\\':
2637 case '/':
2638 case 'b':
2639 case 'f':
2640 case 'n':
2641 case 'r':
2642 case 't':
2643 break;
2644 case 'u':
2645 if ((pos + 4 > len) ||
2646 !std::isxdigit(raw[pos + 1]) ||
2647 !std::isxdigit(raw[pos + 2]) ||
2648 !std::isxdigit(raw[pos + 3]) ||
2649 !std::isxdigit(raw[pos + 4])) {
2650 found = true;
2651 }
2652 break;
2653 default:
2654 found = true;
2655 break;
2656 }
2657 }
2658 }
2659 /* The rule stops on the first " including on \" so add ... in this case */
2660 std::string trailer = "";
2661 if (raw[len - 1] == '\\') {
2662 trailer = "...";
2663 }
2664 driver.error(driver.loc_,
2665 "Bad escape in " + std::string(yytext, yyleng) + trailer,
2666 pos);
2667}
2668 YY_BREAK
2669case 73:
2671#line 917 "d2_lexer.ll"
2672{
2673 /* Bad string with an open escape at the end */
2674 std::string raw(yytext+1);
2675 driver.error(driver.loc_,
2676 "Overflow escape in " + std::string(yytext),
2677 raw.size() + 1);
2678}
2679 YY_BREAK
2680case 74:
2682#line 925 "d2_lexer.ll"
2683{
2684 /* Bad string with an open unicode escape at the end */
2685 std::string raw(yytext+1);
2686 size_t pos = raw.size() - 1;
2687 for (; pos > 0; --pos) {
2688 char c = raw[pos];
2689 if (c == 'u') {
2690 break;
2691 }
2692 }
2693 driver.error(driver.loc_,
2694 "Overflow unicode escape in " + std::string(yytext),
2695 pos + 1);
2696}
2697 YY_BREAK
2698case 75:
2700#line 940 "d2_lexer.ll"
2701{ return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
2702 YY_BREAK
2703case 76:
2705#line 941 "d2_lexer.ll"
2706{ return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
2707 YY_BREAK
2708case 77:
2710#line 942 "d2_lexer.ll"
2711{ return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
2712 YY_BREAK
2713case 78:
2715#line 943 "d2_lexer.ll"
2716{ return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
2717 YY_BREAK
2718case 79:
2720#line 944 "d2_lexer.ll"
2721{ return isc::d2::D2Parser::make_COMMA(driver.loc_); }
2722 YY_BREAK
2723case 80:
2725#line 945 "d2_lexer.ll"
2726{ return isc::d2::D2Parser::make_COLON(driver.loc_); }
2727 YY_BREAK
2728case 81:
2730#line 947 "d2_lexer.ll"
2731{
2732 /* Integer with leading zeros. */
2733 std::string tmp(yytext);
2734 int64_t integer = 0;
2735 try {
2736 /* In substring we want to use negative values (e.g. -1).
2737 In enterprise-id we need to use values up to 0xffffffff.
2738 To cover both of those use cases, we need at least
2739 int64_t. */
2740 integer = boost::lexical_cast<int64_t>(tmp);
2741 } catch (const boost::bad_lexical_cast &) {
2742 driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
2743 }
2744
2745 driver.warning(driver.loc_, "leading zeros in integers will be deprecated.");
2746
2747 return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
2748}
2749 YY_BREAK
2750case 82:
2752#line 966 "d2_lexer.ll"
2753{
2754 /* An integer was found. */
2755 std::string tmp(yytext);
2756 int64_t integer = 0;
2757 try {
2758 /* In substring we want to use negative values (e.g. -1).
2759 In enterprise-id we need to use values up to 0xffffffff.
2760 To cover both of those use cases, we need at least
2761 int64_t. */
2762 integer = boost::lexical_cast<int64_t>(tmp);
2763 } catch (const boost::bad_lexical_cast &) {
2764 driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
2765 }
2766
2767 return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
2768}
2769 YY_BREAK
2770case 83:
2772#line 983 "d2_lexer.ll"
2773{
2774 /* A plus sign was found */
2775 std::string tmp(yytext);
2776 driver.error(driver.loc_, "Deprecated plus sign in " + tmp + " number.");
2777}
2778 YY_BREAK
2779case 84:
2781#line 989 "d2_lexer.ll"
2782{
2783 /* Floating point with leading zeros. */
2784 std::string tmp(yytext);
2785 double fp = 0.0;
2786 try {
2787 fp = boost::lexical_cast<double>(tmp);
2788 } catch (const boost::bad_lexical_cast &) {
2789 driver.error(driver.loc_, "Failed to convert " + tmp + " to a floating point.");
2790 }
2791
2792 driver.warning(driver.loc_, "leading zeros in numbers will be deprecated.");
2793
2794 return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
2795}
2796 YY_BREAK
2797case 85:
2799#line 1004 "d2_lexer.ll"
2800{
2801 /* A floating point was found. */
2802 std::string tmp(yytext);
2803 double fp = 0.0;
2804 try {
2805 fp = boost::lexical_cast<double>(tmp);
2806 } catch (const boost::bad_lexical_cast &) {
2807 driver.error(driver.loc_, "Failed to convert " + tmp + " to a floating point.");
2808 }
2809
2810 return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
2811}
2812 YY_BREAK
2813case 86:
2815#line 1017 "d2_lexer.ll"
2816{
2817 string tmp(yytext);
2818 return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
2819}
2820 YY_BREAK
2821case 87:
2823#line 1022 "d2_lexer.ll"
2824{
2825 return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
2826}
2827 YY_BREAK
2828case 88:
2830#line 1026 "d2_lexer.ll"
2831driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
2832 YY_BREAK
2833case 89:
2835#line 1028 "d2_lexer.ll"
2836driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
2837 YY_BREAK
2838case 90:
2840#line 1030 "d2_lexer.ll"
2841driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
2842 YY_BREAK
2843case 91:
2845#line 1032 "d2_lexer.ll"
2846driver.error (driver.loc_, "Invalid character: " + std::string(yytext, yyleng));
2847 YY_BREAK
2848case YY_STATE_EOF(INITIAL):
2849#line 1034 "d2_lexer.ll"
2850{
2851 if (driver.states_.empty()) {
2852 return isc::d2::D2Parser::make_END(driver.loc_);
2853 }
2854 driver.loc_ = driver.locs_.back();
2855 driver.locs_.pop_back();
2856 driver.file_ = driver.files_.back();
2857 driver.files_.pop_back();
2858 if (driver.sfile_) {
2859 fclose(driver.sfile_);
2860 driver.sfile_ = 0;
2861 }
2862 if (!driver.sfiles_.empty()) {
2863 driver.sfile_ = driver.sfiles_.back();
2864 driver.sfiles_.pop_back();
2865 }
2866 d2_parser__delete_buffer(YY_CURRENT_BUFFER);
2867 d2_parser__switch_to_buffer(driver.states_.back());
2868 driver.states_.pop_back();
2869
2870 BEGIN(DIR_EXIT);
2871}
2872 YY_BREAK
2873case 92:
2875#line 1057 "d2_lexer.ll"
2876ECHO;
2877 YY_BREAK
2878#line 2878 "d2_lexer.cc"
2879
2880 case YY_END_OF_BUFFER:
2881 {
2882 /* Amount of text matched not including the EOB char. */
2883 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2884
2885 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2886 *yy_cp = (yy_hold_char);
2888
2889 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2890 {
2891 /* We're scanning a new file or input source. It's
2892 * possible that this happened because the user
2893 * just pointed yyin at a new source and called
2894 * yylex(). If so, then we have to assure
2895 * consistency between YY_CURRENT_BUFFER and our
2896 * globals. Here is the right place to do so, because
2897 * this is the first action (other than possibly a
2898 * back-up) that will match for the new input source.
2899 */
2900 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2901/* %if-c-only */
2902 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2903/* %endif */
2904/* %if-c++-only */
2905/* %endif */
2906 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2907 }
2908
2909 /* Note that here we test for yy_c_buf_p "<=" to the position
2910 * of the first EOB in the buffer, since yy_c_buf_p will
2911 * already have been incremented past the NUL character
2912 * (since all states make transitions on EOB to the
2913 * end-of-buffer state). Contrast this with the test
2914 * in input().
2915 */
2916 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2917 { /* This was really a NUL. */
2918 yy_state_type yy_next_state;
2919
2920 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2921
2922 yy_current_state = yy_get_previous_state( );
2923
2924 /* Okay, we're now positioned to make the NUL
2925 * transition. We couldn't have
2926 * yy_get_previous_state() go ahead and do it
2927 * for us because it doesn't know how to deal
2928 * with the possibility of jamming (and we don't
2929 * want to build jamming into it because then it
2930 * will run more slowly).
2931 */
2932
2933 yy_next_state = yy_try_NUL_trans( yy_current_state );
2934
2936
2937 if ( yy_next_state )
2938 {
2939 /* Consume the NUL. */
2940 yy_cp = ++(yy_c_buf_p);
2941 yy_current_state = yy_next_state;
2942 goto yy_match;
2943 }
2944
2945 else
2946 {
2947/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
2948 yy_cp = (yy_last_accepting_cpos);
2949 yy_current_state = (yy_last_accepting_state);
2950 goto yy_find_action;
2951 }
2952 }
2953
2954 else switch ( yy_get_next_buffer( ) )
2955 {
2957 {
2958 (yy_did_buffer_switch_on_eof) = 0;
2959
2960 if ( yywrap( ) )
2961 {
2962 /* Note: because we've taken care in
2963 * yy_get_next_buffer() to have set up
2964 * yytext, we can now set up
2965 * yy_c_buf_p so that if some total
2966 * hoser (like flex itself) wants to
2967 * call the scanner after we return the
2968 * YY_NULL, it'll still work - another
2969 * YY_NULL will get returned.
2970 */
2971 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2972
2974 goto do_action;
2975 }
2976
2977 else
2978 {
2979 if ( ! (yy_did_buffer_switch_on_eof) )
2981 }
2982 break;
2983 }
2984
2986 (yy_c_buf_p) =
2987 (yytext_ptr) + yy_amount_of_matched_text;
2988
2989 yy_current_state = yy_get_previous_state( );
2990
2991 yy_cp = (yy_c_buf_p);
2993 goto yy_match;
2994
2995 case EOB_ACT_LAST_MATCH:
2996 (yy_c_buf_p) =
2997 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2998
2999 yy_current_state = yy_get_previous_state( );
3000
3001 yy_cp = (yy_c_buf_p);
3003 goto yy_find_action;
3004 }
3005 break;
3006 }
3007
3008 default:
3010 "fatal flex scanner internal error--no action found" );
3011 } /* end of action switch */
3012 } /* end of scanning one token */
3013 } /* end of user's declarations */
3014} /* end of yylex */
3015/* %ok-for-header */
3016
3017/* %if-c++-only */
3018/* %not-for-header */
3019/* %ok-for-header */
3020
3021/* %endif */
3022
3023/* yy_get_next_buffer - try to read in a new buffer
3024 *
3025 * Returns a code representing an action:
3026 * EOB_ACT_LAST_MATCH -
3027 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3028 * EOB_ACT_END_OF_FILE - end of file
3029 */
3030/* %if-c-only */
3031static int yy_get_next_buffer (void)
3032/* %endif */
3033/* %if-c++-only */
3034/* %endif */
3035{
3036 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3037 char *source = (yytext_ptr);
3038 int number_to_move, i;
3039 int ret_val;
3040
3041 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3043 "fatal flex scanner internal error--end of buffer missed" );
3044
3045 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3046 { /* Don't try to fill the buffer, so this is an EOF. */
3047 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3048 {
3049 /* We matched a single character, the EOB, so
3050 * treat this as a final EOF.
3051 */
3052 return EOB_ACT_END_OF_FILE;
3053 }
3054
3055 else
3056 {
3057 /* We matched some text prior to the EOB, first
3058 * process it.
3059 */
3060 return EOB_ACT_LAST_MATCH;
3061 }
3062 }
3063
3064 /* Try to read more data. */
3065
3066 /* First move last chars to start of buffer. */
3067 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
3068
3069 for ( i = 0; i < number_to_move; ++i )
3070 *(dest++) = *(source++);
3071
3072 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3073 /* don't do the read, it's not guaranteed to return an EOF,
3074 * just force an EOF
3075 */
3076 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3077
3078 else
3079 {
3080 int num_to_read =
3081 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3082
3083 while ( num_to_read <= 0 )
3084 { /* Not enough room in the buffer - grow it. */
3085
3086 /* just a shorter name for the current buffer */
3088
3089 int yy_c_buf_p_offset =
3090 (int) ((yy_c_buf_p) - b->yy_ch_buf);
3091
3092 if ( b->yy_is_our_buffer )
3093 {
3094 int new_size = b->yy_buf_size * 2;
3095
3096 if ( new_size <= 0 )
3097 b->yy_buf_size += b->yy_buf_size / 8;
3098 else
3099 b->yy_buf_size *= 2;
3100
3101 b->yy_ch_buf = (char *)
3102 /* Include room in for 2 EOB chars. */
3103 yyrealloc( (void *) b->yy_ch_buf,
3104 (yy_size_t) (b->yy_buf_size + 2) );
3105 }
3106 else
3107 /* Can't grow it, we don't own it. */
3108 b->yy_ch_buf = NULL;
3109
3110 if ( ! b->yy_ch_buf )
3112 "fatal error - scanner input buffer overflow" );
3113
3114 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
3115
3116 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3117 number_to_move - 1;
3118
3119 }
3120
3121 if ( num_to_read > YY_READ_BUF_SIZE )
3122 num_to_read = YY_READ_BUF_SIZE;
3123
3124 /* Read in more data. */
3125 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3126 (yy_n_chars), num_to_read );
3127
3128 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3129 }
3130
3131 if ( (yy_n_chars) == 0 )
3132 {
3133 if ( number_to_move == YY_MORE_ADJ )
3134 {
3135 ret_val = EOB_ACT_END_OF_FILE;
3136 yyrestart( yyin );
3137 }
3138
3139 else
3140 {
3141 ret_val = EOB_ACT_LAST_MATCH;
3142 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3144 }
3145 }
3146
3147 else
3148 ret_val = EOB_ACT_CONTINUE_SCAN;
3149
3150 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3151 /* Extend the array by 50%, plus the number we really need. */
3152 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3153 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
3154 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
3155 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3156 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3157 /* "- 2" to take care of EOB's */
3158 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
3159 }
3160
3161 (yy_n_chars) += number_to_move;
3162 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3163 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3164
3165 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3166
3167 return ret_val;
3168}
3169
3170/* yy_get_previous_state - get the state just before the EOB char was reached */
3171
3172/* %if-c-only */
3173/* %not-for-header */
3174 static yy_state_type yy_get_previous_state (void)
3175/* %endif */
3176/* %if-c++-only */
3177/* %endif */
3178{
3179 yy_state_type yy_current_state;
3180 char *yy_cp;
3181
3182/* %% [15.0] code to get the start state into yy_current_state goes here */
3183 yy_current_state = (yy_start);
3184
3185 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3186 {
3187/* %% [16.0] code to find the next state goes here */
3188 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3189 if ( yy_accept[yy_current_state] )
3190 {
3191 (yy_last_accepting_state) = yy_current_state;
3192 (yy_last_accepting_cpos) = yy_cp;
3193 }
3194 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3195 {
3196 yy_current_state = (int) yy_def[yy_current_state];
3197 if ( yy_current_state >= 579 )
3198 yy_c = yy_meta[yy_c];
3199 }
3200 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3201 }
3202
3203 return yy_current_state;
3204}
3205
3206/* yy_try_NUL_trans - try to make a transition on the NUL character
3207 *
3208 * synopsis
3209 * next_state = yy_try_NUL_trans( current_state );
3210 */
3211/* %if-c-only */
3212 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3213/* %endif */
3214/* %if-c++-only */
3215/* %endif */
3216{
3217 int yy_is_jam;
3218 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
3219 char *yy_cp = (yy_c_buf_p);
3220
3221 YY_CHAR yy_c = 1;
3222 if ( yy_accept[yy_current_state] )
3223 {
3224 (yy_last_accepting_state) = yy_current_state;
3225 (yy_last_accepting_cpos) = yy_cp;
3226 }
3227 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3228 {
3229 yy_current_state = (int) yy_def[yy_current_state];
3230 if ( yy_current_state >= 579 )
3231 yy_c = yy_meta[yy_c];
3232 }
3233 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3234 yy_is_jam = (yy_current_state == 578);
3235
3236 return yy_is_jam ? 0 : yy_current_state;
3237}
3238
3239#ifndef YY_NO_UNPUT
3240/* %if-c-only */
3241
3242/* %endif */
3243#endif
3244
3245/* %if-c-only */
3246#ifndef YY_NO_INPUT
3247#ifdef __cplusplus
3248 static int yyinput (void)
3249#else
3250 static int input (void)
3251#endif
3252
3253/* %endif */
3254/* %if-c++-only */
3255/* %endif */
3256{
3257 int c;
3258
3259 *(yy_c_buf_p) = (yy_hold_char);
3260
3261 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3262 {
3263 /* yy_c_buf_p now points to the character we want to return.
3264 * If this occurs *before* the EOB characters, then it's a
3265 * valid NUL; if not, then we've hit the end of the buffer.
3266 */
3267 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3268 /* This was really a NUL. */
3269 *(yy_c_buf_p) = '\0';
3270
3271 else
3272 { /* need more input */
3273 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
3274 ++(yy_c_buf_p);
3275
3276 switch ( yy_get_next_buffer( ) )
3277 {
3278 case EOB_ACT_LAST_MATCH:
3279 /* This happens because yy_g_n_b()
3280 * sees that we've accumulated a
3281 * token and flags that we need to
3282 * try matching the token before
3283 * proceeding. But for input(),
3284 * there's no matching to consider.
3285 * So convert the EOB_ACT_LAST_MATCH
3286 * to EOB_ACT_END_OF_FILE.
3287 */
3288
3289 /* Reset buffer status. */
3290 yyrestart( yyin );
3291
3292 /*FALLTHROUGH*/
3293
3295 {
3296 if ( yywrap( ) )
3297 return 0;
3298
3299 if ( ! (yy_did_buffer_switch_on_eof) )
3301#ifdef __cplusplus
3302 return yyinput();
3303#else
3304 return input();
3305#endif
3306 }
3307
3309 (yy_c_buf_p) = (yytext_ptr) + offset;
3310 break;
3311 }
3312 }
3313 }
3314
3315 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3316 *(yy_c_buf_p) = '\0'; /* preserve yytext */
3317 (yy_hold_char) = *++(yy_c_buf_p);
3318
3319/* %% [19.0] update BOL and yylineno */
3320
3321 return c;
3322}
3323/* %if-c-only */
3324#endif /* ifndef YY_NO_INPUT */
3325/* %endif */
3326
3332/* %if-c-only */
3333 void yyrestart (FILE * input_file )
3334/* %endif */
3335/* %if-c++-only */
3336/* %endif */
3337{
3338
3339 if ( ! YY_CURRENT_BUFFER ){
3343 }
3344
3345 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
3347}
3348
3349/* %if-c++-only */
3350/* %endif */
3351
3356/* %if-c-only */
3358/* %endif */
3359/* %if-c++-only */
3360/* %endif */
3361{
3362
3363 /* TODO. We should be able to replace this entire function body
3364 * with
3365 * yypop_buffer_state();
3366 * yypush_buffer_state(new_buffer);
3367 */
3369 if ( YY_CURRENT_BUFFER == new_buffer )
3370 return;
3371
3372 if ( YY_CURRENT_BUFFER )
3373 {
3374 /* Flush out information for old buffer. */
3375 *(yy_c_buf_p) = (yy_hold_char);
3376 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3377 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3378 }
3379
3380 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3382
3383 /* We don't actually know whether we did this switch during
3384 * EOF (yywrap()) processing, but the only time this flag
3385 * is looked at is after yywrap() is called, so it's safe
3386 * to go ahead and always set it.
3387 */
3388 (yy_did_buffer_switch_on_eof) = 1;
3389}
3390
3391/* %if-c-only */
3392static void yy_load_buffer_state (void)
3393/* %endif */
3394/* %if-c++-only */
3395/* %endif */
3396{
3397 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3398 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3399/* %if-c-only */
3400 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3401/* %endif */
3402/* %if-c++-only */
3403/* %endif */
3404 (yy_hold_char) = *(yy_c_buf_p);
3405}
3406
3413/* %if-c-only */
3415/* %endif */
3416/* %if-c++-only */
3417/* %endif */
3418{
3420
3421 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3422 if ( ! b )
3423 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3424
3425 b->yy_buf_size = size;
3426
3427 /* yy_ch_buf has to be 2 characters longer than the size given because
3428 * we need to put in 2 end-of-buffer characters.
3429 */
3430 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
3431 if ( ! b->yy_ch_buf )
3432 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3433
3434 b->yy_is_our_buffer = 1;
3435
3436 yy_init_buffer( b, file );
3437
3438 return b;
3439}
3440
3441/* %if-c++-only */
3442/* %endif */
3443
3448/* %if-c-only */
3450/* %endif */
3451/* %if-c++-only */
3452/* %endif */
3453{
3454
3455 if ( ! b )
3456 return;
3457
3458 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3460
3461 if ( b->yy_is_our_buffer )
3462 yyfree( (void *) b->yy_ch_buf );
3463
3464 yyfree( (void *) b );
3465}
3466
3467/* Initializes or reinitializes a buffer.
3468 * This function is sometimes called more than once on the same buffer,
3469 * such as during a yyrestart() or at EOF.
3470 */
3471/* %if-c-only */
3472 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3473/* %endif */
3474/* %if-c++-only */
3475/* %endif */
3476
3477{
3478 int oerrno = errno;
3479
3480 yy_flush_buffer( b );
3481
3482/* %if-c-only */
3483 b->yy_input_file = file;
3484/* %endif */
3485/* %if-c++-only */
3486/* %endif */
3487 b->yy_fill_buffer = 1;
3488
3489 /* If b is the current buffer, then yy_init_buffer was _probably_
3490 * called from yyrestart() or through yy_get_next_buffer.
3491 * In that case, we don't want to reset the lineno or column.
3492 */
3493 if (b != YY_CURRENT_BUFFER){
3494 b->yy_bs_lineno = 1;
3495 b->yy_bs_column = 0;
3496 }
3497
3498/* %if-c-only */
3499
3500 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3501
3502/* %endif */
3503/* %if-c++-only */
3504/* %endif */
3505 errno = oerrno;
3506}
3507
3512/* %if-c-only */
3514/* %endif */
3515/* %if-c++-only */
3516/* %endif */
3517{
3518 if ( ! b )
3519 return;
3520
3521 b->yy_n_chars = 0;
3522
3523 /* We always need two end-of-buffer characters. The first causes
3524 * a transition to the end-of-buffer state. The second causes
3525 * a jam in that state.
3526 */
3529
3530 b->yy_buf_pos = &b->yy_ch_buf[0];
3531
3532 b->yy_at_bol = 1;
3534
3535 if ( b == YY_CURRENT_BUFFER )
3537}
3538
3539/* %if-c-or-c++ */
3546/* %if-c-only */
3548/* %endif */
3549/* %if-c++-only */
3550/* %endif */
3551{
3552 if (new_buffer == NULL)
3553 return;
3554
3556
3557 /* This block is copied from yy_switch_to_buffer. */
3558 if ( YY_CURRENT_BUFFER )
3559 {
3560 /* Flush out information for old buffer. */
3561 *(yy_c_buf_p) = (yy_hold_char);
3562 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3563 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3564 }
3565
3566 /* Only push if top exists. Otherwise, replace top. */
3568 (yy_buffer_stack_top)++;
3569 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3570
3571 /* copied from yy_switch_to_buffer. */
3573 (yy_did_buffer_switch_on_eof) = 1;
3574}
3575/* %endif */
3576
3577/* %if-c-or-c++ */
3582/* %if-c-only */
3584/* %endif */
3585/* %if-c++-only */
3586/* %endif */
3587{
3588 if (!YY_CURRENT_BUFFER)
3589 return;
3590
3593 if ((yy_buffer_stack_top) > 0)
3594 --(yy_buffer_stack_top);
3595
3596 if (YY_CURRENT_BUFFER) {
3598 (yy_did_buffer_switch_on_eof) = 1;
3599 }
3600}
3601/* %endif */
3602
3603/* %if-c-or-c++ */
3604/* Allocates the stack if it does not exist.
3605 * Guarantees space for at least one push.
3606 */
3607/* %if-c-only */
3608static void yyensure_buffer_stack (void)
3609/* %endif */
3610/* %if-c++-only */
3611/* %endif */
3612{
3613 yy_size_t num_to_alloc;
3614
3615 if (!(yy_buffer_stack)) {
3616
3617 /* First allocation is just for 2 elements, since we don't know if this
3618 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3619 * immediate realloc on the next call.
3620 */
3621 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3622 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3623 (num_to_alloc * sizeof(struct yy_buffer_state*)
3624 );
3625 if ( ! (yy_buffer_stack) )
3626 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3627
3628 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3629
3630 (yy_buffer_stack_max) = num_to_alloc;
3631 (yy_buffer_stack_top) = 0;
3632 return;
3633 }
3634
3635 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3636
3637 /* Increase the buffer to prepare for a possible push. */
3638 yy_size_t grow_size = 8 /* arbitrary grow size */;
3639
3640 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3641 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3642 ((yy_buffer_stack),
3643 num_to_alloc * sizeof(struct yy_buffer_state*)
3644 );
3645 if ( ! (yy_buffer_stack) )
3646 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3647
3648 /* zero only the new slots.*/
3649 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3650 (yy_buffer_stack_max) = num_to_alloc;
3651 }
3652}
3653/* %endif */
3654
3655/* %if-c-only */
3663{
3665
3666 if ( size < 2 ||
3667 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3668 base[size-1] != YY_END_OF_BUFFER_CHAR )
3669 /* They forgot to leave room for the EOB's. */
3670 return NULL;
3671
3672 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3673 if ( ! b )
3674 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3675
3676 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3677 b->yy_buf_pos = b->yy_ch_buf = base;
3678 b->yy_is_our_buffer = 0;
3679 b->yy_input_file = NULL;
3680 b->yy_n_chars = b->yy_buf_size;
3681 b->yy_is_interactive = 0;
3682 b->yy_at_bol = 1;
3683 b->yy_fill_buffer = 0;
3685
3687
3688 return b;
3689}
3690/* %endif */
3691
3692/* %if-c-only */
3701YY_BUFFER_STATE yy_scan_string (const char * yystr )
3702{
3703
3704 return yy_scan_bytes( yystr, (int) strlen(yystr) );
3705}
3706/* %endif */
3707
3708/* %if-c-only */
3716YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3717{
3719 char *buf;
3720 yy_size_t n;
3721 int i;
3722
3723 /* Get memory for full buffer, including space for trailing EOB's. */
3724 n = (yy_size_t) (_yybytes_len + 2);
3725 buf = (char *) yyalloc( n );
3726 if ( ! buf )
3727 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3728
3729 for ( i = 0; i < _yybytes_len; ++i )
3730 buf[i] = yybytes[i];
3731
3732 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3733
3734 b = yy_scan_buffer( buf, n );
3735 if ( ! b )
3736 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3737
3738 /* It's okay to grow etc. this buffer, and we should throw it
3739 * away when we're done.
3740 */
3741 b->yy_is_our_buffer = 1;
3742
3743 return b;
3744}
3745/* %endif */
3746
3747#ifndef YY_EXIT_FAILURE
3748#define YY_EXIT_FAILURE 2
3749#endif
3750
3751/* %if-c-only */
3752static void yynoreturn yy_fatal_error (const char* msg )
3753{
3754 fprintf( stderr, "%s\n", msg );
3755 exit( YY_EXIT_FAILURE );
3756}
3757/* %endif */
3758/* %if-c++-only */
3759/* %endif */
3760
3761/* Redefine yyless() so it works in section 3 code. */
3762
3763#undef yyless
3764#define yyless(n) \
3765 do \
3766 { \
3767 /* Undo effects of setting up yytext. */ \
3768 int yyless_macro_arg = (n); \
3769 YY_LESS_LINENO(yyless_macro_arg);\
3770 yytext[yyleng] = (yy_hold_char); \
3771 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3772 (yy_hold_char) = *(yy_c_buf_p); \
3773 *(yy_c_buf_p) = '\0'; \
3774 yyleng = yyless_macro_arg; \
3775 } \
3776 while ( 0 )
3777
3778/* Accessor methods (get/set functions) to struct members. */
3779
3780/* %if-c-only */
3781/* %if-reentrant */
3782/* %endif */
3783
3788{
3789
3790 return yylineno;
3791}
3792
3796FILE *yyget_in (void)
3797{
3798 return yyin;
3799}
3800
3804FILE *yyget_out (void)
3805{
3806 return yyout;
3807}
3808
3812int yyget_leng (void)
3813{
3814 return yyleng;
3815}
3816
3820
3821char *yyget_text (void)
3822{
3823 return yytext;
3824}
3825
3826/* %if-reentrant */
3827/* %endif */
3828
3833void yyset_lineno (int _line_number )
3834{
3835
3836 yylineno = _line_number;
3837}
3838
3845void yyset_in (FILE * _in_str )
3846{
3847 yyin = _in_str ;
3848}
3849
3850void yyset_out (FILE * _out_str )
3851{
3852 yyout = _out_str ;
3853}
3854
3855int yyget_debug (void)
3856{
3857 return yy_flex_debug;
3858}
3859
3860void yyset_debug (int _bdebug )
3861{
3862 yy_flex_debug = _bdebug ;
3863}
3864
3865/* %endif */
3866
3867/* %if-reentrant */
3868/* %if-bison-bridge */
3869/* %endif */
3870/* %endif if-c-only */
3871
3872/* %if-c-only */
3873static int yy_init_globals (void)
3874{
3875 /* Initialization is the same as for the non-reentrant scanner.
3876 * This function is called from yylex_destroy(), so don't allocate here.
3877 */
3878
3879 (yy_buffer_stack) = NULL;
3880 (yy_buffer_stack_top) = 0;
3881 (yy_buffer_stack_max) = 0;
3882 (yy_c_buf_p) = NULL;
3883 (yy_init) = 0;
3884 (yy_start) = 0;
3885
3886/* Defined in main.c */
3887#ifdef YY_STDINIT
3888 yyin = stdin;
3889 yyout = stdout;
3890#else
3891 yyin = NULL;
3892 yyout = NULL;
3893#endif
3894
3895 /* For future reference: Set errno on error, since we are called by
3896 * yylex_init()
3897 */
3898 return 0;
3899}
3900/* %endif */
3901
3902/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
3903/* yylex_destroy is for both reentrant and non-reentrant scanners. */
3905{
3906
3907 /* Pop the buffer stack, destroying each element. */
3908 while(YY_CURRENT_BUFFER){
3912 }
3913
3914 /* Destroy the stack itself. */
3915 yyfree((yy_buffer_stack) );
3916 (yy_buffer_stack) = NULL;
3917
3918 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3919 * yylex() is called, initialization will occur. */
3920 yy_init_globals( );
3921
3922/* %if-reentrant */
3923/* %endif */
3924 return 0;
3925}
3926/* %endif */
3927
3928/*
3929 * Internal utility routines.
3930 */
3931
3932#ifndef yytext_ptr
3933static void yy_flex_strncpy (char* s1, const char * s2, int n )
3934{
3935
3936 int i;
3937 for ( i = 0; i < n; ++i )
3938 s1[i] = s2[i];
3939}
3940#endif
3941
3942#ifdef YY_NEED_STRLEN
3943static int yy_flex_strlen (const char * s )
3944{
3945 int n;
3946 for ( n = 0; s[n]; ++n )
3947 ;
3948
3949 return n;
3950}
3951#endif
3952
3953void *yyalloc (yy_size_t size )
3954{
3955 return malloc(size);
3956}
3957
3958void *yyrealloc (void * ptr, yy_size_t size )
3959{
3960
3961 /* The cast to (char *) in the following accommodates both
3962 * implementations that use char* generic pointers, and those
3963 * that use void* generic pointers. It works with the latter
3964 * because both ANSI C and C++ allow castless assignment from
3965 * any pointer type to void*, and deal with argument conversions
3966 * as though doing an assignment.
3967 */
3968 return realloc(ptr, size);
3969}
3970
3971void yyfree (void * ptr )
3972{
3973 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3974}
3975
3976/* %if-tables-serialization definitions */
3977/* %define-yytables The name for this specific scanner's tables. */
3978#define YYTABLES_NAME "yytables"
3979/* %endif */
3980
3981/* %ok-for-header */
3982
3983#line 1057 "d2_lexer.ll"
3984
3985
3986using namespace isc::dhcp;
3987
3988void
3989D2ParserContext::scanStringBegin(const std::string& str, ParserType parser_type)
3990{
3991 start_token_flag = true;
3992 start_token_value = parser_type;
3993
3994 file_ = "<string>";
3995 sfile_ = 0;
3996 loc_.initialize(&file_);
3997 yy_flex_debug = trace_scanning_;
3998 YY_BUFFER_STATE buffer;
3999 buffer = d2_parser__scan_bytes(str.c_str(), str.size());
4000 if (!buffer) {
4001 fatal("cannot scan string");
4002 /* fatal() throws an exception so this can't be reached */
4003 }
4004}
4005
4006void
4008 const std::string& filename,
4009 ParserType parser_type)
4010{
4011 start_token_flag = true;
4012 start_token_value = parser_type;
4013
4014 file_ = filename;
4015 sfile_ = f;
4016 loc_.initialize(&file_);
4017 yy_flex_debug = trace_scanning_;
4018 YY_BUFFER_STATE buffer;
4019
4020 /* See d2_lexer.cc header for available definitions */
4021 buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
4022 if (!buffer) {
4023 fatal("cannot scan file " + filename);
4024 }
4025 d2_parser__switch_to_buffer(buffer);
4026}
4027
4028void
4030 if (sfile_)
4031 fclose(sfile_);
4032 sfile_ = 0;
4033 static_cast<void>(d2_parser_lex_destroy());
4034 /* Close files */
4035 while (!sfiles_.empty()) {
4036 FILE* f = sfiles_.back();
4037 if (f) {
4038 fclose(f);
4039 }
4040 sfiles_.pop_back();
4041 }
4042 /* Delete states */
4043 while (!states_.empty()) {
4044 d2_parser__delete_buffer(states_.back());
4045 states_.pop_back();
4046 }
4047}
4048
4049void
4050D2ParserContext::includeFile(const std::string& filename) {
4051 if (states_.size() > 10) {
4052 fatal("Too many nested include.");
4053 }
4054
4055 FILE* f = fopen(filename.c_str(), "r");
4056 if (!f) {
4057 fatal("Can't open include file " + filename);
4058 }
4059 if (sfile_) {
4060 sfiles_.push_back(sfile_);
4061 }
4062 sfile_ = f;
4063 states_.push_back(YY_CURRENT_BUFFER);
4064 YY_BUFFER_STATE buffer;
4065 buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
4066 if (!buffer) {
4067 fatal( "Can't scan include file " + filename);
4068 }
4069 d2_parser__switch_to_buffer(buffer);
4070 files_.push_back(file_);
4071 file_ = filename;
4072 locs_.push_back(loc_);
4073 loc_.initialize(&file_);
4074
4075 BEGIN(INITIAL);
4076}
4077
4078namespace {
4080class Dummy {
4081 /* cppcheck-suppress unusedPrivateFunction */
4082 void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
4083};
4084}
4085#endif /* !__clang_analyzer__ */
4086
Evaluation error exception raised when trying to parse.
ParserType
Defines currently supported scopes.
@ PARSER_TSIG_KEY
Used for parsing a list of TSIG Keys.
@ PARSER_DDNS_DOMAINS
Used for parsing content of a DNS Server.
@ PARSER_DDNS_DOMAIN
Used for parsing a list a DDNS Domains.
@ PARSER_DNS_SERVER
Used for parsing a list of DNS servers.
@ PARSER_SUB_DHCPDDNS
Used for parsing content of a TSIG key.
@ PARSER_JSON
This parser will parse the content as generic JSON.
@ PARSER_TSIG_KEYS
Used for parsing content of a DDNS Domain.
@ PARSER_DHCPDDNS
Used for parsing content of DhcpDdns.
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.
Definition d2_lexer.cc:4050
@ AUTHENTICATION
Used while parsing content of an authentication type.
@ DDNS_DOMAIN
Used while parsing a list of ddns-domains.
@ DNS_SERVERS
Used while parsing content of a control-sockets.
@ DDNS_DOMAINS
Used while parsing content of a dns-server.
@ AUTH_TYPE
Used while parsing content of a client.
@ 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.
@ CONTROL_SOCKET_TYPE
Used while parsing content of an authentication.
@ 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.
@ CONTROL_SOCKETS
Used while parsing content of a socket-type.
std::vector< FILE * > sfiles_
sFile (aka FILE) stack
FILE * sfile_
sFile (aka FILE)
void scanStringBegin(const std::string &str, ParserType type)
Method called before scanning starts on a string.
Definition d2_lexer.cc:3989
void scanFileBegin(FILE *f, const std::string &filename, ParserType type)
Method called before scanning starts on a file.
Definition d2_lexer.cc:4007
std::vector< isc::d2::location > locs_
Location stack.
std::vector< struct yy_buffer_state * > states_
Lexer state stack.
std::vector< std::string > files_
File name stack.
void scanEnd()
Method called after the last tokens are scanned.
Definition d2_lexer.cc:4029
static symbol_type make_COMMENT(const location_type &l)
Definition d2_parser.h:1580
static symbol_type make_AUTHENTICATION(const location_type &l)
Definition d2_parser.h:1880
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition d2_parser.h:2435
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition d2_parser.h:2360
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition d2_parser.h:2420
static symbol_type make_LOGGERS(const location_type &l)
Definition d2_parser.h:2135
static symbol_type make_KEY_NAME(const location_type &l)
Definition d2_parser.h:1640
static symbol_type make_PARAMETERS(const location_type &l)
Definition d2_parser.h:2120
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition d2_parser.h:2345
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition d2_parser.h:1595
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition d2_parser.h:2300
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition d2_parser.h:1775
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
Definition d2_parser.h:2375
static symbol_type make_TCP(const location_type &l)
Definition d2_parser.h:1520
static symbol_type make_NAME(const location_type &l)
Definition d2_parser.h:2150
static symbol_type make_MAXSIZE(const location_type &l)
Definition d2_parser.h:2240
static symbol_type make_PASSWORD_FILE(const location_type &l)
Definition d2_parser.h:2015
static symbol_type make_HTTPS(const location_type &l)
Definition d2_parser.h:1820
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition d2_parser.h:2165
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition d2_parser.h:1355
static symbol_type make_PASSWORD(const location_type &l)
Definition d2_parser.h:2000
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition d2_parser.h:2195
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition d2_parser.h:1385
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition d2_parser.h:1715
static symbol_type make_SOCKET_ADDRESS(const location_type &l)
Definition d2_parser.h:1850
static symbol_type make_CERT_FILE(const location_type &l)
Definition d2_parser.h:2045
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition d2_parser.h:2285
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition d2_parser.h:1835
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition d2_parser.h:1475
static symbol_type make_NULL_TYPE(const location_type &l)
Definition d2_parser.h:1415
static symbol_type make_LIBRARY(const location_type &l)
Definition d2_parser.h:2105
static symbol_type make_UDP(const location_type &l)
Definition d2_parser.h:1505
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition d2_parser.h:2090
static symbol_type make_COLON(const location_type &l)
Definition d2_parser.h:1340
static symbol_type make_COMMA(const location_type &l)
Definition d2_parser.h:1325
static symbol_type make_SECRET(const location_type &l)
Definition d2_parser.h:1730
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition d2_parser.h:2330
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition d2_parser.h:1400
static symbol_type make_UNIX(const location_type &l)
Definition d2_parser.h:1790
static symbol_type make_OUTPUT(const location_type &l)
Definition d2_parser.h:2180
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
Definition d2_parser.h:2315
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition d2_parser.h:2450
static symbol_type make_DHCPDDNS(const location_type &l)
Definition d2_parser.h:1430
static symbol_type make_CONTROL_SOCKETS(const location_type &l)
Definition d2_parser.h:1760
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition d2_parser.h:2390
static symbol_type make_MAXVER(const location_type &l)
Definition d2_parser.h:2255
static symbol_type make_SECRET_FILE(const location_type &l)
Definition d2_parser.h:1745
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition d2_parser.h:1625
static symbol_type make_SEVERITY(const location_type &l)
Definition d2_parser.h:2210
static symbol_type make_REALM(const location_type &l)
Definition d2_parser.h:1925
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition d2_parser.h:1370
static symbol_type make_HTTP(const location_type &l)
Definition d2_parser.h:1805
static symbol_type make_HOSTNAME(const location_type &l)
Definition d2_parser.h:1670
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition d2_parser.h:1565
static symbol_type make_USER(const location_type &l)
Definition d2_parser.h:1970
static symbol_type make_SOCKET_PORT(const location_type &l)
Definition d2_parser.h:1865
static symbol_type make_BASIC(const location_type &l)
Definition d2_parser.h:1910
static symbol_type make_FLUSH(const location_type &l)
Definition d2_parser.h:2225
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition d2_parser.h:1610
static symbol_type make_PATTERN(const location_type &l)
Definition d2_parser.h:2270
static symbol_type make_KEY_FILE(const location_type &l)
Definition d2_parser.h:2060
static symbol_type make_ALGORITHM(const location_type &l)
Definition d2_parser.h:1700
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition d2_parser.h:1445
static symbol_type make_PORT(const location_type &l)
Definition d2_parser.h:1460
static symbol_type make_CLIENTS(const location_type &l)
Definition d2_parser.h:1955
static symbol_type make_CERT_REQUIRED(const location_type &l)
Definition d2_parser.h:2075
static symbol_type make_TYPE(const location_type &l)
Definition d2_parser.h:1895
static symbol_type make_TRUST_ANCHOR(const location_type &l)
Definition d2_parser.h:2030
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition d2_parser.h:2465
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition d2_parser.h:2480
static symbol_type make_DIRECTORY(const location_type &l)
Definition d2_parser.h:1940
static symbol_type make_JSON(const location_type &l)
Definition d2_parser.h:1550
static symbol_type make_END(const location_type &l)
Definition d2_parser.h:1280
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition d2_parser.h:1490
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition d2_parser.h:1655
static symbol_type make_USER_FILE(const location_type &l)
Definition d2_parser.h:1985
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition d2_parser.h:1685
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition d2_parser.h:1535
#define yylex_destroy
Definition d2_lexer.cc:3904
#define YY_NEW_FILE
Definition d2_lexer.cc:427
#define yyget_extra
Definition d2_lexer.cc:173
#define yyset_extra
Definition d2_lexer.cc:179
#define yyget_in
Get the input stream.
Definition d2_lexer.cc:3796
unsigned char flex_uint8_t
Definition d2_lexer.cc:338
#define yyset_lineno
Definition d2_lexer.cc:227
#define COMMENT
Definition d2_lexer.cc:1274
#define yyleng
Definition d2_lexer.cc:29
#define yyrestart
Definition d2_lexer.cc:33
#define yyset_debug
Definition d2_lexer.cc:167
#define YY_EXTRA_TYPE
Definition d2_lexer.cc:1292
#define DIR_INCLUDE
Definition d2_lexer.cc:1276
#define yyout
Definition d2_lexer.cc:32
short int flex_int16_t
Definition d2_lexer.cc:336
#define yytext
Definition d2_lexer.cc:34
unsigned int flex_uint32_t
Definition d2_lexer.cc:340
#define yyget_lineno
Get the current line number.
Definition d2_lexer.cc:3787
#define yy_scan_bytes
Definition d2_lexer.cc:19
#define yylex
Definition d2_lexer.cc:30
#define YY_BREAK
Definition d2_lexer.cc:1501
#define yynoreturn
Definition d2_lexer.cc:391
int yy_act
Definition d2_lexer.cc:1515
#define yypush_buffer_state
Definition d2_lexer.cc:24
struct yy_buffer_state * YY_BUFFER_STATE
Definition d2_lexer.cc:449
#define yyfree
Definition d2_lexer.cc:38
#define YY_BUFFER_NEW
Definition d2_lexer.cc:542
#define yyget_out
Get the output stream.
Definition d2_lexer.cc:3804
#define YY_RESTORE_YY_MORE_OFFSET
Definition d2_lexer.cc:1199
#define yywrap
Definition d2_lexer.cc:35
#define yylineno
Definition d2_lexer.cc:31
#define YY_BUFFER_NORMAL
Definition d2_lexer.cc:543
char * yy_cp
Definition d2_lexer.cc:1514
#define yypop_buffer_state
Removes and deletes the top of the stack, if present.
Definition d2_lexer.cc:3583
#define yy_scan_buffer
Definition d2_lexer.cc:17
#define YY_MORE_ADJ
Definition d2_lexer.cc:1198
#define YY_RULE_SETUP
Definition d2_lexer.cc:1505
#define yy_scan_string
Definition d2_lexer.cc:18
#define yy_flex_debug
Definition d2_lexer.cc:27
#define DIR_EXIT
Definition d2_lexer.cc:1277
#define yytext_ptr
Definition d2_lexer.cc:672
signed char flex_int8_t
Definition d2_lexer.cc:335
#define EOB_ACT_END_OF_FILE
Definition d2_lexer.cc:468
#define yyalloc
Definition d2_lexer.cc:36
#define YY_CURRENT_BUFFER_LVALUE
Definition d2_lexer.cc:584
#define yyget_leng
Get the length of the current token.
Definition d2_lexer.cc:3812
#define yyget_debug
Definition d2_lexer.cc:3855
int flex_int32_t
Definition d2_lexer.cc:337
#define yyin
Definition d2_lexer.cc:28
#define YY_START
Definition d2_lexer.cc:422
#define yyensure_buffer_stack
Definition d2_lexer.cc:3608
#define yy_switch_to_buffer
Definition d2_lexer.cc:23
int yy_state_type
Definition d2_lexer.cc:663
#define YY_CURRENT_BUFFER
Definition d2_lexer.cc:578
#define yy_init_buffer
Definition d2_lexer.cc:20
#define INITIAL
Definition d2_lexer.cc:1273
char * yy_bp
Definition d2_lexer.cc:1514
#define YY_READ_BUF_SIZE
Definition d2_lexer.cc:1389
#define YY_INPUT(buf, result, max_size)
Definition d2_lexer.cc:1409
#define ECHO
Definition d2_lexer.cc:1399
#define yy_flush_buffer
Definition d2_lexer.cc:21
#define yyrealloc
Definition d2_lexer.cc:37
#define YY_END_OF_BUFFER
Definition d2_lexer.cc:698
#define YY_STATE_EOF(state)
Definition d2_lexer.cc:425
#define BEGIN
Definition d2_lexer.cc:417
#define YY_END_OF_BUFFER_CHAR
Definition d2_lexer.cc:428
#define YY_FATAL_ERROR(msg)
Definition d2_lexer.cc:1243
unsigned short int flex_uint16_t
Definition d2_lexer.cc:339
#define yy_create_buffer
Definition d2_lexer.cc:15
flex_uint8_t YY_CHAR
Definition d2_lexer.cc:659
#define YY_DO_BEFORE_ACTION
Definition d2_lexer.cc:688
#define yyget_text
Get the current token.
Definition d2_lexer.cc:3821
#define yy_delete_buffer
Definition d2_lexer.cc:16
#define EOB_ACT_LAST_MATCH
Definition d2_lexer.cc:469
size_t yy_size_t
Definition d2_lexer.cc:454
#define YY_BUFFER_EOF_PENDING
Definition d2_lexer.cc:554
#define yyset_out
Definition d2_lexer.cc:203
#define EOB_ACT_CONTINUE_SCAN
Definition d2_lexer.cc:467
#define YY_DECL
Definition d2_lexer.cc:1486
#define YY_BUF_SIZE
Definition d2_lexer.cc:439
#define YY_EXIT_FAILURE
Definition d2_lexer.cc:3748
#define YY_SC_TO_UI(c)
Definition d2_lexer.cc:403
#define yy_load_buffer_state
Definition d2_lexer.cc:3392
#define DIR_ENTER
Definition d2_lexer.cc:1275
#define yyset_in
Definition d2_lexer.cc:191
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
@ fatal
Definition db_log.h:126
int yy_bs_column
The column count.
Definition d2_lexer.cc:533
FILE * yy_input_file
Definition d2_lexer.cc:494
int yy_bs_lineno
The line count.
Definition d2_lexer.cc:532
char * yy_buf_pos
Definition d2_lexer.cc:501
flex_int32_t yy_verify
Definition d2_lexer.cc:703
flex_int32_t yy_nxt
Definition d2_lexer.cc:704