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