Linux Audio

Check our new training course

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