~ubuntu-branches/ubuntu/raring/openmotif/raring-proposed

« back to all changes in this revision

Viewing changes to tools/wml/wmluiltok.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bauer
  • Date: 2010-06-29 09:42:21 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100629094221-yee9gtet2dngu6cv
Tags: 2.3.3-1
* New upstream release
* Drop patch for autoconf-bug as this was fixed upstream
* Applied patch to fix implicit pointer conversion (Closes: #587461)
 

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
 
 */
 
1
 
 
2
#line 3 "wmluiltok.c"
 
3
 
 
4
#define  YY_INT_ALIGNED short int
 
5
 
 
6
/* A lexical scanner generated by flex */
6
7
 
7
8
#define FLEX_SCANNER
8
9
#define YY_FLEX_MAJOR_VERSION 2
9
10
#define YY_FLEX_MINOR_VERSION 5
10
 
 
 
11
#define YY_FLEX_SUBMINOR_VERSION 35
 
12
#if YY_FLEX_SUBMINOR_VERSION > 0
 
13
#define FLEX_BETA
 
14
#endif
 
15
 
 
16
/* First, we deal with  platform-specific or compiler-specific issues. */
 
17
 
 
18
/* begin standard C headers. */
11
19
#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
 
 
 
20
#include <string.h>
 
21
#include <errno.h>
 
22
#include <stdlib.h>
 
23
 
 
24
/* end standard C headers. */
 
25
 
 
26
/* flex integer type definitions */
 
27
 
 
28
#ifndef FLEXINT_H
 
29
#define FLEXINT_H
 
30
 
 
31
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
32
 
 
33
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
34
 
 
35
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 
36
 * if you want the limit (max/min) macros for int types. 
 
37
 */
 
38
#ifndef __STDC_LIMIT_MACROS
 
39
#define __STDC_LIMIT_MACROS 1
 
40
#endif
 
41
 
 
42
#include <inttypes.h>
 
43
typedef int8_t flex_int8_t;
 
44
typedef uint8_t flex_uint8_t;
 
45
typedef int16_t flex_int16_t;
 
46
typedef uint16_t flex_uint16_t;
 
47
typedef int32_t flex_int32_t;
 
48
typedef uint32_t flex_uint32_t;
 
49
#else
 
50
typedef signed char flex_int8_t;
 
51
typedef short int flex_int16_t;
 
52
typedef int flex_int32_t;
 
53
typedef unsigned char flex_uint8_t; 
 
54
typedef unsigned short int flex_uint16_t;
 
55
typedef unsigned int flex_uint32_t;
 
56
#endif /* ! C99 */
 
57
 
 
58
/* Limits of integral types. */
 
59
#ifndef INT8_MIN
 
60
#define INT8_MIN               (-128)
 
61
#endif
 
62
#ifndef INT16_MIN
 
63
#define INT16_MIN              (-32767-1)
 
64
#endif
 
65
#ifndef INT32_MIN
 
66
#define INT32_MIN              (-2147483647-1)
 
67
#endif
 
68
#ifndef INT8_MAX
 
69
#define INT8_MAX               (127)
 
70
#endif
 
71
#ifndef INT16_MAX
 
72
#define INT16_MAX              (32767)
 
73
#endif
 
74
#ifndef INT32_MAX
 
75
#define INT32_MAX              (2147483647)
 
76
#endif
 
77
#ifndef UINT8_MAX
 
78
#define UINT8_MAX              (255U)
 
79
#endif
 
80
#ifndef UINT16_MAX
 
81
#define UINT16_MAX             (65535U)
 
82
#endif
 
83
#ifndef UINT32_MAX
 
84
#define UINT32_MAX             (4294967295U)
 
85
#endif
 
86
 
 
87
#endif /* ! FLEXINT_H */
22
88
 
23
89
#ifdef __cplusplus
24
90
 
25
 
#include <stdlib.h>
26
 
 
27
 
/* Use prototypes in function declarations. */
28
 
#define YY_USE_PROTOS
29
 
 
30
91
/* The "const" storage-class-modifier is valid. */
31
92
#define YY_USE_CONST
32
93
 
33
94
#else   /* ! __cplusplus */
34
95
 
35
 
#if __STDC__
 
96
/* C99 requires __STDC__ to be defined as 1. */
 
97
#if defined (__STDC__)
36
98
 
37
 
#define YY_USE_PROTOS
38
99
#define YY_USE_CONST
39
100
 
40
 
#endif  /* __STDC__ */
 
101
#endif  /* defined (__STDC__) */
41
102
#endif  /* ! __cplusplus */
42
103
 
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
104
#ifdef YY_USE_CONST
53
105
#define yyconst const
54
106
#else
55
107
#define yyconst
56
108
#endif
57
109
 
58
 
 
59
 
#ifdef YY_USE_PROTOS
60
 
#define YY_PROTO(proto) proto
61
 
#else
62
 
#define YY_PROTO(proto) ()
63
 
#endif
64
 
 
65
110
/* Returned upon end-of-file. */
66
111
#define YY_NULL 0
67
112
 
76
121
 * but we do it the disgusting crufty way forced on us by the ()-less
77
122
 * definition of BEGIN.
78
123
 */
79
 
#define BEGIN yy_start = 1 + 2 *
 
124
#define BEGIN (yy_start) = 1 + 2 *
80
125
 
81
126
/* Translate the current start state into a value that can be later handed
82
127
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
83
128
 * compatibility.
84
129
 */
85
 
#define YY_START ((yy_start - 1) / 2)
 
130
#define YY_START (((yy_start) - 1) / 2)
86
131
#define YYSTATE YY_START
87
132
 
88
133
/* Action number for EOF rule of a given start state. */
89
134
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
135
 
91
136
/* Special action meaning "start processing a new file". */
92
 
#define YY_NEW_FILE yyrestart( yyin )
 
137
#define YY_NEW_FILE yyrestart(yyin  )
93
138
 
94
139
#define YY_END_OF_BUFFER_CHAR 0
95
140
 
96
141
/* Size of default input buffer. */
 
142
#ifndef YY_BUF_SIZE
97
143
#define YY_BUF_SIZE 16384
98
 
 
 
144
#endif
 
145
 
 
146
/* The state buf must be large enough to hold one state per character in the main buffer.
 
147
 */
 
148
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
149
 
 
150
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
 
151
#define YY_TYPEDEF_YY_BUFFER_STATE
99
152
typedef struct yy_buffer_state *YY_BUFFER_STATE;
 
153
#endif
100
154
 
101
155
extern int yyleng;
 
156
 
102
157
extern FILE *yyin, *yyout;
103
158
 
104
159
#define EOB_ACT_CONTINUE_SCAN 0
105
160
#define EOB_ACT_END_OF_FILE 1
106
161
#define EOB_ACT_LAST_MATCH 2
107
162
 
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
 
 
 
163
    #define YY_LESS_LINENO(n)
 
164
    
 
165
/* Return all but the first "n" matched characters back to the input stream. */
124
166
#define yyless(n) \
125
167
        do \
126
168
                { \
127
169
                /* Undo effects of setting up yytext. */ \
128
 
                *yy_cp = yy_hold_char; \
 
170
        int yyless_macro_arg = (n); \
 
171
        YY_LESS_LINENO(yyless_macro_arg);\
 
172
                *yy_cp = (yy_hold_char); \
129
173
                YY_RESTORE_YY_MORE_OFFSET \
130
 
                yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
 
174
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
131
175
                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
132
176
                } \
133
177
        while ( 0 )
134
178
 
135
 
#define unput(c) yyunput( c, yytext_ptr )
 
179
#define unput(c) yyunput( c, (yytext_ptr)  )
136
180
 
137
 
/* Some routines like yy_flex_realloc() are emitted as static but are
138
 
   not called by all lexers. This generates warnings in some compilers,
139
 
   notably GCC. Arrange to suppress these. */
140
 
#ifdef __GNUC__
141
 
#define YY_MAY_BE_UNUSED __attribute__((unused))
142
 
#else
143
 
#define YY_MAY_BE_UNUSED
 
181
#ifndef YY_TYPEDEF_YY_SIZE_T
 
182
#define YY_TYPEDEF_YY_SIZE_T
 
183
typedef size_t yy_size_t;
144
184
#endif
145
185
 
146
 
/* The following is because we cannot portably get our hands on size_t
147
 
 * (without autoconf's help, which isn't available because we want
148
 
 * flex-generated scanners to compile on their own).
149
 
 */
150
 
typedef unsigned int yy_size_t;
151
 
 
152
 
 
 
186
#ifndef YY_STRUCT_YY_BUFFER_STATE
 
187
#define YY_STRUCT_YY_BUFFER_STATE
153
188
struct yy_buffer_state
154
189
        {
155
190
        FILE *yy_input_file;
186
221
         */
187
222
        int yy_at_bol;
188
223
 
 
224
    int yy_bs_lineno; /**< The line count. */
 
225
    int yy_bs_column; /**< The column count. */
 
226
    
189
227
        /* Whether to try to fill the input buffer when we reach the
190
228
         * end of it.
191
229
         */
192
230
        int yy_fill_buffer;
193
231
 
194
232
        int yy_buffer_status;
 
233
 
195
234
#define YY_BUFFER_NEW 0
196
235
#define YY_BUFFER_NORMAL 1
197
236
        /* When an EOF's been seen but there's still some text to process
205
244
         * just pointing yyin at a new input file.
206
245
         */
207
246
#define YY_BUFFER_EOF_PENDING 2
 
247
 
208
248
        };
 
249
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
209
250
 
210
 
static YY_BUFFER_STATE yy_current_buffer = 0;
 
251
/* Stack of input buffers. */
 
252
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 
253
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 
254
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
211
255
 
212
256
/* We provide macros for accessing buffer states in case in the
213
257
 * future we want to put the buffer states in a more general
214
258
 * "scanner state".
 
259
 *
 
260
 * Returns the top of the stack, or NULL.
215
261
 */
216
 
#define YY_CURRENT_BUFFER yy_current_buffer
 
262
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
 
263
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
 
264
                          : NULL)
