~ubuntu-branches/ubuntu/warty/happy/warty

« back to all changes in this revision

Viewing changes to glafp-utils/sgmlverb/sgmlverb.c

  • Committer: Bazaar Package Importer
  • Author(s): Ian Lynagh (wibble)
  • Date: 2004-04-03 15:51:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040403155147-47pwz4txfls12i4q
Tags: 1.13-0tarball-5
Fix pragmas (missing #) in Parser.hs as recent GHCs were barfing.

Show diffs side-by-side

added added

removed removed

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