1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4 * $Header: /usr/local/CVS/ssldump/ssl/lex.yy.c,v 1.2 2002/04/15 16:53:59 ekr Exp $
5 * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
6 */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11
12 #include <stdio.h>
13
14
15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
16 #ifdef c_plusplus
17 #ifndef __cplusplus
18 #define __cplusplus
19 #endif
20 #endif
21
22
23 #ifdef __cplusplus
24
25 #include <stdlib.h>
26 #include <unistd.h>
27
28 /* Use prototypes in function declarations. */
29 #define YY_USE_PROTOS
30
31 /* The "const" storage-class-modifier is valid. */
32 #define YY_USE_CONST
33
34 #else /* ! __cplusplus */
35
36 #if __STDC__
37
38 #define YY_USE_PROTOS
39 #define YY_USE_CONST
40
41 #endif /* __STDC__ */
42 #endif /* ! __cplusplus */
43
44 #ifdef __TURBOC__
45 #pragma warn -rch
46 #pragma warn -use
47 #include <io.h>
48 #include <stdlib.h>
49 #define YY_USE_CONST
50 #define YY_USE_PROTOS
51 #endif
52
53 #ifdef YY_USE_CONST
54 #define yyconst const
55 #else
56 #define yyconst
57 #endif
58
59
60 #ifdef YY_USE_PROTOS
61 #define YY_PROTO(proto) proto
62 #else
63 #define YY_PROTO(proto) ()
64 #endif
65
66 /* Returned upon end-of-file. */
67 #define YY_NULL 0
68
69 /* Promotes a possibly negative, possibly signed char to an unsigned
70 * integer for use as an array index. If the signed char is negative,
71 * we want to instead treat it as an 8-bit unsigned char, hence the
72 * double cast.
73 */
74 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75
76 /* Enter a start condition. This macro really ought to take a parameter,
77 * but we do it the disgusting crufty way forced on us by the ()-less
78 * definition of BEGIN.
79 */
80 #define BEGIN yy_start = 1 + 2 *
81
82 /* Translate the current start state into a value that can be later handed
83 * to BEGIN to return to the state. The YYSTATE alias is for lex
84 * compatibility.
85 */
86 #define YY_START ((yy_start - 1) / 2)
87 #define YYSTATE YY_START
88
89 /* Action number for EOF rule of a given start state. */
90 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91
92 /* Special action meaning "start processing a new file". */
93 #define YY_NEW_FILE yyrestart( yyin )
94
95 #define YY_END_OF_BUFFER_CHAR 0
96
97 /* Size of default input buffer. */
98 #define YY_BUF_SIZE 16384
99
100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
101
102 extern int yyleng;
103 extern FILE *yyin, *yyout;
104
105 #define EOB_ACT_CONTINUE_SCAN 0
106 #define EOB_ACT_END_OF_FILE 1
107 #define EOB_ACT_LAST_MATCH 2
108
109 /* The funky do-while in the following #define is used to turn the definition
110 * int a single C statement (which needs a semi-colon terminator). This
111 * avoids problems with code like:
112 *
113 * if ( condition_holds )
114 * yyless( 5 );
115 * else
116 * do_something_else();
117 *
118 * Prior to using the do-while the compiler would get upset at the
119 * "else" because it interpreted the "if" statement as being all
120 * done when it reached the ';' after the yyless() call.
121 */
122
123 /* Return all but the first 'n' matched characters back to the input stream. */
124
125 #define yyless(n) \
126 do \
127 { \
128 /* Undo effects of setting up yytext. */ \
129 *yy_cp = yy_hold_char; \
130 YY_RESTORE_YY_MORE_OFFSET \
131 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
132 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133 } \
134 while ( 0 )
135
136 #define unput(c) yyunput( c, yytext_ptr )
137
138 /* The following is because we cannot portably get our hands on size_t
139 * (without autoconf's help, which isn't available because we want
140 * flex-generated scanners to compile on their own).
141 */
142 typedef unsigned int yy_size_t;
143
144
145 struct yy_buffer_state
146 {
147 FILE *yy_input_file;
148
149 char *yy_ch_buf; /* input buffer */
150 char *yy_buf_pos; /* current position in input buffer */
151
152 /* Size of input buffer in bytes, not including room for EOB
153 * characters.
154 */
155 yy_size_t yy_buf_size;
156
157 /* Number of characters read into yy_ch_buf, not including EOB
158 * characters.
159 */
160 int yy_n_chars;
161
162 /* Whether we "own" the buffer - i.e., we know we created it,
163 * and can realloc() it to grow it, and should free() it to
164 * delete it.
165 */
166 int yy_is_our_buffer;
167
168 /* Whether this is an "interactive" input source; if so, and
169 * if we're using stdio for input, then we want to use getc()
170 * instead of fread(), to make sure we stop fetching input after
171 * each newline.
172 */
173 int yy_is_interactive;
174
175 /* Whether we're considered to be at the beginning of a line.
176 * If so, '^' rules will be active on the next match, otherwise
177 * not.
178 */
179 int yy_at_bol;
180
181 /* Whether to try to fill the input buffer when we reach the
182 * end of it.
183 */
184 int yy_fill_buffer;
185
186 int yy_buffer_status;
187 #define YY_BUFFER_NEW 0
188 #define YY_BUFFER_NORMAL 1
189 /* When an EOF's been seen but there's still some text to process
190 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
191 * shouldn't try reading from the input source any more. We might
192 * still have a bunch of tokens to match, though, because of
193 * possible backing-up.
194 *
195 * When we actually see the EOF, we change the status to "new"
196 * (via yyrestart()), so that the user can continue scanning by
197 * just pointing yyin at a new input file.
198 */
199 #define YY_BUFFER_EOF_PENDING 2
200 };
201
202 static YY_BUFFER_STATE yy_current_buffer = 0;
203
204 /* We provide macros for accessing buffer states in case in the
205 * future we want to put the buffer states in a more general
206 * "scanner state".
207 */
208 #define YY_CURRENT_BUFFER yy_current_buffer
209
210
211 /* yy_hold_char holds the character lost when yytext is formed. */
212 static char yy_hold_char;
213
214 static int yy_n_chars; /* number of characters read into yy_ch_buf */
215
216
217 int yyleng;
218
219 /* Points to current character in buffer. */
220 static char *yy_c_buf_p = (char *) 0;
221 static int yy_init = 1; /* whether we need to initialize */
222 static int yy_start = 0; /* start state number */
223
224 /* Flag which is used to allow yywrap()'s to do buffer switches
225 * instead of setting up a fresh yyin. A bit of a hack ...
226 */
227 static int yy_did_buffer_switch_on_eof;
228
229 void yyrestart YY_PROTO(( FILE *input_file ));
230
231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
232 void yy_load_buffer_state YY_PROTO(( void ));
233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238
239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242
243 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
245 static void yy_flex_free YY_PROTO(( void * ));
246
247 #define yy_new_buffer yy_create_buffer
248
249 #define yy_set_interactive(is_interactive) \
250 { \
251 if ( ! yy_current_buffer ) \
252 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
253 yy_current_buffer->yy_is_interactive = is_interactive; \
254 }
255
256 #define yy_set_bol(at_bol) \
257 { \
258 if ( ! yy_current_buffer ) \
259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260 yy_current_buffer->yy_at_bol = at_bol; \
261 }
262
263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264
265
266 #define YY_USES_REJECT
267 typedef unsigned char YY_CHAR;
268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
270 extern int yylineno;
271 int yylineno = 1;
272 extern char *yytext;
273 #define yytext_ptr yytext
274
275 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
276 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
277 static int yy_get_next_buffer YY_PROTO(( void ));
278 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
279
280 /* Done after the current pattern has been matched and before the
281 * corresponding action - sets up yytext.
282 */
283 #define YY_DO_BEFORE_ACTION \
284 yytext_ptr = yy_bp; \
285 yyleng = (int) (yy_cp - yy_bp); \
286 yy_hold_char = *yy_cp; \
287 *yy_cp = '\0'; \
288 yy_c_buf_p = yy_cp;
289
290 #define YY_NUM_RULES 32
291 #define YY_END_OF_BUFFER 33
292 static yyconst short int yy_acclist[153] =
293 { 0,
294 33, 31, 32, 12, 31, 32, 12, 32, 18, 31,
295 32, 19, 31, 32, 26, 31, 32, 29, 31, 32,
296 27, 31, 32, 31, 32, 14, 31, 32, 14, 31,
297 32, 25, 31, 32, 24, 31, 32, 22, 31, 32,
298 30, 31, 32, 23, 31, 32, 31, 32, 20, 31,
299 32, 21, 31, 32, 28, 31, 32, 31, 32, 31,
300 32, 31, 32, 31, 32, 31, 32, 31, 32, 16,
301 31, 32, 17, 31, 32, 12, 1, 14, 13, 13,
302 13, 13, 13, 13, 13, 13, 13, 15, 13, 13,
303 13, 13, 13, 13, 13, 13, 10, 9, 13, 13,
304
305 13, 2, 13, 13, 13, 13, 13, 13, 13, 13,
306 13, 13, 13, 11, 13, 13, 4, 13, 13, 5,
307 13, 3, 13, 13, 13, 13, 6, 13, 13, 13,
308 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
309 13, 13, 13, 13, 7, 13, 13, 13, 13, 13,
310 8, 13
311 } ;
312
313 static yyconst short int yy_accept[110] =
314 { 0,
315 1, 1, 1, 2, 4, 7, 9, 12, 15, 18,
316 21, 24, 26, 29, 32, 35, 38, 41, 44, 47,
317 49, 52, 55, 58, 60, 62, 64, 66, 68, 70,
318 73, 76, 77, 78, 78, 79, 79, 80, 81, 82,
319 83, 84, 85, 86, 87, 88, 88, 88, 88, 89,
320 90, 91, 92, 93, 94, 95, 96, 97, 97, 98,
321 100, 101, 102, 104, 105, 106, 107, 108, 108, 109,
322 110, 111, 112, 113, 114, 115, 116, 117, 119, 120,
323 122, 124, 125, 126, 127, 129, 130, 131, 132, 133,
324 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
325
326 144, 145, 147, 148, 149, 150, 151, 153, 153
327 } ;
328
329 static yyconst int yy_ec[256] =
330 { 0,
331 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
332 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 2, 1, 1, 1, 1, 1, 1, 1, 4,
335 5, 6, 1, 7, 8, 9, 10, 11, 12, 12,
336 12, 12, 12, 12, 12, 12, 12, 13, 14, 15,
337 16, 17, 1, 18, 19, 19, 19, 19, 19, 19,
338 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
339 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
340 20, 1, 21, 22, 23, 1, 24, 25, 26, 27,
341
342 28, 19, 29, 19, 30, 19, 31, 32, 33, 34,
343 35, 36, 37, 38, 39, 40, 41, 19, 19, 42,
344 43, 19, 44, 1, 45, 1, 1, 1, 1, 1,
345 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
348 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
349 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
350 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
351 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
352
353 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
354 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
355 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1
359 } ;
360
361 static yyconst int yy_meta[46] =
362 { 0,
363 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
364 4, 4, 1, 1, 1, 1, 1, 5, 4, 1,
365 1, 1, 2, 4, 4, 4, 4, 4, 4, 4,
366 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
367 4, 4, 4, 1, 1
368 } ;
369
370 static yyconst short int yy_base[113] =
371 { 0,
372 0, 0, 141, 142, 44, 46, 142, 142, 142, 142,
373 131, 133, 39, 41, 142, 142, 142, 142, 142, 0,
374 142, 142, 142, 30, 108, 103, 100, 94, 27, 116,
375 142, 54, 142, 127, 47, 0, 0, 93, 97, 101,
376 88, 104, 102, 94, 87, 0, 118, 54, 0, 95,
377 83, 91, 87, 82, 86, 89, 75, 97, 142, 0,
378 74, 73, 0, 71, 81, 84, 83, 63, 83, 82,
379 77, 78, 63, 62, 142, 67, 68, 0, 91, 0,
380 0, 58, 65, 65, 0, 52, 66, 79, 40, 41,
381 71, 48, 49, 47, 41, 40, 47, 44, 33, 43,
382
383 26, 0, 32, 26, 35, 35, 0, 142, 80, 84,
384 57, 89
385 } ;
386
387 static yyconst short int yy_def[113] =
388 { 0,
389 108, 1, 108, 108, 108, 108, 108, 108, 108, 108,
390 108, 108, 108, 108, 108, 108, 108, 108, 108, 109,
391 108, 108, 108, 109, 109, 109, 109, 109, 109, 108,
392 108, 108, 108, 110, 108, 111, 109, 109, 109, 109,
393 109, 109, 109, 109, 109, 112, 110, 110, 111, 109,
394 109, 109, 109, 109, 109, 109, 109, 112, 108, 109,
395 109, 109, 109, 109, 109, 109, 109, 108, 109, 109,
396 109, 109, 109, 109, 108, 109, 109, 109, 109, 109,
397 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
398 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
399
400 109, 109, 109, 109, 109, 109, 109, 0, 108, 108,
401 108, 108
402 } ;
403
404 static yyconst short int yy_nxt[188] =
405 { 0,
406 4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
407 13, 14, 15, 16, 17, 18, 19, 4, 20, 21,
408 22, 23, 4, 20, 20, 24, 25, 26, 20, 20,
409 20, 20, 20, 20, 27, 28, 20, 20, 29, 20,
410 20, 20, 20, 30, 31, 32, 32, 32, 32, 35,
411 35, 35, 35, 38, 44, 32, 32, 35, 35, 48,
412 49, 107, 106, 59, 39, 105, 45, 104, 103, 102,
413 101, 100, 99, 98, 97, 96, 95, 94, 93, 92,
414 36, 37, 91, 37, 47, 47, 90, 47, 47, 58,
415 58, 58, 58, 89, 88, 87, 86, 85, 84, 83,
416
417 82, 81, 80, 79, 78, 77, 76, 75, 74, 73,
418 72, 71, 70, 69, 68, 67, 66, 65, 64, 63,
419 62, 61, 60, 48, 57, 56, 55, 54, 53, 52,
420 51, 50, 48, 46, 43, 42, 41, 40, 34, 33,
421 108, 3, 108, 108, 108, 108, 108, 108, 108, 108,
422 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
423 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
424 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
425 108, 108, 108, 108, 108, 108, 108
426 } ;
427
428 static yyconst short int yy_chk[188] =
429 { 0,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 5, 5, 6, 6, 13,
435 13, 14, 14, 24, 29, 32, 32, 35, 35, 48,
436 111, 106, 105, 48, 24, 104, 29, 103, 101, 100,
437 99, 98, 97, 96, 95, 94, 93, 92, 91, 90,
438 13, 109, 89, 109, 110, 110, 88, 110, 110, 112,
439 112, 112, 112, 87, 86, 84, 83, 82, 79, 77,
440
441 76, 74, 73, 72, 71, 70, 69, 68, 67, 66,
442 65, 64, 62, 61, 58, 57, 56, 55, 54, 53,
443 52, 51, 50, 47, 45, 44, 43, 42, 41, 40,
444 39, 38, 34, 30, 28, 27, 26, 25, 12, 11,
445 3, 108, 108, 108, 108, 108, 108, 108, 108, 108,
446 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
447 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
448 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
449 108, 108, 108, 108, 108, 108, 108
450 } ;
451
452 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
453 static char *yy_full_match;
454 static int yy_lp;
455 #define REJECT \
456 { \
457 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
458 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
459 ++yy_lp; \
460 goto find_rule; \
461 }
462 #define yymore() yymore_used_but_not_detected
463 #define YY_MORE_ADJ 0
464 #define YY_RESTORE_YY_MORE_OFFSET
465 char *yytext;
466 #line 1 "ssl.l"
467 #define INITIAL 0
468 #line 4 "ssl.l"
469 #include "y.tab.h"
470
471 #if 0
472 #define RETURN(x) printf("TOK:%s\n",#x); return(x)
473 #else
474 #define RETURN return
475 #endif
476
477 long strtol();
478 #line 479 "lex.yy.c"
479
480 /* Macros after this point can all be overridden by user definitions in
481 * section 1.
482 */
483
484 #ifndef YY_SKIP_YYWRAP
485 #ifdef __cplusplus
486 extern "C" int yywrap YY_PROTO(( void ));
487 #else
488 extern int yywrap YY_PROTO(( void ));
489 #endif
490 #endif
491
492 #ifndef YY_NO_UNPUT
493 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
494 #endif
495
496 #ifndef yytext_ptr
497 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
498 #endif
499
500 #ifdef YY_NEED_STRLEN
501 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
502 #endif
503
504 #ifndef YY_NO_INPUT
505 #ifdef __cplusplus
506 static int yyinput YY_PROTO(( void ));
507 #else
508 static int input YY_PROTO(( void ));
509 #endif
510 #endif
511
512 #if YY_STACK_USED
513 static int yy_start_stack_ptr = 0;
514 static int yy_start_stack_depth = 0;
515 static int *yy_start_stack = 0;
516 #ifndef YY_NO_PUSH_STATE
517 static void yy_push_state YY_PROTO(( int new_state ));
518 #endif
519 #ifndef YY_NO_POP_STATE
520 static void yy_pop_state YY_PROTO(( void ));
521 #endif
522 #ifndef YY_NO_TOP_STATE
523 static int yy_top_state YY_PROTO(( void ));
524 #endif
525
526 #else
527 #define YY_NO_PUSH_STATE 1
528 #define YY_NO_POP_STATE 1
529 #define YY_NO_TOP_STATE 1
530 #endif
531
532 #ifdef YY_MALLOC_DECL
533 YY_MALLOC_DECL
534 #else
535 #if __STDC__
536 #ifndef __cplusplus
537 #include <stdlib.h>
538 #endif
539 #else
540 /* Just try to get by without declaring the routines. This will fail
541 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
542 * or sizeof(void*) != sizeof(int).
543 */
544 #endif
545 #endif
546
547 /* Amount of stuff to slurp up with each read. */
548 #ifndef YY_READ_BUF_SIZE
549 #define YY_READ_BUF_SIZE 8192
550 #endif
551
552 /* Copy whatever the last rule matched to the standard output. */
553
554 #ifndef ECHO
555 /* This used to be an fputs(), but since the string might contain NUL's,
556 * we now use fwrite().
557 */
558 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
559 #endif
560
561 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
562 * is returned in "result".
563 */
564 #ifndef YY_INPUT
565 #define YY_INPUT(buf,result,max_size) \
566 if ( yy_current_buffer->yy_is_interactive ) \
567 { \
568 int c = '*', n; \
569 for ( n = 0; n < max_size && \
570 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
571 buf[n] = (char) c; \
572 if ( c == '\n' ) \
573 buf[n++] = (char) c; \
574 if ( c == EOF && ferror( yyin ) ) \
575 YY_FATAL_ERROR( "input in flex scanner failed" ); \
576 result = n; \
577 } \
578 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
579 && ferror( yyin ) ) \
580 YY_FATAL_ERROR( "input in flex scanner failed" );
581 #endif
582
583 /* No semi-colon after return; correct usage is to write "yyterminate();" -
584 * we don't want an extra ';' after the "return" because that will cause
585 * some compilers to complain about unreachable statements.
586 */
587 #ifndef yyterminate
588 #define yyterminate() return YY_NULL
589 #endif
590
591 /* Number of entries by which start-condition stack grows. */
592 #ifndef YY_START_STACK_INCR
593 #define YY_START_STACK_INCR 25
594 #endif
595
596 /* Report a fatal error. */
597 #ifndef YY_FATAL_ERROR
598 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
599 #endif
600
601 /* Default declaration of generated scanner - a define so the user can
602 * easily add parameters.
603 */
604 #ifndef YY_DECL
605 #define YY_DECL int yylex YY_PROTO(( void ))
606 #endif
607
608 /* Code executed at the beginning of each rule, after yytext and yyleng
609 * have been set up.
610 */
611 #ifndef YY_USER_ACTION
612 #define YY_USER_ACTION
613 #endif
614
615 /* Code executed at the end of each rule. */
616 #ifndef YY_BREAK
617 #define YY_BREAK break;
618 #endif
619
620 #define YY_RULE_SETUP \
621 YY_USER_ACTION
622
623 YY_DECL
624 {
625 register yy_state_type yy_current_state;
626 register char *yy_cp, *yy_bp;
627 register int yy_act;
628
629 #line 23 "ssl.l"
630
631
632 #line 633 "lex.yy.c"
633
634 if ( yy_init )
635 {
636 yy_init = 0;
637
638 #ifdef YY_USER_INIT
639 YY_USER_INIT;
640 #endif
641
642 if ( ! yy_start )
643 yy_start = 1; /* first start state */
644
645 if ( ! yyin )
646 yyin = stdin;
647
648 if ( ! yyout )
649 yyout = stdout;
650
651 if ( ! yy_current_buffer )
652 yy_current_buffer =
653 yy_create_buffer( yyin, YY_BUF_SIZE );
654
655 yy_load_buffer_state();
656 }
657
658 while ( 1 ) /* loops until end-of-file is reached */
659 {
660 yy_cp = yy_c_buf_p;
661
662 /* Support of yytext. */
663 *yy_cp = yy_hold_char;
664
665 /* yy_bp points to the position in yy_ch_buf of the start of
666 * the current run.
667 */
668 yy_bp = yy_cp;
669
670 yy_current_state = yy_start;
671 yy_state_ptr = yy_state_buf;
672 *yy_state_ptr++ = yy_current_state;
673 yy_match:
674 do
675 {
676 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
677 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
678 {
679 yy_current_state = (int) yy_def[yy_current_state];
680 if ( yy_current_state >= 109 )
681 yy_c = yy_meta[(unsigned int) yy_c];
682 }
683 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
684 *yy_state_ptr++ = yy_current_state;
685 ++yy_cp;
686 }
687 while ( yy_base[yy_current_state] != 142 );
688
689 yy_find_action:
690 yy_current_state = *--yy_state_ptr;
691 yy_lp = yy_accept[yy_current_state];
692 find_rule: /* we branch to this label when backing up */
693 for ( ; ; ) /* until we find what rule we matched */
694 {
695 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
696 {
697 yy_act = yy_acclist[yy_lp];
698 {
699 yy_full_match = yy_cp;
700 break;
701 }
702 }
703 --yy_cp;
704 yy_current_state = *--yy_state_ptr;
705 yy_lp = yy_accept[yy_current_state];
706 }
707
708 YY_DO_BEFORE_ACTION;
709
710 if ( yy_act != YY_END_OF_BUFFER )
711 {
712 int yyl;
713 for ( yyl = 0; yyl < yyleng; ++yyl )
714 if ( yytext[yyl] == '\n' )
715 ++yylineno;
716 }
717
718 do_action: /* This label is used only to access EOF actions. */
719
720
721 switch ( yy_act )
722 { /* beginning of action switch */
723 case 1:
724 YY_RULE_SETUP
725 #line 25 "ssl.l"
726 {RETURN(DOT_DOT_);}
727 YY_BREAK
728 case 2:
729 YY_RULE_SETUP
730 #line 26 "ssl.l"
731 {RETURN(ENUM_);}
732 YY_BREAK
733 case 3:
734 YY_RULE_SETUP
735 #line 27 "ssl.l"
736 {RETURN(STRUCT_);}
737 YY_BREAK
738 case 4:
739 YY_RULE_SETUP
740 #line 28 "ssl.l"
741 {mkname();RETURN(OPAQUE_);}
742 YY_BREAK
743 case 5:
744 YY_RULE_SETUP
745 #line 29 "ssl.l"
746 {RETURN(SELECT_);}
747 YY_BREAK
748 case 6:
749 YY_RULE_SETUP
750 #line 30 "ssl.l"
751 {RETURN(CONSTANT_);}
752 YY_BREAK
753 case 7:
754 YY_RULE_SETUP
755 #line 31 "ssl.l"
756 {/* Do nothing*/}
757 YY_BREAK
758 case 8:
759 YY_RULE_SETUP
760 #line 32 "ssl.l"
761 {/* Do nothing*/}
762 YY_BREAK
763 case 9:
764 YY_RULE_SETUP
765 #line 33 "ssl.l"
766 {RETURN(CASE_);}
767 YY_BREAK
768 case 10:
769 YY_RULE_SETUP
770 #line 34 "ssl.l"
771 { /*Do nothing*/}
772 YY_BREAK
773 case 11:
774 YY_RULE_SETUP
775 #line 35 "ssl.l"
776 { strcpy(yylval.str,yytext); RETURN(CODE_);}
777 YY_BREAK
778 case 12:
779 YY_RULE_SETUP
780 #line 37 "ssl.l"
781 {/*do nothing*/}
782 YY_BREAK
783 case 13:
784 YY_RULE_SETUP
785 #line 38 "ssl.l"
786 {mkname();RETURN(NAME_);}
787 YY_BREAK
788 case 14:
789 YY_RULE_SETUP
790 #line 39 "ssl.l"
791 {yylval.val=atoi(yytext); RETURN(NUM_);}
792 YY_BREAK
793 case 15:
794 YY_RULE_SETUP
795 #line 40 "ssl.l"
796 {yylval.val=strtol(yytext,0,16); RETURN(NUM_);}
797 YY_BREAK
798 case 16:
799 YY_RULE_SETUP
800 #line 41 "ssl.l"
801 { RETURN('{'); }
802 YY_BREAK
803 case 17:
804 YY_RULE_SETUP
805 #line 42 "ssl.l"
806 { RETURN('}'); }
807 YY_BREAK
808 case 18:
809 YY_RULE_SETUP
810 #line 43 "ssl.l"
811 { RETURN('('); }
812 YY_BREAK
813 case 19:
814 YY_RULE_SETUP
815 #line 44 "ssl.l"
816 { RETURN(')'); }
817 YY_BREAK
818 case 20:
819 YY_RULE_SETUP
820 #line 45 "ssl.l"
821 { RETURN('['); }
822 YY_BREAK
823 case 21:
824 YY_RULE_SETUP
825 #line 46 "ssl.l"
826 { RETURN(']'); }
827 YY_BREAK
828 case 22:
829 YY_RULE_SETUP
830 #line 47 "ssl.l"
831 { RETURN('<'); }
832 YY_BREAK
833 case 23:
834 YY_RULE_SETUP
835 #line 48 "ssl.l"
836 { RETURN('>'); }
837 YY_BREAK
838 case 24:
839 YY_RULE_SETUP
840 #line 49 "ssl.l"
841 { RETURN(';'); }
842 YY_BREAK
843 case 25:
844 YY_RULE_SETUP
845 #line 50 "ssl.l"
846 { RETURN(':'); }
847 YY_BREAK
848 case 26:
849 YY_RULE_SETUP
850 #line 51 "ssl.l"
851 { RETURN(','); }
852 YY_BREAK
853 case 27:
854 YY_RULE_SETUP
855 #line 52 "ssl.l"
856 { RETURN('.'); }
857 YY_BREAK
858 case 28:
859 YY_RULE_SETUP
860 #line 53 "ssl.l"
861 { RETURN('^'); }
862 YY_BREAK
863 case 29:
864 YY_RULE_SETUP
865 #line 54 "ssl.l"
866 { RETURN('-'); }
867 YY_BREAK
868 case 30:
869 YY_RULE_SETUP
870 #line 55 "ssl.l"
871 { RETURN('='); }
872 YY_BREAK
873 case 31:
874 YY_RULE_SETUP
875 #line 56 "ssl.l"
876 { fprintf(stderr,"Invalid input token: %s at %d!!!\n",yytext,yylineno);
877 exit(1);
878 }
879 YY_BREAK
880 case 32:
881 YY_RULE_SETUP
882 #line 60 "ssl.l"
883 ECHO;
884 YY_BREAK
885 #line 886 "lex.yy.c"
886 case YY_STATE_EOF(INITIAL):
887 yyterminate();
888
889 case YY_END_OF_BUFFER:
890 {
891 /* Amount of text matched not including the EOB char. */
892 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
893
894 /* Undo the effects of YY_DO_BEFORE_ACTION. */
895 *yy_cp = yy_hold_char;
896 YY_RESTORE_YY_MORE_OFFSET
897
898 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
899 {
900 /* We're scanning a new file or input source. It's
901 * possible that this happened because the user
902 * just pointed yyin at a new source and called
903 * yylex(). If so, then we have to assure
904 * consistency between yy_current_buffer and our
905 * globals. Here is the right place to do so, because
906 * this is the first action (other than possibly a
907 * back-up) that will match for the new input source.
908 */
909 yy_n_chars = yy_current_buffer->yy_n_chars;
910 yy_current_buffer->yy_input_file = yyin;
911 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
912 }
913
914 /* Note that here we test for yy_c_buf_p "<=" to the position
915 * of the first EOB in the buffer, since yy_c_buf_p will
916 * already have been incremented past the NUL character
917 * (since all states make transitions on EOB to the
918 * end-of-buffer state). Contrast this with the test
919 * in input().
920 */
921 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
922 { /* This was really a NUL. */
923 yy_state_type yy_next_state;
924
925 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
926
927 yy_current_state = yy_get_previous_state();
928
929 /* Okay, we're now positioned to make the NUL
930 * transition. We couldn't have
931 * yy_get_previous_state() go ahead and do it
932 * for us because it doesn't know how to deal
933 * with the possibility of jamming (and we don't
934 * want to build jamming into it because then it
935 * will run more slowly).
936 */
937
938 yy_next_state = yy_try_NUL_trans( yy_current_state );
939
940 yy_bp = yytext_ptr + YY_MORE_ADJ;
941
942 if ( yy_next_state )
943 {
944 /* Consume the NUL. */
945 yy_cp = ++yy_c_buf_p;
946 yy_current_state = yy_next_state;
947 goto yy_match;
948 }
949
950 else
951 {
952 yy_cp = yy_c_buf_p;
953 goto yy_find_action;
954 }
955 }
956
957 else switch ( yy_get_next_buffer() )
958 {
959 case EOB_ACT_END_OF_FILE:
960 {
961 yy_did_buffer_switch_on_eof = 0;
962
963 if ( yywrap() )
964 {
965 /* Note: because we've taken care in
966 * yy_get_next_buffer() to have set up
967 * yytext, we can now set up
968 * yy_c_buf_p so that if some total
969 * hoser (like flex itself) wants to
970 * call the scanner after we return the
971 * YY_NULL, it'll still work - another
972 * YY_NULL will get returned.
973 */
974 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
975
976 yy_act = YY_STATE_EOF(YY_START);
977 goto do_action;
978 }
979
980 else
981 {
982 if ( ! yy_did_buffer_switch_on_eof )
983 YY_NEW_FILE;
984 }
985 break;
986 }
987
988 case EOB_ACT_CONTINUE_SCAN:
989 yy_c_buf_p =
990 yytext_ptr + yy_amount_of_matched_text;
991
992 yy_current_state = yy_get_previous_state();
993
994 yy_cp = yy_c_buf_p;
995 yy_bp = yytext_ptr + YY_MORE_ADJ;
996 goto yy_match;
997
998 case EOB_ACT_LAST_MATCH:
999 yy_c_buf_p =
1000 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1001
1002 yy_current_state = yy_get_previous_state();
1003
1004 yy_cp = yy_c_buf_p;
1005 yy_bp = yytext_ptr + YY_MORE_ADJ;
1006 goto yy_find_action;
1007 }
1008 break;
1009 }
1010
1011 default:
1012 YY_FATAL_ERROR(
1013 "fatal flex scanner internal error--no action found" );
1014 } /* end of action switch */
1015 } /* end of scanning one token */
1016 } /* end of yylex */
1017
1018
1019 /* yy_get_next_buffer - try to read in a new buffer
1020 *
1021 * Returns a code representing an action:
1022 * EOB_ACT_LAST_MATCH -
1023 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1024 * EOB_ACT_END_OF_FILE - end of file
1025 */
1026
yy_get_next_buffer()1027 static int yy_get_next_buffer()
1028 {
1029 register char *dest = yy_current_buffer->yy_ch_buf;
1030 register char *source = yytext_ptr;
1031 register int number_to_move, i;
1032 int ret_val;
1033
1034 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1035 YY_FATAL_ERROR(
1036 "fatal flex scanner internal error--end of buffer missed" );
1037
1038 if ( yy_current_buffer->yy_fill_buffer == 0 )
1039 { /* Don't try to fill the buffer, so this is an EOF. */
1040 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1041 {
1042 /* We matched a single character, the EOB, so
1043 * treat this as a final EOF.
1044 */
1045 return EOB_ACT_END_OF_FILE;
1046 }
1047
1048 else
1049 {
1050 /* We matched some text prior to the EOB, first
1051 * process it.
1052 */
1053 return EOB_ACT_LAST_MATCH;
1054 }
1055 }
1056
1057 /* Try to read more data. */
1058
1059 /* First move last chars to start of buffer. */
1060 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1061
1062 for ( i = 0; i < number_to_move; ++i )
1063 *(dest++) = *(source++);
1064
1065 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1066 /* don't do the read, it's not guaranteed to return an EOF,
1067 * just force an EOF
1068 */
1069 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1070
1071 else
1072 {
1073 int num_to_read =
1074 yy_current_buffer->yy_buf_size - number_to_move - 1;
1075
1076 while ( num_to_read <= 0 )
1077 { /* Not enough room in the buffer - grow it. */
1078 #ifdef YY_USES_REJECT
1079 YY_FATAL_ERROR(
1080 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1081 #else
1082
1083 /* just a shorter name for the current buffer */
1084 YY_BUFFER_STATE b = yy_current_buffer;
1085
1086 int yy_c_buf_p_offset =
1087 (int) (yy_c_buf_p - b->yy_ch_buf);
1088
1089 if ( b->yy_is_our_buffer )
1090 {
1091 int new_size = b->yy_buf_size * 2;
1092
1093 if ( new_size <= 0 )
1094 b->yy_buf_size += b->yy_buf_size / 8;
1095 else
1096 b->yy_buf_size *= 2;
1097
1098 b->yy_ch_buf = (char *)
1099 /* Include room in for 2 EOB chars. */
1100 yy_flex_realloc( (void *) b->yy_ch_buf,
1101 b->yy_buf_size + 2 );
1102 }
1103 else
1104 /* Can't grow it, we don't own it. */
1105 b->yy_ch_buf = 0;
1106
1107 if ( ! b->yy_ch_buf )
1108 YY_FATAL_ERROR(
1109 "fatal error - scanner input buffer overflow" );
1110
1111 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1112
1113 num_to_read = yy_current_buffer->yy_buf_size -
1114 number_to_move - 1;
1115 #endif
1116 }
1117
1118 if ( num_to_read > YY_READ_BUF_SIZE )
1119 num_to_read = YY_READ_BUF_SIZE;
1120
1121 /* Read in more data. */
1122 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1123 yy_n_chars, num_to_read );
1124
1125 yy_current_buffer->yy_n_chars = yy_n_chars;
1126 }
1127
1128 if ( yy_n_chars == 0 )
1129 {
1130 if ( number_to_move == YY_MORE_ADJ )
1131 {
1132 ret_val = EOB_ACT_END_OF_FILE;
1133 yyrestart( yyin );
1134 }
1135
1136 else
1137 {
1138 ret_val = EOB_ACT_LAST_MATCH;
1139 yy_current_buffer->yy_buffer_status =
1140 YY_BUFFER_EOF_PENDING;
1141 }
1142 }
1143
1144 else
1145 ret_val = EOB_ACT_CONTINUE_SCAN;
1146
1147 yy_n_chars += number_to_move;
1148 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1149 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1150
1151 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1152
1153 return ret_val;
1154 }
1155
1156
1157 /* yy_get_previous_state - get the state just before the EOB char was reached */
1158
yy_get_previous_state()1159 static yy_state_type yy_get_previous_state()
1160 {
1161 register yy_state_type yy_current_state;
1162 register char *yy_cp;
1163
1164 yy_current_state = yy_start;
1165 yy_state_ptr = yy_state_buf;
1166 *yy_state_ptr++ = yy_current_state;
1167
1168 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1169 {
1170 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1171 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1172 {
1173 yy_current_state = (int) yy_def[yy_current_state];
1174 if ( yy_current_state >= 109 )
1175 yy_c = yy_meta[(unsigned int) yy_c];
1176 }
1177 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1178 *yy_state_ptr++ = yy_current_state;
1179 }
1180
1181 return yy_current_state;
1182 }
1183
1184
1185 /* yy_try_NUL_trans - try to make a transition on the NUL character
1186 *
1187 * synopsis
1188 * next_state = yy_try_NUL_trans( current_state );
1189 */
1190
1191 #ifdef YY_USE_PROTOS
yy_try_NUL_trans(yy_state_type yy_current_state)1192 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1193 #else
1194 static yy_state_type yy_try_NUL_trans( yy_current_state )
1195 yy_state_type yy_current_state;
1196 #endif
1197 {
1198 register int yy_is_jam;
1199
1200 register YY_CHAR yy_c = 1;
1201 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1202 {
1203 yy_current_state = (int) yy_def[yy_current_state];
1204 if ( yy_current_state >= 109 )
1205 yy_c = yy_meta[(unsigned int) yy_c];
1206 }
1207 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1208 yy_is_jam = (yy_current_state == 108);
1209 if ( ! yy_is_jam )
1210 *yy_state_ptr++ = yy_current_state;
1211
1212 return yy_is_jam ? 0 : yy_current_state;
1213 }
1214
1215
1216 #ifndef YY_NO_UNPUT
1217 #ifdef YY_USE_PROTOS
yyunput(int c,register char * yy_bp)1218 static void yyunput( int c, register char *yy_bp )
1219 #else
1220 static void yyunput( c, yy_bp )
1221 int c;
1222 register char *yy_bp;
1223 #endif
1224 {
1225 register char *yy_cp = yy_c_buf_p;
1226
1227 /* undo effects of setting up yytext */
1228 *yy_cp = yy_hold_char;
1229
1230 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1231 { /* need to shift things up to make room */
1232 /* +2 for EOB chars. */
1233 register int number_to_move = yy_n_chars + 2;
1234 register char *dest = &yy_current_buffer->yy_ch_buf[
1235 yy_current_buffer->yy_buf_size + 2];
1236 register char *source =
1237 &yy_current_buffer->yy_ch_buf[number_to_move];
1238
1239 while ( source > yy_current_buffer->yy_ch_buf )
1240 *--dest = *--source;
1241
1242 yy_cp += (int) (dest - source);
1243 yy_bp += (int) (dest - source);
1244 yy_current_buffer->yy_n_chars =
1245 yy_n_chars = yy_current_buffer->yy_buf_size;
1246
1247 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1248 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1249 }
1250
1251 *--yy_cp = (char) c;
1252
1253 if ( c == '\n' )
1254 --yylineno;
1255
1256 yytext_ptr = yy_bp;
1257 yy_hold_char = *yy_cp;
1258 yy_c_buf_p = yy_cp;
1259 }
1260 #endif /* ifndef YY_NO_UNPUT */
1261
1262
1263 #ifdef __cplusplus
yyinput()1264 static int yyinput()
1265 #else
1266 static int input()
1267 #endif
1268 {
1269 int c;
1270
1271 *yy_c_buf_p = yy_hold_char;
1272
1273 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1274 {
1275 /* yy_c_buf_p now points to the character we want to return.
1276 * If this occurs *before* the EOB characters, then it's a
1277 * valid NUL; if not, then we've hit the end of the buffer.
1278 */
1279 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1280 /* This was really a NUL. */
1281 *yy_c_buf_p = '\0';
1282
1283 else
1284 { /* need more input */
1285 int offset = yy_c_buf_p - yytext_ptr;
1286 ++yy_c_buf_p;
1287
1288 switch ( yy_get_next_buffer() )
1289 {
1290 case EOB_ACT_LAST_MATCH:
1291 /* This happens because yy_g_n_b()
1292 * sees that we've accumulated a
1293 * token and flags that we need to
1294 * try matching the token before
1295 * proceeding. But for input(),
1296 * there's no matching to consider.
1297 * So convert the EOB_ACT_LAST_MATCH
1298 * to EOB_ACT_END_OF_FILE.
1299 */
1300
1301 /* Reset buffer status. */
1302 yyrestart( yyin );
1303
1304 /* fall through */
1305
1306 case EOB_ACT_END_OF_FILE:
1307 {
1308 if ( yywrap() )
1309 return EOF;
1310
1311 if ( ! yy_did_buffer_switch_on_eof )
1312 YY_NEW_FILE;
1313 #ifdef __cplusplus
1314 return yyinput();
1315 #else
1316 return input();
1317 #endif
1318 }
1319
1320 case EOB_ACT_CONTINUE_SCAN:
1321 yy_c_buf_p = yytext_ptr + offset;
1322 break;
1323 }
1324 }
1325 }
1326
1327 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1328 *yy_c_buf_p = '\0'; /* preserve yytext */
1329 yy_hold_char = *++yy_c_buf_p;
1330
1331 if ( c == '\n' )
1332 ++yylineno;
1333
1334 return c;
1335 }
1336
1337
1338 #ifdef YY_USE_PROTOS
yyrestart(FILE * input_file)1339 void yyrestart( FILE *input_file )
1340 #else
1341 void yyrestart( input_file )
1342 FILE *input_file;
1343 #endif
1344 {
1345 if ( ! yy_current_buffer )
1346 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1347
1348 yy_init_buffer( yy_current_buffer, input_file );
1349 yy_load_buffer_state();
1350 }
1351
1352
1353 #ifdef YY_USE_PROTOS
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1354 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1355 #else
1356 void yy_switch_to_buffer( new_buffer )
1357 YY_BUFFER_STATE new_buffer;
1358 #endif
1359 {
1360 if ( yy_current_buffer == new_buffer )
1361 return;
1362
1363 if ( yy_current_buffer )
1364 {
1365 /* Flush out information for old buffer. */
1366 *yy_c_buf_p = yy_hold_char;
1367 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1368 yy_current_buffer->yy_n_chars = yy_n_chars;
1369 }
1370
1371 yy_current_buffer = new_buffer;
1372 yy_load_buffer_state();
1373
1374 /* We don't actually know whether we did this switch during
1375 * EOF (yywrap()) processing, but the only time this flag
1376 * is looked at is after yywrap() is called, so it's safe
1377 * to go ahead and always set it.
1378 */
1379 yy_did_buffer_switch_on_eof = 1;
1380 }
1381
1382
1383 #ifdef YY_USE_PROTOS
yy_load_buffer_state(void)1384 void yy_load_buffer_state( void )
1385 #else
1386 void yy_load_buffer_state()
1387 #endif
1388 {
1389 yy_n_chars = yy_current_buffer->yy_n_chars;
1390 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1391 yyin = yy_current_buffer->yy_input_file;
1392 yy_hold_char = *yy_c_buf_p;
1393 }
1394
1395
1396 #ifdef YY_USE_PROTOS
yy_create_buffer(FILE * file,int size)1397 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1398 #else
1399 YY_BUFFER_STATE yy_create_buffer( file, size )
1400 FILE *file;
1401 int size;
1402 #endif
1403 {
1404 YY_BUFFER_STATE b;
1405
1406 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1407 if ( ! b )
1408 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1409
1410 b->yy_buf_size = size;
1411
1412 /* yy_ch_buf has to be 2 characters longer than the size given because
1413 * we need to put in 2 end-of-buffer characters.
1414 */
1415 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1416 if ( ! b->yy_ch_buf )
1417 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1418
1419 b->yy_is_our_buffer = 1;
1420
1421 yy_init_buffer( b, file );
1422
1423 return b;
1424 }
1425
1426
1427 #ifdef YY_USE_PROTOS
yy_delete_buffer(YY_BUFFER_STATE b)1428 void yy_delete_buffer( YY_BUFFER_STATE b )
1429 #else
1430 void yy_delete_buffer( b )
1431 YY_BUFFER_STATE b;
1432 #endif
1433 {
1434 if ( ! b )
1435 return;
1436
1437 if ( b == yy_current_buffer )
1438 yy_current_buffer = (YY_BUFFER_STATE) 0;
1439
1440 if ( b->yy_is_our_buffer )
1441 yy_flex_free( (void *) b->yy_ch_buf );
1442
1443 yy_flex_free( (void *) b );
1444 }
1445
1446
1447 #ifndef YY_ALWAYS_INTERACTIVE
1448 #ifndef YY_NEVER_INTERACTIVE
1449 extern int isatty YY_PROTO(( int ));
1450 #endif
1451 #endif
1452
1453 #ifdef YY_USE_PROTOS
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1454 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1455 #else
1456 void yy_init_buffer( b, file )
1457 YY_BUFFER_STATE b;
1458 FILE *file;
1459 #endif
1460
1461
1462 {
1463 yy_flush_buffer( b );
1464
1465 b->yy_input_file = file;
1466 b->yy_fill_buffer = 1;
1467
1468 #if YY_ALWAYS_INTERACTIVE
1469 b->yy_is_interactive = 1;
1470 #else
1471 #if YY_NEVER_INTERACTIVE
1472 b->yy_is_interactive = 0;
1473 #else
1474 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1475 #endif
1476 #endif
1477 }
1478
1479
1480 #ifdef YY_USE_PROTOS
yy_flush_buffer(YY_BUFFER_STATE b)1481 void yy_flush_buffer( YY_BUFFER_STATE b )
1482 #else
1483 void yy_flush_buffer( b )
1484 YY_BUFFER_STATE b;
1485 #endif
1486
1487 {
1488 if ( ! b )
1489 return;
1490
1491 b->yy_n_chars = 0;
1492
1493 /* We always need two end-of-buffer characters. The first causes
1494 * a transition to the end-of-buffer state. The second causes
1495 * a jam in that state.
1496 */
1497 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1498 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1499
1500 b->yy_buf_pos = &b->yy_ch_buf[0];
1501
1502 b->yy_at_bol = 1;
1503 b->yy_buffer_status = YY_BUFFER_NEW;
1504
1505 if ( b == yy_current_buffer )
1506 yy_load_buffer_state();
1507 }
1508
1509
1510 #ifndef YY_NO_SCAN_BUFFER
1511 #ifdef YY_USE_PROTOS
yy_scan_buffer(char * base,yy_size_t size)1512 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1513 #else
1514 YY_BUFFER_STATE yy_scan_buffer( base, size )
1515 char *base;
1516 yy_size_t size;
1517 #endif
1518 {
1519 YY_BUFFER_STATE b;
1520
1521 if ( size < 2 ||
1522 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1523 base[size-1] != YY_END_OF_BUFFER_CHAR )
1524 /* They forgot to leave room for the EOB's. */
1525 return 0;
1526
1527 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1528 if ( ! b )
1529 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1530
1531 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1532 b->yy_buf_pos = b->yy_ch_buf = base;
1533 b->yy_is_our_buffer = 0;
1534 b->yy_input_file = 0;
1535 b->yy_n_chars = b->yy_buf_size;
1536 b->yy_is_interactive = 0;
1537 b->yy_at_bol = 1;
1538 b->yy_fill_buffer = 0;
1539 b->yy_buffer_status = YY_BUFFER_NEW;
1540
1541 yy_switch_to_buffer( b );
1542
1543 return b;
1544 }
1545 #endif
1546
1547
1548 #ifndef YY_NO_SCAN_STRING
1549 #ifdef YY_USE_PROTOS
yy_scan_string(yyconst char * yy_str)1550 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1551 #else
1552 YY_BUFFER_STATE yy_scan_string( yy_str )
1553 yyconst char *yy_str;
1554 #endif
1555 {
1556 int len;
1557 for ( len = 0; yy_str[len]; ++len )
1558 ;
1559
1560 return yy_scan_bytes( yy_str, len );
1561 }
1562 #endif
1563
1564
1565 #ifndef YY_NO_SCAN_BYTES
1566 #ifdef YY_USE_PROTOS
yy_scan_bytes(yyconst char * bytes,int len)1567 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1568 #else
1569 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1570 yyconst char *bytes;
1571 int len;
1572 #endif
1573 {
1574 YY_BUFFER_STATE b;
1575 char *buf;
1576 yy_size_t n;
1577 int i;
1578
1579 /* Get memory for full buffer, including space for trailing EOB's. */
1580 n = len + 2;
1581 buf = (char *) yy_flex_alloc( n );
1582 if ( ! buf )
1583 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1584
1585 for ( i = 0; i < len; ++i )
1586 buf[i] = bytes[i];
1587
1588 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1589
1590 b = yy_scan_buffer( buf, n );
1591 if ( ! b )
1592 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1593
1594 /* It's okay to grow etc. this buffer, and we should throw it
1595 * away when we're done.
1596 */
1597 b->yy_is_our_buffer = 1;
1598
1599 return b;
1600 }
1601 #endif
1602
1603
1604 #ifndef YY_NO_PUSH_STATE
1605 #ifdef YY_USE_PROTOS
yy_push_state(int new_state)1606 static void yy_push_state( int new_state )
1607 #else
1608 static void yy_push_state( new_state )
1609 int new_state;
1610 #endif
1611 {
1612 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1613 {
1614 yy_size_t new_size;
1615
1616 yy_start_stack_depth += YY_START_STACK_INCR;
1617 new_size = yy_start_stack_depth * sizeof( int );
1618
1619 if ( ! yy_start_stack )
1620 yy_start_stack = (int *) yy_flex_alloc( new_size );
1621
1622 else
1623 yy_start_stack = (int *) yy_flex_realloc(
1624 (void *) yy_start_stack, new_size );
1625
1626 if ( ! yy_start_stack )
1627 YY_FATAL_ERROR(
1628 "out of memory expanding start-condition stack" );
1629 }
1630
1631 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1632
1633 BEGIN(new_state);
1634 }
1635 #endif
1636
1637
1638 #ifndef YY_NO_POP_STATE
yy_pop_state()1639 static void yy_pop_state()
1640 {
1641 if ( --yy_start_stack_ptr < 0 )
1642 YY_FATAL_ERROR( "start-condition stack underflow" );
1643
1644 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1645 }
1646 #endif
1647
1648
1649 #ifndef YY_NO_TOP_STATE
yy_top_state()1650 static int yy_top_state()
1651 {
1652 return yy_start_stack[yy_start_stack_ptr - 1];
1653 }
1654 #endif
1655
1656 #ifndef YY_EXIT_FAILURE
1657 #define YY_EXIT_FAILURE 2
1658 #endif
1659
1660 #ifdef YY_USE_PROTOS
yy_fatal_error(yyconst char msg[])1661 static void yy_fatal_error( yyconst char msg[] )
1662 #else
1663 static void yy_fatal_error( msg )
1664 char msg[];
1665 #endif
1666 {
1667 (void) fprintf( stderr, "%s\n", msg );
1668 exit( YY_EXIT_FAILURE );
1669 }
1670
1671
1672
1673 /* Redefine yyless() so it works in section 3 code. */
1674
1675 #undef yyless
1676 #define yyless(n) \
1677 do \
1678 { \
1679 /* Undo effects of setting up yytext. */ \
1680 yytext[yyleng] = yy_hold_char; \
1681 yy_c_buf_p = yytext + n; \
1682 yy_hold_char = *yy_c_buf_p; \
1683 *yy_c_buf_p = '\0'; \
1684 yyleng = n; \
1685 } \
1686 while ( 0 )
1687
1688
1689 /* Internal utility routines. */
1690
1691 #ifndef yytext_ptr
1692 #ifdef YY_USE_PROTOS
yy_flex_strncpy(char * s1,yyconst char * s2,int n)1693 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1694 #else
1695 static void yy_flex_strncpy( s1, s2, n )
1696 char *s1;
1697 yyconst char *s2;
1698 int n;
1699 #endif
1700 {
1701 register int i;
1702 for ( i = 0; i < n; ++i )
1703 s1[i] = s2[i];
1704 }
1705 #endif
1706
1707 #ifdef YY_NEED_STRLEN
1708 #ifdef YY_USE_PROTOS
yy_flex_strlen(yyconst char * s)1709 static int yy_flex_strlen( yyconst char *s )
1710 #else
1711 static int yy_flex_strlen( s )
1712 yyconst char *s;
1713 #endif
1714 {
1715 register int n;
1716 for ( n = 0; s[n]; ++n )
1717 ;
1718
1719 return n;
1720 }
1721 #endif
1722
1723
1724 #ifdef YY_USE_PROTOS
yy_flex_alloc(yy_size_t size)1725 static void *yy_flex_alloc( yy_size_t size )
1726 #else
1727 static void *yy_flex_alloc( size )
1728 yy_size_t size;
1729 #endif
1730 {
1731 return (void *) malloc( size );
1732 }
1733
1734 #ifdef YY_USE_PROTOS
yy_flex_realloc(void * ptr,yy_size_t size)1735 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1736 #else
1737 static void *yy_flex_realloc( ptr, size )
1738 void *ptr;
1739 yy_size_t size;
1740 #endif
1741 {
1742 /* The cast to (char *) in the following accommodates both
1743 * implementations that use char* generic pointers, and those
1744 * that use void* generic pointers. It works with the latter
1745 * because both ANSI C and C++ allow castless assignment from
1746 * any pointer type to void*, and deal with argument conversions
1747 * as though doing an assignment.
1748 */
1749 return (void *) realloc( (char *) ptr, size );
1750 }
1751
1752 #ifdef YY_USE_PROTOS
yy_flex_free(void * ptr)1753 static void yy_flex_free( void *ptr )
1754 #else
1755 static void yy_flex_free( ptr )
1756 void *ptr;
1757 #endif
1758 {
1759 free( ptr );
1760 }
1761
1762 #if YY_MAIN
main()1763 int main()
1764 {
1765 yylex();
1766 return 0;
1767 }
1768 #endif
1769 #line 60 "ssl.l"
1770
mkname()1771 int mkname()
1772 {
1773 #if 0
1774 printf("%s\n",yytext);
1775 #endif
1776 strcpy(yylval.str,yytext);
1777 }
1778