217
265
 
 
266
/* Same as previous macro, but useful when we know that the buffer stack is not
 
267
 * NULL or when we need an lvalue. For internal use only.
 
268
 */
 
269
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
218
270
 
219
271
/* yy_hold_char holds the character lost when yytext is formed. */
220
272
static char yy_hold_char;
221
 
 
222
273
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
223
 
 
224
 
 
225
274
int yyleng;
226
275
 
227
276
/* Points to current character in buffer. */
228
277
static char *yy_c_buf_p = (char *) 0;
229
 
static int yy_init = 1;         /* whether we need to initialize */
 
278
static int yy_init = 0;         /* whether we need to initialize */
230
279
static int yy_start = 0;        /* start state number */
231
280
 
232
281
/* Flag which is used to allow yywrap()'s to do buffer switches
234
283
 */
235
284
static int yy_did_buffer_switch_on_eof;
236
285
 
237
 
void yyrestart YY_PROTO(( FILE *input_file ));
238
 
 
239
 
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
240
 
void yy_load_buffer_state YY_PROTO(( void ));
241
 
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
242
 
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
243
 
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
244
 
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
245
 
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
246
 
 
247
 
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
248
 
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
249
 
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
250
 
 
251
 
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
252
 
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
253
 
static void yy_flex_free YY_PROTO(( void * ));
 
286
void yyrestart (FILE *input_file  );
 
287
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 
288
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
 
289
void yy_delete_buffer (YY_BUFFER_STATE b  );
 
290
void yy_flush_buffer (YY_BUFFER_STATE b  );
 
291
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
 
292
void yypop_buffer_state (void );
 
293
 
 
294
static void yyensure_buffer_stack (void );
 
295
static void yy_load_buffer_state (void );
 
296
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
297
 
 
298
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
 
299
 
 
300
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
 
301
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
 
302
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
 
303
 
 
304
void *yyalloc (yy_size_t  );
 
305
void *yyrealloc (void *,yy_size_t  );
 
306
void yyfree (void *  );
254
307
 
255
308
#define yy_new_buffer yy_create_buffer
256
309
 
257
310
#define yy_set_interactive(is_interactive) \
258
311
        { \
259
 
        if ( ! yy_current_buffer ) \
260
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261
 
        yy_current_buffer->yy_is_interactive = is_interactive; \
 
312
        if ( ! YY_CURRENT_BUFFER ){ \
 
313
        yyensure_buffer_stack (); \
 
314
                YY_CURRENT_BUFFER_LVALUE =    \
 
315
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
 
316
        } \
 
317
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
262
318
        }
263
319
 
264
320
#define yy_set_bol(at_bol) \
265
321
        { \
266
 
        if ( ! yy_current_buffer ) \
267
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
268
 
        yy_current_buffer->yy_at_bol = at_bol; \
 
322
        if ( ! YY_CURRENT_BUFFER ){\
 
323
        yyensure_buffer_stack (); \
 
324
                YY_CURRENT_BUFFER_LVALUE =    \
 
325
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
 
326
        } \
 
327
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
269
328
        }
270
329
 
271
 
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
 
330
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
331
 
 
332
/* Begin user sect3 */
272
333
 
273
334
typedef unsigned char YY_CHAR;
 
335
 
274
336
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 
337
 
275
338
typedef int yy_state_type;
 
339
 
 
340
extern int yylineno;
 
341
 
 
342
int yylineno = 1;
 
343
 
276
344
extern char *yytext;
277
345
#define yytext_ptr yytext
278
346
 
279
 
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
280
 
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
281
 
static int yy_get_next_buffer YY_PROTO(( void ));
282
 
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 
347
static yy_state_type yy_get_previous_state (void );
 
348
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 
349
static int yy_get_next_buffer (void );
 
350
static void yy_fatal_error (yyconst char msg[]  );
283
351
 
284
352
/* Done after the current pattern has been matched and before the
285
353
 * corresponding action - sets up yytext.
286
354
 */
287
355
#define YY_DO_BEFORE_ACTION \
288
 
        yytext_ptr = yy_bp; \
289
 
        yyleng = (int) (yy_cp - yy_bp); \
290
 
        yy_hold_char = *yy_cp; \
 
356
        (yytext_ptr) = yy_bp; \
 
357
        yyleng = (size_t) (yy_cp - yy_bp); \
 
358
        (yy_hold_char) = *yy_cp; \
291
359
        *yy_cp = '\0'; \
292
 
        yy_c_buf_p = yy_cp;
 
360
        (yy_c_buf_p) = yy_cp;
293
361
 
294
362
#define YY_NUM_RULES 7
295
363
#define YY_END_OF_BUFFER 8
296
 
static yyconst short int yy_accept[18] =
 
364
/* This struct is not used in this scanner,
 
365
   but its presence is necessary. */
 
366
struct yy_trans_info
 
367
        {
 
368
        flex_int32_t yy_verify;
 
369
        flex_int32_t yy_nxt;
 
370
        };
 
371
static yyconst flex_int16_t yy_accept[18] =
297
372
    {   0,
298
373
        0,    0,    8,    6,    2,    1,    6,    5,    6,    3,
299
374
        5,    0,    0,    0,    0,    4,    0
300
375
    } ;
301
376
 
302
 
static yyconst int yy_ec[256] =
 
377
static yyconst flex_int32_t yy_ec[256] =
303
378
    {   0,
304
379
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
305
380
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
331
406
        1,    1,    1,    1,    1
332
407
    } ;
333
408
 
334
 
static yyconst int yy_meta[13] =
 
409
static yyconst flex_int32_t yy_meta[13] =
335
410
    {   0,
336
411
        1,    1,    1,    1,    1,    1,    2,    2,    2,    2,
337
412
        2,    2
338
413
    } ;
339
414
 
340
 
static yyconst short int yy_base[19] =
 
415
static yyconst flex_int16_t yy_base[19] =
341
416
    {   0,
342
417
        0,   17,   20,   22,   22,   22,   14,    0,    6,   22,
343
418
        0,    6,    7,    7,    4,   22,   22,   11
344
419
    } ;
345
420
 
346
 
static yyconst short int yy_def[19] =
 
421
static yyconst flex_int16_t yy_def[19] =
347
422
    {   0,
348
423
       17,    1,   17,   17,   17,   17,   17,   18,   17,   17,
349
424
       18,   17,   17,   17,   17,   17,    0,   17
350
425
    } ;
351
426
 
352
 
static yyconst short int yy_nxt[35] =
 
427
static yyconst flex_int16_t yy_nxt[35] =
353
428
    {   0,
354
429
        4,    5,    6,    4,    4,    7,    8,    8,    8,    8,
355
430
        8,    8,   11,   16,   15,   14,   13,   12,   10,   17,
357
432
       17,   17,   17,   17
358
433
    } ;
359
434
 
360
 
static yyconst short int yy_chk[35] =
 
