1 #define yy_create_buffer Ext_fcnsParser_create_buffer
\r
2 #define yy_delete_buffer Ext_fcnsParser_delete_buffer
\r
3 #define yy_scan_buffer Ext_fcnsParser_scan_buffer
\r
4 #define yy_scan_string Ext_fcnsParser_scan_string
\r
5 #define yy_scan_bytes Ext_fcnsParser_scan_bytes
\r
6 #define yy_flex_debug Ext_fcnsParser_flex_debug
\r
7 #define yy_init_buffer Ext_fcnsParser_init_buffer
\r
8 #define yy_flush_buffer Ext_fcnsParser_flush_buffer
\r
9 #define yy_load_buffer_state Ext_fcnsParser_load_buffer_state
\r
10 #define yy_switch_to_buffer Ext_fcnsParser_switch_to_buffer
\r
11 #define yyin Ext_fcnsParserin
\r
12 #define yyleng Ext_fcnsParserleng
\r
13 #define yylex Ext_fcnsParserlex
\r
14 #define yyout Ext_fcnsParserout
\r
15 #define yyrestart Ext_fcnsParserrestart
\r
16 #define yytext Ext_fcnsParsertext
\r
18 #line 19 "ext_fcnslexer.cc"
\r
19 /* A lexical scanner generated by flex */
\r
21 /* Scanner skeleton version:
\r
22 * $Header: /cvsroot/gscpv4/src/ftacmp/ext_fcnslexer.cc,v 1.1.1.1 2013/12/02 17:44:57 spatsch Exp $
\r
25 #define FLEX_SCANNER
\r
26 #define YY_FLEX_MAJOR_VERSION 2
\r
27 #define YY_FLEX_MINOR_VERSION 5
\r
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
\r
45 /* Use prototypes in function declarations. */
\r
46 #define YY_USE_PROTOS
\r
48 /* The "const" storage-class-modifier is valid. */
\r
49 #define YY_USE_CONST
\r
51 #else /* ! __cplusplus */
\r
55 #define YY_USE_PROTOS
\r
56 #define YY_USE_CONST
\r
58 #endif /* __STDC__ */
\r
59 #endif /* ! __cplusplus */
\r
66 #define YY_USE_CONST
\r
67 #define YY_USE_PROTOS
\r
71 #define yyconst const
\r
77 #ifdef YY_USE_PROTOS
\r
78 #define YY_PROTO(proto) proto
\r
80 #define YY_PROTO(proto) ()
\r
83 /* Returned upon end-of-file. */
\r
86 /* Promotes a possibly negative, possibly signed char to an unsigned
\r
87 * integer for use as an array index. If the signed char is negative,
\r
88 * we want to instead treat it as an 8-bit unsigned char, hence the
\r
91 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
\r
93 /* Enter a start condition. This macro really ought to take a parameter,
\r
94 * but we do it the disgusting crufty way forced on us by the ()-less
\r
95 * definition of BEGIN.
\r
97 #define BEGIN yy_start = 1 + 2 *
\r
99 /* Translate the current start state into a value that can be later handed
\r
100 * to BEGIN to return to the state. The YYSTATE alias is for lex
\r
103 #define YY_START ((yy_start - 1) / 2)
\r
104 #define YYSTATE YY_START
\r
106 /* Action number for EOF rule of a given start state. */
\r
107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
\r
109 /* Special action meaning "start processing a new file". */
\r
110 #define YY_NEW_FILE yyrestart( yyin )
\r
112 #define YY_END_OF_BUFFER_CHAR 0
\r
114 /* Size of default input buffer. */
\r
115 #define YY_BUF_SIZE 16384
\r
117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
\r
120 extern FILE *yyin, *yyout;
\r
122 #define EOB_ACT_CONTINUE_SCAN 0
\r
123 #define EOB_ACT_END_OF_FILE 1
\r
124 #define EOB_ACT_LAST_MATCH 2
\r
126 /* The funky do-while in the following #define is used to turn the definition
\r
127 * int a single C statement (which needs a semi-colon terminator). This
\r
128 * avoids problems with code like:
\r
130 * if ( condition_holds )
\r
133 * do_something_else();
\r
135 * Prior to using the do-while the compiler would get upset at the
\r
136 * "else" because it interpreted the "if" statement as being all
\r
137 * done when it reached the ';' after the yyless() call.
\r
140 /* Return all but the first 'n' matched characters back to the input stream. */
\r
142 #define yyless(n) \
\r
145 /* Undo effects of setting up yytext. */ \
\r
146 *yy_cp = yy_hold_char; \
\r
147 YY_RESTORE_YY_MORE_OFFSET \
\r
148 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
\r
149 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
\r
153 #define unput(c) yyunput( c, yytext_ptr )
\r
155 /* The following is because we cannot portably get our hands on size_t
\r
156 * (without autoconf's help, which isn't available because we want
\r
157 * flex-generated scanners to compile on their own).
\r
159 typedef unsigned int yy_size_t;
\r
162 struct yy_buffer_state
\r
164 FILE *yy_input_file;
\r
166 char *yy_ch_buf; /* input buffer */
\r
167 char *yy_buf_pos; /* current position in input buffer */
\r
169 /* Size of input buffer in bytes, not including room for EOB
\r
172 yy_size_t yy_buf_size;
\r
174 /* Number of characters read into yy_ch_buf, not including EOB
\r
179 /* Whether we "own" the buffer - i.e., we know we created it,
\r
180 * and can realloc() it to grow it, and should free() it to
\r
183 int yy_is_our_buffer;
\r
185 /* Whether this is an "interactive" input source; if so, and
\r
186 * if we're using stdio for input, then we want to use getc()
\r
187 * instead of fread(), to make sure we stop fetching input after
\r
190 int yy_is_interactive;
\r
192 /* Whether we're considered to be at the beginning of a line.
\r
193 * If so, '^' rules will be active on the next match, otherwise
\r
198 /* Whether to try to fill the input buffer when we reach the
\r
201 int yy_fill_buffer;
\r
203 int yy_buffer_status;
\r
204 #define YY_BUFFER_NEW 0
\r
205 #define YY_BUFFER_NORMAL 1
\r
206 /* When an EOF's been seen but there's still some text to process
\r
207 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
\r
208 * shouldn't try reading from the input source any more. We might
\r
209 * still have a bunch of tokens to match, though, because of
\r
210 * possible backing-up.
\r
212 * When we actually see the EOF, we change the status to "new"
\r
213 * (via yyrestart()), so that the user can continue scanning by
\r
214 * just pointing yyin at a new input file.
\r
216 #define YY_BUFFER_EOF_PENDING 2
\r
219 static YY_BUFFER_STATE yy_current_buffer = 0;
\r
221 /* We provide macros for accessing buffer states in case in the
\r
222 * future we want to put the buffer states in a more general
\r
225 #define YY_CURRENT_BUFFER yy_current_buffer
\r
228 /* yy_hold_char holds the character lost when yytext is formed. */
\r
229 static char yy_hold_char;
\r
231 static int yy_n_chars; /* number of characters read into yy_ch_buf */
\r
236 /* Points to current character in buffer. */
\r
237 static char *yy_c_buf_p = (char *) 0;
\r
238 static int yy_init = 1; /* whether we need to initialize */
\r
239 static int yy_start = 0; /* start state number */
\r
241 /* Flag which is used to allow yywrap()'s to do buffer switches
\r
242 * instead of setting up a fresh yyin. A bit of a hack ...
\r
244 static int yy_did_buffer_switch_on_eof;
\r
246 void yyrestart YY_PROTO(( FILE *input_file ));
\r
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
\r
249 void yy_load_buffer_state YY_PROTO(( void ));
\r
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
\r
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
\r
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
\r
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
\r
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
\r
256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
\r
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
\r
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
\r
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
\r
261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
\r
262 static void yy_flex_free YY_PROTO(( void * ));
\r
264 #define yy_new_buffer yy_create_buffer
\r
266 #define yy_set_interactive(is_interactive) \
\r
268 if ( ! yy_current_buffer ) \
\r
269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
\r
270 yy_current_buffer->yy_is_interactive = is_interactive; \
\r
273 #define yy_set_bol(at_bol) \
\r
275 if ( ! yy_current_buffer ) \
\r
276 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
\r
277 yy_current_buffer->yy_at_bol = at_bol; \
\r
280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
\r
284 #define YY_SKIP_YYWRAP
\r
285 typedef unsigned char YY_CHAR;
\r
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
\r
287 typedef int yy_state_type;
\r
288 extern char *yytext;
\r
289 #define yytext_ptr yytext
\r
291 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
\r
292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
\r
293 static int yy_get_next_buffer YY_PROTO(( void ));
\r
294 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
\r
296 /* Done after the current pattern has been matched and before the
\r
297 * corresponding action - sets up yytext.
\r
299 #define YY_DO_BEFORE_ACTION \
\r
300 yytext_ptr = yy_bp; \
\r
301 yytext_ptr -= yy_more_len; \
\r
302 yyleng = (int) (yy_cp - yytext_ptr); \
\r
303 yy_hold_char = *yy_cp; \
\r
305 yy_c_buf_p = yy_cp;
\r
307 #define YY_NUM_RULES 22
\r
308 #define YY_END_OF_BUFFER 23
\r
309 static yyconst short int yy_accept[68] =
\r
311 0, 0, 23, 21, 18, 17, 21, 11, 21, 21,
\r
312 13, 10, 12, 12, 12, 12, 12, 12, 12, 12,
\r
313 18, 17, 0, 16, 15, 0, 0, 13, 0, 12,
\r
314 12, 12, 12, 12, 12, 12, 12, 12, 12, 0,
\r
315 19, 0, 20, 14, 12, 12, 12, 1, 12, 12,
\r
316 12, 12, 12, 12, 12, 4, 12, 2, 6, 12,
\r
317 3, 9, 8, 12, 5, 7, 0
\r
320 static yyconst int yy_ec[256] =
\r
322 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
\r
323 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
\r
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
325 1, 2, 1, 1, 1, 1, 1, 1, 4, 5,
\r
326 5, 1, 1, 5, 6, 1, 7, 8, 8, 8,
\r
327 8, 8, 8, 8, 8, 8, 8, 1, 9, 1,
\r
328 1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
\r
329 11, 16, 11, 11, 11, 17, 11, 18, 19, 20,
\r
330 11, 21, 22, 23, 24, 11, 11, 25, 11, 11,
\r
331 5, 1, 5, 1, 26, 1, 11, 11, 11, 11,
\r
333 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
\r
334 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
\r
335 11, 11, 1, 1, 1, 1, 1, 1, 1, 1,
\r
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
345 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
347 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
348 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
352 static yyconst int yy_meta[27] =
\r
354 1, 1, 2, 1, 1, 1, 1, 3, 1, 3,
\r
355 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
\r
359 static yyconst short int yy_base[73] =
\r
361 0, 0, 87, 88, 84, 0, 24, 88, 79, 77,
\r
362 21, 88, 0, 13, 58, 58, 71, 59, 16, 66,
\r
363 76, 0, 30, 88, 88, 74, 73, 27, 58, 0,
\r
364 64, 55, 49, 53, 52, 55, 44, 57, 56, 62,
\r
365 88, 61, 88, 88, 31, 28, 28, 0, 35, 34,
\r
366 28, 21, 28, 20, 18, 0, 23, 0, 0, 24,
\r
367 0, 0, 0, 23, 0, 0, 88, 51, 54, 33,
\r
371 static yyconst short int yy_def[73] =
\r
373 67, 1, 67, 67, 67, 68, 69, 67, 67, 67,
\r
374 67, 67, 70, 70, 70, 70, 70, 70, 70, 70,
\r
375 67, 68, 69, 67, 67, 71, 72, 67, 67, 70,
\r
376 70, 70, 70, 70, 70, 70, 70, 70, 70, 71,
\r
377 67, 72, 67, 67, 70, 70, 70, 70, 70, 70,
\r
378 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
\r
379 70, 70, 70, 70, 70, 70, 0, 67, 67, 67,
\r
383 static yyconst short int yy_nxt[115] =
\r
385 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
\r
386 13, 14, 13, 15, 16, 17, 13, 13, 13, 18,
\r
387 13, 19, 13, 20, 13, 4, 24, 25, 28, 31,
\r
388 37, 32, 24, 25, 28, 30, 66, 65, 38, 64,
\r
389 63, 62, 61, 60, 29, 59, 58, 57, 56, 55,
\r
390 29, 22, 54, 22, 23, 23, 23, 40, 40, 40,
\r
391 42, 42, 42, 43, 41, 53, 52, 51, 50, 49,
\r
392 48, 47, 46, 45, 44, 43, 41, 21, 39, 36,
\r
393 35, 34, 33, 27, 26, 21, 67, 3, 67, 67,
\r
394 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
\r
396 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
\r
400 static yyconst short int yy_chk[115] =
\r
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
404 1, 1, 1, 1, 1, 1, 7, 7, 11, 14,
\r
405 19, 14, 23, 23, 28, 70, 64, 60, 19, 57,
\r
406 55, 54, 53, 52, 11, 51, 50, 49, 47, 46,
\r
407 28, 68, 45, 68, 69, 69, 69, 71, 71, 71,
\r
408 72, 72, 72, 42, 40, 39, 38, 37, 36, 35,
\r
409 34, 33, 32, 31, 29, 27, 26, 21, 20, 18,
\r
410 17, 16, 15, 10, 9, 5, 3, 67, 67, 67,
\r
411 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
\r
413 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
\r
417 static yy_state_type yy_last_accepting_state;
\r
418 static char *yy_last_accepting_cpos;
\r
420 /* The intent behind this definition is that it'll catch
\r
421 * any uses of REJECT which flex missed.
\r
423 #define REJECT reject_used_but_not_detected
\r
424 static int yy_more_flag = 0;
\r
425 static int yy_more_len = 0;
\r
426 #define yymore() (yy_more_flag = 1)
\r
427 #define YY_MORE_ADJ yy_more_len
\r
428 #define YY_RESTORE_YY_MORE_OFFSET
\r
430 #line 1 "ext_fcns.l"
\r
434 flex -PExt_fcnsParser -oext_fcnslexer.cc ext_fcns.l
\r
437 #line 9 "ext_fcns.l"
\r
439 * AT&T lex can't handle this lexer due to lex bugs. It works with flex
\r
440 * 2.3.7, pclex 2.0.5, and MKS lex 3.1a.
\r
443 #include "parse_ext_fcns.h"
\r
444 #include <string.h>
\r
448 #include "ext_fcns.tab.cc.h"
\r
451 Some includes that flex doesn't include as standard,
\r
452 but which are needed.
\r
455 #include <stdlib.h>
\r
456 #include <string.h>
\r
459 // Prevent flex from defining yywrap as extern "C"
\r
461 #define YY_SKIP_YYWRAP
\r
463 /* No lex lib, supply the yywrap fcn. that normally resides there
\r
466 int Ext_fcnsParserwrap(){return(1);}
\r
468 extern int Ext_fcnsParserdebug;
\r
472 These variables are used for error reporting:
\r
473 flex_lineno : the line currently being parsed when the error occurs.
\r
474 flexch : the character on the line where the error occurs
\r
475 flex_linebuf : store the line for reporting.
\r
477 NOTE : 1) the fixed size flex_linebuf buffer is dangerous.
\r
478 2) You might get pointed to a place shortly after
\r
479 where the syntax error occurs. It is close enough
\r
483 int flex_ext_fcns_lineno = 1;
\r
484 int flex_ext_fcns_ch = 0;
\r
485 char flex_ext_fcns_linebuf[20000];
\r
487 //void Ext_fcnsParsererror(char *s);
\r
489 void Ext_fcnsParsererror(char *s){
\r
490 fprintf(stderr,"On line %d, char %d: %s (token %s):\n%s\n",
\r
491 flex_ext_fcns_lineno, flex_ext_fcns_ch, s, Ext_fcnsParsertext, flex_ext_fcns_linebuf );
\r
492 fprintf(stderr,"%*s\n",1+flex_ext_fcns_ch,"^");
\r
496 /* MKS needs the next line to increase the NFA table */
\r
497 #line 498 "ext_fcnslexer.cc"
\r
499 /* Macros after this point can all be overridden by user definitions in
\r
503 #ifndef YY_SKIP_YYWRAP
\r
505 extern "C" int yywrap YY_PROTO(( void ));
\r
507 extern int yywrap YY_PROTO(( void ));
\r
511 #ifndef YY_NO_UNPUT
\r
512 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
\r
516 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
\r
519 #ifdef YY_NEED_STRLEN
\r
520 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
\r
523 #ifndef YY_NO_INPUT
\r
525 static int yyinput YY_PROTO(( void ));
\r
527 static int input YY_PROTO(( void ));
\r
532 static int yy_start_stack_ptr = 0;
\r
533 static int yy_start_stack_depth = 0;
\r
534 static int *yy_start_stack = 0;
\r
535 #ifndef YY_NO_PUSH_STATE
\r
536 static void yy_push_state YY_PROTO(( int new_state ));
\r
538 #ifndef YY_NO_POP_STATE
\r
539 static void yy_pop_state YY_PROTO(( void ));
\r
541 #ifndef YY_NO_TOP_STATE
\r
542 static int yy_top_state YY_PROTO(( void ));
\r
546 #define YY_NO_PUSH_STATE 1
\r
547 #define YY_NO_POP_STATE 1
\r
548 #define YY_NO_TOP_STATE 1
\r
551 #ifdef YY_MALLOC_DECL
\r
555 #ifndef __cplusplus
\r
556 #include <stdlib.h>
\r
559 /* Just try to get by without declaring the routines. This will fail
\r
560 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
\r
561 * or sizeof(void*) != sizeof(int).
\r
566 /* Amount of stuff to slurp up with each read. */
\r
567 #ifndef YY_READ_BUF_SIZE
\r
568 #define YY_READ_BUF_SIZE 8192
\r
571 /* Copy whatever the last rule matched to the standard output. */
\r
574 /* This used to be an fputs(), but since the string might contain NUL's,
\r
575 * we now use fwrite().
\r
577 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
\r
580 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
\r
581 * is returned in "result".
\r
584 #define YY_INPUT(buf,result,max_size) \
\r
585 if ( yy_current_buffer->yy_is_interactive ) \
\r
588 for ( n = 0; n < max_size && \
\r
589 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
\r
590 buf[n] = (char) c; \
\r
592 buf[n++] = (char) c; \
\r
593 if ( c == EOF && ferror( yyin ) ) \
\r
594 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
597 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
\r
598 && ferror( yyin ) ) \
\r
599 YY_FATAL_ERROR( "input in flex scanner failed" );
\r
602 /* No semi-colon after return; correct usage is to write "yyterminate();" -
\r
603 * we don't want an extra ';' after the "return" because that will cause
\r
604 * some compilers to complain about unreachable statements.
\r
606 #ifndef yyterminate
\r
607 #define yyterminate() return YY_NULL
\r
610 /* Number of entries by which start-condition stack grows. */
\r
611 #ifndef YY_START_STACK_INCR
\r
612 #define YY_START_STACK_INCR 25
\r
615 /* Report a fatal error. */
\r
616 #ifndef YY_FATAL_ERROR
\r
617 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
\r
620 /* Default declaration of generated scanner - a define so the user can
\r
621 * easily add parameters.
\r
624 #define YY_DECL int yylex YY_PROTO(( void ))
\r
627 /* Code executed at the beginning of each rule, after yytext and yyleng
\r
628 * have been set up.
\r
630 #ifndef YY_USER_ACTION
\r
631 #define YY_USER_ACTION
\r
634 /* Code executed at the end of each rule. */
\r
636 #define YY_BREAK break;
\r
639 #define YY_RULE_SETUP \
\r
644 register yy_state_type yy_current_state;
\r
645 register char *yy_cp = NULL, *yy_bp = NULL;
\r
646 register int yy_act;
\r
648 #line 72 "ext_fcns.l"
\r
651 /* literal keyword tokens */
\r
654 The actions associated with each text token are to
\r
655 keep track of the current location (for syntax error reporting)
\r
656 and to report any necessary info to the emf.y parse tree builder
\r
658 Its likely that there are a number of omissions, inconsistencies
\r
659 (some keywords do not need to be in caps), and relics
\r
660 (keywords such as BETWEEN, INDICATOR, etc., are not used
\r
662 This parser is somewhat of a work in progress.
\r
665 #line 666 "ext_fcnslexer.cc"
\r
671 #ifdef YY_USER_INIT
\r
676 yy_start = 1; /* first start state */
\r
684 if ( ! yy_current_buffer )
\r
685 yy_current_buffer =
\r
686 yy_create_buffer( yyin, YY_BUF_SIZE );
\r
688 yy_load_buffer_state();
\r
691 while ( 1 ) /* loops until end-of-file is reached */
\r
694 if ( yy_more_flag )
\r
696 yy_more_len = yy_c_buf_p - yytext_ptr;
\r
699 yy_cp = yy_c_buf_p;
\r
701 /* Support of yytext. */
\r
702 *yy_cp = yy_hold_char;
\r
704 /* yy_bp points to the position in yy_ch_buf of the start of
\r
709 yy_current_state = yy_start;
\r
713 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
\r
714 if ( yy_accept[yy_current_state] )
\r
716 yy_last_accepting_state = yy_current_state;
\r
717 yy_last_accepting_cpos = yy_cp;
\r
719 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
721 yy_current_state = (int) yy_def[yy_current_state];
\r
722 if ( yy_current_state >= 68 )
\r
723 yy_c = yy_meta[(unsigned int) yy_c];
\r
725 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
728 while ( yy_base[yy_current_state] != 88 );
\r
731 yy_act = yy_accept[yy_current_state];
\r
733 { /* have to back up */
\r
734 yy_cp = yy_last_accepting_cpos;
\r
735 yy_current_state = yy_last_accepting_state;
\r
736 yy_act = yy_accept[yy_current_state];
\r
739 YY_DO_BEFORE_ACTION;
\r
742 do_action: /* This label is used only to access EOF actions. */
\r
746 { /* beginning of action switch */
\r
747 case 0: /* must back up */
\r
748 /* undo the effects of YY_DO_BEFORE_ACTION */
\r
749 *yy_cp = yy_hold_char;
\r
750 yy_cp = yy_last_accepting_cpos;
\r
751 yy_current_state = yy_last_accepting_state;
\r
752 goto yy_find_action;
\r
756 #line 88 "ext_fcns.l"
\r
757 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return FUN; }
\r
761 #line 89 "ext_fcns.l"
\r
762 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return PRED; }
\r
766 #line 90 "ext_fcns.l"
\r
767 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return UDAF; }
\r
771 #line 91 "ext_fcns.l"
\r
772 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return EXTR; }
\r
776 #line 92 "ext_fcns.l"
\r
777 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return STATE; }
\r
781 #line 93 "ext_fcns.l"
\r
782 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return SFUN; }
\r
786 #line 94 "ext_fcns.l"
\r
787 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return HANDLE; }
\r
791 #line 95 "ext_fcns.l"
\r
792 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return CONST; }
\r
796 #line 96 "ext_fcns.l"
\r
797 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return CLASS; }
\r
801 #line 97 "ext_fcns.l"
\r
802 {flex_ext_fcns_ch+=Ext_fcnsParserleng; return SEMICOLON;}
\r
806 #line 99 "ext_fcns.l"
\r
807 { flex_ext_fcns_ch+=Ext_fcnsParserleng; return yytext[0]; }
\r
812 #line 104 "ext_fcns.l"
\r
813 { flex_ext_fcns_ch+=Ext_fcnsParserleng; Ext_fcnsParserlval.strval = strdup(yytext); return NAME; }
\r
817 #line 109 "ext_fcns.l"
\r
820 #line 109 "ext_fcns.l"
\r
821 { flex_ext_fcns_ch+=Ext_fcnsParserleng; Ext_fcnsParserlval.strval = strdup(yytext); return INTNUM; }
\r
826 #line 113 "ext_fcns.l"
\r
831 Ext_fcnsParserlval.strval = strdup(Ext_fcnsParsertext+1);
\r
835 unput(c); /* just peeking */
\r
837 flex_ext_fcns_ch+=Ext_fcnsParserleng;
\r
838 Ext_fcnsParserlval.strval[Ext_fcnsParserleng-2] = '\0';
\r
839 return STRING_TOKEN;
\r
845 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
\r
846 yy_c_buf_p = yy_cp -= 1;
\r
847 YY_DO_BEFORE_ACTION; /* set up yytext again */
\r
849 #line 130 "ext_fcns.l"
\r
850 { flex_ext_fcns_ch+=Ext_fcnsParserleng; Ext_fcnsParsererror("Unterminated string"); }
\r
853 /* Newline : advance the error reporting line number */
\r
854 /* and grab the next line into flex_linebuf */
\r
858 #line 139 "ext_fcns.l"
\r
859 {flex_ext_fcns_ch=0; flex_ext_fcns_lineno++;
\r
860 strcpy(flex_ext_fcns_linebuf,Ext_fcnsParsertext+1);
\r
866 #line 144 "ext_fcns.l"
\r
867 {flex_ext_fcns_ch+=Ext_fcnsParserleng; } /* white space */
\r
870 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
\r
871 yy_c_buf_p = yy_cp -= 1;
\r
872 YY_DO_BEFORE_ACTION; /* set up yytext again */
\r
874 #line 146 "ext_fcns.l"
\r
875 {flex_ext_fcns_ch+=Ext_fcnsParserleng; }; /* comment */
\r
878 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
\r
879 yy_c_buf_p = yy_cp -= 1;
\r
880 YY_DO_BEFORE_ACTION; /* set up yytext again */
\r
882 #line 147 "ext_fcns.l"
\r
883 {flex_ext_fcns_ch+=Ext_fcnsParserleng; }; /* comment */
\r
885 /* Parse error on anything else. */
\r
888 #line 150 "ext_fcns.l"
\r
889 {fprintf(stderr,"Warning: unknown token (ignored)\n"); Ext_fcnsParsererror(yytext);}
\r
893 #line 153 "ext_fcns.l"
\r
896 #line 897 "ext_fcnslexer.cc"
\r
897 case YY_STATE_EOF(INITIAL):
\r
900 case YY_END_OF_BUFFER:
\r
902 /* Amount of text matched not including the EOB char. */
\r
903 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
\r
905 /* Undo the effects of YY_DO_BEFORE_ACTION. */
\r
906 *yy_cp = yy_hold_char;
\r
907 YY_RESTORE_YY_MORE_OFFSET
\r
909 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
\r
911 /* We're scanning a new file or input source. It's
\r
912 * possible that this happened because the user
\r
913 * just pointed yyin at a new source and called
\r
914 * yylex(). If so, then we have to assure
\r
915 * consistency between yy_current_buffer and our
\r
916 * globals. Here is the right place to do so, because
\r
917 * this is the first action (other than possibly a
\r
918 * back-up) that will match for the new input source.
\r
920 yy_n_chars = yy_current_buffer->yy_n_chars;
\r
921 yy_current_buffer->yy_input_file = yyin;
\r
922 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
\r
925 /* Note that here we test for yy_c_buf_p "<=" to the position
\r
926 * of the first EOB in the buffer, since yy_c_buf_p will
\r
927 * already have been incremented past the NUL character
\r
928 * (since all states make transitions on EOB to the
\r
929 * end-of-buffer state). Contrast this with the test
\r
932 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
\r
933 { /* This was really a NUL. */
\r
934 yy_state_type yy_next_state;
\r
936 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
\r
938 yy_current_state = yy_get_previous_state();
\r
940 /* Okay, we're now positioned to make the NUL
\r
941 * transition. We couldn't have
\r
942 * yy_get_previous_state() go ahead and do it
\r
943 * for us because it doesn't know how to deal
\r
944 * with the possibility of jamming (and we don't
\r
945 * want to build jamming into it because then it
\r
946 * will run more slowly).
\r
949 yy_next_state = yy_try_NUL_trans( yy_current_state );
\r
951 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
953 if ( yy_next_state )
\r
955 /* Consume the NUL. */
\r
956 yy_cp = ++yy_c_buf_p;
\r
957 yy_current_state = yy_next_state;
\r
963 yy_cp = yy_c_buf_p;
\r
964 goto yy_find_action;
\r
968 else switch ( yy_get_next_buffer() )
\r
970 case EOB_ACT_END_OF_FILE:
\r
972 yy_did_buffer_switch_on_eof = 0;
\r
976 /* Note: because we've taken care in
\r
977 * yy_get_next_buffer() to have set up
\r
978 * yytext, we can now set up
\r
979 * yy_c_buf_p so that if some total
\r
980 * hoser (like flex itself) wants to
\r
981 * call the scanner after we return the
\r
982 * YY_NULL, it'll still work - another
\r
983 * YY_NULL will get returned.
\r
985 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
\r
987 yy_act = YY_STATE_EOF(YY_START);
\r
993 if ( ! yy_did_buffer_switch_on_eof )
\r
999 case EOB_ACT_CONTINUE_SCAN:
\r
1001 yytext_ptr + yy_amount_of_matched_text;
\r
1003 yy_current_state = yy_get_previous_state();
\r
1005 yy_cp = yy_c_buf_p;
\r
1006 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
1009 case EOB_ACT_LAST_MATCH:
\r
1011 &yy_current_buffer->yy_ch_buf[yy_n_chars];
\r
1013 yy_current_state = yy_get_previous_state();
\r
1015 yy_cp = yy_c_buf_p;
\r
1016 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
1017 goto yy_find_action;
\r
1024 "fatal flex scanner internal error--no action found" );
\r
1025 } /* end of action switch */
\r
1026 } /* end of scanning one token */
\r
1027 } /* end of yylex */
\r
1030 /* yy_get_next_buffer - try to read in a new buffer
\r
1032 * Returns a code representing an action:
\r
1033 * EOB_ACT_LAST_MATCH -
\r
1034 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
\r
1035 * EOB_ACT_END_OF_FILE - end of file
\r
1038 static int yy_get_next_buffer()
\r
1040 register char *dest = yy_current_buffer->yy_ch_buf;
\r
1041 register char *source = yytext_ptr;
\r
1042 register int number_to_move, i;
\r
1045 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
\r
1047 "fatal flex scanner internal error--end of buffer missed" );
\r
1049 if ( yy_current_buffer->yy_fill_buffer == 0 )
\r
1050 { /* Don't try to fill the buffer, so this is an EOF. */
\r
1051 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
\r
1053 /* We matched a single character, the EOB, so
\r
1054 * treat this as a final EOF.
\r
1056 return EOB_ACT_END_OF_FILE;
\r
1061 /* We matched some text prior to the EOB, first
\r
1064 return EOB_ACT_LAST_MATCH;
\r
1068 /* Try to read more data. */
\r
1070 /* First move last chars to start of buffer. */
\r
1071 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
\r
1073 for ( i = 0; i < number_to_move; ++i )
\r
1074 *(dest++) = *(source++);
\r
1076 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
\r
1077 /* don't do the read, it's not guaranteed to return an EOF,
\r
1078 * just force an EOF
\r
1080 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
\r
1085 yy_current_buffer->yy_buf_size - number_to_move - 1;
\r
1087 while ( num_to_read <= 0 )
\r
1088 { /* Not enough room in the buffer - grow it. */
\r
1089 #ifdef YY_USES_REJECT
\r
1091 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
\r
1094 /* just a shorter name for the current buffer */
\r
1095 YY_BUFFER_STATE b = yy_current_buffer;
\r
1097 int yy_c_buf_p_offset =
\r
1098 (int) (yy_c_buf_p - b->yy_ch_buf);
\r
1100 if ( b->yy_is_our_buffer )
\r
1102 int new_size = b->yy_buf_size * 2;
\r
1104 if ( new_size <= 0 )
\r
1105 b->yy_buf_size += b->yy_buf_size / 8;
\r
1107 b->yy_buf_size *= 2;
\r
1109 b->yy_ch_buf = (char *)
\r
1110 /* Include room in for 2 EOB chars. */
\r
1111 yy_flex_realloc( (void *) b->yy_ch_buf,
\r
1112 b->yy_buf_size + 2 );
\r
1115 /* Can't grow it, we don't own it. */
\r
1118 if ( ! b->yy_ch_buf )
\r
1120 "fatal error - scanner input buffer overflow" );
\r
1122 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
\r
1124 num_to_read = yy_current_buffer->yy_buf_size -
\r
1125 number_to_move - 1;
\r
1129 if ( num_to_read > YY_READ_BUF_SIZE )
\r
1130 num_to_read = YY_READ_BUF_SIZE;
\r
1132 /* Read in more data. */
\r
1133 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
\r
1134 yy_n_chars, num_to_read );
\r
1136 yy_current_buffer->yy_n_chars = yy_n_chars;
\r
1139 if ( yy_n_chars == 0 )
\r
1141 if ( number_to_move == YY_MORE_ADJ )
\r
1143 ret_val = EOB_ACT_END_OF_FILE;
\r
1144 yyrestart( yyin );
\r
1149 ret_val = EOB_ACT_LAST_MATCH;
\r
1150 yy_current_buffer->yy_buffer_status =
\r
1151 YY_BUFFER_EOF_PENDING;
\r
1156 ret_val = EOB_ACT_CONTINUE_SCAN;
\r
1158 yy_n_chars += number_to_move;
\r
1159 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
\r
1160 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
\r
1162 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
\r
1168 /* yy_get_previous_state - get the state just before the EOB char was reached */
\r
1170 static yy_state_type yy_get_previous_state()
\r
1172 register yy_state_type yy_current_state;
\r
1173 register char *yy_cp;
\r
1175 yy_current_state = yy_start;
\r
1177 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
\r
1179 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
\r
1180 if ( yy_accept[yy_current_state] )
\r
1182 yy_last_accepting_state = yy_current_state;
\r
1183 yy_last_accepting_cpos = yy_cp;
\r
1185 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1187 yy_current_state = (int) yy_def[yy_current_state];
\r
1188 if ( yy_current_state >= 68 )
\r
1189 yy_c = yy_meta[(unsigned int) yy_c];
\r
1191 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1194 return yy_current_state;
\r
1198 /* yy_try_NUL_trans - try to make a transition on the NUL character
\r
1201 * next_state = yy_try_NUL_trans( current_state );
\r
1204 #ifdef YY_USE_PROTOS
\r
1205 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
\r
1207 static yy_state_type yy_try_NUL_trans( yy_current_state )
\r
1208 yy_state_type yy_current_state;
\r
1211 register int yy_is_jam;
\r
1212 register char *yy_cp = yy_c_buf_p;
\r
1214 register YY_CHAR yy_c = 1;
\r
1215 if ( yy_accept[yy_current_state] )
\r
1217 yy_last_accepting_state = yy_current_state;
\r
1218 yy_last_accepting_cpos = yy_cp;
\r
1220 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1222 yy_current_state = (int) yy_def[yy_current_state];
\r
1223 if ( yy_current_state >= 68 )
\r
1224 yy_c = yy_meta[(unsigned int) yy_c];
\r
1226 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1227 yy_is_jam = (yy_current_state == 67);
\r
1229 return yy_is_jam ? 0 : yy_current_state;
\r
1233 #ifndef YY_NO_UNPUT
\r
1234 #ifdef YY_USE_PROTOS
\r
1235 static void yyunput( int c, register char *yy_bp )
\r
1237 static void yyunput( c, yy_bp )
\r
1239 register char *yy_bp;
\r
1242 register char *yy_cp = yy_c_buf_p;
\r
1244 /* undo effects of setting up yytext */
\r
1245 *yy_cp = yy_hold_char;
\r
1247 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
\r
1248 { /* need to shift things up to make room */
\r
1249 /* +2 for EOB chars. */
\r
1250 register int number_to_move = yy_n_chars + 2;
\r
1251 register char *dest = &yy_current_buffer->yy_ch_buf[
\r
1252 yy_current_buffer->yy_buf_size + 2];
\r
1253 register char *source =
\r
1254 &yy_current_buffer->yy_ch_buf[number_to_move];
\r
1256 while ( source > yy_current_buffer->yy_ch_buf )
\r
1257 *--dest = *--source;
\r
1259 yy_cp += (int) (dest - source);
\r
1260 yy_bp += (int) (dest - source);
\r
1261 yy_current_buffer->yy_n_chars =
\r
1262 yy_n_chars = yy_current_buffer->yy_buf_size;
\r
1264 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
\r
1265 YY_FATAL_ERROR( "flex scanner push-back overflow" );
\r
1268 *--yy_cp = (char) c;
\r
1271 yytext_ptr = yy_bp;
\r
1272 yy_hold_char = *yy_cp;
\r
1273 yy_c_buf_p = yy_cp;
\r
1275 #endif /* ifndef YY_NO_UNPUT */
\r
1278 #ifndef YY_NO_INPUT
\r
1279 #ifdef __cplusplus
\r
1280 static int yyinput()
\r
1282 static int input()
\r
1287 *yy_c_buf_p = yy_hold_char;
\r
1289 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
\r
1291 /* yy_c_buf_p now points to the character we want to return.
\r
1292 * If this occurs *before* the EOB characters, then it's a
\r
1293 * valid NUL; if not, then we've hit the end of the buffer.
\r
1295 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
\r
1296 /* This was really a NUL. */
\r
1297 *yy_c_buf_p = '\0';
\r
1300 { /* need more input */
\r
1301 int offset = yy_c_buf_p - yytext_ptr;
\r
1304 switch ( yy_get_next_buffer() )
\r
1306 case EOB_ACT_LAST_MATCH:
\r
1307 /* This happens because yy_g_n_b()
\r
1308 * sees that we've accumulated a
\r
1309 * token and flags that we need to
\r
1310 * try matching the token before
\r
1311 * proceeding. But for input(),
\r
1312 * there's no matching to consider.
\r
1313 * So convert the EOB_ACT_LAST_MATCH
\r
1314 * to EOB_ACT_END_OF_FILE.
\r
1317 /* Reset buffer status. */
\r
1318 yyrestart( yyin );
\r
1320 /* fall through */
\r
1322 case EOB_ACT_END_OF_FILE:
\r
1327 if ( ! yy_did_buffer_switch_on_eof )
\r
1329 #ifdef __cplusplus
\r
1336 case EOB_ACT_CONTINUE_SCAN:
\r
1337 yy_c_buf_p = yytext_ptr + offset;
\r
1343 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
\r
1344 *yy_c_buf_p = '\0'; /* preserve yytext */
\r
1345 yy_hold_char = *++yy_c_buf_p;
\r
1350 #endif /* YY_NO_INPUT */
\r
1352 #ifdef YY_USE_PROTOS
\r
1353 void yyrestart( FILE *input_file )
\r
1355 void yyrestart( input_file )
\r
1359 if ( ! yy_current_buffer )
\r
1360 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
\r
1362 yy_init_buffer( yy_current_buffer, input_file );
\r
1363 yy_load_buffer_state();
\r
1367 #ifdef YY_USE_PROTOS
\r
1368 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
\r
1370 void yy_switch_to_buffer( new_buffer )
\r
1371 YY_BUFFER_STATE new_buffer;
\r
1374 if ( yy_current_buffer == new_buffer )
\r
1377 if ( yy_current_buffer )
\r
1379 /* Flush out information for old buffer. */
\r
1380 *yy_c_buf_p = yy_hold_char;
\r
1381 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
\r
1382 yy_current_buffer->yy_n_chars = yy_n_chars;
\r
1385 yy_current_buffer = new_buffer;
\r
1386 yy_load_buffer_state();
\r
1388 /* We don't actually know whether we did this switch during
\r
1389 * EOF (yywrap()) processing, but the only time this flag
\r
1390 * is looked at is after yywrap() is called, so it's safe
\r
1391 * to go ahead and always set it.
\r
1393 yy_did_buffer_switch_on_eof = 1;
\r
1397 #ifdef YY_USE_PROTOS
\r
1398 void yy_load_buffer_state( void )
\r
1400 void yy_load_buffer_state()
\r
1403 yy_n_chars = yy_current_buffer->yy_n_chars;
\r
1404 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
\r
1405 yyin = yy_current_buffer->yy_input_file;
\r
1406 yy_hold_char = *yy_c_buf_p;
\r
1410 #ifdef YY_USE_PROTOS
\r
1411 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
\r
1413 YY_BUFFER_STATE yy_create_buffer( file, size )
\r
1418 YY_BUFFER_STATE b;
\r
1420 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
\r
1422 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
\r
1424 b->yy_buf_size = size;
\r
1426 /* yy_ch_buf has to be 2 characters longer than the size given because
\r
1427 * we need to put in 2 end-of-buffer characters.
\r
1429 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
\r
1430 if ( ! b->yy_ch_buf )
\r
1431 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
\r
1433 b->yy_is_our_buffer = 1;
\r
1435 yy_init_buffer( b, file );
\r
1441 #ifdef YY_USE_PROTOS
\r
1442 void yy_delete_buffer( YY_BUFFER_STATE b )
\r
1444 void yy_delete_buffer( b )
\r
1445 YY_BUFFER_STATE b;
\r
1451 if ( b == yy_current_buffer )
\r
1452 yy_current_buffer = (YY_BUFFER_STATE) 0;
\r
1454 if ( b->yy_is_our_buffer )
\r
1455 yy_flex_free( (void *) b->yy_ch_buf );
\r
1457 yy_flex_free( (void *) b );
\r
1462 #ifdef YY_USE_PROTOS
\r
1463 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
\r
1465 void yy_init_buffer( b, file )
\r
1466 YY_BUFFER_STATE b;
\r
1472 yy_flush_buffer( b );
\r
1474 b->yy_input_file = file;
\r
1475 b->yy_fill_buffer = 1;
\r
1477 #if YY_ALWAYS_INTERACTIVE
\r
1478 b->yy_is_interactive = 1;
\r
1480 #if YY_NEVER_INTERACTIVE
\r
1481 b->yy_is_interactive = 0;
\r
1483 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
\r
1489 #ifdef YY_USE_PROTOS
\r
1490 void yy_flush_buffer( YY_BUFFER_STATE b )
\r
1492 void yy_flush_buffer( b )
\r
1493 YY_BUFFER_STATE b;
\r
1500 b->yy_n_chars = 0;
\r
1502 /* We always need two end-of-buffer characters. The first causes
\r
1503 * a transition to the end-of-buffer state. The second causes
\r
1504 * a jam in that state.
\r
1506 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
\r
1507 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
\r
1509 b->yy_buf_pos = &b->yy_ch_buf[0];
\r
1512 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1514 if ( b == yy_current_buffer )
\r
1515 yy_load_buffer_state();
\r
1519 #ifndef YY_NO_SCAN_BUFFER
\r
1520 #ifdef YY_USE_PROTOS
\r
1521 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
\r
1523 YY_BUFFER_STATE yy_scan_buffer( base, size )
\r
1528 YY_BUFFER_STATE b;
\r
1531 base[size-2] != YY_END_OF_BUFFER_CHAR ||
\r
1532 base[size-1] != YY_END_OF_BUFFER_CHAR )
\r
1533 /* They forgot to leave room for the EOB's. */
\r
1536 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
\r
1538 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
\r
1540 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
\r
1541 b->yy_buf_pos = b->yy_ch_buf = base;
\r
1542 b->yy_is_our_buffer = 0;
\r
1543 b->yy_input_file = 0;
\r
1544 b->yy_n_chars = b->yy_buf_size;
\r
1545 b->yy_is_interactive = 0;
\r
1547 b->yy_fill_buffer = 0;
\r
1548 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1550 yy_switch_to_buffer( b );
\r
1557 #ifndef YY_NO_SCAN_STRING
\r
1558 #ifdef YY_USE_PROTOS
\r
1559 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
\r
1561 YY_BUFFER_STATE yy_scan_string( yy_str )
\r
1562 yyconst char *yy_str;
\r
1566 for ( len = 0; yy_str[len]; ++len )
\r
1569 return yy_scan_bytes( yy_str, len );
\r
1574 #ifndef YY_NO_SCAN_BYTES
\r
1575 #ifdef YY_USE_PROTOS
\r
1576 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
\r
1578 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
\r
1579 yyconst char *bytes;
\r
1583 YY_BUFFER_STATE b;
\r
1588 /* Get memory for full buffer, including space for trailing EOB's. */
\r
1590 buf = (char *) yy_flex_alloc( n );
\r
1592 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
\r
1594 for ( i = 0; i < len; ++i )
\r
1595 buf[i] = bytes[i];
\r
1597 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
\r
1599 b = yy_scan_buffer( buf, n );
\r
1601 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
\r
1603 /* It's okay to grow etc. this buffer, and we should throw it
\r
1604 * away when we're done.
\r
1606 b->yy_is_our_buffer = 1;
\r
1613 #ifndef YY_NO_PUSH_STATE
\r
1614 #ifdef YY_USE_PROTOS
\r
1615 static void yy_push_state( int new_state )
\r
1617 static void yy_push_state( new_state )
\r
1621 if ( yy_start_stack_ptr >= yy_start_stack_depth )
\r
1623 yy_size_t new_size;
\r
1625 yy_start_stack_depth += YY_START_STACK_INCR;
\r
1626 new_size = yy_start_stack_depth * sizeof( int );
\r
1628 if ( ! yy_start_stack )
\r
1629 yy_start_stack = (int *) yy_flex_alloc( new_size );
\r
1632 yy_start_stack = (int *) yy_flex_realloc(
\r
1633 (void *) yy_start_stack, new_size );
\r
1635 if ( ! yy_start_stack )
\r
1637 "out of memory expanding start-condition stack" );
\r
1640 yy_start_stack[yy_start_stack_ptr++] = YY_START;
\r
1647 #ifndef YY_NO_POP_STATE
\r
1648 static void yy_pop_state()
\r
1650 if ( --yy_start_stack_ptr < 0 )
\r
1651 YY_FATAL_ERROR( "start-condition stack underflow" );
\r
1653 BEGIN(yy_start_stack[yy_start_stack_ptr]);
\r
1658 #ifndef YY_NO_TOP_STATE
\r
1659 static int yy_top_state()
\r
1661 return yy_start_stack[yy_start_stack_ptr - 1];
\r
1665 #ifndef YY_EXIT_FAILURE
\r
1666 #define YY_EXIT_FAILURE 2
\r
1669 #ifdef YY_USE_PROTOS
\r
1670 static void yy_fatal_error( yyconst char msg[] )
\r
1672 static void yy_fatal_error( msg )
\r
1676 (void) fprintf( stderr, "%s\n", msg );
\r
1677 exit( YY_EXIT_FAILURE );
\r
1682 /* Redefine yyless() so it works in section 3 code. */
\r
1685 #define yyless(n) \
\r
1688 /* Undo effects of setting up yytext. */ \
\r
1689 yytext[yyleng] = yy_hold_char; \
\r
1690 yy_c_buf_p = yytext + n; \
\r
1691 yy_hold_char = *yy_c_buf_p; \
\r
1692 *yy_c_buf_p = '\0'; \
\r
1698 /* Internal utility routines. */
\r
1700 #ifndef yytext_ptr
\r
1701 #ifdef YY_USE_PROTOS
\r
1702 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
\r
1704 static void yy_flex_strncpy( s1, s2, n )
\r
1711 for ( i = 0; i < n; ++i )
\r
1716 #ifdef YY_NEED_STRLEN
\r
1717 #ifdef YY_USE_PROTOS
\r
1718 static int yy_flex_strlen( yyconst char *s )
\r
1720 static int yy_flex_strlen( s )
\r
1725 for ( n = 0; s[n]; ++n )
\r
1733 #ifdef YY_USE_PROTOS
\r
1734 static void *yy_flex_alloc( yy_size_t size )
\r
1736 static void *yy_flex_alloc( size )
\r
1740 return (void *) malloc( size );
\r
1743 #ifdef YY_USE_PROTOS
\r
1744 static void *yy_flex_realloc( void *ptr, yy_size_t size )
\r
1746 static void *yy_flex_realloc( ptr, size )
\r
1751 /* The cast to (char *) in the following accommodates both
\r
1752 * implementations that use char* generic pointers, and those
\r
1753 * that use void* generic pointers. It works with the latter
\r
1754 * because both ANSI C and C++ allow castless assignment from
\r
1755 * any pointer type to void*, and deal with argument conversions
\r
1756 * as though doing an assignment.
\r
1758 return (void *) realloc( (char *) ptr, size );
\r
1761 #ifdef YY_USE_PROTOS
\r
1762 static void yy_flex_free( void *ptr )
\r
1764 static void yy_flex_free( ptr )
\r
1778 #line 153 "ext_fcns.l"
\r