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