2
/* A lexical scanner generated by flex */
4
/* Scanner skeleton version:
5
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
9
#define YY_FLEX_MAJOR_VERSION 2
10
#define YY_FLEX_MINOR_VERSION 5
19
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
31
/* Use prototypes in function declarations. */
34
/* The "const" storage-class-modifier is valid. */
37
#else /* ! __cplusplus */
45
#endif /* ! __cplusplus */
57
#define ag_yyconst const
64
#define YY_PROTO(proto) proto
66
#define YY_PROTO(proto) ()
69
/* Returned upon end-of-file. */
72
/* Promotes a possibly negative, possibly signed char to an unsigned
73
* integer for use as an array index. If the signed char is negative,
74
* we want to instead treat it as an 8-bit unsigned char, hence the
77
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
79
/* Enter a start condition. This macro really ought to take a parameter,
80
* but we do it the disgusting crufty way forced on us by the ()-less
81
* definition of BEGIN.
83
#define BEGIN ag_yy_start = 1 + 2 *
85
/* Translate the current start state into a value that can be later handed
86
* to BEGIN to return to the state. The YYSTATE alias is for lex
89
#define YY_START ((ag_yy_start - 1) / 2)
90
#define YYSTATE YY_START
92
/* Action number for EOF rule of a given start state. */
93
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
95
/* Special action meaning "start processing a new file". */
96
#define YY_NEW_FILE ag_yyrestart( ag_yyin )
98
#define YY_END_OF_BUFFER_CHAR 0
100
/* Size of default input buffer. */
101
#define YY_BUF_SIZE 16384
103
typedef struct ag_yy_buffer_state *YY_BUFFER_STATE;
105
extern int ag_yyleng;
106
extern FILE *ag_yyin, *ag_yyout;
108
#define EOB_ACT_CONTINUE_SCAN 0
109
#define EOB_ACT_END_OF_FILE 1
110
#define EOB_ACT_LAST_MATCH 2
112
/* The funky do-while in the following #define is used to turn the definition
113
* int a single C statement (which needs a semi-colon terminator). This
114
* avoids problems with code like:
116
* if ( condition_holds )
119
* do_something_else();
121
* Prior to using the do-while the compiler would get upset at the
122
* "else" because it interpreted the "if" statement as being all
123
* done when it reached the ';' after the ag_yyless() call.
126
/* Return all but the first 'n' matched characters back to the input stream. */
128
#define ag_yyless(n) \
131
/* Undo effects of setting up ag_yytext. */ \
132
*ag_yy_cp = ag_yy_hold_char; \
133
YY_RESTORE_YY_MORE_OFFSET \
134
ag_yy_c_buf_p = ag_yy_cp = ag_yy_bp + n - YY_MORE_ADJ; \
135
YY_DO_BEFORE_ACTION; /* set up ag_yytext again */ \
139
#define unput(c) ag_yyunput( c, ag_yytext_ptr )
141
/* The following is because we cannot portably get our hands on size_t
142
* (without autoconf's help, which isn't available because we want
143
* flex-generated scanners to compile on their own).
145
typedef unsigned int ag_yy_size_t;
148
struct ag_yy_buffer_state
150
FILE *ag_yy_input_file;
152
char *ag_yy_ch_buf; /* input buffer */
153
char *ag_yy_buf_pos; /* current position in input buffer */
155
/* Size of input buffer in bytes, not including room for EOB
158
ag_yy_size_t ag_yy_buf_size;
160
/* Number of characters read into ag_yy_ch_buf, not including EOB
165
/* Whether we "own" the buffer - i.e., we know we created it,
166
* and can realloc() it to grow it, and should free() it to
169
int ag_yy_is_our_buffer;
171
/* Whether this is an "interactive" input source; if so, and
172
* if we're using stdio for input, then we want to use getc()
173
* instead of fread(), to make sure we stop fetching input after
176
int ag_yy_is_interactive;
178
/* Whether we're considered to be at the beginning of a line.
179
* If so, '^' rules will be active on the next match, otherwise
184
/* Whether to try to fill the input buffer when we reach the
187
int ag_yy_fill_buffer;
189
int ag_yy_buffer_status;
190
#define YY_BUFFER_NEW 0
191
#define YY_BUFFER_NORMAL 1
192
/* When an EOF's been seen but there's still some text to process
193
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
194
* shouldn't try reading from the input source any more. We might
195
* still have a bunch of tokens to match, though, because of
196
* possible backing-up.
198
* When we actually see the EOF, we change the status to "new"
199
* (via ag_yyrestart()), so that the user can continue scanning by
200
* just pointing ag_yyin at a new input file.
202
#define YY_BUFFER_EOF_PENDING 2
205
static YY_BUFFER_STATE ag_yy_current_buffer = 0;
207
/* We provide macros for accessing buffer states in case in the
208
* future we want to put the buffer states in a more general
211
#define YY_CURRENT_BUFFER ag_yy_current_buffer
214
/* ag_yy_hold_char holds the character lost when ag_yytext is formed. */
215
static char ag_yy_hold_char;
217
static int ag_yy_n_chars; /* number of characters read into ag_yy_ch_buf */
222
/* Points to current character in buffer. */
223
static char *ag_yy_c_buf_p = (char *) 0;
224
static int ag_yy_init = 1; /* whether we need to initialize */
225
static int ag_yy_start = 0; /* start state number */
227
/* Flag which is used to allow ag_yywrap()'s to do buffer switches
228
* instead of setting up a fresh ag_yyin. A bit of a hack ...
230
static int ag_yy_did_buffer_switch_on_eof;
232
void ag_yyrestart YY_PROTO(( FILE *input_file ));
234
void ag_yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
235
void ag_yy_load_buffer_state YY_PROTO(( void ));
236
YY_BUFFER_STATE ag_yy_create_buffer YY_PROTO(( FILE *file, int size ));
237
void ag_yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238
void ag_yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
239
void ag_yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
240
#define YY_FLUSH_BUFFER ag_yy_flush_buffer( ag_yy_current_buffer )
242
YY_BUFFER_STATE ag_yy_scan_buffer YY_PROTO(( char *base, ag_yy_size_t size ));
243
YY_BUFFER_STATE ag_yy_scan_string YY_PROTO(( ag_yyconst char *ag_yy_str ));
244
YY_BUFFER_STATE ag_yy_scan_bytes YY_PROTO(( ag_yyconst char *bytes, int len ));
246
static void *ag_yy_flex_alloc YY_PROTO(( ag_yy_size_t ));
247
static void *ag_yy_flex_realloc YY_PROTO(( void *, ag_yy_size_t ));
248
static void ag_yy_flex_free YY_PROTO(( void * ));
250
#define ag_yy_new_buffer ag_yy_create_buffer
252
#define ag_yy_set_interactive(is_interactive) \
254
if ( ! ag_yy_current_buffer ) \
255
ag_yy_current_buffer = ag_yy_create_buffer( ag_yyin, YY_BUF_SIZE ); \
256
ag_yy_current_buffer->ag_yy_is_interactive = is_interactive; \
259
#define ag_yy_set_bol(at_bol) \
261
if ( ! ag_yy_current_buffer ) \
262
ag_yy_current_buffer = ag_yy_create_buffer( ag_yyin, YY_BUF_SIZE ); \
263
ag_yy_current_buffer->ag_yy_at_bol = at_bol; \
266
#define YY_AT_BOL() (ag_yy_current_buffer->ag_yy_at_bol)
268
typedef unsigned char YY_CHAR;
269
FILE *ag_yyin = (FILE *) 0, *ag_yyout = (FILE *) 0;
270
typedef int ag_yy_state_type;
271
extern char *ag_yytext;
272
#define ag_yytext_ptr ag_yytext
274
static ag_yy_state_type ag_yy_get_previous_state YY_PROTO(( void ));
275
static ag_yy_state_type ag_yy_try_NUL_trans YY_PROTO(( ag_yy_state_type current_state ));
276
static int ag_yy_get_next_buffer YY_PROTO(( void ));
277
static void ag_yy_fatal_error YY_PROTO(( ag_yyconst char msg[] ));
279
/* Done after the current pattern has been matched and before the
280
* corresponding action - sets up ag_yytext.
282
#define YY_DO_BEFORE_ACTION \
283
ag_yytext_ptr = ag_yy_bp; \
284
ag_yyleng = (int) (ag_yy_cp - ag_yy_bp); \
285
ag_yy_hold_char = *ag_yy_cp; \
287
ag_yy_c_buf_p = ag_yy_cp;
289
#define YY_NUM_RULES 23
290
#define YY_END_OF_BUFFER 24
291
static ag_yyconst short int ag_yy_accept[77] =
293
0, 0, 4, 4, 21, 21, 24, 22, 9, 2,
294
18, 8, 22, 22, 22, 17, 1, 17, 17, 17,
295
17, 17, 17, 4, 5, 21, 2, 19, 23, 8,
296
16, 0, 17, 17, 3, 7, 17, 17, 17, 17,
297
17, 17, 17, 17, 4, 5, 5, 6, 21, 21,
298
20, 7, 17, 17, 17, 17, 17, 17, 17, 17,
299
11, 17, 10, 17, 17, 17, 12, 17, 17, 17,
300
14, 17, 13, 17, 15, 0
303
static ag_yyconst int ag_yy_ec[256] =
305
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
306
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
307
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
308
1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
309
1, 6, 1, 1, 7, 8, 9, 10, 10, 10,
310
10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
311
1, 11, 1, 12, 13, 13, 13, 13, 13, 13,
312
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
313
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
314
1, 14, 1, 1, 13, 1, 15, 16, 17, 18,
316
19, 13, 20, 21, 22, 13, 13, 13, 13, 23,
317
24, 25, 13, 26, 27, 28, 29, 13, 13, 13,
318
13, 13, 1, 1, 1, 1, 1, 1, 1, 1,
319
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
322
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
324
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325
1, 13, 13, 13, 13, 13, 13, 13, 13, 13,
327
13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
328
1, 1, 1, 1, 1, 1, 1, 1, 1, 13,
329
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
330
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
331
13, 13, 13, 13, 13, 13, 1, 13, 13, 13,
335
static ag_yyconst int ag_yy_meta[30] =
337
1, 1, 2, 3, 1, 4, 1, 1, 1, 5,
338
1, 1, 5, 3, 5, 5, 5, 5, 5, 5,
339
5, 5, 5, 5, 5, 5, 5, 5, 5
342
static ag_yyconst short int ag_yy_base[86] =
344
0, 0, 27, 28, 32, 34, 125, 126, 126, 126,
345
126, 0, 32, 114, 35, 37, 126, 0, 101, 104,
346
95, 96, 21, 0, 45, 0, 0, 126, 116, 0,
347
126, 108, 45, 107, 126, 0, 106, 0, 95, 94,
348
98, 94, 85, 94, 0, 50, 51, 126, 0, 126,
349
126, 0, 99, 82, 88, 81, 86, 82, 83, 87,
350
0, 80, 0, 80, 62, 57, 0, 51, 62, 51,
351
0, 33, 0, 31, 0, 126, 60, 65, 70, 27,
355
static ag_yyconst short int ag_yy_def[86] =
357
76, 1, 77, 77, 78, 78, 76, 76, 76, 76,
358
76, 79, 76, 76, 76, 76, 76, 80, 80, 80,
359
80, 80, 80, 81, 82, 83, 83, 76, 84, 79,
360
76, 76, 76, 76, 76, 85, 76, 80, 80, 80,
361
80, 80, 80, 80, 81, 82, 82, 76, 83, 76,
362
76, 85, 76, 80, 80, 80, 80, 80, 80, 80,
363
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
364
80, 80, 80, 80, 80, 0, 76, 76, 76, 76,
368
static ag_yyconst short int ag_yy_nxt[156] =
370
8, 9, 10, 11, 12, 8, 13, 14, 15, 16,
371
8, 17, 18, 8, 18, 18, 18, 19, 20, 21,
372
18, 18, 22, 18, 18, 18, 23, 18, 18, 10,
373
10, 38, 25, 25, 27, 28, 27, 28, 31, 32,
374
35, 33, 31, 36, 37, 29, 33, 29, 43, 44,
375
47, 75, 37, 48, 33, 76, 47, 74, 76, 48,
376
24, 24, 24, 24, 24, 26, 26, 26, 26, 26,
377
30, 73, 30, 30, 30, 45, 72, 45, 71, 45,
378
46, 70, 46, 46, 46, 49, 49, 69, 49, 49,
379
50, 50, 50, 50, 50, 52, 68, 52, 52, 52,
381
67, 66, 65, 64, 63, 62, 61, 60, 53, 59,
382
58, 57, 56, 55, 54, 53, 34, 34, 51, 42,
383
41, 40, 39, 34, 76, 7, 76, 76, 76, 76,
384
76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
385
76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
389
static ag_yyconst short int ag_yy_chk[156] =
391
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
394
4, 80, 3, 4, 5, 5, 6, 6, 13, 13,
395
15, 13, 13, 15, 16, 5, 16, 6, 23, 23,
396
25, 74, 33, 25, 33, 46, 47, 72, 46, 47,
397
77, 77, 77, 77, 77, 78, 78, 78, 78, 78,
398
79, 70, 79, 79, 79, 81, 69, 81, 68, 81,
399
82, 66, 82, 82, 82, 83, 83, 65, 83, 83,
400
84, 84, 84, 84, 84, 85, 64, 85, 85, 85,
402
62, 60, 59, 58, 57, 56, 55, 54, 53, 44,
403
43, 42, 41, 40, 39, 37, 34, 32, 29, 22,
404
21, 20, 19, 14, 7, 76, 76, 76, 76, 76,
405
76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
406
76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
410
static ag_yy_state_type ag_yy_last_accepting_state;
411
static char *ag_yy_last_accepting_cpos;
413
/* The intent behind this definition is that it'll catch
414
* any uses of REJECT which flex missed.
416
#define REJECT reject_used_but_not_detected
417
#define ag_yymore() ag_yymore_used_but_not_detected
418
#define YY_MORE_ADJ 0
419
#define YY_RESTORE_YY_MORE_OFFSET
424
This software may only be used by you under license from AT&T Corp.
425
("AT&T"). A copy of AT&T's Source Code Agreement is available at
426
AT&T's Internet website having the URL:
427
<http://www.research.att.com/sw/tools/graphviz/license/source.html>
428
If you received this software without first entering into a license
429
with AT&T, you have an infringing copy of this software and cannot use
430
it without violating AT&T's intellectual property rights.
432
/* requires flex (i.e. not lex) */
437
#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */
438
/* this is a workaround for linux flex */
440
#define ag_yywrap() 1
442
static int line_num = 1;
443
static Agdisc_t *Disc;
446
/* There is a hole here, because switching channels
447
* requires pushing back whatever was previously read.
448
* There probably is a right way of doing this.
450
void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile;}
453
#define YY_INPUT(buf,result,max_size) \
454
if ((result = Disc->io->afread(Ifile, buf, max_size)) < 0) \
455
YY_FATAL_ERROR( "input in flex scanner failed" )
458
/* buffer for arbitrary length strings (longer than BUFSIZ) */
459
static char *Sbuf,*Sptr,*Send;
460
static void beginstr(void) {
461
if (Sbuf == NIL(char*)) {
462
Sbuf = malloc(BUFSIZ);
463
Send = Sbuf + BUFSIZ;
469
static void addstr(char *src) {
471
if (Sptr > Sbuf) Sptr--;
473
do {c = *Sptr++ = *src++;} while (c && (Sptr < Send));
475
long sz = Send - Sbuf;
476
long off = Sptr - Sbuf;
478
Sbuf = (char*)realloc(Sbuf,sz);
485
static void endstr(void) {
486
ag_yylval.str = (char*)agstrdup(Ag_G_global,Sbuf);
494
/* Macros after this point can all be overridden by user definitions in
498
#ifndef YY_SKIP_YYWRAP
500
extern "C" int ag_yywrap YY_PROTO(( void ));
502
extern int ag_yywrap YY_PROTO(( void ));
507
static void ag_yyunput YY_PROTO(( int c, char *buf_ptr ));
510
#ifndef ag_yytext_ptr
511
static void ag_yy_flex_strncpy YY_PROTO(( char *, ag_yyconst char *, int ));
514
#ifdef YY_NEED_STRLEN
515
static int ag_yy_flex_strlen YY_PROTO(( ag_yyconst char * ));
520
static int ag_yyinput YY_PROTO(( void ));
522
static int input YY_PROTO(( void ));
527
static int ag_yy_start_stack_ptr = 0;
528
static int ag_yy_start_stack_depth = 0;
529
static int *ag_yy_start_stack = 0;
530
#ifndef YY_NO_PUSH_STATE
531
static void ag_yy_push_state YY_PROTO(( int new_state ));
533
#ifndef YY_NO_POP_STATE
534
static void ag_yy_pop_state YY_PROTO(( void ));
536
#ifndef YY_NO_TOP_STATE
537
static int ag_yy_top_state YY_PROTO(( void ));
541
#define YY_NO_PUSH_STATE 1
542
#define YY_NO_POP_STATE 1
543
#define YY_NO_TOP_STATE 1
546
#ifdef YY_MALLOC_DECL
554
/* Just try to get by without declaring the routines. This will fail
555
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
556
* or sizeof(void*) != sizeof(int).
561
/* Amount of stuff to slurp up with each read. */
562
#ifndef YY_READ_BUF_SIZE
563
#define YY_READ_BUF_SIZE 8192
566
/* Copy whatever the last rule matched to the standard output. */
569
/* This used to be an fputs(), but since the string might contain NUL's,
570
* we now use fwrite().
572
#define ECHO (void) fwrite( ag_yytext, ag_yyleng, 1, ag_yyout )
575
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
576
* is returned in "result".
579
#define YY_INPUT(buf,result,max_size) \
580
if ( ag_yy_current_buffer->ag_yy_is_interactive ) \
583
for ( n = 0; n < max_size && \
584
(c = getc( ag_yyin )) != EOF && c != '\n'; ++n ) \
587
buf[n++] = (char) c; \
588
if ( c == EOF && ferror( ag_yyin ) ) \
589
YY_FATAL_ERROR( "input in flex scanner failed" ); \
592
else if ( ((result = fread( buf, 1, max_size, ag_yyin )) == 0) \
593
&& ferror( ag_yyin ) ) \
594
YY_FATAL_ERROR( "input in flex scanner failed" );
597
/* No semi-colon after return; correct usage is to write "ag_yyterminate();" -
598
* we don't want an extra ';' after the "return" because that will cause
599
* some compilers to complain about unreachable statements.
601
#ifndef ag_yyterminate
602
#define ag_yyterminate() return YY_NULL
605
/* Number of entries by which start-condition stack grows. */
606
#ifndef YY_START_STACK_INCR
607
#define YY_START_STACK_INCR 25
610
/* Report a fatal error. */
611
#ifndef YY_FATAL_ERROR
612
#define YY_FATAL_ERROR(msg) ag_yy_fatal_error( msg )
615
/* Default declaration of generated scanner - a define so the user can
616
* easily add parameters.
619
#define YY_DECL int ag_yylex YY_PROTO(( void ))
622
/* Code executed at the beginning of each rule, after ag_yytext and ag_yyleng
625
#ifndef YY_USER_ACTION
626
#define YY_USER_ACTION
629
/* Code executed at the end of each rule. */
631
#define YY_BREAK break;
634
#define YY_RULE_SETUP \
639
register ag_yy_state_type ag_yy_current_state;
640
register char *ag_yy_cp = NULL, *ag_yy_bp = NULL;
641
register int ag_yy_act;
656
ag_yy_start = 1; /* first start state */
664
if ( ! ag_yy_current_buffer )
665
ag_yy_current_buffer =
666
ag_yy_create_buffer( ag_yyin, YY_BUF_SIZE );
668
ag_yy_load_buffer_state();
671
while ( 1 ) /* loops until end-of-file is reached */
673
ag_yy_cp = ag_yy_c_buf_p;
675
/* Support of ag_yytext. */
676
*ag_yy_cp = ag_yy_hold_char;
678
/* ag_yy_bp points to the position in ag_yy_ch_buf of the start of
683
ag_yy_current_state = ag_yy_start;
687
register YY_CHAR ag_yy_c = ag_yy_ec[YY_SC_TO_UI(*ag_yy_cp)];
688
if ( ag_yy_accept[ag_yy_current_state] )
690
ag_yy_last_accepting_state = ag_yy_current_state;
691
ag_yy_last_accepting_cpos = ag_yy_cp;
693
while ( ag_yy_chk[ag_yy_base[ag_yy_current_state] + ag_yy_c] != ag_yy_current_state )
695
ag_yy_current_state = (int) ag_yy_def[ag_yy_current_state];
696
if ( ag_yy_current_state >= 77 )
697
ag_yy_c = ag_yy_meta[(unsigned int) ag_yy_c];
699
ag_yy_current_state = ag_yy_nxt[ag_yy_base[ag_yy_current_state] + (unsigned int) ag_yy_c];
702
while ( ag_yy_base[ag_yy_current_state] != 126 );
705
ag_yy_act = ag_yy_accept[ag_yy_current_state];
706
if ( ag_yy_act == 0 )
707
{ /* have to back up */
708
ag_yy_cp = ag_yy_last_accepting_cpos;
709
ag_yy_current_state = ag_yy_last_accepting_state;
710
ag_yy_act = ag_yy_accept[ag_yy_current_state];
716
do_action: /* This label is used only to access EOF actions. */
720
{ /* beginning of action switch */
721
case 0: /* must back up */
722
/* undo the effects of YY_DO_BEFORE_ACTION */
723
*ag_yy_cp = ag_yy_hold_char;
724
ag_yy_cp = ag_yy_last_accepting_cpos;
725
ag_yy_current_state = ag_yy_last_accepting_state;
726
goto ag_yy_find_action;
746
/* eat anything not a '*' */
751
/* eat up '*'s not followed by '/'s */
761
/* ignore C++-style comments */
766
/* ignore shell-like comments */
771
/* ignore whitespace */
776
return(T_node); /* see tokens in agcanonstr */
811
{ ag_yylval.str = (char*)agstrdup(Ag_G_global,ag_yytext); return(T_atom); }
816
BEGIN(qstring); beginstr();
821
BEGIN(INITIAL); endstr(); return (T_atom);
826
line_num++; /* ignore escaped newlines */
836
return (ag_yytext[0]);
844
case YY_STATE_EOF(INITIAL):
845
case YY_STATE_EOF(comment):
846
case YY_STATE_EOF(qstring):
849
case YY_END_OF_BUFFER:
851
/* Amount of text matched not including the EOB char. */
852
int ag_yy_amount_of_matched_text = (int) (ag_yy_cp - ag_yytext_ptr) - 1;
854
/* Undo the effects of YY_DO_BEFORE_ACTION. */
855
*ag_yy_cp = ag_yy_hold_char;
856
YY_RESTORE_YY_MORE_OFFSET
858
if ( ag_yy_current_buffer->ag_yy_buffer_status == YY_BUFFER_NEW )
860
/* We're scanning a new file or input source. It's
861
* possible that this happened because the user
862
* just pointed ag_yyin at a new source and called
863
* ag_yylex(). If so, then we have to assure
864
* consistency between ag_yy_current_buffer and our
865
* globals. Here is the right place to do so, because
866
* this is the first action (other than possibly a
867
* back-up) that will match for the new input source.
869
ag_yy_n_chars = ag_yy_current_buffer->ag_yy_n_chars;
870
ag_yy_current_buffer->ag_yy_input_file = ag_yyin;
871
ag_yy_current_buffer->ag_yy_buffer_status = YY_BUFFER_NORMAL;
874
/* Note that here we test for ag_yy_c_buf_p "<=" to the position
875
* of the first EOB in the buffer, since ag_yy_c_buf_p will
876
* already have been incremented past the NUL character
877
* (since all states make transitions on EOB to the
878
* end-of-buffer state). Contrast this with the test
881
if ( ag_yy_c_buf_p <= &ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars] )
882
{ /* This was really a NUL. */
883
ag_yy_state_type ag_yy_next_state;
885
ag_yy_c_buf_p = ag_yytext_ptr + ag_yy_amount_of_matched_text;
887
ag_yy_current_state = ag_yy_get_previous_state();
889
/* Okay, we're now positioned to make the NUL
890
* transition. We couldn't have
891
* ag_yy_get_previous_state() go ahead and do it
892
* for us because it doesn't know how to deal
893
* with the possibility of jamming (and we don't
894
* want to build jamming into it because then it
895
* will run more slowly).
898
ag_yy_next_state = ag_yy_try_NUL_trans( ag_yy_current_state );
900
ag_yy_bp = ag_yytext_ptr + YY_MORE_ADJ;
902
if ( ag_yy_next_state )
904
/* Consume the NUL. */
905
ag_yy_cp = ++ag_yy_c_buf_p;
906
ag_yy_current_state = ag_yy_next_state;
912
ag_yy_cp = ag_yy_c_buf_p;
913
goto ag_yy_find_action;
917
else switch ( ag_yy_get_next_buffer() )
919
case EOB_ACT_END_OF_FILE:
921
ag_yy_did_buffer_switch_on_eof = 0;
925
/* Note: because we've taken care in
926
* ag_yy_get_next_buffer() to have set up
927
* ag_yytext, we can now set up
928
* ag_yy_c_buf_p so that if some total
929
* hoser (like flex itself) wants to
930
* call the scanner after we return the
931
* YY_NULL, it'll still work - another
932
* YY_NULL will get returned.
934
ag_yy_c_buf_p = ag_yytext_ptr + YY_MORE_ADJ;
936
ag_yy_act = YY_STATE_EOF(YY_START);
942
if ( ! ag_yy_did_buffer_switch_on_eof )
948
case EOB_ACT_CONTINUE_SCAN:
950
ag_yytext_ptr + ag_yy_amount_of_matched_text;
952
ag_yy_current_state = ag_yy_get_previous_state();
954
ag_yy_cp = ag_yy_c_buf_p;
955
ag_yy_bp = ag_yytext_ptr + YY_MORE_ADJ;
958
case EOB_ACT_LAST_MATCH:
960
&ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars];
962
ag_yy_current_state = ag_yy_get_previous_state();
964
ag_yy_cp = ag_yy_c_buf_p;
965
ag_yy_bp = ag_yytext_ptr + YY_MORE_ADJ;
966
goto ag_yy_find_action;
973
"fatal flex scanner internal error--no action found" );
974
} /* end of action switch */
975
} /* end of scanning one token */
976
} /* end of ag_yylex */
979
/* ag_yy_get_next_buffer - try to read in a new buffer
981
* Returns a code representing an action:
982
* EOB_ACT_LAST_MATCH -
983
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
984
* EOB_ACT_END_OF_FILE - end of file
987
static int ag_yy_get_next_buffer()
989
register char *dest = ag_yy_current_buffer->ag_yy_ch_buf;
990
register char *source = ag_yytext_ptr;
991
register int number_to_move, i;
994
if ( ag_yy_c_buf_p > &ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars + 1] )
996
"fatal flex scanner internal error--end of buffer missed" );
998
if ( ag_yy_current_buffer->ag_yy_fill_buffer == 0 )
999
{ /* Don't try to fill the buffer, so this is an EOF. */
1000
if ( ag_yy_c_buf_p - ag_yytext_ptr - YY_MORE_ADJ == 1 )
1002
/* We matched a single character, the EOB, so
1003
* treat this as a final EOF.
1005
return EOB_ACT_END_OF_FILE;
1010
/* We matched some text prior to the EOB, first
1013
return EOB_ACT_LAST_MATCH;
1017
/* Try to read more data. */
1019
/* First move last chars to start of buffer. */
1020
number_to_move = (int) (ag_yy_c_buf_p - ag_yytext_ptr) - 1;
1022
for ( i = 0; i < number_to_move; ++i )
1023
*(dest++) = *(source++);
1025
if ( ag_yy_current_buffer->ag_yy_buffer_status == YY_BUFFER_EOF_PENDING )
1026
/* don't do the read, it's not guaranteed to return an EOF,
1029
ag_yy_current_buffer->ag_yy_n_chars = ag_yy_n_chars = 0;
1034
ag_yy_current_buffer->ag_yy_buf_size - number_to_move - 1;
1036
while ( num_to_read <= 0 )
1037
{ /* Not enough room in the buffer - grow it. */
1038
#ifdef YY_USES_REJECT
1040
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1043
/* just a shorter name for the current buffer */
1044
YY_BUFFER_STATE b = ag_yy_current_buffer;
1046
int ag_yy_c_buf_p_offset =
1047
(int) (ag_yy_c_buf_p - b->ag_yy_ch_buf);
1049
if ( b->ag_yy_is_our_buffer )
1051
int new_size = b->ag_yy_buf_size * 2;
1053
if ( new_size <= 0 )
1054
b->ag_yy_buf_size += b->ag_yy_buf_size / 8;
1056
b->ag_yy_buf_size *= 2;
1058
b->ag_yy_ch_buf = (char *)
1059
/* Include room in for 2 EOB chars. */
1060
ag_yy_flex_realloc( (void *) b->ag_yy_ch_buf,
1061
b->ag_yy_buf_size + 2 );
1064
/* Can't grow it, we don't own it. */
1065
b->ag_yy_ch_buf = 0;
1067
if ( ! b->ag_yy_ch_buf )
1069
"fatal error - scanner input buffer overflow" );
1071
ag_yy_c_buf_p = &b->ag_yy_ch_buf[ag_yy_c_buf_p_offset];
1073
num_to_read = ag_yy_current_buffer->ag_yy_buf_size -
1078
if ( num_to_read > YY_READ_BUF_SIZE )
1079
num_to_read = YY_READ_BUF_SIZE;
1081
/* Read in more data. */
1082
YY_INPUT( (&ag_yy_current_buffer->ag_yy_ch_buf[number_to_move]),
1083
ag_yy_n_chars, num_to_read );
1085
ag_yy_current_buffer->ag_yy_n_chars = ag_yy_n_chars;
1088
if ( ag_yy_n_chars == 0 )
1090
if ( number_to_move == YY_MORE_ADJ )
1092
ret_val = EOB_ACT_END_OF_FILE;
1093
ag_yyrestart( ag_yyin );
1098
ret_val = EOB_ACT_LAST_MATCH;
1099
ag_yy_current_buffer->ag_yy_buffer_status =
1100
YY_BUFFER_EOF_PENDING;
1105
ret_val = EOB_ACT_CONTINUE_SCAN;
1107
ag_yy_n_chars += number_to_move;
1108
ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1109
ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1111
ag_yytext_ptr = &ag_yy_current_buffer->ag_yy_ch_buf[0];
1117
/* ag_yy_get_previous_state - get the state just before the EOB char was reached */
1119
static ag_yy_state_type ag_yy_get_previous_state()
1121
register ag_yy_state_type ag_yy_current_state;
1122
register char *ag_yy_cp;
1124
ag_yy_current_state = ag_yy_start;
1126
for ( ag_yy_cp = ag_yytext_ptr + YY_MORE_ADJ; ag_yy_cp < ag_yy_c_buf_p; ++ag_yy_cp )
1128
register YY_CHAR ag_yy_c = (*ag_yy_cp ? ag_yy_ec[YY_SC_TO_UI(*ag_yy_cp)] : 1);
1129
if ( ag_yy_accept[ag_yy_current_state] )
1131
ag_yy_last_accepting_state = ag_yy_current_state;
1132
ag_yy_last_accepting_cpos = ag_yy_cp;
1134
while ( ag_yy_chk[ag_yy_base[ag_yy_current_state] + ag_yy_c] != ag_yy_current_state )
1136
ag_yy_current_state = (int) ag_yy_def[ag_yy_current_state];
1137
if ( ag_yy_current_state >= 77 )
1138
ag_yy_c = ag_yy_meta[(unsigned int) ag_yy_c];
1140
ag_yy_current_state = ag_yy_nxt[ag_yy_base[ag_yy_current_state] + (unsigned int) ag_yy_c];
1143
return ag_yy_current_state;
1147
/* ag_yy_try_NUL_trans - try to make a transition on the NUL character
1150
* next_state = ag_yy_try_NUL_trans( current_state );
1153
#ifdef YY_USE_PROTOS
1154
static ag_yy_state_type ag_yy_try_NUL_trans( ag_yy_state_type ag_yy_current_state )
1156
static ag_yy_state_type ag_yy_try_NUL_trans( ag_yy_current_state )
1157
ag_yy_state_type ag_yy_current_state;
1160
register int ag_yy_is_jam;
1161
register char *ag_yy_cp = ag_yy_c_buf_p;
1163
register YY_CHAR ag_yy_c = 1;
1164
if ( ag_yy_accept[ag_yy_current_state] )
1166
ag_yy_last_accepting_state = ag_yy_current_state;
1167
ag_yy_last_accepting_cpos = ag_yy_cp;
1169
while ( ag_yy_chk[ag_yy_base[ag_yy_current_state] + ag_yy_c] != ag_yy_current_state )
1171
ag_yy_current_state = (int) ag_yy_def[ag_yy_current_state];
1172
if ( ag_yy_current_state >= 77 )
1173
ag_yy_c = ag_yy_meta[(unsigned int) ag_yy_c];
1175
ag_yy_current_state = ag_yy_nxt[ag_yy_base[ag_yy_current_state] + (unsigned int) ag_yy_c];
1176
ag_yy_is_jam = (ag_yy_current_state == 76);
1178
return ag_yy_is_jam ? 0 : ag_yy_current_state;
1183
#ifdef YY_USE_PROTOS
1184
static void ag_yyunput( int c, register char *ag_yy_bp )
1186
static void ag_yyunput( c, ag_yy_bp )
1188
register char *ag_yy_bp;
1191
register char *ag_yy_cp = ag_yy_c_buf_p;
1193
/* undo effects of setting up ag_yytext */
1194
*ag_yy_cp = ag_yy_hold_char;
1196
if ( ag_yy_cp < ag_yy_current_buffer->ag_yy_ch_buf + 2 )
1197
{ /* need to shift things up to make room */
1198
/* +2 for EOB chars. */
1199
register int number_to_move = ag_yy_n_chars + 2;
1200
register char *dest = &ag_yy_current_buffer->ag_yy_ch_buf[
1201
ag_yy_current_buffer->ag_yy_buf_size + 2];
1202
register char *source =
1203
&ag_yy_current_buffer->ag_yy_ch_buf[number_to_move];
1205
while ( source > ag_yy_current_buffer->ag_yy_ch_buf )
1206
*--dest = *--source;
1208
ag_yy_cp += (int) (dest - source);
1209
ag_yy_bp += (int) (dest - source);
1210
ag_yy_current_buffer->ag_yy_n_chars =
1211
ag_yy_n_chars = ag_yy_current_buffer->ag_yy_buf_size;
1213
if ( ag_yy_cp < ag_yy_current_buffer->ag_yy_ch_buf + 2 )
1214
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1217
*--ag_yy_cp = (char) c;
1220
ag_yytext_ptr = ag_yy_bp;
1221
ag_yy_hold_char = *ag_yy_cp;
1222
ag_yy_c_buf_p = ag_yy_cp;
1224
#endif /* ifndef YY_NO_UNPUT */
1228
static int ag_yyinput()
1235
*ag_yy_c_buf_p = ag_yy_hold_char;
1237
if ( *ag_yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1239
/* ag_yy_c_buf_p now points to the character we want to return.
1240
* If this occurs *before* the EOB characters, then it's a
1241
* valid NUL; if not, then we've hit the end of the buffer.
1243
if ( ag_yy_c_buf_p < &ag_yy_current_buffer->ag_yy_ch_buf[ag_yy_n_chars] )
1244
/* This was really a NUL. */
1245
*ag_yy_c_buf_p = '\0';
1248
{ /* need more input */
1249
int offset = ag_yy_c_buf_p - ag_yytext_ptr;
1252
switch ( ag_yy_get_next_buffer() )
1254
case EOB_ACT_LAST_MATCH:
1255
/* This happens because ag_yy_g_n_b()
1256
* sees that we've accumulated a
1257
* token and flags that we need to
1258
* try matching the token before
1259
* proceeding. But for input(),
1260
* there's no matching to consider.
1261
* So convert the EOB_ACT_LAST_MATCH
1262
* to EOB_ACT_END_OF_FILE.
1265
/* Reset buffer status. */
1266
ag_yyrestart( ag_yyin );
1270
case EOB_ACT_END_OF_FILE:
1275
if ( ! ag_yy_did_buffer_switch_on_eof )
1278
return ag_yyinput();
1284
case EOB_ACT_CONTINUE_SCAN:
1285
ag_yy_c_buf_p = ag_yytext_ptr + offset;
1291
c = *(unsigned char *) ag_yy_c_buf_p; /* cast for 8-bit char's */
1292
*ag_yy_c_buf_p = '\0'; /* preserve ag_yytext */
1293
ag_yy_hold_char = *++ag_yy_c_buf_p;
1300
#ifdef YY_USE_PROTOS
1301
void ag_yyrestart( FILE *input_file )
1303
void ag_yyrestart( input_file )
1307
if ( ! ag_yy_current_buffer )
1308
ag_yy_current_buffer = ag_yy_create_buffer( ag_yyin, YY_BUF_SIZE );
1310
ag_yy_init_buffer( ag_yy_current_buffer, input_file );
1311
ag_yy_load_buffer_state();
1315
#ifdef YY_USE_PROTOS
1316
void ag_yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1318
void ag_yy_switch_to_buffer( new_buffer )
1319
YY_BUFFER_STATE new_buffer;
1322
if ( ag_yy_current_buffer == new_buffer )
1325
if ( ag_yy_current_buffer )
1327
/* Flush out information for old buffer. */
1328
*ag_yy_c_buf_p = ag_yy_hold_char;
1329
ag_yy_current_buffer->ag_yy_buf_pos = ag_yy_c_buf_p;
1330
ag_yy_current_buffer->ag_yy_n_chars = ag_yy_n_chars;
1333
ag_yy_current_buffer = new_buffer;
1334
ag_yy_load_buffer_state();
1336
/* We don't actually know whether we did this switch during
1337
* EOF (ag_yywrap()) processing, but the only time this flag
1338
* is looked at is after ag_yywrap() is called, so it's safe
1339
* to go ahead and always set it.
1341
ag_yy_did_buffer_switch_on_eof = 1;
1345
#ifdef YY_USE_PROTOS
1346
void ag_yy_load_buffer_state( void )
1348
void ag_yy_load_buffer_state()
1351
ag_yy_n_chars = ag_yy_current_buffer->ag_yy_n_chars;
1352
ag_yytext_ptr = ag_yy_c_buf_p = ag_yy_current_buffer->ag_yy_buf_pos;
1353
ag_yyin = ag_yy_current_buffer->ag_yy_input_file;
1354
ag_yy_hold_char = *ag_yy_c_buf_p;
1358
#ifdef YY_USE_PROTOS
1359
YY_BUFFER_STATE ag_yy_create_buffer( FILE *file, int size )
1361
YY_BUFFER_STATE ag_yy_create_buffer( file, size )
1368
b = (YY_BUFFER_STATE) ag_yy_flex_alloc( sizeof( struct ag_yy_buffer_state ) );
1370
YY_FATAL_ERROR( "out of dynamic memory in ag_yy_create_buffer()" );
1372
b->ag_yy_buf_size = size;
1374
/* ag_yy_ch_buf has to be 2 characters longer than the size given because
1375
* we need to put in 2 end-of-buffer characters.
1377
b->ag_yy_ch_buf = (char *) ag_yy_flex_alloc( b->ag_yy_buf_size + 2 );
1378
if ( ! b->ag_yy_ch_buf )
1379
YY_FATAL_ERROR( "out of dynamic memory in ag_yy_create_buffer()" );
1381
b->ag_yy_is_our_buffer = 1;
1383
ag_yy_init_buffer( b, file );
1389
#ifdef YY_USE_PROTOS
1390
void ag_yy_delete_buffer( YY_BUFFER_STATE b )
1392
void ag_yy_delete_buffer( b )
1399
if ( b == ag_yy_current_buffer )
1400
ag_yy_current_buffer = (YY_BUFFER_STATE) 0;
1402
if ( b->ag_yy_is_our_buffer )
1403
ag_yy_flex_free( (void *) b->ag_yy_ch_buf );
1405
ag_yy_flex_free( (void *) b );
1410
#ifdef YY_USE_PROTOS
1411
void ag_yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1413
void ag_yy_init_buffer( b, file )
1420
ag_yy_flush_buffer( b );
1422
b->ag_yy_input_file = file;
1423
b->ag_yy_fill_buffer = 1;
1425
#if YY_ALWAYS_INTERACTIVE
1426
b->ag_yy_is_interactive = 1;
1428
#if YY_NEVER_INTERACTIVE
1429
b->ag_yy_is_interactive = 0;
1431
b->ag_yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1437
#ifdef YY_USE_PROTOS
1438
void ag_yy_flush_buffer( YY_BUFFER_STATE b )
1440
void ag_yy_flush_buffer( b )
1448
b->ag_yy_n_chars = 0;
1450
/* We always need two end-of-buffer characters. The first causes
1451
* a transition to the end-of-buffer state. The second causes
1452
* a jam in that state.
1454
b->ag_yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1455
b->ag_yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1457
b->ag_yy_buf_pos = &b->ag_yy_ch_buf[0];
1459
b->ag_yy_at_bol = 1;
1460
b->ag_yy_buffer_status = YY_BUFFER_NEW;
1462
if ( b == ag_yy_current_buffer )
1463
ag_yy_load_buffer_state();
1467
#ifndef YY_NO_SCAN_BUFFER
1468
#ifdef YY_USE_PROTOS
1469
YY_BUFFER_STATE ag_yy_scan_buffer( char *base, ag_yy_size_t size )
1471
YY_BUFFER_STATE ag_yy_scan_buffer( base, size )
1479
base[size-2] != YY_END_OF_BUFFER_CHAR ||
1480
base[size-1] != YY_END_OF_BUFFER_CHAR )
1481
/* They forgot to leave room for the EOB's. */
1484
b = (YY_BUFFER_STATE) ag_yy_flex_alloc( sizeof( struct ag_yy_buffer_state ) );
1486
YY_FATAL_ERROR( "out of dynamic memory in ag_yy_scan_buffer()" );
1488
b->ag_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1489
b->ag_yy_buf_pos = b->ag_yy_ch_buf = base;
1490
b->ag_yy_is_our_buffer = 0;
1491
b->ag_yy_input_file = 0;
1492
b->ag_yy_n_chars = b->ag_yy_buf_size;
1493
b->ag_yy_is_interactive = 0;
1494
b->ag_yy_at_bol = 1;
1495
b->ag_yy_fill_buffer = 0;
1496
b->ag_yy_buffer_status = YY_BUFFER_NEW;
1498
ag_yy_switch_to_buffer( b );
1505
#ifndef YY_NO_SCAN_STRING
1506
#ifdef YY_USE_PROTOS
1507
YY_BUFFER_STATE ag_yy_scan_string( ag_yyconst char *ag_yy_str )
1509
YY_BUFFER_STATE ag_yy_scan_string( ag_yy_str )
1510
ag_yyconst char *ag_yy_str;
1514
for ( len = 0; ag_yy_str[len]; ++len )
1517
return ag_yy_scan_bytes( ag_yy_str, len );
1522
#ifndef YY_NO_SCAN_BYTES
1523
#ifdef YY_USE_PROTOS
1524
YY_BUFFER_STATE ag_yy_scan_bytes( ag_yyconst char *bytes, int len )
1526
YY_BUFFER_STATE ag_yy_scan_bytes( bytes, len )
1527
ag_yyconst char *bytes;
1536
/* Get memory for full buffer, including space for trailing EOB's. */
1538
buf = (char *) ag_yy_flex_alloc( n );
1540
YY_FATAL_ERROR( "out of dynamic memory in ag_yy_scan_bytes()" );
1542
for ( i = 0; i < len; ++i )
1545
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1547
b = ag_yy_scan_buffer( buf, n );
1549
YY_FATAL_ERROR( "bad buffer in ag_yy_scan_bytes()" );
1551
/* It's okay to grow etc. this buffer, and we should throw it
1552
* away when we're done.
1554
b->ag_yy_is_our_buffer = 1;
1561
#ifndef YY_NO_PUSH_STATE
1562
#ifdef YY_USE_PROTOS
1563
static void ag_yy_push_state( int new_state )
1565
static void ag_yy_push_state( new_state )
1569
if ( ag_yy_start_stack_ptr >= ag_yy_start_stack_depth )
1571
ag_yy_size_t new_size;
1573
ag_yy_start_stack_depth += YY_START_STACK_INCR;
1574
new_size = ag_yy_start_stack_depth * sizeof( int );
1576
if ( ! ag_yy_start_stack )
1577
ag_yy_start_stack = (int *) ag_yy_flex_alloc( new_size );
1580
ag_yy_start_stack = (int *) ag_yy_flex_realloc(
1581
(void *) ag_yy_start_stack, new_size );
1583
if ( ! ag_yy_start_stack )
1585
"out of memory expanding start-condition stack" );
1588
ag_yy_start_stack[ag_yy_start_stack_ptr++] = YY_START;
1595
#ifndef YY_NO_POP_STATE
1596
static void ag_yy_pop_state()
1598
if ( --ag_yy_start_stack_ptr < 0 )
1599
YY_FATAL_ERROR( "start-condition stack underflow" );
1601
BEGIN(ag_yy_start_stack[ag_yy_start_stack_ptr]);
1606
#ifndef YY_NO_TOP_STATE
1607
static int ag_yy_top_state()
1609
return ag_yy_start_stack[ag_yy_start_stack_ptr - 1];
1613
#ifndef YY_EXIT_FAILURE
1614
#define YY_EXIT_FAILURE 2
1617
#ifdef YY_USE_PROTOS
1618
static void ag_yy_fatal_error( ag_yyconst char msg[] )
1620
static void ag_yy_fatal_error( msg )
1624
(void) fprintf( stderr, "%s\n", msg );
1625
exit( YY_EXIT_FAILURE );
1630
/* Redefine ag_yyless() so it works in section 3 code. */
1633
#define ag_yyless(n) \
1636
/* Undo effects of setting up ag_yytext. */ \
1637
ag_yytext[ag_yyleng] = ag_yy_hold_char; \
1638
ag_yy_c_buf_p = ag_yytext + n; \
1639
ag_yy_hold_char = *ag_yy_c_buf_p; \
1640
*ag_yy_c_buf_p = '\0'; \
1646
/* Internal utility routines. */
1648
#ifndef ag_yytext_ptr
1649
#ifdef YY_USE_PROTOS
1650
static void ag_yy_flex_strncpy( char *s1, ag_yyconst char *s2, int n )
1652
static void ag_yy_flex_strncpy( s1, s2, n )
1654
ag_yyconst char *s2;
1659
for ( i = 0; i < n; ++i )
1664
#ifdef YY_NEED_STRLEN
1665
#ifdef YY_USE_PROTOS
1666
static int ag_yy_flex_strlen( ag_yyconst char *s )
1668
static int ag_yy_flex_strlen( s )
1673
for ( n = 0; s[n]; ++n )
1681
#ifdef YY_USE_PROTOS
1682
static void *ag_yy_flex_alloc( ag_yy_size_t size )
1684
static void *ag_yy_flex_alloc( size )
1688
return (void *) malloc( size );
1691
#ifdef YY_USE_PROTOS
1692
static void *ag_yy_flex_realloc( void *ptr, ag_yy_size_t size )
1694
static void *ag_yy_flex_realloc( ptr, size )
1699
/* The cast to (char *) in the following accommodates both
1700
* implementations that use char* generic pointers, and those
1701
* that use void* generic pointers. It works with the latter
1702
* because both ANSI C and C++ allow castless assignment from
1703
* any pointer type to void*, and deal with argument conversions
1704
* as though doing an assignment.
1706
return (void *) realloc( (char *) ptr, size );
1709
#ifdef YY_USE_PROTOS
1710
static void ag_yy_flex_free( void *ptr )
1712
static void ag_yy_flex_free( ptr )
1728
void ag_yyerror(char *str)
1731
sprintf(buf,"%s in line %d near '%s'",str,line_num,ag_yytext);
1732
agerror(AGERROR_SYNTAX,buf);
1734
/* must be here to see flex's macro defns */
1735
void aglexeof() { unput(GRAPH_EOF_TOKEN); }