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