435
static yyconst flex_int16_t yy_chk[35] =
361
436
    {   0,
362
437
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
363
438
        1,    1,   18,   15,   14,   13,   12,    9,    7,    3,
368
443
static yy_state_type yy_last_accepting_state;
369
444
static char *yy_last_accepting_cpos;
370
445
 
 
446
extern int yy_flex_debug;
 
447
int yy_flex_debug = 0;
 
448
 
371
449
/* The intent behind this definition is that it'll catch
372
450
 * any uses of REJECT which flex missed.
373
451
 */
377
455
#define YY_RESTORE_YY_MORE_OFFSET
378
456
char *yytext;
379
457
#line 1 "wmluiltok.l"
380
 
#define INITIAL 0
381
458
#line 2 "wmluiltok.l"
382
459
/*
383
460
 *  @OPENGROUP_COPYRIGHT@
481
558
int state               = 0;
482
559
int used                = 0;
483
560
 
484
 
#line 485 "wmluiltok.c"
 
561
#line 562 "wmluiltok.c"
 
562
 
 
563
#define INITIAL 0
 
564
 
 
565
#ifndef YY_NO_UNISTD_H
 
566
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 
567
 * down here because we want the user's section 1 to have been scanned first.
 
568
 * The user has a chance to override it with an option.
 
569
 */
 
570
#include <unistd.h>
 
571
#endif
 
572
 
 
573
#ifndef YY_EXTRA_TYPE
 
574
#define YY_EXTRA_TYPE void *
 
575
#endif
 
576
 
 
577
static int yy_init_globals (void );
 
578
 
 
579
/* Accessor methods to globals.
 
580
   These are made visible to non-reentrant scanners for convenience. */
 
581
 
 
582
int yylex_destroy (void );
 
583
 
 
584
int yyget_debug (void );
 
585
 
 
586
void yyset_debug (int debug_flag  );
 
587
 
 
588
YY_EXTRA_TYPE yyget_extra (void );
 
589
 
 
590
void yyset_extra (YY_EXTRA_TYPE user_defined  );
 
591
 
 
592
FILE *yyget_in (void );
 
593
 
 
594
void yyset_in  (FILE * in_str  );
 
595
 
 
596
FILE *yyget_out (void );
 
597
 
 
598
void yyset_out  (FILE * out_str  );
 
599
 
 
600
int yyget_leng (void );
 
601
 
 
602
char *yyget_text (void );
 
603
 
 
604
int yyget_lineno (void );
 
605
 
 
606
void yyset_lineno (int line_number  );
485
607
 
486
608
/* Macros after this point can all be overridden by user definitions in
487
609
 * section 1.
489
611
 
490
612
#ifndef YY_SKIP_YYWRAP
491
613
#ifdef __cplusplus
492
 
extern "C" int yywrap YY_PROTO(( void ));
 
614
extern "C" int yywrap (void );
493
615
#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
 
 
 
616
extern int yywrap (void );
 
617
#endif
 
618
#endif
 
619
 
 
620
    static void yyunput (int c,char *buf_ptr  );
 
621
    
502
622
#ifndef yytext_ptr
503
 
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
 
623
static void yy_flex_strncpy (char *,yyconst char *,int );
504
624
#endif
505
625
 
506
626
#ifdef YY_NEED_STRLEN
507
 
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
 
627
static int yy_flex_strlen (yyconst char * );
508
628
#endif
509
629
 
510
630
#ifndef YY_NO_INPUT
 
631
 
511
632
#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
 
633
static int yyinput (void );
 
634
#else
 
635
static int input (void );
 
636
#endif
 
637
 
551
638
#endif
552
639
 
553
640
/* Amount of stuff to slurp up with each read. */
556
643
#endif
557
644
 
558
645
/* Copy whatever the last rule matched to the standard output. */
559
 
 
560
646
#ifndef ECHO
561
647
/* This used to be an fputs(), but since the string might contain NUL's,
562
648
 * we now use fwrite().
563
649
 */
564
 
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 
650
#define ECHO fwrite( yytext, yyleng, 1, yyout )
565
651
#endif
566
652
 
567
653
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
569
655
 */
570
656
#ifndef YY_INPUT
571
657
#define YY_INPUT(buf,result,max_size) \
572
 
        if ( yy_current_buffer->yy_is_interactive ) \
 
658
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
573
659
                { \
574
 
                int c = '*', n; \
 
660
                int c = '*'; \
 
661
                int n; \
575
662
                for ( n = 0; n < max_size && \
576
663
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
577
664
                        buf[n] = (char) c; \
581
668
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
582
669
                result = n; \
583
670
                } \
584
 
        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
585
 
                  && ferror( yyin ) ) \
586
 
                YY_FATAL_ERROR( "input in flex scanner failed" );
 
671
        else \
 
672
                { \
 
673
                errno=0; \
 
674
                while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
 
675
                        { \
 
676
                        if( errno != EINTR) \
 
677
                                { \
 
678
                                YY_FATAL_ERROR( "input in flex scanner failed" ); \
 
679
                                break; \
 
680
                                } \
 
681
                        errno=0; \
 
682
                        clearerr(yyin); \
 
683
                        } \
 
684
                }\
 
685
\
 
686
 
587
687
#endif
588
688
 
589
689
/* No semi-colon after return; correct usage is to write "yyterminate();" -
604
704
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
605
705
#endif
606
706
 
 
707
/* end tables serialization structures and prototypes */
 
708
 
607
709
/* Default declaration of generated scanner - a define so the user can
608
710
 * easily add parameters.
609
711
 */
610
712
#ifndef YY_DECL
611
 
#define YY_DECL int yylex YY_PROTO(( void ))
612
 
#endif
 
713
#define YY_DECL_IS_OURS 1
 
714
 
 
715
extern int yylex (void);
 
716
 
 
717
#define YY_DECL int yylex (void)
 
718
#endif /* !YY_DECL */
613
719
 
614
720
/* Code executed at the beginning of each rule, after yytext and yyleng
615
721
 * have been set up.
625
731
 
626
732
#define YY_RULE_SETUP \
627
733
        if ( yyleng > 0 ) \
628
 
                yy_current_buffer->yy_at_bol = \
 
734
                YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
629
735
                                (yytext[yyleng - 1] == '\n'); \
630
736
        YY_USER_ACTION
631
737
 
 
738
/** The main scanner function which does all the work.
 
739
 */
632
740
YY_DECL
633
 
        {
 
741
{
634
742
        register yy_state_type yy_current_state;
635
 
        register char *yy_cp = NULL, *yy_bp = NULL;
 
743
        register char *yy_cp, *yy_bp;
636
744
        register int yy_act;
637
 
 
 
745
    
638
746
#line 112 "wmluiltok.l"
639
747
 
640
748
 
641
749
 
642
 
#line 643 "wmluiltok.c"
 
750
#line 751 "wmluiltok.c"
643
751
 
644
 
        if ( yy_init )
 
752
        if ( !(yy_init) )
645
753
                {
646
 
                yy_init = 0;
 
754
                (yy_init) = 1;
647
755
 
648
756
#ifdef YY_USER_INIT
649
757
                YY_USER_INIT;
650
758
#endif
651
759
 
652
 
                if ( ! yy_start )
653
 
                        yy_start = 1;   /* first start state */
 
760
                if ( ! (yy_start) )
 
761
                        (yy_start) = 1; /* first start state */
654
762
 
655
763
                if ( ! yyin )
656
764
                        yyin = stdin;
658
766
                if ( ! yyout )
659
767
                        yyout = stdout;
660
768
 
661
 
                if ( ! yy_current_buffer )
662
 
                        yy_current_buffer =
663
 
                                yy_create_buffer( yyin, YY_BUF_SIZE );
 
769
                if ( ! YY_CURRENT_BUFFER ) {
 
770
                        yyensure_buffer_stack ();
 
771
                        YY_CURRENT_BUFFER_LVALUE =
 
772
                                yy_create_buffer(yyin,YY_BUF_SIZE );
 
773
                }
664
774
 
665
 
                yy_load_buffer_state();
 
775
                yy_load_buffer_state( );
666
776
                }
667
777
 
668
778
        while ( 1 )             /* loops until end-of-file is reached */
669
779
                {
670
 
                yy_cp = yy_c_buf_p;
 
780
                yy_cp = (yy_c_buf_p);
671
781
 
672
782
                /* Support of yytext. */
673
 
                *yy_cp = yy_hold_char;
 
783
                *yy_cp = (yy_hold_char);
674
784
 
675
785
                /* yy_bp points to the position in yy_ch_buf of the start of
676
786
                 * the current run.
677
787
                 */
678
788
                yy_bp = yy_cp;
679
789
 
680
 
                yy_current_state = yy_start;
 
790
                yy_current_state = (yy_start);
681
791
                yy_current_state += YY_AT_BOL();
682
792
yy_match:
683
793
                do
685
795
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
686
796
                        if ( yy_accept[yy_current_state] )
687
797
                                {
688
 
                                yy_last_accepting_state = yy_current_state;
689
 
                                yy_last_accepting_cpos = yy_cp;
 
798
                                (yy_last_accepting_state) = yy_current_state;
 
799
                                (yy_last_accepting_cpos) = yy_cp;
690
800
                                }
691
801
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
692
802
                                {
703
813
                yy_act = yy_accept[yy_current_state];
704
814
                if ( yy_act == 0 )
705
815
                        { /* have to back up */
706
 
                        yy_cp = yy_last_accepting_cpos;
707
 
                        yy_current_state = yy_last_accepting_state;
 
816
                        yy_cp = (yy_last_accepting_cpos);
 
817
                        yy_current_state = (yy_last_accepting_state);
708
818
                        yy_act = yy_accept[yy_current_state];
709
819
                        }
710
820
 
711
821
                YY_DO_BEFORE_ACTION;
712
822
 
713
 
 
714
823
do_action:      /* This label is used only to access EOF actions. */
715
824
 
716
 
 
717
825
                switch ( yy_act )
718
826
        { /* beginning of action switch */
719
827
                        case 0: /* must back up */
720
828
                        /* undo the effects of YY_DO_BEFORE_ACTION */
721
 
                        *yy_cp = yy_hold_char;
722
 
                        yy_cp = yy_last_accepting_cpos;
723
 
                        yy_current_state = yy_last_accepting_state;
 
829
                        *yy_cp = (yy_hold_char);
 
830
                        yy_cp = (yy_last_accepting_cpos);
 
831
                        yy_current_state = (yy_last_accepting_state);
724
832
                        goto yy_find_action;
725
833
 
726
834
case 1:
 
835
/* rule 1 can match eol */
727
836
YY_RULE_SETUP
728
837
#line 115 "wmluiltok.l"
729
838
{
812
921
#line 183 "wmluiltok.l"
813
922
ECHO;
814
923
        YY_BREAK
815
 
#line 816 "wmluiltok.c"
 
924
#line 925 "wmluiltok.c"
816
925
case YY_STATE_EOF(INITIAL):
817
926
        yyterminate();
818
927
 
819
928
        case YY_END_OF_BUFFER:
820
929
                {
821
930
                /* Amount of text matched not including the EOB char. */
822
 
                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
 
931
                int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
823
932
 
824
933
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
825
 
                *yy_cp = yy_hold_char;
 
934
                *yy_cp = (yy_hold_char);
826
935
                YY_RESTORE_YY_MORE_OFFSET
827
936
 
828
 
                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
 
937
                if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
829
938
                        {
830
939
                        /* We're scanning a new file or input source.  It's
831
940
                         * possible that this happened because the user
832
941
                         * just pointed yyin at a new source and called
833
942
                         * yylex().  If so, then we have to assure
834
 
                         * consistency between yy_current_buffer and our
 
943
                         * consistency between YY_CURRENT_BUFFER and our
835
944
                         * globals.  Here is the right place to do so, because
836
945
                         * this is the first action (other than possibly a
837
946
                         * back-up) that will match for the new input source.
838
947
                         */
839
 
                        yy_n_chars = yy_current_buffer->yy_n_chars;
840
 
                        yy_current_buffer->yy_input_file = yyin;
841
 
                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
 
948
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
949
                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
 
950
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
842
951
                        }
843
952
 
844
953
                /* Note that here we test for yy_c_buf_p "<=" to the position
848
957
                 * end-of-buffer state).  Contrast this with the test
849
958
                 * in input().
850
959
                 */
851
 
                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 
960
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
852
961
                        { /* This was really a NUL. */
853
962
                        yy_state_type yy_next_state;
854
963
 
855
 
                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
 
964
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
856
965
 
857
 
                        yy_current_state = yy_get_previous_state();
 
966
                        yy_current_state = yy_get_previous_state(  );
858
967
 
859
968
                        /* Okay, we're now positioned to make the NUL
860
969
                         * transition.  We couldn't have
867
976
 
868
977
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
869
978
 
870
 
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
 
979
                        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
871
980
 
872
981
                        if ( yy_next_state )
873
982
                                {
874
983
                                /* Consume the NUL. */
875
 
                                yy_cp = ++yy_c_buf_p;
 
984
                                yy_cp = ++(yy_c_buf_p);
876
985
                                yy_current_state = yy_next_state;
877
986
                                goto yy_match;
878
987
                                }
879
988
 
880
989
                        else
881
990
                                {
882
 
                                yy_cp = yy_c_buf_p;
 
991
                                yy_cp = (yy_c_buf_p);
883
992
                                goto yy_find_action;
884
993
                                }
885
994
                        }
886
995
 
887
 
                else switch ( yy_get_next_buffer() )
 
996
                else switch ( yy_get_next_buffer(  ) )
888
997
                        {
889
998
                        case EOB_ACT_END_OF_FILE:
890
999
                                {
891
 
                                yy_did_buffer_switch_on_eof = 0;
 
1000
                                (yy_did_buffer_switch_on_eof) = 0;
892
1001
 
893
 
                                if ( yywrap() )
 
1002
                                if ( yywrap( ) )
894
1003
                                        {
895
1004
                                        /* Note: because we've taken care in
896
1005
                                         * yy_get_next_buffer() to have set up
901
1010
                                         * YY_NULL, it'll still work - another
902
1011
                                         * YY_NULL will get returned.
903
1012
                                         */
904
 
                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
 
1013
                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
905
1014
 
906
1015
                                        yy_act = YY_STATE_EOF(YY_START);
907
1016
                                        goto do_action;
909
1018
 
910
1019
                                else
911
1020
                                        {
912
 
                                        if ( ! yy_did_buffer_switch_on_eof )
 
1021
                                        if ( ! (yy_did_buffer_switch_on_eof) )
913
1022
                                                YY_NEW_FILE;
914
1023
                                        }
915
1024
                                break;
916
1025
                                }
917
1026
 
918
1027
                        case EOB_ACT_CONTINUE_SCAN:
919
 
                                yy_c_buf_p =
920
 
                                        yytext_ptr + yy_amount_of_matched_text;
921
 
 
922
 
                                yy_current_state = yy_get_previous_state();
923
 
 
924
 
                                yy_cp = yy_c_buf_p;
925
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
 
1028
                                (yy_c_buf_p) =
 
1029
                                        (yytext_ptr) + yy_amount_of_matched_text;
 
1030
 
 
1031
                                yy_current_state = yy_get_previous_state(  );
 
1032
 
 
1033
                                yy_cp = (yy_c_buf_p);
 
1034
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
926
1035
                                goto yy_match;
927
1036
 
928
1037
                        case EOB_ACT_LAST_MATCH:
929
 
                                yy_c_buf_p =
930
 
                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
931
 
 
932
 
                                yy_current_state = yy_get_previous_state();
933
 
 
934
 
                                yy_cp = yy_c_buf_p;
935
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
 
1038
                                (yy_c_buf_p) =
 
1039
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 
1040
 
 
1041
                                yy_current_state = yy_get_previous_state(  );
 
1042
 
 
1043
                                yy_cp = (yy_c_buf_p);
 
1044
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
936
1045
                                goto yy_find_action;
937
1046
                        }
938
1047
                break;
943
1052
                        "fatal flex scanner internal error--no action found" );
944
1053
        } /* end of action switch */
945
1054
                } /* end of scanning one token */
946
 
        } /* end of yylex */
947
 
 
 
1055
} /* end of yylex */
948
1056
 
949
1057
/* yy_get_next_buffer - try to read in a new buffer
950
1058
 *
953
1061
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
954
1062
 *      EOB_ACT_END_OF_FILE - end of file
955
1063
 */
956
 
 
957
 
static int yy_get_next_buffer()
958
 
        {
959
 
        register char *dest = yy_current_buffer->yy_ch_buf;
960
 
        register char *source = yytext_ptr;
 
1064
static int yy_get_next_buffer (void)
 
1065
{
 
1066
        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 
1067
        register char *source = (yytext_ptr);
961
1068
        register int number_to_move, i;
962
1069
        int ret_val;
963
1070
 
964
 
        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
 
1071
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
965
1072
                YY_FATAL_ERROR(
966
1073
                "fatal flex scanner internal error--end of buffer missed" );
967
1074
 
968
 
        if ( yy_current_buffer->yy_fill_buffer == 0 )
 
1075
        if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
969
1076
                { /* Don't try to fill the buffer, so this is an EOF. */
970
 
                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
 
1077
                if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
971
1078
                        {
972
1079
                        /* We matched a single character, the EOB, so
973
1080
                         * treat this as a final EOF.
987
1094
        /* Try to read more data. */
988
1095
 
989
1096
        /* First move last chars to start of buffer. */
990
 
        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
 
1097
        number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
991
1098
 
992
1099
        for ( i = 0; i < number_to_move; ++i )
993
1100
                *(dest++) = *(source++);
994
1101
 
995
 
        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 
1102
        if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
996
1103
                /* don't do the read, it's not guaranteed to return an EOF,
997
1104
                 * just force an EOF
998
1105
                 */
999
 
                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
1106
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1000
1107
 
1001
1108
        else
1002
1109
                {
1003
 
                int num_to_read =
1004
 
                        yy_current_buffer->yy_buf_size - number_to_move - 1;
 
1110
                        int num_to_read =
 
1111
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1005
1112
 
1006
1113
                while ( num_to_read <= 0 )
1007
1114
                        { /* Not enough room in the buffer - grow it. */
1008
 
#ifdef YY_USES_REJECT
1009
 
                        YY_FATAL_ERROR(
1010
 
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1011
 
#else
1012
1115
 
1013
1116
                        /* just a shorter name for the current buffer */
1014
 
                        YY_BUFFER_STATE b = yy_current_buffer;
 
1117
                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1015
1118
 
1016
1119
                        int yy_c_buf_p_offset =
1017
 
                                (int) (yy_c_buf_p - b->yy_ch_buf);
 
1120
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
1018
1121
 
1019
1122
                        if ( b->yy_is_our_buffer )
1020
1123
                                {
1027
1130
 
1028
1131
                                b->yy_ch_buf = (char *)
1029
1132
                                        /* Include room in for 2 EOB chars. */
1030
 
                                        yy_flex_realloc( (void *) b->yy_ch_buf,
1031
 
                                                         b->yy_buf_size + 2 );
 
1133
                                        yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1032
1134
                                }
1033
1135
                        else
1034
1136
                                /* Can't grow it, we don't own it. */
1038
1140
                                YY_FATAL_ERROR(
1039
1141
                                "fatal error - scanner input buffer overflow" );
1040
1142
 
1041
 
                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
 
1143
                        (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1042
1144
 
1043
 
                        num_to_read = yy_current_buffer->yy_buf_size -
 
1145
                        num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1044
1146
                                                number_to_move - 1;
1045
 
#endif
 
1147
 
1046
1148
                        }
1047
1149
 
1048
1150
                if ( num_to_read > YY_READ_BUF_SIZE )
1049
1151
                        num_to_read = YY_READ_BUF_SIZE;
1050
1152
 
1051
1153
                /* Read in more data. */
1052
 
                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1053
 
                        yy_n_chars, num_to_read );
 
1154
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 
1155
                        (yy_n_chars), (size_t) num_to_read );
1054
1156
 
1055
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
 
1157
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1056
1158
                }
1057
1159
 
1058
 
        if ( yy_n_chars == 0 )
 
1160
        if ( (yy_n_chars) == 0 )
1059
1161
                {
1060
1162
                if ( number_to_move == YY_MORE_ADJ )
1061
1163
                        {
1062
1164
                        ret_val = EOB_ACT_END_OF_FILE;
1063
 
                        yyrestart( yyin );
 
1165
                        yyrestart(yyin  );
1064
1166
                        }
1065
1167
 
1066
1168
                else
1067
1169
                        {
1068
1170
                        ret_val = EOB_ACT_LAST_MATCH;
1069
 
                        yy_current_buffer->yy_buffer_status =
 
1171
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1070
1172
                                YY_BUFFER_EOF_PENDING;
1071
1173
                        }
1072
1174
                }
1074
1176
        else
1075
1177
                ret_val = EOB_ACT_CONTINUE_SCAN;
1076
1178
 
1077
 
        yy_n_chars += number_to_move;
1078
 
        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1079
 
        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1080
 
 
1081
 
        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
 
1179
        if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 
1180
                /* Extend the array by 50%, plus the number we really need. */
 
1181
                yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
 
1182
                YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 
1183
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 
1184
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
 
1185
        }
 
1186
 
 
1187
        (yy_n_chars) += number_to_move;
 
1188
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
 
1189
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
 
1190
 
 
1191
        (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1082
1192
 
1083
1193
        return ret_val;
1084
 
        }
1085
 
 
 
1194
}
1086
1195
 
1087
1196
/* yy_get_previous_state - get the state just before the EOB char was reached */
1088
1197
 
1089
 
static yy_state_type yy_get_previous_state()
1090
 
        {
 
1198
    static yy_state_type yy_get_previous_state (void)
 
1199
{
1091
1200
        register yy_state_type yy_current_state;
1092
1201
        register char *yy_cp;
1093
 
 
1094
 
        yy_current_state = yy_start;
 
1202
    
 
1203
        yy_current_state = (yy_start);
1095
1204
        yy_current_state += YY_AT_BOL();
1096
1205
 
1097
 
        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
 
1206
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1098
1207
                {
1099
1208
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1100
1209
                if ( yy_accept[yy_current_state] )
1101
1210
                        {
1102
 
                        yy_last_accepting_state = yy_current_state;
1103
 
                        yy_last_accepting_cpos = yy_cp;
 
1211
                        (yy_last_accepting_state) = yy_current_state;
 
1212
                        (yy_last_accepting_cpos) = yy_cp;
1104
1213
                        }
1105
1214
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1106
1215
                        {
1112
1221
                }
1113
1222
 
1114
1223
        return yy_current_state;
1115
 
        }
1116
 
 
 
1224
}
1117
1225
 
1118
1226
/* yy_try_NUL_trans - try to make a transition on the NUL character
1119
1227
 *
1120
1228
 * synopsis
1121
1229
 *      next_state = yy_try_NUL_trans( current_state );
1122
1230
 */
1123
 
 
1124
 
#ifdef YY_USE_PROTOS
1125
 
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1126
 
#else
1127
 
static yy_state_type yy_try_NUL_trans( yy_current_state )
1128
 
yy_state_type yy_current_state;
1129
 
#endif
1130
 
        {
 
1231
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 
1232
{
1131
1233
        register int yy_is_jam;
1132
 
        register char *yy_cp = yy_c_buf_p;
 
1234
        register char *yy_cp = (yy_c_buf_p);
1133
1235
 
1134
1236
        register YY_CHAR yy_c = 1;
1135
1237
        if ( yy_accept[yy_current_state] )
1136
1238
                {
1137
 
                yy_last_accepting_state = yy_current_state;
1138
 
                yy_last_accepting_cpos = yy_cp;
 
1239
                (yy_last_accepting_state) = yy_current_state;
 
1240
                (yy_last_accepting_cpos) = yy_cp;
1139
1241
                }
1140
1242
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1141
1243
                {
1147
1249
        yy_is_jam = (yy_current_state == 17);
1148
1250
 
1149
1251
        return yy_is_jam ? 0 : yy_current_state;
1150
 
        }
1151
 
 
1152
 
 
1153
 
#ifndef YY_NO_UNPUT
1154
 
#ifdef YY_USE_PROTOS
1155
 
static void yyunput( int c, register char *yy_bp )
1156
 
#else
1157
 
static void yyunput( c, yy_bp )
1158
 
int c;
1159
 
register char *yy_bp;
1160
 
#endif
1161
 
        {
1162
 
        register char *yy_cp = yy_c_buf_p;
 
1252
}
 
1253
 
 
1254
    static void yyunput (int c, register char * yy_bp )
 
1255
{
 
1256
        register char *yy_cp;
 
1257
    
 
1258
    yy_cp = (yy_c_buf_p);
1163
1259
 
1164
1260
        /* undo effects of setting up yytext */
1165
 
        *yy_cp = yy_hold_char;
 
1261
        *yy_cp = (yy_hold_char);
1166
1262
 
1167
 
        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 
1263
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1168
1264
                { /* need to shift things up to make room */
1169
1265
                /* +2 for EOB chars. */
1170
 
                register int number_to_move = yy_n_chars + 2;
1171
 
                register char *dest = &yy_current_buffer->yy_ch_buf[
1172
 
                                        yy_current_buffer->yy_buf_size + 2];
 
1266
                register int number_to_move = (yy_n_chars) + 2;
 
1267
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 
1268
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1173
1269
                register char *source =
1174
 
                                &yy_current_buffer->yy_ch_buf[number_to_move];
 
1270
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1175
1271
 
1176
 
                while ( source > yy_current_buffer->yy_ch_buf )
 
1272
                while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1177
1273
                        *--dest = *--source;
1178
1274
 
1179
1275
                yy_cp += (int) (dest - source);
1180
1276
                yy_bp += (int) (dest - source);
1181
 
                yy_current_buffer->yy_n_chars =
1182
 
                        yy_n_chars = yy_current_buffer->yy_buf_size;
 
1277
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
 
1278
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1183
1279
 
1184
 
                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 
1280
                if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1185
1281
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
1186
1282
                }
1187
1283
 
1188
1284
        *--yy_cp = (char) c;
1189
1285
 
1190
 
 
1191
 
        yytext_ptr = yy_bp;
1192
 
        yy_hold_char = *yy_cp;
1193
 
        yy_c_buf_p = yy_cp;
1194
 
        }
1195
 
#endif  /* ifndef YY_NO_UNPUT */
1196
 
 
 
1286
        (yytext_ptr) = yy_bp;
 
1287
        (yy_hold_char) = *yy_cp;
 
1288
        (yy_c_buf_p) = yy_cp;
 
1289
}
1197
1290
 
1198
1291
#ifndef YY_NO_INPUT
1199
1292
#ifdef __cplusplus
1200
 
static int yyinput()
 
1293
    static int yyinput (void)
1201
1294
#else
1202
 
static int input()
 
1295
    static int input  (void)
1203
1296
#endif
1204
 
        {
 
1297
 
 
1298
{
1205
1299
        int c;
1206
 
 
1207
 
        *yy_c_buf_p = yy_hold_char;
1208
 
 
1209
 
        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
 
1300
    
 
1301
        *(yy_c_buf_p) = (yy_hold_char);
 
1302
 
 
1303
        if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1210
1304
                {
1211
1305
                /* yy_c_buf_p now points to the character we want to return.
1212
1306
                 * If this occurs *before* the EOB characters, then it's a
1213
1307
                 * valid NUL; if not, then we've hit the end of the buffer.
1214
1308
                 */
1215
 
                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 
1309
                if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1216
1310
                        /* This was really a NUL. */
1217
 
                        *yy_c_buf_p = '\0';
 
1311
                        *(yy_c_buf_p) = '\0';
1218
1312
 
1219
1313
                else
1220
1314
                        { /* need more input */
1221
 
                        int offset = yy_c_buf_p - yytext_ptr;
1222
 
                        ++yy_c_buf_p;
 
1315
                        int offset = (yy_c_buf_p) - (yytext_ptr);
 
1316
                        ++(yy_c_buf_p);
1223
1317
 
1224
 
                        switch ( yy_get_next_buffer() )
 
1318
                        switch ( yy_get_next_buffer(  ) )
1225
1319
                                {
1226
1320
                                case EOB_ACT_LAST_MATCH:
1227
1321
                                        /* This happens because yy_g_n_b()
1235
1329
                                         */
1236
1330
 
1237
1331
                                        /* Reset buffer status. */
1238
 
                                        yyrestart( yyin );
 
1332
                                        yyrestart(yyin );
1239
1333
 
1240
 
                                        /* fall through */
 
1334
                                        /*FALLTHROUGH*/
1241
1335
 
1242
1336
                                case EOB_ACT_END_OF_FILE:
1243
1337
                                        {
1244
 
                                        if ( yywrap() )
 
1338
                                        if ( yywrap( ) )
1245
1339
                                                return EOF;
1246
1340
 
1247
 
                                        if ( ! yy_did_buffer_switch_on_eof )
 
1341
                                        if ( ! (yy_did_buffer_switch_on_eof) )
1248
1342
                                                YY_NEW_FILE;
1249
1343
#ifdef __cplusplus
1250
1344
                                        return yyinput();
1254
1348
                                        }
1255
1349
 
1256
1350
                                case EOB_ACT_CONTINUE_SCAN:
1257
 
                                        yy_c_buf_p = yytext_ptr + offset;
 
1351
                                        (yy_c_buf_p) = (yytext_ptr) + offset;
1258
1352
                                        break;
1259
1353
                                }
1260
1354
                        }
1261
1355
                }
1262
1356
 
1263
 
        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1264
 
        *yy_c_buf_p = '\0';     /* preserve yytext */
1265
 
        yy_hold_char = *++yy_c_buf_p;
 
1357
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
 
1358
        *(yy_c_buf_p) = '\0';   /* preserve yytext */
 
1359
        (yy_hold_char) = *++(yy_c_buf_p);
1266
1360
 
1267
 
        yy_current_buffer->yy_at_bol = (c == '\n');
 
1361
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1268
1362
 
1269
1363
        return c;
1270
 
        }
1271
 
#endif /* YY_NO_INPUT */
1272
 
 
1273
 
#ifdef YY_USE_PROTOS
1274
 
void yyrestart( FILE *input_file )
1275
 
#else
1276
 
void yyrestart( input_file )
1277
 
FILE *input_file;
1278
 
#endif
1279
 
        {
1280
 
        if ( ! yy_current_buffer )
1281
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1282
 
 
1283
 
        yy_init_buffer( yy_current_buffer, input_file );
1284
 
        yy_load_buffer_state();
1285
 
        }
1286
 
 
1287
 
 
1288
 
#ifdef YY_USE_PROTOS
1289
 
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1290
 
#else
1291
 
void yy_switch_to_buffer( new_buffer )
1292
 
YY_BUFFER_STATE new_buffer;
1293
 
#endif
1294
 
        {
1295
 
        if ( yy_current_buffer == new_buffer )
 
1364
}
 
1365
#endif  /* ifndef YY_NO_INPUT */
 
1366
 
 
1367
/** Immediately switch to a different input stream.
 
1368
 * @param input_file A readable stream.
 
1369
 * 
 
1370
 * @note This function does not reset the start condition to @c INITIAL .
 
1371
 */
 
1372
    void yyrestart  (FILE * input_file )
 
1373
{
 
1374
    
 
1375
        if ( ! YY_CURRENT_BUFFER ){
 
1376
        yyensure_buffer_stack ();
 
1377
                YY_CURRENT_BUFFER_LVALUE =
 
1378
            yy_create_buffer(yyin,YY_BUF_SIZE );
 
1379
        }
 
1380
 
 
1381
        yy_init_buffer(YY_CURRENT_BUFFER,input_file );
 
1382
        yy_load_buffer_state( );
 
1383
}
 
1384
 
 
1385
/** Switch to a different input buffer.
 
1386
 * @param new_buffer The new input buffer.
 
1387
 * 
 
1388
 */
 
1389
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 
1390
{
 
1391
    
 
1392
        /* TODO. We should be able to replace this entire function body
 
1393
         * with
 
1394
         *              yypop_buffer_state();
 
1395
         *              yypush_buffer_state(new_buffer);
 
1396
     */
 
1397
        yyensure_buffer_stack ();
 
1398
        if ( YY_CURRENT_BUFFER == new_buffer )
1296
1399
                return;
1297
1400
 
1298
 
        if ( yy_current_buffer )
 
1401
        if ( YY_CURRENT_BUFFER )
1299
1402
                {
1300
1403
                /* Flush out information for old buffer. */
1301
 
                *yy_c_buf_p = yy_hold_char;
1302
 
                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1303
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
 
1404
                *(yy_c_buf_p) = (yy_hold_char);
 
1405
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
1406
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1304
1407
                }
1305
1408
 
1306
 
        yy_current_buffer = new_buffer;
1307
 
        yy_load_buffer_state();
 
1409
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
1410
        yy_load_buffer_state( );
1308
1411
 
1309
1412
        /* We don't actually know whether we did this switch during
1310
1413
         * EOF (yywrap()) processing, but the only time this flag
1311
1414
         * is looked at is after yywrap() is called, so it's safe
1312
1415
         * to go ahead and always set it.
1313
1416
         */
1314
 
        yy_did_buffer_switch_on_eof = 1;
1315
 
        }
1316
 
 
1317
 
 
1318
 
#ifdef YY_USE_PROTOS
1319
 
void yy_load_buffer_state( void )
1320
 
#else
1321
 
void yy_load_buffer_state()
1322
 
#endif
1323
 
        {
1324
 
        yy_n_chars = yy_current_buffer->yy_n_chars;
1325
 
        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1326
 
        yyin = yy_current_buffer->yy_input_file;
1327
 
        yy_hold_char = *yy_c_buf_p;
1328
 
        }
1329
 
 
1330
 
 
1331
 
#ifdef YY_USE_PROTOS
1332
 
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1333
 
#else
1334
 
YY_BUFFER_STATE yy_create_buffer( file, size )
1335
 
FILE *file;
1336
 
int size;
1337
 
#endif
1338
 
        {
 
1417
        (yy_did_buffer_switch_on_eof) = 1;
 
1418
}
 
1419
 
 
1420
static void yy_load_buffer_state  (void)
 
1421
{
 
1422
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
1423
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
 
1424
        yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 
1425
        (yy_hold_char) = *(yy_c_buf_p);
 
1426
}
 
1427
 
 
1428
/** Allocate and initialize an input buffer state.
 
1429
 * @param file A readable stream.
 
1430
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 
1431
 * 
 
1432
 * @return the allocated buffer state.
 
1433
 */
 
1434
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
 
1435
{
1339
1436
        YY_BUFFER_STATE b;
1340
 
 
1341
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 
1437
    
 
1438
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1342
1439
        if ( ! b )
1343
1440
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1344
1441
 
1347
1444
        /* yy_ch_buf has to be 2 characters longer than the size given because
1348
1445
         * we need to put in 2 end-of-buffer characters.
1349
1446
         */
1350
 
        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
 
1447
        b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
1351
1448
        if ( ! b->yy_ch_buf )
1352
1449
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1353
1450
 
1354
1451
        b->yy_is_our_buffer = 1;
1355
1452
 
1356
 
        yy_init_buffer( b, file );
 
1453
        yy_init_buffer(b,file );
1357
1454
 
1358
1455
        return b;
1359
 
        }
1360
 
 
1361
 
 
1362
 
#ifdef YY_USE_PROTOS
1363
 
void yy_delete_buffer( YY_BUFFER_STATE b )
1364
 
#else
1365
 
void yy_delete_buffer( b )
1366
 
YY_BUFFER_STATE b;
1367
 
#endif
1368
 
        {
 
1456
}
 
1457
 
 
1458
/** Destroy the buffer.
 
1459
 * @param b a buffer created with yy_create_buffer()
 
1460
 * 
 
1461
 */
 
1462
    void yy_delete_buffer (YY_BUFFER_STATE  b )
 
1463
{
 
1464
    
1369
1465
        if ( ! b )
1370
1466
                return;
1371
1467
 
1372
 
        if ( b == yy_current_buffer )
1373
 
                yy_current_buffer = (YY_BUFFER_STATE) 0;
 
1468
        if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
 
1469
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1374
1470
 
1375
1471
        if ( b->yy_is_our_buffer )
1376
 
                yy_flex_free( (void *) b->yy_ch_buf );
1377
 
 
1378
 
        yy_flex_free( (void *) b );
1379
 
        }
1380
 
 
1381
 
 
1382
 
 
1383
 
#ifdef YY_USE_PROTOS
1384
 
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1385
 
#else
1386
 
void yy_init_buffer( b, file )
1387
 
YY_BUFFER_STATE b;
1388
 
FILE *file;
1389
 
#endif
1390
 
 
1391
 
 
1392
 
        {
1393
 
        yy_flush_buffer( b );
 
1472
                yyfree((void *) b->yy_ch_buf  );
 
1473
 
 
1474
        yyfree((void *) b  );
 
1475
}
 
1476
 
 
1477
#ifndef __cplusplus
 
1478
extern int isatty (int );
 
1479
#endif /* __cplusplus */
 
1480
    
 
1481
/* Initializes or reinitializes a buffer.
 
1482
 * This function is sometimes called more than once on the same buffer,
 
1483
 * such as during a yyrestart() or at EOF.
 
1484
 */
 
1485
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
1486
 
 
1487
{
 
1488
        int oerrno = errno;
 
1489
    
 
1490
        yy_flush_buffer(b );
1394
1491
 
1395
1492
        b->yy_input_file = file;
1396
1493
        b->yy_fill_buffer = 1;
1397
1494
 
1398
 
#if YY_ALWAYS_INTERACTIVE
1399
 
        b->yy_is_interactive = 1;
1400
 
#else
1401
 
#if YY_NEVER_INTERACTIVE
1402
 
        b->yy_is_interactive = 0;
1403
 
#else
1404
 
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1405
 
#endif
1406
 
#endif
1407
 
        }
1408
 
 
1409
 
 
1410
 
#ifdef YY_USE_PROTOS
1411
 
void yy_flush_buffer( YY_BUFFER_STATE b )
1412
 
#else
1413
 
void yy_flush_buffer( b )
1414
 
YY_BUFFER_STATE b;
1415
 
#endif
1416
 
 
1417
 
        {
1418
 
        if ( ! b )
 
1495
    /* If b is the current buffer, then yy_init_buffer was _probably_
 
1496
     * called from yyrestart() or through yy_get_next_buffer.
 
1497
     * In that case, we don't want to reset the lineno or column.
 
1498
     */
 
1499
    if (b != YY_CURRENT_BUFFER){
 
1500
        b->yy_bs_lineno = 1;
 
1501
        b->yy_bs_column = 0;
 
1502
    }
 
1503
 
 
1504
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
 
1505
    
 
1506
        errno = oerrno;
 
1507
}
 
1508
 
 
1509
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 
1510
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 
1511
 * 
 
1512
 */
 
1513
    void yy_flush_buffer (YY_BUFFER_STATE  b )
 
1514
{
 
1515
        if ( ! b )
1419
1516
                return;
1420
1517
 
1421
1518
        b->yy_n_chars = 0;
1432
1529
        b->yy_at_bol = 1;
1433
1530
        b->yy_buffer_status = YY_BUFFER_NEW;
1434
1531
 
1435
 
        if ( b == yy_current_buffer )
1436
 
                yy_load_buffer_state();
1437
 
        }
1438
 
 
1439
 
 
1440
 
#ifndef YY_NO_SCAN_BUFFER
1441
 
#ifdef YY_USE_PROTOS
1442
 
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1443
 
#else
1444
 
YY_BUFFER_STATE yy_scan_buffer( base, size )
1445
 
char *base;
1446
 
yy_size_t size;
1447
 
#endif
1448
 
        {
 
1532
        if ( b == YY_CURRENT_BUFFER )
 
1533
                yy_load_buffer_state( );
 
1534
}
 
1535
 
 
1536
/** Pushes the new state onto the stack. The new state becomes
 
1537
 *  the current state. This function will allocate the stack
 
1538
 *  if necessary.
 
1539
 *  @param new_buffer The new state.
 
1540
 *  
 
1541
 */
 
1542
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 
1543
{
 
1544
        if (new_buffer == NULL)
 
1545
                return;
 
1546
 
 
1547
        yyensure_buffer_stack();
 
1548
 
 
1549
        /* This block is copied from yy_switch_to_buffer. */
 
1550
        if ( YY_CURRENT_BUFFER )
 
1551
                {
 
1552
                /* Flush out information for old buffer. */
 
1553
                *(yy_c_buf_p) = (yy_hold_char);
 
1554
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
1555
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 
1556
                }
 
1557
 
 
1558
        /* Only push if top exists. Otherwise, replace top. */
 
1559
        if (YY_CURRENT_BUFFER)
 
1560
                (yy_buffer_stack_top)++;
 
1561
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
1562
 
 
1563
        /* copied from yy_switch_to_buffer. */
 
1564
        yy_load_buffer_state( );
 
1565
        (yy_did_buffer_switch_on_eof) = 1;
 
1566
}
 
1567
 
 
1568
/** Removes and deletes the top of the stack, if present.
 
1569
 *  The next element becomes the new top.
 
1570
 *  
 
1571
 */
 
1572
void yypop_buffer_state (void)
 
1573
{
 
1574
        if (!YY_CURRENT_BUFFER)
 
1575
                return;
 
1576
 
 
1577
        yy_delete_buffer(YY_CURRENT_BUFFER );
 
1578
        YY_CURRENT_BUFFER_LVALUE = NULL;
 
1579
        if ((yy_buffer_stack_top) > 0)
 
1580
                --(yy_buffer_stack_top);
 
1581
 
 
1582
        if (YY_CURRENT_BUFFER) {
 
1583
                yy_load_buffer_state( );
 
1584
                (yy_did_buffer_switch_on_eof) = 1;
 
1585
        }
 
1586
}
 
1587
 
 
1588
/* Allocates the stack if it does not exist.
 
1589
 *  Guarantees space for at least one push.
 
1590
 */
 
1591
static void yyensure_buffer_stack (void)
 
1592
{
 
1593
        int num_to_alloc;
 
1594
    
 
1595
        if (!(yy_buffer_stack)) {
 
1596
 
 
1597
                /* First allocation is just for 2 elements, since we don't know if this
 
1598
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 
1599
                 * immediate realloc on the next call.
 
1600
         */
 
1601
                num_to_alloc = 1;
 
1602
                (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
 
1603
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
 
1604
                                                                );
 
1605
                if ( ! (yy_buffer_stack) )
 
1606
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
 
1607
                                                                  
 
1608
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 
1609
                                
 
1610
                (yy_buffer_stack_max) = num_to_alloc;
 
1611
                (yy_buffer_stack_top) = 0;
 
1612
                return;
 
1613
        }
 
1614
 
 
1615
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
1616
 
 
1617
                /* Increase the buffer to prepare for a possible push. */
 
1618
                int grow_size = 8 /* arbitrary grow size */;
 
1619
 
 
1620
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
 
1621
                (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
 
1622
                                                                ((yy_buffer_stack),
 
1623
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
 
1624
                                                                );
 
1625
                if ( ! (yy_buffer_stack) )
 
1626
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
 
1627
 
 
1628
                /* zero only the new slots.*/
 
1629
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
 
1630
                (yy_buffer_stack_max) = num_to_alloc;
 
1631
        }
 
1632
}
 
1633
 
 
1634
/** Setup the input buffer state to scan directly from a user-specified character buffer.
 
1635
 * @param base the character buffer
 
1636
 * @param size the size in bytes of the character buffer
 
1637
 * 
 
1638
 * @return the newly allocated buffer state object. 
 
1639
 */
 
1640
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 
1641
{
1449
1642
        YY_BUFFER_STATE b;
1450
 
 
 
1643
    
1451
1644
        if ( size < 2 ||
1452
1645
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
1453
1646
             base[size-1] != YY_END_OF_BUFFER_CHAR )
1454
1647
                /* They forgot to leave room for the EOB's. */
1455
1648
                return 0;
1456
1649
 
1457
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 
1650
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1458
1651
        if ( ! b )
1459
1652
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1460
1653
 
1468
1661
        b->yy_fill_buffer = 0;
1469
1662
        b->yy_buffer_status = YY_BUFFER_NEW;
1470
1663
 
1471
 
        yy_switch_to_buffer( b );
 
1664
        yy_switch_to_buffer(b  );
1472
1665
 
1473
1666
        return b;
1474
 
        }
1475
 
#endif
1476
 
 
1477
 
 
1478
 
#ifndef YY_NO_SCAN_STRING
1479
 
#ifdef YY_USE_PROTOS
1480
 
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1481
 
#else
1482
 
YY_BUFFER_STATE yy_scan_string( yy_str )
1483
 
yyconst char *yy_str;
1484
 
#endif
1485
 
        {
1486
 
        int len;
1487
 
        for ( len = 0; yy_str[len]; ++len )
1488
 
                ;
1489
 
 
1490
 
        return yy_scan_bytes( yy_str, len );
1491
 
        }
1492
 
#endif
1493
 
 
1494
 
 
1495
 
#ifndef YY_NO_SCAN_BYTES
1496
 
#ifdef YY_USE_PROTOS
1497
 
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1498
 
#else
1499
 
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1500
 
yyconst char *bytes;
1501
 
int len;
1502
 
#endif
1503
 
        {
 
1667
}
 
1668
 
 
1669
/** Setup the input buffer state to scan a string. The next call to yylex() will
 
1670
 * scan from a @e copy of @a str.
 
1671
 * @param yystr a NUL-terminated string to scan
 
1672
 * 
 
1673
 * @return the newly allocated buffer state object.
 
1674
 * @note If you want to scan bytes that may contain NUL values, then use
 
1675
 *       yy_scan_bytes() instead.
 
1676
 */
 
1677
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
 
1678
{
 
1679
    
 
1680
        return yy_scan_bytes(yystr,strlen(yystr) );
 
1681
}
 
1682
 
 
1683
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 
1684
 * scan from a @e copy of @a bytes.
 
1685
 * @param bytes the byte buffer to scan
 
1686
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
1687
 * 
 
1688
 * @return the newly allocated buffer state object.
 
1689
 */
 
1690
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 
1691
{
1504
1692
        YY_BUFFER_STATE b;
1505
1693
        char *buf;
1506
1694
        yy_size_t n;
1507
1695
        int i;
1508
 
 
 
1696
    
1509
1697
        /* Get memory for full buffer, including space for trailing EOB's. */
1510
 
        n = len + 2;
1511
 
        buf = (char *) yy_flex_alloc( n );
 
1698
        n = _yybytes_len + 2;
 
1699
        buf = (char *) yyalloc(n  );
1512
1700
        if ( ! buf )
1513
1701
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1514
1702
 
1515
 
        for ( i = 0; i < len; ++i )
1516
 
                buf[i] = bytes[i];
1517
 
 
1518
 
        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1519
 
 
1520
 
        b = yy_scan_buffer( buf, n );
 
1703
        for ( i = 0; i < _yybytes_len; ++i )
 
1704
                buf[i] = yybytes[i];
 
1705
 
 
1706
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
1707
 
 
1708
        b = yy_scan_buffer(buf,n );
1521
1709
        if ( ! b )
1522
1710
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1523
1711
 
1527
1715
        b->yy_is_our_buffer = 1;
1528
1716
 
1529
1717
        return b;
1530
 
        }
1531
 
#endif
1532
 
 
1533
 
 
1534
 
#ifndef YY_NO_PUSH_STATE
1535
 
#ifdef YY_USE_PROTOS
1536
 
static void yy_push_state( int new_state )
1537
 
#else
1538
 
static void yy_push_state( new_state )
1539
 
int new_state;
1540
 
#endif
1541
 
        {
1542
 
        if ( yy_start_stack_ptr >= yy_start_stack_depth )
1543
 
                {
1544
 
                yy_size_t new_size;
1545
 
 
1546
 
                yy_start_stack_depth += YY_START_STACK_INCR;
1547
 
                new_size = yy_start_stack_depth * sizeof( int );
1548
 
 
1549
 
                if ( ! yy_start_stack )
1550
 
                        yy_start_stack = (int *) yy_flex_alloc( new_size );
1551
 
 
1552
 
                else
1553
 
                        yy_start_stack = (int *) yy_flex_realloc(
1554
 
                                        (void *) yy_start_stack, new_size );
1555
 
 
1556
 
                if ( ! yy_start_stack )
1557
 
                        YY_FATAL_ERROR(
1558
 
                        "out of memory expanding start-condition stack" );
1559
 
                }
1560
 
 
1561
 
        yy_start_stack[yy_start_stack_ptr++] = YY_START;
1562
 
 
1563
 
        BEGIN(new_state);
1564
 
        }
1565
 
#endif
1566
 
 
1567
 
 
1568
 
#ifndef YY_NO_POP_STATE
1569
 
static void yy_pop_state()
1570
 
        {
1571
 
        if ( --yy_start_stack_ptr < 0 )
1572
 
                YY_FATAL_ERROR( "start-condition stack underflow" );
1573
 
 
1574
 
        BEGIN(yy_start_stack[yy_start_stack_ptr]);
1575
 
        }
1576
 
#endif
1577
 
 
1578
 
 
1579
 
#ifndef YY_NO_TOP_STATE
1580
 
static int yy_top_state()
1581
 
        {
1582
 
        return yy_start_stack[yy_start_stack_ptr - 1];
1583
 
        }
1584
 
#endif
 
1718
}
1585
1719
 
1586
1720
#ifndef YY_EXIT_FAILURE
1587
1721
#define YY_EXIT_FAILURE 2
1588
1722
#endif
1589
1723
 
1590
 
#ifdef YY_USE_PROTOS
1591
 
static void yy_fatal_error( yyconst char msg[] )
1592
 
#else
1593
 
static void yy_fatal_error( msg )
1594
 
char msg[];
1595
 
#endif
1596
 
        {
1597
 
        (void) fprintf( stderr, "%s\n", msg );
 
1724
static void yy_fatal_error (yyconst char* msg )
 
1725
{
 
1726
        (void) fprintf( stderr, "%s\n", msg );
1598
1727
        exit( YY_EXIT_FAILURE );
1599
 
        }
1600
 
 
1601
 
 
 
1728
}
1602
1729
 
1603
1730
/* Redefine yyless() so it works in section 3 code. */
1604
1731
 
1607
1734
        do \
1608
1735
                { \
1609
1736
                /* Undo effects of setting up yytext. */ \
1610
 
                yytext[yyleng] = yy_hold_char; \
1611
 
                yy_c_buf_p = yytext + n; \
1612
 
                yy_hold_char = *yy_c_buf_p; \
1613
 
                *yy_c_buf_p = '\0'; \
1614
 
                yyleng = n; \
 
1737
        int yyless_macro_arg = (n); \
 
1738
        YY_LESS_LINENO(yyless_macro_arg);\
 
1739
                yytext[yyleng] = (yy_hold_char); \
 
1740
                (yy_c_buf_p) = yytext + yyless_macro_arg; \
 
1741
                (yy_hold_char) = *(yy_c_buf_p); \
 
1742
                *(yy_c_buf_p) = '\0'; \
 
1743
                yyleng = yyless_macro_arg; \
1615
1744
                } \
1616
1745
        while ( 0 )
1617
1746
 
1618
 
 
1619
 
/* Internal utility routines. */
1620
 
 
1621
 
#ifndef yytext_ptr
1622
 
#ifdef YY_USE_PROTOS
1623
 
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
 
1747
/* Accessor  methods (get/set functions) to struct members. */
 
1748
 
 
1749
/** Get the current line number.
 
1750
 * 
 
1751
 */
 
1752
int yyget_lineno  (void)
 
1753
{
 
1754
        
 
1755
    return yylineno;
 
1756
}
 
1757
 
 
1758
/** Get the input stream.
 
1759
 * 
 
1760
 */
 
1761
FILE *yyget_in  (void)
 
1762
{
 
1763
        return yyin;
 
1764
}
 
1765
 
 
1766
/** Get the output stream.
 
1767
 * 
 
1768
 */
 
1769
FILE *yyget_out  (void)
 
1770
{
 
1771
        return yyout;
 
1772
}
 
1773
 
 
1774
/** Get the length of the current token.
 
1775
 * 
 
1776
 */
 
1777
int yyget_leng  (void)
 
1778
{
 
1779
        return yyleng;
 
1780
}
 
1781
 
 
1782
/** Get the current token.
 
1783
 * 
 
1784
 */
 
1785
 
 
1786
char *yyget_text  (void)
 
1787
{
 
1788
        return yytext;
 
1789
}
 
1790
 
 
1791
/** Set the current line number.
 
1792
 * @param line_number
 
1793
 * 
 
1794
 */
 
1795
void yyset_lineno (int  line_number )
 
1796
{
 
1797
    
 
1798
    yylineno = line_number;
 
1799
}
 
1800
 
 
1801
/** Set the input stream. This does not discard the current
 
1802
 * input buffer.
 
1803
 * @param in_str A readable stream.
 
1804
 * 
 
1805
 * @see yy_switch_to_buffer
 
1806
 */
 
1807
void yyset_in (FILE *  in_str )
 
1808
{
 
1809
        yyin = in_str ;
 
1810
}
 
1811
 
 
1812
void yyset_out (FILE *  out_str )
 
1813
{
 
1814
        yyout = out_str ;
 
1815
}
 
1816
 
 
1817
int yyget_debug  (void)
 
1818
{
 
1819
        return yy_flex_debug;
 
1820
}
 
1821
 
 
1822
void yyset_debug (int  bdebug )
 
1823
{
 
1824
        yy_flex_debug = bdebug ;
 
1825
}
 
1826
 
 
1827
static int yy_init_globals (void)
 
1828
{
 
1829
        /* Initialization is the same as for the non-reentrant scanner.
 
1830
     * This function is called from yylex_destroy(), so don't allocate here.
 
1831
     */
 
1832
 
 
1833
    (yy_buffer_stack) = 0;
 
1834
    (yy_buffer_stack_top) = 0;
 
1835
    (yy_buffer_stack_max) = 0;
 
1836
    (yy_c_buf_p) = (char *) 0;
 
1837
    (yy_init) = 0;
 
1838
    (yy_start) = 0;
 
1839
 
 
1840
/* Defined in main.c */
 
1841
#ifdef YY_STDINIT
 
1842
    yyin = stdin;
 
1843
    yyout = stdout;
1624
1844
#else
1625
 
static void yy_flex_strncpy( s1, s2, n )
1626
 
char *s1;
1627
 
yyconst char *s2;
1628
 
int n;
 
1845
    yyin = (FILE *) 0;
 
1846
    yyout = (FILE *) 0;
1629
1847
#endif
1630
 
        {
 
1848
 
 
1849
    /* For future reference: Set errno on error, since we are called by
 
1850
     * yylex_init()
 
1851
     */
 
1852
    return 0;
 
1853
}
 
1854
 
 
1855
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
 
1856
int yylex_destroy  (void)
 
1857
{
 
1858
    
 
1859
    /* Pop the buffer stack, destroying each element. */
 
1860
        while(YY_CURRENT_BUFFER){
 
1861
                yy_delete_buffer(YY_CURRENT_BUFFER  );
 
1862
                YY_CURRENT_BUFFER_LVALUE = NULL;
 
1863
                yypop_buffer_state();
 
1864
        }
 
1865
 
 
1866
        /* Destroy the stack itself. */
 
1867
        yyfree((yy_buffer_stack) );
 
1868
        (yy_buffer_stack) = NULL;
 
1869
 
 
1870
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
 
1871
     * yylex() is called, initialization will occur. */
 
1872
    yy_init_globals( );
 
1873
 
 
1874
    return 0;
 
1875
}
 
1876
 
 
1877
/*
 
1878
 * Internal utility routines.
 
1879
 */
 
1880
 
 
1881
#ifndef yytext_ptr
 
1882
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 
1883
{
1631
1884
        register int i;
1632
1885
        for ( i = 0; i < n; ++i )
1633
1886
                s1[i] = s2[i];
1634
 
        }
 
1887
}
1635
1888
#endif
1636
1889
 
1637
1890
#ifdef YY_NEED_STRLEN
1638
 
#ifdef YY_USE_PROTOS
1639
 
static int yy_flex_strlen( yyconst char *s )
1640
 
#else
1641
 
static int yy_flex_strlen( s )
1642
 
yyconst char *s;
1643
 
#endif
1644
 
        {
 
1891
static int yy_flex_strlen (yyconst char * s )
 
1892
{
1645
1893
        register int n;
1646
1894
        for ( n = 0; s[n]; ++n )
1647
1895
                ;
1648
1896
 
1649
1897
        return n;
1650
 
        }
1651
 
#endif
1652
 
 
1653
 
 
1654
 
#ifdef YY_USE_PROTOS
1655
 
static void *yy_flex_alloc( yy_size_t size )
1656
 
#else
1657
 
static void *yy_flex_alloc( size )
1658
 
yy_size_t size;
1659
 
#endif
1660
 
        {
 
1898
}
 
1899
#endif
 
1900
 
 
1901
void *yyalloc (yy_size_t  size )
 
1902
{
1661
1903
        return (void *) malloc( size );
1662
 
        }
 
1904
}
1663
1905
 
1664
 
#ifdef YY_USE_PROTOS
1665
 
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1666
 
#else
1667
 
static void *yy_flex_realloc( ptr, size )
1668
 
void *ptr;
1669
 
yy_size_t size;
1670
 
#endif
1671
 
        {
 
1906
void *yyrealloc  (void * ptr, yy_size_t  size )
 
1907
{
1672
1908
        /* The cast to (char *) in the following accommodates both
1673
1909
         * implementations that use char* generic pointers, and those
1674
1910
         * that use void* generic pointers.  It works with the latter
1677
1913
         * as though doing an assignment.
1678
1914
         */
1679
1915
        return (void *) realloc( (char *) ptr, size );
1680
 
        }
1681
 
 
1682
 
#ifdef YY_USE_PROTOS
1683
 
static void yy_flex_free( void *ptr )
1684
 
#else
1685
 
static void yy_flex_free( ptr )
1686
 
void *ptr;
1687
 
#endif
1688
 
        {
1689
 
        free( ptr );
1690
 
        }
1691
 
 
1692
 
#if YY_MAIN
1693
 
int main()
1694
 
        {
1695
 
        yylex();
1696
 
        return 0;
1697
 
        }
1698
 
#endif
 
1916
}
 
1917
 
 
1918
void yyfree (void * ptr )
 
1919
{
 
1920
        free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
 
1921
}
 
1922
 
 
1923
#define YYTABLES_NAME "yytables"
 
1924
 
1699
1925
#line 183 "wmluiltok.l"
1700
1926
 
1701
1927
 
1702
1928
 
 
1929
 
1703
1930
void
1704
1931
add_token (t)                                   /* keep sorted by name */
1705
1932
    Token t;
1738
1965
         }
1739
1966
    return (1);
1740
1967
}
 
1968