Debian Codegraph @

src/proxy/namespaces_lex.c.in

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