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