source: main/trunk/greenstone2/runtime-src/src/z3950/zparse.yy.c@ 27061

Last change on this file since 27061 was 15495, checked in by mdewsnip, 16 years ago

Updated to include everything required by the "library" executable when Z39.50 support is compiled in.

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