1 #line 1 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
2 
3 #line 3 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
4 
5 #define  YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 6
12 #define YY_FLEX_SUBMINOR_VERSION 4
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* First, we deal with  platform-specific or compiler-specific issues. */
18 
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24 
25 /* end standard C headers. */
26 
27 /* flex integer type definitions */
28 
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31 
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37  * if you want the limit (max/min) macros for int types.
38  */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42 
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57 
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN               (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN              (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN              (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX               (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX              (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX              (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX              (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX             (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX             (4294967295U)
85 #endif
86 
87 #ifndef SIZE_MAX
88 #define SIZE_MAX               (~(size_t)0)
89 #endif
90 
91 #endif /* ! C99 */
92 
93 #endif /* ! FLEXINT_H */
94 
95 /* begin standard C++ headers. */
96 
97 /* TODO: this is always defined, so inline it */
98 #define yyconst const
99 
100 #if defined(__GNUC__) && __GNUC__ >= 3
101 #define yynoreturn __attribute__((__noreturn__))
102 #else
103 #define yynoreturn
104 #endif
105 
106 /* Returned upon end-of-file. */
107 #define YY_NULL 0
108 
109 /* Promotes a possibly negative, possibly signed char to an
110  *   integer in range [0..255] for use as an array index.
111  */
112 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
113 
114 /* Enter a start condition.  This macro really ought to take a parameter,
115  * but we do it the disgusting crufty way forced on us by the ()-less
116  * definition of BEGIN.
117  */
118 #define BEGIN (yy_start) = 1 + 2 *
119 /* Translate the current start state into a value that can be later handed
120  * to BEGIN to return to the state.  The YYSTATE alias is for lex
121  * compatibility.
122  */
123 #define YY_START (((yy_start) - 1) / 2)
124 #define YYSTATE YY_START
125 /* Action number for EOF rule of a given start state. */
126 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
127 /* Special action meaning "start processing a new file". */
128 #define YY_NEW_FILE yyrestart( yyin  )
129 #define YY_END_OF_BUFFER_CHAR 0
130 
131 /* Size of default input buffer. */
132 #ifndef YY_BUF_SIZE
133 #ifdef __ia64__
134 /* On IA-64, the buffer size is 16k, not 8k.
135  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
136  * Ditto for the __ia64__ case accordingly.
137  */
138 #define YY_BUF_SIZE 32768
139 #else
140 #define YY_BUF_SIZE 16384
141 #endif /* __ia64__ */
142 #endif
143 
144 /* The state buf must be large enough to hold one state per character in the main buffer.
145  */
146 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
147 
148 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
149 #define YY_TYPEDEF_YY_BUFFER_STATE
150 typedef struct yy_buffer_state *YY_BUFFER_STATE;
151 #endif
152 
153 #ifndef YY_TYPEDEF_YY_SIZE_T
154 #define YY_TYPEDEF_YY_SIZE_T
155 typedef size_t yy_size_t;
156 #endif
157 
158 extern int yyleng;
159 
160 extern FILE *yyin, *yyout;
161 
162 #define EOB_ACT_CONTINUE_SCAN 0
163 #define EOB_ACT_END_OF_FILE 1
164 #define EOB_ACT_LAST_MATCH 2
165 
166     #define YY_LESS_LINENO(n)
167     #define YY_LINENO_REWIND_TO(ptr)
168 
169 /* Return all but the first "n" matched characters back to the input stream. */
170 #define yyless(n) \
171 	do \
172 		{ \
173 		/* Undo effects of setting up yytext. */ \
174         int yyless_macro_arg = (n); \
175         YY_LESS_LINENO(yyless_macro_arg);\
176 		*yy_cp = (yy_hold_char); \
177 		YY_RESTORE_YY_MORE_OFFSET \
178 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
179 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
180 		} \
181 	while ( 0 )
182 #define unput(c) yyunput( c, (yytext_ptr)  )
183 
184 #ifndef YY_STRUCT_YY_BUFFER_STATE
185 #define YY_STRUCT_YY_BUFFER_STATE
186 struct yy_buffer_state
187 	{
188 	FILE *yy_input_file;
189 
190 	char *yy_ch_buf;		/* input buffer */
191 	char *yy_buf_pos;		/* current position in input buffer */
192 
193 	/* Size of input buffer in bytes, not including room for EOB
194 	 * characters.
195 	 */
196 	int yy_buf_size;
197 
198 	/* Number of characters read into yy_ch_buf, not including EOB
199 	 * characters.
200 	 */
201 	int yy_n_chars;
202 
203 	/* Whether we "own" the buffer - i.e., we know we created it,
204 	 * and can realloc() it to grow it, and should free() it to
205 	 * delete it.
206 	 */
207 	int yy_is_our_buffer;
208 
209 	/* Whether this is an "interactive" input source; if so, and
210 	 * if we're using stdio for input, then we want to use getc()
211 	 * instead of fread(), to make sure we stop fetching input after
212 	 * each newline.
213 	 */
214 	int yy_is_interactive;
215 
216 	/* Whether we're considered to be at the beginning of a line.
217 	 * If so, '^' rules will be active on the next match, otherwise
218 	 * not.
219 	 */
220 	int yy_at_bol;
221 
222     int yy_bs_lineno; /**< The line count. */
223     int yy_bs_column; /**< The column count. */
224 
225 	/* Whether to try to fill the input buffer when we reach the
226 	 * end of it.
227 	 */
228 	int yy_fill_buffer;
229 
230 	int yy_buffer_status;
231 
232 #define YY_BUFFER_NEW 0
233 #define YY_BUFFER_NORMAL 1
234 	/* When an EOF's been seen but there's still some text to process
235 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
236 	 * shouldn't try reading from the input source any more.  We might
237 	 * still have a bunch of tokens to match, though, because of
238 	 * possible backing-up.
239 	 *
240 	 * When we actually see the EOF, we change the status to "new"
241 	 * (via yyrestart()), so that the user can continue scanning by
242 	 * just pointing yyin at a new input file.
243 	 */
244 #define YY_BUFFER_EOF_PENDING 2
245 
246 	};
247 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
248 
249 /* Stack of input buffers. */
250 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
251 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
252 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
253 
254 /* We provide macros for accessing buffer states in case in the
255  * future we want to put the buffer states in a more general
256  * "scanner state".
257  *
258  * Returns the top of the stack, or NULL.
259  */
260 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
261                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
262                           : NULL)
263 /* Same as previous macro, but useful when we know that the buffer stack is not
264  * NULL or when we need an lvalue. For internal use only.
265  */
266 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
267 
268 /* yy_hold_char holds the character lost when yytext is formed. */
269 static char yy_hold_char;
270 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
271 int yyleng;
272 
273 /* Points to current character in buffer. */
274 static char *yy_c_buf_p = NULL;
275 static int yy_init = 0;		/* whether we need to initialize */
276 static int yy_start = 0;	/* start state number */
277 
278 /* Flag which is used to allow yywrap()'s to do buffer switches
279  * instead of setting up a fresh yyin.  A bit of a hack ...
280  */
281 static int yy_did_buffer_switch_on_eof;
282 
283 void yyrestart ( FILE *input_file  );
284 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
285 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
286 void yy_delete_buffer ( YY_BUFFER_STATE b  );
287 void yy_flush_buffer ( YY_BUFFER_STATE b  );
288 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
289 void yypop_buffer_state ( void );
290 
291 static void yyensure_buffer_stack ( void );
292 static void yy_load_buffer_state ( void );
293 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
294 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
295 
296 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
297 YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
298 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
299 
300 void *yyalloc ( yy_size_t  );
301 void *yyrealloc ( void *, yy_size_t  );
302 void yyfree ( void *  );
303 
304 #define yy_new_buffer yy_create_buffer
305 #define yy_set_interactive(is_interactive) \
306 	{ \
307 	if ( ! YY_CURRENT_BUFFER ){ \
308         yyensure_buffer_stack (); \
309 		YY_CURRENT_BUFFER_LVALUE =    \
310             yy_create_buffer( yyin, YY_BUF_SIZE ); \
311 	} \
312 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
313 	}
314 #define yy_set_bol(at_bol) \
315 	{ \
316 	if ( ! YY_CURRENT_BUFFER ){\
317         yyensure_buffer_stack (); \
318 		YY_CURRENT_BUFFER_LVALUE =    \
319             yy_create_buffer( yyin, YY_BUF_SIZE ); \
320 	} \
321 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
322 	}
323 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324 
325 /* Begin user sect3 */
326 
327 #define yywrap() (/*CONSTCOND*/1)
328 #define YY_SKIP_YYWRAP
329 typedef flex_uint8_t YY_CHAR;
330 
331 FILE *yyin = NULL, *yyout = NULL;
332 
333 typedef int yy_state_type;
334 
335 extern int yylineno;
336 int yylineno = 1;
337 
338 extern char *yytext;
339 #ifdef yytext_ptr
340 #undef yytext_ptr
341 #endif
342 #define yytext_ptr yytext
343 
344 static yy_state_type yy_get_previous_state ( void );
345 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
346 static int yy_get_next_buffer ( void );
347 static void yynoreturn yy_fatal_error ( const char* msg  );
348 
349 /* Done after the current pattern has been matched and before the
350  * corresponding action - sets up yytext.
351  */
352 #define YY_DO_BEFORE_ACTION \
353 	(yytext_ptr) = yy_bp; \
354 	yyleng = (int) (yy_cp - yy_bp); \
355 	(yy_hold_char) = *yy_cp; \
356 	*yy_cp = '\0'; \
357 	(yy_c_buf_p) = yy_cp;
358 #define YY_NUM_RULES 32
359 #define YY_END_OF_BUFFER 33
360 /* This struct is not used in this scanner,
361    but its presence is necessary. */
362 struct yy_trans_info
363 	{
364 	flex_int32_t yy_verify;
365 	flex_int32_t yy_nxt;
366 	};
367 static const flex_int16_t yy_accept[180] =
368     {   0,
369         0,    0,    0,    0,    0,    0,    0,    0,   33,   31,
370        20,   20,   31,   31,   31,   31,   31,   31,   31,   31,
371        31,   31,   31,   31,   31,   31,   17,   18,   18,   31,
372        18,   12,   12,   20,   28,    0,    3,    0,   29,   14,
373         0,    0,   13,    0,    0,    0,    0,    0,    0,    0,
374         0,    0,   23,   25,   27,   26,   24,    0,   11,   30,
375         0,    0,    0,   16,   16,   18,   18,   18,   12,   12,
376        12,    0,   14,    0,   15,   13,    0,    0,    0,   22,
377         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
378        18,   12,   12,   12,   21,    0,    0,    0,    0,    0,
379 
380         0,    0,    0,    0,    0,    0,   18,    0,    0,    0,
381         0,    0,    0,    0,    0,    0,    0,    0,   18,    7,
382         0,    0,    0,    0,    0,    0,    0,    0,    2,    0,
383         0,    0,    0,    0,    0,    0,    0,    0,    0,    4,
384        19,    0,    0,    0,    5,    2,    0,    0,    0,    0,
385         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
386         1,    0,    0,    0,    0,    0,    6,    0,    9,    0,
387         0,    0,    0,    0,    0,    0,   10,    8,    0
388     } ;
389 
390 static const YY_CHAR yy_ec[256] =
391     {   0,
392         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
393         4,    4,    4,    1,    1,    1,    1,    1,    1,    1,
394         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
395         1,    2,    5,    6,    7,    1,    1,    8,    9,    1,
396         1,   10,   11,   11,   12,   11,   13,   14,   15,   16,
397        16,   16,   16,   16,   16,   16,   16,   17,    1,   18,
398        19,   20,   11,   11,   21,   21,   21,   21,   21,   21,
399        22,   22,   22,   22,   22,   23,   22,   22,   22,   22,
400        22,   22,   22,   22,   24,   22,   22,   25,   22,   22,
401         1,   26,   27,    1,   22,    1,   21,   28,   29,   30,
402 
403        31,   32,   33,   22,   34,   22,   22,   35,   36,   37,
404        38,   39,   22,   40,   41,   42,   43,   44,   22,   25,
405        45,   22,   46,   47,   48,    1,    1,    1,    1,    1,
406         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
413 
414         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
415         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
416         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
417         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
419         1,    1,    1,    1,    1
420     } ;
421 
422 static const YY_CHAR yy_meta[49] =
423     {   0,
424         1,    1,    1,    1,    1,    1,    2,    3,    1,    2,
425         2,    2,    4,    5,    5,    5,    6,    1,    1,    1,
426         7,    8,    8,    8,    8,    1,    1,    7,    7,    7,
427         7,    7,    8,    8,    8,    8,    8,    8,    8,    8,
428         8,    8,    8,    8,    8,    3,    1,    4
429     } ;
430 
431 static const flex_int16_t yy_base[194] =
432     {   0,
433         0,  406,   36,  405,   68,  404,   39,  110,  410,  414,
434        56,  116,  390,  115,  114,  114,  151,   43,  389,  108,
435       390,  359,  127,  371,    0,  177,  414,    0,  125,    0,
436       128,  129,  132,  147,  414,  132,  414,  401,  414,    0,
437       355,  148,  414,  150,  392,  398,  366,  135,  362,  367,
438       361,  361,  414,  414,  414,  414,  414,  378,  414,  414,
439       168,  360,  356,  414,  375,    0,  161,  357,  187,  367,
440       366,    0,    0,  340,  414,  160,  377,  121,  383,  372,
441       342,  348,  341,  352,  344,  345,  335,  198,  340,  347,
442       338,  414,  351,  172,  360,  359,  330,  339,  357,  169,
443 
444       328,  325,  333,  213,  334,  329,  332,  352,  348,  318,
445       315,  324,  314,  325,  343,  320,  210,  351,  350,  414,
446       320,  335,  312,  318,  306,  312,  308,  211,  342,  340,
447       330,  328,  327,  308,  307,  305,  306,  216,  128,  414,
448       414,  286,  256,  280,  414,  219,  248,  245,  220,  237,
449       242,  248,  237,  236,  219,  228,  220,  226,  207,  221,
450       414,  241,  230,  229,  216,  197,  414,  180,  414,  159,
451       157,  138,  143,   94,  120,   43,  414,  414,  414,  247,
452       253,  261,  265,  269,  275,  282,  286,  293,  301,  309,
453       313,  320,  328
454 
455     } ;
456 
457 static const flex_int16_t yy_def[194] =
458     {   0,
459       179,    1,    1,    3,  179,    5,    1,    1,  179,  179,
460       179,  179,  179,  180,  181,  182,  179,  179,  179,  179,
461       183,  179,  179,   17,  184,  183,  179,  185,  186,  185,
462       185,  179,  179,  179,  179,  180,  179,  180,  179,  187,
463       188,  182,  179,  182,  189,  190,  179,  179,  179,  179,
464       179,  179,  179,  179,  179,  179,  179,  183,  179,  179,
465       179,  179,  179,  179,  183,  185,  186,  185,  179,  179,
466       179,  191,  187,  188,  179,  182,  189,  189,  190,  179,
467       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
468       185,  179,  179,  191,  179,  179,  179,  179,  179,  179,
469 
470       179,  179,  179,  179,  179,  179,  185,  179,  179,  179,
471       179,  179,  179,  179,  179,  179,  192,  179,  185,  179,
472       179,  179,  179,  179,  179,  179,  179,  192,  179,  192,
473       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
474       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
475       179,  179,  179,  179,  193,  179,  179,  179,  179,  193,
476       179,  193,  179,  179,  179,  179,  179,  179,  179,  179,
477       179,  179,  179,  179,  179,  179,  179,  179,    0,  179,
478       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
479       179,  179,  179
480 
481     } ;
482 
483 static const flex_int16_t yy_nxt[463] =
484     {   0,
485        10,   11,   12,   11,   13,   14,   10,   15,   16,   10,
486        10,   10,   17,   10,   10,   10,   10,   18,   19,   20,
487        21,   21,   21,   21,   21,   10,   10,   21,   21,   21,
488        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
489        21,   21,   21,   21,   21,   10,   22,   10,   24,   25,
490        25,   25,   32,   33,   33,  178,   26,   34,   34,   34,
491        53,   54,   27,   26,   26,   26,   26,   26,   10,   11,
492        12,   11,   13,   14,   28,   15,   16,   28,   28,   28,
493        24,   28,   28,   28,   10,   18,   19,   20,   29,   29,
494        29,   29,   29,   30,   10,   29,   29,   29,   29,   29,
495 
496        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
497        29,   29,   29,   10,   22,   10,   23,   34,   34,   34,
498        37,   39,   43,   32,   33,   33,   56,   57,   61,   61,
499        78,   66,  177,   95,   66,   66,   66,   37,  176,   44,
500        38,   59,   69,   69,   69,   69,   69,   69,   34,   34,
501        34,   70,   71,   72,   70,   71,   43,   38,   76,   41,
502        45,   62,   68,   46,  147,   82,  148,   66,   43,   61,
503        66,   66,   66,   44,  175,   44,   83,   59,   47,  174,
504        48,   88,   88,   88,   49,   44,   50,  173,   51,   52,
505        65,   65,   65,   59,   70,   71,  112,   65,  172,  104,
506 
507        69,   69,   69,  113,   65,   65,   65,   65,   65,   70,
508        71,   88,   88,   88,  104,  129,  129,  138,  117,  171,
509       138,  154,  154,  154,  161,  155,  161,  170,  169,  146,
510       146,  146,  146,  146,  146,  130,  130,  154,  154,  154,
511       168,  155,  167,  179,  162,  166,  162,   36,   36,   36,
512        36,   36,   36,   36,   36,   40,  165,  164,  163,   40,
513        40,   42,   42,   42,   42,   42,   42,   42,   42,   58,
514        58,   58,   58,   64,  159,   64,   66,  158,  157,   66,
515       156,   66,   66,   67,  153,  152,   67,   67,   67,   67,
516        73,  151,   73,   73,   74,  150,   74,   74,  149,   74,
517 
518        74,   77,   77,   77,   77,   77,   77,   77,   77,   79,
519        79,   79,   79,   79,   79,   79,   79,   94,  145,   94,
520       128,  128,  128,  128,  128,  128,  128,  128,  160,  160,
521       160,  160,  160,  160,  160,  160,  144,  143,  142,  141,
522       140,  139,  179,  138,  137,  136,  135,  134,  133,  132,
523       131,   61,   61,  127,  126,  125,  124,  123,  122,  121,
524       120,   45,  119,  113,  118,  116,  115,  114,  111,  110,
525       109,   46,  108,   92,  107,  106,  105,  103,  102,  101,
526       100,   99,   98,   97,   96,   80,   78,   75,   93,   92,
527        91,   59,   90,   89,   59,   87,   86,   85,   84,   81,
528 
529        80,   78,   75,  179,   63,   60,   59,   55,   35,  179,
530        31,   23,   23,    9,  179,  179,  179,  179,  179,  179,
531       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
532       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
533       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
534       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
535       179,  179
536     } ;
537 
538 static const flex_int16_t yy_chk[463] =
539     {   0,
540         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
541         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
542         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
543         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
544         1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
545         3,    3,    7,    7,    7,  176,    3,   11,   11,   11,
546        18,   18,    3,    3,    3,    3,    3,    3,    5,    5,
547         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
548         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
549         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
550 
551         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
552         5,    5,    5,    5,    5,    5,    8,   12,   12,   12,
553        14,   15,   16,    8,    8,    8,   20,   20,   23,   31,
554        78,   29,  175,   78,   29,   29,   29,   36,  174,   16,
555        14,   29,   32,   32,   32,   33,   33,   33,   34,   34,
556        34,   32,   32,   32,   33,   33,   42,   36,   44,   15,
557        17,   23,   31,   17,  139,   48,  139,   67,   76,   61,
558        67,   67,   67,   42,  173,   44,   48,   67,   17,  172,
559        17,   61,   61,   61,   17,   76,   17,  171,   17,   17,
560        26,   26,   26,   26,   94,   94,  100,   26,  170,   88,
561 
562        69,   69,   69,  100,   26,   26,   26,   26,   26,   69,
563        69,   88,   88,   88,  104,  117,  128,  138,  104,  168,
564       146,  149,  149,  149,  155,  149,  160,  166,  165,  138,
565       138,  138,  146,  146,  146,  117,  128,  154,  154,  154,
566       164,  154,  163,  162,  155,  159,  160,  180,  180,  180,
567       180,  180,  180,  180,  180,  181,  158,  157,  156,  181,
568       181,  182,  182,  182,  182,  182,  182,  182,  182,  183,
569       183,  183,  183,  184,  153,  184,  185,  152,  151,  185,
570       150,  185,  185,  186,  148,  147,  186,  186,  186,  186,
571       187,  144,  187,  187,  188,  143,  188,  188,  142,  188,
572 
573       188,  189,  189,  189,  189,  189,  189,  189,  189,  190,
574       190,  190,  190,  190,  190,  190,  190,  191,  137,  191,
575       192,  192,  192,  192,  192,  192,  192,  192,  193,  193,
576       193,  193,  193,  193,  193,  193,  136,  135,  134,  133,
577       132,  131,  130,  129,  127,  126,  125,  124,  123,  122,
578       121,  119,  118,  116,  115,  114,  113,  112,  111,  110,
579       109,  108,  107,  106,  105,  103,  102,  101,   99,   98,
580        97,   96,   95,   93,   91,   90,   89,   87,   86,   85,
581        84,   83,   82,   81,   80,   79,   77,   74,   71,   70,
582        68,   65,   63,   62,   58,   52,   51,   50,   49,   47,
583 
584        46,   45,   41,   38,   24,   22,   21,   19,   13,    9,
585         6,    4,    2,  179,  179,  179,  179,  179,  179,  179,
586       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
587       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
588       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
589       179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
590       179,  179
591     } ;
592 
593 static yy_state_type yy_last_accepting_state;
594 static char *yy_last_accepting_cpos;
595 
596 extern int yy_flex_debug;
597 int yy_flex_debug = 0;
598 
599 /* The intent behind this definition is that it'll catch
600  * any uses of REJECT which flex missed.
601  */
602 #define REJECT reject_used_but_not_detected
603 #define yymore() yymore_used_but_not_detected
604 #define YY_MORE_ADJ 0
605 #define YY_RESTORE_YY_MORE_OFFSET
606 char *yytext;
607 #line 1 "external/dtc/dtc-lexer.l"
608 /* SPDX-License-Identifier: GPL-2.0-or-later */
609 /*
610  * (C) Copyright David Gibson <[email protected]>, IBM Corporation.  2005.
611  */
612 #define YY_NO_INPUT 1
613 
614 
615 
616 #line 22 "external/dtc/dtc-lexer.l"
617 #include "dtc.h"
618 #include "srcpos.h"
619 #include "dtc-parser.h"
620 
621 extern bool treesource_error;
622 
623 /* CAUTION: this will stop working if we ever use yyless() or yyunput() */
624 #define	YY_USER_ACTION \
625 	{ \
626 		srcpos_update(&yylloc, yytext, yyleng); \
627 	}
628 
629 /*#define LEXDEBUG	1*/
630 
631 #ifdef LEXDEBUG
632 #define DPRINT(fmt, ...)	fprintf(stderr, fmt, ##__VA_ARGS__)
633 #else
634 #define DPRINT(fmt, ...)	do { } while (0)
635 #endif
636 
637 static int dts_version = 1;
638 
639 #define BEGIN_DEFAULT()		DPRINT("<V1>\n"); \
640 				BEGIN(V1); \
641 
642 static void push_input_file(const char *filename);
643 static bool pop_input_file(void);
644 static void PRINTF(1, 2) lexical_error(const char *fmt, ...);
645 
646 #line 646 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
647 #line 647 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
648 
649 #define INITIAL 0
650 #define BYTESTRING 1
651 #define PROPNODENAME 2
652 #define V1 3
653 
654 #ifndef YY_NO_UNISTD_H
655 /* Special case for "unistd.h", since it is non-ANSI. We include it way
656  * down here because we want the user's section 1 to have been scanned first.
657  * The user has a chance to override it with an option.
658  */
659 #include <unistd.h>
660 #endif
661 
662 #ifndef YY_EXTRA_TYPE
663 #define YY_EXTRA_TYPE void *
664 #endif
665 
666 static int yy_init_globals ( void );
667 
668 /* Accessor methods to globals.
669    These are made visible to non-reentrant scanners for convenience. */
670 
671 int yylex_destroy ( void );
672 
673 int yyget_debug ( void );
674 
675 void yyset_debug ( int debug_flag  );
676 
677 YY_EXTRA_TYPE yyget_extra ( void );
678 
679 void yyset_extra ( YY_EXTRA_TYPE user_defined  );
680 
681 FILE *yyget_in ( void );
682 
683 void yyset_in  ( FILE * _in_str  );
684 
685 FILE *yyget_out ( void );
686 
687 void yyset_out  ( FILE * _out_str  );
688 
689 			int yyget_leng ( void );
690 
691 char *yyget_text ( void );
692 
693 int yyget_lineno ( void );
694 
695 void yyset_lineno ( int _line_number  );
696 
697 /* Macros after this point can all be overridden by user definitions in
698  * section 1.
699  */
700 
701 #ifndef YY_SKIP_YYWRAP
702 #ifdef __cplusplus
703 extern "C" int yywrap ( void );
704 #else
705 extern int yywrap ( void );
706 #endif
707 #endif
708 
709 #ifndef YY_NO_UNPUT
710 
711 #endif
712 
713 #ifndef yytext_ptr
714 static void yy_flex_strncpy ( char *, const char *, int );
715 #endif
716 
717 #ifdef YY_NEED_STRLEN
718 static int yy_flex_strlen ( const char * );
719 #endif
720 
721 #ifndef YY_NO_INPUT
722 #ifdef __cplusplus
723 static int yyinput ( void );
724 #else
725 static int input ( void );
726 #endif
727 
728 #endif
729 
730 /* Amount of stuff to slurp up with each read. */
731 #ifndef YY_READ_BUF_SIZE
732 #ifdef __ia64__
733 /* On IA-64, the buffer size is 16k, not 8k */
734 #define YY_READ_BUF_SIZE 16384
735 #else
736 #define YY_READ_BUF_SIZE 8192
737 #endif /* __ia64__ */
738 #endif
739 
740 /* Copy whatever the last rule matched to the standard output. */
741 #ifndef ECHO
742 /* This used to be an fputs(), but since the string might contain NUL's,
743  * we now use fwrite().
744  */
745 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
746 #endif
747 
748 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
749  * is returned in "result".
750  */
751 #ifndef YY_INPUT
752 #define YY_INPUT(buf,result,max_size) \
753 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
754 		{ \
755 		int c = '*'; \
756 		int n; \
757 		for ( n = 0; n < max_size && \
758 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
759 			buf[n] = (char) c; \
760 		if ( c == '\n' ) \
761 			buf[n++] = (char) c; \
762 		if ( c == EOF && ferror( yyin ) ) \
763 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
764 		result = n; \
765 		} \
766 	else \
767 		{ \
768 		errno=0; \
769 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
770 			{ \
771 			if( errno != EINTR) \
772 				{ \
773 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
774 				break; \
775 				} \
776 			errno=0; \
777 			clearerr(yyin); \
778 			} \
779 		}\
780 \
781 
782 #endif
783 
784 /* No semi-colon after return; correct usage is to write "yyterminate();" -
785  * we don't want an extra ';' after the "return" because that will cause
786  * some compilers to complain about unreachable statements.
787  */
788 #ifndef yyterminate
789 #define yyterminate() return YY_NULL
790 #endif
791 
792 /* Number of entries by which start-condition stack grows. */
793 #ifndef YY_START_STACK_INCR
794 #define YY_START_STACK_INCR 25
795 #endif
796 
797 /* Report a fatal error. */
798 #ifndef YY_FATAL_ERROR
799 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
800 #endif
801 
802 /* end tables serialization structures and prototypes */
803 
804 /* Default declaration of generated scanner - a define so the user can
805  * easily add parameters.
806  */
807 #ifndef YY_DECL
808 #define YY_DECL_IS_OURS 1
809 
810 extern int yylex (void);
811 
812 #define YY_DECL int yylex (void)
813 #endif /* !YY_DECL */
814 
815 /* Code executed at the beginning of each rule, after yytext and yyleng
816  * have been set up.
817  */
818 #ifndef YY_USER_ACTION
819 #define YY_USER_ACTION
820 #endif
821 
822 /* Code executed at the end of each rule. */
823 #ifndef YY_BREAK
824 #define YY_BREAK /*LINTED*/break;
825 #endif
826 
827 #define YY_RULE_SETUP \
828 	if ( yyleng > 0 ) \
829 		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
830 				(yytext[yyleng - 1] == '\n'); \
831 	YY_USER_ACTION
832 
833 /** The main scanner function which does all the work.
834  */
835 YY_DECL
836 {
837 	yy_state_type yy_current_state;
838 	char *yy_cp, *yy_bp;
839 	int yy_act;
840 
841 	if ( !(yy_init) )
842 		{
843 		(yy_init) = 1;
844 
845 #ifdef YY_USER_INIT
846 		YY_USER_INIT;
847 #endif
848 
849 		if ( ! (yy_start) )
850 			(yy_start) = 1;	/* first start state */
851 
852 		if ( ! yyin )
853 			yyin = stdin;
854 
855 		if ( ! yyout )
856 			yyout = stdout;
857 
858 		if ( ! YY_CURRENT_BUFFER ) {
859 			yyensure_buffer_stack ();
860 			YY_CURRENT_BUFFER_LVALUE =
861 				yy_create_buffer( yyin, YY_BUF_SIZE );
862 		}
863 
864 		yy_load_buffer_state(  );
865 		}
866 
867 	{
868 #line 53 "external/dtc/dtc-lexer.l"
869 
870 #line 870 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
871 
872 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
873 		{
874 		yy_cp = (yy_c_buf_p);
875 
876 		/* Support of yytext. */
877 		*yy_cp = (yy_hold_char);
878 
879 		/* yy_bp points to the position in yy_ch_buf of the start of
880 		 * the current run.
881 		 */
882 		yy_bp = yy_cp;
883 
884 		yy_current_state = (yy_start);
885 		yy_current_state += YY_AT_BOL();
886 yy_match:
887 		do
888 			{
889 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
890 			if ( yy_accept[yy_current_state] )
891 				{
892 				(yy_last_accepting_state) = yy_current_state;
893 				(yy_last_accepting_cpos) = yy_cp;
894 				}
895 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
896 				{
897 				yy_current_state = (int) yy_def[yy_current_state];
898 				if ( yy_current_state >= 180 )
899 					yy_c = yy_meta[yy_c];
900 				}
901 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
902 			++yy_cp;
903 			}
904 		while ( yy_current_state != 179 );
905 		yy_cp = (yy_last_accepting_cpos);
906 		yy_current_state = (yy_last_accepting_state);
907 
908 yy_find_action:
909 		yy_act = yy_accept[yy_current_state];
910 
911 		YY_DO_BEFORE_ACTION;
912 
913 do_action:	/* This label is used only to access EOF actions. */
914 
915 		switch ( yy_act )
916 	{ /* beginning of action switch */
917 			case 0: /* must back up */
918 			/* undo the effects of YY_DO_BEFORE_ACTION */
919 			*yy_cp = (yy_hold_char);
920 			yy_cp = (yy_last_accepting_cpos);
921 			yy_current_state = (yy_last_accepting_state);
922 			goto yy_find_action;
923 
924 case 1:
925 /* rule 1 can match eol */
926 YY_RULE_SETUP
927 #line 54 "external/dtc/dtc-lexer.l"
928 {
929 			char *name = strchr(yytext, '\"') + 1;
930 			yytext[yyleng-1] = '\0';
931 			push_input_file(name);
932 		}
933 	YY_BREAK
934 case 2:
935 /* rule 2 can match eol */
936 YY_RULE_SETUP
937 #line 60 "external/dtc/dtc-lexer.l"
938 {
939 			char *line, *fnstart, *fnend;
940 			struct data fn;
941 			/* skip text before line # */
942 			line = yytext;
943 			while (!isdigit((unsigned char)*line))
944 				line++;
945 
946 			/* regexp ensures that first and list "
947 			 * in the whole yytext are those at
948 			 * beginning and end of the filename string */
949 			fnstart = memchr(yytext, '"', yyleng);
950 			for (fnend = yytext + yyleng - 1;
951 			     *fnend != '"'; fnend--)
952 				;
953 			assert(fnstart && fnend && (fnend > fnstart));
954 
955 			fn = data_copy_escape_string(fnstart + 1,
956 						     fnend - fnstart - 1);
957 
958 			/* Don't allow nuls in filenames */
959 			if (memchr(fn.val, '\0', fn.len - 1))
960 				lexical_error("nul in line number directive");
961 
962 			/* -1 since #line is the number of the next line */
963 			srcpos_set_line(xstrdup(fn.val), atoi(line) - 1);
964 			data_free(fn);
965 		}
966 	YY_BREAK
967 case YY_STATE_EOF(INITIAL):
968 case YY_STATE_EOF(BYTESTRING):
969 case YY_STATE_EOF(PROPNODENAME):
970 case YY_STATE_EOF(V1):
971 #line 89 "external/dtc/dtc-lexer.l"
972 {
973 			if (!pop_input_file()) {
974 				yyterminate();
975 			}
976 		}
977 	YY_BREAK
978 case 3:
979 /* rule 3 can match eol */
980 YY_RULE_SETUP
981 #line 95 "external/dtc/dtc-lexer.l"
982 {
983 			DPRINT("String: %s\n", yytext);
984 			yylval.data = data_copy_escape_string(yytext+1,
985 					yyleng-2);
986 			return DT_STRING;
987 		}
988 	YY_BREAK
989 case 4:
990 YY_RULE_SETUP
991 #line 102 "external/dtc/dtc-lexer.l"
992 {
993 			DPRINT("Keyword: /dts-v1/\n");
994 			dts_version = 1;
995 			BEGIN_DEFAULT();
996 			return DT_V1;
997 		}
998 	YY_BREAK
999 case 5:
1000 YY_RULE_SETUP
1001 #line 109 "external/dtc/dtc-lexer.l"
1002 {
1003 			DPRINT("Keyword: /plugin/\n");
1004 			return DT_PLUGIN;
1005 		}
1006 	YY_BREAK
1007 case 6:
1008 YY_RULE_SETUP
1009 #line 114 "external/dtc/dtc-lexer.l"
1010 {
1011 			DPRINT("Keyword: /memreserve/\n");
1012 			BEGIN_DEFAULT();
1013 			return DT_MEMRESERVE;
1014 		}
1015 	YY_BREAK
1016 case 7:
1017 YY_RULE_SETUP
1018 #line 120 "external/dtc/dtc-lexer.l"
1019 {
1020 			DPRINT("Keyword: /bits/\n");
1021 			BEGIN_DEFAULT();
1022 			return DT_BITS;
1023 		}
1024 	YY_BREAK
1025 case 8:
1026 YY_RULE_SETUP
1027 #line 126 "external/dtc/dtc-lexer.l"
1028 {
1029 			DPRINT("Keyword: /delete-property/\n");
1030 			DPRINT("<PROPNODENAME>\n");
1031 			BEGIN(PROPNODENAME);
1032 			return DT_DEL_PROP;
1033 		}
1034 	YY_BREAK
1035 case 9:
1036 YY_RULE_SETUP
1037 #line 133 "external/dtc/dtc-lexer.l"
1038 {
1039 			DPRINT("Keyword: /delete-node/\n");
1040 			DPRINT("<PROPNODENAME>\n");
1041 			BEGIN(PROPNODENAME);
1042 			return DT_DEL_NODE;
1043 		}
1044 	YY_BREAK
1045 case 10:
1046 YY_RULE_SETUP
1047 #line 140 "external/dtc/dtc-lexer.l"
1048 {
1049 			DPRINT("Keyword: /omit-if-no-ref/\n");
1050 			DPRINT("<PROPNODENAME>\n");
1051 			BEGIN(PROPNODENAME);
1052 			return DT_OMIT_NO_REF;
1053 		}
1054 	YY_BREAK
1055 case 11:
1056 YY_RULE_SETUP
1057 #line 147 "external/dtc/dtc-lexer.l"
1058 {
1059 			DPRINT("Label: %s\n", yytext);
1060 			yylval.labelref = xstrdup(yytext);
1061 			yylval.labelref[yyleng-1] = '\0';
1062 			return DT_LABEL;
1063 		}
1064 	YY_BREAK
1065 case 12:
1066 YY_RULE_SETUP
1067 #line 154 "external/dtc/dtc-lexer.l"
1068 {
1069 			char *e;
1070 			DPRINT("Integer Literal: '%s'\n", yytext);
1071 
1072 			errno = 0;
1073 			yylval.integer = strtoull(yytext, &e, 0);
1074 
1075 			if (*e && e[strspn(e, "UL")]) {
1076 				lexical_error("Bad integer literal '%s'",
1077 					      yytext);
1078 			}
1079 
1080 			if (errno == ERANGE)
1081 				lexical_error("Integer literal '%s' out of range",
1082 					      yytext);
1083 			else
1084 				/* ERANGE is the only strtoull error triggerable
1085 				 *  by strings matching the pattern */
1086 				assert(errno == 0);
1087 			return DT_LITERAL;
1088 		}
1089 	YY_BREAK
1090 case 13:
1091 /* rule 13 can match eol */
1092 YY_RULE_SETUP
1093 #line 176 "external/dtc/dtc-lexer.l"
1094 {
1095 			struct data d;
1096 			DPRINT("Character literal: %s\n", yytext);
1097 
1098 			d = data_copy_escape_string(yytext+1, yyleng-2);
1099 			if (d.len == 1) {
1100 				lexical_error("Empty character literal");
1101 				yylval.integer = 0;
1102 			} else {
1103 				yylval.integer = (unsigned char)d.val[0];
1104 
1105 				if (d.len > 2)
1106 					lexical_error("Character literal has %d"
1107 						      " characters instead of 1",
1108 						      d.len - 1);
1109 			}
1110 
1111 			data_free(d);
1112 			return DT_CHAR_LITERAL;
1113 		}
1114 	YY_BREAK
1115 case 14:
1116 YY_RULE_SETUP
1117 #line 197 "external/dtc/dtc-lexer.l"
1118 {	/* label reference */
1119 			DPRINT("Ref: %s\n", yytext+1);
1120 			yylval.labelref = xstrdup(yytext+1);
1121 			return DT_LABEL_REF;
1122 		}
1123 	YY_BREAK
1124 case 15:
1125 YY_RULE_SETUP
1126 #line 203 "external/dtc/dtc-lexer.l"
1127 {	/* new-style path reference */
1128 			yytext[yyleng-1] = '\0';
1129 			DPRINT("Ref: %s\n", yytext+2);
1130 			yylval.labelref = xstrdup(yytext+2);
1131 			return DT_PATH_REF;
1132 		}
1133 	YY_BREAK
1134 case 16:
1135 YY_RULE_SETUP
1136 #line 210 "external/dtc/dtc-lexer.l"
1137 {
1138 			yylval.byte = strtol(yytext, NULL, 16);
1139 			DPRINT("Byte: %02x\n", (int)yylval.byte);
1140 			return DT_BYTE;
1141 		}
1142 	YY_BREAK
1143 case 17:
1144 YY_RULE_SETUP
1145 #line 216 "external/dtc/dtc-lexer.l"
1146 {
1147 			DPRINT("/BYTESTRING\n");
1148 			BEGIN_DEFAULT();
1149 			return ']';
1150 		}
1151 	YY_BREAK
1152 case 18:
1153 YY_RULE_SETUP
1154 #line 222 "external/dtc/dtc-lexer.l"
1155 {
1156 			DPRINT("PropNodeName: %s\n", yytext);
1157 			yylval.propnodename = xstrdup((yytext[0] == '\\') ?
1158 							yytext + 1 : yytext);
1159 			BEGIN_DEFAULT();
1160 			return DT_PROPNODENAME;
1161 		}
1162 	YY_BREAK
1163 case 19:
1164 YY_RULE_SETUP
1165 #line 230 "external/dtc/dtc-lexer.l"
1166 {
1167 			DPRINT("Binary Include\n");
1168 			return DT_INCBIN;
1169 		}
1170 	YY_BREAK
1171 case 20:
1172 /* rule 20 can match eol */
1173 YY_RULE_SETUP
1174 #line 235 "external/dtc/dtc-lexer.l"
1175 /* eat whitespace */
1176 	YY_BREAK
1177 case 21:
1178 /* rule 21 can match eol */
1179 YY_RULE_SETUP
1180 #line 236 "external/dtc/dtc-lexer.l"
1181 /* eat C-style comments */
1182 	YY_BREAK
1183 case 22:
1184 /* rule 22 can match eol */
1185 YY_RULE_SETUP
1186 #line 237 "external/dtc/dtc-lexer.l"
1187 /* eat C++-style comments */
1188 	YY_BREAK
1189 case 23:
1190 YY_RULE_SETUP
1191 #line 239 "external/dtc/dtc-lexer.l"
1192 { return DT_LSHIFT; };
1193 	YY_BREAK
1194 case 24:
1195 YY_RULE_SETUP
1196 #line 240 "external/dtc/dtc-lexer.l"
1197 { return DT_RSHIFT; };
1198 	YY_BREAK
1199 case 25:
1200 YY_RULE_SETUP
1201 #line 241 "external/dtc/dtc-lexer.l"
1202 { return DT_LE; };
1203 	YY_BREAK
1204 case 26:
1205 YY_RULE_SETUP
1206 #line 242 "external/dtc/dtc-lexer.l"
1207 { return DT_GE; };
1208 	YY_BREAK
1209 case 27:
1210 YY_RULE_SETUP
1211 #line 243 "external/dtc/dtc-lexer.l"
1212 { return DT_EQ; };
1213 	YY_BREAK
1214 case 28:
1215 YY_RULE_SETUP
1216 #line 244 "external/dtc/dtc-lexer.l"
1217 { return DT_NE; };
1218 	YY_BREAK
1219 case 29:
1220 YY_RULE_SETUP
1221 #line 245 "external/dtc/dtc-lexer.l"
1222 { return DT_AND; };
1223 	YY_BREAK
1224 case 30:
1225 YY_RULE_SETUP
1226 #line 246 "external/dtc/dtc-lexer.l"
1227 { return DT_OR; };
1228 	YY_BREAK
1229 case 31:
1230 YY_RULE_SETUP
1231 #line 248 "external/dtc/dtc-lexer.l"
1232 {
1233 			DPRINT("Char: %c (\\x%02x)\n", yytext[0],
1234 				(unsigned)yytext[0]);
1235 			if (yytext[0] == '[') {
1236 				DPRINT("<BYTESTRING>\n");
1237 				BEGIN(BYTESTRING);
1238 			}
1239 			if ((yytext[0] == '{')
1240 			    || (yytext[0] == ';')) {
1241 				DPRINT("<PROPNODENAME>\n");
1242 				BEGIN(PROPNODENAME);
1243 			}
1244 			return yytext[0];
1245 		}
1246 	YY_BREAK
1247 case 32:
1248 YY_RULE_SETUP
1249 #line 263 "external/dtc/dtc-lexer.l"
1250 ECHO;
1251 	YY_BREAK
1252 #line 1252 "out/soong/.intermediates/external/dtc/dtc/linux_glibc_x86_64/gen/lex/external/dtc/dtc-lexer.c"
1253 
1254 	case YY_END_OF_BUFFER:
1255 		{
1256 		/* Amount of text matched not including the EOB char. */
1257 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1258 
1259 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1260 		*yy_cp = (yy_hold_char);
1261 		YY_RESTORE_YY_MORE_OFFSET
1262 
1263 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1264 			{
1265 			/* We're scanning a new file or input source.  It's
1266 			 * possible that this happened because the user
1267 			 * just pointed yyin at a new source and called
1268 			 * yylex().  If so, then we have to assure
1269 			 * consistency between YY_CURRENT_BUFFER and our
1270 			 * globals.  Here is the right place to do so, because
1271 			 * this is the first action (other than possibly a
1272 			 * back-up) that will match for the new input source.
1273 			 */
1274 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1275 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1276 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1277 			}
1278 
1279 		/* Note that here we test for yy_c_buf_p "<=" to the position
1280 		 * of the first EOB in the buffer, since yy_c_buf_p will
1281 		 * already have been incremented past the NUL character
1282 		 * (since all states make transitions on EOB to the
1283 		 * end-of-buffer state).  Contrast this with the test
1284 		 * in input().
1285 		 */
1286 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1287 			{ /* This was really a NUL. */
1288 			yy_state_type yy_next_state;
1289 
1290 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1291 
1292 			yy_current_state = yy_get_previous_state(  );
1293 
1294 			/* Okay, we're now positioned to make the NUL
1295 			 * transition.  We couldn't have
1296 			 * yy_get_previous_state() go ahead and do it
1297 			 * for us because it doesn't know how to deal
1298 			 * with the possibility of jamming (and we don't
1299 			 * want to build jamming into it because then it
1300 			 * will run more slowly).
1301 			 */
1302 
1303 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1304 
1305 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1306 
1307 			if ( yy_next_state )
1308 				{
1309 				/* Consume the NUL. */
1310 				yy_cp = ++(yy_c_buf_p);
1311 				yy_current_state = yy_next_state;
1312 				goto yy_match;
1313 				}
1314 
1315 			else
1316 				{
1317 				yy_cp = (yy_last_accepting_cpos);
1318 				yy_current_state = (yy_last_accepting_state);
1319 				goto yy_find_action;
1320 				}
1321 			}
1322 
1323 		else switch ( yy_get_next_buffer(  ) )
1324 			{
1325 			case EOB_ACT_END_OF_FILE:
1326 				{
1327 				(yy_did_buffer_switch_on_eof) = 0;
1328 
1329 				if ( yywrap(  ) )
1330 					{
1331 					/* Note: because we've taken care in
1332 					 * yy_get_next_buffer() to have set up
1333 					 * yytext, we can now set up
1334 					 * yy_c_buf_p so that if some total
1335 					 * hoser (like flex itself) wants to
1336 					 * call the scanner after we return the
1337 					 * YY_NULL, it'll still work - another
1338 					 * YY_NULL will get returned.
1339 					 */
1340 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1341 
1342 					yy_act = YY_STATE_EOF(YY_START);
1343 					goto do_action;
1344 					}
1345 
1346 				else
1347 					{
1348 					if ( ! (yy_did_buffer_switch_on_eof) )
1349 						YY_NEW_FILE;
1350 					}
1351 				break;
1352 				}
1353 
1354 			case EOB_ACT_CONTINUE_SCAN:
1355 				(yy_c_buf_p) =
1356 					(yytext_ptr) + yy_amount_of_matched_text;
1357 
1358 				yy_current_state = yy_get_previous_state(  );
1359 
1360 				yy_cp = (yy_c_buf_p);
1361 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1362 				goto yy_match;
1363 
1364 			case EOB_ACT_LAST_MATCH:
1365 				(yy_c_buf_p) =
1366 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1367 
1368 				yy_current_state = yy_get_previous_state(  );
1369 
1370 				yy_cp = (yy_c_buf_p);
1371 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1372 				goto yy_find_action;
1373 			}
1374 		break;
1375 		}
1376 
1377 	default:
1378 		YY_FATAL_ERROR(
1379 			"fatal flex scanner internal error--no action found" );
1380 	} /* end of action switch */
1381 		} /* end of scanning one token */
1382 	} /* end of user's declarations */
1383 } /* end of yylex */
1384 
1385 /* yy_get_next_buffer - try to read in a new buffer
1386  *
1387  * Returns a code representing an action:
1388  *	EOB_ACT_LAST_MATCH -
1389  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1390  *	EOB_ACT_END_OF_FILE - end of file
1391  */
yy_get_next_buffer(void)1392 static int yy_get_next_buffer (void)
1393 {
1394     	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1395 	char *source = (yytext_ptr);
1396 	int number_to_move, i;
1397 	int ret_val;
1398 
1399 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1400 		YY_FATAL_ERROR(
1401 		"fatal flex scanner internal error--end of buffer missed" );
1402 
1403 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1404 		{ /* Don't try to fill the buffer, so this is an EOF. */
1405 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1406 			{
1407 			/* We matched a single character, the EOB, so
1408 			 * treat this as a final EOF.
1409 			 */
1410 			return EOB_ACT_END_OF_FILE;
1411 			}
1412 
1413 		else
1414 			{
1415 			/* We matched some text prior to the EOB, first
1416 			 * process it.
1417 			 */
1418 			return EOB_ACT_LAST_MATCH;
1419 			}
1420 		}
1421 
1422 	/* Try to read more data. */
1423 
1424 	/* First move last chars to start of buffer. */
1425 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1426 
1427 	for ( i = 0; i < number_to_move; ++i )
1428 		*(dest++) = *(source++);
1429 
1430 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1431 		/* don't do the read, it's not guaranteed to return an EOF,
1432 		 * just force an EOF
1433 		 */
1434 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1435 
1436 	else
1437 		{
1438 			int num_to_read =
1439 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1440 
1441 		while ( num_to_read <= 0 )
1442 			{ /* Not enough room in the buffer - grow it. */
1443 
1444 			/* just a shorter name for the current buffer */
1445 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1446 
1447 			int yy_c_buf_p_offset =
1448 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1449 
1450 			if ( b->yy_is_our_buffer )
1451 				{
1452 				int new_size = b->yy_buf_size * 2;
1453 
1454 				if ( new_size <= 0 )
1455 					b->yy_buf_size += b->yy_buf_size / 8;
1456 				else
1457 					b->yy_buf_size *= 2;
1458 
1459 				b->yy_ch_buf = (char *)
1460 					/* Include room in for 2 EOB chars. */
1461 					yyrealloc( (void *) b->yy_ch_buf,
1462 							 (yy_size_t) (b->yy_buf_size + 2)  );
1463 				}
1464 			else
1465 				/* Can't grow it, we don't own it. */
1466 				b->yy_ch_buf = NULL;
1467 
1468 			if ( ! b->yy_ch_buf )
1469 				YY_FATAL_ERROR(
1470 				"fatal error - scanner input buffer overflow" );
1471 
1472 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1473 
1474 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1475 						number_to_move - 1;
1476 
1477 			}
1478 
1479 		if ( num_to_read > YY_READ_BUF_SIZE )
1480 			num_to_read = YY_READ_BUF_SIZE;
1481 
1482 		/* Read in more data. */
1483 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1484 			(yy_n_chars), num_to_read );
1485 
1486 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1487 		}
1488 
1489 	if ( (yy_n_chars) == 0 )
1490 		{
1491 		if ( number_to_move == YY_MORE_ADJ )
1492 			{
1493 			ret_val = EOB_ACT_END_OF_FILE;
1494 			yyrestart( yyin  );
1495 			}
1496 
1497 		else
1498 			{
1499 			ret_val = EOB_ACT_LAST_MATCH;
1500 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1501 				YY_BUFFER_EOF_PENDING;
1502 			}
1503 		}
1504 
1505 	else
1506 		ret_val = EOB_ACT_CONTINUE_SCAN;
1507 
1508 	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1509 		/* Extend the array by 50%, plus the number we really need. */
1510 		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1511 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1512 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1513 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1514 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1515 		/* "- 2" to take care of EOB's */
1516 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1517 	}
1518 
1519 	(yy_n_chars) += number_to_move;
1520 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1521 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1522 
1523 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1524 
1525 	return ret_val;
1526 }
1527 
1528 /* yy_get_previous_state - get the state just before the EOB char was reached */
1529 
yy_get_previous_state(void)1530     static yy_state_type yy_get_previous_state (void)
1531 {
1532 	yy_state_type yy_current_state;
1533 	char *yy_cp;
1534 
1535 	yy_current_state = (yy_start);
1536 	yy_current_state += YY_AT_BOL();
1537 
1538 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1539 		{
1540 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1541 		if ( yy_accept[yy_current_state] )
1542 			{
1543 			(yy_last_accepting_state) = yy_current_state;
1544 			(yy_last_accepting_cpos) = yy_cp;
1545 			}
1546 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1547 			{
1548 			yy_current_state = (int) yy_def[yy_current_state];
1549 			if ( yy_current_state >= 180 )
1550 				yy_c = yy_meta[yy_c];
1551 			}
1552 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1553 		}
1554 
1555 	return yy_current_state;
1556 }
1557 
1558 /* yy_try_NUL_trans - try to make a transition on the NUL character
1559  *
1560  * synopsis
1561  *	next_state = yy_try_NUL_trans( current_state );
1562  */
yy_try_NUL_trans(yy_state_type yy_current_state)1563     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1564 {
1565 	int yy_is_jam;
1566     	char *yy_cp = (yy_c_buf_p);
1567 
1568 	YY_CHAR yy_c = 1;
1569 	if ( yy_accept[yy_current_state] )
1570 		{
1571 		(yy_last_accepting_state) = yy_current_state;
1572 		(yy_last_accepting_cpos) = yy_cp;
1573 		}
1574 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1575 		{
1576 		yy_current_state = (int) yy_def[yy_current_state];
1577 		if ( yy_current_state >= 180 )
1578 			yy_c = yy_meta[yy_c];
1579 		}
1580 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1581 	yy_is_jam = (yy_current_state == 179);
1582 
1583 		return yy_is_jam ? 0 : yy_current_state;
1584 }
1585 
1586 #ifndef YY_NO_UNPUT
1587 
1588 #endif
1589 
1590 #ifndef YY_NO_INPUT
1591 #ifdef __cplusplus
yyinput(void)1592     static int yyinput (void)
1593 #else
1594     static int input  (void)
1595 #endif
1596 
1597 {
1598 	int c;
1599 
1600 	*(yy_c_buf_p) = (yy_hold_char);
1601 
1602 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1603 		{
1604 		/* yy_c_buf_p now points to the character we want to return.
1605 		 * If this occurs *before* the EOB characters, then it's a
1606 		 * valid NUL; if not, then we've hit the end of the buffer.
1607 		 */
1608 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1609 			/* This was really a NUL. */
1610 			*(yy_c_buf_p) = '\0';
1611 
1612 		else
1613 			{ /* need more input */
1614 			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1615 			++(yy_c_buf_p);
1616 
1617 			switch ( yy_get_next_buffer(  ) )
1618 				{
1619 				case EOB_ACT_LAST_MATCH:
1620 					/* This happens because yy_g_n_b()
1621 					 * sees that we've accumulated a
1622 					 * token and flags that we need to
1623 					 * try matching the token before
1624 					 * proceeding.  But for input(),
1625 					 * there's no matching to consider.
1626 					 * So convert the EOB_ACT_LAST_MATCH
1627 					 * to EOB_ACT_END_OF_FILE.
1628 					 */
1629 
1630 					/* Reset buffer status. */
1631 					yyrestart( yyin );
1632 
1633 					/*FALLTHROUGH*/
1634 
1635 				case EOB_ACT_END_OF_FILE:
1636 					{
1637 					if ( yywrap(  ) )
1638 						return 0;
1639 
1640 					if ( ! (yy_did_buffer_switch_on_eof) )
1641 						YY_NEW_FILE;
1642 #ifdef __cplusplus
1643 					return yyinput();
1644 #else
1645 					return input();
1646 #endif
1647 					}
1648 
1649 				case EOB_ACT_CONTINUE_SCAN:
1650 					(yy_c_buf_p) = (yytext_ptr) + offset;
1651 					break;
1652 				}
1653 			}
1654 		}
1655 
1656 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
1657 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
1658 	(yy_hold_char) = *++(yy_c_buf_p);
1659 
1660 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1661 
1662 	return c;
1663 }
1664 #endif	/* ifndef YY_NO_INPUT */
1665 
1666 /** Immediately switch to a different input stream.
1667  * @param input_file A readable stream.
1668  *
1669  * @note This function does not reset the start condition to @c INITIAL .
1670  */
yyrestart(FILE * input_file)1671     void yyrestart  (FILE * input_file )
1672 {
1673 
1674 	if ( ! YY_CURRENT_BUFFER ){
1675         yyensure_buffer_stack ();
1676 		YY_CURRENT_BUFFER_LVALUE =
1677             yy_create_buffer( yyin, YY_BUF_SIZE );
1678 	}
1679 
1680 	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1681 	yy_load_buffer_state(  );
1682 }
1683 
1684 /** Switch to a different input buffer.
1685  * @param new_buffer The new input buffer.
1686  *
1687  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1688     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1689 {
1690 
1691 	/* TODO. We should be able to replace this entire function body
1692 	 * with
1693 	 *		yypop_buffer_state();
1694 	 *		yypush_buffer_state(new_buffer);
1695      */
1696 	yyensure_buffer_stack ();
1697 	if ( YY_CURRENT_BUFFER == new_buffer )
1698 		return;
1699 
1700 	if ( YY_CURRENT_BUFFER )
1701 		{
1702 		/* Flush out information for old buffer. */
1703 		*(yy_c_buf_p) = (yy_hold_char);
1704 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1705 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1706 		}
1707 
1708 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1709 	yy_load_buffer_state(  );
1710 
1711 	/* We don't actually know whether we did this switch during
1712 	 * EOF (yywrap()) processing, but the only time this flag
1713 	 * is looked at is after yywrap() is called, so it's safe
1714 	 * to go ahead and always set it.
1715 	 */
1716 	(yy_did_buffer_switch_on_eof) = 1;
1717 }
1718 
yy_load_buffer_state(void)1719 static void yy_load_buffer_state  (void)
1720 {
1721     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1722 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1723 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1724 	(yy_hold_char) = *(yy_c_buf_p);
1725 }
1726 
1727 /** Allocate and initialize an input buffer state.
1728  * @param file A readable stream.
1729  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1730  *
1731  * @return the allocated buffer state.
1732  */
yy_create_buffer(FILE * file,int size)1733     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1734 {
1735 	YY_BUFFER_STATE b;
1736 
1737 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1738 	if ( ! b )
1739 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1740 
1741 	b->yy_buf_size = size;
1742 
1743 	/* yy_ch_buf has to be 2 characters longer than the size given because
1744 	 * we need to put in 2 end-of-buffer characters.
1745 	 */
1746 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
1747 	if ( ! b->yy_ch_buf )
1748 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1749 
1750 	b->yy_is_our_buffer = 1;
1751 
1752 	yy_init_buffer( b, file );
1753 
1754 	return b;
1755 }
1756 
1757 /** Destroy the buffer.
1758  * @param b a buffer created with yy_create_buffer()
1759  *
1760  */
yy_delete_buffer(YY_BUFFER_STATE b)1761     void yy_delete_buffer (YY_BUFFER_STATE  b )
1762 {
1763 
1764 	if ( ! b )
1765 		return;
1766 
1767 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1768 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1769 
1770 	if ( b->yy_is_our_buffer )
1771 		yyfree( (void *) b->yy_ch_buf  );
1772 
1773 	yyfree( (void *) b  );
1774 }
1775 
1776 /* Initializes or reinitializes a buffer.
1777  * This function is sometimes called more than once on the same buffer,
1778  * such as during a yyrestart() or at EOF.
1779  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1780     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1781 
1782 {
1783 	int oerrno = errno;
1784 
1785 	yy_flush_buffer( b );
1786 
1787 	b->yy_input_file = file;
1788 	b->yy_fill_buffer = 1;
1789 
1790     /* If b is the current buffer, then yy_init_buffer was _probably_
1791      * called from yyrestart() or through yy_get_next_buffer.
1792      * In that case, we don't want to reset the lineno or column.
1793      */
1794     if (b != YY_CURRENT_BUFFER){
1795         b->yy_bs_lineno = 1;
1796         b->yy_bs_column = 0;
1797     }
1798 
1799         b->yy_is_interactive = 0;
1800 
1801 	errno = oerrno;
1802 }
1803 
1804 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1805  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1806  *
1807  */
yy_flush_buffer(YY_BUFFER_STATE b)1808     void yy_flush_buffer (YY_BUFFER_STATE  b )
1809 {
1810     	if ( ! b )
1811 		return;
1812 
1813 	b->yy_n_chars = 0;
1814 
1815 	/* We always need two end-of-buffer characters.  The first causes
1816 	 * a transition to the end-of-buffer state.  The second causes
1817 	 * a jam in that state.
1818 	 */
1819 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1820 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1821 
1822 	b->yy_buf_pos = &b->yy_ch_buf[0];
1823 
1824 	b->yy_at_bol = 1;
1825 	b->yy_buffer_status = YY_BUFFER_NEW;
1826 
1827 	if ( b == YY_CURRENT_BUFFER )
1828 		yy_load_buffer_state(  );
1829 }
1830 
1831 /** Pushes the new state onto the stack. The new state becomes
1832  *  the current state. This function will allocate the stack
1833  *  if necessary.
1834  *  @param new_buffer The new state.
1835  *
1836  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)1837 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1838 {
1839     	if (new_buffer == NULL)
1840 		return;
1841 
1842 	yyensure_buffer_stack();
1843 
1844 	/* This block is copied from yy_switch_to_buffer. */
1845 	if ( YY_CURRENT_BUFFER )
1846 		{
1847 		/* Flush out information for old buffer. */
1848 		*(yy_c_buf_p) = (yy_hold_char);
1849 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1850 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1851 		}
1852 
1853 	/* Only push if top exists. Otherwise, replace top. */
1854 	if (YY_CURRENT_BUFFER)
1855 		(yy_buffer_stack_top)++;
1856 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1857 
1858 	/* copied from yy_switch_to_buffer. */
1859 	yy_load_buffer_state(  );
1860 	(yy_did_buffer_switch_on_eof) = 1;
1861 }
1862 
1863 /** Removes and deletes the top of the stack, if present.
1864  *  The next element becomes the new top.
1865  *
1866  */
yypop_buffer_state(void)1867 void yypop_buffer_state (void)
1868 {
1869     	if (!YY_CURRENT_BUFFER)
1870 		return;
1871 
1872 	yy_delete_buffer(YY_CURRENT_BUFFER );
1873 	YY_CURRENT_BUFFER_LVALUE = NULL;
1874 	if ((yy_buffer_stack_top) > 0)
1875 		--(yy_buffer_stack_top);
1876 
1877 	if (YY_CURRENT_BUFFER) {
1878 		yy_load_buffer_state(  );
1879 		(yy_did_buffer_switch_on_eof) = 1;
1880 	}
1881 }
1882 
1883 /* Allocates the stack if it does not exist.
1884  *  Guarantees space for at least one push.
1885  */
yyensure_buffer_stack(void)1886 static void yyensure_buffer_stack (void)
1887 {
1888 	yy_size_t num_to_alloc;
1889 
1890 	if (!(yy_buffer_stack)) {
1891 
1892 		/* First allocation is just for 2 elements, since we don't know if this
1893 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1894 		 * immediate realloc on the next call.
1895          */
1896       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1897 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1898 								(num_to_alloc * sizeof(struct yy_buffer_state*)
1899 								);
1900 		if ( ! (yy_buffer_stack) )
1901 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1902 
1903 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1904 
1905 		(yy_buffer_stack_max) = num_to_alloc;
1906 		(yy_buffer_stack_top) = 0;
1907 		return;
1908 	}
1909 
1910 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1911 
1912 		/* Increase the buffer to prepare for a possible push. */
1913 		yy_size_t grow_size = 8 /* arbitrary grow size */;
1914 
1915 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
1916 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1917 								((yy_buffer_stack),
1918 								num_to_alloc * sizeof(struct yy_buffer_state*)
1919 								);
1920 		if ( ! (yy_buffer_stack) )
1921 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1922 
1923 		/* zero only the new slots.*/
1924 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1925 		(yy_buffer_stack_max) = num_to_alloc;
1926 	}
1927 }
1928 
1929 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1930  * @param base the character buffer
1931  * @param size the size in bytes of the character buffer
1932  *
1933  * @return the newly allocated buffer state object.
1934  */
yy_scan_buffer(char * base,yy_size_t size)1935 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1936 {
1937 	YY_BUFFER_STATE b;
1938 
1939 	if ( size < 2 ||
1940 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1941 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1942 		/* They forgot to leave room for the EOB's. */
1943 		return NULL;
1944 
1945 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1946 	if ( ! b )
1947 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1948 
1949 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
1950 	b->yy_buf_pos = b->yy_ch_buf = base;
1951 	b->yy_is_our_buffer = 0;
1952 	b->yy_input_file = NULL;
1953 	b->yy_n_chars = b->yy_buf_size;
1954 	b->yy_is_interactive = 0;
1955 	b->yy_at_bol = 1;
1956 	b->yy_fill_buffer = 0;
1957 	b->yy_buffer_status = YY_BUFFER_NEW;
1958 
1959 	yy_switch_to_buffer( b  );
1960 
1961 	return b;
1962 }
1963 
1964 /** Setup the input buffer state to scan a string. The next call to yylex() will
1965  * scan from a @e copy of @a str.
1966  * @param yystr a NUL-terminated string to scan
1967  *
1968  * @return the newly allocated buffer state object.
1969  * @note If you want to scan bytes that may contain NUL values, then use
1970  *       yy_scan_bytes() instead.
1971  */
yy_scan_string(const char * yystr)1972 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1973 {
1974 
1975 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
1976 }
1977 
1978 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1979  * scan from a @e copy of @a bytes.
1980  * @param yybytes the byte buffer to scan
1981  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1982  *
1983  * @return the newly allocated buffer state object.
1984  */
yy_scan_bytes(const char * yybytes,int _yybytes_len)1985 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
1986 {
1987 	YY_BUFFER_STATE b;
1988 	char *buf;
1989 	yy_size_t n;
1990 	int i;
1991 
1992 	/* Get memory for full buffer, including space for trailing EOB's. */
1993 	n = (yy_size_t) (_yybytes_len + 2);
1994 	buf = (char *) yyalloc( n  );
1995 	if ( ! buf )
1996 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1997 
1998 	for ( i = 0; i < _yybytes_len; ++i )
1999 		buf[i] = yybytes[i];
2000 
2001 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2002 
2003 	b = yy_scan_buffer( buf, n );
2004 	if ( ! b )
2005 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2006 
2007 	/* It's okay to grow etc. this buffer, and we should throw it
2008 	 * away when we're done.
2009 	 */
2010 	b->yy_is_our_buffer = 1;
2011 
2012 	return b;
2013 }
2014 
2015 #ifndef YY_EXIT_FAILURE
2016 #define YY_EXIT_FAILURE 2
2017 #endif
2018 
yy_fatal_error(const char * msg)2019 static void yynoreturn yy_fatal_error (const char* msg )
2020 {
2021 			fprintf( stderr, "%s\n", msg );
2022 	exit( YY_EXIT_FAILURE );
2023 }
2024 
2025 /* Redefine yyless() so it works in section 3 code. */
2026 
2027 #undef yyless
2028 #define yyless(n) \
2029 	do \
2030 		{ \
2031 		/* Undo effects of setting up yytext. */ \
2032         int yyless_macro_arg = (n); \
2033         YY_LESS_LINENO(yyless_macro_arg);\
2034 		yytext[yyleng] = (yy_hold_char); \
2035 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
2036 		(yy_hold_char) = *(yy_c_buf_p); \
2037 		*(yy_c_buf_p) = '\0'; \
2038 		yyleng = yyless_macro_arg; \
2039 		} \
2040 	while ( 0 )
2041 
2042 /* Accessor  methods (get/set functions) to struct members. */
2043 
2044 /** Get the current line number.
2045  *
2046  */
yyget_lineno(void)2047 int yyget_lineno  (void)
2048 {
2049 
2050     return yylineno;
2051 }
2052 
2053 /** Get the input stream.
2054  *
2055  */
yyget_in(void)2056 FILE *yyget_in  (void)
2057 {
2058         return yyin;
2059 }
2060 
2061 /** Get the output stream.
2062  *
2063  */
yyget_out(void)2064 FILE *yyget_out  (void)
2065 {
2066         return yyout;
2067 }
2068 
2069 /** Get the length of the current token.
2070  *
2071  */
yyget_leng(void)2072 int yyget_leng  (void)
2073 {
2074         return yyleng;
2075 }
2076 
2077 /** Get the current token.
2078  *
2079  */
2080 
yyget_text(void)2081 char *yyget_text  (void)
2082 {
2083         return yytext;
2084 }
2085 
2086 /** Set the current line number.
2087  * @param _line_number line number
2088  *
2089  */
yyset_lineno(int _line_number)2090 void yyset_lineno (int  _line_number )
2091 {
2092 
2093     yylineno = _line_number;
2094 }
2095 
2096 /** Set the input stream. This does not discard the current
2097  * input buffer.
2098  * @param _in_str A readable stream.
2099  *
2100  * @see yy_switch_to_buffer
2101  */
yyset_in(FILE * _in_str)2102 void yyset_in (FILE *  _in_str )
2103 {
2104         yyin = _in_str ;
2105 }
2106 
yyset_out(FILE * _out_str)2107 void yyset_out (FILE *  _out_str )
2108 {
2109         yyout = _out_str ;
2110 }
2111 
yyget_debug(void)2112 int yyget_debug  (void)
2113 {
2114         return yy_flex_debug;
2115 }
2116 
yyset_debug(int _bdebug)2117 void yyset_debug (int  _bdebug )
2118 {
2119         yy_flex_debug = _bdebug ;
2120 }
2121 
yy_init_globals(void)2122 static int yy_init_globals (void)
2123 {
2124         /* Initialization is the same as for the non-reentrant scanner.
2125      * This function is called from yylex_destroy(), so don't allocate here.
2126      */
2127 
2128     (yy_buffer_stack) = NULL;
2129     (yy_buffer_stack_top) = 0;
2130     (yy_buffer_stack_max) = 0;
2131     (yy_c_buf_p) = NULL;
2132     (yy_init) = 0;
2133     (yy_start) = 0;
2134 
2135 /* Defined in main.c */
2136 #ifdef YY_STDINIT
2137     yyin = stdin;
2138     yyout = stdout;
2139 #else
2140     yyin = NULL;
2141     yyout = NULL;
2142 #endif
2143 
2144     /* For future reference: Set errno on error, since we are called by
2145      * yylex_init()
2146      */
2147     return 0;
2148 }
2149 
2150 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)2151 int yylex_destroy  (void)
2152 {
2153 
2154     /* Pop the buffer stack, destroying each element. */
2155 	while(YY_CURRENT_BUFFER){
2156 		yy_delete_buffer( YY_CURRENT_BUFFER  );
2157 		YY_CURRENT_BUFFER_LVALUE = NULL;
2158 		yypop_buffer_state();
2159 	}
2160 
2161 	/* Destroy the stack itself. */
2162 	yyfree((yy_buffer_stack) );
2163 	(yy_buffer_stack) = NULL;
2164 
2165     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2166      * yylex() is called, initialization will occur. */
2167     yy_init_globals( );
2168 
2169     return 0;
2170 }
2171 
2172 /*
2173  * Internal utility routines.
2174  */
2175 
2176 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n)2177 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2178 {
2179 
2180 	int i;
2181 	for ( i = 0; i < n; ++i )
2182 		s1[i] = s2[i];
2183 }
2184 #endif
2185 
2186 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s)2187 static int yy_flex_strlen (const char * s )
2188 {
2189 	int n;
2190 	for ( n = 0; s[n]; ++n )
2191 		;
2192 
2193 	return n;
2194 }
2195 #endif
2196 
yyalloc(yy_size_t size)2197 void *yyalloc (yy_size_t  size )
2198 {
2199 			return malloc(size);
2200 }
2201 
yyrealloc(void * ptr,yy_size_t size)2202 void *yyrealloc  (void * ptr, yy_size_t  size )
2203 {
2204 
2205 	/* The cast to (char *) in the following accommodates both
2206 	 * implementations that use char* generic pointers, and those
2207 	 * that use void* generic pointers.  It works with the latter
2208 	 * because both ANSI C and C++ allow castless assignment from
2209 	 * any pointer type to void*, and deal with argument conversions
2210 	 * as though doing an assignment.
2211 	 */
2212 	return realloc(ptr, size);
2213 }
2214 
yyfree(void * ptr)2215 void yyfree (void * ptr )
2216 {
2217 			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2218 }
2219 
2220 #define YYTABLES_NAME "yytables"
2221 
2222 #line 263 "external/dtc/dtc-lexer.l"
2223 
2224 
push_input_file(const char * filename)2225 static void push_input_file(const char *filename)
2226 {
2227 	assert(filename);
2228 
2229 	srcfile_push(filename);
2230 
2231 	yyin = current_srcfile->f;
2232 
2233 	yypush_buffer_state(yy_create_buffer(yyin, YY_BUF_SIZE));
2234 }
2235 
2236 
pop_input_file(void)2237 static bool pop_input_file(void)
2238 {
2239 	if (srcfile_pop() == 0)
2240 		return false;
2241 
2242 	yypop_buffer_state();
2243 	yyin = current_srcfile->f;
2244 
2245 	return true;
2246 }
2247 
lexical_error(const char * fmt,...)2248 static void lexical_error(const char *fmt, ...)
2249 {
2250 	va_list ap;
2251 
2252 	va_start(ap, fmt);
2253 	srcpos_verror(&yylloc, "Lexical error", fmt, ap);
2254 	va_end(ap);
2255 
2256 	treesource_error = true;
2257 }
2258 
2259