Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
scan.c
Go to the documentation of this file.
1#line 2 "scan.c"
2
3#line 4 "scan.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define yy_create_buffer aag_create_buffer
10#define yy_delete_buffer aag_delete_buffer
11#define yy_scan_buffer aag_scan_buffer
12#define yy_scan_string aag_scan_string
13#define yy_scan_bytes aag_scan_bytes
14#define yy_init_buffer aag_init_buffer
15#define yy_flush_buffer aag_flush_buffer
16#define yy_load_buffer_state aag_load_buffer_state
17#define yy_switch_to_buffer aag_switch_to_buffer
18#define yypush_buffer_state aagpush_buffer_state
19#define yypop_buffer_state aagpop_buffer_state
20#define yyensure_buffer_stack aagensure_buffer_stack
21#define yy_flex_debug aag_flex_debug
22#define yyin aagin
23#define yyleng aagleng
24#define yylex aaglex
25#define yylineno aaglineno
26#define yyout aagout
27#define yyrestart aagrestart
28#define yytext aagtext
29#define yywrap aagwrap
30#define yyalloc aagalloc
31#define yyrealloc aagrealloc
32#define yyfree aagfree
33
34#define FLEX_SCANNER
35#define YY_FLEX_MAJOR_VERSION 2
36#define YY_FLEX_MINOR_VERSION 6
37#define YY_FLEX_SUBMINOR_VERSION 4
38#if YY_FLEX_SUBMINOR_VERSION > 0
39#define FLEX_BETA
40#endif
41
42#ifdef yy_create_buffer
43#define aag_create_buffer_ALREADY_DEFINED
44#else
45#define yy_create_buffer aag_create_buffer
46#endif
47
48#ifdef yy_delete_buffer
49#define aag_delete_buffer_ALREADY_DEFINED
50#else
51#define yy_delete_buffer aag_delete_buffer
52#endif
53
54#ifdef yy_scan_buffer
55#define aag_scan_buffer_ALREADY_DEFINED
56#else
57#define yy_scan_buffer aag_scan_buffer
58#endif
59
60#ifdef yy_scan_string
61#define aag_scan_string_ALREADY_DEFINED
62#else
63#define yy_scan_string aag_scan_string
64#endif
65
66#ifdef yy_scan_bytes
67#define aag_scan_bytes_ALREADY_DEFINED
68#else
69#define yy_scan_bytes aag_scan_bytes
70#endif
71
72#ifdef yy_init_buffer
73#define aag_init_buffer_ALREADY_DEFINED
74#else
75#define yy_init_buffer aag_init_buffer
76#endif
77
78#ifdef yy_flush_buffer
79#define aag_flush_buffer_ALREADY_DEFINED
80#else
81#define yy_flush_buffer aag_flush_buffer
82#endif
83
84#ifdef yy_load_buffer_state
85#define aag_load_buffer_state_ALREADY_DEFINED
86#else
87#define yy_load_buffer_state aag_load_buffer_state
88#endif
89
90#ifdef yy_switch_to_buffer
91#define aag_switch_to_buffer_ALREADY_DEFINED
92#else
93#define yy_switch_to_buffer aag_switch_to_buffer
94#endif
95
96#ifdef yypush_buffer_state
97#define aagpush_buffer_state_ALREADY_DEFINED
98#else
99#define yypush_buffer_state aagpush_buffer_state
100#endif
101
102#ifdef yypop_buffer_state
103#define aagpop_buffer_state_ALREADY_DEFINED
104#else
105#define yypop_buffer_state aagpop_buffer_state
106#endif
107
108#ifdef yyensure_buffer_stack
109#define aagensure_buffer_stack_ALREADY_DEFINED
110#else
111#define yyensure_buffer_stack aagensure_buffer_stack
112#endif
113
114#ifdef yylex
115#define aaglex_ALREADY_DEFINED
116#else
117#define yylex aaglex
118#endif
119
120#ifdef yyrestart
121#define aagrestart_ALREADY_DEFINED
122#else
123#define yyrestart aagrestart
124#endif
125
126#ifdef yylex_init
127#define aaglex_init_ALREADY_DEFINED
128#else
129#define yylex_init aaglex_init
130#endif
131
132#ifdef yylex_init_extra
133#define aaglex_init_extra_ALREADY_DEFINED
134#else
135#define yylex_init_extra aaglex_init_extra
136#endif
137
138#ifdef yylex_destroy
139#define aaglex_destroy_ALREADY_DEFINED
140#else
141#define yylex_destroy aaglex_destroy
142#endif
143
144#ifdef yyget_debug
145#define aagget_debug_ALREADY_DEFINED
146#else
147#define yyget_debug aagget_debug
148#endif
149
150#ifdef yyset_debug
151#define aagset_debug_ALREADY_DEFINED
152#else
153#define yyset_debug aagset_debug
154#endif
155
156#ifdef yyget_extra
157#define aagget_extra_ALREADY_DEFINED
158#else
159#define yyget_extra aagget_extra
160#endif
161
162#ifdef yyset_extra
163#define aagset_extra_ALREADY_DEFINED
164#else
165#define yyset_extra aagset_extra
166#endif
167
168#ifdef yyget_in
169#define aagget_in_ALREADY_DEFINED
170#else
171#define yyget_in aagget_in
172#endif
173
174#ifdef yyset_in
175#define aagset_in_ALREADY_DEFINED
176#else
177#define yyset_in aagset_in
178#endif
179
180#ifdef yyget_out
181#define aagget_out_ALREADY_DEFINED
182#else
183#define yyget_out aagget_out
184#endif
185
186#ifdef yyset_out
187#define aagset_out_ALREADY_DEFINED
188#else
189#define yyset_out aagset_out
190#endif
191
192#ifdef yyget_leng
193#define aagget_leng_ALREADY_DEFINED
194#else
195#define yyget_leng aagget_leng
196#endif
197
198#ifdef yyget_text
199#define aagget_text_ALREADY_DEFINED
200#else
201#define yyget_text aagget_text
202#endif
203
204#ifdef yyget_lineno
205#define aagget_lineno_ALREADY_DEFINED
206#else
207#define yyget_lineno aagget_lineno
208#endif
209
210#ifdef yyset_lineno
211#define aagset_lineno_ALREADY_DEFINED
212#else
213#define yyset_lineno aagset_lineno
214#endif
215
216#ifdef yywrap
217#define aagwrap_ALREADY_DEFINED
218#else
219#define yywrap aagwrap
220#endif
221
222#ifdef yyalloc
223#define aagalloc_ALREADY_DEFINED
224#else
225#define yyalloc aagalloc
226#endif
227
228#ifdef yyrealloc
229#define aagrealloc_ALREADY_DEFINED
230#else
231#define yyrealloc aagrealloc
232#endif
233
234#ifdef yyfree
235#define aagfree_ALREADY_DEFINED
236#else
237#define yyfree aagfree
238#endif
239
240#ifdef yytext
241#define aagtext_ALREADY_DEFINED
242#else
243#define yytext aagtext
244#endif
245
246#ifdef yyleng
247#define aagleng_ALREADY_DEFINED
248#else
249#define yyleng aagleng
250#endif
251
252#ifdef yyin
253#define aagin_ALREADY_DEFINED
254#else
255#define yyin aagin
256#endif
257
258#ifdef yyout
259#define aagout_ALREADY_DEFINED
260#else
261#define yyout aagout
262#endif
263
264#ifdef yy_flex_debug
265#define aag_flex_debug_ALREADY_DEFINED
266#else
267#define yy_flex_debug aag_flex_debug
268#endif
269
270#ifdef yylineno
271#define aaglineno_ALREADY_DEFINED
272#else
273#define yylineno aaglineno
274#endif
275
276/* First, we deal with platform-specific or compiler-specific issues. */
277
278/* begin standard C headers. */
279#include <stdio.h>
280#include <string.h>
281#include <errno.h>
282#include <stdlib.h>
283
284/* end standard C headers. */
285
286/* flex integer type definitions */
287
288#ifndef FLEXINT_H
289#define FLEXINT_H
290
291/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
292
293#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
294
295/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
296 * if you want the limit (max/min) macros for int types.
297 */
298#ifndef __STDC_LIMIT_MACROS
299#define __STDC_LIMIT_MACROS 1
300#endif
301
302#include <inttypes.h>
303typedef int8_t flex_int8_t;
304typedef uint8_t flex_uint8_t;
305typedef int16_t flex_int16_t;
306typedef uint16_t flex_uint16_t;
307typedef int32_t flex_int32_t;
308typedef uint32_t flex_uint32_t;
309#else
310typedef signed char flex_int8_t;
311typedef short int flex_int16_t;
312typedef int flex_int32_t;
313typedef unsigned char flex_uint8_t;
314typedef unsigned short int flex_uint16_t;
315typedef unsigned int flex_uint32_t;
316
317/* Limits of integral types. */
318#ifndef INT8_MIN
319#define INT8_MIN (-128)
320#endif
321#ifndef INT16_MIN
322#define INT16_MIN (-32767-1)
323#endif
324#ifndef INT32_MIN
325#define INT32_MIN (-2147483647-1)
326#endif
327#ifndef INT8_MAX
328#define INT8_MAX (127)
329#endif
330#ifndef INT16_MAX
331#define INT16_MAX (32767)
332#endif
333#ifndef INT32_MAX
334#define INT32_MAX (2147483647)
335#endif
336#ifndef UINT8_MAX
337#define UINT8_MAX (255U)
338#endif
339#ifndef UINT16_MAX
340#define UINT16_MAX (65535U)
341#endif
342#ifndef UINT32_MAX
343#define UINT32_MAX (4294967295U)
344#endif
345
346#ifndef SIZE_MAX
347#define SIZE_MAX (~(size_t)0)
348#endif
349
350#endif /* ! C99 */
351
352#endif /* ! FLEXINT_H */
353
354/* begin standard C++ headers. */
355
356/* TODO: this is always defined, so inline it */
357#define yyconst const
358
359#if defined(__GNUC__) && __GNUC__ >= 3
360#define yynoreturn __attribute__((__noreturn__))
361#else
362#define yynoreturn
363#endif
364
365/* Returned upon end-of-file. */
366#define YY_NULL 0
367
368/* Promotes a possibly negative, possibly signed char to an
369 * integer in range [0..255] for use as an array index.
370 */
371#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
372
373/* Enter a start condition. This macro really ought to take a parameter,
374 * but we do it the disgusting crufty way forced on us by the ()-less
375 * definition of BEGIN.
376 */
377#define BEGIN (yy_start) = 1 + 2 *
378/* Translate the current start state into a value that can be later handed
379 * to BEGIN to return to the state. The YYSTATE alias is for lex
380 * compatibility.
381 */
382#define YY_START (((yy_start) - 1) / 2)
383#define YYSTATE YY_START
384/* Action number for EOF rule of a given start state. */
385#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
386/* Special action meaning "start processing a new file". */
387#define YY_NEW_FILE yyrestart( yyin )
388#define YY_END_OF_BUFFER_CHAR 0
389
390/* Size of default input buffer. */
391#ifndef YY_BUF_SIZE
392#ifdef __ia64__
393/* On IA-64, the buffer size is 16k, not 8k.
394 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
395 * Ditto for the __ia64__ case accordingly.
396 */
397#define YY_BUF_SIZE 32768
398#else
399#define YY_BUF_SIZE 16384
400#endif /* __ia64__ */
401#endif
402
403/* The state buf must be large enough to hold one state per character in the main buffer.
404 */
405#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
406
407#ifndef YY_TYPEDEF_YY_BUFFER_STATE
408#define YY_TYPEDEF_YY_BUFFER_STATE
410#endif
411
412#ifndef YY_TYPEDEF_YY_SIZE_T
413#define YY_TYPEDEF_YY_SIZE_T
414typedef size_t yy_size_t;
415#endif
416
417extern int yyleng;
418
419extern FILE *yyin, *yyout;
420
421#define EOB_ACT_CONTINUE_SCAN 0
422#define EOB_ACT_END_OF_FILE 1
423#define EOB_ACT_LAST_MATCH 2
424
425 #define YY_LESS_LINENO(n)
426 #define YY_LINENO_REWIND_TO(ptr)
427
428/* Return all but the first "n" matched characters back to the input stream. */
429#define yyless(n) \
430 do \
431 { \
432 /* Undo effects of setting up yytext. */ \
433 int yyless_macro_arg = (n); \
434 YY_LESS_LINENO(yyless_macro_arg);\
435 *yy_cp = (yy_hold_char); \
436 YY_RESTORE_YY_MORE_OFFSET \
437 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
438 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
439 } \
440 while ( 0 )
441#define unput(c) yyunput( c, (yytext_ptr) )
442
443#ifndef YY_STRUCT_YY_BUFFER_STATE
444#define YY_STRUCT_YY_BUFFER_STATE
445struct yy_buffer_state
446 {
447 FILE *yy_input_file;
448
449 char *yy_ch_buf; /* input buffer */
450 char *yy_buf_pos; /* current position in input buffer */
451
452 /* Size of input buffer in bytes, not including room for EOB
453 * characters.
454 */
455 int yy_buf_size;
456
457 /* Number of characters read into yy_ch_buf, not including EOB
458 * characters.
459 */
460 int yy_n_chars;
461
462 /* Whether we "own" the buffer - i.e., we know we created it,
463 * and can realloc() it to grow it, and should free() it to
464 * delete it.
465 */
467
468 /* Whether this is an "interactive" input source; if so, and
469 * if we're using stdio for input, then we want to use getc()
470 * instead of fread(), to make sure we stop fetching input after
471 * each newline.
472 */
474
475 /* Whether we're considered to be at the beginning of a line.
476 * If so, '^' rules will be active on the next match, otherwise
477 * not.
478 */
479 int yy_at_bol;
480
481 int yy_bs_lineno;
482 int yy_bs_column;
484 /* Whether to try to fill the input buffer when we reach the
485 * end of it.
486 */
487 int yy_fill_buffer;
488
490
491#define YY_BUFFER_NEW 0
492#define YY_BUFFER_NORMAL 1
493 /* When an EOF's been seen but there's still some text to process
494 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
495 * shouldn't try reading from the input source any more. We might
496 * still have a bunch of tokens to match, though, because of
497 * possible backing-up.
498 *
499 * When we actually see the EOF, we change the status to "new"
500 * (via yyrestart()), so that the user can continue scanning by
501 * just pointing yyin at a new input file.
502 */
503#define YY_BUFFER_EOF_PENDING 2
504
505 };
506#endif /* !YY_STRUCT_YY_BUFFER_STATE */
507
508/* Stack of input buffers. */
509static size_t yy_buffer_stack_top = 0;
510static size_t yy_buffer_stack_max = 0;
513/* We provide macros for accessing buffer states in case in the
514 * future we want to put the buffer states in a more general
515 * "scanner state".
516 *
517 * Returns the top of the stack, or NULL.
518 */
519#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
520 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
521 : NULL)
522/* Same as previous macro, but useful when we know that the buffer stack is not
523 * NULL or when we need an lvalue. For internal use only.
524 */
525#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
526
527/* yy_hold_char holds the character lost when yytext is formed. */
528static char yy_hold_char;
529static int yy_n_chars; /* number of characters read into yy_ch_buf */
531
532/* Points to current character in buffer. */
533static char *yy_c_buf_p = NULL;
534static int yy_init = 0; /* whether we need to initialize */
535static int yy_start = 0; /* start state number */
536
537/* Flag which is used to allow yywrap()'s to do buffer switches
538 * instead of setting up a fresh yyin. A bit of a hack ...
539 */
541
542void yyrestart ( FILE *input_file );
544YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
548void yypop_buffer_state ( void );
549
550static void yyensure_buffer_stack ( void );
551static void yy_load_buffer_state ( void );
552static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
553#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
554
556YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
557YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
558
560void *yyrealloc ( void *, yy_size_t );
561void yyfree ( void * );
562
563#define yy_new_buffer yy_create_buffer
564#define yy_set_interactive(is_interactive) \
565 { \
566 if ( ! YY_CURRENT_BUFFER ){ \
567 yyensure_buffer_stack (); \
568 YY_CURRENT_BUFFER_LVALUE = \
569 yy_create_buffer( yyin, YY_BUF_SIZE ); \
570 } \
571 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
572 }
573#define yy_set_bol(at_bol) \
574 { \
575 if ( ! YY_CURRENT_BUFFER ){\
576 yyensure_buffer_stack (); \
577 YY_CURRENT_BUFFER_LVALUE = \
578 yy_create_buffer( yyin, YY_BUF_SIZE ); \
579 } \
580 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
581 }
582#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
583
584/* Begin user sect3 */
586
587FILE *yyin = NULL, *yyout = NULL;
588
589typedef int yy_state_type;
590
591extern int yylineno;
592int yylineno = 1;
593
594extern char *yytext;
595#ifdef yytext_ptr
596#undef yytext_ptr
597#endif
598#define yytext_ptr yytext
599
602static int yy_get_next_buffer ( void );
603static void yynoreturn yy_fatal_error ( const char* msg );
604
605/* Done after the current pattern has been matched and before the
606 * corresponding action - sets up yytext.
607 */
608#define YY_DO_BEFORE_ACTION \
609 (yytext_ptr) = yy_bp; \
610 yyleng = (int) (yy_cp - yy_bp); \
611 (yy_hold_char) = *yy_cp; \
612 *yy_cp = '\0'; \
613 (yy_c_buf_p) = yy_cp;
614#define YY_NUM_RULES 35
615#define YY_END_OF_BUFFER 36
616/* This struct is not used in this scanner,
617 but its presence is necessary. */
618struct yy_trans_info
619 {
622 };
623static const flex_int16_t yy_accept[93] =
624 { 0,
625 0, 0, 4, 4, 28, 28, 33, 33, 36, 34,
626 10, 2, 22, 9, 34, 34, 34, 21, 29, 1,
627 20, 20, 20, 20, 20, 20, 20, 8, 4, 5,
628 28, 27, 23, 28, 33, 32, 31, 30, 9, 19,
629 0, 21, 18, 21, 3, 7, 21, 21, 20, 20,
630 20, 20, 20, 20, 20, 20, 8, 4, 5, 5,
631 6, 28, 26, 24, 25, 33, 7, 21, 20, 20,
632 20, 20, 20, 20, 11, 20, 13, 20, 12, 20,
633 20, 20, 14, 20, 20, 20, 16, 20, 15, 20,
634 17, 0
635
636 } ;
637
638static const YY_CHAR yy_ec[256] =
639 { 0,
640 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
641 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
642 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
643 1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
644 1, 6, 1, 1, 7, 8, 9, 10, 10, 10,
645 10, 10, 10, 10, 10, 10, 10, 1, 1, 11,
646 1, 12, 1, 13, 14, 15, 16, 17, 18, 19,
647 20, 21, 22, 19, 19, 19, 19, 23, 24, 25,
648 19, 26, 27, 28, 29, 19, 19, 19, 19, 19,
649 1, 30, 1, 1, 19, 1, 31, 32, 33, 34,
650
651 35, 19, 36, 37, 38, 19, 19, 19, 19, 39,
652 40, 41, 19, 42, 43, 44, 45, 19, 19, 19,
653 19, 19, 1, 1, 1, 1, 1, 19, 19, 19,
654 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
655 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
656 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
657 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
658 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
659 19, 19, 19, 19, 19, 19, 46, 19, 19, 19,
660 47, 19, 19, 19, 19, 19, 19, 19, 19, 19,
661
662 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
663 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
664 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
665 19, 19, 19, 19, 19, 19, 19, 19, 48, 19,
666 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
667 19, 19, 19, 19, 19
668 } ;
669
670static const YY_CHAR yy_meta[49] =
671 { 0,
672 1, 1, 2, 3, 1, 4, 1, 5, 1, 6,
673 7, 7, 1, 6, 6, 6, 6, 6, 6, 6,
674 6, 6, 6, 6, 6, 6, 6, 6, 6, 3,
675 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
676 6, 6, 6, 6, 6, 6, 6, 6
677 } ;
678
679static const flex_int16_t yy_base[105] =
680 { 0,
681 0, 174, 46, 47, 51, 53, 48, 55, 170, 219,
682 219, 219, 219, 0, 61, 135, 55, 55, 219, 219,
683 0, 40, 53, 46, 50, 47, 98, 0, 0, 71,
684 0, 219, 219, 81, 0, 219, 219, 219, 0, 219,
685 132, 85, 219, 130, 219, 0, 129, 219, 0, 62,
686 66, 65, 72, 68, 82, 91, 0, 0, 94, 95,
687 219, 0, 219, 219, 219, 0, 0, 123, 73, 87,
688 82, 90, 90, 93, 0, 95, 0, 95, 0, 101,
689 93, 95, 0, 93, 110, 106, 0, 105, 0, 110,
690 0, 219, 147, 154, 161, 168, 171, 112, 177, 184,
691
692 191, 198, 205, 211
693 } ;
694
695static const flex_int16_t yy_def[105] =
696 { 0,
697 92, 1, 93, 93, 94, 94, 95, 95, 92, 92,
698 92, 92, 92, 96, 92, 92, 92, 97, 92, 92,
699 98, 98, 98, 98, 98, 98, 98, 99, 100, 101,
700 102, 92, 92, 92, 103, 92, 92, 92, 96, 92,
701 92, 97, 92, 97, 92, 104, 97, 92, 98, 98,
702 98, 98, 98, 98, 98, 98, 99, 100, 101, 101,
703 92, 102, 92, 92, 92, 103, 104, 97, 98, 98,
704 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
705 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
706 98, 0, 92, 92, 92, 92, 92, 92, 92, 92,
707
708 92, 92, 92, 92
709 } ;
710
711static const flex_int16_t yy_nxt[268] =
712 { 0,
713 10, 11, 12, 13, 14, 10, 15, 16, 17, 18,
714 19, 10, 20, 21, 21, 21, 22, 23, 21, 24,
715 21, 21, 25, 21, 21, 21, 26, 21, 21, 10,
716 21, 21, 21, 22, 23, 24, 21, 21, 25, 21,
717 21, 21, 26, 21, 21, 21, 21, 27, 12, 12,
718 36, 30, 30, 32, 33, 32, 33, 36, 37, 38,
719 45, 50, 47, 46, 42, 37, 38, 40, 41, 51,
720 42, 52, 43, 53, 54, 55, 60, 50, 71, 61,
721 34, 69, 34, 63, 64, 70, 51, 52, 72, 53,
722 54, 55, 47, 73, 42, 71, 74, 69, 76, 92,
723
724 60, 70, 92, 61, 77, 72, 78, 79, 82, 73,
725 65, 80, 81, 74, 76, 83, 84, 49, 85, 86,
726 87, 77, 78, 88, 79, 82, 89, 80, 81, 90,
727 91, 83, 68, 84, 85, 86, 87, 75, 68, 44,
728 88, 44, 89, 56, 44, 90, 91, 29, 29, 29,
729 29, 29, 29, 29, 31, 31, 31, 31, 31, 31,
730 31, 35, 35, 35, 35, 35, 35, 35, 39, 92,
731 39, 39, 39, 39, 39, 48, 48, 57, 28, 57,
732 57, 57, 57, 57, 58, 92, 58, 92, 58, 58,
733 58, 59, 92, 59, 59, 59, 59, 59, 62, 92,
734
735 92, 62, 62, 62, 62, 66, 92, 66, 66, 66,
736 66, 67, 92, 67, 67, 67, 67, 67, 9, 92,
737 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
738 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
739 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
740 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
741 92, 92, 92, 92, 92, 92, 92
742 } ;
743
744static const flex_int16_t yy_chk[268] =
745 { 0,
746 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
747 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
748 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
749 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
750 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
751 7, 3, 4, 5, 5, 6, 6, 8, 7, 7,
752 17, 22, 18, 17, 18, 8, 8, 15, 15, 23,
753 15, 24, 15, 25, 26, 26, 30, 22, 52, 30,
754 5, 50, 6, 34, 34, 51, 23, 24, 53, 25,
755 26, 26, 42, 54, 42, 52, 55, 50, 69, 59,
756
757 60, 51, 59, 60, 70, 53, 71, 72, 76, 54,
758 34, 73, 74, 55, 69, 78, 80, 98, 81, 82,
759 84, 70, 71, 85, 72, 76, 86, 73, 74, 88,
760 90, 78, 68, 80, 81, 82, 84, 56, 47, 44,
761 85, 41, 86, 27, 16, 88, 90, 93, 93, 93,
762 93, 93, 93, 93, 94, 94, 94, 94, 94, 94,
763 94, 95, 95, 95, 95, 95, 95, 95, 96, 9,
764 96, 96, 96, 96, 96, 97, 97, 99, 2, 99,
765 99, 99, 99, 99, 100, 0, 100, 0, 100, 100,
766 100, 101, 0, 101, 101, 101, 101, 101, 102, 0,
767
768 0, 102, 102, 102, 102, 103, 0, 103, 103, 103,
769 103, 104, 0, 104, 104, 104, 104, 104, 92, 92,
770 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
771 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
772 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
773 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
774 92, 92, 92, 92, 92, 92, 92
775 } ;
776
779
780extern int yy_flex_debug;
782
783/* The intent behind this definition is that it'll catch
784 * any uses of REJECT which flex missed.
785 */
786#define REJECT reject_used_but_not_detected
787#define yymore() yymore_used_but_not_detected
788#define YY_MORE_ADJ 0
789#define YY_RESTORE_YY_MORE_OFFSET
790char *yytext;
791#line 1 "../../lib/cgraph/scan.l"
796/*************************************************************************
797 * Copyright (c) 2011 AT&T Intellectual Property
798 * All rights reserved. This program and the accompanying materials
799 * are made available under the terms of the Eclipse Public License v1.0
800 * which accompanies this distribution, and is available at
801 * https://www.eclipse.org/legal/epl-v10.html
802 *
803 * Contributors: Details at https://graphviz.org
804 *************************************************************************/
805/* requires flex (i.e. not lex) */
806#line 19 "../../lib/cgraph/scan.l"
807 /* By default, Flex emits a lexer using symbols prefixed with "yy". Graphviz
808 * contains multiple Flex-generated lexers, so we alter this prefix to avoid
809 * symbol clashes.
810 */
811 /* Avoid generating an unused input function. See
812 https://westes.github.io/flex/manual/Scanner-Options.html
813 */
814#define YY_NO_INPUT 1
815#include <assert.h>
816#include <grammar.h>
817#include <cgraph/cghdr.h>
818#include <cgraph/agxbuf.h>
819#include <cgraph/gv_ctype.h>
820#include <cgraph/startswith.h>
821#include <stdbool.h>
822#include <stddef.h>
823#include <string.h>
824// #define YY_BUF_SIZE 128000
825#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */
826 /* this is a workaround for linux flex */
827static int line_num = 1;
828static int html_nest = 0; /* nesting level for html strings */
829static const char* InputFile;
831static void *Ifile;
832static int graphType;
833
834 /* Reset line number */
835void agreadline(int n) { line_num = n; }
836
837 /* (Re)set file:
838 */
839void agsetfile(const char* f) { InputFile = f; line_num = 1; }
840
841/* There is a hole here, because switching channels
842 * requires pushing back whatever was previously read.
843 * There probably is a right way of doing this.
844 */
845void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile; graphType = 0;}
846
847/* By default, Flex calls isatty() to determine whether the input it is
848 * scanning is coming from the user typing or from a file. However, our input
849 * is being provided by Graphviz' I/O channel mechanism, which does not have a
850 * valid file descriptor that supports isatty().
851 */
852#define isatty(x) gv_isatty_suppression
854
855#ifndef YY_INPUT
856#define YY_INPUT(buf,result,max_size) \
857 if ((result = Disc->io->afread(Ifile, buf, max_size)) < 0) \
858 YY_FATAL_ERROR( "input in flex scanner failed" )
859#endif
860
861/* buffer for arbitrary length strings (longer than BUFSIZ) */
863
864static void beginstr(void) {
865 // nothing required, but we should not have pending string data
866 assert(agxblen(&Sbuf) == 0 &&
867 "pending string data that was not consumed (missing "
868 "endstr()/endhtmlstr()?)");
869}
870
871static void addstr(char *src) {
872 agxbput(&Sbuf, src);
873}
874
875static void endstr(void) {
877}
878
879static void endstr_html(void) {
881}
882
883static void storeFileName(char* fname, size_t len) {
884 static size_t cnt;
885 static char* buf;
886
887 if (len > cnt) {
888 buf = gv_realloc(buf, cnt + 1, len + 1);
889 cnt = len;
890 }
891 strcpy (buf, fname);
892 InputFile = buf;
893}
894
895/* ppDirective:
896 * Process a possible preprocessor line directive.
897 * aagtext = #.*
898 */
899static void ppDirective (void)
900{
901 int r, cnt, lineno;
902 char buf[2];
903 char* s = aagtext + 1; /* skip initial # */
904
905 if (startswith(s, "line")) s += strlen("line");
906 r = sscanf(s, "%d %1[\"]%n", &lineno, buf, &cnt);
907 if (r > 0) { /* got line number */
908 // ignore if line number was out of range
909 if (lineno <= 0) {
910 return;
911 }
912 line_num = lineno - 1;
913 if (r > 1) { /* saw quote */
914 char* p = s + cnt;
915 char* e = p;
916 while (*e && *e != '"') e++;
917 if (e != p && *e == '"') {
918 *e = '\0';
919 storeFileName(p, (size_t)(e - p));
920 }
921 }
922 }
923}
924
925/* twoDots:
926 * Return true if token has more than one '.';
927 * we know the last character is a '.'.
928 */
929static bool twoDots(void) {
930 const char *dot = strchr(aagtext, '.');
931 // was there a dot and was it not the last character?
932 return dot != NULL && dot != &aagtext[aagleng - 1];
933}
934
935/* chkNum:
936 * The regexp for NUMBER allows a terminating letter or '.'.
937 * This way we can catch a number immediately followed by a name
938 * or something like 123.456.78, and report this to the user.
939 */
940static int chkNum(void) {
941 char c = aagtext[aagleng - 1]; // last character
942 if ((!gv_isdigit(c) && c != '.') || (c == '.' && twoDots())) { // c is letter
943 const char* fname;
944
945 if (InputFile)
947 else
948 fname = "input";
949
950 agwarningf("syntax ambiguity - badly delimited number '%s' in line %d of "
951 "%s splits into two tokens\n", aagtext, line_num, fname);
952
953 return 1;
954 }
955 else return 0;
956}
957
958/* The LETTER class below consists of ascii letters, underscore, all non-ascii
959 * characters. This allows identifiers to have characters from any
960 * character set independent of locale. The downside is that, for certain
961 * character sets, non-letter and, in fact, undefined characters will be
962 * accepted. This is not likely and, from dot's stand, shouldn't do any
963 * harm. (Presumably undefined characters will be ignored in display.) And,
964 * it allows a greater wealth of names. */
965#line 966 "scan.c"
966
967#line 968 "scan.c"
968
969#define INITIAL 0
970#define comment 1
971#define qstring 2
972#define hstring 3
973
974#ifndef YY_NO_UNISTD_H
975/* Special case for "unistd.h", since it is non-ANSI. We include it way
976 * down here because we want the user's section 1 to have been scanned first.
977 * The user has a chance to override it with an option.
978 */
979#include <unistd.h>
980#endif
981
982#ifndef YY_EXTRA_TYPE
983#define YY_EXTRA_TYPE void *
984#endif
985
986static int yy_init_globals ( void );
987
988/* Accessor methods to globals.
989 These are made visible to non-reentrant scanners for convenience. */
990
991int yylex_destroy ( void );
992
993int yyget_debug ( void );
994
995void yyset_debug ( int debug_flag );
996
998
999void yyset_extra ( YY_EXTRA_TYPE user_defined );
1000
1001FILE *yyget_in ( void );
1002
1003void yyset_in ( FILE * _in_str );
1004
1005FILE *yyget_out ( void );
1006
1007void yyset_out ( FILE * _out_str );
1008
1009 int yyget_leng ( void );
1010
1011char *yyget_text ( void );
1012
1013int yyget_lineno ( void );
1014
1015void yyset_lineno ( int _line_number );
1016
1017/* Macros after this point can all be overridden by user definitions in
1018 * section 1.
1019 */
1020
1021#ifndef YY_SKIP_YYWRAP
1022#ifdef __cplusplus
1023extern "C" int yywrap ( void );
1024#else
1025extern int yywrap ( void );
1026#endif
1027#endif
1028
1029#ifndef YY_NO_UNPUT
1030
1031 static void yyunput ( int c, char *buf_ptr );
1032
1033#endif
1034
1035#ifndef yytext_ptr
1036static void yy_flex_strncpy ( char *, const char *, int );
1037#endif
1038
1039#ifdef YY_NEED_STRLEN
1040static int yy_flex_strlen ( const char * );
1041#endif
1042
1043#ifndef YY_NO_INPUT
1044#ifdef __cplusplus
1045static int yyinput ( void );
1046#else
1047static int input ( void );
1048#endif
1049
1050#endif
1051
1052/* Amount of stuff to slurp up with each read. */
1053#ifndef YY_READ_BUF_SIZE
1054#ifdef __ia64__
1055/* On IA-64, the buffer size is 16k, not 8k */
1056#define YY_READ_BUF_SIZE 16384
1057#else
1058#define YY_READ_BUF_SIZE 8192
1059#endif /* __ia64__ */
1060#endif
1061
1062/* Copy whatever the last rule matched to the standard output. */
1063#ifndef ECHO
1064/* This used to be an fputs(), but since the string might contain NUL's,
1065 * we now use fwrite().
1066 */
1067#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1068#endif
1069
1070/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1071 * is returned in "result".
1072 */
1073#ifndef YY_INPUT
1074#define YY_INPUT(buf,result,max_size) \
1075 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1076 { \
1077 int c = '*'; \
1078 int n; \
1079 for ( n = 0; n < max_size && \
1080 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1081 buf[n] = (char) c; \
1082 if ( c == '\n' ) \
1083 buf[n++] = (char) c; \
1084 if ( c == EOF && ferror( yyin ) ) \
1085 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1086 result = n; \
1087 } \
1088 else \
1089 { \
1090 errno=0; \
1091 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1092 { \
1093 if( errno != EINTR) \
1094 { \
1095 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1096 break; \
1097 } \
1098 errno=0; \
1099 clearerr(yyin); \
1100 } \
1101 }\
1102\
1103
1104#endif
1105
1106/* No semi-colon after return; correct usage is to write "yyterminate();" -
1107 * we don't want an extra ';' after the "return" because that will cause
1108 * some compilers to complain about unreachable statements.
1109 */
1110#ifndef yyterminate
1111#define yyterminate() return YY_NULL
1112#endif
1113
1114/* Number of entries by which start-condition stack grows. */
1115#ifndef YY_START_STACK_INCR
1116#define YY_START_STACK_INCR 25
1117#endif
1118
1119/* Report a fatal error. */
1120#ifndef YY_FATAL_ERROR
1121#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1122#endif
1123
1124/* end tables serialization structures and prototypes */
1125
1126/* Default declaration of generated scanner - a define so the user can
1127 * easily add parameters.
1128 */
1129#ifndef YY_DECL
1130#define YY_DECL_IS_OURS 1
1131
1132extern int yylex (void);
1133
1134#define YY_DECL int yylex (void)
1135#endif /* !YY_DECL */
1136
1137/* Code executed at the beginning of each rule, after yytext and yyleng
1138 * have been set up.
1139 */
1140#ifndef YY_USER_ACTION
1141#define YY_USER_ACTION
1142#endif
1143
1144/* Code executed at the end of each rule. */
1145#ifndef YY_BREAK
1146#define YY_BREAK /*LINTED*/break;
1147#endif
1148
1149#define YY_RULE_SETUP \
1150 if ( yyleng > 0 ) \
1151 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1152 (yytext[yyleng - 1] == '\n'); \
1153 YY_USER_ACTION
1154
1158{
1159 yy_state_type yy_current_state;
1160 char *yy_cp, *yy_bp;
1162
1163 if ( !(yy_init) )
1164 {
1165 (yy_init) = 1;
1166
1167#ifdef YY_USER_INIT
1168 YY_USER_INIT;
1169#endif
1170
1171 if ( ! (yy_start) )
1172 (yy_start) = 1; /* first start state */
1173
1174 if ( ! yyin )
1175 yyin = stdin;
1176
1177 if ( ! yyout )
1178 yyout = stdout;
1179
1180 if ( ! YY_CURRENT_BUFFER ) {
1184 }
1185
1187 }
1188
1189 {
1190#line 190 "../../lib/cgraph/scan.l"
1191
1192#line 1193 "scan.c"
1193
1194 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1195 {
1196 yy_cp = (yy_c_buf_p);
1197
1198 /* Support of yytext. */
1199 *yy_cp = (yy_hold_char);
1200
1201 /* yy_bp points to the position in yy_ch_buf of the start of
1202 * the current run.
1203 */
1204 yy_bp = yy_cp;
1205
1206 yy_current_state = (yy_start);
1207 yy_current_state += YY_AT_BOL();
1208yy_match:
1209 do
1210 {
1211 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1212 if ( yy_accept[yy_current_state] )
1213 {
1214 (yy_last_accepting_state) = yy_current_state;
1216 }
1217 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1218 {
1219 yy_current_state = (int) yy_def[yy_current_state];
1220 if ( yy_current_state >= 93 )
1221 yy_c = yy_meta[yy_c];
1222 }
1223 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1224 ++yy_cp;
1225 }
1226 while ( yy_base[yy_current_state] != 219 );
1227
1228yy_find_action:
1229 yy_act = yy_accept[yy_current_state];
1230 if ( yy_act == 0 )
1231 { /* have to back up */
1233 yy_current_state = (yy_last_accepting_state);
1234 yy_act = yy_accept[yy_current_state];
1235 }
1236
1238
1239do_action: /* This label is used only to access EOF actions. */
1240
1241 switch ( yy_act )
1242 { /* beginning of action switch */
1243 case 0: /* must back up */
1244 /* undo the effects of YY_DO_BEFORE_ACTION */
1245 *yy_cp = (yy_hold_char);
1247 yy_current_state = (yy_last_accepting_state);
1248 goto yy_find_action;
1249
1250case 1:
1252#line 191 "../../lib/cgraph/scan.l"
1253return(EOF);
1254 YY_BREAK
1255case 2:
1256/* rule 2 can match eol */
1258#line 192 "../../lib/cgraph/scan.l"
1259line_num++;
1260 YY_BREAK
1261case 3:
1263#line 193 "../../lib/cgraph/scan.l"
1264BEGIN(comment);
1265 YY_BREAK
1266case 4:
1268#line 194 "../../lib/cgraph/scan.l"
1269/* eat anything not a '*' */
1270 YY_BREAK
1271case 5:
1273#line 195 "../../lib/cgraph/scan.l"
1274/* eat up '*'s not followed by '/'s */
1275 YY_BREAK
1276case 6:
1278#line 196 "../../lib/cgraph/scan.l"
1279BEGIN(INITIAL);
1280 YY_BREAK
1281case 7:
1283#line 197 "../../lib/cgraph/scan.l"
1284/* ignore C++-style comments */
1285 YY_BREAK
1286case 8:
1288#line 198 "../../lib/cgraph/scan.l"
1289ppDirective ();
1290 YY_BREAK
1291case 9:
1293#line 199 "../../lib/cgraph/scan.l"
1294/* ignore shell-like comments */
1295 YY_BREAK
1296case 10:
1298#line 200 "../../lib/cgraph/scan.l"
1299/* ignore whitespace */
1300 YY_BREAK
1301case 11:
1303#line 201 "../../lib/cgraph/scan.l"
1304/* ignore BOM */
1305 YY_BREAK
1306case 12:
1308#line 202 "../../lib/cgraph/scan.l"
1309return(T_node); /* see tokens in agcanonstr */
1310 YY_BREAK
1311case 13:
1313#line 203 "../../lib/cgraph/scan.l"
1314return(T_edge);
1315 YY_BREAK
1316case 14:
1318#line 204 "../../lib/cgraph/scan.l"
1319if (!graphType) graphType = T_graph; return(T_graph);
1320 YY_BREAK
1321case 15:
1323#line 205 "../../lib/cgraph/scan.l"
1324if (!graphType) graphType = T_digraph; return(T_digraph);
1325 YY_BREAK
1326case 16:
1328#line 206 "../../lib/cgraph/scan.l"
1329return(T_strict);
1330 YY_BREAK
1331case 17:
1333#line 207 "../../lib/cgraph/scan.l"
1334return(T_subgraph);
1335 YY_BREAK
1336case 18:
1338#line 208 "../../lib/cgraph/scan.l"
1339if (graphType == T_digraph) return(T_edgeop); else return('-');
1340 YY_BREAK
1341case 19:
1343#line 209 "../../lib/cgraph/scan.l"
1344if (graphType == T_graph) return(T_edgeop); else return('-');
1345 YY_BREAK
1346case 20:
1348#line 210 "../../lib/cgraph/scan.l"
1349{ aaglval.str = agstrdup(Ag_G_global,aagtext); return(T_atom); }
1350 YY_BREAK
1351case 21:
1353#line 211 "../../lib/cgraph/scan.l"
1354{ if (chkNum()) yyless(aagleng-1); aaglval.str = agstrdup(Ag_G_global,aagtext); return(T_atom); }
1355 YY_BREAK
1356case 22:
1358#line 212 "../../lib/cgraph/scan.l"
1360 YY_BREAK
1361case 23:
1363#line 213 "../../lib/cgraph/scan.l"
1364BEGIN(INITIAL); endstr(); return (T_qatom);
1365 YY_BREAK
1366case 24:
1368#line 214 "../../lib/cgraph/scan.l"
1369addstr ("\"");
1370 YY_BREAK
1371case 25:
1373#line 215 "../../lib/cgraph/scan.l"
1374addstr ("\\\\");
1375 YY_BREAK
1376case 26:
1377/* rule 26 can match eol */
1379#line 216 "../../lib/cgraph/scan.l"
1380line_num++; /* ignore escaped newlines */
1381 YY_BREAK
1382case 27:
1383/* rule 27 can match eol */
1385#line 217 "../../lib/cgraph/scan.l"
1386addstr ("\n"); line_num++;
1387 YY_BREAK
1388case 28:
1390#line 218 "../../lib/cgraph/scan.l"
1391addstr(aagtext);
1392 YY_BREAK
1393case 29:
1395#line 219 "../../lib/cgraph/scan.l"
1397 YY_BREAK
1398case 30:
1400#line 220 "../../lib/cgraph/scan.l"
1401html_nest--; if (html_nest) addstr(aagtext); else {BEGIN(INITIAL); endstr_html(); return (T_qatom);}
1402 YY_BREAK
1403case 31:
1405#line 221 "../../lib/cgraph/scan.l"
1406html_nest++; addstr(aagtext);
1407 YY_BREAK
1408case 32:
1409/* rule 32 can match eol */
1411#line 222 "../../lib/cgraph/scan.l"
1412addstr(aagtext); line_num++; /* add newlines */
1413 YY_BREAK
1414case 33:
1416#line 223 "../../lib/cgraph/scan.l"
1417addstr(aagtext);
1418 YY_BREAK
1419case 34:
1421#line 224 "../../lib/cgraph/scan.l"
1422return aagtext[0];
1423 YY_BREAK
1424case 35:
1426#line 225 "../../lib/cgraph/scan.l"
1427ECHO;
1428 YY_BREAK
1429#line 1430 "scan.c"
1430case YY_STATE_EOF(INITIAL):
1431case YY_STATE_EOF(comment):
1432case YY_STATE_EOF(qstring):
1433case YY_STATE_EOF(hstring):
1434 yyterminate();
1435
1436 case YY_END_OF_BUFFER:
1437 {
1438 /* Amount of text matched not including the EOB char. */
1439 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1440
1441 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1442 *yy_cp = (yy_hold_char);
1444
1445 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1446 {
1447 /* We're scanning a new file or input source. It's
1448 * possible that this happened because the user
1449 * just pointed yyin at a new source and called
1450 * yylex(). If so, then we have to assure
1451 * consistency between YY_CURRENT_BUFFER and our
1452 * globals. Here is the right place to do so, because
1453 * this is the first action (other than possibly a
1454 * back-up) that will match for the new input source.
1455 */
1456 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1457 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1458 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1459 }
1460
1461 /* Note that here we test for yy_c_buf_p "<=" to the position
1462 * of the first EOB in the buffer, since yy_c_buf_p will
1463 * already have been incremented past the NUL character
1464 * (since all states make transitions on EOB to the
1465 * end-of-buffer state). Contrast this with the test
1466 * in input().
1467 */
1468 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1469 { /* This was really a NUL. */
1470 yy_state_type yy_next_state;
1471
1472 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1473
1474 yy_current_state = yy_get_previous_state( );
1475
1476 /* Okay, we're now positioned to make the NUL
1477 * transition. We couldn't have
1478 * yy_get_previous_state() go ahead and do it
1479 * for us because it doesn't know how to deal
1480 * with the possibility of jamming (and we don't
1481 * want to build jamming into it because then it
1482 * will run more slowly).
1483 */
1484
1485 yy_next_state = yy_try_NUL_trans( yy_current_state );
1486
1488
1489 if ( yy_next_state )
1490 {
1491 /* Consume the NUL. */
1492 yy_cp = ++(yy_c_buf_p);
1493 yy_current_state = yy_next_state;
1494 goto yy_match;
1495 }
1496
1497 else
1498 {
1499 yy_cp = (yy_c_buf_p);
1500 goto yy_find_action;
1501 }
1502 }
1503
1504 else switch ( yy_get_next_buffer( ) )
1505 {
1507 {
1509
1510 if ( yywrap( ) )
1511 {
1512 /* Note: because we've taken care in
1513 * yy_get_next_buffer() to have set up
1514 * yytext, we can now set up
1515 * yy_c_buf_p so that if some total
1516 * hoser (like flex itself) wants to
1517 * call the scanner after we return the
1518 * YY_NULL, it'll still work - another
1519 * YY_NULL will get returned.
1520 */
1522
1524 goto do_action;
1525 }
1526
1527 else
1528 {
1531 }
1532 break;
1533 }
1534
1536 (yy_c_buf_p) =
1537 (yytext_ptr) + yy_amount_of_matched_text;
1538
1539 yy_current_state = yy_get_previous_state( );
1540
1541 yy_cp = (yy_c_buf_p);
1543 goto yy_match;
1544
1545 case EOB_ACT_LAST_MATCH:
1546 (yy_c_buf_p) =
1547 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1548
1549 yy_current_state = yy_get_previous_state( );
1550
1551 yy_cp = (yy_c_buf_p);
1553 goto yy_find_action;
1554 }
1555 break;
1556 }
1557
1558 default:
1560 "fatal flex scanner internal error--no action found" );
1561 } /* end of action switch */
1562 } /* end of scanning one token */
1563 } /* end of user's declarations */
1564} /* end of yylex */
1565
1566/* yy_get_next_buffer - try to read in a new buffer
1567 *
1568 * Returns a code representing an action:
1569 * EOB_ACT_LAST_MATCH -
1570 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1571 * EOB_ACT_END_OF_FILE - end of file
1572 */
1573static int yy_get_next_buffer (void)
1574{
1575 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1576 char *source = (yytext_ptr);
1577 int number_to_move, i;
1578 int ret_val;
1579
1580 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1582 "fatal flex scanner internal error--end of buffer missed" );
1583
1584 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1585 { /* Don't try to fill the buffer, so this is an EOF. */
1586 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1587 {
1588 /* We matched a single character, the EOB, so
1589 * treat this as a final EOF.
1590 */
1591 return EOB_ACT_END_OF_FILE;
1592 }
1593
1594 else
1595 {
1596 /* We matched some text prior to the EOB, first
1597 * process it.
1598 */
1599 return EOB_ACT_LAST_MATCH;
1600 }
1601 }
1602
1603 /* Try to read more data. */
1604
1605 /* First move last chars to start of buffer. */
1606 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1607
1608 for ( i = 0; i < number_to_move; ++i )
1609 *(dest++) = *(source++);
1610
1611 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1612 /* don't do the read, it's not guaranteed to return an EOF,
1613 * just force an EOF
1614 */
1615 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1616
1617 else
1618 {
1619 int num_to_read =
1620 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1621
1622 while ( num_to_read <= 0 )
1623 { /* Not enough room in the buffer - grow it. */
1624
1625 /* just a shorter name for the current buffer */
1627
1628 int yy_c_buf_p_offset =
1629 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1630
1631 if ( b->yy_is_our_buffer )
1632 {
1633 int new_size = b->yy_buf_size * 2;
1634
1635 if ( new_size <= 0 )
1636 b->yy_buf_size += b->yy_buf_size / 8;
1637 else
1638 b->yy_buf_size *= 2;
1639
1640 b->yy_ch_buf = (char *)
1641 /* Include room in for 2 EOB chars. */
1642 yyrealloc( (void *) b->yy_ch_buf,
1643 (yy_size_t) (b->yy_buf_size + 2) );
1644 }
1645 else
1646 /* Can't grow it, we don't own it. */
1647 b->yy_ch_buf = NULL;
1648
1649 if ( ! b->yy_ch_buf )
1651 "fatal error - scanner input buffer overflow" );
1652
1653 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1654
1655 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1656 number_to_move - 1;
1657
1658 }
1659
1660 if ( num_to_read > YY_READ_BUF_SIZE )
1661 num_to_read = YY_READ_BUF_SIZE;
1662
1663 /* Read in more data. */
1664 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1665 (yy_n_chars), num_to_read );
1666
1667 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1668 }
1669
1670 if ( (yy_n_chars) == 0 )
1671 {
1672 if ( number_to_move == YY_MORE_ADJ )
1673 {
1674 ret_val = EOB_ACT_END_OF_FILE;
1675 yyrestart( yyin );
1676 }
1677
1678 else
1679 {
1680 ret_val = EOB_ACT_LAST_MATCH;
1681 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1683 }
1684 }
1685
1686 else
1687 ret_val = EOB_ACT_CONTINUE_SCAN;
1688
1689 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1690 /* Extend the array by 50%, plus the number we really need. */
1691 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1692 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1693 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1694 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1695 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1696 /* "- 2" to take care of EOB's */
1697 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1698 }
1699
1700 (yy_n_chars) += number_to_move;
1703
1704 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1705
1706 return ret_val;
1707}
1708
1709/* yy_get_previous_state - get the state just before the EOB char was reached */
1710
1712{
1713 yy_state_type yy_current_state;
1714 char *yy_cp;
1715
1716 yy_current_state = (yy_start);
1717 yy_current_state += YY_AT_BOL();
1718
1719 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1720 {
1721 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1722 if ( yy_accept[yy_current_state] )
1723 {
1724 (yy_last_accepting_state) = yy_current_state;
1726 }
1727 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1728 {
1729 yy_current_state = (int) yy_def[yy_current_state];
1730 if ( yy_current_state >= 93 )
1731 yy_c = yy_meta[yy_c];
1732 }
1733 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1734 }
1735
1736 return yy_current_state;
1737}
1738
1739/* yy_try_NUL_trans - try to make a transition on the NUL character
1740 *
1741 * synopsis
1742 * next_state = yy_try_NUL_trans( current_state );
1743 */
1744 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1745{
1746 int yy_is_jam;
1747 char *yy_cp = (yy_c_buf_p);
1748
1749 YY_CHAR yy_c = 1;
1750 if ( yy_accept[yy_current_state] )
1751 {
1752 (yy_last_accepting_state) = yy_current_state;
1754 }
1755 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1756 {
1757 yy_current_state = (int) yy_def[yy_current_state];
1758 if ( yy_current_state >= 93 )
1759 yy_c = yy_meta[yy_c];
1760 }
1761 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1762 yy_is_jam = (yy_current_state == 92);
1763
1764 return yy_is_jam ? 0 : yy_current_state;
1765}
1766
1767#ifndef YY_NO_UNPUT
1768
1769 static void yyunput (int c, char * yy_bp )
1770{
1771 char *yy_cp;
1772
1773 yy_cp = (yy_c_buf_p);
1774
1775 /* undo effects of setting up yytext */
1776 *yy_cp = (yy_hold_char);
1777
1778 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1779 { /* need to shift things up to make room */
1780 /* +2 for EOB chars. */
1781 int number_to_move = (yy_n_chars) + 2;
1782 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1783 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1784 char *source =
1785 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1786
1787 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1788 *--dest = *--source;
1789
1790 yy_cp += (int) (dest - source);
1791 yy_bp += (int) (dest - source);
1792 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1793 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1794
1795 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1796 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1797 }
1798
1799 *--yy_cp = (char) c;
1800
1801 (yytext_ptr) = yy_bp;
1802 (yy_hold_char) = *yy_cp;
1803 (yy_c_buf_p) = yy_cp;
1804}
1805
1806#endif
1807
1808#ifndef YY_NO_INPUT
1809#ifdef __cplusplus
1810 static int yyinput (void)
1811#else
1812 static int input (void)
1813#endif
1814
1815{
1816 int c;
1817
1818 *(yy_c_buf_p) = (yy_hold_char);
1819
1821 {
1822 /* yy_c_buf_p now points to the character we want to return.
1823 * If this occurs *before* the EOB characters, then it's a
1824 * valid NUL; if not, then we've hit the end of the buffer.
1825 */
1826 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1827 /* This was really a NUL. */
1828 *(yy_c_buf_p) = '\0';
1829
1830 else
1831 { /* need more input */
1832 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1833 ++(yy_c_buf_p);
1834
1835 switch ( yy_get_next_buffer( ) )
1836 {
1837 case EOB_ACT_LAST_MATCH:
1838 /* This happens because yy_g_n_b()
1839 * sees that we've accumulated a
1840 * token and flags that we need to
1841 * try matching the token before
1842 * proceeding. But for input(),
1843 * there's no matching to consider.
1844 * So convert the EOB_ACT_LAST_MATCH
1845 * to EOB_ACT_END_OF_FILE.
1846 */
1847
1848 /* Reset buffer status. */
1849 yyrestart( yyin );
1850
1851 /*FALLTHROUGH*/
1852
1854 {
1855 if ( yywrap( ) )
1856 return 0;
1857
1860#ifdef __cplusplus
1861 return yyinput();
1862#else
1863 return input();
1864#endif
1865 }
1866
1869 break;
1870 }
1871 }
1872 }
1873
1874 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1875 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1876 (yy_hold_char) = *++(yy_c_buf_p);
1877
1878 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1879
1880 return c;
1881}
1882#endif /* ifndef YY_NO_INPUT */
1883
1889 void yyrestart (FILE * input_file )
1890{
1891
1892 if ( ! YY_CURRENT_BUFFER ){
1896 }
1897
1898 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1900}
1901
1906 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1907{
1908
1909 /* TODO. We should be able to replace this entire function body
1910 * with
1911 * yypop_buffer_state();
1912 * yypush_buffer_state(new_buffer);
1913 */
1915 if ( YY_CURRENT_BUFFER == new_buffer )
1916 return;
1917
1918 if ( YY_CURRENT_BUFFER )
1919 {
1920 /* Flush out information for old buffer. */
1921 *(yy_c_buf_p) = (yy_hold_char);
1922 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1923 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1924 }
1925
1926 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1928
1929 /* We don't actually know whether we did this switch during
1930 * EOF (yywrap()) processing, but the only time this flag
1931 * is looked at is after yywrap() is called, so it's safe
1932 * to go ahead and always set it.
1933 */
1935}
1936
1937static void yy_load_buffer_state (void)
1938{
1939 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1941 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1942 (yy_hold_char) = *(yy_c_buf_p);
1943}
1944
1951 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1952{
1954
1955 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1956 if ( ! b )
1957 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1958
1959 b->yy_buf_size = size;
1960
1961 /* yy_ch_buf has to be 2 characters longer than the size given because
1962 * we need to put in 2 end-of-buffer characters.
1963 */
1964 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1965 if ( ! b->yy_ch_buf )
1966 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1967
1968 b->yy_is_our_buffer = 1;
1969
1970 yy_init_buffer( b, file );
1971
1972 return b;
1973}
1974
1980{
1981
1982 if ( ! b )
1983 return;
1984
1985 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1987
1988 if ( b->yy_is_our_buffer )
1989 yyfree( (void *) b->yy_ch_buf );
1990
1991 yyfree( (void *) b );
1992}
1993
1994/* Initializes or reinitializes a buffer.
1995 * This function is sometimes called more than once on the same buffer,
1996 * such as during a yyrestart() or at EOF.
1997 */
1998 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1999
2000{
2001 int oerrno = errno;
2002
2003 yy_flush_buffer( b );
2004
2005 b->yy_input_file = file;
2006 b->yy_fill_buffer = 1;
2007
2008 /* If b is the current buffer, then yy_init_buffer was _probably_
2009 * called from yyrestart() or through yy_get_next_buffer.
2010 * In that case, we don't want to reset the lineno or column.
2011 */
2012 if (b != YY_CURRENT_BUFFER){
2013 b->yy_bs_lineno = 1;
2014 b->yy_bs_column = 0;
2015 }
2016
2017 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2018
2019 errno = oerrno;
2020}
2021
2027{
2028 if ( ! b )
2029 return;
2030
2031 b->yy_n_chars = 0;
2032
2033 /* We always need two end-of-buffer characters. The first causes
2034 * a transition to the end-of-buffer state. The second causes
2035 * a jam in that state.
2036 */
2039
2040 b->yy_buf_pos = &b->yy_ch_buf[0];
2041
2042 b->yy_at_bol = 1;
2044
2045 if ( b == YY_CURRENT_BUFFER )
2047}
2048
2055void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2056{
2057 if (new_buffer == NULL)
2058 return;
2059
2061
2062 /* This block is copied from yy_switch_to_buffer. */
2063 if ( YY_CURRENT_BUFFER )
2064 {
2065 /* Flush out information for old buffer. */
2066 *(yy_c_buf_p) = (yy_hold_char);
2067 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2068 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2069 }
2070
2071 /* Only push if top exists. Otherwise, replace top. */
2074 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2075
2076 /* copied from yy_switch_to_buffer. */
2079}
2080
2085void yypop_buffer_state (void)
2086{
2087 if (!YY_CURRENT_BUFFER)
2088 return;
2089
2092 if ((yy_buffer_stack_top) > 0)
2094
2095 if (YY_CURRENT_BUFFER) {
2098 }
2099}
2100
2101/* Allocates the stack if it does not exist.
2102 * Guarantees space for at least one push.
2103 */
2104static void yyensure_buffer_stack (void)
2105{
2106 yy_size_t num_to_alloc;
2107
2108 if (!(yy_buffer_stack)) {
2109
2110 /* First allocation is just for 2 elements, since we don't know if this
2111 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2112 * immediate realloc on the next call.
2113 */
2114 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2116 (num_to_alloc * sizeof(struct yy_buffer_state*)
2117 );
2118 if ( ! (yy_buffer_stack) )
2119 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2120
2121 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2122
2123 (yy_buffer_stack_max) = num_to_alloc;
2124 (yy_buffer_stack_top) = 0;
2125 return;
2126 }
2127
2128 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2129
2130 /* Increase the buffer to prepare for a possible push. */
2131 yy_size_t grow_size = 8 /* arbitrary grow size */;
2132
2133 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2135 ((yy_buffer_stack),
2136 num_to_alloc * sizeof(struct yy_buffer_state*)
2137 );
2138 if ( ! (yy_buffer_stack) )
2139 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2140
2141 /* zero only the new slots.*/
2142 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2143 (yy_buffer_stack_max) = num_to_alloc;
2144 }
2145}
2146
2153YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2154{
2156
2157 if ( size < 2 ||
2158 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2159 base[size-1] != YY_END_OF_BUFFER_CHAR )
2160 /* They forgot to leave room for the EOB's. */
2161 return NULL;
2162
2163 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2164 if ( ! b )
2165 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2166
2167 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2168 b->yy_buf_pos = b->yy_ch_buf = base;
2169 b->yy_is_our_buffer = 0;
2170 b->yy_input_file = NULL;
2171 b->yy_n_chars = b->yy_buf_size;
2172 b->yy_is_interactive = 0;
2173 b->yy_at_bol = 1;
2174 b->yy_fill_buffer = 0;
2176
2178
2179 return b;
2180}
2181
2190YY_BUFFER_STATE yy_scan_string (const char * yystr )
2191{
2192
2193 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2194}
2195
2203YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2204{
2206 char *buf;
2207 yy_size_t n;
2208 int i;
2209
2210 /* Get memory for full buffer, including space for trailing EOB's. */
2211 n = (yy_size_t) (_yybytes_len + 2);
2212 buf = (char *) yyalloc( n );
2213 if ( ! buf )
2214 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2215
2216 for ( i = 0; i < _yybytes_len; ++i )
2217 buf[i] = yybytes[i];
2218
2219 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2220
2221 b = yy_scan_buffer( buf, n );
2222 if ( ! b )
2223 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2224
2225 /* It's okay to grow etc. this buffer, and we should throw it
2226 * away when we're done.
2227 */
2228 b->yy_is_our_buffer = 1;
2229
2230 return b;
2231}
2232
2233#ifndef YY_EXIT_FAILURE
2234#define YY_EXIT_FAILURE 2
2235#endif
2236
2237static void yynoreturn yy_fatal_error (const char* msg )
2238{
2239 fprintf( stderr, "%s\n", msg );
2240 exit( YY_EXIT_FAILURE );
2241}
2242
2243/* Redefine yyless() so it works in section 3 code. */
2244
2245#undef yyless
2246#define yyless(n) \
2247 do \
2248 { \
2249 /* Undo effects of setting up yytext. */ \
2250 int yyless_macro_arg = (n); \
2251 YY_LESS_LINENO(yyless_macro_arg);\
2252 yytext[yyleng] = (yy_hold_char); \
2253 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2254 (yy_hold_char) = *(yy_c_buf_p); \
2255 *(yy_c_buf_p) = '\0'; \
2256 yyleng = yyless_macro_arg; \
2257 } \
2258 while ( 0 )
2259
2260/* Accessor methods (get/set functions) to struct members. */
2261
2265int yyget_lineno (void)
2266{
2267
2268 return yylineno;
2269}
2270
2274FILE *yyget_in (void)
2275{
2276 return yyin;
2277}
2278
2282FILE *yyget_out (void)
2283{
2284 return yyout;
2285}
2286
2290int yyget_leng (void)
2291{
2292 return yyleng;
2293}
2294
2299char *yyget_text (void)
2300{
2301 return yytext;
2302}
2303
2308void yyset_lineno (int _line_number )
2309{
2310
2311 yylineno = _line_number;
2312}
2313
2320void yyset_in (FILE * _in_str )
2321{
2322 yyin = _in_str ;
2323}
2324
2325void yyset_out (FILE * _out_str )
2326{
2327 yyout = _out_str ;
2328}
2329
2330int yyget_debug (void)
2331{
2332 return yy_flex_debug;
2333}
2334
2335void yyset_debug (int _bdebug )
2336{
2337 yy_flex_debug = _bdebug ;
2338}
2339
2340static int yy_init_globals (void)
2341{
2342 /* Initialization is the same as for the non-reentrant scanner.
2343 * This function is called from yylex_destroy(), so don't allocate here.
2344 */
2345
2347 (yy_buffer_stack_top) = 0;
2348 (yy_buffer_stack_max) = 0;
2349 (yy_c_buf_p) = NULL;
2350 (yy_init) = 0;
2351 (yy_start) = 0;
2352
2353/* Defined in main.c */
2354#ifdef YY_STDINIT
2355 yyin = stdin;
2356 yyout = stdout;
2357#else
2358 yyin = NULL;
2359 yyout = NULL;
2360#endif
2361
2362 /* For future reference: Set errno on error, since we are called by
2363 * yylex_init()
2364 */
2365 return 0;
2366}
2367
2368/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2369int yylex_destroy (void)
2370{
2371
2372 /* Pop the buffer stack, destroying each element. */
2373 while(YY_CURRENT_BUFFER){
2377 }
2378
2379 /* Destroy the stack itself. */
2382
2383 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2384 * yylex() is called, initialization will occur. */
2385 yy_init_globals( );
2386
2387 return 0;
2388}
2389
2390/*
2391 * Internal utility routines.
2392 */
2393
2394#ifndef yytext_ptr
2395static void yy_flex_strncpy (char* s1, const char * s2, int n )
2396{
2397
2398 int i;
2399 for ( i = 0; i < n; ++i )
2400 s1[i] = s2[i];
2401}
2402#endif
2403
2404#ifdef YY_NEED_STRLEN
2405static int yy_flex_strlen (const char * s )
2406{
2407 int n;
2408 for ( n = 0; s[n]; ++n )
2409 ;
2410
2411 return n;
2412}
2413#endif
2414
2415void *yyalloc (yy_size_t size )
2416{
2417 return malloc(size);
2418}
2419
2420void *yyrealloc (void * ptr, yy_size_t size )
2421{
2422
2423 /* The cast to (char *) in the following accommodates both
2424 * implementations that use char* generic pointers, and those
2425 * that use void* generic pointers. It works with the latter
2426 * because both ANSI C and C++ allow castless assignment from
2427 * any pointer type to void*, and deal with argument conversions
2428 * as though doing an assignment.
2429 */
2430 return realloc(ptr, size);
2431}
2432
2433void yyfree (void * ptr )
2434{
2435 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2436}
2437
2438#define YYTABLES_NAME "yytables"
2439
2440#line 225 "../../lib/cgraph/scan.l"
2441
2442
2443void aagerror(const char *str);
2444void aagerror(const char *str)
2445{
2446 agxbuf xb = {0};
2447 if (InputFile) {
2448 agxbprint (&xb, "%s: ", InputFile);
2449 }
2450 agxbprint (&xb, "%s in line %d", str, line_num);
2451 if (*aagtext) {
2452 agxbprint(&xb, " near '%s'", aagtext);
2453 }
2454 else switch (YYSTATE) {
2455 case qstring: {
2456 agxbprint(&xb, " scanning a quoted string (missing endquote? longer than %d?)", YY_BUF_SIZE);
2457 if (agxblen(&Sbuf) > 0) {
2458 agxbprint(&xb, "\nString starting:\"%.80s", agxbuse(&Sbuf));
2459 }
2460 break;
2461 }
2462 case hstring: {
2463 agxbprint(&xb, " scanning a HTML string (missing '>'? bad nesting? longer than %d?)", YY_BUF_SIZE);
2464 if (agxblen(&Sbuf) > 0) {
2465 agxbprint(&xb, "\nString starting:<%.80s", agxbuse(&Sbuf));
2466 }
2467 break;
2468 }
2469 case comment :
2470 agxbprint(&xb, " scanning a /*...*/ comment (missing '*/? longer than %d?)", YY_BUF_SIZE);
2471 break;
2472 default: // nothing extra to note
2473 break;
2474 }
2475 agxbputc (&xb, '\n');
2476 agerrorf("%s", agxbuse(&xb));
2477 agxbfree(&xb);
2478 BEGIN(INITIAL);
2479}
2480/* must be here to see flex's macro defns */
2482
2484
2485#ifndef YY_CALL_ONLY_ARG
2486# define YY_CALL_ONLY_ARG void
2487#endif
2488
2490{
2491 return 1;
2492}
2493
2494
static void agxbfree(agxbuf *xb)
free any malloced resources
Definition agxbuf.h:77
static size_t agxbput(agxbuf *xb, const char *s)
append string s into xb
Definition agxbuf.h:249
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
Definition agxbuf.h:213
static size_t agxblen(const agxbuf *xb)
return number of characters currently stored
Definition agxbuf.h:88
static int agxbputc(agxbuf *xb, char c)
add character to buffer
Definition agxbuf.h:256
static char * agxbuse(agxbuf *xb)
Definition agxbuf.h:286
static void * gv_realloc(void *ptr, size_t old_size, size_t new_size)
Definition alloc.h:49
cgraph.h additions
Agraph_t * Ag_G_global
Definition graph.c:24
static char * fname
#define dot(v, w)
Definition geom.c:228
static double len(glCompPoint p)
Definition glutils.c:150
void * malloc(YYSIZE_T)
void free(void *)
unsigned char flex_uint8_t
Definition gmlscan.c:313
short int flex_int16_t
Definition gmlscan.c:311
int flex_int32_t
Definition gmlscan.c:312
int yy_state_type
Definition gmlscan.c:589
flex_uint8_t YY_CHAR
Definition gmlscan.c:585
size_t yy_size_t
Definition gmlscan.c:414
#define T_node
Definition grammar.c:218
#define T_atom
Definition grammar.c:226
AAGSTYPE aaglval
#define T_subgraph
Definition grammar.c:221
#define T_edge
Definition grammar.c:219
#define T_strict
Definition grammar.c:222
#define T_qatom
Definition grammar.c:227
#define T_digraph
Definition grammar.c:220
#define T_graph
Definition grammar.c:217
#define T_edgeop
Definition grammar.c:223
node NULL
Definition grammar.y:149
static int cnt(Dict_t *d, Dtlink_t **set)
Definition graph.c:199
void agwarningf(const char *fmt,...)
Definition agerror.c:173
void agerrorf(const char *fmt,...)
Definition agerror.c:165
void agsetfile(const char *f)
sets the current file name for subsequent error reporting
Definition scan.c:839
void agreadline(int n)
sets input line number for subsequent error reporting
Definition scan.c:835
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
Definition refstr.c:130
char * agstrdup_html(Agraph_t *, const char *)
Definition refstr.c:134
replacements for ctype.h functions
static bool gv_isdigit(int c)
Definition gv_ctype.h:41
swig_ptr_object_handlers offset
Definition gv_php.cpp:5915
agxbuf * str
Definition htmlparse.c:97
NEATOPROCS_API void s1(graph_t *, node_t *)
Definition stuff.c:671
static int lineno
Definition parse.c:29
#define yy_load_buffer_state
Definition scan.c:16
#define YY_NEW_FILE
Definition scan.c:387
#define yyset_extra
Definition scan.c:165
static int chkNum(void)
Definition scan.c:940
#define yytext
Definition scan.c:28
unsigned char flex_uint8_t
Definition scan.c:313
#define yyset_lineno
Definition scan.c:213
static char yy_hold_char
Definition scan.c:528
static const flex_int16_t yy_def[105]
Definition scan.c:695
void aglexbad(void)
Definition scan.c:2483
static yy_state_type yy_last_accepting_state
Definition scan.c:777
#define yyrestart
Definition scan.c:27
#define yyset_debug
Definition scan.c:153
static void yyunput(int c, char *buf_ptr)
static void yynoreturn yy_fatal_error(const char *msg)
#define YY_EXTRA_TYPE
Definition scan.c:983
static int yy_start
Definition scan.c:535
short int flex_int16_t
Definition scan.c:311
#define yy_flex_debug
Definition scan.c:21
#define isatty(x)
Definition scan.c:852
static const char * InputFile
Definition scan.c:829
#define YYSTATE
Definition scan.c:383
#define yyget_out
Definition scan.c:183
static YY_BUFFER_STATE * yy_buffer_stack
Definition scan.c:511
#define qstring
Definition scan.c:971
unsigned int flex_uint32_t
Definition scan.c:315
static Agdisc_t * Disc
Definition scan.c:830
#define GRAPH_EOF_TOKEN
Definition scan.c:825
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition scan.c:13
#define hstring
Definition scan.c:972
static void endstr(void)
Definition scan.c:875
#define YY_BREAK
Definition scan.c:1146
static size_t yy_buffer_stack_max
Definition scan.c:510
#define comment
Definition scan.c:970
#define unput(c)
Definition scan.c:441
#define yynoreturn
Definition scan.c:362
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
void aglexinit(Agdisc_t *disc, void *ifile)
Definition scan.c:845
#define yyget_debug
Definition scan.c:147
int yy_act
Definition scan.c:1161
#define yypush_buffer_state
Definition scan.c:18
static const flex_int16_t yy_chk[268]
Definition scan.c:744
static void storeFileName(char *fname, size_t len)
Definition scan.c:883
static const flex_int16_t yy_nxt[268]
Definition scan.c:711
struct yy_buffer_state * YY_BUFFER_STATE
Definition scan.c:409
#define yyfree
Definition scan.c:32
#define yyout
Definition scan.c:26
#define YY_BUFFER_NEW
Definition scan.c:491
#define yyget_lineno
Definition scan.c:207
#define yylex
Definition scan.c:24
#define YY_RESTORE_YY_MORE_OFFSET
Definition scan.c:789
static const YY_CHAR yy_meta[49]
Definition scan.c:670
static int yy_did_buffer_switch_on_eof
Definition scan.c:540
static int yy_init_globals(void)
#define yywrap
Definition scan.c:29
int aagwrap(YY_CALL_ONLY_ARG)
Definition scan.c:2489
static void * Ifile
Definition scan.c:831
static const flex_int16_t yy_base[105]
Definition scan.c:679
#define yyget_text
Definition scan.c:201
#define YY_BUFFER_NORMAL
Definition scan.c:492
char * yy_cp
Definition scan.c:1160
#define yyensure_buffer_stack
Definition scan.c:20
#define yy_scan_buffer
Definition scan.c:11
#define YY_MORE_ADJ
Definition scan.c:788
#define YY_RULE_SETUP
Definition scan.c:1149
#define yy_scan_string
Definition scan.c:12
#define YY_AT_BOL()
Definition scan.c:582
static bool twoDots(void)
Definition scan.c:929
static int line_num
Definition scan.c:827
#define yytext_ptr
Definition scan.c:598
signed char flex_int8_t
Definition scan.c:310
#define yyget_leng
Definition scan.c:195
#define EOB_ACT_END_OF_FILE
Definition scan.c:422
#define yyalloc
Definition scan.c:30
#define yypop_buffer_state
Definition scan.c:19
#define YY_CURRENT_BUFFER_LVALUE
Definition scan.c:525
int flex_int32_t
Definition scan.c:312
#define yylex_destroy
Definition scan.c:141
#define YY_START
Definition scan.c:382
#define yy_switch_to_buffer
Definition scan.c:17
static void ppDirective(void)
Definition scan.c:899
static void endstr_html(void)
Definition scan.c:879
int yy_state_type
Definition scan.c:589
#define YY_CURRENT_BUFFER
Definition scan.c:519
#define yy_init_buffer
Definition scan.c:14
#define INITIAL
Definition scan.c:969
#define yyget_extra
Definition scan.c:159
char * yy_bp
Definition scan.c:1160
#define yyin
Definition scan.c:22
static int yy_n_chars
Definition scan.c:529
#define YY_READ_BUF_SIZE
Definition scan.c:1058
#define YY_INPUT(buf, result, max_size)
Definition scan.c:856
#define ECHO
Definition scan.c:1067
#define yy_flush_buffer
Definition scan.c:15
#define yyrealloc
Definition scan.c:31
#define YY_END_OF_BUFFER
Definition scan.c:615
#define YY_STATE_EOF(state)
Definition scan.c:385
#define BEGIN
Definition scan.c:377
#define YY_END_OF_BUFFER_CHAR
Definition scan.c:388
static void addstr(char *src)
Definition scan.c:871
#define YY_FATAL_ERROR(msg)
Definition scan.c:1121
#define yyterminate()
Definition scan.c:1111
unsigned short int flex_uint16_t
Definition scan.c:314
#define YY_FLUSH_BUFFER
Definition scan.c:553
#define yy_create_buffer
Definition scan.c:9
static int html_nest
Definition scan.c:828
flex_uint8_t YY_CHAR
Definition scan.c:585
#define YY_DO_BEFORE_ACTION
Definition scan.c:608
#define yy_delete_buffer
Definition scan.c:10
#define EOB_ACT_LAST_MATCH
Definition scan.c:423
#define yyget_in
Definition scan.c:171
size_t yy_size_t
Definition scan.c:414
#define YY_CALL_ONLY_ARG
Definition scan.c:2486
static const flex_int16_t yy_accept[93]
Definition scan.c:623
#define YY_BUFFER_EOF_PENDING
Definition scan.c:503
#define yylineno
Definition scan.c:25
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition scan.c:638
#define yyset_out
Definition scan.c:189
int gv_isatty_suppression
Definition scan.c:853
static char * yy_c_buf_p
Definition scan.c:533
#define EOB_ACT_CONTINUE_SCAN
Definition scan.c:421
static size_t yy_buffer_stack_top
Definition scan.c:509
#define YY_DECL
Definition scan.c:1134
#define yyless(n)
Definition scan.c:429
void aglexeof(void)
Definition scan.c:2481
#define YY_BUF_SIZE
Definition scan.c:399
#define YY_EXIT_FAILURE
static agxbuf Sbuf
Definition scan.c:862
static int yy_init
Definition scan.c:534
#define YY_SC_TO_UI(c)
Definition scan.c:371
static void beginstr(void)
Definition scan.c:864
#define yyleng
Definition scan.c:23
static int graphType
Definition scan.c:832
static char * yy_last_accepting_cpos
Definition scan.c:778
#define yyset_in
Definition scan.c:177
void aagerror(const char *str)
Definition scan.c:2444
static bool startswith(const char *s, const char *prefix)
does the string s begin with the string prefix?
Definition startswith.h:11
user's discipline
Definition cgraph.h:337
char * yy_ch_buf
Definition gmlscan.c:449
FILE * yy_input_file
Definition gmlscan.c:447
int yy_buffer_status
Definition gmlscan.c:489
int yy_is_our_buffer
Definition gmlscan.c:466
char * yy_buf_pos
Definition gmlscan.c:450
int yy_is_interactive
Definition gmlscan.c:473
flex_int32_t yy_verify
Definition gmlscan.c:620
flex_int32_t yy_nxt
Definition gmlscan.c:621
char * str
Definition grammar.c:236
Definition grammar.c:93