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