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