/work/build/epan/radius_dict.c
Line | Count | Source (jump to first uncovered line) |
1 | | #line 2 "/work/build/epan/radius_dict.c" |
2 | | /* Include this before everything else, for various large-file definitions */ |
3 | | #include "config.h" |
4 | | #include <wireshark.h> |
5 | | |
6 | | #line 7 "/work/build/epan/radius_dict.c" |
7 | | |
8 | | #define YY_INT_ALIGNED short int |
9 | | |
10 | | /* A lexical scanner generated by flex */ |
11 | | |
12 | | /* %not-for-header */ |
13 | | /* %if-c-only */ |
14 | | /* %if-not-reentrant */ |
15 | | /* %endif */ |
16 | | /* %endif */ |
17 | | /* %ok-for-header */ |
18 | | |
19 | | #define FLEX_SCANNER |
20 | | #define YY_FLEX_MAJOR_VERSION 2 |
21 | | #define YY_FLEX_MINOR_VERSION 6 |
22 | | #define YY_FLEX_SUBMINOR_VERSION 4 |
23 | | #if YY_FLEX_SUBMINOR_VERSION > 0 |
24 | | #define FLEX_BETA |
25 | | #endif |
26 | | |
27 | | /* %if-c++-only */ |
28 | | /* %endif */ |
29 | | |
30 | | /* %if-c-only */ |
31 | | #ifdef yy_create_buffer |
32 | | #define Radius__create_buffer_ALREADY_DEFINED |
33 | | #else |
34 | 0 | #define yy_create_buffer Radius__create_buffer |
35 | | #endif |
36 | | |
37 | | #ifdef yy_delete_buffer |
38 | | #define Radius__delete_buffer_ALREADY_DEFINED |
39 | | #else |
40 | 0 | #define yy_delete_buffer Radius__delete_buffer |
41 | | #endif |
42 | | |
43 | | #ifdef yy_scan_buffer |
44 | | #define Radius__scan_buffer_ALREADY_DEFINED |
45 | | #else |
46 | 0 | #define yy_scan_buffer Radius__scan_buffer |
47 | | #endif |
48 | | |
49 | | #ifdef yy_scan_string |
50 | | #define Radius__scan_string_ALREADY_DEFINED |
51 | | #else |
52 | | #define yy_scan_string Radius__scan_string |
53 | | #endif |
54 | | |
55 | | #ifdef yy_scan_bytes |
56 | | #define Radius__scan_bytes_ALREADY_DEFINED |
57 | | #else |
58 | 0 | #define yy_scan_bytes Radius__scan_bytes |
59 | | #endif |
60 | | |
61 | | #ifdef yy_init_buffer |
62 | | #define Radius__init_buffer_ALREADY_DEFINED |
63 | | #else |
64 | 0 | #define yy_init_buffer Radius__init_buffer |
65 | | #endif |
66 | | |
67 | | #ifdef yy_flush_buffer |
68 | | #define Radius__flush_buffer_ALREADY_DEFINED |
69 | | #else |
70 | 0 | #define yy_flush_buffer Radius__flush_buffer |
71 | | #endif |
72 | | |
73 | | #ifdef yy_load_buffer_state |
74 | | #define Radius__load_buffer_state_ALREADY_DEFINED |
75 | | #else |
76 | 0 | #define yy_load_buffer_state Radius__load_buffer_state |
77 | | #endif |
78 | | |
79 | | #ifdef yy_switch_to_buffer |
80 | | #define Radius__switch_to_buffer_ALREADY_DEFINED |
81 | | #else |
82 | 0 | #define yy_switch_to_buffer Radius__switch_to_buffer |
83 | | #endif |
84 | | |
85 | | #ifdef yypush_buffer_state |
86 | | #define Radius_push_buffer_state_ALREADY_DEFINED |
87 | | #else |
88 | | #define yypush_buffer_state Radius_push_buffer_state |
89 | | #endif |
90 | | |
91 | | #ifdef yypop_buffer_state |
92 | | #define Radius_pop_buffer_state_ALREADY_DEFINED |
93 | | #else |
94 | 0 | #define yypop_buffer_state Radius_pop_buffer_state |
95 | | #endif |
96 | | |
97 | | #ifdef yyensure_buffer_stack |
98 | | #define Radius_ensure_buffer_stack_ALREADY_DEFINED |
99 | | #else |
100 | 0 | #define yyensure_buffer_stack Radius_ensure_buffer_stack |
101 | | #endif |
102 | | |
103 | | #ifdef yylex |
104 | | #define Radius_lex_ALREADY_DEFINED |
105 | | #else |
106 | | #define yylex Radius_lex |
107 | | #endif |
108 | | |
109 | | #ifdef yyrestart |
110 | | #define Radius_restart_ALREADY_DEFINED |
111 | | #else |
112 | 0 | #define yyrestart Radius_restart |
113 | | #endif |
114 | | |
115 | | #ifdef yylex_init |
116 | | #define Radius_lex_init_ALREADY_DEFINED |
117 | | #else |
118 | | #define yylex_init Radius_lex_init |
119 | | #endif |
120 | | |
121 | | #ifdef yylex_init_extra |
122 | | #define Radius_lex_init_extra_ALREADY_DEFINED |
123 | | #else |
124 | | #define yylex_init_extra Radius_lex_init_extra |
125 | | #endif |
126 | | |
127 | | #ifdef yylex_destroy |
128 | | #define Radius_lex_destroy_ALREADY_DEFINED |
129 | | #else |
130 | | #define yylex_destroy Radius_lex_destroy |
131 | | #endif |
132 | | |
133 | | #ifdef yyget_debug |
134 | | #define Radius_get_debug_ALREADY_DEFINED |
135 | | #else |
136 | | #define yyget_debug Radius_get_debug |
137 | | #endif |
138 | | |
139 | | #ifdef yyset_debug |
140 | | #define Radius_set_debug_ALREADY_DEFINED |
141 | | #else |
142 | | #define yyset_debug Radius_set_debug |
143 | | #endif |
144 | | |
145 | | #ifdef yyget_extra |
146 | | #define Radius_get_extra_ALREADY_DEFINED |
147 | | #else |
148 | | #define yyget_extra Radius_get_extra |
149 | | #endif |
150 | | |
151 | | #ifdef yyset_extra |
152 | | #define Radius_set_extra_ALREADY_DEFINED |
153 | | #else |
154 | 0 | #define yyset_extra Radius_set_extra |
155 | | #endif |
156 | | |
157 | | #ifdef yyget_in |
158 | | #define Radius_get_in_ALREADY_DEFINED |
159 | | #else |
160 | | #define yyget_in Radius_get_in |
161 | | #endif |
162 | | |
163 | | #ifdef yyset_in |
164 | | #define Radius_set_in_ALREADY_DEFINED |
165 | | #else |
166 | | #define yyset_in Radius_set_in |
167 | | #endif |
168 | | |
169 | | #ifdef yyget_out |
170 | | #define Radius_get_out_ALREADY_DEFINED |
171 | | #else |
172 | | #define yyget_out Radius_get_out |
173 | | #endif |
174 | | |
175 | | #ifdef yyset_out |
176 | | #define Radius_set_out_ALREADY_DEFINED |
177 | | #else |
178 | | #define yyset_out Radius_set_out |
179 | | #endif |
180 | | |
181 | | #ifdef yyget_leng |
182 | | #define Radius_get_leng_ALREADY_DEFINED |
183 | | #else |
184 | | #define yyget_leng Radius_get_leng |
185 | | #endif |
186 | | |
187 | | #ifdef yyget_text |
188 | | #define Radius_get_text_ALREADY_DEFINED |
189 | | #else |
190 | | #define yyget_text Radius_get_text |
191 | | #endif |
192 | | |
193 | | #ifdef yyget_lineno |
194 | | #define Radius_get_lineno_ALREADY_DEFINED |
195 | | #else |
196 | | #define yyget_lineno Radius_get_lineno |
197 | | #endif |
198 | | |
199 | | #ifdef yyset_lineno |
200 | | #define Radius_set_lineno_ALREADY_DEFINED |
201 | | #else |
202 | | #define yyset_lineno Radius_set_lineno |
203 | | #endif |
204 | | |
205 | | #ifdef yyget_column |
206 | | #define Radius_get_column_ALREADY_DEFINED |
207 | | #else |
208 | | #define yyget_column Radius_get_column |
209 | | #endif |
210 | | |
211 | | #ifdef yyset_column |
212 | | #define Radius_set_column_ALREADY_DEFINED |
213 | | #else |
214 | | #define yyset_column Radius_set_column |
215 | | #endif |
216 | | |
217 | | #ifdef yywrap |
218 | | #define Radius_wrap_ALREADY_DEFINED |
219 | | #else |
220 | 0 | #define yywrap Radius_wrap |
221 | | #endif |
222 | | |
223 | | /* %endif */ |
224 | | |
225 | | #ifdef yyalloc |
226 | | #define Radius_alloc_ALREADY_DEFINED |
227 | | #else |
228 | 0 | #define yyalloc Radius_alloc |
229 | | #endif |
230 | | |
231 | | #ifdef yyrealloc |
232 | | #define Radius_realloc_ALREADY_DEFINED |
233 | | #else |
234 | 0 | #define yyrealloc Radius_realloc |
235 | | #endif |
236 | | |
237 | | #ifdef yyfree |
238 | | #define Radius_free_ALREADY_DEFINED |
239 | | #else |
240 | 0 | #define yyfree Radius_free |
241 | | #endif |
242 | | |
243 | | /* %if-c-only */ |
244 | | |
245 | | /* %endif */ |
246 | | |
247 | | /* First, we deal with platform-specific or compiler-specific issues. */ |
248 | | |
249 | | /* begin standard C headers. */ |
250 | | /* %if-c-only */ |
251 | | #include <stdio.h> |
252 | | #include <string.h> |
253 | | #include <errno.h> |
254 | | #include <stdlib.h> |
255 | | /* %endif */ |
256 | | |
257 | | /* %if-tables-serialization */ |
258 | | /* %endif */ |
259 | | /* end standard C headers. */ |
260 | | |
261 | | /* %if-c-or-c++ */ |
262 | | /* flex integer type definitions */ |
263 | | |
264 | | #ifndef FLEXINT_H |
265 | | #define FLEXINT_H |
266 | | |
267 | | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
268 | | |
269 | | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
270 | | |
271 | | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
272 | | * if you want the limit (max/min) macros for int types. |
273 | | */ |
274 | | #ifndef __STDC_LIMIT_MACROS |
275 | | #define __STDC_LIMIT_MACROS 1 |
276 | | #endif |
277 | | |
278 | | #include <inttypes.h> |
279 | | typedef int8_t flex_int8_t; |
280 | | typedef uint8_t flex_uint8_t; |
281 | | typedef int16_t flex_int16_t; |
282 | | typedef uint16_t flex_uint16_t; |
283 | | typedef int32_t flex_int32_t; |
284 | | typedef uint32_t flex_uint32_t; |
285 | | #else |
286 | | typedef signed char flex_int8_t; |
287 | | typedef short int flex_int16_t; |
288 | | typedef int flex_int32_t; |
289 | | typedef unsigned char flex_uint8_t; |
290 | | typedef unsigned short int flex_uint16_t; |
291 | | typedef unsigned int flex_uint32_t; |
292 | | |
293 | | /* Limits of integral types. */ |
294 | | #ifndef INT8_MIN |
295 | | #define INT8_MIN (-128) |
296 | | #endif |
297 | | #ifndef INT16_MIN |
298 | | #define INT16_MIN (-32767-1) |
299 | | #endif |
300 | | #ifndef INT32_MIN |
301 | | #define INT32_MIN (-2147483647-1) |
302 | | #endif |
303 | | #ifndef INT8_MAX |
304 | | #define INT8_MAX (127) |
305 | | #endif |
306 | | #ifndef INT16_MAX |
307 | | #define INT16_MAX (32767) |
308 | | #endif |
309 | | #ifndef INT32_MAX |
310 | | #define INT32_MAX (2147483647) |
311 | | #endif |
312 | | #ifndef UINT8_MAX |
313 | | #define UINT8_MAX (255U) |
314 | | #endif |
315 | | #ifndef UINT16_MAX |
316 | | #define UINT16_MAX (65535U) |
317 | | #endif |
318 | | #ifndef UINT32_MAX |
319 | | #define UINT32_MAX (4294967295U) |
320 | | #endif |
321 | | |
322 | | #ifndef SIZE_MAX |
323 | | #define SIZE_MAX (~(size_t)0) |
324 | | #endif |
325 | | |
326 | | #endif /* ! C99 */ |
327 | | |
328 | | #endif /* ! FLEXINT_H */ |
329 | | |
330 | | /* %endif */ |
331 | | |
332 | | /* begin standard C++ headers. */ |
333 | | /* %if-c++-only */ |
334 | | /* %endif */ |
335 | | |
336 | | /* TODO: this is always defined, so inline it */ |
337 | | #define yyconst const |
338 | | |
339 | | #if defined(__GNUC__) && __GNUC__ >= 3 |
340 | | #define yynoreturn __attribute__((__noreturn__)) |
341 | | #else |
342 | | #define yynoreturn |
343 | | #endif |
344 | | |
345 | | /* %not-for-header */ |
346 | | /* Returned upon end-of-file. */ |
347 | 0 | #define YY_NULL 0 |
348 | | /* %ok-for-header */ |
349 | | |
350 | | /* %not-for-header */ |
351 | | /* Promotes a possibly negative, possibly signed char to an |
352 | | * integer in range [0..255] for use as an array index. |
353 | | */ |
354 | 0 | #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
355 | | /* %ok-for-header */ |
356 | | |
357 | | /* %if-reentrant */ |
358 | | |
359 | | /* An opaque pointer. */ |
360 | | #ifndef YY_TYPEDEF_YY_SCANNER_T |
361 | | #define YY_TYPEDEF_YY_SCANNER_T |
362 | | typedef void* yyscan_t; |
363 | | #endif |
364 | | |
365 | | /* For convenience, these vars (plus the bison vars far below) |
366 | | are macros in the reentrant scanner. */ |
367 | 0 | #define yyin yyg->yyin_r |
368 | 0 | #define yyout yyg->yyout_r |
369 | 0 | #define yyextra yyg->yyextra_r |
370 | 0 | #define yyleng yyg->yyleng_r |
371 | 0 | #define yytext yyg->yytext_r |
372 | 0 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
373 | 0 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
374 | 0 | #define yy_flex_debug yyg->yy_flex_debug_r |
375 | | |
376 | | /* %endif */ |
377 | | |
378 | | /* %if-not-reentrant */ |
379 | | /* %endif */ |
380 | | |
381 | | /* Enter a start condition. This macro really ought to take a parameter, |
382 | | * but we do it the disgusting crufty way forced on us by the ()-less |
383 | | * definition of BEGIN. |
384 | | */ |
385 | 0 | #define BEGIN yyg->yy_start = 1 + 2 * |
386 | | /* Translate the current start state into a value that can be later handed |
387 | | * to BEGIN to return to the state. The YYSTATE alias is for lex |
388 | | * compatibility. |
389 | | */ |
390 | | #define YY_START ((yyg->yy_start - 1) / 2) |
391 | | #define YYSTATE YY_START |
392 | | /* Action number for EOF rule of a given start state. */ |
393 | 0 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
394 | | /* Special action meaning "start processing a new file". */ |
395 | 0 | #define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
396 | 0 | #define YY_END_OF_BUFFER_CHAR 0 |
397 | | |
398 | | /* Size of default input buffer. */ |
399 | | #ifndef YY_BUF_SIZE |
400 | | #ifdef __ia64__ |
401 | | /* On IA-64, the buffer size is 16k, not 8k. |
402 | | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
403 | | * Ditto for the __ia64__ case accordingly. |
404 | | */ |
405 | | #define YY_BUF_SIZE 32768 |
406 | | #else |
407 | 0 | #define YY_BUF_SIZE 16384 |
408 | | #endif /* __ia64__ */ |
409 | | #endif |
410 | | |
411 | | /* The state buf must be large enough to hold one state per character in the main buffer. |
412 | | */ |
413 | | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
414 | | |
415 | | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
416 | | #define YY_TYPEDEF_YY_BUFFER_STATE |
417 | | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
418 | | #endif |
419 | | |
420 | | #ifndef YY_TYPEDEF_YY_SIZE_T |
421 | | #define YY_TYPEDEF_YY_SIZE_T |
422 | | typedef size_t yy_size_t; |
423 | | #endif |
424 | | |
425 | | /* %if-not-reentrant */ |
426 | | /* %endif */ |
427 | | |
428 | | /* %if-c-only */ |
429 | | /* %if-not-reentrant */ |
430 | | /* %endif */ |
431 | | /* %endif */ |
432 | | |
433 | 0 | #define EOB_ACT_CONTINUE_SCAN 0 |
434 | 0 | #define EOB_ACT_END_OF_FILE 1 |
435 | 0 | #define EOB_ACT_LAST_MATCH 2 |
436 | | |
437 | | #define YY_LESS_LINENO(n) |
438 | | #define YY_LINENO_REWIND_TO(ptr) |
439 | | |
440 | | /* Return all but the first "n" matched characters back to the input stream. */ |
441 | | #define yyless(n) \ |
442 | | do \ |
443 | | { \ |
444 | | /* Undo effects of setting up yytext. */ \ |
445 | | int yyless_macro_arg = (n); \ |
446 | | YY_LESS_LINENO(yyless_macro_arg);\ |
447 | | *yy_cp = yyg->yy_hold_char; \ |
448 | | YY_RESTORE_YY_MORE_OFFSET \ |
449 | | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
450 | | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
451 | | } \ |
452 | | while ( 0 ) |
453 | | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
454 | | |
455 | | #ifndef YY_STRUCT_YY_BUFFER_STATE |
456 | | #define YY_STRUCT_YY_BUFFER_STATE |
457 | | struct yy_buffer_state |
458 | | { |
459 | | /* %if-c-only */ |
460 | | FILE *yy_input_file; |
461 | | /* %endif */ |
462 | | |
463 | | /* %if-c++-only */ |
464 | | /* %endif */ |
465 | | |
466 | | char *yy_ch_buf; /* input buffer */ |
467 | | char *yy_buf_pos; /* current position in input buffer */ |
468 | | |
469 | | /* Size of input buffer in bytes, not including room for EOB |
470 | | * characters. |
471 | | */ |
472 | | int yy_buf_size; |
473 | | |
474 | | /* Number of characters read into yy_ch_buf, not including EOB |
475 | | * characters. |
476 | | */ |
477 | | int yy_n_chars; |
478 | | |
479 | | /* Whether we "own" the buffer - i.e., we know we created it, |
480 | | * and can realloc() it to grow it, and should free() it to |
481 | | * delete it. |
482 | | */ |
483 | | int yy_is_our_buffer; |
484 | | |
485 | | /* Whether this is an "interactive" input source; if so, and |
486 | | * if we're using stdio for input, then we want to use getc() |
487 | | * instead of fread(), to make sure we stop fetching input after |
488 | | * each newline. |
489 | | */ |
490 | | int yy_is_interactive; |
491 | | |
492 | | /* Whether we're considered to be at the beginning of a line. |
493 | | * If so, '^' rules will be active on the next match, otherwise |
494 | | * not. |
495 | | */ |
496 | | int yy_at_bol; |
497 | | |
498 | | int yy_bs_lineno; /**< The line count. */ |
499 | | int yy_bs_column; /**< The column count. */ |
500 | | |
501 | | /* Whether to try to fill the input buffer when we reach the |
502 | | * end of it. |
503 | | */ |
504 | | int yy_fill_buffer; |
505 | | |
506 | | int yy_buffer_status; |
507 | | |
508 | 0 | #define YY_BUFFER_NEW 0 |
509 | 0 | #define YY_BUFFER_NORMAL 1 |
510 | | /* When an EOF's been seen but there's still some text to process |
511 | | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
512 | | * shouldn't try reading from the input source any more. We might |
513 | | * still have a bunch of tokens to match, though, because of |
514 | | * possible backing-up. |
515 | | * |
516 | | * When we actually see the EOF, we change the status to "new" |
517 | | * (via yyrestart()), so that the user can continue scanning by |
518 | | * just pointing yyin at a new input file. |
519 | | */ |
520 | 0 | #define YY_BUFFER_EOF_PENDING 2 |
521 | | |
522 | | }; |
523 | | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
524 | | |
525 | | /* %if-c-only Standard (non-C++) definition */ |
526 | | /* %not-for-header */ |
527 | | /* %if-not-reentrant */ |
528 | | /* %endif */ |
529 | | /* %ok-for-header */ |
530 | | |
531 | | /* %endif */ |
532 | | |
533 | | /* We provide macros for accessing buffer states in case in the |
534 | | * future we want to put the buffer states in a more general |
535 | | * "scanner state". |
536 | | * |
537 | | * Returns the top of the stack, or NULL. |
538 | | */ |
539 | 0 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
540 | 0 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
541 | 0 | : NULL) |
542 | | /* Same as previous macro, but useful when we know that the buffer stack is not |
543 | | * NULL or when we need an lvalue. For internal use only. |
544 | | */ |
545 | 0 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
546 | | |
547 | | /* %if-c-only Standard (non-C++) definition */ |
548 | | |
549 | | /* %if-not-reentrant */ |
550 | | /* %not-for-header */ |
551 | | /* %ok-for-header */ |
552 | | |
553 | | /* %endif */ |
554 | | |
555 | | void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
556 | | void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
557 | | YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
558 | | void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
559 | | void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
560 | | void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
561 | | void yypop_buffer_state ( yyscan_t yyscanner ); |
562 | | |
563 | | static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
564 | | static void yy_load_buffer_state ( yyscan_t yyscanner ); |
565 | | static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
566 | | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
567 | | |
568 | | YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
569 | | YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
570 | | YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
571 | | |
572 | | /* %endif */ |
573 | | |
574 | | void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
575 | | void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
576 | | void yyfree ( void * , yyscan_t yyscanner ); |
577 | | |
578 | | #define yy_new_buffer yy_create_buffer |
579 | | #define yy_set_interactive(is_interactive) \ |
580 | | { \ |
581 | | if ( ! YY_CURRENT_BUFFER ){ \ |
582 | | yyensure_buffer_stack (yyscanner); \ |
583 | | YY_CURRENT_BUFFER_LVALUE = \ |
584 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
585 | | } \ |
586 | | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
587 | | } |
588 | | #define yy_set_bol(at_bol) \ |
589 | | { \ |
590 | | if ( ! YY_CURRENT_BUFFER ){\ |
591 | | yyensure_buffer_stack (yyscanner); \ |
592 | | YY_CURRENT_BUFFER_LVALUE = \ |
593 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
594 | | } \ |
595 | | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
596 | | } |
597 | | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
598 | | |
599 | | /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ |
600 | | /* Begin user sect3 */ |
601 | | |
602 | 0 | #define Radius_wrap(yyscanner) (/*CONSTCOND*/1) |
603 | | #define YY_SKIP_YYWRAP |
604 | | |
605 | | #define FLEX_DEBUG |
606 | | typedef flex_uint8_t YY_CHAR; |
607 | | |
608 | | typedef int yy_state_type; |
609 | | |
610 | 0 | #define yytext_ptr yytext_r |
611 | | |
612 | | /* %% [1.5] DFA */ |
613 | | |
614 | | /* %if-c-only Standard (non-C++) definition */ |
615 | | |
616 | | static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
617 | | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
618 | | static int yy_get_next_buffer ( yyscan_t yyscanner ); |
619 | | static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
620 | | |
621 | | /* %endif */ |
622 | | |
623 | | /* Done after the current pattern has been matched and before the |
624 | | * corresponding action - sets up yytext. |
625 | | */ |
626 | | #define YY_DO_BEFORE_ACTION \ |
627 | 0 | yyg->yytext_ptr = yy_bp; \ |
628 | 0 | /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ |
629 | 0 | yyleng = (int) (yy_cp - yy_bp); \ |
630 | 0 | yyg->yy_hold_char = *yy_cp; \ |
631 | 0 | *yy_cp = '\0'; \ |
632 | 0 | /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ |
633 | 0 | yyg->yy_c_buf_p = yy_cp; |
634 | | /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ |
635 | | #define YY_NUM_RULES 63 |
636 | 0 | #define YY_END_OF_BUFFER 64 |
637 | | /* This struct is not used in this scanner, |
638 | | but its presence is necessary. */ |
639 | | struct yy_trans_info |
640 | | { |
641 | | flex_int32_t yy_verify; |
642 | | flex_int32_t yy_nxt; |
643 | | }; |
644 | | static const flex_int16_t yy_accept[344] = |
645 | | { 0, |
646 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
647 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
648 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
649 | | 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, |
650 | | 0, 0, 0, 0, 17, 17, 64, 63, 62, 2, |
651 | | 1, 63, 1, 1, 63, 63, 18, 1, 19, 19, |
652 | | 30, 1, 31, 31, 50, 1, 1, 50, 50, 50, |
653 | | 50, 1, 50, 50, 50, 50, 56, 55, 1, 55, |
654 | | 55, 55, 57, 1, 58, 58, 2, 1, 59, 59, |
655 | | 61, 2, 1, 63, 2, 1, 63, 12, 1, 14, |
656 | | |
657 | | 63, 15, 2, 1, 29, 63, 25, 22, 26, 63, |
658 | | 27, 63, 28, 16, 1, 17, 2, 1, 2, 0, |
659 | | 0, 0, 0, 0, 0, 18, 19, 0, 30, 31, |
660 | | 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, |
661 | | 50, 50, 50, 50, 50, 50, 55, 54, 55, 55, |
662 | | 55, 57, 58, 2, 59, 0, 61, 2, 0, 0, |
663 | | 2, 2, 3, 12, 0, 15, 2, 0, 23, 24, |
664 | | 16, 17, 2, 0, 0, 0, 0, 0, 0, 20, |
665 | | 32, 50, 50, 50, 50, 50, 50, 50, 50, 50, |
666 | | 50, 50, 50, 50, 50, 48, 49, 54, 55, 55, |
667 | | |
668 | | 55, 60, 2, 0, 0, 0, 0, 0, 0, 0, |
669 | | 0, 50, 44, 50, 40, 50, 43, 50, 50, 50, |
670 | | 50, 50, 50, 50, 50, 55, 55, 55, 0, 0, |
671 | | 0, 0, 0, 0, 0, 6, 0, 50, 50, 42, |
672 | | 50, 50, 50, 50, 50, 50, 45, 50, 50, 55, |
673 | | 55, 55, 0, 0, 0, 0, 0, 0, 0, 4, |
674 | | 50, 50, 50, 36, 50, 50, 39, 35, 46, 34, |
675 | | 53, 55, 55, 0, 0, 0, 0, 0, 0, 11, |
676 | | 0, 41, 50, 33, 50, 50, 0, 55, 51, 0, |
677 | | 21, 7, 0, 0, 0, 0, 47, 37, 50, 0, |
678 | | |
679 | | 54, 51, 0, 5, 10, 0, 0, 50, 0, 35, |
680 | | 52, 0, 0, 9, 38, 52, 0, 0, 0, 8, |
681 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
682 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
683 | | 0, 13, 0 |
684 | | } ; |
685 | | |
686 | | static const YY_CHAR yy_ec[256] = |
687 | | { 0, |
688 | | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
689 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
690 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
691 | | 1, 2, 1, 1, 4, 5, 1, 1, 1, 1, |
692 | | 1, 1, 1, 6, 7, 8, 9, 10, 11, 11, |
693 | | 12, 13, 14, 15, 16, 16, 16, 17, 1, 1, |
694 | | 18, 1, 1, 1, 19, 20, 21, 22, 23, 24, |
695 | | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
696 | | 35, 36, 37, 38, 39, 40, 28, 41, 42, 28, |
697 | | 43, 1, 44, 1, 45, 1, 46, 47, 48, 49, |
698 | | |
699 | | 50, 51, 52, 53, 54, 28, 29, 55, 56, 57, |
700 | | 58, 59, 60, 61, 62, 63, 64, 65, 28, 66, |
701 | | 67, 28, 1, 1, 1, 1, 1, 1, 1, 1, |
702 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
703 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
704 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
705 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
706 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
707 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
708 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
709 | | |
710 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
711 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
712 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
713 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
714 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
715 | | 1, 1, 1, 1, 1 |
716 | | } ; |
717 | | |
718 | | static const YY_CHAR yy_meta[68] = |
719 | | { 0, |
720 | | 1, 2, 3, 1, 1, 1, 4, 5, 6, 7, |
721 | | 7, 7, 7, 7, 7, 7, 1, 8, 7, 7, |
722 | | 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, |
723 | | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
724 | | 4, 4, 1, 1, 4, 7, 7, 7, 7, 7, |
725 | | 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
726 | | 4, 4, 4, 4, 4, 4, 4 |
727 | | } ; |
728 | | |
729 | | static const flex_int16_t yy_base[377] = |
730 | | { 0, |
731 | | 0, 55, 110, 0, 175, 232, 285, 0, 350, 407, |
732 | | 0, 23, 464, 0, 531, 0, 598, 655, 711, 767, |
733 | | 11, 38, 823, 879, 934, 992, 1052, 1109, 53, 83, |
734 | | 1164, 1219, 108, 158, 133, 186, 200, 257, 300, 327, |
735 | | 243, 361, 1276, 1333, 1388, 1443, 326, 1714, 1714, 0, |
736 | | 1714, 16, 40, 21, 48, 112, 0, 0, 374, 213, |
737 | | 0, 0, 406, 623, 0, 41, 39, 50, 43, 53, |
738 | | 589, 0, 52, 239, 62, 89, 1714, 302, 289, 276, |
739 | | 134, 299, 0, 0, 0, 0, 3, 0, 655, 270, |
740 | | 0, 289, 0, 93, 103, 182, 287, 0, 0, 1714, |
741 | | |
742 | | 187, 0, 0, 0, 1714, 288, 1714, 1714, 1714, 30, |
743 | | 1714, 61, 1714, 0, 0, 0, 0, 0, 0, 291, |
744 | | 286, 112, 225, 306, 326, 0, 388, 0, 0, 433, |
745 | | 0, 0, 338, 328, 350, 392, 403, 404, 394, 686, |
746 | | 396, 402, 580, 402, 582, 605, 270, 0, 593, 631, |
747 | | 592, 0, 0, 152, 723, 0, 0, 246, 643, 651, |
748 | | 646, 659, 647, 0, 656, 0, 0, 657, 1714, 1714, |
749 | | 0, 0, 0, 656, 659, 670, 237, 661, 700, 0, |
750 | | 0, 691, 706, 725, 723, 724, 728, 730, 732, 224, |
751 | | 710, 732, 724, 731, 735, 0, 0, 0, 743, 747, |
752 | | |
753 | | 0, 0, 740, 745, 747, 749, 763, 761, 767, 769, |
754 | | 762, 775, 0, 765, 0, 770, 0, 777, 787, 814, |
755 | | 787, 778, 796, 788, 807, 826, 833, 828, 816, 828, |
756 | | 815, 829, 201, 831, 827, 1714, 827, 829, 183, 0, |
757 | | 834, 831, 836, 832, 849, 852, 0, 872, 870, 879, |
758 | | 884, 885, 867, 869, 879, 871, 907, 875, 884, 1714, |
759 | | 877, 879, 887, 0, 907, 923, 0, 145, 0, 0, |
760 | | 169, 921, 940, 123, 107, 926, 889, 920, 932, 1714, |
761 | | 938, 0, 927, 0, 932, 947, 988, 72, 225, 955, |
762 | | 1714, 1714, 956, 943, 953, 955, 0, 0, 963, 1018, |
763 | | |
764 | | 174, 1714, 974, 1714, 1714, 992, 982, 978, 1064, 1714, |
765 | | 73, 982, 990, 1714, 0, 0, 1013, 989, 994, 1714, |
766 | | 1015, 1023, 1037, 69, 1002, 1042, 1034, 1067, 1035, 1058, |
767 | | 53, 1060, 1066, 1080, 1083, 1078, 1082, 1093, 1100, 35, |
768 | | 1131, 1714, 1714, 1500, 1508, 1516, 1524, 1532, 1540, 1548, |
769 | | 1556, 1564, 1572, 1580, 1588, 1593, 1597, 1601, 1605, 1610, |
770 | | 1617, 1625, 1633, 1641, 1649, 1657, 1662, 1669, 1677, 1682, |
771 | | 1689, 1697, 21, 2, 1705, 0 |
772 | | } ; |
773 | | |
774 | | static const flex_int16_t yy_def[377] = |
775 | | { 0, |
776 | | 344, 344, 344, 3, 345, 345, 3, 7, 346, 346, |
777 | | 7, 7, 343, 13, 343, 15, 347, 347, 348, 348, |
778 | | 7, 7, 349, 349, 350, 350, 351, 351, 7, 7, |
779 | | 352, 352, 7, 7, 7, 7, 7, 7, 7, 7, |
780 | | 7, 7, 353, 353, 354, 354, 343, 343, 343, 355, |
781 | | 343, 343, 343, 343, 343, 343, 356, 356, 343, 343, |
782 | | 357, 357, 343, 343, 358, 358, 358, 358, 358, 358, |
783 | | 358, 358, 358, 358, 358, 358, 343, 359, 359, 359, |
784 | | 359, 359, 360, 360, 361, 361, 362, 361, 343, 343, |
785 | | 363, 364, 363, 365, 366, 365, 365, 367, 367, 343, |
786 | | |
787 | | 343, 368, 369, 368, 343, 343, 343, 343, 343, 343, |
788 | | 343, 343, 343, 370, 370, 371, 372, 371, 355, 343, |
789 | | 343, 343, 343, 343, 343, 356, 343, 373, 357, 343, |
790 | | 374, 358, 358, 358, 358, 358, 358, 358, 358, 358, |
791 | | 358, 358, 358, 358, 358, 358, 359, 375, 359, 359, |
792 | | 359, 360, 361, 362, 343, 376, 363, 364, 365, 365, |
793 | | 366, 366, 365, 367, 343, 368, 369, 343, 343, 343, |
794 | | 370, 371, 372, 343, 343, 343, 343, 343, 343, 373, |
795 | | 374, 358, 358, 358, 358, 358, 358, 358, 358, 358, |
796 | | 358, 358, 358, 358, 358, 358, 358, 375, 359, 359, |
797 | | |
798 | | 359, 376, 366, 343, 343, 343, 343, 343, 343, 343, |
799 | | 343, 358, 358, 358, 358, 358, 358, 358, 358, 358, |
800 | | 358, 358, 358, 358, 358, 359, 359, 359, 343, 343, |
801 | | 343, 343, 343, 343, 343, 343, 343, 358, 358, 358, |
802 | | 358, 358, 358, 358, 358, 358, 358, 358, 358, 359, |
803 | | 359, 359, 343, 343, 343, 343, 343, 343, 343, 343, |
804 | | 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, |
805 | | 359, 359, 359, 343, 343, 343, 343, 343, 343, 343, |
806 | | 343, 358, 358, 358, 358, 358, 343, 359, 359, 343, |
807 | | 343, 343, 343, 343, 343, 343, 358, 358, 358, 343, |
808 | | |
809 | | 375, 343, 343, 343, 343, 343, 343, 358, 343, 343, |
810 | | 375, 343, 343, 343, 358, 375, 343, 343, 343, 343, |
811 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
812 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
813 | | 343, 343, 0, 343, 343, 343, 343, 343, 343, 343, |
814 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
815 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
816 | | 343, 343, 343, 343, 343, 343 |
817 | | } ; |
818 | | |
819 | | static const flex_int16_t yy_nxt[1782] = |
820 | | { 0, |
821 | | 343, 343, 49, 50, 119, 153, 202, 63, 181, 64, |
822 | | 63, 63, 63, 63, 63, 63, 51, 148, 51, 51, |
823 | | 89, 90, 90, 90, 90, 90, 90, 180, 51, 51, |
824 | | 63, 51, 64, 63, 63, 63, 63, 63, 63, 169, |
825 | | 169, 341, 120, 122, 228, 51, 51, 89, 90, 90, |
826 | | 90, 90, 90, 90, 51, 100, 51, 49, 50, 332, |
827 | | 133, 136, 48, 48, 48, 48, 48, 48, 48, 120, |
828 | | 122, 51, 141, 51, 51, 325, 101, 121, 316, 123, |
829 | | 134, 170, 135, 51, 51, 100, 51, 133, 136, 301, |
830 | | 137, 145, 48, 48, 48, 48, 48, 48, 48, 141, |
831 | | |
832 | | 51, 51, 121, 101, 123, 134, 101, 135, 170, 51, |
833 | | 105, 51, 49, 50, 52, 137, 145, 48, 48, 48, |
834 | | 48, 48, 48, 48, 291, 146, 51, 160, 53, 54, |
835 | | 124, 106, 55, 101, 125, 107, 176, 162, 51, 51, |
836 | | 290, 51, 48, 108, 48, 108, 48, 48, 48, 56, |
837 | | 146, 148, 160, 119, 153, 53, 54, 124, 106, 55, |
838 | | 105, 125, 162, 176, 51, 150, 51, 48, 48, 48, |
839 | | 48, 48, 48, 48, 56, 48, 48, 49, 50, 48, |
840 | | 48, 106, 48, 48, 311, 311, 148, 287, 107, 262, |
841 | | 150, 51, 48, 58, 58, 48, 108, 48, 108, 48, |
842 | | |
843 | | 48, 48, 109, 58, 58, 110, 58, 257, 106, 48, |
844 | | 48, 48, 48, 48, 48, 48, 160, 48, 48, 165, |
845 | | 58, 58, 127, 127, 127, 127, 127, 127, 127, 58, |
846 | | 302, 58, 48, 48, 49, 50, 48, 48, 220, 48, |
847 | | 48, 160, 148, 209, 165, 113, 177, 119, 51, 48, |
848 | | 58, 58, 48, 48, 48, 48, 48, 48, 48, 109, |
849 | | 58, 58, 110, 58, 142, 143, 48, 48, 48, 48, |
850 | | 48, 48, 48, 177, 48, 48, 144, 58, 58, 155, |
851 | | 155, 155, 155, 155, 155, 155, 58, 148, 58, 48, |
852 | | 119, 142, 143, 148, 59, 60, 60, 60, 60, 60, |
853 | | |
854 | | 60, 144, 111, 51, 51, 112, 148, 48, 149, 48, |
855 | | 48, 48, 48, 48, 48, 48, 148, 151, 163, 148, |
856 | | 168, 160, 174, 175, 48, 343, 343, 343, 343, 111, |
857 | | 51, 51, 112, 149, 48, 178, 48, 48, 48, 48, |
858 | | 48, 48, 48, 163, 151, 168, 160, 174, 175, 48, |
859 | | 48, 48, 49, 50, 48, 48, 343, 179, 343, 343, |
860 | | 178, 343, 343, 113, 182, 183, 51, 48, 62, 62, |
861 | | 48, 48, 48, 48, 48, 48, 48, 343, 62, 62, |
862 | | 184, 62, 179, 127, 127, 127, 127, 127, 127, 127, |
863 | | 183, 182, 48, 48, 343, 62, 62, 127, 127, 127, |
864 | | |
865 | | 127, 127, 127, 127, 62, 184, 62, 48, 48, 49, |
866 | | 50, 48, 48, 130, 128, 130, 130, 130, 130, 130, |
867 | | 130, 130, 343, 51, 48, 62, 62, 343, 186, 185, |
868 | | 187, 188, 343, 192, 193, 62, 62, 195, 62, 128, |
869 | | 130, 343, 130, 130, 130, 130, 130, 130, 130, 48, |
870 | | 48, 343, 62, 62, 185, 186, 188, 187, 192, 193, |
871 | | 343, 62, 195, 62, 48, 48, 49, 50, 48, 48, |
872 | | 65, 48, 48, 65, 65, 65, 65, 65, 65, 65, |
873 | | 51, 48, 66, 67, 68, 69, 70, 65, 65, 65, |
874 | | 71, 65, 72, 72, 65, 72, 73, 65, 65, 65, |
875 | | |
876 | | 74, 75, 65, 76, 65, 65, 48, 48, 65, 66, |
877 | | 67, 68, 69, 70, 65, 65, 65, 71, 72, 65, |
878 | | 72, 73, 65, 65, 65, 74, 75, 65, 76, 65, |
879 | | 65, 48, 48, 77, 50, 48, 48, 78, 48, 48, |
880 | | 78, 78, 78, 78, 78, 78, 78, 51, 48, 79, |
881 | | 79, 80, 78, 81, 78, 78, 82, 78, 78, 79, |
882 | | 79, 78, 79, 78, 78, 78, 78, 78, 78, 78, |
883 | | 78, 78, 78, 48, 48, 78, 79, 79, 80, 78, |
884 | | 81, 78, 78, 82, 78, 79, 78, 79, 78, 78, |
885 | | 78, 78, 78, 78, 78, 78, 78, 78, 48, 48, |
886 | | |
887 | | 49, 50, 48, 48, 194, 48, 343, 343, 343, 148, |
888 | | 148, 343, 138, 343, 51, 48, 84, 84, 343, 343, |
889 | | 139, 196, 140, 197, 199, 343, 84, 84, 201, 84, |
890 | | 130, 194, 130, 130, 130, 130, 130, 130, 130, 138, |
891 | | 48, 48, 343, 84, 84, 139, 196, 140, 148, 199, |
892 | | 197, 200, 84, 201, 84, 48, 48, 49, 50, 48, |
893 | | 48, 343, 48, 131, 155, 155, 155, 155, 155, 155, |
894 | | 155, 51, 48, 84, 84, 343, 206, 160, 200, 343, |
895 | | 162, 160, 163, 84, 84, 160, 84, 343, 131, 343, |
896 | | 203, 204, 205, 162, 207, 156, 208, 48, 48, 210, |
897 | | |
898 | | 84, 84, 160, 206, 189, 162, 160, 163, 343, 84, |
899 | | 160, 84, 48, 86, 87, 203, 204, 205, 162, 207, |
900 | | 156, 211, 212, 208, 210, 190, 191, 88, 213, 88, |
901 | | 88, 189, 155, 155, 155, 155, 155, 155, 155, 88, |
902 | | 88, 221, 88, 343, 214, 215, 216, 212, 211, 217, |
903 | | 190, 191, 218, 219, 222, 213, 88, 88, 343, 223, |
904 | | 148, 225, 224, 226, 148, 88, 221, 88, 48, 86, |
905 | | 87, 214, 215, 216, 162, 229, 217, 230, 231, 218, |
906 | | 219, 222, 227, 88, 223, 88, 88, 224, 225, 232, |
907 | | 226, 236, 233, 238, 237, 88, 88, 239, 88, 162, |
908 | | |
909 | | 229, 241, 230, 231, 234, 240, 235, 227, 242, 245, |
910 | | 248, 343, 88, 88, 343, 246, 232, 233, 236, 237, |
911 | | 238, 88, 239, 88, 48, 49, 92, 343, 241, 234, |
912 | | 240, 235, 243, 247, 253, 242, 245, 248, 249, 93, |
913 | | 246, 93, 93, 148, 250, 148, 254, 244, 256, 259, |
914 | | 148, 93, 93, 255, 93, 343, 263, 265, 247, 243, |
915 | | 258, 253, 260, 249, 261, 252, 264, 266, 93, 93, |
916 | | 343, 250, 244, 254, 251, 256, 259, 93, 255, 93, |
917 | | 48, 49, 92, 263, 265, 258, 267, 260, 268, 261, |
918 | | 252, 264, 266, 269, 270, 93, 148, 93, 93, 251, |
919 | | |
920 | | 276, 148, 148, 273, 274, 283, 275, 93, 93, 277, |
921 | | 93, 267, 343, 268, 280, 281, 271, 272, 282, 343, |
922 | | 269, 270, 284, 343, 93, 93, 293, 276, 285, 274, |
923 | | 273, 275, 283, 93, 277, 93, 49, 95, 148, 280, |
924 | | 281, 271, 272, 282, 278, 286, 279, 284, 292, 294, |
925 | | 96, 293, 96, 96, 295, 285, 343, 148, 288, 296, |
926 | | 297, 343, 96, 96, 289, 96, 343, 298, 97, 278, |
927 | | 299, 279, 286, 343, 294, 292, 343, 303, 304, 96, |
928 | | 96, 295, 305, 288, 306, 297, 296, 307, 96, 308, |
929 | | 96, 289, 298, 97, 49, 95, 343, 299, 300, 300, |
930 | | |
931 | | 300, 300, 300, 300, 303, 304, 343, 305, 96, 306, |
932 | | 96, 96, 307, 313, 312, 343, 308, 314, 315, 317, |
933 | | 96, 96, 318, 96, 320, 321, 97, 309, 309, 309, |
934 | | 309, 309, 309, 309, 343, 319, 322, 96, 96, 312, |
935 | | 313, 326, 314, 315, 317, 323, 96, 318, 96, 320, |
936 | | 321, 97, 48, 48, 49, 50, 48, 48, 324, 48, |
937 | | 48, 310, 319, 322, 327, 328, 326, 330, 51, 48, |
938 | | 99, 99, 323, 309, 309, 309, 309, 309, 309, 309, |
939 | | 99, 99, 343, 99, 343, 324, 343, 343, 329, 343, |
940 | | 328, 327, 330, 331, 48, 48, 333, 99, 99, 334, |
941 | | |
942 | | 343, 343, 335, 336, 337, 338, 99, 310, 99, 48, |
943 | | 48, 49, 50, 48, 48, 329, 48, 48, 331, 339, |
944 | | 340, 333, 343, 343, 334, 51, 48, 99, 99, 335, |
945 | | 336, 337, 338, 343, 343, 343, 343, 99, 99, 343, |
946 | | 99, 342, 342, 342, 342, 342, 339, 340, 343, 343, |
947 | | 343, 48, 48, 343, 99, 99, 343, 343, 343, 343, |
948 | | 343, 343, 343, 99, 343, 99, 49, 103, 343, 343, |
949 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
950 | | 104, 343, 104, 104, 343, 343, 343, 343, 343, 343, |
951 | | 343, 343, 104, 104, 343, 104, 343, 343, 343, 343, |
952 | | |
953 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 104, |
954 | | 104, 343, 343, 343, 343, 343, 343, 343, 104, 343, |
955 | | 104, 49, 103, 343, 343, 343, 343, 343, 343, 343, |
956 | | 343, 343, 343, 343, 343, 104, 343, 104, 104, 343, |
957 | | 343, 343, 343, 343, 343, 343, 343, 104, 104, 343, |
958 | | 104, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
959 | | 343, 343, 343, 343, 104, 104, 343, 343, 343, 343, |
960 | | 343, 343, 343, 104, 343, 104, 48, 48, 49, 50, |
961 | | 48, 48, 343, 48, 48, 343, 343, 343, 343, 343, |
962 | | 343, 343, 51, 48, 115, 115, 343, 343, 343, 343, |
963 | | |
964 | | 343, 343, 343, 343, 115, 115, 343, 115, 343, 343, |
965 | | 343, 343, 343, 343, 343, 343, 343, 343, 48, 48, |
966 | | 343, 115, 115, 343, 343, 343, 343, 343, 343, 343, |
967 | | 115, 343, 115, 48, 48, 49, 50, 48, 48, 343, |
968 | | 48, 48, 343, 343, 343, 343, 343, 343, 343, 51, |
969 | | 48, 115, 115, 343, 343, 343, 343, 343, 343, 343, |
970 | | 343, 115, 115, 343, 115, 343, 343, 343, 343, 343, |
971 | | 343, 343, 343, 343, 343, 48, 48, 343, 115, 115, |
972 | | 343, 343, 343, 343, 343, 343, 343, 115, 343, 115, |
973 | | 49, 117, 343, 343, 343, 343, 343, 343, 343, 343, |
974 | | |
975 | | 343, 343, 343, 343, 118, 343, 118, 118, 343, 343, |
976 | | 343, 343, 343, 343, 343, 343, 118, 118, 343, 118, |
977 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
978 | | 343, 343, 343, 118, 118, 343, 343, 343, 343, 343, |
979 | | 343, 343, 118, 343, 118, 49, 117, 343, 343, 343, |
980 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 118, |
981 | | 343, 118, 118, 343, 343, 343, 343, 343, 343, 343, |
982 | | 343, 118, 118, 343, 118, 343, 343, 343, 343, 343, |
983 | | 343, 343, 343, 343, 343, 343, 343, 343, 118, 118, |
984 | | 343, 343, 343, 343, 343, 343, 343, 118, 343, 118, |
985 | | |
986 | | 48, 48, 48, 48, 48, 48, 48, 48, 57, 57, |
987 | | 57, 57, 57, 57, 57, 57, 61, 61, 61, 61, |
988 | | 61, 61, 61, 61, 83, 83, 83, 83, 83, 83, |
989 | | 83, 83, 85, 85, 85, 85, 85, 85, 85, 85, |
990 | | 91, 91, 91, 91, 91, 91, 91, 91, 94, 94, |
991 | | 94, 94, 94, 94, 94, 94, 98, 98, 98, 98, |
992 | | 98, 98, 98, 98, 102, 102, 102, 102, 102, 102, |
993 | | 102, 102, 114, 114, 114, 114, 114, 114, 114, 114, |
994 | | 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, |
995 | | 343, 119, 119, 119, 119, 119, 126, 343, 343, 126, |
996 | | |
997 | | 129, 129, 129, 129, 132, 343, 343, 132, 147, 343, |
998 | | 343, 147, 147, 152, 343, 152, 152, 153, 343, 153, |
999 | | 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, |
1000 | | 154, 154, 154, 157, 343, 343, 157, 157, 157, 157, |
1001 | | 157, 158, 158, 343, 158, 158, 158, 158, 158, 159, |
1002 | | 159, 343, 159, 159, 159, 159, 159, 161, 161, 343, |
1003 | | 161, 161, 161, 161, 161, 164, 343, 343, 164, 166, |
1004 | | 166, 343, 166, 166, 166, 166, 166, 167, 167, 343, |
1005 | | 167, 167, 167, 167, 167, 171, 343, 343, 171, 172, |
1006 | | 172, 343, 172, 172, 172, 172, 172, 173, 173, 343, |
1007 | | |
1008 | | 173, 173, 173, 173, 173, 198, 198, 343, 198, 198, |
1009 | | 198, 198, 198, 47, 343, 343, 343, 343, 343, 343, |
1010 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1011 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1012 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1013 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1014 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1015 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1016 | | 343 |
1017 | | } ; |
1018 | | |
1019 | | static const flex_int16_t yy_chk[1782] = |
1020 | | { 0, |
1021 | | 0, 0, 1, 1, 87, 87, 376, 11, 374, 11, |
1022 | | 11, 11, 11, 11, 11, 11, 1, 201, 1, 1, |
1023 | | 21, 21, 21, 21, 21, 21, 21, 373, 1, 1, |
1024 | | 12, 1, 12, 12, 12, 12, 12, 12, 12, 110, |
1025 | | 110, 340, 52, 54, 201, 1, 1, 22, 22, 22, |
1026 | | 22, 22, 22, 22, 1, 29, 1, 2, 2, 331, |
1027 | | 66, 69, 29, 29, 29, 29, 29, 29, 29, 52, |
1028 | | 54, 2, 73, 2, 2, 324, 29, 53, 311, 55, |
1029 | | 67, 112, 68, 2, 2, 30, 2, 66, 69, 288, |
1030 | | 70, 75, 30, 30, 30, 30, 30, 30, 30, 73, |
1031 | | |
1032 | | 2, 2, 53, 29, 55, 67, 30, 68, 112, 2, |
1033 | | 33, 2, 3, 3, 3, 70, 75, 33, 33, 33, |
1034 | | 33, 33, 33, 33, 275, 76, 3, 94, 3, 3, |
1035 | | 56, 33, 3, 30, 56, 35, 122, 95, 3, 3, |
1036 | | 274, 3, 35, 35, 35, 35, 35, 35, 35, 3, |
1037 | | 76, 81, 94, 154, 154, 3, 3, 56, 33, 3, |
1038 | | 34, 56, 95, 122, 3, 81, 3, 34, 34, 34, |
1039 | | 34, 34, 34, 34, 3, 5, 5, 5, 5, 5, |
1040 | | 5, 34, 5, 5, 301, 301, 271, 268, 36, 239, |
1041 | | 81, 5, 5, 5, 5, 36, 36, 36, 36, 36, |
1042 | | |
1043 | | 36, 36, 37, 5, 5, 37, 5, 233, 34, 37, |
1044 | | 37, 37, 37, 37, 37, 37, 96, 5, 5, 101, |
1045 | | 5, 5, 60, 60, 60, 60, 60, 60, 60, 5, |
1046 | | 289, 5, 6, 6, 6, 6, 6, 6, 190, 6, |
1047 | | 6, 96, 289, 177, 101, 41, 123, 158, 6, 6, |
1048 | | 6, 6, 41, 41, 41, 41, 41, 41, 41, 38, |
1049 | | 6, 6, 38, 6, 74, 74, 38, 38, 38, 38, |
1050 | | 38, 38, 38, 123, 6, 6, 74, 6, 6, 90, |
1051 | | 90, 90, 90, 90, 90, 90, 6, 147, 6, 7, |
1052 | | 92, 74, 74, 80, 7, 7, 7, 7, 7, 7, |
1053 | | |
1054 | | 7, 74, 39, 7, 7, 39, 79, 7, 80, 39, |
1055 | | 39, 39, 39, 39, 39, 39, 82, 82, 97, 78, |
1056 | | 106, 97, 120, 121, 7, 47, 0, 0, 0, 40, |
1057 | | 7, 7, 40, 80, 7, 124, 40, 40, 40, 40, |
1058 | | 40, 40, 40, 97, 82, 106, 97, 120, 121, 7, |
1059 | | 9, 9, 9, 9, 9, 9, 0, 125, 0, 0, |
1060 | | 124, 0, 0, 42, 133, 134, 9, 9, 9, 9, |
1061 | | 42, 42, 42, 42, 42, 42, 42, 0, 9, 9, |
1062 | | 135, 9, 125, 59, 59, 59, 59, 59, 59, 59, |
1063 | | 134, 133, 9, 9, 0, 9, 9, 127, 127, 127, |
1064 | | |
1065 | | 127, 127, 127, 127, 9, 135, 9, 10, 10, 10, |
1066 | | 10, 10, 10, 63, 59, 63, 63, 63, 63, 63, |
1067 | | 63, 63, 0, 10, 10, 10, 10, 0, 137, 136, |
1068 | | 138, 139, 0, 141, 142, 10, 10, 144, 10, 59, |
1069 | | 130, 0, 130, 130, 130, 130, 130, 130, 130, 10, |
1070 | | 10, 0, 10, 10, 136, 137, 139, 138, 141, 142, |
1071 | | 0, 10, 144, 10, 13, 13, 13, 13, 13, 13, |
1072 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1073 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1074 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1075 | | |
1076 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1077 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1078 | | 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, |
1079 | | 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1080 | | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1081 | | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1082 | | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1083 | | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1084 | | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
1085 | | 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, |
1086 | | |
1087 | | 17, 17, 17, 17, 143, 17, 0, 0, 0, 151, |
1088 | | 149, 0, 71, 0, 17, 17, 17, 17, 0, 0, |
1089 | | 71, 145, 71, 146, 149, 0, 17, 17, 151, 17, |
1090 | | 64, 143, 64, 64, 64, 64, 64, 64, 64, 71, |
1091 | | 17, 17, 0, 17, 17, 71, 145, 71, 150, 149, |
1092 | | 146, 150, 17, 151, 17, 18, 18, 18, 18, 18, |
1093 | | 18, 0, 18, 64, 89, 89, 89, 89, 89, 89, |
1094 | | 89, 18, 18, 18, 18, 0, 174, 159, 150, 0, |
1095 | | 161, 163, 160, 18, 18, 160, 18, 0, 64, 0, |
1096 | | 162, 165, 168, 162, 175, 89, 176, 18, 18, 178, |
1097 | | |
1098 | | 18, 18, 159, 174, 140, 161, 163, 160, 0, 18, |
1099 | | 160, 18, 19, 19, 19, 162, 165, 168, 162, 175, |
1100 | | 89, 179, 182, 176, 178, 140, 140, 19, 183, 19, |
1101 | | 19, 140, 155, 155, 155, 155, 155, 155, 155, 19, |
1102 | | 19, 191, 19, 0, 184, 185, 186, 182, 179, 187, |
1103 | | 140, 140, 188, 189, 192, 183, 19, 19, 0, 193, |
1104 | | 199, 195, 194, 199, 200, 19, 191, 19, 20, 20, |
1105 | | 20, 184, 185, 186, 203, 204, 187, 205, 206, 188, |
1106 | | 189, 192, 200, 20, 193, 20, 20, 194, 195, 207, |
1107 | | 199, 210, 208, 212, 211, 20, 20, 214, 20, 203, |
1108 | | |
1109 | | 204, 218, 205, 206, 209, 216, 209, 200, 219, 221, |
1110 | | 224, 0, 20, 20, 0, 222, 207, 208, 210, 211, |
1111 | | 212, 20, 214, 20, 23, 23, 23, 0, 218, 209, |
1112 | | 216, 209, 220, 223, 229, 219, 221, 224, 225, 23, |
1113 | | 222, 23, 23, 226, 226, 228, 230, 220, 232, 235, |
1114 | | 227, 23, 23, 231, 23, 0, 241, 243, 223, 220, |
1115 | | 234, 229, 237, 225, 238, 228, 242, 244, 23, 23, |
1116 | | 0, 226, 220, 230, 227, 232, 235, 23, 231, 23, |
1117 | | 24, 24, 24, 241, 243, 234, 245, 237, 246, 238, |
1118 | | 228, 242, 244, 248, 249, 24, 250, 24, 24, 227, |
1119 | | |
1120 | | 255, 251, 252, 252, 253, 262, 254, 24, 24, 256, |
1121 | | 24, 245, 0, 246, 258, 259, 250, 251, 261, 0, |
1122 | | 248, 249, 263, 0, 24, 24, 277, 255, 265, 253, |
1123 | | 252, 254, 262, 24, 256, 24, 25, 25, 272, 258, |
1124 | | 259, 250, 251, 261, 257, 266, 257, 263, 276, 278, |
1125 | | 25, 277, 25, 25, 279, 265, 0, 273, 272, 281, |
1126 | | 283, 0, 25, 25, 273, 25, 0, 285, 25, 257, |
1127 | | 286, 257, 266, 0, 278, 276, 0, 290, 293, 25, |
1128 | | 25, 279, 294, 272, 295, 283, 281, 296, 25, 299, |
1129 | | 25, 273, 285, 25, 26, 26, 0, 286, 287, 287, |
1130 | | |
1131 | | 287, 287, 287, 287, 290, 293, 0, 294, 26, 295, |
1132 | | 26, 26, 296, 306, 303, 0, 299, 307, 308, 312, |
1133 | | 26, 26, 313, 26, 318, 319, 26, 300, 300, 300, |
1134 | | 300, 300, 300, 300, 0, 317, 321, 26, 26, 303, |
1135 | | 306, 325, 307, 308, 312, 322, 26, 313, 26, 318, |
1136 | | 319, 26, 27, 27, 27, 27, 27, 27, 323, 27, |
1137 | | 27, 300, 317, 321, 326, 327, 325, 329, 27, 27, |
1138 | | 27, 27, 322, 309, 309, 309, 309, 309, 309, 309, |
1139 | | 27, 27, 0, 27, 0, 323, 0, 0, 328, 0, |
1140 | | 327, 326, 329, 330, 27, 27, 332, 27, 27, 333, |
1141 | | |
1142 | | 0, 0, 334, 335, 336, 337, 27, 309, 27, 28, |
1143 | | 28, 28, 28, 28, 28, 328, 28, 28, 330, 338, |
1144 | | 339, 332, 0, 0, 333, 28, 28, 28, 28, 334, |
1145 | | 335, 336, 337, 0, 0, 0, 0, 28, 28, 0, |
1146 | | 28, 341, 341, 341, 341, 341, 338, 339, 0, 0, |
1147 | | 0, 28, 28, 0, 28, 28, 0, 0, 0, 0, |
1148 | | 0, 0, 0, 28, 0, 28, 31, 31, 0, 0, |
1149 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1150 | | 31, 0, 31, 31, 0, 0, 0, 0, 0, 0, |
1151 | | 0, 0, 31, 31, 0, 31, 0, 0, 0, 0, |
1152 | | |
1153 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, |
1154 | | 31, 0, 0, 0, 0, 0, 0, 0, 31, 0, |
1155 | | 31, 32, 32, 0, 0, 0, 0, 0, 0, 0, |
1156 | | 0, 0, 0, 0, 0, 32, 0, 32, 32, 0, |
1157 | | 0, 0, 0, 0, 0, 0, 0, 32, 32, 0, |
1158 | | 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1159 | | 0, 0, 0, 0, 32, 32, 0, 0, 0, 0, |
1160 | | 0, 0, 0, 32, 0, 32, 43, 43, 43, 43, |
1161 | | 43, 43, 0, 43, 43, 0, 0, 0, 0, 0, |
1162 | | 0, 0, 43, 43, 43, 43, 0, 0, 0, 0, |
1163 | | |
1164 | | 0, 0, 0, 0, 43, 43, 0, 43, 0, 0, |
1165 | | 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, |
1166 | | 0, 43, 43, 0, 0, 0, 0, 0, 0, 0, |
1167 | | 43, 0, 43, 44, 44, 44, 44, 44, 44, 0, |
1168 | | 44, 44, 0, 0, 0, 0, 0, 0, 0, 44, |
1169 | | 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, |
1170 | | 0, 44, 44, 0, 44, 0, 0, 0, 0, 0, |
1171 | | 0, 0, 0, 0, 0, 44, 44, 0, 44, 44, |
1172 | | 0, 0, 0, 0, 0, 0, 0, 44, 0, 44, |
1173 | | 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, |
1174 | | |
1175 | | 0, 0, 0, 0, 45, 0, 45, 45, 0, 0, |
1176 | | 0, 0, 0, 0, 0, 0, 45, 45, 0, 45, |
1177 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1178 | | 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, |
1179 | | 0, 0, 45, 0, 45, 46, 46, 0, 0, 0, |
1180 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, |
1181 | | 0, 46, 46, 0, 0, 0, 0, 0, 0, 0, |
1182 | | 0, 46, 46, 0, 46, 0, 0, 0, 0, 0, |
1183 | | 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, |
1184 | | 0, 0, 0, 0, 0, 0, 0, 46, 0, 46, |
1185 | | |
1186 | | 344, 344, 344, 344, 344, 344, 344, 344, 345, 345, |
1187 | | 345, 345, 345, 345, 345, 345, 346, 346, 346, 346, |
1188 | | 346, 346, 346, 346, 347, 347, 347, 347, 347, 347, |
1189 | | 347, 347, 348, 348, 348, 348, 348, 348, 348, 348, |
1190 | | 349, 349, 349, 349, 349, 349, 349, 349, 350, 350, |
1191 | | 350, 350, 350, 350, 350, 350, 351, 351, 351, 351, |
1192 | | 351, 351, 351, 351, 352, 352, 352, 352, 352, 352, |
1193 | | 352, 352, 353, 353, 353, 353, 353, 353, 353, 353, |
1194 | | 354, 354, 354, 354, 354, 354, 354, 354, 355, 355, |
1195 | | 0, 355, 355, 355, 355, 355, 356, 0, 0, 356, |
1196 | | |
1197 | | 357, 357, 357, 357, 358, 0, 0, 358, 359, 0, |
1198 | | 0, 359, 359, 360, 0, 360, 360, 361, 0, 361, |
1199 | | 361, 361, 361, 361, 361, 362, 362, 362, 362, 362, |
1200 | | 362, 362, 362, 363, 0, 0, 363, 363, 363, 363, |
1201 | | 363, 364, 364, 0, 364, 364, 364, 364, 364, 365, |
1202 | | 365, 0, 365, 365, 365, 365, 365, 366, 366, 0, |
1203 | | 366, 366, 366, 366, 366, 367, 0, 0, 367, 368, |
1204 | | 368, 0, 368, 368, 368, 368, 368, 369, 369, 0, |
1205 | | 369, 369, 369, 369, 369, 370, 0, 0, 370, 371, |
1206 | | 371, 0, 371, 371, 371, 371, 371, 372, 372, 0, |
1207 | | |
1208 | | 372, 372, 372, 372, 372, 375, 375, 0, 375, 375, |
1209 | | 375, 375, 375, 343, 343, 343, 343, 343, 343, 343, |
1210 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1211 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1212 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1213 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1214 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1215 | | 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, |
1216 | | 343 |
1217 | | } ; |
1218 | | |
1219 | | static const flex_int16_t yy_rule_linenum[63] = |
1220 | | { 0, |
1221 | | 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, |
1222 | | 209, 211, 218, 234, 236, 245, 258, 273, 280, 284, |
1223 | | 288, 291, 295, 299, 303, 304, 305, 306, 307, 313, |
1224 | | 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, |
1225 | | 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, |
1226 | | 334, 335, 336, 337, 338, 364, 375, 376, 377, 378, |
1227 | | 380, 456 |
1228 | | } ; |
1229 | | |
1230 | | /* The intent behind this definition is that it'll catch |
1231 | | * any uses of REJECT which flex missed. |
1232 | | */ |
1233 | | #define REJECT reject_used_but_not_detected |
1234 | | #define yymore() yymore_used_but_not_detected |
1235 | 0 | #define YY_MORE_ADJ 0 |
1236 | | #define YY_RESTORE_YY_MORE_OFFSET |
1237 | | #line 1 "/src/wireshark/epan/radius_dict.l" |
1238 | | |
1239 | | /* |
1240 | | * We want a reentrant scanner. |
1241 | | */ |
1242 | | /* |
1243 | | * We don't use input, so don't generate code for it. |
1244 | | */ |
1245 | | #define YY_NO_INPUT 1 |
1246 | | /* |
1247 | | * We don't use unput, so don't generate code for it. |
1248 | | */ |
1249 | | /* |
1250 | | * We don't read interactively from the terminal. |
1251 | | */ |
1252 | | /* |
1253 | | * We want to stop processing when we get to the end of the input. |
1254 | | */ |
1255 | | /* |
1256 | | * The language we're scanning is case-insensitive. |
1257 | | */ |
1258 | | /* |
1259 | | * The type for the state we keep for a scanner. |
1260 | | */ |
1261 | | /* |
1262 | | * We have to override the memory allocators so that we don't get |
1263 | | * "unused argument" warnings from the yyscanner argument (which |
1264 | | * we don't use, as we have a global memory allocator). |
1265 | | * |
1266 | | * We provide, as macros, our own versions of the routines generated by Flex, |
1267 | | * which just call malloc()/realloc()/free() (as the Flex versions do), |
1268 | | * discarding the extra argument. |
1269 | | */ |
1270 | | /* |
1271 | | * Prefix scanner routines with "Radius_" rather than "yy", so this scanner |
1272 | | * can coexist with other scanners. |
1273 | | */ |
1274 | | #line 62 "/src/wireshark/epan/radius_dict.l" |
1275 | | /* radius_dict.l |
1276 | | * |
1277 | | * RADIUS dictionary parser |
1278 | | * |
1279 | | * Wireshark - Network traffic analyzer |
1280 | | * By Gerald Combs <gerald@wireshark.org> |
1281 | | * Copyright 1998 Gerald Combs |
1282 | | * |
1283 | | * This program is free software; you can redistribute it and/or |
1284 | | * modify it under the terms of the GNU General Public License |
1285 | | * as published by the Free Software Foundation; either version 2 |
1286 | | * of the License, or (at your option) any later version. |
1287 | | * |
1288 | | * This program is distributed in the hope that it will be useful, |
1289 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1290 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1291 | | * GNU General Public License for more details. |
1292 | | * |
1293 | | * You should have received a copy of the GNU General Public License |
1294 | | * along with this program; if not, write to the Free Software |
1295 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
1296 | | */ |
1297 | | |
1298 | | #include <glib.h> |
1299 | | #include <stdio.h> |
1300 | | #include <stdlib.h> |
1301 | | #include <string.h> |
1302 | | #include <errno.h> |
1303 | | #include <epan/packet.h> |
1304 | | #include <epan/dissectors/packet-radius.h> |
1305 | | #include <wsutil/file_util.h> |
1306 | | |
1307 | | /* |
1308 | | * Disable diagnostics in the code generated by Flex. |
1309 | | */ |
1310 | | DIAG_OFF_FLEX() |
1311 | | |
1312 | | /* |
1313 | | * See |
1314 | | * |
1315 | | * http://freeradius.org/radiusd/man/dictionary.html |
1316 | | * |
1317 | | * for the format of RADIUS dictionary files. |
1318 | | * |
1319 | | * XXX - features not currently supported: |
1320 | | * |
1321 | | * integer64, ipv4prefix, combo-prefix, bool, size, decimal, |
1322 | | * timeval, struct, extended, long-extended, vsa, evs, vendor, |
1323 | | * cidr, uint{8,16,32,64}, int{8,16,32,64} as attribute types |
1324 | | * (some of these aren't documented); |
1325 | | * |
1326 | | * octets[N], where N is an integer, as an attribute type |
1327 | | * (not documented in the man page) - we support this as the octets |
1328 | | * type but do not enforce the length (e.g., with an expert info). |
1329 | | * FreeRADIUS uses the length for encoding; as we're just decoding, |
1330 | | * we take whatever is indicated in the AVP; |
1331 | | * |
1332 | | * internal, array, and virtual as attribute flags (not |
1333 | | * documented in the man page); |
1334 | | * |
1335 | | * We alter the dictionaries for TLVs by unwrapping them. It would be |
1336 | | * better to support the format as-is. We look up the TLVs by name; |
1337 | | * this probably doesn't work with the current master (pre-4.0) version |
1338 | | * of FreeRADIUS's dictionary files, because the vendor prefix was removed |
1339 | | * from the attributes, so they're not as likely to be unique. |
1340 | | * |
1341 | | * We should, perhaps, adopt FreeRADIUS's dictionary-parsing code in |
1342 | | * src/lib/dict.c and use that, rather than writing our own parser. |
1343 | | * See bug 13176. |
1344 | | */ |
1345 | 0 | #define YY_USER_INIT BEGIN WS_OUT; |
1346 | | |
1347 | | #define ECHO |
1348 | 0 | #define MAX_INCLUDE_DEPTH 10 |
1349 | | |
1350 | | typedef struct { |
1351 | | YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; |
1352 | | int include_stack_ptr; |
1353 | | |
1354 | | radius_dictionary_t* dict; |
1355 | | GHashTable* value_strings; /* GArray(value_string) by attribute name */ |
1356 | | |
1357 | | char* attr_name; |
1358 | | char* attr_id; |
1359 | | radius_attr_dissector_t* attr_type; |
1360 | | char* attr_vendor; |
1361 | | char* vendor_name; |
1362 | | uint32_t vendor_id; |
1363 | | unsigned vendor_type_octets; |
1364 | | unsigned vendor_length_octets; |
1365 | | bool vendor_has_flags; |
1366 | | char* value_repr; |
1367 | | unsigned encrypted; |
1368 | | bool has_tag; |
1369 | | bool concat; |
1370 | | char* current_vendor; |
1371 | | unsigned current_vendor_evs_type; |
1372 | | |
1373 | | int tlv_stack_ptr; |
1374 | | char* tlv_stack[MAX_INCLUDE_DEPTH]; |
1375 | | |
1376 | | char* directory; |
1377 | | char* fullpaths[MAX_INCLUDE_DEPTH]; |
1378 | | int linenums[MAX_INCLUDE_DEPTH]; |
1379 | | |
1380 | | GString* error; |
1381 | | } Radius_scanner_state_t; |
1382 | | |
1383 | | static void add_vendor(Radius_scanner_state_t* state, const char* name, uint32_t id, unsigned type_octets, unsigned length_octets, bool has_flags); |
1384 | | static bool add_attribute(Radius_scanner_state_t* state, const char*,const char*, radius_attr_dissector_t,const char*, unsigned, bool, bool, const char*); |
1385 | | static bool add_tlv(Radius_scanner_state_t* state, const char* name, const char* code, radius_attr_dissector_t type, const char* attr); |
1386 | | static void add_value(Radius_scanner_state_t* state, const char* attrib_name, const char* repr, uint32_t value); |
1387 | | |
1388 | | /* |
1389 | | * Sleazy hack to suppress compiler warnings in yy_fatal_error(). |
1390 | | */ |
1391 | 0 | #define YY_EXIT_FAILURE ((void)yyscanner, 2) |
1392 | | |
1393 | | /* |
1394 | | * Macros for the allocators, to discard the extra argument. |
1395 | | */ |
1396 | 0 | #define Radius_alloc(size, yyscanner) (void *)malloc(size) |
1397 | 0 | #define Radius_realloc(ptr, size, yyscanner) (void *)realloc((char *)(ptr), (size)) |
1398 | 0 | #define Radius_free(ptr, yyscanner) free((char *)ptr) |
1399 | | |
1400 | | #line 1401 "/work/build/epan/radius_dict.c" |
1401 | | /* Note: FreeRadius allows VENDOR, ATTRIBUTE and VALUE names to contain any non-blank character. |
1402 | | * Using a negated "blank character class" pattern below for those names fails for some reason |
1403 | | * so for now the patterns for each name type include those characters found for the corresponding |
1404 | | * name types in the FreeRadius dictionaries. |
1405 | | */ |
1406 | | |
1407 | | #line 1408 "/work/build/epan/radius_dict.c" |
1408 | | |
1409 | | #define INITIAL 0 |
1410 | 0 | #define WS_OUT 1 |
1411 | 0 | #define VENDOR 2 |
1412 | 0 | #define VENDOR_W_NAME 3 |
1413 | 0 | #define ATTR 4 |
1414 | 0 | #define ATTR_W_NAME 5 |
1415 | 0 | #define ATTR_W_ID 6 |
1416 | 0 | #define ATTR_W_TYPE 7 |
1417 | 0 | #define VALUE 8 |
1418 | 0 | #define VALUE_W_ATTR 9 |
1419 | 0 | #define VALUE_W_NAME 10 |
1420 | 0 | #define INCLUDE 11 |
1421 | 0 | #define JUNK 12 |
1422 | 0 | #define BEGIN_VENDOR 13 |
1423 | 0 | #define BEGIN_VENDOR_FORMAT 14 |
1424 | 0 | #define END_VENDOR 15 |
1425 | 0 | #define VENDOR_W_ID 16 |
1426 | 0 | #define VENDOR_W_FORMAT 17 |
1427 | 0 | #define VENDOR_W_TYPE_OCTETS 18 |
1428 | 0 | #define VENDOR_W_LENGTH_OCTETS 19 |
1429 | 0 | #define VENDOR_W_CONTINUATION 20 |
1430 | 0 | #define BEGIN_TLV 21 |
1431 | 0 | #define END_TLV 22 |
1432 | | |
1433 | | #ifndef YY_NO_UNISTD_H |
1434 | | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
1435 | | * down here because we want the user's section 1 to have been scanned first. |
1436 | | * The user has a chance to override it with an option. |
1437 | | */ |
1438 | | /* %if-c-only */ |
1439 | | #include <unistd.h> |
1440 | | /* %endif */ |
1441 | | /* %if-c++-only */ |
1442 | | /* %endif */ |
1443 | | #endif |
1444 | | |
1445 | | #define YY_EXTRA_TYPE Radius_scanner_state_t* |
1446 | | |
1447 | | /* %if-c-only Reentrant structure and macros (non-C++). */ |
1448 | | /* %if-reentrant */ |
1449 | | |
1450 | | /* Holds the entire state of the reentrant scanner. */ |
1451 | | struct yyguts_t |
1452 | | { |
1453 | | |
1454 | | /* User-defined. Not touched by flex. */ |
1455 | | YY_EXTRA_TYPE yyextra_r; |
1456 | | |
1457 | | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
1458 | | FILE *yyin_r, *yyout_r; |
1459 | | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
1460 | | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
1461 | | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
1462 | | char yy_hold_char; |
1463 | | int yy_n_chars; |
1464 | | int yyleng_r; |
1465 | | char *yy_c_buf_p; |
1466 | | int yy_init; |
1467 | | int yy_start; |
1468 | | int yy_did_buffer_switch_on_eof; |
1469 | | int yy_start_stack_ptr; |
1470 | | int yy_start_stack_depth; |
1471 | | int *yy_start_stack; |
1472 | | yy_state_type yy_last_accepting_state; |
1473 | | char* yy_last_accepting_cpos; |
1474 | | |
1475 | | int yylineno_r; |
1476 | | int yy_flex_debug_r; |
1477 | | |
1478 | | char *yytext_r; |
1479 | | int yy_more_flag; |
1480 | | int yy_more_len; |
1481 | | |
1482 | | }; /* end struct yyguts_t */ |
1483 | | |
1484 | | /* %if-c-only */ |
1485 | | |
1486 | | static int yy_init_globals ( yyscan_t yyscanner ); |
1487 | | |
1488 | | /* %endif */ |
1489 | | |
1490 | | /* %if-reentrant */ |
1491 | | |
1492 | | int yylex_init (yyscan_t* scanner); |
1493 | | |
1494 | | int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
1495 | | |
1496 | | /* %endif */ |
1497 | | |
1498 | | /* %endif End reentrant structures and macros. */ |
1499 | | |
1500 | | /* Accessor methods to globals. |
1501 | | These are made visible to non-reentrant scanners for convenience. */ |
1502 | | |
1503 | | int yylex_destroy ( yyscan_t yyscanner ); |
1504 | | |
1505 | | int yyget_debug ( yyscan_t yyscanner ); |
1506 | | |
1507 | | void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
1508 | | |
1509 | | YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
1510 | | |
1511 | | void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
1512 | | |
1513 | | FILE *yyget_in ( yyscan_t yyscanner ); |
1514 | | |
1515 | | void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
1516 | | |
1517 | | FILE *yyget_out ( yyscan_t yyscanner ); |
1518 | | |
1519 | | void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
1520 | | |
1521 | | int yyget_leng ( yyscan_t yyscanner ); |
1522 | | |
1523 | | char *yyget_text ( yyscan_t yyscanner ); |
1524 | | |
1525 | | int yyget_lineno ( yyscan_t yyscanner ); |
1526 | | |
1527 | | void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
1528 | | |
1529 | | int yyget_column ( yyscan_t yyscanner ); |
1530 | | |
1531 | | void yyset_column ( int _column_no , yyscan_t yyscanner ); |
1532 | | |
1533 | | /* %if-bison-bridge */ |
1534 | | /* %endif */ |
1535 | | |
1536 | | /* Macros after this point can all be overridden by user definitions in |
1537 | | * section 1. |
1538 | | */ |
1539 | | |
1540 | | #ifndef YY_SKIP_YYWRAP |
1541 | | #ifdef __cplusplus |
1542 | | extern "C" int yywrap ( yyscan_t yyscanner ); |
1543 | | #else |
1544 | | extern int yywrap ( yyscan_t yyscanner ); |
1545 | | #endif |
1546 | | #endif |
1547 | | |
1548 | | /* %not-for-header */ |
1549 | | #ifndef YY_NO_UNPUT |
1550 | | |
1551 | | #endif |
1552 | | /* %ok-for-header */ |
1553 | | |
1554 | | /* %endif */ |
1555 | | |
1556 | | #ifndef yytext_ptr |
1557 | | static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
1558 | | #endif |
1559 | | |
1560 | | #ifdef YY_NEED_STRLEN |
1561 | | static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
1562 | | #endif |
1563 | | |
1564 | | #ifndef YY_NO_INPUT |
1565 | | /* %if-c-only Standard (non-C++) definition */ |
1566 | | /* %not-for-header */ |
1567 | | #ifdef __cplusplus |
1568 | | static int yyinput ( yyscan_t yyscanner ); |
1569 | | #else |
1570 | | static int input ( yyscan_t yyscanner ); |
1571 | | #endif |
1572 | | /* %ok-for-header */ |
1573 | | |
1574 | | /* %endif */ |
1575 | | #endif |
1576 | | |
1577 | | /* %if-c-only */ |
1578 | | |
1579 | | /* %endif */ |
1580 | | |
1581 | | /* Amount of stuff to slurp up with each read. */ |
1582 | | #ifndef YY_READ_BUF_SIZE |
1583 | | #ifdef __ia64__ |
1584 | | /* On IA-64, the buffer size is 16k, not 8k */ |
1585 | | #define YY_READ_BUF_SIZE 16384 |
1586 | | #else |
1587 | 0 | #define YY_READ_BUF_SIZE 8192 |
1588 | | #endif /* __ia64__ */ |
1589 | | #endif |
1590 | | |
1591 | | /* Copy whatever the last rule matched to the standard output. */ |
1592 | | #ifndef ECHO |
1593 | | /* %if-c-only Standard (non-C++) definition */ |
1594 | | /* This used to be an fputs(), but since the string might contain NUL's, |
1595 | | * we now use fwrite(). |
1596 | | */ |
1597 | | #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
1598 | | /* %endif */ |
1599 | | /* %if-c++-only C++ definition */ |
1600 | | /* %endif */ |
1601 | | #endif |
1602 | | |
1603 | | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
1604 | | * is returned in "result". |
1605 | | */ |
1606 | | #ifndef YY_INPUT |
1607 | | #define YY_INPUT(buf,result,max_size) \ |
1608 | | /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ |
1609 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
1610 | 0 | { \ |
1611 | 0 | int c = '*'; \ |
1612 | 0 | int n; \ |
1613 | 0 | for ( n = 0; n < max_size && \ |
1614 | 0 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
1615 | 0 | buf[n] = (char) c; \ |
1616 | 0 | if ( c == '\n' ) \ |
1617 | 0 | buf[n++] = (char) c; \ |
1618 | 0 | if ( c == EOF && ferror( yyin ) ) \ |
1619 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1620 | 0 | result = n; \ |
1621 | 0 | } \ |
1622 | 0 | else \ |
1623 | 0 | { \ |
1624 | 0 | errno=0; \ |
1625 | 0 | while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
1626 | 0 | { \ |
1627 | 0 | if( errno != EINTR) \ |
1628 | 0 | { \ |
1629 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1630 | 0 | break; \ |
1631 | 0 | } \ |
1632 | 0 | errno=0; \ |
1633 | 0 | clearerr(yyin); \ |
1634 | 0 | } \ |
1635 | 0 | }\ |
1636 | | \ |
1637 | | /* %if-c++-only C++ definition \ */\ |
1638 | | /* %endif */ |
1639 | | |
1640 | | #endif |
1641 | | |
1642 | | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
1643 | | * we don't want an extra ';' after the "return" because that will cause |
1644 | | * some compilers to complain about unreachable statements. |
1645 | | */ |
1646 | | #ifndef yyterminate |
1647 | 0 | #define yyterminate() return YY_NULL |
1648 | | #endif |
1649 | | |
1650 | | /* Number of entries by which start-condition stack grows. */ |
1651 | | #ifndef YY_START_STACK_INCR |
1652 | | #define YY_START_STACK_INCR 25 |
1653 | | #endif |
1654 | | |
1655 | | /* Report a fatal error. */ |
1656 | | #ifndef YY_FATAL_ERROR |
1657 | | /* %if-c-only */ |
1658 | 0 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
1659 | | /* %endif */ |
1660 | | /* %if-c++-only */ |
1661 | | /* %endif */ |
1662 | | #endif |
1663 | | |
1664 | | /* %if-tables-serialization structures and prototypes */ |
1665 | | /* %not-for-header */ |
1666 | | /* %ok-for-header */ |
1667 | | |
1668 | | /* %not-for-header */ |
1669 | | /* %tables-yydmap generated elements */ |
1670 | | /* %endif */ |
1671 | | /* end tables serialization structures and prototypes */ |
1672 | | |
1673 | | /* %ok-for-header */ |
1674 | | |
1675 | | /* Default declaration of generated scanner - a define so the user can |
1676 | | * easily add parameters. |
1677 | | */ |
1678 | | #ifndef YY_DECL |
1679 | | #define YY_DECL_IS_OURS 1 |
1680 | | /* %if-c-only Standard (non-C++) definition */ |
1681 | | |
1682 | | extern int yylex (yyscan_t yyscanner); |
1683 | | |
1684 | | #define YY_DECL int yylex (yyscan_t yyscanner) |
1685 | | /* %endif */ |
1686 | | /* %if-c++-only C++ definition */ |
1687 | | /* %endif */ |
1688 | | #endif /* !YY_DECL */ |
1689 | | |
1690 | | /* Code executed at the beginning of each rule, after yytext and yyleng |
1691 | | * have been set up. |
1692 | | */ |
1693 | | #ifndef YY_USER_ACTION |
1694 | | #define YY_USER_ACTION |
1695 | | #endif |
1696 | | |
1697 | | /* Code executed at the end of each rule. */ |
1698 | | #ifndef YY_BREAK |
1699 | 0 | #define YY_BREAK /*LINTED*/break; |
1700 | | #endif |
1701 | | |
1702 | | /* %% [6.0] YY_RULE_SETUP definition goes here */ |
1703 | | #define YY_RULE_SETUP \ |
1704 | | YY_USER_ACTION |
1705 | | |
1706 | | /* %not-for-header */ |
1707 | | /** The main scanner function which does all the work. |
1708 | | */ |
1709 | | YY_DECL |
1710 | 0 | { |
1711 | 0 | yy_state_type yy_current_state; |
1712 | 0 | char *yy_cp, *yy_bp; |
1713 | 0 | int yy_act; |
1714 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1715 | |
|
1716 | 0 | if ( !yyg->yy_init ) |
1717 | 0 | { |
1718 | 0 | yyg->yy_init = 1; |
1719 | |
|
1720 | 0 | #ifdef YY_USER_INIT |
1721 | 0 | YY_USER_INIT; |
1722 | 0 | #endif |
1723 | |
|
1724 | 0 | if ( ! yyg->yy_start ) |
1725 | 0 | yyg->yy_start = 1; /* first start state */ |
1726 | |
|
1727 | 0 | if ( ! yyin ) |
1728 | | /* %if-c-only */ |
1729 | 0 | yyin = stdin; |
1730 | | /* %endif */ |
1731 | | /* %if-c++-only */ |
1732 | | /* %endif */ |
1733 | |
|
1734 | 0 | if ( ! yyout ) |
1735 | | /* %if-c-only */ |
1736 | 0 | yyout = stdout; |
1737 | | /* %endif */ |
1738 | | /* %if-c++-only */ |
1739 | | /* %endif */ |
1740 | |
|
1741 | 0 | if ( ! YY_CURRENT_BUFFER ) { |
1742 | 0 | yyensure_buffer_stack (yyscanner); |
1743 | 0 | YY_CURRENT_BUFFER_LVALUE = |
1744 | 0 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
1745 | 0 | } |
1746 | |
|
1747 | 0 | yy_load_buffer_state( yyscanner ); |
1748 | 0 | } |
1749 | |
|
1750 | 0 | { |
1751 | | /* %% [7.0] user's declarations go here */ |
1752 | 0 | #line 196 "/src/wireshark/epan/radius_dict.l" |
1753 | |
|
1754 | 0 | #line 1755 "/work/build/epan/radius_dict.c" |
1755 | |
|
1756 | 0 | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
1757 | 0 | { |
1758 | | /* %% [8.0] yymore()-related code goes here */ |
1759 | 0 | yy_cp = yyg->yy_c_buf_p; |
1760 | | |
1761 | | /* Support of yytext. */ |
1762 | 0 | *yy_cp = yyg->yy_hold_char; |
1763 | | |
1764 | | /* yy_bp points to the position in yy_ch_buf of the start of |
1765 | | * the current run. |
1766 | | */ |
1767 | 0 | yy_bp = yy_cp; |
1768 | | |
1769 | | /* %% [9.0] code to set up and find next match goes here */ |
1770 | 0 | yy_current_state = yyg->yy_start; |
1771 | 0 | yy_match: |
1772 | 0 | do |
1773 | 0 | { |
1774 | 0 | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
1775 | 0 | if ( yy_accept[yy_current_state] ) |
1776 | 0 | { |
1777 | 0 | yyg->yy_last_accepting_state = yy_current_state; |
1778 | 0 | yyg->yy_last_accepting_cpos = yy_cp; |
1779 | 0 | } |
1780 | 0 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1781 | 0 | { |
1782 | 0 | yy_current_state = (int) yy_def[yy_current_state]; |
1783 | 0 | if ( yy_current_state >= 344 ) |
1784 | 0 | yy_c = yy_meta[yy_c]; |
1785 | 0 | } |
1786 | 0 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
1787 | 0 | ++yy_cp; |
1788 | 0 | } |
1789 | 0 | while ( yy_current_state != 343 ); |
1790 | 0 | yy_cp = yyg->yy_last_accepting_cpos; |
1791 | 0 | yy_current_state = yyg->yy_last_accepting_state; |
1792 | |
|
1793 | 0 | yy_find_action: |
1794 | | /* %% [10.0] code to find the action number goes here */ |
1795 | 0 | yy_act = yy_accept[yy_current_state]; |
1796 | |
|
1797 | 0 | YY_DO_BEFORE_ACTION; |
1798 | | |
1799 | | /* %% [11.0] code for yylineno update goes here */ |
1800 | |
|
1801 | 0 | do_action: /* This label is used only to access EOF actions. */ |
1802 | | |
1803 | | /* %% [12.0] debug code goes here */ |
1804 | 0 | if ( yy_flex_debug ) |
1805 | 0 | { |
1806 | 0 | if ( yy_act == 0 ) |
1807 | 0 | fprintf( stderr, "--scanner backing up\n" ); |
1808 | 0 | else if ( yy_act < 63 ) |
1809 | 0 | fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", |
1810 | 0 | (long)yy_rule_linenum[yy_act], yytext ); |
1811 | 0 | else if ( yy_act == 63 ) |
1812 | 0 | fprintf( stderr, "--accepting default rule (\"%s\")\n", |
1813 | 0 | yytext ); |
1814 | 0 | else if ( yy_act == 64 ) |
1815 | 0 | fprintf( stderr, "--(end of buffer or a NUL)\n" ); |
1816 | 0 | else |
1817 | 0 | fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); |
1818 | 0 | } |
1819 | |
|
1820 | 0 | switch ( yy_act ) |
1821 | 0 | { /* beginning of action switch */ |
1822 | | /* %% [13.0] actions go here */ |
1823 | 0 | case 0: /* must back up */ |
1824 | | /* undo the effects of YY_DO_BEFORE_ACTION */ |
1825 | 0 | *yy_cp = yyg->yy_hold_char; |
1826 | 0 | yy_cp = yyg->yy_last_accepting_cpos; |
1827 | 0 | yy_current_state = yyg->yy_last_accepting_state; |
1828 | 0 | goto yy_find_action; |
1829 | | |
1830 | 0 | case 1: |
1831 | 0 | YY_RULE_SETUP |
1832 | 0 | #line 197 "/src/wireshark/epan/radius_dict.l" |
1833 | 0 | ; |
1834 | 0 | YY_BREAK |
1835 | 0 | case 2: |
1836 | 0 | YY_RULE_SETUP |
1837 | 0 | #line 198 "/src/wireshark/epan/radius_dict.l" |
1838 | 0 | ; |
1839 | 0 | YY_BREAK |
1840 | 0 | case 3: |
1841 | 0 | YY_RULE_SETUP |
1842 | 0 | #line 200 "/src/wireshark/epan/radius_dict.l" |
1843 | 0 | ; |
1844 | 0 | YY_BREAK |
1845 | 0 | case 4: |
1846 | 0 | YY_RULE_SETUP |
1847 | 0 | #line 202 "/src/wireshark/epan/radius_dict.l" |
1848 | 0 | { BEGIN VENDOR; } |
1849 | 0 | YY_BREAK |
1850 | 0 | case 5: |
1851 | 0 | YY_RULE_SETUP |
1852 | 0 | #line 203 "/src/wireshark/epan/radius_dict.l" |
1853 | 0 | { BEGIN ATTR; } |
1854 | 0 | YY_BREAK |
1855 | 0 | case 6: |
1856 | 0 | YY_RULE_SETUP |
1857 | 0 | #line 204 "/src/wireshark/epan/radius_dict.l" |
1858 | 0 | { BEGIN VALUE; } |
1859 | 0 | YY_BREAK |
1860 | 0 | case 7: |
1861 | 0 | YY_RULE_SETUP |
1862 | 0 | #line 205 "/src/wireshark/epan/radius_dict.l" |
1863 | 0 | { BEGIN INCLUDE; } |
1864 | 0 | YY_BREAK |
1865 | 0 | case 8: |
1866 | 0 | YY_RULE_SETUP |
1867 | 0 | #line 206 "/src/wireshark/epan/radius_dict.l" |
1868 | 0 | { BEGIN BEGIN_VENDOR; } |
1869 | 0 | YY_BREAK |
1870 | 0 | case 9: |
1871 | 0 | YY_RULE_SETUP |
1872 | 0 | #line 207 "/src/wireshark/epan/radius_dict.l" |
1873 | 0 | { BEGIN END_VENDOR; } |
1874 | 0 | YY_BREAK |
1875 | 0 | case 10: |
1876 | 0 | YY_RULE_SETUP |
1877 | 0 | #line 208 "/src/wireshark/epan/radius_dict.l" |
1878 | 0 | { BEGIN BEGIN_TLV; } |
1879 | 0 | YY_BREAK |
1880 | 0 | case 11: |
1881 | 0 | YY_RULE_SETUP |
1882 | 0 | #line 209 "/src/wireshark/epan/radius_dict.l" |
1883 | 0 | { BEGIN END_TLV; } |
1884 | 0 | YY_BREAK |
1885 | 0 | case 12: |
1886 | 0 | YY_RULE_SETUP |
1887 | 0 | #line 211 "/src/wireshark/epan/radius_dict.l" |
1888 | 0 | { |
1889 | 0 | if (yyextra->current_vendor) { |
1890 | 0 | g_free(yyextra->current_vendor); |
1891 | 0 | } |
1892 | 0 | yyextra->current_vendor = g_strdup(yytext); |
1893 | 0 | BEGIN BEGIN_VENDOR_FORMAT; |
1894 | 0 | } |
1895 | 0 | YY_BREAK |
1896 | 0 | case 13: |
1897 | 0 | YY_RULE_SETUP |
1898 | 0 | #line 218 "/src/wireshark/epan/radius_dict.l" |
1899 | 0 | { |
1900 | 0 | if (strcmp(yytext, "format=Extended-Vendor-Specific-1") == 0) { |
1901 | 0 | yyextra->current_vendor_evs_type = 241; |
1902 | 0 | } else if(strcmp(yytext, "format=Extended-Vendor-Specific-2") == 0) { |
1903 | 0 | yyextra->current_vendor_evs_type = 242; |
1904 | 0 | } else if(strcmp(yytext, "format=Extended-Vendor-Specific-3") == 0) { |
1905 | 0 | yyextra->current_vendor_evs_type = 243; |
1906 | 0 | } else if(strcmp(yytext, "format=Extended-Vendor-Specific-4") == 0) { |
1907 | 0 | yyextra->current_vendor_evs_type = 244; |
1908 | 0 | } else if(strcmp(yytext, "format=Extended-Vendor-Specific-5") == 0) { |
1909 | 0 | yyextra->current_vendor_evs_type = 245; |
1910 | 0 | } else if(strcmp(yytext, "format=Extended-Vendor-Specific-6") == 0) { |
1911 | 0 | yyextra->current_vendor_evs_type = 246; |
1912 | 0 | } |
1913 | 0 | BEGIN WS_OUT; |
1914 | 0 | } |
1915 | 0 | YY_BREAK |
1916 | 0 | case 14: |
1917 | | /* rule 14 can match eol */ |
1918 | 0 | YY_RULE_SETUP |
1919 | 0 | #line 234 "/src/wireshark/epan/radius_dict.l" |
1920 | 0 | {BEGIN WS_OUT;} |
1921 | 0 | YY_BREAK |
1922 | 0 | case 15: |
1923 | 0 | YY_RULE_SETUP |
1924 | 0 | #line 236 "/src/wireshark/epan/radius_dict.l" |
1925 | 0 | { |
1926 | 0 | if (yyextra->current_vendor) { |
1927 | 0 | g_free(yyextra->current_vendor); |
1928 | 0 | yyextra->current_vendor = NULL; |
1929 | 0 | } |
1930 | 0 | yyextra->current_vendor_evs_type = 0; |
1931 | 0 | BEGIN WS_OUT; |
1932 | 0 | } |
1933 | 0 | YY_BREAK |
1934 | 0 | case 16: |
1935 | 0 | YY_RULE_SETUP |
1936 | 0 | #line 245 "/src/wireshark/epan/radius_dict.l" |
1937 | 0 | { |
1938 | 0 | yyextra->tlv_stack_ptr++; |
1939 | 0 | if ( yyextra->tlv_stack_ptr >= MAX_INCLUDE_DEPTH ) { |
1940 | 0 | g_string_append_printf(yyextra->error, "TLV %s nested too deeply in %s:%i\n", |
1941 | 0 | yytext, yyextra->fullpaths[yyextra->include_stack_ptr], |
1942 | 0 | yyextra->linenums[yyextra->include_stack_ptr]); |
1943 | 0 | yyterminate(); |
1944 | 0 | } |
1945 | 0 | yyextra->tlv_stack[yyextra->tlv_stack_ptr] = g_strdup(yytext); |
1946 | | /* XXX - Do we really need the BEGIN-TLV? We could do this after |
1947 | | * encountering a tlv type. */ |
1948 | 0 | BEGIN WS_OUT; |
1949 | 0 | } |
1950 | 0 | YY_BREAK |
1951 | 0 | case 17: |
1952 | 0 | YY_RULE_SETUP |
1953 | 0 | #line 258 "/src/wireshark/epan/radius_dict.l" |
1954 | 0 | { |
1955 | 0 | if (yyextra->tlv_stack[yyextra->tlv_stack_ptr]) { |
1956 | 0 | g_free(yyextra->tlv_stack[yyextra->tlv_stack_ptr]); |
1957 | 0 | yyextra->tlv_stack[yyextra->tlv_stack_ptr] = NULL; |
1958 | 0 | } |
1959 | 0 | if ( --yyextra->tlv_stack_ptr < 0 ) { |
1960 | 0 | g_string_append_printf(yyextra->error, "END-TLV would go below stack level 0 in %s:%i\n", |
1961 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr], |
1962 | 0 | yyextra->linenums[yyextra->include_stack_ptr]); |
1963 | 0 | yyterminate(); |
1964 | 0 | } |
1965 | | /* XXX - We could parse yytext and see if it matches */ |
1966 | 0 | BEGIN WS_OUT; |
1967 | 0 | } |
1968 | 0 | YY_BREAK |
1969 | 0 | case 18: |
1970 | 0 | YY_RULE_SETUP |
1971 | 0 | #line 273 "/src/wireshark/epan/radius_dict.l" |
1972 | 0 | { |
1973 | 0 | yyextra->vendor_name = g_strdup(yytext); |
1974 | 0 | yyextra->vendor_type_octets = 1; |
1975 | 0 | yyextra->vendor_length_octets = 1; |
1976 | 0 | yyextra->vendor_has_flags = false; |
1977 | 0 | BEGIN VENDOR_W_NAME; |
1978 | 0 | } |
1979 | 0 | YY_BREAK |
1980 | 0 | case 19: |
1981 | 0 | YY_RULE_SETUP |
1982 | 0 | #line 280 "/src/wireshark/epan/radius_dict.l" |
1983 | 0 | { |
1984 | 0 | yyextra->vendor_id = (uint32_t) strtoul(yytext,NULL,10); |
1985 | 0 | BEGIN VENDOR_W_ID; |
1986 | 0 | } |
1987 | 0 | YY_BREAK |
1988 | 0 | case 20: |
1989 | 0 | YY_RULE_SETUP |
1990 | 0 | #line 284 "/src/wireshark/epan/radius_dict.l" |
1991 | 0 | { |
1992 | 0 | yyextra->vendor_id = (uint32_t) strtoul(yytext,NULL,16); |
1993 | 0 | BEGIN VENDOR_W_ID; |
1994 | 0 | } |
1995 | 0 | YY_BREAK |
1996 | 0 | case 21: |
1997 | 0 | YY_RULE_SETUP |
1998 | 0 | #line 288 "/src/wireshark/epan/radius_dict.l" |
1999 | 0 | { |
2000 | 0 | BEGIN VENDOR_W_FORMAT; |
2001 | 0 | } |
2002 | 0 | YY_BREAK |
2003 | 0 | case 22: |
2004 | 0 | YY_RULE_SETUP |
2005 | 0 | #line 291 "/src/wireshark/epan/radius_dict.l" |
2006 | 0 | { |
2007 | 0 | yyextra->vendor_type_octets = (unsigned) strtoul(yytext,NULL,10); |
2008 | 0 | BEGIN VENDOR_W_TYPE_OCTETS; |
2009 | 0 | } |
2010 | 0 | YY_BREAK |
2011 | 0 | case 23: |
2012 | 0 | YY_RULE_SETUP |
2013 | 0 | #line 295 "/src/wireshark/epan/radius_dict.l" |
2014 | 0 | { |
2015 | 0 | yyextra->vendor_length_octets = (unsigned) strtoul(yytext+1,NULL,10); |
2016 | 0 | BEGIN VENDOR_W_LENGTH_OCTETS; |
2017 | 0 | } |
2018 | 0 | YY_BREAK |
2019 | 0 | case 24: |
2020 | 0 | YY_RULE_SETUP |
2021 | 0 | #line 299 "/src/wireshark/epan/radius_dict.l" |
2022 | 0 | { |
2023 | 0 | yyextra->vendor_has_flags = true; |
2024 | 0 | BEGIN VENDOR_W_CONTINUATION; |
2025 | 0 | } |
2026 | 0 | YY_BREAK |
2027 | 0 | case 25: |
2028 | | /* rule 25 can match eol */ |
2029 | 0 | #line 304 "/src/wireshark/epan/radius_dict.l" |
2030 | 0 | case 26: |
2031 | | /* rule 26 can match eol */ |
2032 | 0 | #line 305 "/src/wireshark/epan/radius_dict.l" |
2033 | 0 | case 27: |
2034 | | /* rule 27 can match eol */ |
2035 | 0 | #line 306 "/src/wireshark/epan/radius_dict.l" |
2036 | 0 | case 28: |
2037 | | /* rule 28 can match eol */ |
2038 | 0 | #line 307 "/src/wireshark/epan/radius_dict.l" |
2039 | 0 | case 29: |
2040 | | /* rule 29 can match eol */ |
2041 | 0 | YY_RULE_SETUP |
2042 | 0 | #line 307 "/src/wireshark/epan/radius_dict.l" |
2043 | 0 | { |
2044 | 0 | add_vendor(yyextra, yyextra->vendor_name, yyextra->vendor_id, yyextra->vendor_type_octets, yyextra->vendor_length_octets, yyextra->vendor_has_flags); |
2045 | 0 | g_free(yyextra->vendor_name); |
2046 | 0 | BEGIN WS_OUT; |
2047 | 0 | } |
2048 | 0 | YY_BREAK |
2049 | 0 | case 30: |
2050 | 0 | YY_RULE_SETUP |
2051 | 0 | #line 313 "/src/wireshark/epan/radius_dict.l" |
2052 | 0 | { yyextra->attr_name = g_strdup(yytext); yyextra->encrypted = 0; yyextra->has_tag = false; yyextra->concat = false; BEGIN ATTR_W_NAME; } |
2053 | 0 | YY_BREAK |
2054 | 0 | case 31: |
2055 | 0 | YY_RULE_SETUP |
2056 | 0 | #line 314 "/src/wireshark/epan/radius_dict.l" |
2057 | 0 | { yyextra->attr_id = g_strdup(yytext); BEGIN ATTR_W_ID;} |
2058 | 0 | YY_BREAK |
2059 | 0 | case 32: |
2060 | 0 | YY_RULE_SETUP |
2061 | 0 | #line 315 "/src/wireshark/epan/radius_dict.l" |
2062 | 0 | { yyextra->attr_id = ws_strdup_printf("%u",(int)strtoul(yytext,NULL,16)); BEGIN ATTR_W_ID;} |
2063 | 0 | YY_BREAK |
2064 | 0 | case 33: |
2065 | 0 | YY_RULE_SETUP |
2066 | 0 | #line 316 "/src/wireshark/epan/radius_dict.l" |
2067 | 0 | { yyextra->attr_type = radius_integer; BEGIN ATTR_W_TYPE; } |
2068 | 0 | YY_BREAK |
2069 | 0 | case 34: |
2070 | 0 | YY_RULE_SETUP |
2071 | 0 | #line 317 "/src/wireshark/epan/radius_dict.l" |
2072 | 0 | { yyextra->attr_type = radius_string; BEGIN ATTR_W_TYPE; } |
2073 | 0 | YY_BREAK |
2074 | 0 | case 35: |
2075 | 0 | YY_RULE_SETUP |
2076 | 0 | #line 318 "/src/wireshark/epan/radius_dict.l" |
2077 | 0 | { yyextra->attr_type = radius_octets; BEGIN ATTR_W_TYPE; } |
2078 | 0 | YY_BREAK |
2079 | 0 | case 36: |
2080 | 0 | YY_RULE_SETUP |
2081 | 0 | #line 319 "/src/wireshark/epan/radius_dict.l" |
2082 | 0 | { yyextra->attr_type = radius_ipaddr; BEGIN ATTR_W_TYPE; } |
2083 | 0 | YY_BREAK |
2084 | 0 | case 37: |
2085 | 0 | YY_RULE_SETUP |
2086 | 0 | #line 320 "/src/wireshark/epan/radius_dict.l" |
2087 | 0 | { yyextra->attr_type = radius_ipv6addr; BEGIN ATTR_W_TYPE; } |
2088 | 0 | YY_BREAK |
2089 | 0 | case 38: |
2090 | 0 | YY_RULE_SETUP |
2091 | 0 | #line 321 "/src/wireshark/epan/radius_dict.l" |
2092 | 0 | { yyextra->attr_type = radius_ipv6prefix; BEGIN ATTR_W_TYPE; } |
2093 | 0 | YY_BREAK |
2094 | 0 | case 39: |
2095 | 0 | YY_RULE_SETUP |
2096 | 0 | #line 322 "/src/wireshark/epan/radius_dict.l" |
2097 | 0 | { yyextra->attr_type = radius_ipxnet; BEGIN ATTR_W_TYPE; } |
2098 | 0 | YY_BREAK |
2099 | 0 | case 40: |
2100 | 0 | YY_RULE_SETUP |
2101 | 0 | #line 323 "/src/wireshark/epan/radius_dict.l" |
2102 | 0 | { yyextra->attr_type = radius_date; BEGIN ATTR_W_TYPE; } |
2103 | 0 | YY_BREAK |
2104 | 0 | case 41: |
2105 | 0 | YY_RULE_SETUP |
2106 | 0 | #line 324 "/src/wireshark/epan/radius_dict.l" |
2107 | 0 | { yyextra->attr_type = radius_abinary; BEGIN ATTR_W_TYPE; } |
2108 | 0 | YY_BREAK |
2109 | 0 | case 42: |
2110 | 0 | YY_RULE_SETUP |
2111 | 0 | #line 325 "/src/wireshark/epan/radius_dict.l" |
2112 | 0 | { yyextra->attr_type = radius_ether; BEGIN ATTR_W_TYPE; } |
2113 | 0 | YY_BREAK |
2114 | 0 | case 43: |
2115 | 0 | YY_RULE_SETUP |
2116 | 0 | #line 326 "/src/wireshark/epan/radius_dict.l" |
2117 | 0 | { yyextra->attr_type = radius_ifid; BEGIN ATTR_W_TYPE; } |
2118 | 0 | YY_BREAK |
2119 | 0 | case 44: |
2120 | 0 | YY_RULE_SETUP |
2121 | 0 | #line 327 "/src/wireshark/epan/radius_dict.l" |
2122 | 0 | { yyextra->attr_type = radius_integer; BEGIN ATTR_W_TYPE; } |
2123 | 0 | YY_BREAK |
2124 | 0 | case 45: |
2125 | 0 | YY_RULE_SETUP |
2126 | 0 | #line 328 "/src/wireshark/epan/radius_dict.l" |
2127 | 0 | { yyextra->attr_type = radius_integer; BEGIN ATTR_W_TYPE; } |
2128 | 0 | YY_BREAK |
2129 | 0 | case 46: |
2130 | 0 | YY_RULE_SETUP |
2131 | 0 | #line 329 "/src/wireshark/epan/radius_dict.l" |
2132 | 0 | { yyextra->attr_type = radius_signed; BEGIN ATTR_W_TYPE; } |
2133 | 0 | YY_BREAK |
2134 | 0 | case 47: |
2135 | 0 | YY_RULE_SETUP |
2136 | 0 | #line 330 "/src/wireshark/epan/radius_dict.l" |
2137 | 0 | { yyextra->attr_type = radius_combo_ip; BEGIN ATTR_W_TYPE; } |
2138 | 0 | YY_BREAK |
2139 | 0 | case 48: |
2140 | 0 | YY_RULE_SETUP |
2141 | 0 | #line 331 "/src/wireshark/epan/radius_dict.l" |
2142 | 0 | { yyextra->attr_type = radius_tlv; BEGIN ATTR_W_TYPE; } |
2143 | 0 | YY_BREAK |
2144 | 0 | case 49: |
2145 | 0 | YY_RULE_SETUP |
2146 | 0 | #line 332 "/src/wireshark/epan/radius_dict.l" |
2147 | 0 | { yyextra->attr_type = radius_octets; BEGIN ATTR_W_TYPE; } |
2148 | 0 | YY_BREAK |
2149 | 0 | case 50: |
2150 | 0 | YY_RULE_SETUP |
2151 | 0 | #line 333 "/src/wireshark/epan/radius_dict.l" |
2152 | 0 | { yyextra->attr_type = radius_octets; BEGIN ATTR_W_TYPE; } |
2153 | 0 | YY_BREAK |
2154 | 0 | case 51: |
2155 | 0 | YY_RULE_SETUP |
2156 | 0 | #line 334 "/src/wireshark/epan/radius_dict.l" |
2157 | 0 | { yyextra->has_tag = true; } |
2158 | 0 | YY_BREAK |
2159 | 0 | case 52: |
2160 | 0 | YY_RULE_SETUP |
2161 | 0 | #line 335 "/src/wireshark/epan/radius_dict.l" |
2162 | 0 | { yyextra->encrypted = (unsigned) strtoul(yytext+8,NULL,10); } |
2163 | 0 | YY_BREAK |
2164 | 0 | case 53: |
2165 | 0 | YY_RULE_SETUP |
2166 | 0 | #line 336 "/src/wireshark/epan/radius_dict.l" |
2167 | 0 | { yyextra->concat = true; } |
2168 | 0 | YY_BREAK |
2169 | 0 | case 54: |
2170 | 0 | YY_RULE_SETUP |
2171 | 0 | #line 337 "/src/wireshark/epan/radius_dict.l" |
2172 | 0 | ; |
2173 | 0 | YY_BREAK |
2174 | 0 | case 55: |
2175 | 0 | YY_RULE_SETUP |
2176 | 0 | #line 338 "/src/wireshark/epan/radius_dict.l" |
2177 | 0 | { |
2178 | | /* |
2179 | | * Support for "ATTRIBUTE name oid type vendor", where the token |
2180 | | * following the type matches neither has_tag, concat, nor encrypt={1,2,3}, |
2181 | | * but is a sequence of digits, lower-case letters, underscores, |
2182 | | * and hyphens. |
2183 | | * |
2184 | | * We mark this as a vendor-specific attribute (VSA), with the token |
2185 | | * following the type being the vendor name; this notation is deprecated |
2186 | | * in favor of BEGIN-VENDOR/END-VENDOR blocks. |
2187 | | */ |
2188 | 0 | bool attribute_ok; |
2189 | |
|
2190 | 0 | yyextra->attr_vendor = g_strdup(yytext); |
2191 | 0 | attribute_ok = add_attribute(yyextra, yyextra->attr_name, yyextra->attr_id, yyextra->attr_type, yyextra->attr_vendor, yyextra->encrypted, yyextra->has_tag, yyextra->concat, yyextra->tlv_stack[yyextra->tlv_stack_ptr]); |
2192 | 0 | g_free(yyextra->attr_id); |
2193 | 0 | g_free(yyextra->attr_vendor); |
2194 | 0 | g_free(yyextra->attr_name); |
2195 | 0 | yyextra->attr_id = NULL; |
2196 | 0 | yyextra->attr_vendor = NULL; |
2197 | 0 | yyextra->attr_name = NULL; |
2198 | 0 | if (attribute_ok) |
2199 | 0 | BEGIN WS_OUT; |
2200 | 0 | else |
2201 | 0 | BEGIN JUNK; |
2202 | 0 | } |
2203 | 0 | YY_BREAK |
2204 | 0 | case 56: |
2205 | | /* rule 56 can match eol */ |
2206 | 0 | YY_RULE_SETUP |
2207 | 0 | #line 364 "/src/wireshark/epan/radius_dict.l" |
2208 | 0 | { |
2209 | 0 | add_attribute(yyextra, yyextra->attr_name, yyextra->attr_id, yyextra->attr_type, yyextra->current_vendor, yyextra->encrypted, yyextra->has_tag, yyextra->concat, yyextra->tlv_stack[yyextra->tlv_stack_ptr]); |
2210 | 0 | g_free(yyextra->attr_id); |
2211 | 0 | g_free(yyextra->attr_name); |
2212 | 0 | yyextra->linenums[yyextra->include_stack_ptr]++; |
2213 | 0 | yyextra->has_tag = false; |
2214 | 0 | yyextra->encrypted=false; |
2215 | 0 | yyextra->concat = false; |
2216 | 0 | BEGIN WS_OUT; |
2217 | 0 | } |
2218 | 0 | YY_BREAK |
2219 | 0 | case 57: |
2220 | 0 | YY_RULE_SETUP |
2221 | 0 | #line 375 "/src/wireshark/epan/radius_dict.l" |
2222 | 0 | { yyextra->attr_name = g_strdup(yytext); BEGIN VALUE_W_ATTR; } |
2223 | 0 | YY_BREAK |
2224 | 0 | case 58: |
2225 | | /* rule 58 can match eol */ |
2226 | 0 | YY_RULE_SETUP |
2227 | 0 | #line 376 "/src/wireshark/epan/radius_dict.l" |
2228 | 0 | { yyextra->value_repr = g_strdup(yytext); BEGIN VALUE_W_NAME; } |
2229 | 0 | YY_BREAK |
2230 | 0 | case 59: |
2231 | 0 | YY_RULE_SETUP |
2232 | 0 | #line 377 "/src/wireshark/epan/radius_dict.l" |
2233 | 0 | { add_value(yyextra, yyextra->attr_name,yyextra->value_repr, (uint32_t) strtoul(yytext,NULL,10)); g_free(yyextra->attr_name); g_free(yyextra->value_repr); BEGIN WS_OUT;} |
2234 | 0 | YY_BREAK |
2235 | 0 | case 60: |
2236 | 0 | YY_RULE_SETUP |
2237 | 0 | #line 378 "/src/wireshark/epan/radius_dict.l" |
2238 | 0 | { add_value(yyextra, yyextra->attr_name,yyextra->value_repr, (uint32_t) strtoul(yytext,NULL,16)); g_free(yyextra->attr_name); g_free(yyextra->value_repr); BEGIN WS_OUT;} |
2239 | 0 | YY_BREAK |
2240 | 0 | case 61: |
2241 | 0 | YY_RULE_SETUP |
2242 | 0 | #line 380 "/src/wireshark/epan/radius_dict.l" |
2243 | 0 | { |
2244 | 0 | if ( yyextra->include_stack_ptr >= MAX_INCLUDE_DEPTH ) { |
2245 | 0 | g_string_append_printf(yyextra->error, "$INCLUDE files nested too deeply\n"); |
2246 | 0 | yyterminate(); |
2247 | 0 | } |
2248 | | |
2249 | 0 | yyextra->include_stack[yyextra->include_stack_ptr++] = YY_CURRENT_BUFFER; |
2250 | |
|
2251 | 0 | if (g_path_is_absolute(yytext)) { |
2252 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr] = ws_strdup(yytext); |
2253 | 0 | } else { |
2254 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr] = g_build_filename(yyextra->directory, yytext, NULL); |
2255 | 0 | } |
2256 | |
|
2257 | 0 | FILE *old_yyin = yyin; |
2258 | 0 | yyin = ws_fopen( yyextra->fullpaths[yyextra->include_stack_ptr], "r" ); |
2259 | |
|
2260 | 0 | if (!yyin) { |
2261 | 0 | if (errno) { |
2262 | 0 | g_string_append_printf(yyextra->error, |
2263 | 0 | "Could not open file: '%s', error: %s\n", |
2264 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr], |
2265 | 0 | g_strerror(errno) ); |
2266 | 0 | } else { |
2267 | 0 | g_string_append_printf(yyextra->error, |
2268 | 0 | "Could not open file: '%s', no errno\n", |
2269 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr]); |
2270 | 0 | } |
2271 | 0 | g_free(yyextra->fullpaths[yyextra->include_stack_ptr]); |
2272 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr] = NULL; |
2273 | 0 | yyextra->include_stack_ptr--; |
2274 | 0 | yyin = old_yyin; |
2275 | 0 | } else { |
2276 | 0 | if (g_path_is_absolute(yytext)) { |
2277 | 0 | g_free(yyextra->directory); |
2278 | | /* |
2279 | | * Switch the directory for any relative $INCLUDEs in |
2280 | | * the new file. |
2281 | | * XXX - Follow symlinks (#6466)? FreeRADIUS doesn't. |
2282 | | * Use g_file_test() + g_file_read_link() to do so. |
2283 | | * In that case, make sure to follow symlinks when |
2284 | | * saving the fullpath too, for restoring the directory |
2285 | | * at EOF. |
2286 | | */ |
2287 | 0 | yyextra->directory = g_path_get_dirname(yytext); |
2288 | 0 | } |
2289 | 0 | yyextra->linenums[yyextra->include_stack_ptr] = 1; |
2290 | 0 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner), yyscanner); |
2291 | 0 | } |
2292 | | |
2293 | |
|
2294 | 0 | BEGIN WS_OUT; |
2295 | 0 | } |
2296 | 0 | YY_BREAK |
2297 | 0 | case YY_STATE_EOF(INITIAL): |
2298 | 0 | case YY_STATE_EOF(WS_OUT): |
2299 | 0 | case YY_STATE_EOF(VENDOR): |
2300 | 0 | case YY_STATE_EOF(VENDOR_W_NAME): |
2301 | 0 | case YY_STATE_EOF(ATTR): |
2302 | 0 | case YY_STATE_EOF(ATTR_W_NAME): |
2303 | 0 | case YY_STATE_EOF(ATTR_W_ID): |
2304 | 0 | case YY_STATE_EOF(ATTR_W_TYPE): |
2305 | 0 | case YY_STATE_EOF(VALUE): |
2306 | 0 | case YY_STATE_EOF(VALUE_W_ATTR): |
2307 | 0 | case YY_STATE_EOF(VALUE_W_NAME): |
2308 | 0 | case YY_STATE_EOF(INCLUDE): |
2309 | 0 | case YY_STATE_EOF(JUNK): |
2310 | 0 | case YY_STATE_EOF(BEGIN_VENDOR): |
2311 | 0 | case YY_STATE_EOF(BEGIN_VENDOR_FORMAT): |
2312 | 0 | case YY_STATE_EOF(END_VENDOR): |
2313 | 0 | case YY_STATE_EOF(VENDOR_W_ID): |
2314 | 0 | case YY_STATE_EOF(VENDOR_W_FORMAT): |
2315 | 0 | case YY_STATE_EOF(VENDOR_W_TYPE_OCTETS): |
2316 | 0 | case YY_STATE_EOF(VENDOR_W_LENGTH_OCTETS): |
2317 | 0 | case YY_STATE_EOF(VENDOR_W_CONTINUATION): |
2318 | 0 | case YY_STATE_EOF(BEGIN_TLV): |
2319 | 0 | case YY_STATE_EOF(END_TLV): |
2320 | 0 | #line 434 "/src/wireshark/epan/radius_dict.l" |
2321 | 0 | { |
2322 | |
|
2323 | 0 | fclose(yyin); |
2324 | 0 | yyin = NULL; |
2325 | |
|
2326 | 0 | g_free(yyextra->directory); |
2327 | |
|
2328 | 0 | if ( --yyextra->include_stack_ptr < 0 ) { |
2329 | 0 | yyterminate(); |
2330 | 0 | } else { |
2331 | 0 | g_free(yyextra->fullpaths[yyextra->include_stack_ptr+1]); |
2332 | 0 | yyextra->fullpaths[yyextra->include_stack_ptr+1] = NULL; |
2333 | |
|
2334 | 0 | yyextra->directory = g_path_get_dirname(yyextra->fullpaths[yyextra->include_stack_ptr]); |
2335 | |
|
2336 | 0 | Radius__delete_buffer(YY_CURRENT_BUFFER, yyscanner); |
2337 | 0 | Radius__switch_to_buffer(yyextra->include_stack[yyextra->include_stack_ptr], yyscanner); |
2338 | 0 | } |
2339 | | |
2340 | 0 | BEGIN WS_OUT; |
2341 | 0 | } |
2342 | 0 | YY_BREAK |
2343 | 0 | case 62: |
2344 | | /* rule 62 can match eol */ |
2345 | 0 | YY_RULE_SETUP |
2346 | 0 | #line 456 "/src/wireshark/epan/radius_dict.l" |
2347 | 0 | { yyextra->linenums[yyextra->include_stack_ptr]++; BEGIN WS_OUT; } |
2348 | 0 | YY_BREAK |
2349 | 0 | case 63: |
2350 | 0 | YY_RULE_SETUP |
2351 | 0 | #line 459 "/src/wireshark/epan/radius_dict.l" |
2352 | 0 | ECHO; |
2353 | 0 | YY_BREAK |
2354 | 0 | #line 2355 "/work/build/epan/radius_dict.c" |
2355 | | |
2356 | 0 | case YY_END_OF_BUFFER: |
2357 | 0 | { |
2358 | | /* Amount of text matched not including the EOB char. */ |
2359 | 0 | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
2360 | | |
2361 | | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
2362 | 0 | *yy_cp = yyg->yy_hold_char; |
2363 | 0 | YY_RESTORE_YY_MORE_OFFSET |
2364 | |
|
2365 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
2366 | 0 | { |
2367 | | /* We're scanning a new file or input source. It's |
2368 | | * possible that this happened because the user |
2369 | | * just pointed yyin at a new source and called |
2370 | | * yylex(). If so, then we have to assure |
2371 | | * consistency between YY_CURRENT_BUFFER and our |
2372 | | * globals. Here is the right place to do so, because |
2373 | | * this is the first action (other than possibly a |
2374 | | * back-up) that will match for the new input source. |
2375 | | */ |
2376 | 0 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
2377 | | /* %if-c-only */ |
2378 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
2379 | | /* %endif */ |
2380 | | /* %if-c++-only */ |
2381 | | /* %endif */ |
2382 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
2383 | 0 | } |
2384 | | |
2385 | | /* Note that here we test for yy_c_buf_p "<=" to the position |
2386 | | * of the first EOB in the buffer, since yy_c_buf_p will |
2387 | | * already have been incremented past the NUL character |
2388 | | * (since all states make transitions on EOB to the |
2389 | | * end-of-buffer state). Contrast this with the test |
2390 | | * in input(). |
2391 | | */ |
2392 | 0 | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
2393 | 0 | { /* This was really a NUL. */ |
2394 | 0 | yy_state_type yy_next_state; |
2395 | |
|
2396 | 0 | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
2397 | |
|
2398 | 0 | yy_current_state = yy_get_previous_state( yyscanner ); |
2399 | | |
2400 | | /* Okay, we're now positioned to make the NUL |
2401 | | * transition. We couldn't have |
2402 | | * yy_get_previous_state() go ahead and do it |
2403 | | * for us because it doesn't know how to deal |
2404 | | * with the possibility of jamming (and we don't |
2405 | | * want to build jamming into it because then it |
2406 | | * will run more slowly). |
2407 | | */ |
2408 | |
|
2409 | 0 | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
2410 | |
|
2411 | 0 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2412 | |
|
2413 | 0 | if ( yy_next_state ) |
2414 | 0 | { |
2415 | | /* Consume the NUL. */ |
2416 | 0 | yy_cp = ++yyg->yy_c_buf_p; |
2417 | 0 | yy_current_state = yy_next_state; |
2418 | 0 | goto yy_match; |
2419 | 0 | } |
2420 | | |
2421 | 0 | else |
2422 | 0 | { |
2423 | | /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ |
2424 | 0 | yy_cp = yyg->yy_last_accepting_cpos; |
2425 | 0 | yy_current_state = yyg->yy_last_accepting_state; |
2426 | 0 | goto yy_find_action; |
2427 | 0 | } |
2428 | 0 | } |
2429 | | |
2430 | 0 | else switch ( yy_get_next_buffer( yyscanner ) ) |
2431 | 0 | { |
2432 | 0 | case EOB_ACT_END_OF_FILE: |
2433 | 0 | { |
2434 | 0 | yyg->yy_did_buffer_switch_on_eof = 0; |
2435 | |
|
2436 | 0 | if ( yywrap( yyscanner ) ) |
2437 | 0 | { |
2438 | | /* Note: because we've taken care in |
2439 | | * yy_get_next_buffer() to have set up |
2440 | | * yytext, we can now set up |
2441 | | * yy_c_buf_p so that if some total |
2442 | | * hoser (like flex itself) wants to |
2443 | | * call the scanner after we return the |
2444 | | * YY_NULL, it'll still work - another |
2445 | | * YY_NULL will get returned. |
2446 | | */ |
2447 | 0 | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
2448 | |
|
2449 | 0 | yy_act = YY_STATE_EOF(YY_START); |
2450 | 0 | goto do_action; |
2451 | 0 | } |
2452 | | |
2453 | 0 | else |
2454 | 0 | { |
2455 | 0 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
2456 | 0 | YY_NEW_FILE; |
2457 | 0 | } |
2458 | 0 | break; |
2459 | 0 | } |
2460 | | |
2461 | 0 | case EOB_ACT_CONTINUE_SCAN: |
2462 | 0 | yyg->yy_c_buf_p = |
2463 | 0 | yyg->yytext_ptr + yy_amount_of_matched_text; |
2464 | |
|
2465 | 0 | yy_current_state = yy_get_previous_state( yyscanner ); |
2466 | |
|
2467 | 0 | yy_cp = yyg->yy_c_buf_p; |
2468 | 0 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2469 | 0 | goto yy_match; |
2470 | | |
2471 | 0 | case EOB_ACT_LAST_MATCH: |
2472 | 0 | yyg->yy_c_buf_p = |
2473 | 0 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
2474 | |
|
2475 | 0 | yy_current_state = yy_get_previous_state( yyscanner ); |
2476 | |
|
2477 | 0 | yy_cp = yyg->yy_c_buf_p; |
2478 | 0 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2479 | 0 | goto yy_find_action; |
2480 | 0 | } |
2481 | 0 | break; |
2482 | 0 | } |
2483 | | |
2484 | 0 | default: |
2485 | 0 | YY_FATAL_ERROR( |
2486 | 0 | "fatal flex scanner internal error--no action found" ); |
2487 | 0 | } /* end of action switch */ |
2488 | 0 | } /* end of scanning one token */ |
2489 | 0 | } /* end of user's declarations */ |
2490 | 0 | } /* end of yylex */ |
2491 | | /* %ok-for-header */ |
2492 | | |
2493 | | /* %if-c++-only */ |
2494 | | /* %not-for-header */ |
2495 | | /* %ok-for-header */ |
2496 | | |
2497 | | /* %endif */ |
2498 | | |
2499 | | /* yy_get_next_buffer - try to read in a new buffer |
2500 | | * |
2501 | | * Returns a code representing an action: |
2502 | | * EOB_ACT_LAST_MATCH - |
2503 | | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
2504 | | * EOB_ACT_END_OF_FILE - end of file |
2505 | | */ |
2506 | | /* %if-c-only */ |
2507 | | static int yy_get_next_buffer (yyscan_t yyscanner) |
2508 | | /* %endif */ |
2509 | | /* %if-c++-only */ |
2510 | | /* %endif */ |
2511 | 0 | { |
2512 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2513 | 0 | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
2514 | 0 | char *source = yyg->yytext_ptr; |
2515 | 0 | int number_to_move, i; |
2516 | 0 | int ret_val; |
2517 | |
|
2518 | 0 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
2519 | 0 | YY_FATAL_ERROR( |
2520 | 0 | "fatal flex scanner internal error--end of buffer missed" ); |
2521 | | |
2522 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
2523 | 0 | { /* Don't try to fill the buffer, so this is an EOF. */ |
2524 | 0 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
2525 | 0 | { |
2526 | | /* We matched a single character, the EOB, so |
2527 | | * treat this as a final EOF. |
2528 | | */ |
2529 | 0 | return EOB_ACT_END_OF_FILE; |
2530 | 0 | } |
2531 | | |
2532 | 0 | else |
2533 | 0 | { |
2534 | | /* We matched some text prior to the EOB, first |
2535 | | * process it. |
2536 | | */ |
2537 | 0 | return EOB_ACT_LAST_MATCH; |
2538 | 0 | } |
2539 | 0 | } |
2540 | | |
2541 | | /* Try to read more data. */ |
2542 | | |
2543 | | /* First move last chars to start of buffer. */ |
2544 | 0 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
2545 | |
|
2546 | 0 | for ( i = 0; i < number_to_move; ++i ) |
2547 | 0 | *(dest++) = *(source++); |
2548 | |
|
2549 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
2550 | | /* don't do the read, it's not guaranteed to return an EOF, |
2551 | | * just force an EOF |
2552 | | */ |
2553 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
2554 | | |
2555 | 0 | else |
2556 | 0 | { |
2557 | 0 | int num_to_read = |
2558 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
2559 | |
|
2560 | 0 | while ( num_to_read <= 0 ) |
2561 | 0 | { /* Not enough room in the buffer - grow it. */ |
2562 | | |
2563 | | /* just a shorter name for the current buffer */ |
2564 | 0 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
2565 | |
|
2566 | 0 | int yy_c_buf_p_offset = |
2567 | 0 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
2568 | |
|
2569 | 0 | if ( b->yy_is_our_buffer ) |
2570 | 0 | { |
2571 | 0 | int new_size = b->yy_buf_size * 2; |
2572 | |
|
2573 | 0 | if ( new_size <= 0 ) |
2574 | 0 | b->yy_buf_size += b->yy_buf_size / 8; |
2575 | 0 | else |
2576 | 0 | b->yy_buf_size *= 2; |
2577 | |
|
2578 | 0 | b->yy_ch_buf = (char *) |
2579 | | /* Include room in for 2 EOB chars. */ |
2580 | 0 | yyrealloc( (void *) b->yy_ch_buf, |
2581 | 0 | (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
2582 | 0 | } |
2583 | 0 | else |
2584 | | /* Can't grow it, we don't own it. */ |
2585 | 0 | b->yy_ch_buf = NULL; |
2586 | |
|
2587 | 0 | if ( ! b->yy_ch_buf ) |
2588 | 0 | YY_FATAL_ERROR( |
2589 | 0 | "fatal error - scanner input buffer overflow" ); |
2590 | | |
2591 | 0 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
2592 | |
|
2593 | 0 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
2594 | 0 | number_to_move - 1; |
2595 | |
|
2596 | 0 | } |
2597 | | |
2598 | 0 | if ( num_to_read > YY_READ_BUF_SIZE ) |
2599 | 0 | num_to_read = YY_READ_BUF_SIZE; |
2600 | | |
2601 | | /* Read in more data. */ |
2602 | 0 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
2603 | 0 | yyg->yy_n_chars, num_to_read ); |
2604 | |
|
2605 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2606 | 0 | } |
2607 | | |
2608 | 0 | if ( yyg->yy_n_chars == 0 ) |
2609 | 0 | { |
2610 | 0 | if ( number_to_move == YY_MORE_ADJ ) |
2611 | 0 | { |
2612 | 0 | ret_val = EOB_ACT_END_OF_FILE; |
2613 | 0 | yyrestart( yyin , yyscanner); |
2614 | 0 | } |
2615 | | |
2616 | 0 | else |
2617 | 0 | { |
2618 | 0 | ret_val = EOB_ACT_LAST_MATCH; |
2619 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
2620 | 0 | YY_BUFFER_EOF_PENDING; |
2621 | 0 | } |
2622 | 0 | } |
2623 | | |
2624 | 0 | else |
2625 | 0 | ret_val = EOB_ACT_CONTINUE_SCAN; |
2626 | |
|
2627 | 0 | if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
2628 | | /* Extend the array by 50%, plus the number we really need. */ |
2629 | 0 | int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
2630 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
2631 | 0 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
2632 | 0 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
2633 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
2634 | | /* "- 2" to take care of EOB's */ |
2635 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
2636 | 0 | } |
2637 | | |
2638 | 0 | yyg->yy_n_chars += number_to_move; |
2639 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
2640 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
2641 | |
|
2642 | 0 | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
2643 | |
|
2644 | 0 | return ret_val; |
2645 | 0 | } |
2646 | | |
2647 | | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
2648 | | |
2649 | | /* %if-c-only */ |
2650 | | /* %not-for-header */ |
2651 | | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
2652 | | /* %endif */ |
2653 | | /* %if-c++-only */ |
2654 | | /* %endif */ |
2655 | 0 | { |
2656 | 0 | yy_state_type yy_current_state; |
2657 | 0 | char *yy_cp; |
2658 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2659 | | |
2660 | | /* %% [15.0] code to get the start state into yy_current_state goes here */ |
2661 | 0 | yy_current_state = yyg->yy_start; |
2662 | |
|
2663 | 0 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
2664 | 0 | { |
2665 | | /* %% [16.0] code to find the next state goes here */ |
2666 | 0 | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
2667 | 0 | if ( yy_accept[yy_current_state] ) |
2668 | 0 | { |
2669 | 0 | yyg->yy_last_accepting_state = yy_current_state; |
2670 | 0 | yyg->yy_last_accepting_cpos = yy_cp; |
2671 | 0 | } |
2672 | 0 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2673 | 0 | { |
2674 | 0 | yy_current_state = (int) yy_def[yy_current_state]; |
2675 | 0 | if ( yy_current_state >= 344 ) |
2676 | 0 | yy_c = yy_meta[yy_c]; |
2677 | 0 | } |
2678 | 0 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
2679 | 0 | } |
2680 | |
|
2681 | 0 | return yy_current_state; |
2682 | 0 | } |
2683 | | |
2684 | | /* yy_try_NUL_trans - try to make a transition on the NUL character |
2685 | | * |
2686 | | * synopsis |
2687 | | * next_state = yy_try_NUL_trans( current_state ); |
2688 | | */ |
2689 | | /* %if-c-only */ |
2690 | | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
2691 | | /* %endif */ |
2692 | | /* %if-c++-only */ |
2693 | | /* %endif */ |
2694 | 0 | { |
2695 | 0 | int yy_is_jam; |
2696 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
2697 | | /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ |
2698 | 0 | char *yy_cp = yyg->yy_c_buf_p; |
2699 | |
|
2700 | 0 | YY_CHAR yy_c = 1; |
2701 | 0 | if ( yy_accept[yy_current_state] ) |
2702 | 0 | { |
2703 | 0 | yyg->yy_last_accepting_state = yy_current_state; |
2704 | 0 | yyg->yy_last_accepting_cpos = yy_cp; |
2705 | 0 | } |
2706 | 0 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2707 | 0 | { |
2708 | 0 | yy_current_state = (int) yy_def[yy_current_state]; |
2709 | 0 | if ( yy_current_state >= 344 ) |
2710 | 0 | yy_c = yy_meta[yy_c]; |
2711 | 0 | } |
2712 | 0 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
2713 | 0 | yy_is_jam = (yy_current_state == 343); |
2714 | |
|
2715 | 0 | (void)yyg; |
2716 | 0 | return yy_is_jam ? 0 : yy_current_state; |
2717 | 0 | } |
2718 | | |
2719 | | #ifndef YY_NO_UNPUT |
2720 | | /* %if-c-only */ |
2721 | | |
2722 | | /* %endif */ |
2723 | | #endif |
2724 | | |
2725 | | /* %if-c-only */ |
2726 | | #ifndef YY_NO_INPUT |
2727 | | #ifdef __cplusplus |
2728 | | static int yyinput (yyscan_t yyscanner) |
2729 | | #else |
2730 | | static int input (yyscan_t yyscanner) |
2731 | | #endif |
2732 | | |
2733 | | /* %endif */ |
2734 | | /* %if-c++-only */ |
2735 | | /* %endif */ |
2736 | | { |
2737 | | int c; |
2738 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2739 | | |
2740 | | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
2741 | | |
2742 | | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
2743 | | { |
2744 | | /* yy_c_buf_p now points to the character we want to return. |
2745 | | * If this occurs *before* the EOB characters, then it's a |
2746 | | * valid NUL; if not, then we've hit the end of the buffer. |
2747 | | */ |
2748 | | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
2749 | | /* This was really a NUL. */ |
2750 | | *yyg->yy_c_buf_p = '\0'; |
2751 | | |
2752 | | else |
2753 | | { /* need more input */ |
2754 | | int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
2755 | | ++yyg->yy_c_buf_p; |
2756 | | |
2757 | | switch ( yy_get_next_buffer( yyscanner ) ) |
2758 | | { |
2759 | | case EOB_ACT_LAST_MATCH: |
2760 | | /* This happens because yy_g_n_b() |
2761 | | * sees that we've accumulated a |
2762 | | * token and flags that we need to |
2763 | | * try matching the token before |
2764 | | * proceeding. But for input(), |
2765 | | * there's no matching to consider. |
2766 | | * So convert the EOB_ACT_LAST_MATCH |
2767 | | * to EOB_ACT_END_OF_FILE. |
2768 | | */ |
2769 | | |
2770 | | /* Reset buffer status. */ |
2771 | | yyrestart( yyin , yyscanner); |
2772 | | |
2773 | | /*FALLTHROUGH*/ |
2774 | | |
2775 | | case EOB_ACT_END_OF_FILE: |
2776 | | { |
2777 | | if ( yywrap( yyscanner ) ) |
2778 | | return 0; |
2779 | | |
2780 | | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
2781 | | YY_NEW_FILE; |
2782 | | #ifdef __cplusplus |
2783 | | return yyinput(yyscanner); |
2784 | | #else |
2785 | | return input(yyscanner); |
2786 | | #endif |
2787 | | } |
2788 | | |
2789 | | case EOB_ACT_CONTINUE_SCAN: |
2790 | | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
2791 | | break; |
2792 | | } |
2793 | | } |
2794 | | } |
2795 | | |
2796 | | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
2797 | | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
2798 | | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
2799 | | |
2800 | | /* %% [19.0] update BOL and yylineno */ |
2801 | | |
2802 | | return c; |
2803 | | } |
2804 | | /* %if-c-only */ |
2805 | | #endif /* ifndef YY_NO_INPUT */ |
2806 | | /* %endif */ |
2807 | | |
2808 | | /** Immediately switch to a different input stream. |
2809 | | * @param input_file A readable stream. |
2810 | | * @param yyscanner The scanner object. |
2811 | | * @note This function does not reset the start condition to @c INITIAL . |
2812 | | */ |
2813 | | /* %if-c-only */ |
2814 | | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
2815 | | /* %endif */ |
2816 | | /* %if-c++-only */ |
2817 | | /* %endif */ |
2818 | 0 | { |
2819 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2820 | |
|
2821 | 0 | if ( ! YY_CURRENT_BUFFER ){ |
2822 | 0 | yyensure_buffer_stack (yyscanner); |
2823 | 0 | YY_CURRENT_BUFFER_LVALUE = |
2824 | 0 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
2825 | 0 | } |
2826 | |
|
2827 | 0 | yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
2828 | 0 | yy_load_buffer_state( yyscanner ); |
2829 | 0 | } |
2830 | | |
2831 | | /* %if-c++-only */ |
2832 | | /* %endif */ |
2833 | | |
2834 | | /** Switch to a different input buffer. |
2835 | | * @param new_buffer The new input buffer. |
2836 | | * @param yyscanner The scanner object. |
2837 | | */ |
2838 | | /* %if-c-only */ |
2839 | | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
2840 | | /* %endif */ |
2841 | | /* %if-c++-only */ |
2842 | | /* %endif */ |
2843 | 0 | { |
2844 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2845 | | |
2846 | | /* TODO. We should be able to replace this entire function body |
2847 | | * with |
2848 | | * yypop_buffer_state(); |
2849 | | * yypush_buffer_state(new_buffer); |
2850 | | */ |
2851 | 0 | yyensure_buffer_stack (yyscanner); |
2852 | 0 | if ( YY_CURRENT_BUFFER == new_buffer ) |
2853 | 0 | return; |
2854 | | |
2855 | 0 | if ( YY_CURRENT_BUFFER ) |
2856 | 0 | { |
2857 | | /* Flush out information for old buffer. */ |
2858 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
2859 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
2860 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2861 | 0 | } |
2862 | |
|
2863 | 0 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2864 | 0 | yy_load_buffer_state( yyscanner ); |
2865 | | |
2866 | | /* We don't actually know whether we did this switch during |
2867 | | * EOF (yywrap()) processing, but the only time this flag |
2868 | | * is looked at is after yywrap() is called, so it's safe |
2869 | | * to go ahead and always set it. |
2870 | | */ |
2871 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
2872 | 0 | } |
2873 | | |
2874 | | /* %if-c-only */ |
2875 | | static void yy_load_buffer_state (yyscan_t yyscanner) |
2876 | | /* %endif */ |
2877 | | /* %if-c++-only */ |
2878 | | /* %endif */ |
2879 | 0 | { |
2880 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2881 | 0 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
2882 | 0 | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
2883 | | /* %if-c-only */ |
2884 | 0 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
2885 | | /* %endif */ |
2886 | | /* %if-c++-only */ |
2887 | | /* %endif */ |
2888 | 0 | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
2889 | 0 | } |
2890 | | |
2891 | | /** Allocate and initialize an input buffer state. |
2892 | | * @param file A readable stream. |
2893 | | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
2894 | | * @param yyscanner The scanner object. |
2895 | | * @return the allocated buffer state. |
2896 | | */ |
2897 | | /* %if-c-only */ |
2898 | | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
2899 | | /* %endif */ |
2900 | | /* %if-c++-only */ |
2901 | | /* %endif */ |
2902 | 0 | { |
2903 | 0 | YY_BUFFER_STATE b; |
2904 | | |
2905 | 0 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
2906 | 0 | if ( ! b ) |
2907 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2908 | | |
2909 | 0 | b->yy_buf_size = size; |
2910 | | |
2911 | | /* yy_ch_buf has to be 2 characters longer than the size given because |
2912 | | * we need to put in 2 end-of-buffer characters. |
2913 | | */ |
2914 | 0 | b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
2915 | 0 | if ( ! b->yy_ch_buf ) |
2916 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2917 | | |
2918 | 0 | b->yy_is_our_buffer = 1; |
2919 | |
|
2920 | 0 | yy_init_buffer( b, file , yyscanner); |
2921 | |
|
2922 | 0 | return b; |
2923 | 0 | } |
2924 | | |
2925 | | /* %if-c++-only */ |
2926 | | /* %endif */ |
2927 | | |
2928 | | /** Destroy the buffer. |
2929 | | * @param b a buffer created with yy_create_buffer() |
2930 | | * @param yyscanner The scanner object. |
2931 | | */ |
2932 | | /* %if-c-only */ |
2933 | | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
2934 | | /* %endif */ |
2935 | | /* %if-c++-only */ |
2936 | | /* %endif */ |
2937 | 0 | { |
2938 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2939 | |
|
2940 | 0 | if ( ! b ) |
2941 | 0 | return; |
2942 | | |
2943 | 0 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
2944 | 0 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
2945 | |
|
2946 | 0 | if ( b->yy_is_our_buffer ) |
2947 | 0 | yyfree( (void *) b->yy_ch_buf , yyscanner ); |
2948 | |
|
2949 | 0 | yyfree( (void *) b , yyscanner ); |
2950 | 0 | } |
2951 | | |
2952 | | /* Initializes or reinitializes a buffer. |
2953 | | * This function is sometimes called more than once on the same buffer, |
2954 | | * such as during a yyrestart() or at EOF. |
2955 | | */ |
2956 | | /* %if-c-only */ |
2957 | | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
2958 | | /* %endif */ |
2959 | | /* %if-c++-only */ |
2960 | | /* %endif */ |
2961 | | |
2962 | 0 | { |
2963 | 0 | int oerrno = errno; |
2964 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2965 | |
|
2966 | 0 | yy_flush_buffer( b , yyscanner); |
2967 | | |
2968 | | /* %if-c-only */ |
2969 | 0 | b->yy_input_file = file; |
2970 | | /* %endif */ |
2971 | | /* %if-c++-only */ |
2972 | | /* %endif */ |
2973 | 0 | b->yy_fill_buffer = 1; |
2974 | | |
2975 | | /* If b is the current buffer, then yy_init_buffer was _probably_ |
2976 | | * called from yyrestart() or through yy_get_next_buffer. |
2977 | | * In that case, we don't want to reset the lineno or column. |
2978 | | */ |
2979 | 0 | if (b != YY_CURRENT_BUFFER){ |
2980 | 0 | b->yy_bs_lineno = 1; |
2981 | 0 | b->yy_bs_column = 0; |
2982 | 0 | } |
2983 | | |
2984 | | /* %if-c-only */ |
2985 | |
|
2986 | 0 | b->yy_is_interactive = 0; |
2987 | | |
2988 | | /* %endif */ |
2989 | | /* %if-c++-only */ |
2990 | | /* %endif */ |
2991 | 0 | errno = oerrno; |
2992 | 0 | } |
2993 | | |
2994 | | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
2995 | | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
2996 | | * @param yyscanner The scanner object. |
2997 | | */ |
2998 | | /* %if-c-only */ |
2999 | | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
3000 | | /* %endif */ |
3001 | | /* %if-c++-only */ |
3002 | | /* %endif */ |
3003 | 0 | { |
3004 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3005 | 0 | if ( ! b ) |
3006 | 0 | return; |
3007 | | |
3008 | 0 | b->yy_n_chars = 0; |
3009 | | |
3010 | | /* We always need two end-of-buffer characters. The first causes |
3011 | | * a transition to the end-of-buffer state. The second causes |
3012 | | * a jam in that state. |
3013 | | */ |
3014 | 0 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
3015 | 0 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
3016 | |
|
3017 | 0 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
3018 | |
|
3019 | 0 | b->yy_at_bol = 1; |
3020 | 0 | b->yy_buffer_status = YY_BUFFER_NEW; |
3021 | |
|
3022 | 0 | if ( b == YY_CURRENT_BUFFER ) |
3023 | 0 | yy_load_buffer_state( yyscanner ); |
3024 | 0 | } |
3025 | | |
3026 | | /* %if-c-or-c++ */ |
3027 | | /** Pushes the new state onto the stack. The new state becomes |
3028 | | * the current state. This function will allocate the stack |
3029 | | * if necessary. |
3030 | | * @param new_buffer The new state. |
3031 | | * @param yyscanner The scanner object. |
3032 | | */ |
3033 | | /* %if-c-only */ |
3034 | | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
3035 | | /* %endif */ |
3036 | | /* %if-c++-only */ |
3037 | | /* %endif */ |
3038 | 0 | { |
3039 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3040 | 0 | if (new_buffer == NULL) |
3041 | 0 | return; |
3042 | | |
3043 | 0 | yyensure_buffer_stack(yyscanner); |
3044 | | |
3045 | | /* This block is copied from yy_switch_to_buffer. */ |
3046 | 0 | if ( YY_CURRENT_BUFFER ) |
3047 | 0 | { |
3048 | | /* Flush out information for old buffer. */ |
3049 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
3050 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
3051 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
3052 | 0 | } |
3053 | | |
3054 | | /* Only push if top exists. Otherwise, replace top. */ |
3055 | 0 | if (YY_CURRENT_BUFFER) |
3056 | 0 | yyg->yy_buffer_stack_top++; |
3057 | 0 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
3058 | | |
3059 | | /* copied from yy_switch_to_buffer. */ |
3060 | 0 | yy_load_buffer_state( yyscanner ); |
3061 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
3062 | 0 | } |
3063 | | /* %endif */ |
3064 | | |
3065 | | /* %if-c-or-c++ */ |
3066 | | /** Removes and deletes the top of the stack, if present. |
3067 | | * The next element becomes the new top. |
3068 | | * @param yyscanner The scanner object. |
3069 | | */ |
3070 | | /* %if-c-only */ |
3071 | | void yypop_buffer_state (yyscan_t yyscanner) |
3072 | | /* %endif */ |
3073 | | /* %if-c++-only */ |
3074 | | /* %endif */ |
3075 | 0 | { |
3076 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3077 | 0 | if (!YY_CURRENT_BUFFER) |
3078 | 0 | return; |
3079 | | |
3080 | 0 | yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
3081 | 0 | YY_CURRENT_BUFFER_LVALUE = NULL; |
3082 | 0 | if (yyg->yy_buffer_stack_top > 0) |
3083 | 0 | --yyg->yy_buffer_stack_top; |
3084 | |
|
3085 | 0 | if (YY_CURRENT_BUFFER) { |
3086 | 0 | yy_load_buffer_state( yyscanner ); |
3087 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
3088 | 0 | } |
3089 | 0 | } |
3090 | | /* %endif */ |
3091 | | |
3092 | | /* %if-c-or-c++ */ |
3093 | | /* Allocates the stack if it does not exist. |
3094 | | * Guarantees space for at least one push. |
3095 | | */ |
3096 | | /* %if-c-only */ |
3097 | | static void yyensure_buffer_stack (yyscan_t yyscanner) |
3098 | | /* %endif */ |
3099 | | /* %if-c++-only */ |
3100 | | /* %endif */ |
3101 | 0 | { |
3102 | 0 | yy_size_t num_to_alloc; |
3103 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3104 | |
|
3105 | 0 | if (!yyg->yy_buffer_stack) { |
3106 | | |
3107 | | /* First allocation is just for 2 elements, since we don't know if this |
3108 | | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
3109 | | * immediate realloc on the next call. |
3110 | | */ |
3111 | 0 | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
3112 | 0 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
3113 | 0 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
3114 | 0 | , yyscanner); |
3115 | 0 | if ( ! yyg->yy_buffer_stack ) |
3116 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
3117 | | |
3118 | 0 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
3119 | |
|
3120 | 0 | yyg->yy_buffer_stack_max = num_to_alloc; |
3121 | 0 | yyg->yy_buffer_stack_top = 0; |
3122 | 0 | return; |
3123 | 0 | } |
3124 | | |
3125 | 0 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
3126 | | |
3127 | | /* Increase the buffer to prepare for a possible push. */ |
3128 | 0 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
3129 | |
|
3130 | 0 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
3131 | 0 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
3132 | 0 | (yyg->yy_buffer_stack, |
3133 | 0 | num_to_alloc * sizeof(struct yy_buffer_state*) |
3134 | 0 | , yyscanner); |
3135 | 0 | if ( ! yyg->yy_buffer_stack ) |
3136 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
3137 | | |
3138 | | /* zero only the new slots.*/ |
3139 | 0 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
3140 | 0 | yyg->yy_buffer_stack_max = num_to_alloc; |
3141 | 0 | } |
3142 | 0 | } |
3143 | | /* %endif */ |
3144 | | |
3145 | | /* %if-c-only */ |
3146 | | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
3147 | | * @param base the character buffer |
3148 | | * @param size the size in bytes of the character buffer |
3149 | | * @param yyscanner The scanner object. |
3150 | | * @return the newly allocated buffer state object. |
3151 | | */ |
3152 | | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
3153 | 0 | { |
3154 | 0 | YY_BUFFER_STATE b; |
3155 | | |
3156 | 0 | if ( size < 2 || |
3157 | 0 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
3158 | 0 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
3159 | | /* They forgot to leave room for the EOB's. */ |
3160 | 0 | return NULL; |
3161 | | |
3162 | 0 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
3163 | 0 | if ( ! b ) |
3164 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
3165 | | |
3166 | 0 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
3167 | 0 | b->yy_buf_pos = b->yy_ch_buf = base; |
3168 | 0 | b->yy_is_our_buffer = 0; |
3169 | 0 | b->yy_input_file = NULL; |
3170 | 0 | b->yy_n_chars = b->yy_buf_size; |
3171 | 0 | b->yy_is_interactive = 0; |
3172 | 0 | b->yy_at_bol = 1; |
3173 | 0 | b->yy_fill_buffer = 0; |
3174 | 0 | b->yy_buffer_status = YY_BUFFER_NEW; |
3175 | |
|
3176 | 0 | yy_switch_to_buffer( b , yyscanner ); |
3177 | |
|
3178 | 0 | return b; |
3179 | 0 | } |
3180 | | /* %endif */ |
3181 | | |
3182 | | /* %if-c-only */ |
3183 | | /** Setup the input buffer state to scan a string. The next call to yylex() will |
3184 | | * scan from a @e copy of @a str. |
3185 | | * @param yystr a NUL-terminated string to scan |
3186 | | * @param yyscanner The scanner object. |
3187 | | * @return the newly allocated buffer state object. |
3188 | | * @note If you want to scan bytes that may contain NUL values, then use |
3189 | | * yy_scan_bytes() instead. |
3190 | | */ |
3191 | | YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
3192 | 0 | { |
3193 | | |
3194 | 0 | return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
3195 | 0 | } |
3196 | | /* %endif */ |
3197 | | |
3198 | | /* %if-c-only */ |
3199 | | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
3200 | | * scan from a @e copy of @a bytes. |
3201 | | * @param yybytes the byte buffer to scan |
3202 | | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
3203 | | * @param yyscanner The scanner object. |
3204 | | * @return the newly allocated buffer state object. |
3205 | | */ |
3206 | | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
3207 | 0 | { |
3208 | 0 | YY_BUFFER_STATE b; |
3209 | 0 | char *buf; |
3210 | 0 | yy_size_t n; |
3211 | 0 | int i; |
3212 | | |
3213 | | /* Get memory for full buffer, including space for trailing EOB's. */ |
3214 | 0 | n = (yy_size_t) (_yybytes_len + 2); |
3215 | 0 | buf = (char *) yyalloc( n , yyscanner ); |
3216 | 0 | if ( ! buf ) |
3217 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
3218 | | |
3219 | 0 | for ( i = 0; i < _yybytes_len; ++i ) |
3220 | 0 | buf[i] = yybytes[i]; |
3221 | |
|
3222 | 0 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
3223 | |
|
3224 | 0 | b = yy_scan_buffer( buf, n , yyscanner); |
3225 | 0 | if ( ! b ) |
3226 | 0 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
3227 | | |
3228 | | /* It's okay to grow etc. this buffer, and we should throw it |
3229 | | * away when we're done. |
3230 | | */ |
3231 | 0 | b->yy_is_our_buffer = 1; |
3232 | |
|
3233 | 0 | return b; |
3234 | 0 | } |
3235 | | /* %endif */ |
3236 | | |
3237 | | #ifndef YY_EXIT_FAILURE |
3238 | | #define YY_EXIT_FAILURE 2 |
3239 | | #endif |
3240 | | |
3241 | | /* %if-c-only */ |
3242 | | static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
3243 | 0 | { |
3244 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3245 | 0 | (void)yyg; |
3246 | 0 | fprintf( stderr, "%s\n", msg ); |
3247 | 0 | exit( YY_EXIT_FAILURE ); |
3248 | 0 | } |
3249 | | /* %endif */ |
3250 | | /* %if-c++-only */ |
3251 | | /* %endif */ |
3252 | | |
3253 | | /* Redefine yyless() so it works in section 3 code. */ |
3254 | | |
3255 | | #undef yyless |
3256 | | #define yyless(n) \ |
3257 | | do \ |
3258 | | { \ |
3259 | | /* Undo effects of setting up yytext. */ \ |
3260 | | int yyless_macro_arg = (n); \ |
3261 | | YY_LESS_LINENO(yyless_macro_arg);\ |
3262 | | yytext[yyleng] = yyg->yy_hold_char; \ |
3263 | | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
3264 | | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
3265 | | *yyg->yy_c_buf_p = '\0'; \ |
3266 | | yyleng = yyless_macro_arg; \ |
3267 | | } \ |
3268 | | while ( 0 ) |
3269 | | |
3270 | | /* Accessor methods (get/set functions) to struct members. */ |
3271 | | |
3272 | | /* %if-c-only */ |
3273 | | /* %if-reentrant */ |
3274 | | |
3275 | | /** Get the user-defined data for this scanner. |
3276 | | * @param yyscanner The scanner object. |
3277 | | */ |
3278 | | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
3279 | 0 | { |
3280 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3281 | 0 | return yyextra; |
3282 | 0 | } |
3283 | | |
3284 | | /* %endif */ |
3285 | | |
3286 | | /** Get the current line number. |
3287 | | * @param yyscanner The scanner object. |
3288 | | */ |
3289 | | int yyget_lineno (yyscan_t yyscanner) |
3290 | 0 | { |
3291 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3292 | |
|
3293 | 0 | if (! YY_CURRENT_BUFFER) |
3294 | 0 | return 0; |
3295 | | |
3296 | 0 | return yylineno; |
3297 | 0 | } |
3298 | | |
3299 | | /** Get the current column number. |
3300 | | * @param yyscanner The scanner object. |
3301 | | */ |
3302 | | int yyget_column (yyscan_t yyscanner) |
3303 | 0 | { |
3304 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3305 | |
|
3306 | 0 | if (! YY_CURRENT_BUFFER) |
3307 | 0 | return 0; |
3308 | | |
3309 | 0 | return yycolumn; |
3310 | 0 | } |
3311 | | |
3312 | | /** Get the input stream. |
3313 | | * @param yyscanner The scanner object. |
3314 | | */ |
3315 | | FILE *yyget_in (yyscan_t yyscanner) |
3316 | 0 | { |
3317 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3318 | 0 | return yyin; |
3319 | 0 | } |
3320 | | |
3321 | | /** Get the output stream. |
3322 | | * @param yyscanner The scanner object. |
3323 | | */ |
3324 | | FILE *yyget_out (yyscan_t yyscanner) |
3325 | 0 | { |
3326 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3327 | 0 | return yyout; |
3328 | 0 | } |
3329 | | |
3330 | | /** Get the length of the current token. |
3331 | | * @param yyscanner The scanner object. |
3332 | | */ |
3333 | | int yyget_leng (yyscan_t yyscanner) |
3334 | 0 | { |
3335 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3336 | 0 | return yyleng; |
3337 | 0 | } |
3338 | | |
3339 | | /** Get the current token. |
3340 | | * @param yyscanner The scanner object. |
3341 | | */ |
3342 | | |
3343 | | char *yyget_text (yyscan_t yyscanner) |
3344 | 0 | { |
3345 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3346 | 0 | return yytext; |
3347 | 0 | } |
3348 | | |
3349 | | /* %if-reentrant */ |
3350 | | |
3351 | | /** Set the user-defined data. This data is never touched by the scanner. |
3352 | | * @param user_defined The data to be associated with this scanner. |
3353 | | * @param yyscanner The scanner object. |
3354 | | */ |
3355 | | void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
3356 | 0 | { |
3357 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3358 | 0 | yyextra = user_defined ; |
3359 | 0 | } |
3360 | | |
3361 | | /* %endif */ |
3362 | | |
3363 | | /** Set the current line number. |
3364 | | * @param _line_number line number |
3365 | | * @param yyscanner The scanner object. |
3366 | | */ |
3367 | | void yyset_lineno (int _line_number , yyscan_t yyscanner) |
3368 | 0 | { |
3369 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3370 | | |
3371 | | /* lineno is only valid if an input buffer exists. */ |
3372 | 0 | if (! YY_CURRENT_BUFFER ) |
3373 | 0 | YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
3374 | | |
3375 | 0 | yylineno = _line_number; |
3376 | 0 | } |
3377 | | |
3378 | | /** Set the current column. |
3379 | | * @param _column_no column number |
3380 | | * @param yyscanner The scanner object. |
3381 | | */ |
3382 | | void yyset_column (int _column_no , yyscan_t yyscanner) |
3383 | 0 | { |
3384 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3385 | | |
3386 | | /* column is only valid if an input buffer exists. */ |
3387 | 0 | if (! YY_CURRENT_BUFFER ) |
3388 | 0 | YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
3389 | | |
3390 | 0 | yycolumn = _column_no; |
3391 | 0 | } |
3392 | | |
3393 | | /** Set the input stream. This does not discard the current |
3394 | | * input buffer. |
3395 | | * @param _in_str A readable stream. |
3396 | | * @param yyscanner The scanner object. |
3397 | | * @see yy_switch_to_buffer |
3398 | | */ |
3399 | | void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
3400 | 0 | { |
3401 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3402 | 0 | yyin = _in_str ; |
3403 | 0 | } |
3404 | | |
3405 | | void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
3406 | 0 | { |
3407 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3408 | 0 | yyout = _out_str ; |
3409 | 0 | } |
3410 | | |
3411 | | int yyget_debug (yyscan_t yyscanner) |
3412 | 0 | { |
3413 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3414 | 0 | return yy_flex_debug; |
3415 | 0 | } |
3416 | | |
3417 | | void yyset_debug (int _bdebug , yyscan_t yyscanner) |
3418 | 0 | { |
3419 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3420 | 0 | yy_flex_debug = _bdebug ; |
3421 | 0 | } |
3422 | | |
3423 | | /* %endif */ |
3424 | | |
3425 | | /* %if-reentrant */ |
3426 | | /* Accessor methods for yylval and yylloc */ |
3427 | | |
3428 | | /* %if-bison-bridge */ |
3429 | | /* %endif */ |
3430 | | |
3431 | | /* User-visible API */ |
3432 | | |
3433 | | /* yylex_init is special because it creates the scanner itself, so it is |
3434 | | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
3435 | | * That's why we explicitly handle the declaration, instead of using our macros. |
3436 | | */ |
3437 | | int yylex_init(yyscan_t* ptr_yy_globals) |
3438 | 0 | { |
3439 | 0 | if (ptr_yy_globals == NULL){ |
3440 | 0 | errno = EINVAL; |
3441 | 0 | return 1; |
3442 | 0 | } |
3443 | | |
3444 | 0 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
3445 | |
|
3446 | 0 | if (*ptr_yy_globals == NULL){ |
3447 | 0 | errno = ENOMEM; |
3448 | 0 | return 1; |
3449 | 0 | } |
3450 | | |
3451 | | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
3452 | 0 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
3453 | |
|
3454 | 0 | return yy_init_globals ( *ptr_yy_globals ); |
3455 | 0 | } |
3456 | | |
3457 | | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
3458 | | * convention of taking the scanner as the last argument. Note however, that |
3459 | | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
3460 | | * is the reason, too, why this function also must handle its own declaration). |
3461 | | * The user defined value in the first argument will be available to yyalloc in |
3462 | | * the yyextra field. |
3463 | | */ |
3464 | | int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
3465 | 0 | { |
3466 | 0 | struct yyguts_t dummy_yyguts; |
3467 | |
|
3468 | 0 | yyset_extra (yy_user_defined, &dummy_yyguts); |
3469 | |
|
3470 | 0 | if (ptr_yy_globals == NULL){ |
3471 | 0 | errno = EINVAL; |
3472 | 0 | return 1; |
3473 | 0 | } |
3474 | | |
3475 | 0 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
3476 | |
|
3477 | 0 | if (*ptr_yy_globals == NULL){ |
3478 | 0 | errno = ENOMEM; |
3479 | 0 | return 1; |
3480 | 0 | } |
3481 | | |
3482 | | /* By setting to 0xAA, we expose bugs in |
3483 | | yy_init_globals. Leave at 0x00 for releases. */ |
3484 | 0 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
3485 | |
|
3486 | 0 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
3487 | |
|
3488 | 0 | return yy_init_globals ( *ptr_yy_globals ); |
3489 | 0 | } |
3490 | | |
3491 | | /* %endif if-c-only */ |
3492 | | |
3493 | | /* %if-c-only */ |
3494 | | static int yy_init_globals (yyscan_t yyscanner) |
3495 | 0 | { |
3496 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3497 | | /* Initialization is the same as for the non-reentrant scanner. |
3498 | | * This function is called from yylex_destroy(), so don't allocate here. |
3499 | | */ |
3500 | |
|
3501 | 0 | yyg->yy_buffer_stack = NULL; |
3502 | 0 | yyg->yy_buffer_stack_top = 0; |
3503 | 0 | yyg->yy_buffer_stack_max = 0; |
3504 | 0 | yyg->yy_c_buf_p = NULL; |
3505 | 0 | yyg->yy_init = 0; |
3506 | 0 | yyg->yy_start = 0; |
3507 | |
|
3508 | 0 | yyg->yy_start_stack_ptr = 0; |
3509 | 0 | yyg->yy_start_stack_depth = 0; |
3510 | 0 | yyg->yy_start_stack = NULL; |
3511 | | |
3512 | | /* Defined in main.c */ |
3513 | | #ifdef YY_STDINIT |
3514 | | yyin = stdin; |
3515 | | yyout = stdout; |
3516 | | #else |
3517 | 0 | yyin = NULL; |
3518 | 0 | yyout = NULL; |
3519 | 0 | #endif |
3520 | | |
3521 | | /* For future reference: Set errno on error, since we are called by |
3522 | | * yylex_init() |
3523 | | */ |
3524 | 0 | return 0; |
3525 | 0 | } |
3526 | | /* %endif */ |
3527 | | |
3528 | | /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ |
3529 | | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
3530 | | int yylex_destroy (yyscan_t yyscanner) |
3531 | 0 | { |
3532 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3533 | | |
3534 | | /* Pop the buffer stack, destroying each element. */ |
3535 | 0 | while(YY_CURRENT_BUFFER){ |
3536 | 0 | yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
3537 | 0 | YY_CURRENT_BUFFER_LVALUE = NULL; |
3538 | 0 | yypop_buffer_state(yyscanner); |
3539 | 0 | } |
3540 | | |
3541 | | /* Destroy the stack itself. */ |
3542 | 0 | yyfree(yyg->yy_buffer_stack , yyscanner); |
3543 | 0 | yyg->yy_buffer_stack = NULL; |
3544 | | |
3545 | | /* Destroy the start condition stack. */ |
3546 | 0 | yyfree( yyg->yy_start_stack , yyscanner ); |
3547 | 0 | yyg->yy_start_stack = NULL; |
3548 | | |
3549 | | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
3550 | | * yylex() is called, initialization will occur. */ |
3551 | 0 | yy_init_globals( yyscanner); |
3552 | | |
3553 | | /* %if-reentrant */ |
3554 | | /* Destroy the main struct (reentrant only). */ |
3555 | 0 | yyfree ( yyscanner , yyscanner ); |
3556 | 0 | yyscanner = NULL; |
3557 | | /* %endif */ |
3558 | 0 | return 0; |
3559 | 0 | } |
3560 | | /* %endif */ |
3561 | | |
3562 | | /* |
3563 | | * Internal utility routines. |
3564 | | */ |
3565 | | |
3566 | | #ifndef yytext_ptr |
3567 | | static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
3568 | | { |
3569 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3570 | | (void)yyg; |
3571 | | |
3572 | | int i; |
3573 | | for ( i = 0; i < n; ++i ) |
3574 | | s1[i] = s2[i]; |
3575 | | } |
3576 | | #endif |
3577 | | |
3578 | | #ifdef YY_NEED_STRLEN |
3579 | | static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
3580 | | { |
3581 | | int n; |
3582 | | for ( n = 0; s[n]; ++n ) |
3583 | | ; |
3584 | | |
3585 | | return n; |
3586 | | } |
3587 | | #endif |
3588 | | |
3589 | | /* %if-tables-serialization definitions */ |
3590 | | /* %define-yytables The name for this specific scanner's tables. */ |
3591 | | #define YYTABLES_NAME "yytables" |
3592 | | /* %endif */ |
3593 | | |
3594 | | /* %ok-for-header */ |
3595 | | |
3596 | | #line 459 "/src/wireshark/epan/radius_dict.l" |
3597 | | |
3598 | | |
3599 | | /* |
3600 | | * Turn diagnostics back on, so we check the code that we've written. |
3601 | | */ |
3602 | | DIAG_ON_FLEX() |
3603 | | |
3604 | 0 | static void add_vendor(Radius_scanner_state_t* state, const char* name, uint32_t id, unsigned type_octets, unsigned length_octets, bool has_flags) { |
3605 | 0 | radius_vendor_info_t* v; |
3606 | |
|
3607 | 0 | v = (radius_vendor_info_t *)g_hash_table_lookup(state->dict->vendors_by_id, GUINT_TO_POINTER(id)); |
3608 | |
|
3609 | 0 | if (!v) { |
3610 | | /* |
3611 | | * New vendor. |
3612 | | * Allocate a new entry and insert it into the by-ID and |
3613 | | * by-name hash tables. |
3614 | | */ |
3615 | 0 | v = g_new(radius_vendor_info_t,1); |
3616 | 0 | v->attrs_by_id = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_radius_attr_info); |
3617 | 0 | v->code = id; |
3618 | 0 | v->ett = -1; |
3619 | 0 | v->name = g_strdup(name); |
3620 | 0 | v->type_octets = type_octets; |
3621 | 0 | v->length_octets = length_octets; |
3622 | 0 | v->has_flags = has_flags; |
3623 | |
|
3624 | 0 | g_hash_table_insert(state->dict->vendors_by_id,GUINT_TO_POINTER(v->code),v); |
3625 | 0 | g_hash_table_insert(state->dict->vendors_by_name, (void *) v->name, v); |
3626 | 0 | } else { |
3627 | | /* |
3628 | | * This vendor is already in the table. |
3629 | | * |
3630 | | * Assume that the dictionary knows the 'ground truth' about |
3631 | | * the type/length/has_flags information and thus allow the |
3632 | | * dictionary to overwrite these values even for vendors that |
3633 | | * have already been loaded. |
3634 | | * |
3635 | | * XXX - this could be due to the vendor being in multiple |
3636 | | * dictionary files, rather than having been specially |
3637 | | * entered by the RADIUS dissector, as a side effect of |
3638 | | * specially entering an attribute; should we report vendors |
3639 | | * that appear in different dictionaries with different |
3640 | | * properties? |
3641 | | */ |
3642 | 0 | v->type_octets = type_octets; |
3643 | 0 | v->length_octets = length_octets; |
3644 | 0 | v->has_flags = has_flags; |
3645 | | |
3646 | | /* |
3647 | | * Did the name change? |
3648 | | */ |
3649 | 0 | if (g_strcmp0(v->name, name) != 0) { |
3650 | | /* |
3651 | | * Yes. Remove the entry from the by-name hash table |
3652 | | * and re-insert it with the new name. |
3653 | | */ |
3654 | 0 | g_hash_table_remove(state->dict->vendors_by_name, (void *) v->name); |
3655 | 0 | g_free((void *) v->name); |
3656 | 0 | v->name = g_strdup(name); |
3657 | 0 | g_hash_table_insert(state->dict->vendors_by_name, (void *) v->name, v); |
3658 | 0 | } |
3659 | 0 | } |
3660 | 0 | } |
3661 | | |
3662 | 0 | static bool add_attribute(Radius_scanner_state_t* state, const char* name, const char* codestr, radius_attr_dissector_t type, const char* vendor, unsigned encrypted_flag, bool tagged, bool concat, const char* attr) { |
3663 | 0 | radius_attr_info_t* a; |
3664 | 0 | GHashTable* by_id; |
3665 | 0 | radius_attr_type_t code; |
3666 | 0 | uint8_t code0 = 0, code1 = 0; |
3667 | 0 | char *dot, *buf = NULL; |
3668 | |
|
3669 | 0 | if (attr){ |
3670 | 0 | return add_tlv(state, name, codestr, type, attr); |
3671 | 0 | } |
3672 | | |
3673 | 0 | buf = g_strdup(codestr); |
3674 | 0 | dot = strchr(codestr, '.'); |
3675 | 0 | if (dot) |
3676 | 0 | *dot = '\0'; |
3677 | 0 | code0 = (uint8_t) strtoul(buf, NULL, 10); |
3678 | 0 | if (dot) |
3679 | 0 | code1 = (uint8_t) strtoul(dot + 1, NULL, 10); |
3680 | 0 | g_free(buf); |
3681 | |
|
3682 | 0 | memset(&code, 0, sizeof(code)); |
3683 | 0 | if (vendor) { |
3684 | 0 | if (state->current_vendor_evs_type) { |
3685 | 0 | code.u8_code[0] = (uint8_t) state->current_vendor_evs_type; |
3686 | 0 | code.u8_code[1] = code0; |
3687 | 0 | } else { |
3688 | 0 | code.u8_code[0] = code0; |
3689 | 0 | code.u8_code[1] = 0; |
3690 | 0 | } |
3691 | |
|
3692 | 0 | radius_vendor_info_t* v = (radius_vendor_info_t *)g_hash_table_lookup(state->dict->vendors_by_name,vendor); |
3693 | 0 | if (! v) { |
3694 | 0 | g_string_append_printf(state->error, "Vendor: '%s', does not exist in %s:%i \n", vendor, state->fullpaths[state->include_stack_ptr], state->linenums[state->include_stack_ptr] ); |
3695 | 0 | return false; |
3696 | 0 | } else { |
3697 | 0 | by_id = v->attrs_by_id; |
3698 | 0 | } |
3699 | 0 | } else { |
3700 | 0 | code.u8_code[0] = code0; |
3701 | 0 | code.u8_code[1] = code1; |
3702 | |
|
3703 | 0 | by_id = state->dict->attrs_by_id; |
3704 | 0 | } |
3705 | | |
3706 | | /* |
3707 | | * XXX - FreeRADIUS dict.c enforces that concat can only be used with |
3708 | | * type radius_octets, not with any other flags, and not with VSAs. |
3709 | | */ |
3710 | | |
3711 | 0 | a=(radius_attr_info_t*)g_hash_table_lookup(by_id, GUINT_TO_POINTER(code.value)); |
3712 | |
|
3713 | 0 | if (!a) { |
3714 | | /* |
3715 | | * New attribute. |
3716 | | * Allocate a new entry and insert it into the by-ID and |
3717 | | * by-name hash tables. |
3718 | | */ |
3719 | 0 | a = g_new(radius_attr_info_t,1); |
3720 | 0 | a->code = code; |
3721 | 0 | a->name = g_strdup(name); |
3722 | 0 | a->dissector = NULL; |
3723 | 0 | a->encrypt = encrypted_flag; |
3724 | 0 | a->tagged = tagged; |
3725 | 0 | a->concat = concat; |
3726 | 0 | a->type = type; |
3727 | 0 | a->vs = NULL; |
3728 | 0 | a->hf = -1; |
3729 | 0 | a->hf_alt = -1; |
3730 | 0 | a->hf_enc = -1; |
3731 | 0 | a->hf_tag = -1; |
3732 | 0 | a->hf_len = -1; |
3733 | 0 | a->ett = -1; |
3734 | 0 | a->tlvs_by_id = NULL; |
3735 | 0 | g_hash_table_insert(by_id, GUINT_TO_POINTER(code.value),a); |
3736 | 0 | g_hash_table_insert(state->dict->attrs_by_name,(void *) (a->name),a); |
3737 | 0 | } else { |
3738 | | /* |
3739 | | * This attribute is already in the table. |
3740 | | * |
3741 | | * Overwrite the encrypted flag, tagged property, concat |
3742 | | * property, and type; the other properties don't get set |
3743 | | * until after we've finished reading the dictionaries. |
3744 | | * |
3745 | | * XXX - this could be due to the attribute being in |
3746 | | * multiple dictionary files, rather than having been |
3747 | | * specially entered by the RADIUS dissector to give it |
3748 | | * a special dissection routine; should we report attributes |
3749 | | * that appear in different dictionaries with different |
3750 | | * properties? |
3751 | | */ |
3752 | 0 | a->encrypt = encrypted_flag; |
3753 | 0 | a->tagged = tagged; |
3754 | 0 | a->concat = concat; |
3755 | 0 | a->type = type; |
3756 | | |
3757 | | /* |
3758 | | * Did the name change? |
3759 | | */ |
3760 | 0 | if (g_strcmp0(a->name, name) != 0) { |
3761 | | /* |
3762 | | * Yes. Steal the entry from the by-name hash table |
3763 | | * and re-insert it with the new name. (Don't |
3764 | | * remove it - that calls the free routine, which |
3765 | | * frees up the entry.) |
3766 | | */ |
3767 | 0 | g_hash_table_steal(state->dict->attrs_by_name, (void *) (a->name)); |
3768 | 0 | g_free((void *) a->name); |
3769 | 0 | a->name = g_strdup(name); |
3770 | 0 | g_hash_table_insert(state->dict->attrs_by_name, (void *) (a->name),a); |
3771 | 0 | } |
3772 | 0 | } |
3773 | 0 | return true; |
3774 | 0 | } |
3775 | | |
3776 | 0 | static bool add_tlv(Radius_scanner_state_t* state, const char* name, const char* codestr, radius_attr_dissector_t type, const char* attr) { |
3777 | 0 | radius_attr_info_t* a; |
3778 | 0 | radius_attr_info_t* s; |
3779 | 0 | radius_attr_type_t code; |
3780 | |
|
3781 | 0 | a = (radius_attr_info_t*)g_hash_table_lookup(state->dict->attrs_by_name, attr); |
3782 | |
|
3783 | 0 | if (!a) { |
3784 | 0 | a = (radius_attr_info_t*)g_hash_table_lookup(state->dict->tlvs_by_name, attr); |
3785 | 0 | } |
3786 | |
|
3787 | 0 | if (!a) { |
3788 | 0 | g_string_append_printf(state->error, "Attr: '%s', does not exist in %s:%i \n", attr, state->fullpaths[state->include_stack_ptr], state->linenums[state->include_stack_ptr]); |
3789 | 0 | return false; |
3790 | 0 | } |
3791 | | |
3792 | 0 | if (!a->tlvs_by_id) { |
3793 | 0 | a->tlvs_by_id = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_radius_attr_info); |
3794 | 0 | } |
3795 | |
|
3796 | 0 | memset(&code, 0, sizeof(code)); |
3797 | 0 | code.u8_code[0] = (uint8_t) strtoul(codestr, NULL, 10); |
3798 | |
|
3799 | 0 | s = (radius_attr_info_t*)g_hash_table_lookup(a->tlvs_by_id, GUINT_TO_POINTER(code.value)); |
3800 | |
|
3801 | 0 | if (!s) { |
3802 | | /* |
3803 | | * This TLV doesn't yet exist in this attribute's TLVs-by-ID |
3804 | | * hash table. Add it. |
3805 | | */ |
3806 | 0 | s = g_new(radius_attr_info_t,1); |
3807 | 0 | s->name = g_strdup(name); |
3808 | 0 | s->dissector = NULL; |
3809 | 0 | s->code = code; |
3810 | 0 | s->type = type; |
3811 | 0 | s->encrypt = false; |
3812 | 0 | s->tagged = false; |
3813 | 0 | s->concat = false; |
3814 | 0 | s->dissector = NULL; |
3815 | 0 | s->vs = NULL; |
3816 | 0 | s->hf = -1; |
3817 | 0 | s->hf_alt = -1; |
3818 | 0 | s->hf_tag = -1; |
3819 | 0 | s->hf_len = -1; |
3820 | 0 | s->ett = -1; |
3821 | 0 | s->tlvs_by_id = NULL; |
3822 | |
|
3823 | 0 | g_hash_table_insert(a->tlvs_by_id,GUINT_TO_POINTER(s->code.value),s); |
3824 | 0 | g_hash_table_insert(state->dict->tlvs_by_name,(void *) (s->name),s); |
3825 | 0 | } |
3826 | | |
3827 | | /* |
3828 | | * If it *does* exist, leave it alone; there shouldn't be duplicate |
3829 | | * entries by name in the dictionaries (even if there might be |
3830 | | * multiple entries for a given attribute in the dictionaries, each |
3831 | | * one adding some TLV values), and we don't directly add entries |
3832 | | * for TLVs in the RADIUS dissector. |
3833 | | * |
3834 | | * XXX - report the duplicate entries? |
3835 | | */ |
3836 | 0 | return true; |
3837 | 0 | } |
3838 | | |
3839 | 0 | void add_value(Radius_scanner_state_t* state, const char* attrib_name, const char* repr, uint32_t value) { |
3840 | 0 | value_string v; |
3841 | 0 | GArray* a = (GArray*)g_hash_table_lookup(state->value_strings,attrib_name); |
3842 | |
|
3843 | 0 | if (! a) { |
3844 | | /* Ensure that the array is zero terminated. */ |
3845 | 0 | a = g_array_new(true, true, sizeof(value_string)); |
3846 | 0 | g_hash_table_insert(state->value_strings, g_strdup(attrib_name), a); |
3847 | 0 | } |
3848 | |
|
3849 | 0 | v.value = value; |
3850 | 0 | v.strptr = g_strdup(repr); |
3851 | |
|
3852 | 0 | g_array_append_val(a,v); |
3853 | 0 | } |
3854 | | |
3855 | 0 | static void setup_tlvs(void *k _U_, void *v, void *p) { |
3856 | 0 | radius_attr_info_t* s = (radius_attr_info_t*)v; |
3857 | 0 | Radius_scanner_state_t* state = (Radius_scanner_state_t*)p; |
3858 | 0 | void *key; |
3859 | |
|
3860 | 0 | union { |
3861 | 0 | GArray* a; |
3862 | 0 | void *p; |
3863 | 0 | } vs; |
3864 | |
|
3865 | 0 | if (g_hash_table_lookup_extended(state->value_strings, s->name, &key, &vs.p)) { |
3866 | 0 | g_hash_table_steal(state->value_strings, key); |
3867 | 0 | s->vs = (value_string*)(void *)g_array_free(vs.a, false); |
3868 | 0 | g_free(key); |
3869 | 0 | } |
3870 | |
|
3871 | 0 | if (s->tlvs_by_id) { |
3872 | 0 | g_hash_table_foreach(s->tlvs_by_id, setup_tlvs, p); |
3873 | 0 | } |
3874 | 0 | } |
3875 | | |
3876 | 0 | static void setup_attrs(void *k _U_, void *v, void *p) { |
3877 | 0 | radius_attr_info_t* a = (radius_attr_info_t*)v; |
3878 | 0 | Radius_scanner_state_t* state = (Radius_scanner_state_t*)p; |
3879 | 0 | void *key; |
3880 | |
|
3881 | 0 | union { |
3882 | 0 | GArray* a; |
3883 | 0 | void *p; |
3884 | 0 | } vs; |
3885 | |
|
3886 | 0 | if (g_hash_table_lookup_extended(state->value_strings, a->name, &key, &vs.p) ) { |
3887 | 0 | g_hash_table_steal(state->value_strings, key); |
3888 | 0 | g_array_sort(vs.a, value_str_value_compare); |
3889 | 0 | a->vs = (value_string*)(void *)g_array_free(vs.a, false); |
3890 | 0 | g_free(key); |
3891 | 0 | } |
3892 | |
|
3893 | 0 | if (a->tlvs_by_id) { |
3894 | 0 | g_hash_table_foreach(a->tlvs_by_id, setup_tlvs, p); |
3895 | 0 | } |
3896 | 0 | } |
3897 | | |
3898 | 0 | static void setup_vendors(void *k _U_, void *v, void *p) { |
3899 | 0 | radius_vendor_info_t* vnd = (radius_vendor_info_t*)v; |
3900 | |
|
3901 | 0 | g_hash_table_foreach(vnd->attrs_by_id,setup_attrs,p); |
3902 | 0 | } |
3903 | | |
3904 | 0 | static void destroy_value_strings(void *v) { |
3905 | 0 | value_string* vs = (value_string*)(void *)(((GArray*)v)->data); |
3906 | |
|
3907 | 0 | for (;vs->strptr;vs++) { |
3908 | 0 | g_free((void*)vs->strptr); |
3909 | 0 | } |
3910 | |
|
3911 | 0 | g_array_free((GArray*)v,true); |
3912 | 0 | } |
3913 | | |
3914 | 0 | bool radius_load_dictionary (radius_dictionary_t* d, char* dir, const char* filename, char** err_str) { |
3915 | 0 | FILE *in; |
3916 | 0 | yyscan_t scanner; |
3917 | 0 | Radius_scanner_state_t state; |
3918 | 0 | int i; |
3919 | |
|
3920 | 0 | state.include_stack_ptr = 0; |
3921 | |
|
3922 | 0 | state.dict = d; |
3923 | 0 | state.value_strings = NULL; |
3924 | |
|
3925 | 0 | state.attr_name = NULL; |
3926 | 0 | state.attr_id = NULL; |
3927 | 0 | state.attr_type = NULL; |
3928 | 0 | state.attr_vendor = NULL; |
3929 | 0 | state.vendor_name = NULL; |
3930 | 0 | state.vendor_id = 0; |
3931 | 0 | state.vendor_type_octets = 1; |
3932 | 0 | state.vendor_length_octets = 1; |
3933 | 0 | state.vendor_has_flags = false; |
3934 | 0 | state.value_repr = NULL; |
3935 | 0 | state.encrypted = 0; |
3936 | 0 | state.has_tag = false; |
3937 | 0 | state.concat = false; |
3938 | 0 | state.current_vendor = NULL; |
3939 | 0 | state.current_vendor_evs_type = 0; |
3940 | |
|
3941 | 0 | state.directory = g_strdup(dir); |
3942 | |
|
3943 | 0 | state.fullpaths[0] = ws_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", |
3944 | 0 | state.directory,filename); |
3945 | 0 | state.linenums[0] = 1; |
3946 | 0 | state.tlv_stack[0] = NULL; |
3947 | 0 | for (i = 1; i < MAX_INCLUDE_DEPTH; i++) { |
3948 | 0 | state.fullpaths[i] = NULL; |
3949 | 0 | state.linenums[i] = 1; |
3950 | 0 | state.tlv_stack[i] = NULL; |
3951 | 0 | } |
3952 | |
|
3953 | 0 | state.tlv_stack_ptr = 0; |
3954 | |
|
3955 | 0 | state.error = g_string_new(""); |
3956 | |
|
3957 | 0 | in = ws_fopen(state.fullpaths[0],"r"); |
3958 | |
|
3959 | 0 | if (!in) { |
3960 | 0 | g_string_append_printf(state.error, "Could not open file: '%s', error: %s\n", state.fullpaths[0], g_strerror(errno)); |
3961 | 0 | g_free(state.fullpaths[0]); |
3962 | 0 | *err_str = g_string_free(state.error,FALSE); |
3963 | 0 | return false; |
3964 | 0 | } |
3965 | | |
3966 | 0 | state.value_strings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, destroy_value_strings); |
3967 | |
|
3968 | 0 | if (Radius_lex_init(&scanner) != 0) { |
3969 | 0 | g_string_append_printf(state.error, "Can't initialize scanner: %s", |
3970 | 0 | strerror(errno)); |
3971 | 0 | fclose(in); |
3972 | 0 | g_free(state.fullpaths[0]); |
3973 | 0 | *err_str = g_string_free(state.error,FALSE); |
3974 | 0 | return false; |
3975 | 0 | } |
3976 | | |
3977 | 0 | Radius_set_in(in, scanner); |
3978 | | |
3979 | | /* Associate the state with the scanner */ |
3980 | 0 | Radius_set_extra(&state, scanner); |
3981 | |
|
3982 | 0 | Radius_lex(scanner); |
3983 | |
|
3984 | 0 | Radius_lex_destroy(scanner); |
3985 | | /* |
3986 | | * XXX - can the lexical analyzer terminate without closing |
3987 | | * all open input files? |
3988 | | */ |
3989 | |
|
3990 | 0 | for (i = 0; i < MAX_INCLUDE_DEPTH; i++) { |
3991 | 0 | g_free(state.fullpaths[i]); |
3992 | 0 | g_free(state.tlv_stack[i]); |
3993 | 0 | } |
3994 | |
|
3995 | 0 | g_hash_table_foreach(state.dict->attrs_by_id,setup_attrs,&state); |
3996 | 0 | g_hash_table_foreach(state.dict->vendors_by_id,setup_vendors,&state); |
3997 | 0 | g_hash_table_destroy(state.value_strings); |
3998 | |
|
3999 | 0 | if (state.error->len > 0) { |
4000 | 0 | *err_str = g_string_free(state.error,FALSE); |
4001 | 0 | return false; |
4002 | 0 | } else { |
4003 | 0 | *err_str = NULL; |
4004 | 0 | g_string_free(state.error,TRUE); |
4005 | 0 | return true; |
4006 | 0 | } |
4007 | 0 | } |
4008 | | |
4009 | | /* |
4010 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
4011 | | * |
4012 | | * Local variables: |
4013 | | * c-basic-offset: 8 |
4014 | | * tab-width: 8 |
4015 | | * indent-tabs-mode: t |
4016 | | * End: |
4017 | | * |
4018 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
4019 | | * :indentSize=8:tabSize=8:noTabs=false: |
4020 | | */ |
4021 | | |