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