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