4 #define YY_INT_ALIGNED short int
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 37
12 #if YY_FLEX_SUBMINOR_VERSION > 0
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
59 #define INT8_MIN (-128)
62 #define INT16_MIN (-32767-1)
65 #define INT32_MIN (-2147483647-1)
68 #define INT8_MAX (127)
71 #define INT16_MAX (32767)
74 #define INT32_MAX (2147483647)
77 #define UINT8_MAX (255U)
80 #define UINT16_MAX (65535U)
83 #define UINT32_MAX (4294967295U)
98 #if defined (__STDC__)
106 #define aagconst const
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
125 #define BEGIN (aag_start) = 1 + 2 *
131 #define YY_START (((aag_start) - 1) / 2)
132 #define YYSTATE YY_START
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
138 #define YY_NEW_FILE aagrestart(aagin )
140 #define YY_END_OF_BUFFER_CHAR 0
144 #define YY_BUF_SIZE 16384
149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(aag_state_type))
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
156 #ifndef YY_TYPEDEF_YY_SIZE_T
157 #define YY_TYPEDEF_YY_SIZE_T
165 #define EOB_ACT_CONTINUE_SCAN 0
166 #define EOB_ACT_END_OF_FILE 1
167 #define EOB_ACT_LAST_MATCH 2
169 #define YY_LESS_LINENO(n)
176 int aagless_macro_arg = (n); \
177 YY_LESS_LINENO(aagless_macro_arg);\
178 *aag_cp = (aag_hold_char); \
179 YY_RESTORE_YY_MORE_OFFSET \
180 (aag_c_buf_p) = aag_cp = aag_bp + aagless_macro_arg - YY_MORE_ADJ; \
181 YY_DO_BEFORE_ACTION; \
185 #define unput(c) aagunput( c, (aagtext_ptr) )
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
235 #define YY_BUFFER_NEW 0
236 #define YY_BUFFER_NORMAL 1
247 #define YY_BUFFER_EOF_PENDING 2
253 static size_t aag_buffer_stack_top = 0;
254 static size_t aag_buffer_stack_max = 0;
255 static YY_BUFFER_STATE * aag_buffer_stack = 0;
263 #define YY_CURRENT_BUFFER ( (aag_buffer_stack) \
264 ? (aag_buffer_stack)[(aag_buffer_stack_top)] \
270 #define YY_CURRENT_BUFFER_LVALUE (aag_buffer_stack)[(aag_buffer_stack_top)]
273 static char aag_hold_char;
278 static char *aag_c_buf_p = (
char *) 0;
279 static int aag_init = 0;
280 static int aag_start = 0;
285 static int aag_did_buffer_switch_on_eof;
295 static void aagensure_buffer_stack (
void );
296 static void aag_load_buffer_state (
void );
297 static void aag_init_buffer (YY_BUFFER_STATE b,FILE *file );
299 #define YY_FLUSH_BUFFER aag_flush_buffer(YY_CURRENT_BUFFER )
309 #define aag_new_buffer aag_create_buffer
311 #define aag_set_interactive(is_interactive) \
313 if ( ! YY_CURRENT_BUFFER ){ \
314 aagensure_buffer_stack (); \
315 YY_CURRENT_BUFFER_LVALUE = \
316 aag_create_buffer(aagin,YY_BUF_SIZE ); \
318 YY_CURRENT_BUFFER_LVALUE->aag_is_interactive = is_interactive; \
321 #define aag_set_bol(at_bol) \
323 if ( ! YY_CURRENT_BUFFER ){\
324 aagensure_buffer_stack (); \
325 YY_CURRENT_BUFFER_LVALUE = \
326 aag_create_buffer(aagin,YY_BUF_SIZE ); \
328 YY_CURRENT_BUFFER_LVALUE->aag_at_bol = at_bol; \
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->aag_at_bol)
346 #define aagtext_ptr aagtext
348 static aag_state_type aag_get_previous_state (
void );
349 static aag_state_type aag_try_NUL_trans (aag_state_type current_state );
350 static int aag_get_next_buffer (
void );
351 static void aag_fatal_error (
aagconst char msg[] );
356 #define YY_DO_BEFORE_ACTION \
357 (aagtext_ptr) = aag_bp; \
358 aagleng = (size_t) (aag_cp - aag_bp); \
359 (aag_hold_char) = *aag_cp; \
361 (aag_c_buf_p) = aag_cp;
363 #define YY_NUM_RULES 34
364 #define YY_END_OF_BUFFER 35
374 0, 0, 4, 4, 27, 27, 32, 32, 35, 33,
375 10, 2, 22, 9, 33, 33, 33, 21, 28, 1,
376 20, 20, 20, 20, 20, 20, 20, 8, 4, 5,
377 27, 2, 23, 27, 32, 31, 30, 29, 9, 19,
378 0, 21, 18, 21, 3, 7, 21, 21, 20, 20,
379 20, 20, 20, 20, 20, 20, 8, 4, 5, 5,
380 6, 27, 26, 24, 25, 32, 7, 21, 20, 20,
381 20, 20, 20, 20, 11, 20, 13, 20, 12, 20,
382 20, 20, 14, 20, 20, 20, 16, 20, 15, 20,
389 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
390 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
393 1, 6, 1, 1, 7, 8, 9, 10, 10, 10,
394 10, 10, 10, 10, 10, 10, 10, 1, 1, 11,
395 1, 12, 1, 13, 14, 15, 16, 17, 18, 19,
396 20, 21, 22, 19, 19, 19, 19, 23, 24, 25,
397 19, 26, 27, 28, 29, 19, 19, 19, 19, 19,
398 1, 30, 1, 1, 19, 1, 31, 32, 33, 34,
400 35, 19, 36, 37, 38, 19, 19, 19, 19, 39,
401 40, 41, 19, 42, 43, 44, 45, 19, 19, 19,
402 19, 19, 1, 1, 1, 1, 1, 19, 19, 19,
403 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
404 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
405 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
406 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
407 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
408 19, 19, 19, 19, 19, 19, 46, 19, 19, 19,
409 47, 19, 19, 19, 19, 19, 19, 19, 19, 19,
411 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
412 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
413 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
414 19, 19, 19, 19, 19, 19, 19, 19, 48, 19,
415 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
421 1, 1, 2, 3, 1, 4, 1, 5, 1, 6,
422 7, 7, 1, 6, 6, 6, 6, 6, 6, 6,
423 6, 6, 6, 6, 6, 6, 6, 6, 6, 3,
424 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
425 6, 6, 6, 6, 6, 6, 6, 6
430 0, 174, 46, 47, 51, 53, 48, 55, 170, 219,
431 219, 219, 219, 0, 61, 135, 55, 55, 219, 219,
432 0, 40, 53, 46, 50, 47, 98, 0, 0, 71,
433 0, 0, 219, 81, 0, 219, 219, 219, 0, 219,
434 132, 85, 219, 130, 219, 0, 129, 219, 0, 62,
435 66, 65, 72, 68, 82, 91, 0, 0, 94, 95,
436 219, 0, 219, 219, 219, 0, 0, 123, 73, 87,
437 82, 90, 90, 93, 0, 95, 0, 95, 0, 101,
438 93, 95, 0, 93, 110, 106, 0, 105, 0, 110,
439 0, 219, 147, 154, 161, 168, 171, 112, 177, 184,
446 92, 1, 93, 93, 94, 94, 95, 95, 92, 92,
447 92, 92, 92, 96, 92, 92, 92, 97, 92, 92,
448 98, 98, 98, 98, 98, 98, 98, 99, 100, 101,
449 102, 102, 92, 92, 103, 92, 92, 92, 96, 92,
450 92, 97, 92, 97, 92, 104, 97, 92, 98, 98,
451 98, 98, 98, 98, 98, 98, 99, 100, 101, 101,
452 92, 102, 92, 92, 92, 103, 104, 97, 98, 98,
453 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
454 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
455 98, 0, 92, 92, 92, 92, 92, 92, 92, 92,
462 10, 11, 12, 13, 14, 10, 15, 16, 17, 18,
463 19, 10, 20, 21, 21, 21, 22, 23, 21, 24,
464 21, 21, 25, 21, 21, 21, 26, 21, 21, 10,
465 21, 21, 21, 22, 23, 24, 21, 21, 25, 21,
466 21, 21, 26, 21, 21, 21, 21, 27, 12, 12,
467 36, 30, 30, 32, 33, 32, 33, 36, 37, 38,
468 45, 50, 47, 46, 42, 37, 38, 40, 41, 51,
469 42, 52, 43, 53, 54, 55, 60, 50, 71, 61,
470 34, 69, 34, 63, 64, 70, 51, 52, 72, 53,
471 54, 55, 47, 73, 42, 71, 74, 69, 76, 92,
473 60, 70, 92, 61, 77, 72, 78, 79, 82, 73,
474 65, 80, 81, 74, 76, 83, 84, 49, 85, 86,
475 87, 77, 78, 88, 79, 82, 89, 80, 81, 90,
476 91, 83, 68, 84, 85, 86, 87, 75, 68, 44,
477 88, 44, 89, 56, 44, 90, 91, 29, 29, 29,
478 29, 29, 29, 29, 31, 31, 31, 31, 31, 31,
479 31, 35, 35, 35, 35, 35, 35, 35, 39, 92,
480 39, 39, 39, 39, 39, 48, 48, 57, 28, 57,
481 57, 57, 57, 57, 58, 92, 58, 92, 58, 58,
482 58, 59, 92, 59, 59, 59, 59, 59, 62, 62,
484 92, 62, 62, 62, 62, 66, 92, 66, 66, 66,
485 66, 67, 92, 67, 67, 67, 67, 67, 9, 92,
486 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
487 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
488 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
489 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
490 92, 92, 92, 92, 92, 92, 92
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
498 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
499 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
500 7, 3, 4, 5, 5, 6, 6, 8, 7, 7,
501 17, 22, 18, 17, 18, 8, 8, 15, 15, 23,
502 15, 24, 15, 25, 26, 26, 30, 22, 52, 30,
503 5, 50, 6, 34, 34, 51, 23, 24, 53, 25,
504 26, 26, 42, 54, 42, 52, 55, 50, 69, 59,
506 60, 51, 59, 60, 70, 53, 71, 72, 76, 54,
507 34, 73, 74, 55, 69, 78, 80, 98, 81, 82,
508 84, 70, 71, 85, 72, 76, 86, 73, 74, 88,
509 90, 78, 68, 80, 81, 82, 84, 56, 47, 44,
510 85, 41, 86, 27, 16, 88, 90, 93, 93, 93,
511 93, 93, 93, 93, 94, 94, 94, 94, 94, 94,
512 94, 95, 95, 95, 95, 95, 95, 95, 96, 9,
513 96, 96, 96, 96, 96, 97, 97, 99, 2, 99,
514 99, 99, 99, 99, 100, 0, 100, 0, 100, 100,
515 100, 101, 0, 101, 101, 101, 101, 101, 102, 102,
517 0, 102, 102, 102, 102, 103, 0, 103, 103, 103,
518 103, 104, 0, 104, 104, 104, 104, 104, 92, 92,
519 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
520 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
521 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
522 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
523 92, 92, 92, 92, 92, 92, 92
526 static aag_state_type aag_last_accepting_state;
527 static char *aag_last_accepting_cpos;
530 int aag_flex_debug = 0;
535 #define REJECT reject_used_but_not_detected
536 #define aagmore() aagmore_used_but_not_detected
537 #define YY_MORE_ADJ 0
538 #define YY_RESTORE_YY_MORE_OFFSET
540 #line 1 "../../lib/cgraph/scan.l"
553 #line 17 "../../lib/cgraph/scan.l"
559 #define GRAPH_EOF_TOKEN '@'
561 static int line_num = 1;
562 static int html_nest = 0;
563 static char* InputFile;
566 static int graphType;
573 void agsetfile(
char* f) { InputFile = f; line_num = 1; }
583 #define YY_INPUT(buf,result,max_size) \
584 if ((result = Disc->io->afread(Ifile, buf, max_size)) < 0) \
585 YY_FATAL_ERROR( "input in flex scanner failed" )
589 static char *Sbuf,*Sptr,*Send;
590 static void beginstr(
void) {
591 if (Sbuf ==
NIL(
char*)) {
592 Sbuf = malloc(BUFSIZ);
593 Send = Sbuf + BUFSIZ;
599 static void addstr(
char *src) {
601 if (Sptr > Sbuf) Sptr--;
603 do {c = *Sptr++ = *src++;}
while (c && (Sptr < Send));
605 long sz = Send - Sbuf;
606 long off = Sptr - Sbuf;
608 Sbuf = (
char*)realloc(Sbuf,sz);
615 static void endstr(
void) {
620 static void endstr_html(
void) {
626 storeFileName (
char* fname,
int len)
632 if (cnt) buf = (
char*)realloc (buf, len+1);
633 else buf = (
char*)malloc (len+1);
644 static void ppDirective (
void)
648 char*
s = aagtext + 1;
650 if (strncmp(s,
"line", 4) == 0) s += 4;
651 r = sscanf(s,
"%d %1[\"]%n", &lineno, buf, &cnt);
653 line_num = lineno - 1;
657 while (*e && (*e !=
'"')) e++;
658 if (e != p && *e ==
'"') {
660 storeFileName (p, e-p);
670 static int twoDots(
void)
673 for (i =
aagleng-2; i >= 0; i--) {
674 if (((
unsigned char)aagtext[i]) ==
'.')
685 static int chkNum(
void) {
686 unsigned char c = (
unsigned char)aagtext[
aagleng-1];
687 if ((!isdigit(c) && (c !=
'.')) || ((c ==
'.') && twoDots())) {
688 unsigned char xbuf[BUFSIZ];
700 agxbput(&xb,
"syntax ambiguity - badly delimited number '");
702 sprintf(buf,
"' in line %d of ", line_num);
705 agxbput(&xb,
" splits into two tokens\n");
724 #line 725 "lex.aag.c"
731 #ifndef YY_NO_UNISTD_H
739 #ifndef YY_EXTRA_TYPE
740 #define YY_EXTRA_TYPE void *
743 static int aag_init_globals (
void );
778 #ifndef YY_SKIP_YYWRAP
780 extern "C" int aagwrap (
void );
786 static void aagunput (
int c,
char *buf_ptr );
789 static void aag_flex_strncpy (
char *,
aagconst char *,
int );
792 #ifdef YY_NEED_STRLEN
793 static int aag_flex_strlen (
aagconst char * );
799 static int aaginput (
void );
801 static int input (
void );
807 #ifndef YY_READ_BUF_SIZE
808 #define YY_READ_BUF_SIZE 8192
816 #define ECHO do { if (fwrite( aagtext, aagleng, 1, aagout )) {} } while (0)
823 #define YY_INPUT(buf,result,max_size) \
824 if ( YY_CURRENT_BUFFER_LVALUE->aag_is_interactive ) \
828 for ( n = 0; n < max_size && \
829 (c = getc( aagin )) != EOF && c != '\n'; ++n ) \
832 buf[n++] = (char) c; \
833 if ( c == EOF && ferror( aagin ) ) \
834 YY_FATAL_ERROR( "input in flex scanner failed" ); \
840 while ( (result = fread(buf, 1, max_size, aagin))==0 && ferror(aagin)) \
842 if( errno != EINTR) \
844 YY_FATAL_ERROR( "input in flex scanner failed" ); \
860 #define aagterminate() return YY_NULL
864 #ifndef YY_START_STACK_INCR
865 #define YY_START_STACK_INCR 25
869 #ifndef YY_FATAL_ERROR
870 #define YY_FATAL_ERROR(msg) aag_fatal_error( msg )
879 #define YY_DECL_IS_OURS 1
883 #define YY_DECL int aaglex (void)
889 #ifndef YY_USER_ACTION
890 #define YY_USER_ACTION
895 #define YY_BREAK break;
898 #define YY_RULE_SETUP \
900 YY_CURRENT_BUFFER_LVALUE->aag_at_bol = \
901 (aagtext[aagleng - 1] == '\n'); \
908 register aag_state_type aag_current_state;
912 #line 194 "../../lib/cgraph/scan.l"
914 #line 915 "lex.aag.c"
934 aagensure_buffer_stack ();
939 aag_load_buffer_state( );
944 aag_cp = (aag_c_buf_p);
947 *aag_cp = (aag_hold_char);
954 aag_current_state = (aag_start);
960 if ( aag_accept[aag_current_state] )
962 (aag_last_accepting_state) = aag_current_state;
963 (aag_last_accepting_cpos) = aag_cp;
965 while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state )
967 aag_current_state = (
int) aag_def[aag_current_state];
968 if ( aag_current_state >= 93 )
969 aag_c = aag_meta[(
unsigned int) aag_c];
971 aag_current_state = aag_nxt[aag_base[aag_current_state] + (
unsigned int) aag_c];
974 while ( aag_base[aag_current_state] != 219 );
977 aag_act = aag_accept[aag_current_state];
980 aag_cp = (aag_last_accepting_cpos);
981 aag_current_state = (aag_last_accepting_state);
982 aag_act = aag_accept[aag_current_state];
993 *aag_cp = (aag_hold_char);
994 aag_cp = (aag_last_accepting_cpos);
995 aag_current_state = (aag_last_accepting_state);
996 goto aag_find_action;
1000 #line 195 "../../lib/cgraph/scan.l"
1006 #line 196 "../../lib/cgraph/scan.l"
1011 #line 197 "../../lib/cgraph/scan.l"
1016 #line 198 "../../lib/cgraph/scan.l"
1021 #line 199 "../../lib/cgraph/scan.l"
1026 #line 200 "../../lib/cgraph/scan.l"
1031 #line 201 "../../lib/cgraph/scan.l"
1036 #line 202 "../../lib/cgraph/scan.l"
1041 #line 203 "../../lib/cgraph/scan.l"
1046 #line 204 "../../lib/cgraph/scan.l"
1051 #line 205 "../../lib/cgraph/scan.l"
1056 #line 206 "../../lib/cgraph/scan.l"
1061 #line 207 "../../lib/cgraph/scan.l"
1066 #line 208 "../../lib/cgraph/scan.l"
1071 #line 209 "../../lib/cgraph/scan.l"
1076 #line 210 "../../lib/cgraph/scan.l"
1081 #line 211 "../../lib/cgraph/scan.l"
1086 #line 212 "../../lib/cgraph/scan.l"
1091 #line 213 "../../lib/cgraph/scan.l"
1096 #line 214 "../../lib/cgraph/scan.l"
1101 #line 215 "../../lib/cgraph/scan.l"
1106 #line 216 "../../lib/cgraph/scan.l"
1111 #line 217 "../../lib/cgraph/scan.l"
1116 #line 218 "../../lib/cgraph/scan.l"
1121 #line 219 "../../lib/cgraph/scan.l"
1127 #line 220 "../../lib/cgraph/scan.l"
1133 #line 221 "../../lib/cgraph/scan.l"
1138 #line 222 "../../lib/cgraph/scan.l"
1143 #line 223 "../../lib/cgraph/scan.l"
1144 html_nest--;
if (html_nest) addstr(aagtext);
else {
BEGIN(
INITIAL); endstr_html();
return (
T_qatom);}
1148 #line 224 "../../lib/cgraph/scan.l"
1149 html_nest++; addstr(aagtext);
1154 #line 225 "../../lib/cgraph/scan.l"
1155 addstr(aagtext); line_num++;
1159 #line 226 "../../lib/cgraph/scan.l"
1164 #line 227 "../../lib/cgraph/scan.l"
1165 return (aagtext[0]);
1169 #line 228 "../../lib/cgraph/scan.l"
1172 #line 1173 "lex.aag.c"
1182 int aag_amount_of_matched_text = (
int) (aag_cp - (
aagtext_ptr)) - 1;
1185 *aag_cp = (aag_hold_char);
1213 aag_state_type aag_next_state;
1215 (aag_c_buf_p) = (
aagtext_ptr) + aag_amount_of_matched_text;
1217 aag_current_state = aag_get_previous_state( );
1228 aag_next_state = aag_try_NUL_trans( aag_current_state );
1232 if ( aag_next_state )
1235 aag_cp = ++(aag_c_buf_p);
1236 aag_current_state = aag_next_state;
1242 aag_cp = (aag_c_buf_p);
1243 goto aag_find_action;
1247 else switch ( aag_get_next_buffer( ) )
1251 (aag_did_buffer_switch_on_eof) = 0;
1272 if ( ! (aag_did_buffer_switch_on_eof) )
1282 aag_current_state = aag_get_previous_state( );
1284 aag_cp = (aag_c_buf_p);
1292 aag_current_state = aag_get_previous_state( );
1294 aag_cp = (aag_c_buf_p);
1296 goto aag_find_action;
1303 "fatal flex scanner internal error--no action found" );
1315 static int aag_get_next_buffer (
void)
1319 register int number_to_move, i;
1324 "fatal flex scanner internal error--end of buffer missed" );
1350 for ( i = 0; i < number_to_move; ++i )
1351 *(dest++) = *(source++);
1364 while ( num_to_read <= 0 )
1370 int aag_c_buf_p_offset =
1377 if ( new_size <= 0 )
1392 "fatal error - scanner input buffer overflow" );
1394 (aag_c_buf_p) = &b->
aag_ch_buf[aag_c_buf_p_offset];
1406 (aag_n_chars), num_to_read );
1411 if ( (aag_n_chars) == 0 )
1432 aag_size_t new_size = (aag_n_chars) + number_to_move + ((aag_n_chars) >> 1);
1435 YY_FATAL_ERROR(
"out of dynamic memory in aag_get_next_buffer()" );
1438 (aag_n_chars) += number_to_move;
1449 static aag_state_type aag_get_previous_state (
void)
1451 register aag_state_type aag_current_state;
1454 aag_current_state = (aag_start);
1460 if ( aag_accept[aag_current_state] )
1462 (aag_last_accepting_state) = aag_current_state;
1463 (aag_last_accepting_cpos) = aag_cp;
1465 while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state )
1467 aag_current_state = (
int) aag_def[aag_current_state];
1468 if ( aag_current_state >= 93 )
1469 aag_c = aag_meta[(
unsigned int) aag_c];
1471 aag_current_state = aag_nxt[aag_base[aag_current_state] + (
unsigned int) aag_c];
1474 return aag_current_state;
1482 static aag_state_type aag_try_NUL_trans (aag_state_type aag_current_state )
1484 register int aag_is_jam;
1485 register char *aag_cp = (aag_c_buf_p);
1488 if ( aag_accept[aag_current_state] )
1490 (aag_last_accepting_state) = aag_current_state;
1491 (aag_last_accepting_cpos) = aag_cp;
1493 while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state )
1495 aag_current_state = (
int) aag_def[aag_current_state];
1496 if ( aag_current_state >= 93 )
1497 aag_c = aag_meta[(
unsigned int) aag_c];
1499 aag_current_state = aag_nxt[aag_base[aag_current_state] + (
unsigned int) aag_c];
1500 aag_is_jam = (aag_current_state == 92);
1502 return aag_is_jam ? 0 : aag_current_state;
1505 static void aagunput (
int c,
register char * aag_bp )
1509 aag_cp = (aag_c_buf_p);
1512 *aag_cp = (aag_hold_char);
1514 if ( aag_cp < YY_CURRENT_BUFFER_LVALUE->aag_ch_buf + 2 )
1517 register aag_size_t number_to_move = (aag_n_chars) + 2;
1520 register char *source =
1524 *--dest = *--source;
1526 aag_cp += (
int) (dest - source);
1527 aag_bp += (
int) (dest - source);
1531 if ( aag_cp < YY_CURRENT_BUFFER_LVALUE->aag_ch_buf + 2 )
1535 *--aag_cp = (char) c;
1538 (aag_hold_char) = *aag_cp;
1539 (aag_c_buf_p) = aag_cp;
1544 static int aaginput (
void)
1546 static int input (
void)
1552 *(aag_c_buf_p) = (aag_hold_char);
1562 *(aag_c_buf_p) =
'\0';
1569 switch ( aag_get_next_buffer( ) )
1592 if ( ! (aag_did_buffer_switch_on_eof) )
1608 c = *(
unsigned char *) (aag_c_buf_p);
1609 *(aag_c_buf_p) =
'\0';
1610 (aag_hold_char) = *++(aag_c_buf_p);
1627 aagensure_buffer_stack ();
1633 aag_load_buffer_state( );
1648 aagensure_buffer_stack ();
1655 *(aag_c_buf_p) = (aag_hold_char);
1661 aag_load_buffer_state( );
1668 (aag_did_buffer_switch_on_eof) = 1;
1671 static void aag_load_buffer_state (
void)
1676 (aag_hold_char) = *(aag_c_buf_p);
1691 YY_FATAL_ERROR(
"out of dynamic memory in aag_create_buffer()" );
1700 YY_FATAL_ERROR(
"out of dynamic memory in aag_create_buffer()" );
1704 aag_init_buffer(b,file );
1732 static void aag_init_buffer (YY_BUFFER_STATE b, FILE * file )
1780 aag_load_buffer_state( );
1791 if (new_buffer ==
NULL)
1794 aagensure_buffer_stack();
1800 *(aag_c_buf_p) = (aag_hold_char);
1807 (aag_buffer_stack_top)++;
1811 aag_load_buffer_state( );
1812 (aag_did_buffer_switch_on_eof) = 1;
1826 if ((aag_buffer_stack_top) > 0)
1827 --(aag_buffer_stack_top);
1830 aag_load_buffer_state( );
1831 (aag_did_buffer_switch_on_eof) = 1;
1838 static void aagensure_buffer_stack (
void)
1842 if (!(aag_buffer_stack)) {
1852 if ( ! (aag_buffer_stack) )
1853 YY_FATAL_ERROR(
"out of dynamic memory in aagensure_buffer_stack()" );
1855 memset((aag_buffer_stack), 0, num_to_alloc *
sizeof(
struct aag_buffer_state*));
1857 (aag_buffer_stack_max) = num_to_alloc;
1858 (aag_buffer_stack_top) = 0;
1862 if ((aag_buffer_stack_top) >= ((aag_buffer_stack_max)) - 1){
1867 num_to_alloc = (aag_buffer_stack_max) + grow_size;
1869 ((aag_buffer_stack),
1872 if ( ! (aag_buffer_stack) )
1873 YY_FATAL_ERROR(
"out of dynamic memory in aagensure_buffer_stack()" );
1876 memset((aag_buffer_stack) + (aag_buffer_stack_max), 0, grow_size *
sizeof(
struct aag_buffer_state*));
1877 (aag_buffer_stack_max) = num_to_alloc;
1945 n = _aagbytes_len + 2;
1950 for ( i = 0; i < _aagbytes_len; ++i )
1951 buf[i] = aagbytes[i];
1967 #ifndef YY_EXIT_FAILURE
1968 #define YY_EXIT_FAILURE 2
1971 static void aag_fatal_error (
aagconst char* msg )
1973 (void) fprintf( stderr,
"%s\n", msg );
1980 #define aagless(n) \
1984 int aagless_macro_arg = (n); \
1985 YY_LESS_LINENO(aagless_macro_arg);\
1986 aagtext[aagleng] = (aag_hold_char); \
1987 (aag_c_buf_p) = aagtext + aagless_macro_arg; \
1988 (aag_hold_char) = *(aag_c_buf_p); \
1989 *(aag_c_buf_p) = '\0'; \
1990 aagleng = aagless_macro_arg; \
2045 aaglineno = line_number;
2071 aag_flex_debug = bdebug ;
2074 static int aag_init_globals (
void)
2080 (aag_buffer_stack) = 0;
2081 (aag_buffer_stack_top) = 0;
2082 (aag_buffer_stack_max) = 0;
2083 (aag_c_buf_p) = (
char *) 0;
2115 (aag_buffer_stack) =
NULL;
2119 aag_init_globals( );
2129 static void aag_flex_strncpy (
char*
s1,
aagconst char * s2,
int n )
2132 for ( i = 0; i < n; ++i )
2137 #ifdef YY_NEED_STRLEN
2138 static int aag_flex_strlen (
aagconst char * s )
2141 for ( n = 0; s[n]; ++n )
2150 return (
void *) malloc( size );
2162 return (
void *) realloc( (
char *) ptr, size );
2167 free( (
char *) ptr );
2170 #define YYTABLES_NAME "aagtables"
2172 #line 228 "../../lib/cgraph/scan.l"
2178 unsigned char xbuf[BUFSIZ];
2188 sprintf(buf,
" in line %d", line_num);
2197 sprintf(buf,
" scanning a quoted string (missing endquote? longer than %d?)",
YY_BUF_SIZE);
2200 int len = strlen(Sbuf);
2201 agxbput (&xb,
"\nString starting:\"");
2208 sprintf(buf,
" scanning a HTML string (missing '>'? bad nesting? longer than %d?)",
YY_BUF_SIZE);
2211 int len = strlen(Sbuf);
2212 agxbput (&xb,
"\nString starting:<");
2219 sprintf(buf,
" scanning a /*...*/ comment (missing '*/? longer than %d?)",
YY_BUF_SIZE);
2233 #ifndef YY_CALL_ONLY_ARG
2234 # define YY_CALL_ONLY_ARG void
void aagpush_buffer_state(YY_BUFFER_STATE new_buffer)
void s1(graph_t *, node_t *)
#define YY_END_OF_BUFFER_CHAR
void aag_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#define YY_INPUT(buf, result, max_size)
CGRAPH_API void agsetfile(char *)
#define YY_FATAL_ERROR(msg)
size_t agxbput(agxbuf *xb, const char *s)
void aagset_debug(int debug_flag)
void aglexinit(Agdisc_t *disc, void *ifile)
#define YY_STATE_EOF(state)
YY_BUFFER_STATE aag_scan_string(aagconst char *aag_str)
int agerr(agerrlevel_t level, const char *fmt,...)
CGRAPH_API void agreadline(int)
void * aagrealloc(void *, aag_size_t)
CGRAPH_API char * agstrdup_html(Agraph_t *, char *)
#define EOB_ACT_END_OF_FILE
void aagset_lineno(int line_number)
#define YY_RESTORE_YY_MORE_OFFSET
void * aagalloc(aag_size_t)
void aagpop_buffer_state(void)
void aag_delete_buffer(YY_BUFFER_STATE b)
unsigned char flex_uint8_t
#define YY_DO_BEFORE_ACTION
#define EOB_ACT_CONTINUE_SCAN
aag_size_t aagget_leng(void)
struct aag_buffer_state * YY_BUFFER_STATE
CGRAPH_API char * agstrdup(Agraph_t *, char *)
EXTERN Agraph_t * Ag_G_global
#define EOB_ACT_LAST_MATCH
void agxbinit(agxbuf *xb, unsigned int hint, unsigned char *init)
void aag_flush_buffer(YY_BUFFER_STATE b)
void aagset_in(FILE *in_str)
YY_BUFFER_STATE aag_scan_bytes(aagconst char *bytes, aag_size_t len)
unsigned short int flex_uint16_t
#define YY_CURRENT_BUFFER
if(aagss+aagstacksize-1<=aagssp)
YY_EXTRA_TYPE aagget_extra(void)
void aagset_extra(YY_EXTRA_TYPE user_defined)
#define YY_CURRENT_BUFFER_LVALUE
void aagrestart(FILE *input_file)
void aagset_out(FILE *out_str)
YY_BUFFER_STATE aag_create_buffer(FILE *file, int size)
void agxbfree(agxbuf *xb)
YY_BUFFER_STATE aag_scan_buffer(char *base, aag_size_t size)
unsigned int flex_uint32_t
#define YY_BUFFER_EOF_PENDING