Debian Codegraph @

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