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