debuggers.hg
changeset 21046:3138b3885999
Commit output from flex for benefit of prehistoric people
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Mar 05 14:35:09 2010 +0000 (2010-03-05) |
parents | e9d4cb54c551 |
children | f0777eafb73b |
files | .hgignore tools/libxl/libxlu_cfg_l.c tools/libxl/libxlu_cfg_l.h tools/libxl/libxlu_cfg_y.c tools/libxl/libxlu_cfg_y.h |
line diff
1.1 --- a/.hgignore Fri Mar 05 14:31:14 2010 +0000 1.2 +++ b/.hgignore Fri Mar 05 14:35:09 2010 +0000 1.3 @@ -180,8 +180,7 @@ 1.4 ^tools/libxen/libxenapi- 1.5 ^tools/libxen/test/test_bindings$ 1.6 ^tools/libxen/test/test_event_handling$ 1.7 -^tools/libxl/libxlu_cfg_[yl]\.[ch]$ 1.8 -^tools/libxl/libxlu_cfg_y\.output 1.9 +^tools/libxl/libxlu_cfg_y\.output$ 1.10 ^tools/libxl/xl$ 1.11 ^tools/libaio/src/.*\.ol$ 1.12 ^tools/libaio/src/.*\.os$
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/tools/libxl/libxlu_cfg_l.c Fri Mar 05 14:35:09 2010 +0000 2.3 @@ -0,0 +1,2090 @@ 2.4 +#line 2 "libxlu_cfg_l.c" 2.5 + 2.6 +#line 4 "libxlu_cfg_l.c" 2.7 + 2.8 +#define YY_INT_ALIGNED short int 2.9 + 2.10 +/* A lexical scanner generated by flex */ 2.11 + 2.12 +#define FLEX_SCANNER 2.13 +#define YY_FLEX_MAJOR_VERSION 2 2.14 +#define YY_FLEX_MINOR_VERSION 5 2.15 +#define YY_FLEX_SUBMINOR_VERSION 35 2.16 +#if YY_FLEX_SUBMINOR_VERSION > 0 2.17 +#define FLEX_BETA 2.18 +#endif 2.19 + 2.20 +/* First, we deal with platform-specific or compiler-specific issues. */ 2.21 + 2.22 +/* begin standard C headers. */ 2.23 +#include <stdio.h> 2.24 +#include <string.h> 2.25 +#include <errno.h> 2.26 +#include <stdlib.h> 2.27 + 2.28 +/* end standard C headers. */ 2.29 + 2.30 +/* flex integer type definitions */ 2.31 + 2.32 +#ifndef FLEXINT_H 2.33 +#define FLEXINT_H 2.34 + 2.35 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 2.36 + 2.37 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 2.38 + 2.39 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 2.40 + * if you want the limit (max/min) macros for int types. 2.41 + */ 2.42 +#ifndef __STDC_LIMIT_MACROS 2.43 +#define __STDC_LIMIT_MACROS 1 2.44 +#endif 2.45 + 2.46 +#include <inttypes.h> 2.47 +typedef int8_t flex_int8_t; 2.48 +typedef uint8_t flex_uint8_t; 2.49 +typedef int16_t flex_int16_t; 2.50 +typedef uint16_t flex_uint16_t; 2.51 +typedef int32_t flex_int32_t; 2.52 +typedef uint32_t flex_uint32_t; 2.53 +#else 2.54 +typedef signed char flex_int8_t; 2.55 +typedef short int flex_int16_t; 2.56 +typedef int flex_int32_t; 2.57 +typedef unsigned char flex_uint8_t; 2.58 +typedef unsigned short int flex_uint16_t; 2.59 +typedef unsigned int flex_uint32_t; 2.60 + 2.61 +/* Limits of integral types. */ 2.62 +#ifndef INT8_MIN 2.63 +#define INT8_MIN (-128) 2.64 +#endif 2.65 +#ifndef INT16_MIN 2.66 +#define INT16_MIN (-32767-1) 2.67 +#endif 2.68 +#ifndef INT32_MIN 2.69 +#define INT32_MIN (-2147483647-1) 2.70 +#endif 2.71 +#ifndef INT8_MAX 2.72 +#define INT8_MAX (127) 2.73 +#endif 2.74 +#ifndef INT16_MAX 2.75 +#define INT16_MAX (32767) 2.76 +#endif 2.77 +#ifndef INT32_MAX 2.78 +#define INT32_MAX (2147483647) 2.79 +#endif 2.80 +#ifndef UINT8_MAX 2.81 +#define UINT8_MAX (255U) 2.82 +#endif 2.83 +#ifndef UINT16_MAX 2.84 +#define UINT16_MAX (65535U) 2.85 +#endif 2.86 +#ifndef UINT32_MAX 2.87 +#define UINT32_MAX (4294967295U) 2.88 +#endif 2.89 + 2.90 +#endif /* ! C99 */ 2.91 + 2.92 +#endif /* ! FLEXINT_H */ 2.93 + 2.94 +#ifdef __cplusplus 2.95 + 2.96 +/* The "const" storage-class-modifier is valid. */ 2.97 +#define YY_USE_CONST 2.98 + 2.99 +#else /* ! __cplusplus */ 2.100 + 2.101 +/* C99 requires __STDC__ to be defined as 1. */ 2.102 +#if defined (__STDC__) 2.103 + 2.104 +#define YY_USE_CONST 2.105 + 2.106 +#endif /* defined (__STDC__) */ 2.107 +#endif /* ! __cplusplus */ 2.108 + 2.109 +#ifdef YY_USE_CONST 2.110 +#define yyconst const 2.111 +#else 2.112 +#define yyconst 2.113 +#endif 2.114 + 2.115 +/* Returned upon end-of-file. */ 2.116 +#define YY_NULL 0 2.117 + 2.118 +/* Promotes a possibly negative, possibly signed char to an unsigned 2.119 + * integer for use as an array index. If the signed char is negative, 2.120 + * we want to instead treat it as an 8-bit unsigned char, hence the 2.121 + * double cast. 2.122 + */ 2.123 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 2.124 + 2.125 +/* An opaque pointer. */ 2.126 +#ifndef YY_TYPEDEF_YY_SCANNER_T 2.127 +#define YY_TYPEDEF_YY_SCANNER_T 2.128 +typedef void* yyscan_t; 2.129 +#endif 2.130 + 2.131 +/* For convenience, these vars (plus the bison vars far below) 2.132 + are macros in the reentrant scanner. */ 2.133 +#define yyin yyg->yyin_r 2.134 +#define yyout yyg->yyout_r 2.135 +#define yyextra yyg->yyextra_r 2.136 +#define yyleng yyg->yyleng_r 2.137 +#define yytext yyg->yytext_r 2.138 +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) 2.139 +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) 2.140 +#define yy_flex_debug yyg->yy_flex_debug_r 2.141 + 2.142 +/* Enter a start condition. This macro really ought to take a parameter, 2.143 + * but we do it the disgusting crufty way forced on us by the ()-less 2.144 + * definition of BEGIN. 2.145 + */ 2.146 +#define BEGIN yyg->yy_start = 1 + 2 * 2.147 + 2.148 +/* Translate the current start state into a value that can be later handed 2.149 + * to BEGIN to return to the state. The YYSTATE alias is for lex 2.150 + * compatibility. 2.151 + */ 2.152 +#define YY_START ((yyg->yy_start - 1) / 2) 2.153 +#define YYSTATE YY_START 2.154 + 2.155 +/* Action number for EOF rule of a given start state. */ 2.156 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 2.157 + 2.158 +/* Special action meaning "start processing a new file". */ 2.159 +#define YY_NEW_FILE xlu__cfg_yyrestart(yyin ,yyscanner ) 2.160 + 2.161 +#define YY_END_OF_BUFFER_CHAR 0 2.162 + 2.163 +/* Size of default input buffer. */ 2.164 +#ifndef YY_BUF_SIZE 2.165 +#ifdef __ia64__ 2.166 +/* On IA-64, the buffer size is 16k, not 8k. 2.167 + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 2.168 + * Ditto for the __ia64__ case accordingly. 2.169 + */ 2.170 +#define YY_BUF_SIZE 32768 2.171 +#else 2.172 +#define YY_BUF_SIZE 16384 2.173 +#endif /* __ia64__ */ 2.174 +#endif 2.175 + 2.176 +/* The state buf must be large enough to hold one state per character in the main buffer. 2.177 + */ 2.178 +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 2.179 + 2.180 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE 2.181 +#define YY_TYPEDEF_YY_BUFFER_STATE 2.182 +typedef struct yy_buffer_state *YY_BUFFER_STATE; 2.183 +#endif 2.184 + 2.185 +#define EOB_ACT_CONTINUE_SCAN 0 2.186 +#define EOB_ACT_END_OF_FILE 1 2.187 +#define EOB_ACT_LAST_MATCH 2 2.188 + 2.189 + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires 2.190 + * access to the local variable yy_act. Since yyless() is a macro, it would break 2.191 + * existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex. 2.192 + * One obvious solution it to make yy_act a global. I tried that, and saw 2.193 + * a 5% performance hit in a non-yylineno scanner, because yy_act is 2.194 + * normally declared as a register variable-- so it is not worth it. 2.195 + */ 2.196 + #define YY_LESS_LINENO(n) \ 2.197 + do { \ 2.198 + int yyl;\ 2.199 + for ( yyl = n; yyl < yyleng; ++yyl )\ 2.200 + if ( yytext[yyl] == '\n' )\ 2.201 + --yylineno;\ 2.202 + }while(0) 2.203 + 2.204 +/* Return all but the first "n" matched characters back to the input stream. */ 2.205 +#define yyless(n) \ 2.206 + do \ 2.207 + { \ 2.208 + /* Undo effects of setting up yytext. */ \ 2.209 + int yyless_macro_arg = (n); \ 2.210 + YY_LESS_LINENO(yyless_macro_arg);\ 2.211 + *yy_cp = yyg->yy_hold_char; \ 2.212 + YY_RESTORE_YY_MORE_OFFSET \ 2.213 + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 2.214 + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 2.215 + } \ 2.216 + while ( 0 ) 2.217 + 2.218 +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) 2.219 + 2.220 +#ifndef YY_TYPEDEF_YY_SIZE_T 2.221 +#define YY_TYPEDEF_YY_SIZE_T 2.222 +typedef size_t yy_size_t; 2.223 +#endif 2.224 + 2.225 +#ifndef YY_STRUCT_YY_BUFFER_STATE 2.226 +#define YY_STRUCT_YY_BUFFER_STATE 2.227 +struct yy_buffer_state 2.228 + { 2.229 + FILE *yy_input_file; 2.230 + 2.231 + char *yy_ch_buf; /* input buffer */ 2.232 + char *yy_buf_pos; /* current position in input buffer */ 2.233 + 2.234 + /* Size of input buffer in bytes, not including room for EOB 2.235 + * characters. 2.236 + */ 2.237 + yy_size_t yy_buf_size; 2.238 + 2.239 + /* Number of characters read into yy_ch_buf, not including EOB 2.240 + * characters. 2.241 + */ 2.242 + int yy_n_chars; 2.243 + 2.244 + /* Whether we "own" the buffer - i.e., we know we created it, 2.245 + * and can realloc() it to grow it, and should free() it to 2.246 + * delete it. 2.247 + */ 2.248 + int yy_is_our_buffer; 2.249 + 2.250 + /* Whether this is an "interactive" input source; if so, and 2.251 + * if we're using stdio for input, then we want to use getc() 2.252 + * instead of fread(), to make sure we stop fetching input after 2.253 + * each newline. 2.254 + */ 2.255 + int yy_is_interactive; 2.256 + 2.257 + /* Whether we're considered to be at the beginning of a line. 2.258 + * If so, '^' rules will be active on the next match, otherwise 2.259 + * not. 2.260 + */ 2.261 + int yy_at_bol; 2.262 + 2.263 + int yy_bs_lineno; /**< The line count. */ 2.264 + int yy_bs_column; /**< The column count. */ 2.265 + 2.266 + /* Whether to try to fill the input buffer when we reach the 2.267 + * end of it. 2.268 + */ 2.269 + int yy_fill_buffer; 2.270 + 2.271 + int yy_buffer_status; 2.272 + 2.273 +#define YY_BUFFER_NEW 0 2.274 +#define YY_BUFFER_NORMAL 1 2.275 + /* When an EOF's been seen but there's still some text to process 2.276 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we 2.277 + * shouldn't try reading from the input source any more. We might 2.278 + * still have a bunch of tokens to match, though, because of 2.279 + * possible backing-up. 2.280 + * 2.281 + * When we actually see the EOF, we change the status to "new" 2.282 + * (via xlu__cfg_yyrestart()), so that the user can continue scanning by 2.283 + * just pointing yyin at a new input file. 2.284 + */ 2.285 +#define YY_BUFFER_EOF_PENDING 2 2.286 + 2.287 + }; 2.288 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 2.289 + 2.290 +/* We provide macros for accessing buffer states in case in the 2.291 + * future we want to put the buffer states in a more general 2.292 + * "scanner state". 2.293 + * 2.294 + * Returns the top of the stack, or NULL. 2.295 + */ 2.296 +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ 2.297 + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ 2.298 + : NULL) 2.299 + 2.300 +/* Same as previous macro, but useful when we know that the buffer stack is not 2.301 + * NULL or when we need an lvalue. For internal use only. 2.302 + */ 2.303 +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] 2.304 + 2.305 +void xlu__cfg_yyrestart (FILE *input_file ,yyscan_t yyscanner ); 2.306 +void xlu__cfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); 2.307 +YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); 2.308 +void xlu__cfg_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); 2.309 +void xlu__cfg_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); 2.310 +void xlu__cfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); 2.311 +void xlu__cfg_yypop_buffer_state (yyscan_t yyscanner ); 2.312 + 2.313 +static void xlu__cfg_yyensure_buffer_stack (yyscan_t yyscanner ); 2.314 +static void xlu__cfg_yy_load_buffer_state (yyscan_t yyscanner ); 2.315 +static void xlu__cfg_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); 2.316 + 2.317 +#define YY_FLUSH_BUFFER xlu__cfg_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) 2.318 + 2.319 +YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); 2.320 +YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); 2.321 +YY_BUFFER_STATE xlu__cfg_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); 2.322 + 2.323 +void *xlu__cfg_yyalloc (yy_size_t ,yyscan_t yyscanner ); 2.324 +void *xlu__cfg_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); 2.325 +void xlu__cfg_yyfree (void * ,yyscan_t yyscanner ); 2.326 + 2.327 +#define yy_new_buffer xlu__cfg_yy_create_buffer 2.328 + 2.329 +#define yy_set_interactive(is_interactive) \ 2.330 + { \ 2.331 + if ( ! YY_CURRENT_BUFFER ){ \ 2.332 + xlu__cfg_yyensure_buffer_stack (yyscanner); \ 2.333 + YY_CURRENT_BUFFER_LVALUE = \ 2.334 + xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 2.335 + } \ 2.336 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 2.337 + } 2.338 + 2.339 +#define yy_set_bol(at_bol) \ 2.340 + { \ 2.341 + if ( ! YY_CURRENT_BUFFER ){\ 2.342 + xlu__cfg_yyensure_buffer_stack (yyscanner); \ 2.343 + YY_CURRENT_BUFFER_LVALUE = \ 2.344 + xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 2.345 + } \ 2.346 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 2.347 + } 2.348 + 2.349 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 2.350 + 2.351 +#define xlu__cfg_yywrap(n) 1 2.352 +#define YY_SKIP_YYWRAP 2.353 + 2.354 +typedef unsigned char YY_CHAR; 2.355 + 2.356 +typedef int yy_state_type; 2.357 + 2.358 +#define yytext_ptr yytext_r 2.359 + 2.360 +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); 2.361 +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); 2.362 +static int yy_get_next_buffer (yyscan_t yyscanner ); 2.363 +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); 2.364 + 2.365 +/* Done after the current pattern has been matched and before the 2.366 + * corresponding action - sets up yytext. 2.367 + */ 2.368 +#define YY_DO_BEFORE_ACTION \ 2.369 + yyg->yytext_ptr = yy_bp; \ 2.370 + yyg->yytext_ptr -= yyg->yy_more_len; \ 2.371 + yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \ 2.372 + yyg->yy_hold_char = *yy_cp; \ 2.373 + *yy_cp = '\0'; \ 2.374 + yyg->yy_c_buf_p = yy_cp; 2.375 + 2.376 +#define YY_NUM_RULES 15 2.377 +#define YY_END_OF_BUFFER 16 2.378 +/* This struct is not used in this scanner, 2.379 + but its presence is necessary. */ 2.380 +struct yy_trans_info 2.381 + { 2.382 + flex_int32_t yy_verify; 2.383 + flex_int32_t yy_nxt; 2.384 + }; 2.385 +static yyconst flex_int16_t yy_accept[34] = 2.386 + { 0, 2.387 + 0, 0, 13, 13, 16, 12, 3, 9, 12, 12, 2.388 + 12, 4, 2, 8, 7, 5, 6, 1, 13, 13, 2.389 + 14, 0, 11, 0, 0, 9, 0, 10, 0, 2, 2.390 + 1, 13, 0 2.391 + } ; 2.392 + 2.393 +static yyconst flex_int32_t yy_ec[256] = 2.394 + { 0, 2.395 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2.396 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.397 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.398 + 1, 2, 1, 4, 5, 1, 1, 1, 6, 1, 2.399 + 1, 1, 1, 7, 1, 1, 1, 8, 8, 8, 2.400 + 8, 8, 8, 8, 8, 8, 8, 1, 9, 1, 2.401 + 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.402 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.403 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.404 + 11, 12, 13, 1, 14, 1, 15, 15, 15, 15, 2.405 + 2.406 + 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 2.407 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 2.408 + 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 2.409 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.410 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.411 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.412 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.413 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.414 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.415 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.416 + 2.417 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.418 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.419 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.420 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.421 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.422 + 1, 1, 1, 1, 1 2.423 + } ; 2.424 + 2.425 +static yyconst flex_int32_t yy_meta[17] = 2.426 + { 0, 2.427 + 1, 2, 3, 1, 1, 1, 1, 4, 1, 1, 2.428 + 1, 1, 1, 4, 4, 4 2.429 + } ; 2.430 + 2.431 +static yyconst flex_int16_t yy_base[40] = 2.432 + { 0, 2.433 + 0, 0, 15, 17, 51, 54, 54, 54, 17, 45, 2.434 + 16, 54, 15, 54, 54, 54, 54, 0, 0, 54, 2.435 + 54, 20, 54, 0, 37, 54, 19, 54, 0, 18, 2.436 + 0, 0, 54, 33, 37, 41, 45, 23, 49 2.437 + } ; 2.438 + 2.439 +static yyconst flex_int16_t yy_def[40] = 2.440 + { 0, 2.441 + 33, 1, 34, 34, 33, 33, 33, 33, 35, 36, 2.442 + 37, 33, 33, 33, 33, 33, 33, 38, 39, 33, 2.443 + 33, 35, 33, 35, 36, 33, 37, 33, 37, 33, 2.444 + 38, 39, 0, 33, 33, 33, 33, 33, 33 2.445 + } ; 2.446 + 2.447 +static yyconst flex_int16_t yy_nxt[71] = 2.448 + { 0, 2.449 + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 2.450 + 16, 6, 17, 6, 18, 18, 20, 21, 20, 21, 2.451 + 23, 28, 30, 23, 28, 30, 31, 29, 24, 30, 2.452 + 29, 24, 30, 19, 19, 19, 19, 22, 22, 26, 2.453 + 22, 25, 25, 25, 25, 27, 27, 26, 27, 32, 2.454 + 33, 33, 32, 5, 33, 33, 33, 33, 33, 33, 2.455 + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 2.456 + } ; 2.457 + 2.458 +static yyconst flex_int16_t yy_chk[71] = 2.459 + { 0, 2.460 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.461 + 1, 1, 1, 1, 1, 1, 3, 3, 4, 4, 2.462 + 9, 11, 13, 22, 27, 30, 38, 11, 9, 13, 2.463 + 27, 22, 30, 34, 34, 34, 34, 35, 35, 25, 2.464 + 35, 36, 36, 36, 36, 37, 37, 10, 37, 39, 2.465 + 5, 0, 39, 33, 33, 33, 33, 33, 33, 33, 2.466 + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 2.467 + } ; 2.468 + 2.469 +/* Table of booleans, true if rule could match eol. */ 2.470 +static yyconst flex_int32_t yy_rule_can_match_eol[16] = 2.471 + { 0, 2.472 +0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, }; 2.473 + 2.474 +/* The intent behind this definition is that it'll catch 2.475 + * any uses of REJECT which flex missed. 2.476 + */ 2.477 +#define REJECT reject_used_but_not_detected 2.478 +#define yymore() (yyg->yy_more_flag = 1) 2.479 +#define YY_MORE_ADJ yyg->yy_more_len 2.480 +#define YY_RESTORE_YY_MORE_OFFSET 2.481 +#line 1 "libxlu_cfg_l.l" 2.482 +/* -*- fundamental -*- */ 2.483 +#line 4 "libxlu_cfg_l.l" 2.484 +#include "libxlu_cfg_i.h" 2.485 + 2.486 +#define ctx ((CfgParseContext*)yyextra) 2.487 +#define YY_NO_INPUT 2.488 + 2.489 +#define GOT(x) do{ \ 2.490 + yylloc->first_line= yylineno; \ 2.491 + return (x); \ 2.492 + }while(0) 2.493 + 2.494 + 2.495 +#line 493 "libxlu_cfg_l.c" 2.496 + 2.497 +#define INITIAL 0 2.498 +#define lexerr 1 2.499 + 2.500 +#ifndef YY_NO_UNISTD_H 2.501 +/* Special case for "unistd.h", since it is non-ANSI. We include it way 2.502 + * down here because we want the user's section 1 to have been scanned first. 2.503 + * The user has a chance to override it with an option. 2.504 + */ 2.505 +#include <unistd.h> 2.506 +#endif 2.507 + 2.508 +#ifndef YY_EXTRA_TYPE 2.509 +#define YY_EXTRA_TYPE void * 2.510 +#endif 2.511 + 2.512 +/* Holds the entire state of the reentrant scanner. */ 2.513 +struct yyguts_t 2.514 + { 2.515 + 2.516 + /* User-defined. Not touched by flex. */ 2.517 + YY_EXTRA_TYPE yyextra_r; 2.518 + 2.519 + /* The rest are the same as the globals declared in the non-reentrant scanner. */ 2.520 + FILE *yyin_r, *yyout_r; 2.521 + size_t yy_buffer_stack_top; /**< index of top of stack. */ 2.522 + size_t yy_buffer_stack_max; /**< capacity of stack. */ 2.523 + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ 2.524 + char yy_hold_char; 2.525 + int yy_n_chars; 2.526 + int yyleng_r; 2.527 + char *yy_c_buf_p; 2.528 + int yy_init; 2.529 + int yy_start; 2.530 + int yy_did_buffer_switch_on_eof; 2.531 + int yy_start_stack_ptr; 2.532 + int yy_start_stack_depth; 2.533 + int *yy_start_stack; 2.534 + yy_state_type yy_last_accepting_state; 2.535 + char* yy_last_accepting_cpos; 2.536 + 2.537 + int yylineno_r; 2.538 + int yy_flex_debug_r; 2.539 + 2.540 + char *yytext_r; 2.541 + int yy_more_flag; 2.542 + int yy_more_len; 2.543 + 2.544 + YYSTYPE * yylval_r; 2.545 + 2.546 + YYLTYPE * yylloc_r; 2.547 + 2.548 + }; /* end struct yyguts_t */ 2.549 + 2.550 +static int yy_init_globals (yyscan_t yyscanner ); 2.551 + 2.552 + /* This must go here because YYSTYPE and YYLTYPE are included 2.553 + * from bison output in section 1.*/ 2.554 + # define yylval yyg->yylval_r 2.555 + 2.556 + # define yylloc yyg->yylloc_r 2.557 + 2.558 +int xlu__cfg_yylex_init (yyscan_t* scanner); 2.559 + 2.560 +int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); 2.561 + 2.562 +/* Accessor methods to globals. 2.563 + These are made visible to non-reentrant scanners for convenience. */ 2.564 + 2.565 +int xlu__cfg_yylex_destroy (yyscan_t yyscanner ); 2.566 + 2.567 +int xlu__cfg_yyget_debug (yyscan_t yyscanner ); 2.568 + 2.569 +void xlu__cfg_yyset_debug (int debug_flag ,yyscan_t yyscanner ); 2.570 + 2.571 +YY_EXTRA_TYPE xlu__cfg_yyget_extra (yyscan_t yyscanner ); 2.572 + 2.573 +void xlu__cfg_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); 2.574 + 2.575 +FILE *xlu__cfg_yyget_in (yyscan_t yyscanner ); 2.576 + 2.577 +void xlu__cfg_yyset_in (FILE * in_str ,yyscan_t yyscanner ); 2.578 + 2.579 +FILE *xlu__cfg_yyget_out (yyscan_t yyscanner ); 2.580 + 2.581 +void xlu__cfg_yyset_out (FILE * out_str ,yyscan_t yyscanner ); 2.582 + 2.583 +int xlu__cfg_yyget_leng (yyscan_t yyscanner ); 2.584 + 2.585 +char *xlu__cfg_yyget_text (yyscan_t yyscanner ); 2.586 + 2.587 +int xlu__cfg_yyget_lineno (yyscan_t yyscanner ); 2.588 + 2.589 +void xlu__cfg_yyset_lineno (int line_number ,yyscan_t yyscanner ); 2.590 + 2.591 +YYSTYPE * xlu__cfg_yyget_lval (yyscan_t yyscanner ); 2.592 + 2.593 +void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); 2.594 + 2.595 + YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner ); 2.596 + 2.597 + void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); 2.598 + 2.599 +/* Macros after this point can all be overridden by user definitions in 2.600 + * section 1. 2.601 + */ 2.602 + 2.603 +#ifndef YY_SKIP_YYWRAP 2.604 +#ifdef __cplusplus 2.605 +extern "C" int xlu__cfg_yywrap (yyscan_t yyscanner ); 2.606 +#else 2.607 +extern int xlu__cfg_yywrap (yyscan_t yyscanner ); 2.608 +#endif 2.609 +#endif 2.610 + 2.611 +#ifndef yytext_ptr 2.612 +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); 2.613 +#endif 2.614 + 2.615 +#ifdef YY_NEED_STRLEN 2.616 +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); 2.617 +#endif 2.618 + 2.619 +#ifndef YY_NO_INPUT 2.620 + 2.621 +#ifdef __cplusplus 2.622 +static int yyinput (yyscan_t yyscanner ); 2.623 +#else 2.624 +static int input (yyscan_t yyscanner ); 2.625 +#endif 2.626 + 2.627 +#endif 2.628 + 2.629 +/* Amount of stuff to slurp up with each read. */ 2.630 +#ifndef YY_READ_BUF_SIZE 2.631 +#ifdef __ia64__ 2.632 +/* On IA-64, the buffer size is 16k, not 8k */ 2.633 +#define YY_READ_BUF_SIZE 16384 2.634 +#else 2.635 +#define YY_READ_BUF_SIZE 8192 2.636 +#endif /* __ia64__ */ 2.637 +#endif 2.638 + 2.639 +/* Copy whatever the last rule matched to the standard output. */ 2.640 +#ifndef ECHO 2.641 +/* This used to be an fputs(), but since the string might contain NUL's, 2.642 + * we now use fwrite(). 2.643 + */ 2.644 +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 2.645 +#endif 2.646 + 2.647 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 2.648 + * is returned in "result". 2.649 + */ 2.650 +#ifndef YY_INPUT 2.651 +#define YY_INPUT(buf,result,max_size) \ 2.652 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 2.653 + { \ 2.654 + int c = '*'; \ 2.655 + size_t n; \ 2.656 + for ( n = 0; n < max_size && \ 2.657 + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 2.658 + buf[n] = (char) c; \ 2.659 + if ( c == '\n' ) \ 2.660 + buf[n++] = (char) c; \ 2.661 + if ( c == EOF && ferror( yyin ) ) \ 2.662 + YY_FATAL_ERROR( "input in flex scanner failed" ); \ 2.663 + result = n; \ 2.664 + } \ 2.665 + else \ 2.666 + { \ 2.667 + errno=0; \ 2.668 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 2.669 + { \ 2.670 + if( errno != EINTR) \ 2.671 + { \ 2.672 + YY_FATAL_ERROR( "input in flex scanner failed" ); \ 2.673 + break; \ 2.674 + } \ 2.675 + errno=0; \ 2.676 + clearerr(yyin); \ 2.677 + } \ 2.678 + }\ 2.679 +\ 2.680 + 2.681 +#endif 2.682 + 2.683 +/* No semi-colon after return; correct usage is to write "yyterminate();" - 2.684 + * we don't want an extra ';' after the "return" because that will cause 2.685 + * some compilers to complain about unreachable statements. 2.686 + */ 2.687 +#ifndef yyterminate 2.688 +#define yyterminate() return YY_NULL 2.689 +#endif 2.690 + 2.691 +/* Number of entries by which start-condition stack grows. */ 2.692 +#ifndef YY_START_STACK_INCR 2.693 +#define YY_START_STACK_INCR 25 2.694 +#endif 2.695 + 2.696 +/* Report a fatal error. */ 2.697 +#ifndef YY_FATAL_ERROR 2.698 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) 2.699 +#endif 2.700 + 2.701 +/* end tables serialization structures and prototypes */ 2.702 + 2.703 +/* Default declaration of generated scanner - a define so the user can 2.704 + * easily add parameters. 2.705 + */ 2.706 +#ifndef YY_DECL 2.707 +#define YY_DECL_IS_OURS 1 2.708 + 2.709 +extern int xlu__cfg_yylex \ 2.710 + (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); 2.711 + 2.712 +#define YY_DECL int xlu__cfg_yylex \ 2.713 + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) 2.714 +#endif /* !YY_DECL */ 2.715 + 2.716 +/* Code executed at the beginning of each rule, after yytext and yyleng 2.717 + * have been set up. 2.718 + */ 2.719 +#ifndef YY_USER_ACTION 2.720 +#define YY_USER_ACTION 2.721 +#endif 2.722 + 2.723 +/* Code executed at the end of each rule. */ 2.724 +#ifndef YY_BREAK 2.725 +#define YY_BREAK break; 2.726 +#endif 2.727 + 2.728 +#define YY_RULE_SETUP \ 2.729 + YY_USER_ACTION 2.730 + 2.731 +/** The main scanner function which does all the work. 2.732 + */ 2.733 +YY_DECL 2.734 +{ 2.735 + register yy_state_type yy_current_state; 2.736 + register char *yy_cp, *yy_bp; 2.737 + register int yy_act; 2.738 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.739 + 2.740 +#line 30 "libxlu_cfg_l.l" 2.741 + 2.742 + 2.743 +#line 741 "libxlu_cfg_l.c" 2.744 + 2.745 + yylval = yylval_param; 2.746 + 2.747 + yylloc = yylloc_param; 2.748 + 2.749 + if ( !yyg->yy_init ) 2.750 + { 2.751 + yyg->yy_init = 1; 2.752 + 2.753 +#ifdef YY_USER_INIT 2.754 + YY_USER_INIT; 2.755 +#endif 2.756 + 2.757 + if ( ! yyg->yy_start ) 2.758 + yyg->yy_start = 1; /* first start state */ 2.759 + 2.760 + if ( ! yyin ) 2.761 + yyin = stdin; 2.762 + 2.763 + if ( ! yyout ) 2.764 + yyout = stdout; 2.765 + 2.766 + if ( ! YY_CURRENT_BUFFER ) { 2.767 + xlu__cfg_yyensure_buffer_stack (yyscanner); 2.768 + YY_CURRENT_BUFFER_LVALUE = 2.769 + xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); 2.770 + } 2.771 + 2.772 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.773 + } 2.774 + 2.775 + while ( 1 ) /* loops until end-of-file is reached */ 2.776 + { 2.777 + yyg->yy_more_len = 0; 2.778 + if ( yyg->yy_more_flag ) 2.779 + { 2.780 + yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr; 2.781 + yyg->yy_more_flag = 0; 2.782 + } 2.783 + yy_cp = yyg->yy_c_buf_p; 2.784 + 2.785 + /* Support of yytext. */ 2.786 + *yy_cp = yyg->yy_hold_char; 2.787 + 2.788 + /* yy_bp points to the position in yy_ch_buf of the start of 2.789 + * the current run. 2.790 + */ 2.791 + yy_bp = yy_cp; 2.792 + 2.793 + yy_current_state = yyg->yy_start; 2.794 +yy_match: 2.795 + do 2.796 + { 2.797 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 2.798 + if ( yy_accept[yy_current_state] ) 2.799 + { 2.800 + yyg->yy_last_accepting_state = yy_current_state; 2.801 + yyg->yy_last_accepting_cpos = yy_cp; 2.802 + } 2.803 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2.804 + { 2.805 + yy_current_state = (int) yy_def[yy_current_state]; 2.806 + if ( yy_current_state >= 34 ) 2.807 + yy_c = yy_meta[(unsigned int) yy_c]; 2.808 + } 2.809 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2.810 + ++yy_cp; 2.811 + } 2.812 + while ( yy_current_state != 33 ); 2.813 + yy_cp = yyg->yy_last_accepting_cpos; 2.814 + yy_current_state = yyg->yy_last_accepting_state; 2.815 + 2.816 +yy_find_action: 2.817 + yy_act = yy_accept[yy_current_state]; 2.818 + 2.819 + YY_DO_BEFORE_ACTION; 2.820 + 2.821 + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) 2.822 + { 2.823 + int yyl; 2.824 + for ( yyl = yyg->yy_more_len; yyl < yyleng; ++yyl ) 2.825 + if ( yytext[yyl] == '\n' ) 2.826 + 2.827 + do{ yylineno++; 2.828 + yycolumn=0; 2.829 + }while(0) 2.830 +; 2.831 + } 2.832 + 2.833 +do_action: /* This label is used only to access EOF actions. */ 2.834 + 2.835 + switch ( yy_act ) 2.836 + { /* beginning of action switch */ 2.837 + case 0: /* must back up */ 2.838 + /* undo the effects of YY_DO_BEFORE_ACTION */ 2.839 + *yy_cp = yyg->yy_hold_char; 2.840 + yy_cp = yyg->yy_last_accepting_cpos; 2.841 + yy_current_state = yyg->yy_last_accepting_state; 2.842 + goto yy_find_action; 2.843 + 2.844 +case 1: 2.845 +YY_RULE_SETUP 2.846 +#line 32 "libxlu_cfg_l.l" 2.847 +{ 2.848 + yylval->string= xlu__cfgl_strdup(ctx,yytext); 2.849 + GOT(IDENT); 2.850 + } 2.851 + YY_BREAK 2.852 +case 2: 2.853 +YY_RULE_SETUP 2.854 +#line 36 "libxlu_cfg_l.l" 2.855 +{ 2.856 + yylval->string= xlu__cfgl_strdup(ctx,yytext); 2.857 + GOT(NUMBER); 2.858 + } 2.859 + YY_BREAK 2.860 +case 3: 2.861 +YY_RULE_SETUP 2.862 +#line 41 "libxlu_cfg_l.l" 2.863 + 2.864 + YY_BREAK 2.865 +case 4: 2.866 +YY_RULE_SETUP 2.867 +#line 43 "libxlu_cfg_l.l" 2.868 +{ GOT(','); } 2.869 + YY_BREAK 2.870 +case 5: 2.871 +YY_RULE_SETUP 2.872 +#line 44 "libxlu_cfg_l.l" 2.873 +{ GOT('['); } 2.874 + YY_BREAK 2.875 +case 6: 2.876 +YY_RULE_SETUP 2.877 +#line 45 "libxlu_cfg_l.l" 2.878 +{ GOT(']'); } 2.879 + YY_BREAK 2.880 +case 7: 2.881 +YY_RULE_SETUP 2.882 +#line 46 "libxlu_cfg_l.l" 2.883 +{ GOT('='); } 2.884 + YY_BREAK 2.885 +case 8: 2.886 +YY_RULE_SETUP 2.887 +#line 47 "libxlu_cfg_l.l" 2.888 +{ GOT(';'); } 2.889 + YY_BREAK 2.890 +case 9: 2.891 +/* rule 9 can match eol */ 2.892 +YY_RULE_SETUP 2.893 +#line 49 "libxlu_cfg_l.l" 2.894 +{ yylloc->first_line= yylineno-1; return NEWLINE; } 2.895 + YY_BREAK 2.896 +case 10: 2.897 +YY_RULE_SETUP 2.898 +#line 51 "libxlu_cfg_l.l" 2.899 +{ 2.900 + yylval->string= xlu__cfgl_dequote(ctx,yytext); 2.901 + GOT(STRING); 2.902 + } 2.903 + YY_BREAK 2.904 +case 11: 2.905 +YY_RULE_SETUP 2.906 +#line 55 "libxlu_cfg_l.l" 2.907 +{ 2.908 + yylval->string= xlu__cfgl_dequote(ctx,yytext); 2.909 + GOT(STRING); 2.910 + } 2.911 + YY_BREAK 2.912 +case 12: 2.913 +YY_RULE_SETUP 2.914 +#line 60 "libxlu_cfg_l.l" 2.915 +{ 2.916 + BEGIN(lexerr); 2.917 + yymore(); 2.918 + } 2.919 + YY_BREAK 2.920 +case 13: 2.921 +YY_RULE_SETUP 2.922 +#line 65 "libxlu_cfg_l.l" 2.923 +{ 2.924 + xlu__cfgl_lexicalerror(ctx,"lexical error"); 2.925 + BEGIN(0); 2.926 + } 2.927 + YY_BREAK 2.928 +case 14: 2.929 +/* rule 14 can match eol */ 2.930 +YY_RULE_SETUP 2.931 +#line 70 "libxlu_cfg_l.l" 2.932 +{ 2.933 + xlu__cfgl_lexicalerror(ctx,"lexical error"); 2.934 + BEGIN(0); 2.935 + GOT(NEWLINE); 2.936 + } 2.937 + YY_BREAK 2.938 +case 15: 2.939 +YY_RULE_SETUP 2.940 +#line 75 "libxlu_cfg_l.l" 2.941 +YY_FATAL_ERROR( "flex scanner jammed" ); 2.942 + YY_BREAK 2.943 +#line 941 "libxlu_cfg_l.c" 2.944 +case YY_STATE_EOF(INITIAL): 2.945 +case YY_STATE_EOF(lexerr): 2.946 + yyterminate(); 2.947 + 2.948 + case YY_END_OF_BUFFER: 2.949 + { 2.950 + /* Amount of text matched not including the EOB char. */ 2.951 + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; 2.952 + 2.953 + /* Undo the effects of YY_DO_BEFORE_ACTION. */ 2.954 + *yy_cp = yyg->yy_hold_char; 2.955 + YY_RESTORE_YY_MORE_OFFSET 2.956 + 2.957 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 2.958 + { 2.959 + /* We're scanning a new file or input source. It's 2.960 + * possible that this happened because the user 2.961 + * just pointed yyin at a new source and called 2.962 + * xlu__cfg_yylex(). If so, then we have to assure 2.963 + * consistency between YY_CURRENT_BUFFER and our 2.964 + * globals. Here is the right place to do so, because 2.965 + * this is the first action (other than possibly a 2.966 + * back-up) that will match for the new input source. 2.967 + */ 2.968 + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2.969 + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 2.970 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 2.971 + } 2.972 + 2.973 + /* Note that here we test for yy_c_buf_p "<=" to the position 2.974 + * of the first EOB in the buffer, since yy_c_buf_p will 2.975 + * already have been incremented past the NUL character 2.976 + * (since all states make transitions on EOB to the 2.977 + * end-of-buffer state). Contrast this with the test 2.978 + * in input(). 2.979 + */ 2.980 + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) 2.981 + { /* This was really a NUL. */ 2.982 + yy_state_type yy_next_state; 2.983 + 2.984 + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; 2.985 + 2.986 + yy_current_state = yy_get_previous_state( yyscanner ); 2.987 + 2.988 + /* Okay, we're now positioned to make the NUL 2.989 + * transition. We couldn't have 2.990 + * yy_get_previous_state() go ahead and do it 2.991 + * for us because it doesn't know how to deal 2.992 + * with the possibility of jamming (and we don't 2.993 + * want to build jamming into it because then it 2.994 + * will run more slowly). 2.995 + */ 2.996 + 2.997 + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); 2.998 + 2.999 + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2.1000 + 2.1001 + if ( yy_next_state ) 2.1002 + { 2.1003 + /* Consume the NUL. */ 2.1004 + yy_cp = ++yyg->yy_c_buf_p; 2.1005 + yy_current_state = yy_next_state; 2.1006 + goto yy_match; 2.1007 + } 2.1008 + 2.1009 + else 2.1010 + { 2.1011 + yy_cp = yyg->yy_last_accepting_cpos; 2.1012 + yy_current_state = yyg->yy_last_accepting_state; 2.1013 + goto yy_find_action; 2.1014 + } 2.1015 + } 2.1016 + 2.1017 + else switch ( yy_get_next_buffer( yyscanner ) ) 2.1018 + { 2.1019 + case EOB_ACT_END_OF_FILE: 2.1020 + { 2.1021 + yyg->yy_did_buffer_switch_on_eof = 0; 2.1022 + 2.1023 + if ( xlu__cfg_yywrap(yyscanner ) ) 2.1024 + { 2.1025 + /* Note: because we've taken care in 2.1026 + * yy_get_next_buffer() to have set up 2.1027 + * yytext, we can now set up 2.1028 + * yy_c_buf_p so that if some total 2.1029 + * hoser (like flex itself) wants to 2.1030 + * call the scanner after we return the 2.1031 + * YY_NULL, it'll still work - another 2.1032 + * YY_NULL will get returned. 2.1033 + */ 2.1034 + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; 2.1035 + 2.1036 + yy_act = YY_STATE_EOF(YY_START); 2.1037 + goto do_action; 2.1038 + } 2.1039 + 2.1040 + else 2.1041 + { 2.1042 + if ( ! yyg->yy_did_buffer_switch_on_eof ) 2.1043 + YY_NEW_FILE; 2.1044 + } 2.1045 + break; 2.1046 + } 2.1047 + 2.1048 + case EOB_ACT_CONTINUE_SCAN: 2.1049 + yyg->yy_c_buf_p = 2.1050 + yyg->yytext_ptr + yy_amount_of_matched_text; 2.1051 + 2.1052 + yy_current_state = yy_get_previous_state( yyscanner ); 2.1053 + 2.1054 + yy_cp = yyg->yy_c_buf_p; 2.1055 + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2.1056 + goto yy_match; 2.1057 + 2.1058 + case EOB_ACT_LAST_MATCH: 2.1059 + yyg->yy_c_buf_p = 2.1060 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; 2.1061 + 2.1062 + yy_current_state = yy_get_previous_state( yyscanner ); 2.1063 + 2.1064 + yy_cp = yyg->yy_c_buf_p; 2.1065 + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2.1066 + goto yy_find_action; 2.1067 + } 2.1068 + break; 2.1069 + } 2.1070 + 2.1071 + default: 2.1072 + YY_FATAL_ERROR( 2.1073 + "fatal flex scanner internal error--no action found" ); 2.1074 + } /* end of action switch */ 2.1075 + } /* end of scanning one token */ 2.1076 +} /* end of xlu__cfg_yylex */ 2.1077 + 2.1078 +/* yy_get_next_buffer - try to read in a new buffer 2.1079 + * 2.1080 + * Returns a code representing an action: 2.1081 + * EOB_ACT_LAST_MATCH - 2.1082 + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 2.1083 + * EOB_ACT_END_OF_FILE - end of file 2.1084 + */ 2.1085 +static int yy_get_next_buffer (yyscan_t yyscanner) 2.1086 +{ 2.1087 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1088 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 2.1089 + register char *source = yyg->yytext_ptr; 2.1090 + register int number_to_move, i; 2.1091 + int ret_val; 2.1092 + 2.1093 + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) 2.1094 + YY_FATAL_ERROR( 2.1095 + "fatal flex scanner internal error--end of buffer missed" ); 2.1096 + 2.1097 + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 2.1098 + { /* Don't try to fill the buffer, so this is an EOF. */ 2.1099 + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) 2.1100 + { 2.1101 + /* We matched a single character, the EOB, so 2.1102 + * treat this as a final EOF. 2.1103 + */ 2.1104 + return EOB_ACT_END_OF_FILE; 2.1105 + } 2.1106 + 2.1107 + else 2.1108 + { 2.1109 + /* We matched some text prior to the EOB, first 2.1110 + * process it. 2.1111 + */ 2.1112 + return EOB_ACT_LAST_MATCH; 2.1113 + } 2.1114 + } 2.1115 + 2.1116 + /* Try to read more data. */ 2.1117 + 2.1118 + /* First move last chars to start of buffer. */ 2.1119 + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; 2.1120 + 2.1121 + for ( i = 0; i < number_to_move; ++i ) 2.1122 + *(dest++) = *(source++); 2.1123 + 2.1124 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2.1125 + /* don't do the read, it's not guaranteed to return an EOF, 2.1126 + * just force an EOF 2.1127 + */ 2.1128 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; 2.1129 + 2.1130 + else 2.1131 + { 2.1132 + int num_to_read = 2.1133 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 2.1134 + 2.1135 + while ( num_to_read <= 0 ) 2.1136 + { /* Not enough room in the buffer - grow it. */ 2.1137 + 2.1138 + /* just a shorter name for the current buffer */ 2.1139 + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 2.1140 + 2.1141 + int yy_c_buf_p_offset = 2.1142 + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); 2.1143 + 2.1144 + if ( b->yy_is_our_buffer ) 2.1145 + { 2.1146 + int new_size = b->yy_buf_size * 2; 2.1147 + 2.1148 + if ( new_size <= 0 ) 2.1149 + b->yy_buf_size += b->yy_buf_size / 8; 2.1150 + else 2.1151 + b->yy_buf_size *= 2; 2.1152 + 2.1153 + b->yy_ch_buf = (char *) 2.1154 + /* Include room in for 2 EOB chars. */ 2.1155 + xlu__cfg_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); 2.1156 + } 2.1157 + else 2.1158 + /* Can't grow it, we don't own it. */ 2.1159 + b->yy_ch_buf = 0; 2.1160 + 2.1161 + if ( ! b->yy_ch_buf ) 2.1162 + YY_FATAL_ERROR( 2.1163 + "fatal error - scanner input buffer overflow" ); 2.1164 + 2.1165 + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 2.1166 + 2.1167 + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 2.1168 + number_to_move - 1; 2.1169 + 2.1170 + } 2.1171 + 2.1172 + if ( num_to_read > YY_READ_BUF_SIZE ) 2.1173 + num_to_read = YY_READ_BUF_SIZE; 2.1174 + 2.1175 + /* Read in more data. */ 2.1176 + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 2.1177 + yyg->yy_n_chars, (size_t) num_to_read ); 2.1178 + 2.1179 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2.1180 + } 2.1181 + 2.1182 + if ( yyg->yy_n_chars == 0 ) 2.1183 + { 2.1184 + if ( number_to_move == YY_MORE_ADJ ) 2.1185 + { 2.1186 + ret_val = EOB_ACT_END_OF_FILE; 2.1187 + xlu__cfg_yyrestart(yyin ,yyscanner); 2.1188 + } 2.1189 + 2.1190 + else 2.1191 + { 2.1192 + ret_val = EOB_ACT_LAST_MATCH; 2.1193 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 2.1194 + YY_BUFFER_EOF_PENDING; 2.1195 + } 2.1196 + } 2.1197 + 2.1198 + else 2.1199 + ret_val = EOB_ACT_CONTINUE_SCAN; 2.1200 + 2.1201 + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 2.1202 + /* Extend the array by 50%, plus the number we really need. */ 2.1203 + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); 2.1204 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xlu__cfg_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); 2.1205 + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 2.1206 + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 2.1207 + } 2.1208 + 2.1209 + yyg->yy_n_chars += number_to_move; 2.1210 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; 2.1211 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 2.1212 + 2.1213 + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 2.1214 + 2.1215 + return ret_val; 2.1216 +} 2.1217 + 2.1218 +/* yy_get_previous_state - get the state just before the EOB char was reached */ 2.1219 + 2.1220 + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) 2.1221 +{ 2.1222 + register yy_state_type yy_current_state; 2.1223 + register char *yy_cp; 2.1224 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1225 + 2.1226 + yy_current_state = yyg->yy_start; 2.1227 + 2.1228 + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) 2.1229 + { 2.1230 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 2.1231 + if ( yy_accept[yy_current_state] ) 2.1232 + { 2.1233 + yyg->yy_last_accepting_state = yy_current_state; 2.1234 + yyg->yy_last_accepting_cpos = yy_cp; 2.1235 + } 2.1236 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2.1237 + { 2.1238 + yy_current_state = (int) yy_def[yy_current_state]; 2.1239 + if ( yy_current_state >= 34 ) 2.1240 + yy_c = yy_meta[(unsigned int) yy_c]; 2.1241 + } 2.1242 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2.1243 + } 2.1244 + 2.1245 + return yy_current_state; 2.1246 +} 2.1247 + 2.1248 +/* yy_try_NUL_trans - try to make a transition on the NUL character 2.1249 + * 2.1250 + * synopsis 2.1251 + * next_state = yy_try_NUL_trans( current_state ); 2.1252 + */ 2.1253 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) 2.1254 +{ 2.1255 + register int yy_is_jam; 2.1256 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ 2.1257 + register char *yy_cp = yyg->yy_c_buf_p; 2.1258 + 2.1259 + register YY_CHAR yy_c = 1; 2.1260 + if ( yy_accept[yy_current_state] ) 2.1261 + { 2.1262 + yyg->yy_last_accepting_state = yy_current_state; 2.1263 + yyg->yy_last_accepting_cpos = yy_cp; 2.1264 + } 2.1265 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2.1266 + { 2.1267 + yy_current_state = (int) yy_def[yy_current_state]; 2.1268 + if ( yy_current_state >= 34 ) 2.1269 + yy_c = yy_meta[(unsigned int) yy_c]; 2.1270 + } 2.1271 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2.1272 + yy_is_jam = (yy_current_state == 33); 2.1273 + 2.1274 + return yy_is_jam ? 0 : yy_current_state; 2.1275 +} 2.1276 + 2.1277 +#ifndef YY_NO_INPUT 2.1278 +#ifdef __cplusplus 2.1279 + static int yyinput (yyscan_t yyscanner) 2.1280 +#else 2.1281 + static int input (yyscan_t yyscanner) 2.1282 +#endif 2.1283 + 2.1284 +{ 2.1285 + int c; 2.1286 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1287 + 2.1288 + *yyg->yy_c_buf_p = yyg->yy_hold_char; 2.1289 + 2.1290 + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2.1291 + { 2.1292 + /* yy_c_buf_p now points to the character we want to return. 2.1293 + * If this occurs *before* the EOB characters, then it's a 2.1294 + * valid NUL; if not, then we've hit the end of the buffer. 2.1295 + */ 2.1296 + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) 2.1297 + /* This was really a NUL. */ 2.1298 + *yyg->yy_c_buf_p = '\0'; 2.1299 + 2.1300 + else 2.1301 + { /* need more input */ 2.1302 + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; 2.1303 + ++yyg->yy_c_buf_p; 2.1304 + 2.1305 + switch ( yy_get_next_buffer( yyscanner ) ) 2.1306 + { 2.1307 + case EOB_ACT_LAST_MATCH: 2.1308 + /* This happens because yy_g_n_b() 2.1309 + * sees that we've accumulated a 2.1310 + * token and flags that we need to 2.1311 + * try matching the token before 2.1312 + * proceeding. But for input(), 2.1313 + * there's no matching to consider. 2.1314 + * So convert the EOB_ACT_LAST_MATCH 2.1315 + * to EOB_ACT_END_OF_FILE. 2.1316 + */ 2.1317 + 2.1318 + /* Reset buffer status. */ 2.1319 + xlu__cfg_yyrestart(yyin ,yyscanner); 2.1320 + 2.1321 + /*FALLTHROUGH*/ 2.1322 + 2.1323 + case EOB_ACT_END_OF_FILE: 2.1324 + { 2.1325 + if ( xlu__cfg_yywrap(yyscanner ) ) 2.1326 + return EOF; 2.1327 + 2.1328 + if ( ! yyg->yy_did_buffer_switch_on_eof ) 2.1329 + YY_NEW_FILE; 2.1330 +#ifdef __cplusplus 2.1331 + return yyinput(yyscanner); 2.1332 +#else 2.1333 + return input(yyscanner); 2.1334 +#endif 2.1335 + } 2.1336 + 2.1337 + case EOB_ACT_CONTINUE_SCAN: 2.1338 + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; 2.1339 + break; 2.1340 + } 2.1341 + } 2.1342 + } 2.1343 + 2.1344 + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ 2.1345 + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ 2.1346 + yyg->yy_hold_char = *++yyg->yy_c_buf_p; 2.1347 + 2.1348 + if ( c == '\n' ) 2.1349 + 2.1350 + do{ yylineno++; 2.1351 + yycolumn=0; 2.1352 + }while(0) 2.1353 +; 2.1354 + 2.1355 + return c; 2.1356 +} 2.1357 +#endif /* ifndef YY_NO_INPUT */ 2.1358 + 2.1359 +/** Immediately switch to a different input stream. 2.1360 + * @param input_file A readable stream. 2.1361 + * @param yyscanner The scanner object. 2.1362 + * @note This function does not reset the start condition to @c INITIAL . 2.1363 + */ 2.1364 + void xlu__cfg_yyrestart (FILE * input_file , yyscan_t yyscanner) 2.1365 +{ 2.1366 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1367 + 2.1368 + if ( ! YY_CURRENT_BUFFER ){ 2.1369 + xlu__cfg_yyensure_buffer_stack (yyscanner); 2.1370 + YY_CURRENT_BUFFER_LVALUE = 2.1371 + xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); 2.1372 + } 2.1373 + 2.1374 + xlu__cfg_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); 2.1375 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.1376 +} 2.1377 + 2.1378 +/** Switch to a different input buffer. 2.1379 + * @param new_buffer The new input buffer. 2.1380 + * @param yyscanner The scanner object. 2.1381 + */ 2.1382 + void xlu__cfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) 2.1383 +{ 2.1384 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1385 + 2.1386 + /* TODO. We should be able to replace this entire function body 2.1387 + * with 2.1388 + * xlu__cfg_yypop_buffer_state(); 2.1389 + * xlu__cfg_yypush_buffer_state(new_buffer); 2.1390 + */ 2.1391 + xlu__cfg_yyensure_buffer_stack (yyscanner); 2.1392 + if ( YY_CURRENT_BUFFER == new_buffer ) 2.1393 + return; 2.1394 + 2.1395 + if ( YY_CURRENT_BUFFER ) 2.1396 + { 2.1397 + /* Flush out information for old buffer. */ 2.1398 + *yyg->yy_c_buf_p = yyg->yy_hold_char; 2.1399 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; 2.1400 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2.1401 + } 2.1402 + 2.1403 + YY_CURRENT_BUFFER_LVALUE = new_buffer; 2.1404 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.1405 + 2.1406 + /* We don't actually know whether we did this switch during 2.1407 + * EOF (xlu__cfg_yywrap()) processing, but the only time this flag 2.1408 + * is looked at is after xlu__cfg_yywrap() is called, so it's safe 2.1409 + * to go ahead and always set it. 2.1410 + */ 2.1411 + yyg->yy_did_buffer_switch_on_eof = 1; 2.1412 +} 2.1413 + 2.1414 +static void xlu__cfg_yy_load_buffer_state (yyscan_t yyscanner) 2.1415 +{ 2.1416 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1417 + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2.1418 + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 2.1419 + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 2.1420 + yyg->yy_hold_char = *yyg->yy_c_buf_p; 2.1421 +} 2.1422 + 2.1423 +/** Allocate and initialize an input buffer state. 2.1424 + * @param file A readable stream. 2.1425 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 2.1426 + * @param yyscanner The scanner object. 2.1427 + * @return the allocated buffer state. 2.1428 + */ 2.1429 + YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) 2.1430 +{ 2.1431 + YY_BUFFER_STATE b; 2.1432 + 2.1433 + b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); 2.1434 + if ( ! b ) 2.1435 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" ); 2.1436 + 2.1437 + b->yy_buf_size = size; 2.1438 + 2.1439 + /* yy_ch_buf has to be 2 characters longer than the size given because 2.1440 + * we need to put in 2 end-of-buffer characters. 2.1441 + */ 2.1442 + b->yy_ch_buf = (char *) xlu__cfg_yyalloc(b->yy_buf_size + 2 ,yyscanner ); 2.1443 + if ( ! b->yy_ch_buf ) 2.1444 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" ); 2.1445 + 2.1446 + b->yy_is_our_buffer = 1; 2.1447 + 2.1448 + xlu__cfg_yy_init_buffer(b,file ,yyscanner); 2.1449 + 2.1450 + return b; 2.1451 +} 2.1452 + 2.1453 +/** Destroy the buffer. 2.1454 + * @param b a buffer created with xlu__cfg_yy_create_buffer() 2.1455 + * @param yyscanner The scanner object. 2.1456 + */ 2.1457 + void xlu__cfg_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) 2.1458 +{ 2.1459 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1460 + 2.1461 + if ( ! b ) 2.1462 + return; 2.1463 + 2.1464 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 2.1465 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 2.1466 + 2.1467 + if ( b->yy_is_our_buffer ) 2.1468 + xlu__cfg_yyfree((void *) b->yy_ch_buf ,yyscanner ); 2.1469 + 2.1470 + xlu__cfg_yyfree((void *) b ,yyscanner ); 2.1471 +} 2.1472 + 2.1473 +#ifndef __cplusplus 2.1474 +extern int isatty (int ); 2.1475 +#endif /* __cplusplus */ 2.1476 + 2.1477 +/* Initializes or reinitializes a buffer. 2.1478 + * This function is sometimes called more than once on the same buffer, 2.1479 + * such as during a xlu__cfg_yyrestart() or at EOF. 2.1480 + */ 2.1481 + static void xlu__cfg_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) 2.1482 + 2.1483 +{ 2.1484 + int oerrno = errno; 2.1485 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1486 + 2.1487 + xlu__cfg_yy_flush_buffer(b ,yyscanner); 2.1488 + 2.1489 + b->yy_input_file = file; 2.1490 + b->yy_fill_buffer = 1; 2.1491 + 2.1492 + /* If b is the current buffer, then xlu__cfg_yy_init_buffer was _probably_ 2.1493 + * called from xlu__cfg_yyrestart() or through yy_get_next_buffer. 2.1494 + * In that case, we don't want to reset the lineno or column. 2.1495 + */ 2.1496 + if (b != YY_CURRENT_BUFFER){ 2.1497 + b->yy_bs_lineno = 1; 2.1498 + b->yy_bs_column = 0; 2.1499 + } 2.1500 + 2.1501 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 2.1502 + 2.1503 + errno = oerrno; 2.1504 +} 2.1505 + 2.1506 +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. 2.1507 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 2.1508 + * @param yyscanner The scanner object. 2.1509 + */ 2.1510 + void xlu__cfg_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) 2.1511 +{ 2.1512 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1513 + if ( ! b ) 2.1514 + return; 2.1515 + 2.1516 + b->yy_n_chars = 0; 2.1517 + 2.1518 + /* We always need two end-of-buffer characters. The first causes 2.1519 + * a transition to the end-of-buffer state. The second causes 2.1520 + * a jam in that state. 2.1521 + */ 2.1522 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 2.1523 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 2.1524 + 2.1525 + b->yy_buf_pos = &b->yy_ch_buf[0]; 2.1526 + 2.1527 + b->yy_at_bol = 1; 2.1528 + b->yy_buffer_status = YY_BUFFER_NEW; 2.1529 + 2.1530 + if ( b == YY_CURRENT_BUFFER ) 2.1531 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.1532 +} 2.1533 + 2.1534 +/** Pushes the new state onto the stack. The new state becomes 2.1535 + * the current state. This function will allocate the stack 2.1536 + * if necessary. 2.1537 + * @param new_buffer The new state. 2.1538 + * @param yyscanner The scanner object. 2.1539 + */ 2.1540 +void xlu__cfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) 2.1541 +{ 2.1542 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1543 + if (new_buffer == NULL) 2.1544 + return; 2.1545 + 2.1546 + xlu__cfg_yyensure_buffer_stack(yyscanner); 2.1547 + 2.1548 + /* This block is copied from xlu__cfg_yy_switch_to_buffer. */ 2.1549 + if ( YY_CURRENT_BUFFER ) 2.1550 + { 2.1551 + /* Flush out information for old buffer. */ 2.1552 + *yyg->yy_c_buf_p = yyg->yy_hold_char; 2.1553 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; 2.1554 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2.1555 + } 2.1556 + 2.1557 + /* Only push if top exists. Otherwise, replace top. */ 2.1558 + if (YY_CURRENT_BUFFER) 2.1559 + yyg->yy_buffer_stack_top++; 2.1560 + YY_CURRENT_BUFFER_LVALUE = new_buffer; 2.1561 + 2.1562 + /* copied from xlu__cfg_yy_switch_to_buffer. */ 2.1563 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.1564 + yyg->yy_did_buffer_switch_on_eof = 1; 2.1565 +} 2.1566 + 2.1567 +/** Removes and deletes the top of the stack, if present. 2.1568 + * The next element becomes the new top. 2.1569 + * @param yyscanner The scanner object. 2.1570 + */ 2.1571 +void xlu__cfg_yypop_buffer_state (yyscan_t yyscanner) 2.1572 +{ 2.1573 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1574 + if (!YY_CURRENT_BUFFER) 2.1575 + return; 2.1576 + 2.1577 + xlu__cfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); 2.1578 + YY_CURRENT_BUFFER_LVALUE = NULL; 2.1579 + if (yyg->yy_buffer_stack_top > 0) 2.1580 + --yyg->yy_buffer_stack_top; 2.1581 + 2.1582 + if (YY_CURRENT_BUFFER) { 2.1583 + xlu__cfg_yy_load_buffer_state(yyscanner ); 2.1584 + yyg->yy_did_buffer_switch_on_eof = 1; 2.1585 + } 2.1586 +} 2.1587 + 2.1588 +/* Allocates the stack if it does not exist. 2.1589 + * Guarantees space for at least one push. 2.1590 + */ 2.1591 +static void xlu__cfg_yyensure_buffer_stack (yyscan_t yyscanner) 2.1592 +{ 2.1593 + int num_to_alloc; 2.1594 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1595 + 2.1596 + if (!yyg->yy_buffer_stack) { 2.1597 + 2.1598 + /* First allocation is just for 2 elements, since we don't know if this 2.1599 + * scanner will even need a stack. We use 2 instead of 1 to avoid an 2.1600 + * immediate realloc on the next call. 2.1601 + */ 2.1602 + num_to_alloc = 1; 2.1603 + yyg->yy_buffer_stack = (struct yy_buffer_state**)xlu__cfg_yyalloc 2.1604 + (num_to_alloc * sizeof(struct yy_buffer_state*) 2.1605 + , yyscanner); 2.1606 + if ( ! yyg->yy_buffer_stack ) 2.1607 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" ); 2.1608 + 2.1609 + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 2.1610 + 2.1611 + yyg->yy_buffer_stack_max = num_to_alloc; 2.1612 + yyg->yy_buffer_stack_top = 0; 2.1613 + return; 2.1614 + } 2.1615 + 2.1616 + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ 2.1617 + 2.1618 + /* Increase the buffer to prepare for a possible push. */ 2.1619 + int grow_size = 8 /* arbitrary grow size */; 2.1620 + 2.1621 + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; 2.1622 + yyg->yy_buffer_stack = (struct yy_buffer_state**)xlu__cfg_yyrealloc 2.1623 + (yyg->yy_buffer_stack, 2.1624 + num_to_alloc * sizeof(struct yy_buffer_state*) 2.1625 + , yyscanner); 2.1626 + if ( ! yyg->yy_buffer_stack ) 2.1627 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" ); 2.1628 + 2.1629 + /* zero only the new slots.*/ 2.1630 + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); 2.1631 + yyg->yy_buffer_stack_max = num_to_alloc; 2.1632 + } 2.1633 +} 2.1634 + 2.1635 +/** Setup the input buffer state to scan directly from a user-specified character buffer. 2.1636 + * @param base the character buffer 2.1637 + * @param size the size in bytes of the character buffer 2.1638 + * @param yyscanner The scanner object. 2.1639 + * @return the newly allocated buffer state object. 2.1640 + */ 2.1641 +YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) 2.1642 +{ 2.1643 + YY_BUFFER_STATE b; 2.1644 + 2.1645 + if ( size < 2 || 2.1646 + base[size-2] != YY_END_OF_BUFFER_CHAR || 2.1647 + base[size-1] != YY_END_OF_BUFFER_CHAR ) 2.1648 + /* They forgot to leave room for the EOB's. */ 2.1649 + return 0; 2.1650 + 2.1651 + b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); 2.1652 + if ( ! b ) 2.1653 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_scan_buffer()" ); 2.1654 + 2.1655 + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 2.1656 + b->yy_buf_pos = b->yy_ch_buf = base; 2.1657 + b->yy_is_our_buffer = 0; 2.1658 + b->yy_input_file = 0; 2.1659 + b->yy_n_chars = b->yy_buf_size; 2.1660 + b->yy_is_interactive = 0; 2.1661 + b->yy_at_bol = 1; 2.1662 + b->yy_fill_buffer = 0; 2.1663 + b->yy_buffer_status = YY_BUFFER_NEW; 2.1664 + 2.1665 + xlu__cfg_yy_switch_to_buffer(b ,yyscanner ); 2.1666 + 2.1667 + return b; 2.1668 +} 2.1669 + 2.1670 +/** Setup the input buffer state to scan a string. The next call to xlu__cfg_yylex() will 2.1671 + * scan from a @e copy of @a str. 2.1672 + * @param yystr a NUL-terminated string to scan 2.1673 + * @param yyscanner The scanner object. 2.1674 + * @return the newly allocated buffer state object. 2.1675 + * @note If you want to scan bytes that may contain NUL values, then use 2.1676 + * xlu__cfg_yy_scan_bytes() instead. 2.1677 + */ 2.1678 +YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) 2.1679 +{ 2.1680 + 2.1681 + return xlu__cfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); 2.1682 +} 2.1683 + 2.1684 +/** Setup the input buffer state to scan the given bytes. The next call to xlu__cfg_yylex() will 2.1685 + * scan from a @e copy of @a bytes. 2.1686 + * @param yybytes the byte buffer to scan 2.1687 + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 2.1688 + * @param yyscanner The scanner object. 2.1689 + * @return the newly allocated buffer state object. 2.1690 + */ 2.1691 +YY_BUFFER_STATE xlu__cfg_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) 2.1692 +{ 2.1693 + YY_BUFFER_STATE b; 2.1694 + char *buf; 2.1695 + yy_size_t n; 2.1696 + int i; 2.1697 + 2.1698 + /* Get memory for full buffer, including space for trailing EOB's. */ 2.1699 + n = _yybytes_len + 2; 2.1700 + buf = (char *) xlu__cfg_yyalloc(n ,yyscanner ); 2.1701 + if ( ! buf ) 2.1702 + YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_scan_bytes()" ); 2.1703 + 2.1704 + for ( i = 0; i < _yybytes_len; ++i ) 2.1705 + buf[i] = yybytes[i]; 2.1706 + 2.1707 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 2.1708 + 2.1709 + b = xlu__cfg_yy_scan_buffer(buf,n ,yyscanner); 2.1710 + if ( ! b ) 2.1711 + YY_FATAL_ERROR( "bad buffer in xlu__cfg_yy_scan_bytes()" ); 2.1712 + 2.1713 + /* It's okay to grow etc. this buffer, and we should throw it 2.1714 + * away when we're done. 2.1715 + */ 2.1716 + b->yy_is_our_buffer = 1; 2.1717 + 2.1718 + return b; 2.1719 +} 2.1720 + 2.1721 +#ifndef YY_EXIT_FAILURE 2.1722 +#define YY_EXIT_FAILURE 2 2.1723 +#endif 2.1724 + 2.1725 +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) 2.1726 +{ 2.1727 + (void) fprintf( stderr, "%s\n", msg ); 2.1728 + exit( YY_EXIT_FAILURE ); 2.1729 +} 2.1730 + 2.1731 +/* Redefine yyless() so it works in section 3 code. */ 2.1732 + 2.1733 +#undef yyless 2.1734 +#define yyless(n) \ 2.1735 + do \ 2.1736 + { \ 2.1737 + /* Undo effects of setting up yytext. */ \ 2.1738 + int yyless_macro_arg = (n); \ 2.1739 + YY_LESS_LINENO(yyless_macro_arg);\ 2.1740 + yytext[yyleng] = yyg->yy_hold_char; \ 2.1741 + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ 2.1742 + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ 2.1743 + *yyg->yy_c_buf_p = '\0'; \ 2.1744 + yyleng = yyless_macro_arg; \ 2.1745 + } \ 2.1746 + while ( 0 ) 2.1747 + 2.1748 +/* Accessor methods (get/set functions) to struct members. */ 2.1749 + 2.1750 +/** Get the user-defined data for this scanner. 2.1751 + * @param yyscanner The scanner object. 2.1752 + */ 2.1753 +YY_EXTRA_TYPE xlu__cfg_yyget_extra (yyscan_t yyscanner) 2.1754 +{ 2.1755 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1756 + return yyextra; 2.1757 +} 2.1758 + 2.1759 +/** Get the current line number. 2.1760 + * @param yyscanner The scanner object. 2.1761 + */ 2.1762 +int xlu__cfg_yyget_lineno (yyscan_t yyscanner) 2.1763 +{ 2.1764 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1765 + 2.1766 + if (! YY_CURRENT_BUFFER) 2.1767 + return 0; 2.1768 + 2.1769 + return yylineno; 2.1770 +} 2.1771 + 2.1772 +/** Get the current column number. 2.1773 + * @param yyscanner The scanner object. 2.1774 + */ 2.1775 +int xlu__cfg_yyget_column (yyscan_t yyscanner) 2.1776 +{ 2.1777 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1778 + 2.1779 + if (! YY_CURRENT_BUFFER) 2.1780 + return 0; 2.1781 + 2.1782 + return yycolumn; 2.1783 +} 2.1784 + 2.1785 +/** Get the input stream. 2.1786 + * @param yyscanner The scanner object. 2.1787 + */ 2.1788 +FILE *xlu__cfg_yyget_in (yyscan_t yyscanner) 2.1789 +{ 2.1790 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1791 + return yyin; 2.1792 +} 2.1793 + 2.1794 +/** Get the output stream. 2.1795 + * @param yyscanner The scanner object. 2.1796 + */ 2.1797 +FILE *xlu__cfg_yyget_out (yyscan_t yyscanner) 2.1798 +{ 2.1799 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1800 + return yyout; 2.1801 +} 2.1802 + 2.1803 +/** Get the length of the current token. 2.1804 + * @param yyscanner The scanner object. 2.1805 + */ 2.1806 +int xlu__cfg_yyget_leng (yyscan_t yyscanner) 2.1807 +{ 2.1808 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1809 + return yyleng; 2.1810 +} 2.1811 + 2.1812 +/** Get the current token. 2.1813 + * @param yyscanner The scanner object. 2.1814 + */ 2.1815 + 2.1816 +char *xlu__cfg_yyget_text (yyscan_t yyscanner) 2.1817 +{ 2.1818 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1819 + return yytext; 2.1820 +} 2.1821 + 2.1822 +/** Set the user-defined data. This data is never touched by the scanner. 2.1823 + * @param user_defined The data to be associated with this scanner. 2.1824 + * @param yyscanner The scanner object. 2.1825 + */ 2.1826 +void xlu__cfg_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) 2.1827 +{ 2.1828 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1829 + yyextra = user_defined ; 2.1830 +} 2.1831 + 2.1832 +/** Set the current line number. 2.1833 + * @param line_number 2.1834 + * @param yyscanner The scanner object. 2.1835 + */ 2.1836 +void xlu__cfg_yyset_lineno (int line_number , yyscan_t yyscanner) 2.1837 +{ 2.1838 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1839 + 2.1840 + /* lineno is only valid if an input buffer exists. */ 2.1841 + if (! YY_CURRENT_BUFFER ) 2.1842 + yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner); 2.1843 + 2.1844 + yylineno = line_number; 2.1845 +} 2.1846 + 2.1847 +/** Set the current column. 2.1848 + * @param line_number 2.1849 + * @param yyscanner The scanner object. 2.1850 + */ 2.1851 +void xlu__cfg_yyset_column (int column_no , yyscan_t yyscanner) 2.1852 +{ 2.1853 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1854 + 2.1855 + /* column is only valid if an input buffer exists. */ 2.1856 + if (! YY_CURRENT_BUFFER ) 2.1857 + yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner); 2.1858 + 2.1859 + yycolumn = column_no; 2.1860 +} 2.1861 + 2.1862 +/** Set the input stream. This does not discard the current 2.1863 + * input buffer. 2.1864 + * @param in_str A readable stream. 2.1865 + * @param yyscanner The scanner object. 2.1866 + * @see xlu__cfg_yy_switch_to_buffer 2.1867 + */ 2.1868 +void xlu__cfg_yyset_in (FILE * in_str , yyscan_t yyscanner) 2.1869 +{ 2.1870 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1871 + yyin = in_str ; 2.1872 +} 2.1873 + 2.1874 +void xlu__cfg_yyset_out (FILE * out_str , yyscan_t yyscanner) 2.1875 +{ 2.1876 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1877 + yyout = out_str ; 2.1878 +} 2.1879 + 2.1880 +int xlu__cfg_yyget_debug (yyscan_t yyscanner) 2.1881 +{ 2.1882 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1883 + return yy_flex_debug; 2.1884 +} 2.1885 + 2.1886 +void xlu__cfg_yyset_debug (int bdebug , yyscan_t yyscanner) 2.1887 +{ 2.1888 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1889 + yy_flex_debug = bdebug ; 2.1890 +} 2.1891 + 2.1892 +/* Accessor methods for yylval and yylloc */ 2.1893 + 2.1894 +YYSTYPE * xlu__cfg_yyget_lval (yyscan_t yyscanner) 2.1895 +{ 2.1896 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1897 + return yylval; 2.1898 +} 2.1899 + 2.1900 +void xlu__cfg_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) 2.1901 +{ 2.1902 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1903 + yylval = yylval_param; 2.1904 +} 2.1905 + 2.1906 +YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner) 2.1907 +{ 2.1908 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1909 + return yylloc; 2.1910 +} 2.1911 + 2.1912 +void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) 2.1913 +{ 2.1914 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1915 + yylloc = yylloc_param; 2.1916 +} 2.1917 + 2.1918 +/* User-visible API */ 2.1919 + 2.1920 +/* xlu__cfg_yylex_init is special because it creates the scanner itself, so it is 2.1921 + * the ONLY reentrant function that doesn't take the scanner as the last argument. 2.1922 + * That's why we explicitly handle the declaration, instead of using our macros. 2.1923 + */ 2.1924 + 2.1925 +int xlu__cfg_yylex_init(yyscan_t* ptr_yy_globals) 2.1926 + 2.1927 +{ 2.1928 + if (ptr_yy_globals == NULL){ 2.1929 + errno = EINVAL; 2.1930 + return 1; 2.1931 + } 2.1932 + 2.1933 + *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), NULL ); 2.1934 + 2.1935 + if (*ptr_yy_globals == NULL){ 2.1936 + errno = ENOMEM; 2.1937 + return 1; 2.1938 + } 2.1939 + 2.1940 + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ 2.1941 + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); 2.1942 + 2.1943 + return yy_init_globals ( *ptr_yy_globals ); 2.1944 +} 2.1945 + 2.1946 +/* xlu__cfg_yylex_init_extra has the same functionality as xlu__cfg_yylex_init, but follows the 2.1947 + * convention of taking the scanner as the last argument. Note however, that 2.1948 + * this is a *pointer* to a scanner, as it will be allocated by this call (and 2.1949 + * is the reason, too, why this function also must handle its own declaration). 2.1950 + * The user defined value in the first argument will be available to xlu__cfg_yyalloc in 2.1951 + * the yyextra field. 2.1952 + */ 2.1953 + 2.1954 +int xlu__cfg_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) 2.1955 + 2.1956 +{ 2.1957 + struct yyguts_t dummy_yyguts; 2.1958 + 2.1959 + xlu__cfg_yyset_extra (yy_user_defined, &dummy_yyguts); 2.1960 + 2.1961 + if (ptr_yy_globals == NULL){ 2.1962 + errno = EINVAL; 2.1963 + return 1; 2.1964 + } 2.1965 + 2.1966 + *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); 2.1967 + 2.1968 + if (*ptr_yy_globals == NULL){ 2.1969 + errno = ENOMEM; 2.1970 + return 1; 2.1971 + } 2.1972 + 2.1973 + /* By setting to 0xAA, we expose bugs in 2.1974 + yy_init_globals. Leave at 0x00 for releases. */ 2.1975 + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); 2.1976 + 2.1977 + xlu__cfg_yyset_extra (yy_user_defined, *ptr_yy_globals); 2.1978 + 2.1979 + return yy_init_globals ( *ptr_yy_globals ); 2.1980 +} 2.1981 + 2.1982 +static int yy_init_globals (yyscan_t yyscanner) 2.1983 +{ 2.1984 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.1985 + /* Initialization is the same as for the non-reentrant scanner. 2.1986 + * This function is called from xlu__cfg_yylex_destroy(), so don't allocate here. 2.1987 + */ 2.1988 + 2.1989 + yyg->yy_buffer_stack = 0; 2.1990 + yyg->yy_buffer_stack_top = 0; 2.1991 + yyg->yy_buffer_stack_max = 0; 2.1992 + yyg->yy_c_buf_p = (char *) 0; 2.1993 + yyg->yy_init = 0; 2.1994 + yyg->yy_start = 0; 2.1995 + 2.1996 + yyg->yy_start_stack_ptr = 0; 2.1997 + yyg->yy_start_stack_depth = 0; 2.1998 + yyg->yy_start_stack = NULL; 2.1999 + 2.2000 +/* Defined in main.c */ 2.2001 +#ifdef YY_STDINIT 2.2002 + yyin = stdin; 2.2003 + yyout = stdout; 2.2004 +#else 2.2005 + yyin = (FILE *) 0; 2.2006 + yyout = (FILE *) 0; 2.2007 +#endif 2.2008 + 2.2009 + /* For future reference: Set errno on error, since we are called by 2.2010 + * xlu__cfg_yylex_init() 2.2011 + */ 2.2012 + return 0; 2.2013 +} 2.2014 + 2.2015 +/* xlu__cfg_yylex_destroy is for both reentrant and non-reentrant scanners. */ 2.2016 +int xlu__cfg_yylex_destroy (yyscan_t yyscanner) 2.2017 +{ 2.2018 + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2.2019 + 2.2020 + /* Pop the buffer stack, destroying each element. */ 2.2021 + while(YY_CURRENT_BUFFER){ 2.2022 + xlu__cfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); 2.2023 + YY_CURRENT_BUFFER_LVALUE = NULL; 2.2024 + xlu__cfg_yypop_buffer_state(yyscanner); 2.2025 + } 2.2026 + 2.2027 + /* Destroy the stack itself. */ 2.2028 + xlu__cfg_yyfree(yyg->yy_buffer_stack ,yyscanner); 2.2029 + yyg->yy_buffer_stack = NULL; 2.2030 + 2.2031 + /* Destroy the start condition stack. */ 2.2032 + xlu__cfg_yyfree(yyg->yy_start_stack ,yyscanner ); 2.2033 + yyg->yy_start_stack = NULL; 2.2034 + 2.2035 + /* Reset the globals. This is important in a non-reentrant scanner so the next time 2.2036 + * xlu__cfg_yylex() is called, initialization will occur. */ 2.2037 + yy_init_globals( yyscanner); 2.2038 + 2.2039 + /* Destroy the main struct (reentrant only). */ 2.2040 + xlu__cfg_yyfree ( yyscanner , yyscanner ); 2.2041 + yyscanner = NULL; 2.2042 + return 0; 2.2043 +} 2.2044 + 2.2045 +/* 2.2046 + * Internal utility routines. 2.2047 + */ 2.2048 + 2.2049 +#ifndef yytext_ptr 2.2050 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) 2.2051 +{ 2.2052 + register int i; 2.2053 + for ( i = 0; i < n; ++i ) 2.2054 + s1[i] = s2[i]; 2.2055 +} 2.2056 +#endif 2.2057 + 2.2058 +#ifdef YY_NEED_STRLEN 2.2059 +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) 2.2060 +{ 2.2061 + register int n; 2.2062 + for ( n = 0; s[n]; ++n ) 2.2063 + ; 2.2064 + 2.2065 + return n; 2.2066 +} 2.2067 +#endif 2.2068 + 2.2069 +void *xlu__cfg_yyalloc (yy_size_t size , yyscan_t yyscanner) 2.2070 +{ 2.2071 + return (void *) malloc( size ); 2.2072 +} 2.2073 + 2.2074 +void *xlu__cfg_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) 2.2075 +{ 2.2076 + /* The cast to (char *) in the following accommodates both 2.2077 + * implementations that use char* generic pointers, and those 2.2078 + * that use void* generic pointers. It works with the latter 2.2079 + * because both ANSI C and C++ allow castless assignment from 2.2080 + * any pointer type to void*, and deal with argument conversions 2.2081 + * as though doing an assignment. 2.2082 + */ 2.2083 + return (void *) realloc( (char *) ptr, size ); 2.2084 +} 2.2085 + 2.2086 +void xlu__cfg_yyfree (void * ptr , yyscan_t yyscanner) 2.2087 +{ 2.2088 + free( (char *) ptr ); /* see xlu__cfg_yyrealloc() for (char *) cast */ 2.2089 +} 2.2090 + 2.2091 +#define YYTABLES_NAME "yytables" 2.2092 + 2.2093 +#line 75 "libxlu_cfg_l.l"
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tools/libxl/libxlu_cfg_l.h Fri Mar 05 14:35:09 2010 +0000 3.3 @@ -0,0 +1,357 @@ 3.4 +#ifndef xlu__cfg_yyHEADER_H 3.5 +#define xlu__cfg_yyHEADER_H 1 3.6 +#define xlu__cfg_yyIN_HEADER 1 3.7 + 3.8 +#line 6 "libxlu_cfg_l.h" 3.9 + 3.10 +#line 8 "libxlu_cfg_l.h" 3.11 + 3.12 +#define YY_INT_ALIGNED short int 3.13 + 3.14 +/* A lexical scanner generated by flex */ 3.15 + 3.16 +#define FLEX_SCANNER 3.17 +#define YY_FLEX_MAJOR_VERSION 2 3.18 +#define YY_FLEX_MINOR_VERSION 5 3.19 +#define YY_FLEX_SUBMINOR_VERSION 35 3.20 +#if YY_FLEX_SUBMINOR_VERSION > 0 3.21 +#define FLEX_BETA 3.22 +#endif 3.23 + 3.24 +/* First, we deal with platform-specific or compiler-specific issues. */ 3.25 + 3.26 +/* begin standard C headers. */ 3.27 +#include <stdio.h> 3.28 +#include <string.h> 3.29 +#include <errno.h> 3.30 +#include <stdlib.h> 3.31 + 3.32 +/* end standard C headers. */ 3.33 + 3.34 +/* flex integer type definitions */ 3.35 + 3.36 +#ifndef FLEXINT_H 3.37 +#define FLEXINT_H 3.38 + 3.39 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 3.40 + 3.41 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 3.42 + 3.43 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 3.44 + * if you want the limit (max/min) macros for int types. 3.45 + */ 3.46 +#ifndef __STDC_LIMIT_MACROS 3.47 +#define __STDC_LIMIT_MACROS 1 3.48 +#endif 3.49 + 3.50 +#include <inttypes.h> 3.51 +typedef int8_t flex_int8_t; 3.52 +typedef uint8_t flex_uint8_t; 3.53 +typedef int16_t flex_int16_t; 3.54 +typedef uint16_t flex_uint16_t; 3.55 +typedef int32_t flex_int32_t; 3.56 +typedef uint32_t flex_uint32_t; 3.57 +#else 3.58 +typedef signed char flex_int8_t; 3.59 +typedef short int flex_int16_t; 3.60 +typedef int flex_int32_t; 3.61 +typedef unsigned char flex_uint8_t; 3.62 +typedef unsigned short int flex_uint16_t; 3.63 +typedef unsigned int flex_uint32_t; 3.64 + 3.65 +/* Limits of integral types. */ 3.66 +#ifndef INT8_MIN 3.67 +#define INT8_MIN (-128) 3.68 +#endif 3.69 +#ifndef INT16_MIN 3.70 +#define INT16_MIN (-32767-1) 3.71 +#endif 3.72 +#ifndef INT32_MIN 3.73 +#define INT32_MIN (-2147483647-1) 3.74 +#endif 3.75 +#ifndef INT8_MAX 3.76 +#define INT8_MAX (127) 3.77 +#endif 3.78 +#ifndef INT16_MAX 3.79 +#define INT16_MAX (32767) 3.80 +#endif 3.81 +#ifndef INT32_MAX 3.82 +#define INT32_MAX (2147483647) 3.83 +#endif 3.84 +#ifndef UINT8_MAX 3.85 +#define UINT8_MAX (255U) 3.86 +#endif 3.87 +#ifndef UINT16_MAX 3.88 +#define UINT16_MAX (65535U) 3.89 +#endif 3.90 +#ifndef UINT32_MAX 3.91 +#define UINT32_MAX (4294967295U) 3.92 +#endif 3.93 + 3.94 +#endif /* ! C99 */ 3.95 + 3.96 +#endif /* ! FLEXINT_H */ 3.97 + 3.98 +#ifdef __cplusplus 3.99 + 3.100 +/* The "const" storage-class-modifier is valid. */ 3.101 +#define YY_USE_CONST 3.102 + 3.103 +#else /* ! __cplusplus */ 3.104 + 3.105 +/* C99 requires __STDC__ to be defined as 1. */ 3.106 +#if defined (__STDC__) 3.107 + 3.108 +#define YY_USE_CONST 3.109 + 3.110 +#endif /* defined (__STDC__) */ 3.111 +#endif /* ! __cplusplus */ 3.112 + 3.113 +#ifdef YY_USE_CONST 3.114 +#define yyconst const 3.115 +#else 3.116 +#define yyconst 3.117 +#endif 3.118 + 3.119 +/* An opaque pointer. */ 3.120 +#ifndef YY_TYPEDEF_YY_SCANNER_T 3.121 +#define YY_TYPEDEF_YY_SCANNER_T 3.122 +typedef void* yyscan_t; 3.123 +#endif 3.124 + 3.125 +/* For convenience, these vars (plus the bison vars far below) 3.126 + are macros in the reentrant scanner. */ 3.127 +#define yyin yyg->yyin_r 3.128 +#define yyout yyg->yyout_r 3.129 +#define yyextra yyg->yyextra_r 3.130 +#define yyleng yyg->yyleng_r 3.131 +#define yytext yyg->yytext_r 3.132 +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) 3.133 +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) 3.134 +#define yy_flex_debug yyg->yy_flex_debug_r 3.135 + 3.136 +/* Size of default input buffer. */ 3.137 +#ifndef YY_BUF_SIZE 3.138 +#ifdef __ia64__ 3.139 +/* On IA-64, the buffer size is 16k, not 8k. 3.140 + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 3.141 + * Ditto for the __ia64__ case accordingly. 3.142 + */ 3.143 +#define YY_BUF_SIZE 32768 3.144 +#else 3.145 +#define YY_BUF_SIZE 16384 3.146 +#endif /* __ia64__ */ 3.147 +#endif 3.148 + 3.149 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE 3.150 +#define YY_TYPEDEF_YY_BUFFER_STATE 3.151 +typedef struct yy_buffer_state *YY_BUFFER_STATE; 3.152 +#endif 3.153 + 3.154 +#ifndef YY_TYPEDEF_YY_SIZE_T 3.155 +#define YY_TYPEDEF_YY_SIZE_T 3.156 +typedef size_t yy_size_t; 3.157 +#endif 3.158 + 3.159 +#ifndef YY_STRUCT_YY_BUFFER_STATE 3.160 +#define YY_STRUCT_YY_BUFFER_STATE 3.161 +struct yy_buffer_state 3.162 + { 3.163 + FILE *yy_input_file; 3.164 + 3.165 + char *yy_ch_buf; /* input buffer */ 3.166 + char *yy_buf_pos; /* current position in input buffer */ 3.167 + 3.168 + /* Size of input buffer in bytes, not including room for EOB 3.169 + * characters. 3.170 + */ 3.171 + yy_size_t yy_buf_size; 3.172 + 3.173 + /* Number of characters read into yy_ch_buf, not including EOB 3.174 + * characters. 3.175 + */ 3.176 + int yy_n_chars; 3.177 + 3.178 + /* Whether we "own" the buffer - i.e., we know we created it, 3.179 + * and can realloc() it to grow it, and should free() it to 3.180 + * delete it. 3.181 + */ 3.182 + int yy_is_our_buffer; 3.183 + 3.184 + /* Whether this is an "interactive" input source; if so, and 3.185 + * if we're using stdio for input, then we want to use getc() 3.186 + * instead of fread(), to make sure we stop fetching input after 3.187 + * each newline. 3.188 + */ 3.189 + int yy_is_interactive; 3.190 + 3.191 + /* Whether we're considered to be at the beginning of a line. 3.192 + * If so, '^' rules will be active on the next match, otherwise 3.193 + * not. 3.194 + */ 3.195 + int yy_at_bol; 3.196 + 3.197 + int yy_bs_lineno; /**< The line count. */ 3.198 + int yy_bs_column; /**< The column count. */ 3.199 + 3.200 + /* Whether to try to fill the input buffer when we reach the 3.201 + * end of it. 3.202 + */ 3.203 + int yy_fill_buffer; 3.204 + 3.205 + int yy_buffer_status; 3.206 + 3.207 + }; 3.208 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 3.209 + 3.210 +void xlu__cfg_yyrestart (FILE *input_file ,yyscan_t yyscanner ); 3.211 +void xlu__cfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); 3.212 +YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); 3.213 +void xlu__cfg_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); 3.214 +void xlu__cfg_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); 3.215 +void xlu__cfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); 3.216 +void xlu__cfg_yypop_buffer_state (yyscan_t yyscanner ); 3.217 + 3.218 +YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); 3.219 +YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); 3.220 +YY_BUFFER_STATE xlu__cfg_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); 3.221 + 3.222 +void *xlu__cfg_yyalloc (yy_size_t ,yyscan_t yyscanner ); 3.223 +void *xlu__cfg_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); 3.224 +void xlu__cfg_yyfree (void * ,yyscan_t yyscanner ); 3.225 + 3.226 +#define xlu__cfg_yywrap(n) 1 3.227 +#define YY_SKIP_YYWRAP 3.228 + 3.229 +#define yytext_ptr yytext_r 3.230 + 3.231 +#ifdef YY_HEADER_EXPORT_START_CONDITIONS 3.232 +#define INITIAL 0 3.233 +#define lexerr 1 3.234 + 3.235 +#endif 3.236 + 3.237 +#ifndef YY_NO_UNISTD_H 3.238 +/* Special case for "unistd.h", since it is non-ANSI. We include it way 3.239 + * down here because we want the user's section 1 to have been scanned first. 3.240 + * The user has a chance to override it with an option. 3.241 + */ 3.242 +#include <unistd.h> 3.243 +#endif 3.244 + 3.245 +#ifndef YY_EXTRA_TYPE 3.246 +#define YY_EXTRA_TYPE void * 3.247 +#endif 3.248 + 3.249 +int xlu__cfg_yylex_init (yyscan_t* scanner); 3.250 + 3.251 +int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); 3.252 + 3.253 +/* Accessor methods to globals. 3.254 + These are made visible to non-reentrant scanners for convenience. */ 3.255 + 3.256 +int xlu__cfg_yylex_destroy (yyscan_t yyscanner ); 3.257 + 3.258 +int xlu__cfg_yyget_debug (yyscan_t yyscanner ); 3.259 + 3.260 +void xlu__cfg_yyset_debug (int debug_flag ,yyscan_t yyscanner ); 3.261 + 3.262 +YY_EXTRA_TYPE xlu__cfg_yyget_extra (yyscan_t yyscanner ); 3.263 + 3.264 +void xlu__cfg_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); 3.265 + 3.266 +FILE *xlu__cfg_yyget_in (yyscan_t yyscanner ); 3.267 + 3.268 +void xlu__cfg_yyset_in (FILE * in_str ,yyscan_t yyscanner ); 3.269 + 3.270 +FILE *xlu__cfg_yyget_out (yyscan_t yyscanner ); 3.271 + 3.272 +void xlu__cfg_yyset_out (FILE * out_str ,yyscan_t yyscanner ); 3.273 + 3.274 +int xlu__cfg_yyget_leng (yyscan_t yyscanner ); 3.275 + 3.276 +char *xlu__cfg_yyget_text (yyscan_t yyscanner ); 3.277 + 3.278 +int xlu__cfg_yyget_lineno (yyscan_t yyscanner ); 3.279 + 3.280 +void xlu__cfg_yyset_lineno (int line_number ,yyscan_t yyscanner ); 3.281 + 3.282 +YYSTYPE * xlu__cfg_yyget_lval (yyscan_t yyscanner ); 3.283 + 3.284 +void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); 3.285 + 3.286 + YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner ); 3.287 + 3.288 + void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); 3.289 + 3.290 +/* Macros after this point can all be overridden by user definitions in 3.291 + * section 1. 3.292 + */ 3.293 + 3.294 +#ifndef YY_SKIP_YYWRAP 3.295 +#ifdef __cplusplus 3.296 +extern "C" int xlu__cfg_yywrap (yyscan_t yyscanner ); 3.297 +#else 3.298 +extern int xlu__cfg_yywrap (yyscan_t yyscanner ); 3.299 +#endif 3.300 +#endif 3.301 + 3.302 +#ifndef yytext_ptr 3.303 +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); 3.304 +#endif 3.305 + 3.306 +#ifdef YY_NEED_STRLEN 3.307 +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); 3.308 +#endif 3.309 + 3.310 +#ifndef YY_NO_INPUT 3.311 + 3.312 +#endif 3.313 + 3.314 +/* Amount of stuff to slurp up with each read. */ 3.315 +#ifndef YY_READ_BUF_SIZE 3.316 +#ifdef __ia64__ 3.317 +/* On IA-64, the buffer size is 16k, not 8k */ 3.318 +#define YY_READ_BUF_SIZE 16384 3.319 +#else 3.320 +#define YY_READ_BUF_SIZE 8192 3.321 +#endif /* __ia64__ */ 3.322 +#endif 3.323 + 3.324 +/* Number of entries by which start-condition stack grows. */ 3.325 +#ifndef YY_START_STACK_INCR 3.326 +#define YY_START_STACK_INCR 25 3.327 +#endif 3.328 + 3.329 +/* Default declaration of generated scanner - a define so the user can 3.330 + * easily add parameters. 3.331 + */ 3.332 +#ifndef YY_DECL 3.333 +#define YY_DECL_IS_OURS 1 3.334 + 3.335 +extern int xlu__cfg_yylex \ 3.336 + (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); 3.337 + 3.338 +#define YY_DECL int xlu__cfg_yylex \ 3.339 + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) 3.340 +#endif /* !YY_DECL */ 3.341 + 3.342 +/* yy_get_previous_state - get the state just before the EOB char was reached */ 3.343 + 3.344 +#undef YY_NEW_FILE 3.345 +#undef YY_FLUSH_BUFFER 3.346 +#undef yy_set_bol 3.347 +#undef yy_new_buffer 3.348 +#undef yy_set_interactive 3.349 +#undef YY_DO_BEFORE_ACTION 3.350 + 3.351 +#ifdef YY_DECL_IS_OURS 3.352 +#undef YY_DECL_IS_OURS 3.353 +#undef YY_DECL 3.354 +#endif 3.355 + 3.356 +#line 75 "libxlu_cfg_l.l" 3.357 + 3.358 +#line 356 "libxlu_cfg_l.h" 3.359 +#undef xlu__cfg_yyIN_HEADER 3.360 +#endif /* xlu__cfg_yyHEADER_H */
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/tools/libxl/libxlu_cfg_y.c Fri Mar 05 14:35:09 2010 +0000 4.3 @@ -0,0 +1,1691 @@ 4.4 +/* A Bison parser, made by GNU Bison 2.3. */ 4.5 + 4.6 +/* Skeleton implementation for Bison's Yacc-like parsers in C 4.7 + 4.8 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 4.9 + Free Software Foundation, Inc. 4.10 + 4.11 + This program is free software; you can redistribute it and/or modify 4.12 + it under the terms of the GNU General Public License as published by 4.13 + the Free Software Foundation; either version 2, or (at your option) 4.14 + any later version. 4.15 + 4.16 + This program is distributed in the hope that it will be useful, 4.17 + but WITHOUT ANY WARRANTY; without even the implied warranty of 4.18 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4.19 + GNU General Public License for more details. 4.20 + 4.21 + You should have received a copy of the GNU General Public License 4.22 + along with this program; if not, write to the Free Software 4.23 + Foundation, Inc., 51 Franklin Street, Fifth Floor, 4.24 + Boston, MA 02110-1301, USA. */ 4.25 + 4.26 +/* As a special exception, you may create a larger work that contains 4.27 + part or all of the Bison parser skeleton and distribute that work 4.28 + under terms of your choice, so long as that work isn't itself a 4.29 + parser generator using the skeleton or a modified version thereof 4.30 + as a parser skeleton. Alternatively, if you modify or redistribute 4.31 + the parser skeleton itself, you may (at your option) remove this 4.32 + special exception, which will cause the skeleton and the resulting 4.33 + Bison output files to be licensed under the GNU General Public 4.34 + License without this special exception. 4.35 + 4.36 + This special exception was added by the Free Software Foundation in 4.37 + version 2.2 of Bison. */ 4.38 + 4.39 +/* C LALR(1) parser skeleton written by Richard Stallman, by 4.40 + simplifying the original so-called "semantic" parser. */ 4.41 + 4.42 +/* All symbols defined below should begin with yy or YY, to avoid 4.43 + infringing on user name space. This should be done even for local 4.44 + variables, as they might otherwise be expanded by user macros. 4.45 + There are some unavoidable exceptions within include files to 4.46 + define necessary library symbols; they are noted "INFRINGES ON 4.47 + USER NAME SPACE" below. */ 4.48 + 4.49 +/* Identify Bison output. */ 4.50 +#define YYBISON 1 4.51 + 4.52 +/* Bison version. */ 4.53 +#define YYBISON_VERSION "2.3" 4.54 + 4.55 +/* Skeleton name. */ 4.56 +#define YYSKELETON_NAME "yacc.c" 4.57 + 4.58 +/* Pure parsers. */ 4.59 +#define YYPURE 1 4.60 + 4.61 +/* Using locations. */ 4.62 +#define YYLSP_NEEDED 1 4.63 + 4.64 +/* Substitute the variable and function names. */ 4.65 +#define yyparse xlu__cfg_yyparse 4.66 +#define yylex xlu__cfg_yylex 4.67 +#define yyerror xlu__cfg_yyerror 4.68 +#define yylval xlu__cfg_yylval 4.69 +#define yychar xlu__cfg_yychar 4.70 +#define yydebug xlu__cfg_yydebug 4.71 +#define yynerrs xlu__cfg_yynerrs 4.72 +#define yylloc xlu__cfg_yylloc 4.73 + 4.74 +/* Tokens. */ 4.75 +#ifndef YYTOKENTYPE 4.76 +# define YYTOKENTYPE 4.77 + /* Put the tokens into the symbol table, so that GDB and other debuggers 4.78 + know about them. */ 4.79 + enum yytokentype { 4.80 + IDENT = 258, 4.81 + STRING = 259, 4.82 + NUMBER = 260, 4.83 + NEWLINE = 261 4.84 + }; 4.85 +#endif 4.86 +/* Tokens. */ 4.87 +#define IDENT 258 4.88 +#define STRING 259 4.89 +#define NUMBER 260 4.90 +#define NEWLINE 261 4.91 + 4.92 + 4.93 + 4.94 + 4.95 +/* Copy the first part of user declarations. */ 4.96 +#line 3 "libxlu_cfg_y.y" 4.97 + 4.98 +#define YYLEX_PARAM ctx->scanner 4.99 +#include "libxlu_cfg_i.h" 4.100 +#include "libxlu_cfg_l.h" 4.101 + 4.102 + 4.103 +/* Enabling traces. */ 4.104 +#ifndef YYDEBUG 4.105 +# define YYDEBUG 0 4.106 +#endif 4.107 + 4.108 +/* Enabling verbose error messages. */ 4.109 +#ifdef YYERROR_VERBOSE 4.110 +# undef YYERROR_VERBOSE 4.111 +# define YYERROR_VERBOSE 1 4.112 +#else 4.113 +# define YYERROR_VERBOSE 1 4.114 +#endif 4.115 + 4.116 +/* Enabling the token table. */ 4.117 +#ifndef YYTOKEN_TABLE 4.118 +# define YYTOKEN_TABLE 0 4.119 +#endif 4.120 + 4.121 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 4.122 +typedef union YYSTYPE 4.123 +#line 9 "libxlu_cfg_y.y" 4.124 +{ 4.125 + char *string; 4.126 + XLU_ConfigSetting *setting; 4.127 +} 4.128 +/* Line 187 of yacc.c. */ 4.129 +#line 127 "libxlu_cfg_y.c" 4.130 + YYSTYPE; 4.131 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 4.132 +# define YYSTYPE_IS_DECLARED 1 4.133 +# define YYSTYPE_IS_TRIVIAL 1 4.134 +#endif 4.135 + 4.136 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 4.137 +typedef struct YYLTYPE 4.138 +{ 4.139 + int first_line; 4.140 + int first_column; 4.141 + int last_line; 4.142 + int last_column; 4.143 +} YYLTYPE; 4.144 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 4.145 +# define YYLTYPE_IS_DECLARED 1 4.146 +# define YYLTYPE_IS_TRIVIAL 1 4.147 +#endif 4.148 + 4.149 + 4.150 +/* Copy the second part of user declarations. */ 4.151 + 4.152 + 4.153 +/* Line 216 of yacc.c. */ 4.154 +#line 152 "libxlu_cfg_y.c" 4.155 + 4.156 +#ifdef short 4.157 +# undef short 4.158 +#endif 4.159 + 4.160 +#ifdef YYTYPE_UINT8 4.161 +typedef YYTYPE_UINT8 yytype_uint8; 4.162 +#else 4.163 +typedef unsigned char yytype_uint8; 4.164 +#endif 4.165 + 4.166 +#ifdef YYTYPE_INT8 4.167 +typedef YYTYPE_INT8 yytype_int8; 4.168 +#elif (defined __STDC__ || defined __C99__FUNC__ \ 4.169 + || defined __cplusplus || defined _MSC_VER) 4.170 +typedef signed char yytype_int8; 4.171 +#else 4.172 +typedef short int yytype_int8; 4.173 +#endif 4.174 + 4.175 +#ifdef YYTYPE_UINT16 4.176 +typedef YYTYPE_UINT16 yytype_uint16; 4.177 +#else 4.178 +typedef unsigned short int yytype_uint16; 4.179 +#endif 4.180 + 4.181 +#ifdef YYTYPE_INT16 4.182 +typedef YYTYPE_INT16 yytype_int16; 4.183 +#else 4.184 +typedef short int yytype_int16; 4.185 +#endif 4.186 + 4.187 +#ifndef YYSIZE_T 4.188 +# ifdef __SIZE_TYPE__ 4.189 +# define YYSIZE_T __SIZE_TYPE__ 4.190 +# elif defined size_t 4.191 +# define YYSIZE_T size_t 4.192 +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 4.193 + || defined __cplusplus || defined _MSC_VER) 4.194 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 4.195 +# define YYSIZE_T size_t 4.196 +# else 4.197 +# define YYSIZE_T unsigned int 4.198 +# endif 4.199 +#endif 4.200 + 4.201 +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 4.202 + 4.203 +#ifndef YY_ 4.204 +# if YYENABLE_NLS 4.205 +# if ENABLE_NLS 4.206 +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 4.207 +# define YY_(msgid) dgettext ("bison-runtime", msgid) 4.208 +# endif 4.209 +# endif 4.210 +# ifndef YY_ 4.211 +# define YY_(msgid) msgid 4.212 +# endif 4.213 +#endif 4.214 + 4.215 +/* Suppress unused-variable warnings by "using" E. */ 4.216 +#if ! defined lint || defined __GNUC__ 4.217 +# define YYUSE(e) ((void) (e)) 4.218 +#else 4.219 +# define YYUSE(e) /* empty */ 4.220 +#endif 4.221 + 4.222 +/* Identity function, used to suppress warnings about constant conditions. */ 4.223 +#ifndef lint 4.224 +# define YYID(n) (n) 4.225 +#else 4.226 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.227 + || defined __cplusplus || defined _MSC_VER) 4.228 +static int 4.229 +YYID (int i) 4.230 +#else 4.231 +static int 4.232 +YYID (i) 4.233 + int i; 4.234 +#endif 4.235 +{ 4.236 + return i; 4.237 +} 4.238 +#endif 4.239 + 4.240 +#if ! defined yyoverflow || YYERROR_VERBOSE 4.241 + 4.242 +/* The parser invokes alloca or malloc; define the necessary symbols. */ 4.243 + 4.244 +# ifdef YYSTACK_USE_ALLOCA 4.245 +# if YYSTACK_USE_ALLOCA 4.246 +# ifdef __GNUC__ 4.247 +# define YYSTACK_ALLOC __builtin_alloca 4.248 +# elif defined __BUILTIN_VA_ARG_INCR 4.249 +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 4.250 +# elif defined _AIX 4.251 +# define YYSTACK_ALLOC __alloca 4.252 +# elif defined _MSC_VER 4.253 +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 4.254 +# define alloca _alloca 4.255 +# else 4.256 +# define YYSTACK_ALLOC alloca 4.257 +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 4.258 + || defined __cplusplus || defined _MSC_VER) 4.259 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 4.260 +# ifndef _STDLIB_H 4.261 +# define _STDLIB_H 1 4.262 +# endif 4.263 +# endif 4.264 +# endif 4.265 +# endif 4.266 +# endif 4.267 + 4.268 +# ifdef YYSTACK_ALLOC 4.269 + /* Pacify GCC's `empty if-body' warning. */ 4.270 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 4.271 +# ifndef YYSTACK_ALLOC_MAXIMUM 4.272 + /* The OS might guarantee only one guard page at the bottom of the stack, 4.273 + and a page size can be as small as 4096 bytes. So we cannot safely 4.274 + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 4.275 + to allow for a few compiler-allocated temporary stack slots. */ 4.276 +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 4.277 +# endif 4.278 +# else 4.279 +# define YYSTACK_ALLOC YYMALLOC 4.280 +# define YYSTACK_FREE YYFREE 4.281 +# ifndef YYSTACK_ALLOC_MAXIMUM 4.282 +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 4.283 +# endif 4.284 +# if (defined __cplusplus && ! defined _STDLIB_H \ 4.285 + && ! ((defined YYMALLOC || defined malloc) \ 4.286 + && (defined YYFREE || defined free))) 4.287 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 4.288 +# ifndef _STDLIB_H 4.289 +# define _STDLIB_H 1 4.290 +# endif 4.291 +# endif 4.292 +# ifndef YYMALLOC 4.293 +# define YYMALLOC malloc 4.294 +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 4.295 + || defined __cplusplus || defined _MSC_VER) 4.296 +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 4.297 +# endif 4.298 +# endif 4.299 +# ifndef YYFREE 4.300 +# define YYFREE free 4.301 +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 4.302 + || defined __cplusplus || defined _MSC_VER) 4.303 +void free (void *); /* INFRINGES ON USER NAME SPACE */ 4.304 +# endif 4.305 +# endif 4.306 +# endif 4.307 +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 4.308 + 4.309 + 4.310 +#if (! defined yyoverflow \ 4.311 + && (! defined __cplusplus \ 4.312 + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ 4.313 + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 4.314 + 4.315 +/* A type that is properly aligned for any stack member. */ 4.316 +union yyalloc 4.317 +{ 4.318 + yytype_int16 yyss; 4.319 + YYSTYPE yyvs; 4.320 + YYLTYPE yyls; 4.321 +}; 4.322 + 4.323 +/* The size of the maximum gap between one aligned stack and the next. */ 4.324 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 4.325 + 4.326 +/* The size of an array large to enough to hold all stacks, each with 4.327 + N elements. */ 4.328 +# define YYSTACK_BYTES(N) \ 4.329 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 4.330 + + 2 * YYSTACK_GAP_MAXIMUM) 4.331 + 4.332 +/* Copy COUNT objects from FROM to TO. The source and destination do 4.333 + not overlap. */ 4.334 +# ifndef YYCOPY 4.335 +# if defined __GNUC__ && 1 < __GNUC__ 4.336 +# define YYCOPY(To, From, Count) \ 4.337 + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 4.338 +# else 4.339 +# define YYCOPY(To, From, Count) \ 4.340 + do \ 4.341 + { \ 4.342 + YYSIZE_T yyi; \ 4.343 + for (yyi = 0; yyi < (Count); yyi++) \ 4.344 + (To)[yyi] = (From)[yyi]; \ 4.345 + } \ 4.346 + while (YYID (0)) 4.347 +# endif 4.348 +# endif 4.349 + 4.350 +/* Relocate STACK from its old location to the new one. The 4.351 + local variables YYSIZE and YYSTACKSIZE give the old and new number of 4.352 + elements in the stack, and YYPTR gives the new location of the 4.353 + stack. Advance YYPTR to a properly aligned location for the next 4.354 + stack. */ 4.355 +# define YYSTACK_RELOCATE(Stack) \ 4.356 + do \ 4.357 + { \ 4.358 + YYSIZE_T yynewbytes; \ 4.359 + YYCOPY (&yyptr->Stack, Stack, yysize); \ 4.360 + Stack = &yyptr->Stack; \ 4.361 + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 4.362 + yyptr += yynewbytes / sizeof (*yyptr); \ 4.363 + } \ 4.364 + while (YYID (0)) 4.365 + 4.366 +#endif 4.367 + 4.368 +/* YYFINAL -- State number of the termination state. */ 4.369 +#define YYFINAL 2 4.370 +/* YYLAST -- Last index in YYTABLE. */ 4.371 +#define YYLAST 23 4.372 + 4.373 +/* YYNTOKENS -- Number of terminals. */ 4.374 +#define YYNTOKENS 12 4.375 +/* YYNNTS -- Number of nonterminals. */ 4.376 +#define YYNNTS 10 4.377 +/* YYNRULES -- Number of rules. */ 4.378 +#define YYNRULES 20 4.379 +/* YYNRULES -- Number of states. */ 4.380 +#define YYNSTATES 29 4.381 + 4.382 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 4.383 +#define YYUNDEFTOK 2 4.384 +#define YYMAXUTOK 261 4.385 + 4.386 +#define YYTRANSLATE(YYX) \ 4.387 + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 4.388 + 4.389 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 4.390 +static const yytype_uint8 yytranslate[] = 4.391 +{ 4.392 + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.393 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.394 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.395 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.396 + 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 4.397 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 4.398 + 2, 7, 2, 2, 2, 2, 2, 2, 2, 2, 4.399 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.400 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.401 + 2, 9, 2, 10, 2, 2, 2, 2, 2, 2, 4.402 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.403 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.404 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.405 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.406 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.407 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.408 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.409 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.410 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.411 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.412 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.413 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.414 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.415 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.416 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.417 + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 4.418 + 5, 6 4.419 +}; 4.420 + 4.421 +#if YYDEBUG 4.422 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 4.423 + YYRHS. */ 4.424 +static const yytype_uint8 yyprhs[] = 4.425 +{ 4.426 + 0, 0, 3, 4, 7, 8, 14, 16, 19, 21, 4.427 + 23, 25, 30, 32, 34, 35, 37, 41, 44, 50, 4.428 + 51 4.429 +}; 4.430 + 4.431 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 4.432 +static const yytype_int8 yyrhs[] = 4.433 +{ 4.434 + 13, 0, -1, -1, 13, 14, -1, -1, 3, 7, 4.435 + 17, 15, 16, -1, 16, -1, 1, 6, -1, 6, 4.436 + -1, 8, -1, 18, -1, 9, 21, 19, 10, -1, 4.437 + 4, -1, 5, -1, -1, 20, -1, 20, 11, 21, 4.438 + -1, 18, 21, -1, 20, 11, 21, 18, 21, -1, 4.439 + -1, 21, 6, -1 4.440 +}; 4.441 + 4.442 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 4.443 +static const yytype_uint8 yyrline[] = 4.444 +{ 4.445 + 0, 31, 31, 32, 34, 34, 36, 37, 39, 40, 4.446 + 42, 43, 45, 46, 48, 49, 50, 52, 53, 55, 4.447 + 57 4.448 +}; 4.449 +#endif 4.450 + 4.451 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 4.452 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 4.453 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 4.454 +static const char *const yytname[] = 4.455 +{ 4.456 + "$end", "error", "$undefined", "IDENT", "STRING", "NUMBER", "NEWLINE", 4.457 + "'='", "';'", "'['", "']'", "','", "$accept", "file", "setting", "@1", 4.458 + "endstmt", "value", "atom", "valuelist", "values", "nlok", 0 4.459 +}; 4.460 +#endif 4.461 + 4.462 +# ifdef YYPRINT 4.463 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 4.464 + token YYLEX-NUM. */ 4.465 +static const yytype_uint16 yytoknum[] = 4.466 +{ 4.467 + 0, 256, 257, 258, 259, 260, 261, 61, 59, 91, 4.468 + 93, 44 4.469 +}; 4.470 +# endif 4.471 + 4.472 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 4.473 +static const yytype_uint8 yyr1[] = 4.474 +{ 4.475 + 0, 12, 13, 13, 15, 14, 14, 14, 16, 16, 4.476 + 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 4.477 + 21 4.478 +}; 4.479 + 4.480 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 4.481 +static const yytype_uint8 yyr2[] = 4.482 +{ 4.483 + 0, 2, 0, 2, 0, 5, 1, 2, 1, 1, 4.484 + 1, 4, 1, 1, 0, 1, 3, 2, 5, 0, 4.485 + 2 4.486 +}; 4.487 + 4.488 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 4.489 + STATE-NUM when YYTABLE doesn't specify something else to do. Zero 4.490 + means the default is an error. */ 4.491 +static const yytype_uint8 yydefact[] = 4.492 +{ 4.493 + 2, 0, 1, 0, 0, 8, 9, 3, 6, 7, 4.494 + 0, 12, 13, 19, 4, 10, 14, 0, 20, 19, 4.495 + 0, 15, 5, 17, 11, 19, 16, 19, 18 4.496 +}; 4.497 + 4.498 +/* YYDEFGOTO[NTERM-NUM]. */ 4.499 +static const yytype_int8 yydefgoto[] = 4.500 +{ 4.501 + -1, 1, 7, 17, 8, 14, 15, 20, 21, 16 4.502 +}; 4.503 + 4.504 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 4.505 + STATE-NUM. */ 4.506 +#define YYPACT_NINF -17 4.507 +static const yytype_int8 yypact[] = 4.508 +{ 4.509 + -17, 1, -17, -3, 5, -17, -17, -17, -17, -17, 4.510 + 10, -17, -17, -17, -17, -17, 12, 0, -17, -17, 4.511 + 11, 9, -17, 16, -17, -17, 12, -17, 16 4.512 +}; 4.513 + 4.514 +/* YYPGOTO[NTERM-NUM]. */ 4.515 +static const yytype_int8 yypgoto[] = 4.516 +{ 4.517 + -17, -17, -17, -17, 6, -17, -16, -17, -17, -14 4.518 +}; 4.519 + 4.520 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 4.521 + positive, shift that token. If negative, reduce the rule which 4.522 + number is the opposite. If zero, do what YYDEFACT says. 4.523 + If YYTABLE_NINF, syntax error. */ 4.524 +#define YYTABLE_NINF -1 4.525 +static const yytype_uint8 yytable[] = 4.526 +{ 4.527 + 19, 2, 3, 9, 4, 23, 5, 5, 6, 6, 4.528 + 27, 26, 10, 28, 11, 12, 11, 12, 18, 13, 4.529 + 25, 24, 18, 22 4.530 +}; 4.531 + 4.532 +static const yytype_uint8 yycheck[] = 4.533 +{ 4.534 + 16, 0, 1, 6, 3, 19, 6, 6, 8, 8, 4.535 + 26, 25, 7, 27, 4, 5, 4, 5, 6, 9, 4.536 + 11, 10, 6, 17 4.537 +}; 4.538 + 4.539 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 4.540 + symbol of state STATE-NUM. */ 4.541 +static const yytype_uint8 yystos[] = 4.542 +{ 4.543 + 0, 13, 0, 1, 3, 6, 8, 14, 16, 6, 4.544 + 7, 4, 5, 9, 17, 18, 21, 15, 6, 18, 4.545 + 19, 20, 16, 21, 10, 11, 21, 18, 21 4.546 +}; 4.547 + 4.548 +#define yyerrok (yyerrstatus = 0) 4.549 +#define yyclearin (yychar = YYEMPTY) 4.550 +#define YYEMPTY (-2) 4.551 +#define YYEOF 0 4.552 + 4.553 +#define YYACCEPT goto yyacceptlab 4.554 +#define YYABORT goto yyabortlab 4.555 +#define YYERROR goto yyerrorlab 4.556 + 4.557 + 4.558 +/* Like YYERROR except do call yyerror. This remains here temporarily 4.559 + to ease the transition to the new meaning of YYERROR, for GCC. 4.560 + Once GCC version 2 has supplanted version 1, this can go. */ 4.561 + 4.562 +#define YYFAIL goto yyerrlab 4.563 + 4.564 +#define YYRECOVERING() (!!yyerrstatus) 4.565 + 4.566 +#define YYBACKUP(Token, Value) \ 4.567 +do \ 4.568 + if (yychar == YYEMPTY && yylen == 1) \ 4.569 + { \ 4.570 + yychar = (Token); \ 4.571 + yylval = (Value); \ 4.572 + yytoken = YYTRANSLATE (yychar); \ 4.573 + YYPOPSTACK (1); \ 4.574 + goto yybackup; \ 4.575 + } \ 4.576 + else \ 4.577 + { \ 4.578 + yyerror (&yylloc, ctx, YY_("syntax error: cannot back up")); \ 4.579 + YYERROR; \ 4.580 + } \ 4.581 +while (YYID (0)) 4.582 + 4.583 + 4.584 +#define YYTERROR 1 4.585 +#define YYERRCODE 256 4.586 + 4.587 + 4.588 +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 4.589 + If N is 0, then set CURRENT to the empty location which ends 4.590 + the previous symbol: RHS[0] (always defined). */ 4.591 + 4.592 +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) 4.593 +#ifndef YYLLOC_DEFAULT 4.594 +# define YYLLOC_DEFAULT(Current, Rhs, N) \ 4.595 + do \ 4.596 + if (YYID (N)) \ 4.597 + { \ 4.598 + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 4.599 + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 4.600 + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 4.601 + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 4.602 + } \ 4.603 + else \ 4.604 + { \ 4.605 + (Current).first_line = (Current).last_line = \ 4.606 + YYRHSLOC (Rhs, 0).last_line; \ 4.607 + (Current).first_column = (Current).last_column = \ 4.608 + YYRHSLOC (Rhs, 0).last_column; \ 4.609 + } \ 4.610 + while (YYID (0)) 4.611 +#endif 4.612 + 4.613 + 4.614 +/* YY_LOCATION_PRINT -- Print the location on the stream. 4.615 + This macro was not mandated originally: define only if we know 4.616 + we won't break user code: when these are the locations we know. */ 4.617 + 4.618 +#ifndef YY_LOCATION_PRINT 4.619 +# if YYLTYPE_IS_TRIVIAL 4.620 +# define YY_LOCATION_PRINT(File, Loc) \ 4.621 + fprintf (File, "%d.%d-%d.%d", \ 4.622 + (Loc).first_line, (Loc).first_column, \ 4.623 + (Loc).last_line, (Loc).last_column) 4.624 +# else 4.625 +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 4.626 +# endif 4.627 +#endif 4.628 + 4.629 + 4.630 +/* YYLEX -- calling `yylex' with the right arguments. */ 4.631 + 4.632 +#ifdef YYLEX_PARAM 4.633 +# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 4.634 +#else 4.635 +# define YYLEX yylex (&yylval, &yylloc, scanner) 4.636 +#endif 4.637 + 4.638 +/* Enable debugging if requested. */ 4.639 +#if YYDEBUG 4.640 + 4.641 +# ifndef YYFPRINTF 4.642 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 4.643 +# define YYFPRINTF fprintf 4.644 +# endif 4.645 + 4.646 +# define YYDPRINTF(Args) \ 4.647 +do { \ 4.648 + if (yydebug) \ 4.649 + YYFPRINTF Args; \ 4.650 +} while (YYID (0)) 4.651 + 4.652 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 4.653 +do { \ 4.654 + if (yydebug) \ 4.655 + { \ 4.656 + YYFPRINTF (stderr, "%s ", Title); \ 4.657 + yy_symbol_print (stderr, \ 4.658 + Type, Value, Location, ctx); \ 4.659 + YYFPRINTF (stderr, "\n"); \ 4.660 + } \ 4.661 +} while (YYID (0)) 4.662 + 4.663 + 4.664 +/*--------------------------------. 4.665 +| Print this symbol on YYOUTPUT. | 4.666 +`--------------------------------*/ 4.667 + 4.668 +/*ARGSUSED*/ 4.669 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.670 + || defined __cplusplus || defined _MSC_VER) 4.671 +static void 4.672 +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, CfgParseContext *ctx) 4.673 +#else 4.674 +static void 4.675 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx) 4.676 + FILE *yyoutput; 4.677 + int yytype; 4.678 + YYSTYPE const * const yyvaluep; 4.679 + YYLTYPE const * const yylocationp; 4.680 + CfgParseContext *ctx; 4.681 +#endif 4.682 +{ 4.683 + if (!yyvaluep) 4.684 + return; 4.685 + YYUSE (yylocationp); 4.686 + YYUSE (ctx); 4.687 +# ifdef YYPRINT 4.688 + if (yytype < YYNTOKENS) 4.689 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 4.690 +# else 4.691 + YYUSE (yyoutput); 4.692 +# endif 4.693 + switch (yytype) 4.694 + { 4.695 + default: 4.696 + break; 4.697 + } 4.698 +} 4.699 + 4.700 + 4.701 +/*--------------------------------. 4.702 +| Print this symbol on YYOUTPUT. | 4.703 +`--------------------------------*/ 4.704 + 4.705 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.706 + || defined __cplusplus || defined _MSC_VER) 4.707 +static void 4.708 +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, CfgParseContext *ctx) 4.709 +#else 4.710 +static void 4.711 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, ctx) 4.712 + FILE *yyoutput; 4.713 + int yytype; 4.714 + YYSTYPE const * const yyvaluep; 4.715 + YYLTYPE const * const yylocationp; 4.716 + CfgParseContext *ctx; 4.717 +#endif 4.718 +{ 4.719 + if (yytype < YYNTOKENS) 4.720 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 4.721 + else 4.722 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 4.723 + 4.724 + YY_LOCATION_PRINT (yyoutput, *yylocationp); 4.725 + YYFPRINTF (yyoutput, ": "); 4.726 + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx); 4.727 + YYFPRINTF (yyoutput, ")"); 4.728 +} 4.729 + 4.730 +/*------------------------------------------------------------------. 4.731 +| yy_stack_print -- Print the state stack from its BOTTOM up to its | 4.732 +| TOP (included). | 4.733 +`------------------------------------------------------------------*/ 4.734 + 4.735 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.736 + || defined __cplusplus || defined _MSC_VER) 4.737 +static void 4.738 +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 4.739 +#else 4.740 +static void 4.741 +yy_stack_print (bottom, top) 4.742 + yytype_int16 *bottom; 4.743 + yytype_int16 *top; 4.744 +#endif 4.745 +{ 4.746 + YYFPRINTF (stderr, "Stack now"); 4.747 + for (; bottom <= top; ++bottom) 4.748 + YYFPRINTF (stderr, " %d", *bottom); 4.749 + YYFPRINTF (stderr, "\n"); 4.750 +} 4.751 + 4.752 +# define YY_STACK_PRINT(Bottom, Top) \ 4.753 +do { \ 4.754 + if (yydebug) \ 4.755 + yy_stack_print ((Bottom), (Top)); \ 4.756 +} while (YYID (0)) 4.757 + 4.758 + 4.759 +/*------------------------------------------------. 4.760 +| Report that the YYRULE is going to be reduced. | 4.761 +`------------------------------------------------*/ 4.762 + 4.763 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.764 + || defined __cplusplus || defined _MSC_VER) 4.765 +static void 4.766 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, CfgParseContext *ctx) 4.767 +#else 4.768 +static void 4.769 +yy_reduce_print (yyvsp, yylsp, yyrule, ctx) 4.770 + YYSTYPE *yyvsp; 4.771 + YYLTYPE *yylsp; 4.772 + int yyrule; 4.773 + CfgParseContext *ctx; 4.774 +#endif 4.775 +{ 4.776 + int yynrhs = yyr2[yyrule]; 4.777 + int yyi; 4.778 + unsigned long int yylno = yyrline[yyrule]; 4.779 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 4.780 + yyrule - 1, yylno); 4.781 + /* The symbols being reduced. */ 4.782 + for (yyi = 0; yyi < yynrhs; yyi++) 4.783 + { 4.784 + fprintf (stderr, " $%d = ", yyi + 1); 4.785 + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 4.786 + &(yyvsp[(yyi + 1) - (yynrhs)]) 4.787 + , &(yylsp[(yyi + 1) - (yynrhs)]) , ctx); 4.788 + fprintf (stderr, "\n"); 4.789 + } 4.790 +} 4.791 + 4.792 +# define YY_REDUCE_PRINT(Rule) \ 4.793 +do { \ 4.794 + if (yydebug) \ 4.795 + yy_reduce_print (yyvsp, yylsp, Rule, ctx); \ 4.796 +} while (YYID (0)) 4.797 + 4.798 +/* Nonzero means print parse trace. It is left uninitialized so that 4.799 + multiple parsers can coexist. */ 4.800 +int yydebug; 4.801 +#else /* !YYDEBUG */ 4.802 +# define YYDPRINTF(Args) 4.803 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 4.804 +# define YY_STACK_PRINT(Bottom, Top) 4.805 +# define YY_REDUCE_PRINT(Rule) 4.806 +#endif /* !YYDEBUG */ 4.807 + 4.808 + 4.809 +/* YYINITDEPTH -- initial size of the parser's stacks. */ 4.810 +#ifndef YYINITDEPTH 4.811 +# define YYINITDEPTH 200 4.812 +#endif 4.813 + 4.814 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 4.815 + if the built-in stack extension method is used). 4.816 + 4.817 + Do not make this value too large; the results are undefined if 4.818 + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 4.819 + evaluated with infinite-precision integer arithmetic. */ 4.820 + 4.821 +#ifndef YYMAXDEPTH 4.822 +# define YYMAXDEPTH 10000 4.823 +#endif 4.824 + 4.825 + 4.826 + 4.827 +#if YYERROR_VERBOSE 4.828 + 4.829 +# ifndef yystrlen 4.830 +# if defined __GLIBC__ && defined _STRING_H 4.831 +# define yystrlen strlen 4.832 +# else 4.833 +/* Return the length of YYSTR. */ 4.834 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.835 + || defined __cplusplus || defined _MSC_VER) 4.836 +static YYSIZE_T 4.837 +yystrlen (const char *yystr) 4.838 +#else 4.839 +static YYSIZE_T 4.840 +yystrlen (yystr) 4.841 + const char *yystr; 4.842 +#endif 4.843 +{ 4.844 + YYSIZE_T yylen; 4.845 + for (yylen = 0; yystr[yylen]; yylen++) 4.846 + continue; 4.847 + return yylen; 4.848 +} 4.849 +# endif 4.850 +# endif 4.851 + 4.852 +# ifndef yystpcpy 4.853 +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 4.854 +# define yystpcpy stpcpy 4.855 +# else 4.856 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 4.857 + YYDEST. */ 4.858 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.859 + || defined __cplusplus || defined _MSC_VER) 4.860 +static char * 4.861 +yystpcpy (char *yydest, const char *yysrc) 4.862 +#else 4.863 +static char * 4.864 +yystpcpy (yydest, yysrc) 4.865 + char *yydest; 4.866 + const char *yysrc; 4.867 +#endif 4.868 +{ 4.869 + char *yyd = yydest; 4.870 + const char *yys = yysrc; 4.871 + 4.872 + while ((*yyd++ = *yys++) != '\0') 4.873 + continue; 4.874 + 4.875 + return yyd - 1; 4.876 +} 4.877 +# endif 4.878 +# endif 4.879 + 4.880 +# ifndef yytnamerr 4.881 +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 4.882 + quotes and backslashes, so that it's suitable for yyerror. The 4.883 + heuristic is that double-quoting is unnecessary unless the string 4.884 + contains an apostrophe, a comma, or backslash (other than 4.885 + backslash-backslash). YYSTR is taken from yytname. If YYRES is 4.886 + null, do not copy; instead, return the length of what the result 4.887 + would have been. */ 4.888 +static YYSIZE_T 4.889 +yytnamerr (char *yyres, const char *yystr) 4.890 +{ 4.891 + if (*yystr == '"') 4.892 + { 4.893 + YYSIZE_T yyn = 0; 4.894 + char const *yyp = yystr; 4.895 + 4.896 + for (;;) 4.897 + switch (*++yyp) 4.898 + { 4.899 + case '\'': 4.900 + case ',': 4.901 + goto do_not_strip_quotes; 4.902 + 4.903 + case '\\': 4.904 + if (*++yyp != '\\') 4.905 + goto do_not_strip_quotes; 4.906 + /* Fall through. */ 4.907 + default: 4.908 + if (yyres) 4.909 + yyres[yyn] = *yyp; 4.910 + yyn++; 4.911 + break; 4.912 + 4.913 + case '"': 4.914 + if (yyres) 4.915 + yyres[yyn] = '\0'; 4.916 + return yyn; 4.917 + } 4.918 + do_not_strip_quotes: ; 4.919 + } 4.920 + 4.921 + if (! yyres) 4.922 + return yystrlen (yystr); 4.923 + 4.924 + return yystpcpy (yyres, yystr) - yyres; 4.925 +} 4.926 +# endif 4.927 + 4.928 +/* Copy into YYRESULT an error message about the unexpected token 4.929 + YYCHAR while in state YYSTATE. Return the number of bytes copied, 4.930 + including the terminating null byte. If YYRESULT is null, do not 4.931 + copy anything; just return the number of bytes that would be 4.932 + copied. As a special case, return 0 if an ordinary "syntax error" 4.933 + message will do. Return YYSIZE_MAXIMUM if overflow occurs during 4.934 + size calculation. */ 4.935 +static YYSIZE_T 4.936 +yysyntax_error (char *yyresult, int yystate, int yychar) 4.937 +{ 4.938 + int yyn = yypact[yystate]; 4.939 + 4.940 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 4.941 + return 0; 4.942 + else 4.943 + { 4.944 + int yytype = YYTRANSLATE (yychar); 4.945 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 4.946 + YYSIZE_T yysize = yysize0; 4.947 + YYSIZE_T yysize1; 4.948 + int yysize_overflow = 0; 4.949 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 4.950 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 4.951 + int yyx; 4.952 + 4.953 +# if 0 4.954 + /* This is so xgettext sees the translatable formats that are 4.955 + constructed on the fly. */ 4.956 + YY_("syntax error, unexpected %s"); 4.957 + YY_("syntax error, unexpected %s, expecting %s"); 4.958 + YY_("syntax error, unexpected %s, expecting %s or %s"); 4.959 + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 4.960 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 4.961 +# endif 4.962 + char *yyfmt; 4.963 + char const *yyf; 4.964 + static char const yyunexpected[] = "syntax error, unexpected %s"; 4.965 + static char const yyexpecting[] = ", expecting %s"; 4.966 + static char const yyor[] = " or %s"; 4.967 + char yyformat[sizeof yyunexpected 4.968 + + sizeof yyexpecting - 1 4.969 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 4.970 + * (sizeof yyor - 1))]; 4.971 + char const *yyprefix = yyexpecting; 4.972 + 4.973 + /* Start YYX at -YYN if negative to avoid negative indexes in 4.974 + YYCHECK. */ 4.975 + int yyxbegin = yyn < 0 ? -yyn : 0; 4.976 + 4.977 + /* Stay within bounds of both yycheck and yytname. */ 4.978 + int yychecklim = YYLAST - yyn + 1; 4.979 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 4.980 + int yycount = 1; 4.981 + 4.982 + yyarg[0] = yytname[yytype]; 4.983 + yyfmt = yystpcpy (yyformat, yyunexpected); 4.984 + 4.985 + for (yyx = yyxbegin; yyx < yyxend; ++yyx) 4.986 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 4.987 + { 4.988 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 4.989 + { 4.990 + yycount = 1; 4.991 + yysize = yysize0; 4.992 + yyformat[sizeof yyunexpected - 1] = '\0'; 4.993 + break; 4.994 + } 4.995 + yyarg[yycount++] = yytname[yyx]; 4.996 + yysize1 = yysize + yytnamerr (0, yytname[yyx]); 4.997 + yysize_overflow |= (yysize1 < yysize); 4.998 + yysize = yysize1; 4.999 + yyfmt = yystpcpy (yyfmt, yyprefix); 4.1000 + yyprefix = yyor; 4.1001 + } 4.1002 + 4.1003 + yyf = YY_(yyformat); 4.1004 + yysize1 = yysize + yystrlen (yyf); 4.1005 + yysize_overflow |= (yysize1 < yysize); 4.1006 + yysize = yysize1; 4.1007 + 4.1008 + if (yysize_overflow) 4.1009 + return YYSIZE_MAXIMUM; 4.1010 + 4.1011 + if (yyresult) 4.1012 + { 4.1013 + /* Avoid sprintf, as that infringes on the user's name space. 4.1014 + Don't have undefined behavior even if the translation 4.1015 + produced a string with the wrong number of "%s"s. */ 4.1016 + char *yyp = yyresult; 4.1017 + int yyi = 0; 4.1018 + while ((*yyp = *yyf) != '\0') 4.1019 + { 4.1020 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 4.1021 + { 4.1022 + yyp += yytnamerr (yyp, yyarg[yyi++]); 4.1023 + yyf += 2; 4.1024 + } 4.1025 + else 4.1026 + { 4.1027 + yyp++; 4.1028 + yyf++; 4.1029 + } 4.1030 + } 4.1031 + } 4.1032 + return yysize; 4.1033 + } 4.1034 +} 4.1035 +#endif /* YYERROR_VERBOSE */ 4.1036 + 4.1037 + 4.1038 +/*-----------------------------------------------. 4.1039 +| Release the memory associated to this symbol. | 4.1040 +`-----------------------------------------------*/ 4.1041 + 4.1042 +/*ARGSUSED*/ 4.1043 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1044 + || defined __cplusplus || defined _MSC_VER) 4.1045 +static void 4.1046 +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, CfgParseContext *ctx) 4.1047 +#else 4.1048 +static void 4.1049 +yydestruct (yymsg, yytype, yyvaluep, yylocationp, ctx) 4.1050 + const char *yymsg; 4.1051 + int yytype; 4.1052 + YYSTYPE *yyvaluep; 4.1053 + YYLTYPE *yylocationp; 4.1054 + CfgParseContext *ctx; 4.1055 +#endif 4.1056 +{ 4.1057 + YYUSE (yyvaluep); 4.1058 + YYUSE (yylocationp); 4.1059 + YYUSE (ctx); 4.1060 + 4.1061 + if (!yymsg) 4.1062 + yymsg = "Deleting"; 4.1063 + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 4.1064 + 4.1065 + switch (yytype) 4.1066 + { 4.1067 + case 3: /* "IDENT" */ 4.1068 +#line 24 "libxlu_cfg_y.y" 4.1069 + { free((yyvaluep->string)); }; 4.1070 +#line 1068 "libxlu_cfg_y.c" 4.1071 + break; 4.1072 + case 4: /* "STRING" */ 4.1073 +#line 24 "libxlu_cfg_y.y" 4.1074 + { free((yyvaluep->string)); }; 4.1075 +#line 1073 "libxlu_cfg_y.c" 4.1076 + break; 4.1077 + case 5: /* "NUMBER" */ 4.1078 +#line 24 "libxlu_cfg_y.y" 4.1079 + { free((yyvaluep->string)); }; 4.1080 +#line 1078 "libxlu_cfg_y.c" 4.1081 + break; 4.1082 + case 17: /* "value" */ 4.1083 +#line 27 "libxlu_cfg_y.y" 4.1084 + { xlu__cfg_set_free((yyvaluep->setting)); }; 4.1085 +#line 1083 "libxlu_cfg_y.c" 4.1086 + break; 4.1087 + case 18: /* "atom" */ 4.1088 +#line 24 "libxlu_cfg_y.y" 4.1089 + { free((yyvaluep->string)); }; 4.1090 +#line 1088 "libxlu_cfg_y.c" 4.1091 + break; 4.1092 + case 19: /* "valuelist" */ 4.1093 +#line 27 "libxlu_cfg_y.y" 4.1094 + { xlu__cfg_set_free((yyvaluep->setting)); }; 4.1095 +#line 1093 "libxlu_cfg_y.c" 4.1096 + break; 4.1097 + case 20: /* "values" */ 4.1098 +#line 27 "libxlu_cfg_y.y" 4.1099 + { xlu__cfg_set_free((yyvaluep->setting)); }; 4.1100 +#line 1098 "libxlu_cfg_y.c" 4.1101 + break; 4.1102 + 4.1103 + default: 4.1104 + break; 4.1105 + } 4.1106 +} 4.1107 + 4.1108 + 4.1109 +/* Prevent warnings from -Wmissing-prototypes. */ 4.1110 + 4.1111 +#ifdef YYPARSE_PARAM 4.1112 +#if defined __STDC__ || defined __cplusplus 4.1113 +int yyparse (void *YYPARSE_PARAM); 4.1114 +#else 4.1115 +int yyparse (); 4.1116 +#endif 4.1117 +#else /* ! YYPARSE_PARAM */ 4.1118 +#if defined __STDC__ || defined __cplusplus 4.1119 +int yyparse (CfgParseContext *ctx); 4.1120 +#else 4.1121 +int yyparse (); 4.1122 +#endif 4.1123 +#endif /* ! YYPARSE_PARAM */ 4.1124 + 4.1125 + 4.1126 + 4.1127 + 4.1128 + 4.1129 + 4.1130 +/*----------. 4.1131 +| yyparse. | 4.1132 +`----------*/ 4.1133 + 4.1134 +#ifdef YYPARSE_PARAM 4.1135 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1136 + || defined __cplusplus || defined _MSC_VER) 4.1137 +int 4.1138 +yyparse (void *YYPARSE_PARAM) 4.1139 +#else 4.1140 +int 4.1141 +yyparse (YYPARSE_PARAM) 4.1142 + void *YYPARSE_PARAM; 4.1143 +#endif 4.1144 +#else /* ! YYPARSE_PARAM */ 4.1145 +#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1146 + || defined __cplusplus || defined _MSC_VER) 4.1147 +int 4.1148 +yyparse (CfgParseContext *ctx) 4.1149 +#else 4.1150 +int 4.1151 +yyparse (ctx) 4.1152 + CfgParseContext *ctx; 4.1153 +#endif 4.1154 +#endif 4.1155 +{ 4.1156 + /* The look-ahead symbol. */ 4.1157 +int yychar; 4.1158 + 4.1159 +/* The semantic value of the look-ahead symbol. */ 4.1160 +YYSTYPE yylval; 4.1161 + 4.1162 +/* Number of syntax errors so far. */ 4.1163 +int yynerrs; 4.1164 +/* Location data for the look-ahead symbol. */ 4.1165 +YYLTYPE yylloc; 4.1166 + 4.1167 + int yystate; 4.1168 + int yyn; 4.1169 + int yyresult; 4.1170 + /* Number of tokens to shift before error messages enabled. */ 4.1171 + int yyerrstatus; 4.1172 + /* Look-ahead token as an internal (translated) token number. */ 4.1173 + int yytoken = 0; 4.1174 +#if YYERROR_VERBOSE 4.1175 + /* Buffer for error messages, and its allocated size. */ 4.1176 + char yymsgbuf[128]; 4.1177 + char *yymsg = yymsgbuf; 4.1178 + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 4.1179 +#endif 4.1180 + 4.1181 + /* Three stacks and their tools: 4.1182 + `yyss': related to states, 4.1183 + `yyvs': related to semantic values, 4.1184 + `yyls': related to locations. 4.1185 + 4.1186 + Refer to the stacks thru separate pointers, to allow yyoverflow 4.1187 + to reallocate them elsewhere. */ 4.1188 + 4.1189 + /* The state stack. */ 4.1190 + yytype_int16 yyssa[YYINITDEPTH]; 4.1191 + yytype_int16 *yyss = yyssa; 4.1192 + yytype_int16 *yyssp; 4.1193 + 4.1194 + /* The semantic value stack. */ 4.1195 + YYSTYPE yyvsa[YYINITDEPTH]; 4.1196 + YYSTYPE *yyvs = yyvsa; 4.1197 + YYSTYPE *yyvsp; 4.1198 + 4.1199 + /* The location stack. */ 4.1200 + YYLTYPE yylsa[YYINITDEPTH]; 4.1201 + YYLTYPE *yyls = yylsa; 4.1202 + YYLTYPE *yylsp; 4.1203 + /* The locations where the error started and ended. */ 4.1204 + YYLTYPE yyerror_range[2]; 4.1205 + 4.1206 +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 4.1207 + 4.1208 + YYSIZE_T yystacksize = YYINITDEPTH; 4.1209 + 4.1210 + /* The variables used to return semantic value and location from the 4.1211 + action routines. */ 4.1212 + YYSTYPE yyval; 4.1213 + YYLTYPE yyloc; 4.1214 + 4.1215 + /* The number of symbols on the RHS of the reduced rule. 4.1216 + Keep to zero when no symbol should be popped. */ 4.1217 + int yylen = 0; 4.1218 + 4.1219 + YYDPRINTF ((stderr, "Starting parse\n")); 4.1220 + 4.1221 + yystate = 0; 4.1222 + yyerrstatus = 0; 4.1223 + yynerrs = 0; 4.1224 + yychar = YYEMPTY; /* Cause a token to be read. */ 4.1225 + 4.1226 + /* Initialize stack pointers. 4.1227 + Waste one element of value and location stack 4.1228 + so that they stay on the same level as the state stack. 4.1229 + The wasted elements are never initialized. */ 4.1230 + 4.1231 + yyssp = yyss; 4.1232 + yyvsp = yyvs; 4.1233 + yylsp = yyls; 4.1234 +#if YYLTYPE_IS_TRIVIAL 4.1235 + /* Initialize the default location before parsing starts. */ 4.1236 + yylloc.first_line = yylloc.last_line = 1; 4.1237 + yylloc.first_column = yylloc.last_column = 0; 4.1238 +#endif 4.1239 + 4.1240 + goto yysetstate; 4.1241 + 4.1242 +/*------------------------------------------------------------. 4.1243 +| yynewstate -- Push a new state, which is found in yystate. | 4.1244 +`------------------------------------------------------------*/ 4.1245 + yynewstate: 4.1246 + /* In all cases, when you get here, the value and location stacks 4.1247 + have just been pushed. So pushing a state here evens the stacks. */ 4.1248 + yyssp++; 4.1249 + 4.1250 + yysetstate: 4.1251 + *yyssp = yystate; 4.1252 + 4.1253 + if (yyss + yystacksize - 1 <= yyssp) 4.1254 + { 4.1255 + /* Get the current used size of the three stacks, in elements. */ 4.1256 + YYSIZE_T yysize = yyssp - yyss + 1; 4.1257 + 4.1258 +#ifdef yyoverflow 4.1259 + { 4.1260 + /* Give user a chance to reallocate the stack. Use copies of 4.1261 + these so that the &'s don't force the real ones into 4.1262 + memory. */ 4.1263 + YYSTYPE *yyvs1 = yyvs; 4.1264 + yytype_int16 *yyss1 = yyss; 4.1265 + YYLTYPE *yyls1 = yyls; 4.1266 + 4.1267 + /* Each stack pointer address is followed by the size of the 4.1268 + data in use in that stack, in bytes. This used to be a 4.1269 + conditional around just the two extra args, but that might 4.1270 + be undefined if yyoverflow is a macro. */ 4.1271 + yyoverflow (YY_("memory exhausted"), 4.1272 + &yyss1, yysize * sizeof (*yyssp), 4.1273 + &yyvs1, yysize * sizeof (*yyvsp), 4.1274 + &yyls1, yysize * sizeof (*yylsp), 4.1275 + &yystacksize); 4.1276 + yyls = yyls1; 4.1277 + yyss = yyss1; 4.1278 + yyvs = yyvs1; 4.1279 + } 4.1280 +#else /* no yyoverflow */ 4.1281 +# ifndef YYSTACK_RELOCATE 4.1282 + goto yyexhaustedlab; 4.1283 +# else 4.1284 + /* Extend the stack our own way. */ 4.1285 + if (YYMAXDEPTH <= yystacksize) 4.1286 + goto yyexhaustedlab; 4.1287 + yystacksize *= 2; 4.1288 + if (YYMAXDEPTH < yystacksize) 4.1289 + yystacksize = YYMAXDEPTH; 4.1290 + 4.1291 + { 4.1292 + yytype_int16 *yyss1 = yyss; 4.1293 + union yyalloc *yyptr = 4.1294 + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 4.1295 + if (! yyptr) 4.1296 + goto yyexhaustedlab; 4.1297 + YYSTACK_RELOCATE (yyss); 4.1298 + YYSTACK_RELOCATE (yyvs); 4.1299 + YYSTACK_RELOCATE (yyls); 4.1300 +# undef YYSTACK_RELOCATE 4.1301 + if (yyss1 != yyssa) 4.1302 + YYSTACK_FREE (yyss1); 4.1303 + } 4.1304 +# endif 4.1305 +#endif /* no yyoverflow */ 4.1306 + 4.1307 + yyssp = yyss + yysize - 1; 4.1308 + yyvsp = yyvs + yysize - 1; 4.1309 + yylsp = yyls + yysize - 1; 4.1310 + 4.1311 + YYDPRINTF ((stderr, "Stack size increased to %lu\n", 4.1312 + (unsigned long int) yystacksize)); 4.1313 + 4.1314 + if (yyss + yystacksize - 1 <= yyssp) 4.1315 + YYABORT; 4.1316 + } 4.1317 + 4.1318 + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 4.1319 + 4.1320 + goto yybackup; 4.1321 + 4.1322 +/*-----------. 4.1323 +| yybackup. | 4.1324 +`-----------*/ 4.1325 +yybackup: 4.1326 + 4.1327 + /* Do appropriate processing given the current state. Read a 4.1328 + look-ahead token if we need one and don't already have one. */ 4.1329 + 4.1330 + /* First try to decide what to do without reference to look-ahead token. */ 4.1331 + yyn = yypact[yystate]; 4.1332 + if (yyn == YYPACT_NINF) 4.1333 + goto yydefault; 4.1334 + 4.1335 + /* Not known => get a look-ahead token if don't already have one. */ 4.1336 + 4.1337 + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 4.1338 + if (yychar == YYEMPTY) 4.1339 + { 4.1340 + YYDPRINTF ((stderr, "Reading a token: ")); 4.1341 + yychar = YYLEX; 4.1342 + } 4.1343 + 4.1344 + if (yychar <= YYEOF) 4.1345 + { 4.1346 + yychar = yytoken = YYEOF; 4.1347 + YYDPRINTF ((stderr, "Now at end of input.\n")); 4.1348 + } 4.1349 + else 4.1350 + { 4.1351 + yytoken = YYTRANSLATE (yychar); 4.1352 + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 4.1353 + } 4.1354 + 4.1355 + /* If the proper action on seeing token YYTOKEN is to reduce or to 4.1356 + detect an error, take that action. */ 4.1357 + yyn += yytoken; 4.1358 + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 4.1359 + goto yydefault; 4.1360 + yyn = yytable[yyn]; 4.1361 + if (yyn <= 0) 4.1362 + { 4.1363 + if (yyn == 0 || yyn == YYTABLE_NINF) 4.1364 + goto yyerrlab; 4.1365 + yyn = -yyn; 4.1366 + goto yyreduce; 4.1367 + } 4.1368 + 4.1369 + if (yyn == YYFINAL) 4.1370 + YYACCEPT; 4.1371 + 4.1372 + /* Count tokens shifted since error; after three, turn off error 4.1373 + status. */ 4.1374 + if (yyerrstatus) 4.1375 + yyerrstatus--; 4.1376 + 4.1377 + /* Shift the look-ahead token. */ 4.1378 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 4.1379 + 4.1380 + /* Discard the shifted token unless it is eof. */ 4.1381 + if (yychar != YYEOF) 4.1382 + yychar = YYEMPTY; 4.1383 + 4.1384 + yystate = yyn; 4.1385 + *++yyvsp = yylval; 4.1386 + *++yylsp = yylloc; 4.1387 + goto yynewstate; 4.1388 + 4.1389 + 4.1390 +/*-----------------------------------------------------------. 4.1391 +| yydefault -- do the default action for the current state. | 4.1392 +`-----------------------------------------------------------*/ 4.1393 +yydefault: 4.1394 + yyn = yydefact[yystate]; 4.1395 + if (yyn == 0) 4.1396 + goto yyerrlab; 4.1397 + goto yyreduce; 4.1398 + 4.1399 + 4.1400 +/*-----------------------------. 4.1401 +| yyreduce -- Do a reduction. | 4.1402 +`-----------------------------*/ 4.1403 +yyreduce: 4.1404 + /* yyn is the number of a rule to reduce with. */ 4.1405 + yylen = yyr2[yyn]; 4.1406 + 4.1407 + /* If YYLEN is nonzero, implement the default value of the action: 4.1408 + `$$ = $1'. 4.1409 + 4.1410 + Otherwise, the following line sets YYVAL to garbage. 4.1411 + This behavior is undocumented and Bison 4.1412 + users should not rely upon it. Assigning to YYVAL 4.1413 + unconditionally makes the parser a bit smaller, and it avoids a 4.1414 + GCC warning that YYVAL may be used uninitialized. */ 4.1415 + yyval = yyvsp[1-yylen]; 4.1416 + 4.1417 + /* Default location. */ 4.1418 + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 4.1419 + YY_REDUCE_PRINT (yyn); 4.1420 + switch (yyn) 4.1421 + { 4.1422 + case 4: 4.1423 +#line 34 "libxlu_cfg_y.y" 4.1424 + { xlu__cfg_set_store(ctx,(yyvsp[(1) - (3)].string),(yyvsp[(3) - (3)].setting),(yylsp[(3) - (3)]).first_line); ;} 4.1425 + break; 4.1426 + 4.1427 + case 10: 4.1428 +#line 42 "libxlu_cfg_y.y" 4.1429 + { (yyval.setting)= xlu__cfg_set_mk(ctx,1,(yyvsp[(1) - (1)].string)); ;} 4.1430 + break; 4.1431 + 4.1432 + case 11: 4.1433 +#line 43 "libxlu_cfg_y.y" 4.1434 + { (yyval.setting)= (yyvsp[(3) - (4)].setting); ;} 4.1435 + break; 4.1436 + 4.1437 + case 12: 4.1438 +#line 45 "libxlu_cfg_y.y" 4.1439 + { (yyval.string)= (yyvsp[(1) - (1)].string); ;} 4.1440 + break; 4.1441 + 4.1442 + case 13: 4.1443 +#line 46 "libxlu_cfg_y.y" 4.1444 + { (yyval.string)= (yyvsp[(1) - (1)].string); ;} 4.1445 + break; 4.1446 + 4.1447 + case 14: 4.1448 +#line 48 "libxlu_cfg_y.y" 4.1449 + { (yyval.setting)= xlu__cfg_set_mk(ctx,0,0); ;} 4.1450 + break; 4.1451 + 4.1452 + case 15: 4.1453 +#line 49 "libxlu_cfg_y.y" 4.1454 + { (yyval.setting)= (yyvsp[(1) - (1)].setting); ;} 4.1455 + break; 4.1456 + 4.1457 + case 16: 4.1458 +#line 50 "libxlu_cfg_y.y" 4.1459 + { (yyval.setting)= (yyvsp[(1) - (3)].setting); ;} 4.1460 + break; 4.1461 + 4.1462 + case 17: 4.1463 +#line 52 "libxlu_cfg_y.y" 4.1464 + { (yyval.setting)= xlu__cfg_set_mk(ctx,2,(yyvsp[(1) - (2)].string)); ;} 4.1465 + break; 4.1466 + 4.1467 + case 18: 4.1468 +#line 53 "libxlu_cfg_y.y" 4.1469 + { xlu__cfg_set_add(ctx,(yyvsp[(1) - (5)].setting),(yyvsp[(4) - (5)].string)); (yyval.setting)= (yyvsp[(1) - (5)].setting); ;} 4.1470 + break; 4.1471 + 4.1472 + 4.1473 +/* Line 1267 of yacc.c. */ 4.1474 +#line 1472 "libxlu_cfg_y.c" 4.1475 + default: break; 4.1476 + } 4.1477 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 4.1478 + 4.1479 + YYPOPSTACK (yylen); 4.1480 + yylen = 0; 4.1481 + YY_STACK_PRINT (yyss, yyssp); 4.1482 + 4.1483 + *++yyvsp = yyval; 4.1484 + *++yylsp = yyloc; 4.1485 + 4.1486 + /* Now `shift' the result of the reduction. Determine what state 4.1487 + that goes to, based on the state we popped back to and the rule 4.1488 + number reduced by. */ 4.1489 + 4.1490 + yyn = yyr1[yyn]; 4.1491 + 4.1492 + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 4.1493 + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 4.1494 + yystate = yytable[yystate]; 4.1495 + else 4.1496 + yystate = yydefgoto[yyn - YYNTOKENS]; 4.1497 + 4.1498 + goto yynewstate; 4.1499 + 4.1500 + 4.1501 +/*------------------------------------. 4.1502 +| yyerrlab -- here on detecting error | 4.1503 +`------------------------------------*/ 4.1504 +yyerrlab: 4.1505 + /* If not already recovering from an error, report this error. */ 4.1506 + if (!yyerrstatus) 4.1507 + { 4.1508 + ++yynerrs; 4.1509 +#if ! YYERROR_VERBOSE 4.1510 + yyerror (&yylloc, ctx, YY_("syntax error")); 4.1511 +#else 4.1512 + { 4.1513 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 4.1514 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 4.1515 + { 4.1516 + YYSIZE_T yyalloc = 2 * yysize; 4.1517 + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 4.1518 + yyalloc = YYSTACK_ALLOC_MAXIMUM; 4.1519 + if (yymsg != yymsgbuf) 4.1520 + YYSTACK_FREE (yymsg); 4.1521 + yymsg = (char *) YYSTACK_ALLOC (yyalloc); 4.1522 + if (yymsg) 4.1523 + yymsg_alloc = yyalloc; 4.1524 + else 4.1525 + { 4.1526 + yymsg = yymsgbuf; 4.1527 + yymsg_alloc = sizeof yymsgbuf; 4.1528 + } 4.1529 + } 4.1530 + 4.1531 + if (0 < yysize && yysize <= yymsg_alloc) 4.1532 + { 4.1533 + (void) yysyntax_error (yymsg, yystate, yychar); 4.1534 + yyerror (&yylloc, ctx, yymsg); 4.1535 + } 4.1536 + else 4.1537 + { 4.1538 + yyerror (&yylloc, ctx, YY_("syntax error")); 4.1539 + if (yysize != 0) 4.1540 + goto yyexhaustedlab; 4.1541 + } 4.1542 + } 4.1543 +#endif 4.1544 + } 4.1545 + 4.1546 + yyerror_range[0] = yylloc; 4.1547 + 4.1548 + if (yyerrstatus == 3) 4.1549 + { 4.1550 + /* If just tried and failed to reuse look-ahead token after an 4.1551 + error, discard it. */ 4.1552 + 4.1553 + if (yychar <= YYEOF) 4.1554 + { 4.1555 + /* Return failure if at end of input. */ 4.1556 + if (yychar == YYEOF) 4.1557 + YYABORT; 4.1558 + } 4.1559 + else 4.1560 + { 4.1561 + yydestruct ("Error: discarding", 4.1562 + yytoken, &yylval, &yylloc, ctx); 4.1563 + yychar = YYEMPTY; 4.1564 + } 4.1565 + } 4.1566 + 4.1567 + /* Else will try to reuse look-ahead token after shifting the error 4.1568 + token. */ 4.1569 + goto yyerrlab1; 4.1570 + 4.1571 + 4.1572 +/*---------------------------------------------------. 4.1573 +| yyerrorlab -- error raised explicitly by YYERROR. | 4.1574 +`---------------------------------------------------*/ 4.1575 +yyerrorlab: 4.1576 + 4.1577 + /* Pacify compilers like GCC when the user code never invokes 4.1578 + YYERROR and the label yyerrorlab therefore never appears in user 4.1579 + code. */ 4.1580 + if (/*CONSTCOND*/ 0) 4.1581 + goto yyerrorlab; 4.1582 + 4.1583 + yyerror_range[0] = yylsp[1-yylen]; 4.1584 + /* Do not reclaim the symbols of the rule which action triggered 4.1585 + this YYERROR. */ 4.1586 + YYPOPSTACK (yylen); 4.1587 + yylen = 0; 4.1588 + YY_STACK_PRINT (yyss, yyssp); 4.1589 + yystate = *yyssp; 4.1590 + goto yyerrlab1; 4.1591 + 4.1592 + 4.1593 +/*-------------------------------------------------------------. 4.1594 +| yyerrlab1 -- common code for both syntax error and YYERROR. | 4.1595 +`-------------------------------------------------------------*/ 4.1596 +yyerrlab1: 4.1597 + yyerrstatus = 3; /* Each real token shifted decrements this. */ 4.1598 + 4.1599 + for (;;) 4.1600 + { 4.1601 + yyn = yypact[yystate]; 4.1602 + if (yyn != YYPACT_NINF) 4.1603 + { 4.1604 + yyn += YYTERROR; 4.1605 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 4.1606 + { 4.1607 + yyn = yytable[yyn]; 4.1608 + if (0 < yyn) 4.1609 + break; 4.1610 + } 4.1611 + } 4.1612 + 4.1613 + /* Pop the current state because it cannot handle the error token. */ 4.1614 + if (yyssp == yyss) 4.1615 + YYABORT; 4.1616 + 4.1617 + yyerror_range[0] = *yylsp; 4.1618 + yydestruct ("Error: popping", 4.1619 + yystos[yystate], yyvsp, yylsp, ctx); 4.1620 + YYPOPSTACK (1); 4.1621 + yystate = *yyssp; 4.1622 + YY_STACK_PRINT (yyss, yyssp); 4.1623 + } 4.1624 + 4.1625 + if (yyn == YYFINAL) 4.1626 + YYACCEPT; 4.1627 + 4.1628 + *++yyvsp = yylval; 4.1629 + 4.1630 + yyerror_range[1] = yylloc; 4.1631 + /* Using YYLLOC is tempting, but would change the location of 4.1632 + the look-ahead. YYLOC is available though. */ 4.1633 + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); 4.1634 + *++yylsp = yyloc; 4.1635 + 4.1636 + /* Shift the error token. */ 4.1637 + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 4.1638 + 4.1639 + yystate = yyn; 4.1640 + goto yynewstate; 4.1641 + 4.1642 + 4.1643 +/*-------------------------------------. 4.1644 +| yyacceptlab -- YYACCEPT comes here. | 4.1645 +`-------------------------------------*/ 4.1646 +yyacceptlab: 4.1647 + yyresult = 0; 4.1648 + goto yyreturn; 4.1649 + 4.1650 +/*-----------------------------------. 4.1651 +| yyabortlab -- YYABORT comes here. | 4.1652 +`-----------------------------------*/ 4.1653 +yyabortlab: 4.1654 + yyresult = 1; 4.1655 + goto yyreturn; 4.1656 + 4.1657 +#ifndef yyoverflow 4.1658 +/*-------------------------------------------------. 4.1659 +| yyexhaustedlab -- memory exhaustion comes here. | 4.1660 +`-------------------------------------------------*/ 4.1661 +yyexhaustedlab: 4.1662 + yyerror (&yylloc, ctx, YY_("memory exhausted")); 4.1663 + yyresult = 2; 4.1664 + /* Fall through. */ 4.1665 +#endif 4.1666 + 4.1667 +yyreturn: 4.1668 + if (yychar != YYEOF && yychar != YYEMPTY) 4.1669 + yydestruct ("Cleanup: discarding lookahead", 4.1670 + yytoken, &yylval, &yylloc, ctx); 4.1671 + /* Do not reclaim the symbols of the rule which action triggered 4.1672 + this YYABORT or YYACCEPT. */ 4.1673 + YYPOPSTACK (yylen); 4.1674 + YY_STACK_PRINT (yyss, yyssp); 4.1675 + while (yyssp != yyss) 4.1676 + { 4.1677 + yydestruct ("Cleanup: popping", 4.1678 + yystos[*yyssp], yyvsp, yylsp, ctx); 4.1679 + YYPOPSTACK (1); 4.1680 + } 4.1681 +#ifndef yyoverflow 4.1682 + if (yyss != yyssa) 4.1683 + YYSTACK_FREE (yyss); 4.1684 +#endif 4.1685 +#if YYERROR_VERBOSE 4.1686 + if (yymsg != yymsgbuf) 4.1687 + YYSTACK_FREE (yymsg); 4.1688 +#endif 4.1689 + /* Make sure YYID is used. */ 4.1690 + return YYID (yyresult); 4.1691 +} 4.1692 + 4.1693 + 4.1694 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/tools/libxl/libxlu_cfg_y.h Fri Mar 05 14:35:09 2010 +0000 5.3 @@ -0,0 +1,87 @@ 5.4 +/* A Bison parser, made by GNU Bison 2.3. */ 5.5 + 5.6 +/* Skeleton interface for Bison's Yacc-like parsers in C 5.7 + 5.8 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5.9 + Free Software Foundation, Inc. 5.10 + 5.11 + This program is free software; you can redistribute it and/or modify 5.12 + it under the terms of the GNU General Public License as published by 5.13 + the Free Software Foundation; either version 2, or (at your option) 5.14 + any later version. 5.15 + 5.16 + This program is distributed in the hope that it will be useful, 5.17 + but WITHOUT ANY WARRANTY; without even the implied warranty of 5.18 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 5.19 + GNU General Public License for more details. 5.20 + 5.21 + You should have received a copy of the GNU General Public License 5.22 + along with this program; if not, write to the Free Software 5.23 + Foundation, Inc., 51 Franklin Street, Fifth Floor, 5.24 + Boston, MA 02110-1301, USA. */ 5.25 + 5.26 +/* As a special exception, you may create a larger work that contains 5.27 + part or all of the Bison parser skeleton and distribute that work 5.28 + under terms of your choice, so long as that work isn't itself a 5.29 + parser generator using the skeleton or a modified version thereof 5.30 + as a parser skeleton. Alternatively, if you modify or redistribute 5.31 + the parser skeleton itself, you may (at your option) remove this 5.32 + special exception, which will cause the skeleton and the resulting 5.33 + Bison output files to be licensed under the GNU General Public 5.34 + License without this special exception. 5.35 + 5.36 + This special exception was added by the Free Software Foundation in 5.37 + version 2.2 of Bison. */ 5.38 + 5.39 +/* Tokens. */ 5.40 +#ifndef YYTOKENTYPE 5.41 +# define YYTOKENTYPE 5.42 + /* Put the tokens into the symbol table, so that GDB and other debuggers 5.43 + know about them. */ 5.44 + enum yytokentype { 5.45 + IDENT = 258, 5.46 + STRING = 259, 5.47 + NUMBER = 260, 5.48 + NEWLINE = 261 5.49 + }; 5.50 +#endif 5.51 +/* Tokens. */ 5.52 +#define IDENT 258 5.53 +#define STRING 259 5.54 +#define NUMBER 260 5.55 +#define NEWLINE 261 5.56 + 5.57 + 5.58 + 5.59 + 5.60 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 5.61 +typedef union YYSTYPE 5.62 +#line 9 "libxlu_cfg_y.y" 5.63 +{ 5.64 + char *string; 5.65 + XLU_ConfigSetting *setting; 5.66 +} 5.67 +/* Line 1489 of yacc.c. */ 5.68 +#line 66 "libxlu_cfg_y.h" 5.69 + YYSTYPE; 5.70 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 5.71 +# define YYSTYPE_IS_DECLARED 1 5.72 +# define YYSTYPE_IS_TRIVIAL 1 5.73 +#endif 5.74 + 5.75 + 5.76 + 5.77 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 5.78 +typedef struct YYLTYPE 5.79 +{ 5.80 + int first_line; 5.81 + int first_column; 5.82 + int last_line; 5.83 + int last_column; 5.84 +} YYLTYPE; 5.85 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 5.86 +# define YYLTYPE_IS_DECLARED 1 5.87 +# define YYLTYPE_IS_TRIVIAL 1 5.88 +#endif 5.89 + 5.90 +