Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
gmlscan.c
Go to the documentation of this file.
1#line 2 "gmlscan.c"
2
3#line 4 "gmlscan.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define yy_create_buffer gml_create_buffer
10#define yy_delete_buffer gml_delete_buffer
11#define yy_scan_buffer gml_scan_buffer
12#define yy_scan_string gml_scan_string
13#define yy_scan_bytes gml_scan_bytes
14#define yy_init_buffer gml_init_buffer
15#define yy_flush_buffer gml_flush_buffer
16#define yy_load_buffer_state gml_load_buffer_state
17#define yy_switch_to_buffer gml_switch_to_buffer
18#define yypush_buffer_state gmlpush_buffer_state
19#define yypop_buffer_state gmlpop_buffer_state
20#define yyensure_buffer_stack gmlensure_buffer_stack
21#define yy_flex_debug gml_flex_debug
22#define yyin gmlin
23#define yyleng gmlleng
24#define yylex gmllex
25#define yylineno gmllineno
26#define yyout gmlout
27#define yyrestart gmlrestart
28#define yytext gmltext
29#define yywrap gmlwrap
30#define yyalloc gmlalloc
31#define yyrealloc gmlrealloc
32#define yyfree gmlfree
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 gml_create_buffer_ALREADY_DEFINED
44#else
45#define yy_create_buffer gml_create_buffer
46#endif
47
48#ifdef yy_delete_buffer
49#define gml_delete_buffer_ALREADY_DEFINED
50#else
51#define yy_delete_buffer gml_delete_buffer
52#endif
53
54#ifdef yy_scan_buffer
55#define gml_scan_buffer_ALREADY_DEFINED
56#else
57#define yy_scan_buffer gml_scan_buffer
58#endif
59
60#ifdef yy_scan_string
61#define gml_scan_string_ALREADY_DEFINED
62#else
63#define yy_scan_string gml_scan_string
64#endif
65
66#ifdef yy_scan_bytes
67#define gml_scan_bytes_ALREADY_DEFINED
68#else
69#define yy_scan_bytes gml_scan_bytes
70#endif
71
72#ifdef yy_init_buffer
73#define gml_init_buffer_ALREADY_DEFINED
74#else
75#define yy_init_buffer gml_init_buffer
76#endif
77
78#ifdef yy_flush_buffer
79#define gml_flush_buffer_ALREADY_DEFINED
80#else
81#define yy_flush_buffer gml_flush_buffer
82#endif
83
84#ifdef yy_load_buffer_state
85#define gml_load_buffer_state_ALREADY_DEFINED
86#else
87#define yy_load_buffer_state gml_load_buffer_state
88#endif
89
90#ifdef yy_switch_to_buffer
91#define gml_switch_to_buffer_ALREADY_DEFINED
92#else
93#define yy_switch_to_buffer gml_switch_to_buffer
94#endif
95
96#ifdef yypush_buffer_state
97#define gmlpush_buffer_state_ALREADY_DEFINED
98#else
99#define yypush_buffer_state gmlpush_buffer_state
100#endif
101
102#ifdef yypop_buffer_state
103#define gmlpop_buffer_state_ALREADY_DEFINED
104#else
105#define yypop_buffer_state gmlpop_buffer_state
106#endif
107
108#ifdef yyensure_buffer_stack
109#define gmlensure_buffer_stack_ALREADY_DEFINED
110#else
111#define yyensure_buffer_stack gmlensure_buffer_stack
112#endif
113
114#ifdef yylex
115#define gmllex_ALREADY_DEFINED
116#else
117#define yylex gmllex
118#endif
119
120#ifdef yyrestart
121#define gmlrestart_ALREADY_DEFINED
122#else
123#define yyrestart gmlrestart
124#endif
125
126#ifdef yylex_init
127#define gmllex_init_ALREADY_DEFINED
128#else
129#define yylex_init gmllex_init
130#endif
131
132#ifdef yylex_init_extra
133#define gmllex_init_extra_ALREADY_DEFINED
134#else
135#define yylex_init_extra gmllex_init_extra
136#endif
137
138#ifdef yylex_destroy
139#define gmllex_destroy_ALREADY_DEFINED
140#else
141#define yylex_destroy gmllex_destroy
142#endif
143
144#ifdef yyget_debug
145#define gmlget_debug_ALREADY_DEFINED
146#else
147#define yyget_debug gmlget_debug
148#endif
149
150#ifdef yyset_debug
151#define gmlset_debug_ALREADY_DEFINED
152#else
153#define yyset_debug gmlset_debug
154#endif
155
156#ifdef yyget_extra
157#define gmlget_extra_ALREADY_DEFINED
158#else
159#define yyget_extra gmlget_extra
160#endif
161
162#ifdef yyset_extra
163#define gmlset_extra_ALREADY_DEFINED
164#else
165#define yyset_extra gmlset_extra
166#endif
167
168#ifdef yyget_in
169#define gmlget_in_ALREADY_DEFINED
170#else
171#define yyget_in gmlget_in
172#endif
173
174#ifdef yyset_in
175#define gmlset_in_ALREADY_DEFINED
176#else
177#define yyset_in gmlset_in
178#endif
179
180#ifdef yyget_out
181#define gmlget_out_ALREADY_DEFINED
182#else
183#define yyget_out gmlget_out
184#endif
185
186#ifdef yyset_out
187#define gmlset_out_ALREADY_DEFINED
188#else
189#define yyset_out gmlset_out
190#endif
191
192#ifdef yyget_leng
193#define gmlget_leng_ALREADY_DEFINED
194#else
195#define yyget_leng gmlget_leng
196#endif
197
198#ifdef yyget_text
199#define gmlget_text_ALREADY_DEFINED
200#else
201#define yyget_text gmlget_text
202#endif
203
204#ifdef yyget_lineno
205#define gmlget_lineno_ALREADY_DEFINED
206#else
207#define yyget_lineno gmlget_lineno
208#endif
209
210#ifdef yyset_lineno
211#define gmlset_lineno_ALREADY_DEFINED
212#else
213#define yyset_lineno gmlset_lineno
214#endif
215
216#ifdef yywrap
217#define gmlwrap_ALREADY_DEFINED
218#else
219#define yywrap gmlwrap
220#endif
221
222#ifdef yyalloc
223#define gmlalloc_ALREADY_DEFINED
224#else
225#define yyalloc gmlalloc
226#endif
227
228#ifdef yyrealloc
229#define gmlrealloc_ALREADY_DEFINED
230#else
231#define yyrealloc gmlrealloc
232#endif
233
234#ifdef yyfree
235#define gmlfree_ALREADY_DEFINED
236#else
237#define yyfree gmlfree
238#endif
239
240#ifdef yytext
241#define gmltext_ALREADY_DEFINED
242#else
243#define yytext gmltext
244#endif
245
246#ifdef yyleng
247#define gmlleng_ALREADY_DEFINED
248#else
249#define yyleng gmlleng
250#endif
251
252#ifdef yyin
253#define gmlin_ALREADY_DEFINED
254#else
255#define yyin gmlin
256#endif
257
258#ifdef yyout
259#define gmlout_ALREADY_DEFINED
260#else
261#define yyout gmlout
262#endif
263
264#ifdef yy_flex_debug
265#define gml_flex_debug_ALREADY_DEFINED
266#else
267#define yy_flex_debug gml_flex_debug
268#endif
269
270#ifdef yylineno
271#define gmllineno_ALREADY_DEFINED
272#else
273#define yylineno gmllineno
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
446 {
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 */
456
457 /* Number of characters read into yy_ch_buf, not including EOB
458 * characters.
459 */
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 */
480
484 /* Whether to try to fill the input buffer when we reach the
485 * end of it.
486 */
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 39
615#define YY_END_OF_BUFFER 40
616/* This struct is not used in this scanner,
617 but its presence is necessary. */
623static const flex_int16_t yy_accept[143] =
624 { 0,
625 0, 0, 0, 0, 40, 38, 4, 2, 35, 38,
626 33, 32, 1, 34, 34, 34, 34, 34, 34, 15,
627 34, 34, 34, 34, 34, 34, 34, 14, 12, 13,
628 3, 37, 2, 36, 33, 32, 33, 0, 34, 34,
629 34, 34, 34, 34, 34, 9, 34, 34, 34, 34,
630 34, 34, 34, 34, 34, 34, 34, 3, 37, 0,
631 33, 34, 34, 34, 34, 34, 34, 34, 34, 34,
632 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
633 7, 20, 34, 34, 34, 26, 6, 34, 34, 34,
634 34, 34, 28, 19, 34, 31, 34, 34, 34, 5,
635
636 16, 34, 27, 34, 25, 34, 24, 34, 34, 34,
637 34, 34, 34, 10, 11, 34, 34, 34, 34, 34,
638 21, 8, 30, 29, 17, 34, 34, 34, 34, 34,
639 34, 34, 34, 34, 34, 34, 34, 34, 22, 23,
640 18, 0
641 } ;
642
643static const YY_CHAR yy_ec[256] =
644 { 0,
645 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
646 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648 1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
649 1, 1, 6, 1, 6, 7, 1, 8, 8, 8,
650 8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
651 1, 1, 1, 9, 10, 11, 12, 13, 14, 15,
652 16, 17, 18, 19, 19, 20, 21, 22, 23, 24,
653 19, 25, 26, 27, 28, 19, 29, 30, 31, 32,
654 1, 1, 1, 1, 19, 1, 33, 34, 35, 36,
655
656 37, 38, 39, 40, 41, 19, 19, 42, 43, 44,
657 45, 46, 19, 47, 48, 49, 50, 19, 51, 52,
658 53, 54, 1, 1, 1, 1, 1, 1, 1, 1,
659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
664 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666
667 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
668 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
669 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
670 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
671 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
672 1, 1, 1, 1, 1
673 } ;
674
675static const YY_CHAR yy_meta[55] =
676 { 0,
677 1, 1, 2, 3, 1, 1, 1, 4, 1, 4,
678 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
679 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
680 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
681 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
682 4, 4, 4, 4
683 } ;
684
685static const flex_int16_t yy_base[147] =
686 { 0,
687 0, 78, 52, 54, 75, 301, 301, 301, 301, 52,
688 53, 55, 301, 0, 41, 47, 53, 50, 45, 0,
689 58, 64, 53, 49, 55, 57, 93, 63, 0, 0,
690 0, 0, 0, 301, 71, 102, 79, 105, 0, 76,
691 76, 96, 94, 93, 107, 0, 108, 99, 109, 98,
692 109, 101, 100, 107, 103, 110, 125, 0, 0, 64,
693 301, 118, 125, 130, 128, 122, 128, 143, 144, 145,
694 144, 143, 141, 148, 144, 142, 158, 148, 151, 161,
695 0, 0, 163, 160, 159, 0, 0, 174, 157, 181,
696 180, 185, 0, 0, 185, 0, 177, 195, 190, 191,
697
698 194, 190, 0, 199, 0, 191, 0, 200, 198, 188,
699 209, 198, 210, 0, 0, 214, 215, 216, 209, 228,
700 217, 0, 0, 0, 0, 224, 222, 221, 234, 223,
701 242, 238, 238, 232, 248, 249, 247, 240, 0, 0,
702 0, 301, 288, 65, 292, 296
703 } ;
704
705static const flex_int16_t yy_def[147] =
706 { 0,
707 142, 1, 143, 143, 142, 142, 142, 142, 142, 142,
708 142, 142, 142, 144, 144, 144, 144, 144, 144, 144,
709 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
710 145, 146, 146, 142, 142, 142, 142, 142, 144, 144,
711 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
712 144, 144, 144, 144, 144, 144, 144, 145, 146, 142,
713 142, 144, 144, 144, 144, 144, 144, 144, 144, 144,
714 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
715 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
716 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
717
718 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
719 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
720 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
721 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
722 144, 0, 142, 142, 142, 142
723 } ;
724
725static const flex_int16_t yy_nxt[356] =
726 { 0,
727 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
728 14, 15, 16, 17, 18, 19, 20, 21, 14, 22,
729 14, 23, 24, 25, 14, 26, 27, 14, 28, 29,
730 30, 14, 14, 14, 15, 16, 17, 18, 19, 20,
731 21, 22, 14, 23, 24, 25, 14, 26, 27, 14,
732 28, 29, 30, 14, 33, 34, 33, 34, 35, 36,
733 37, 35, 36, 40, 41, 42, 38, 43, 39, 45,
734 46, 61, 44, 47, 142, 49, 50, 51, 37, 52,
735 57, 48, 31, 53, 38, 40, 37, 41, 42, 38,
736 43, 45, 38, 46, 44, 62, 47, 49, 50, 51,
737
738 63, 52, 54, 57, 48, 53, 55, 38, 35, 36,
739 60, 64, 61, 65, 66, 38, 67, 62, 68, 142,
740 69, 70, 63, 56, 71, 54, 72, 142, 73, 55,
741 74, 75, 76, 77, 64, 65, 66, 78, 80, 67,
742 79, 68, 69, 81, 70, 56, 71, 82, 83, 72,
743 73, 84, 74, 75, 76, 77, 85, 86, 87, 92,
744 78, 80, 79, 88, 89, 90, 81, 91, 93, 82,
745 83, 94, 97, 84, 95, 96, 100, 142, 101, 85,
746 86, 87, 92, 103, 98, 88, 89, 90, 99, 91,
747 93, 102, 104, 105, 94, 97, 95, 96, 106, 100,
748
749 101, 107, 142, 108, 109, 103, 98, 110, 111, 112,
750 99, 113, 114, 116, 102, 104, 105, 115, 117, 118,
751 119, 106, 120, 121, 107, 108, 122, 109, 123, 124,
752 110, 111, 112, 113, 125, 114, 116, 126, 131, 115,
753 117, 118, 127, 119, 120, 128, 121, 129, 130, 122,
754 132, 123, 124, 133, 134, 135, 125, 136, 137, 138,
755 126, 131, 139, 140, 127, 141, 142, 128, 142, 129,
756 130, 142, 142, 132, 142, 133, 142, 134, 135, 136,
757 137, 142, 138, 142, 142, 139, 140, 141, 32, 32,
758 32, 32, 58, 142, 58, 58, 59, 59, 142, 59,
759
760 5, 142, 142, 142, 142, 142, 142, 142, 142, 142,
761 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
762 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
763 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
764 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
765 142, 142, 142, 142, 142
766 } ;
767
768static const flex_int16_t yy_chk[356] =
769 { 0,
770 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
771 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
772 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
774 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
775 1, 1, 1, 1, 3, 3, 4, 4, 10, 10,
776 11, 12, 12, 15, 16, 17, 11, 18, 144, 19,
777 21, 60, 18, 22, 5, 23, 24, 25, 35, 26,
778 28, 22, 2, 26, 35, 15, 37, 16, 17, 11,
779 18, 19, 37, 21, 18, 40, 22, 23, 24, 25,
780
781 41, 26, 27, 28, 22, 26, 27, 35, 36, 36,
782 38, 42, 38, 43, 44, 37, 45, 40, 47, 0,
783 48, 49, 41, 27, 50, 27, 51, 0, 52, 27,
784 53, 54, 55, 56, 42, 43, 44, 57, 63, 45,
785 62, 47, 48, 64, 49, 27, 50, 65, 66, 51,
786 52, 67, 53, 54, 55, 56, 68, 69, 70, 75,
787 57, 63, 62, 71, 72, 73, 64, 74, 76, 65,
788 66, 77, 80, 67, 78, 79, 84, 0, 85, 68,
789 69, 70, 75, 89, 83, 71, 72, 73, 83, 74,
790 76, 88, 90, 91, 77, 80, 78, 79, 92, 84,
791
792 85, 95, 0, 97, 98, 89, 83, 99, 100, 101,
793 83, 102, 104, 108, 88, 90, 91, 106, 109, 110,
794 111, 92, 112, 113, 95, 97, 116, 98, 117, 118,
795 99, 100, 101, 102, 119, 104, 108, 120, 128, 106,
796 109, 110, 121, 111, 112, 121, 113, 126, 127, 116,
797 129, 117, 118, 130, 131, 132, 119, 133, 134, 135,
798 120, 128, 136, 137, 121, 138, 0, 121, 0, 126,
799 127, 0, 0, 129, 0, 130, 0, 131, 132, 133,
800 134, 0, 135, 0, 0, 136, 137, 138, 143, 143,
801 143, 143, 145, 0, 145, 145, 146, 146, 0, 146,
802
803 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
804 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
805 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
806 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
807 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
808 142, 142, 142, 142, 142
809 } ;
810
813
814extern int yy_flex_debug;
816
817/* The intent behind this definition is that it'll catch
818 * any uses of REJECT which flex missed.
819 */
820#define REJECT reject_used_but_not_detected
821#define yymore() yymore_used_but_not_detected
822#define YY_MORE_ADJ 0
823#define YY_RESTORE_YY_MORE_OFFSET
824char *yytext;
825#line 1 "../../cmd/tools/gmlscan.l"
826#line 2 "../../cmd/tools/gmlscan.l"
827 /* By default, Flex emits a lexer using symbols prefixed with "yy". Graphviz
828 * contains multiple Flex-generated lexers, so we alter this prefix to avoid
829 * symbol clashes.
830 */
831 /* Avoid generating an unused input function. See
832 https://westes.github.io/flex/manual/Scanner-Options.html
833 */
834#define YY_NO_INPUT 1
835#include <assert.h>
836#include <cgraph/alloc.h>
837#include <stdlib.h>
838#include <string.h>
839#include <gml2gv.h>
840#include <gmlparse.h>
841#include "config.h"
842
843#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */
844
845static int line_num = 1;
846static int errors;
847static FILE* Ifile;
848
849void initgmlscan(FILE *ifile)
850{
851 if (ifile) {
852 Ifile = ifile;
853 line_num = 1;
854 }
855 errors = 0;
856}
857
858#ifndef YY_INPUT
859#define YY_INPUT(buf,result,max_size) \
860 if ((result = fread(buf, 1, max_size, Ifile)) < 0) \
861 YY_FATAL_ERROR( "input in flex scanner failed" )
862#endif
863
864/* buffer for arbitrary length strings (longer than BUFSIZ) */
865static char *Sbuf;
866
867static void beginstr(void) {
868 assert(Sbuf == NULL && "leaking memory");
869 Sbuf = gv_strdup("");
870}
871
872static void addstr(const char *src) {
873 assert(Sbuf != NULL && "missing beginstr()");
874
875 // enlarge the buffer to make room for the suffix
876 {
877 size_t old_size = strlen(Sbuf) + 1;
878 size_t new_size = old_size + strlen(src);
879 Sbuf = gv_realloc(Sbuf, old_size, new_size);
880 }
881
882 strcat(Sbuf, src);
883}
884
885static void endstr(void) {
886 assert(Sbuf != NULL && "missing beginstr()");
887
888 // take ownership of the Sbuf backing memory
889 gmllval.str = Sbuf;
890 Sbuf = NULL;
891}
892
893#line 894 "gmlscan.c"
894
895#line 896 "gmlscan.c"
896
897#define INITIAL 0
898#define qstring 1
899
900#ifndef YY_NO_UNISTD_H
901/* Special case for "unistd.h", since it is non-ANSI. We include it way
902 * down here because we want the user's section 1 to have been scanned first.
903 * The user has a chance to override it with an option.
904 */
905#include <unistd.h>
906#endif
907
908#ifndef YY_EXTRA_TYPE
909#define YY_EXTRA_TYPE void *
910#endif
911
912static int yy_init_globals ( void );
913
914/* Accessor methods to globals.
915 These are made visible to non-reentrant scanners for convenience. */
916
917int yylex_destroy ( void );
918
919int yyget_debug ( void );
920
921void yyset_debug ( int debug_flag );
922
924
925void yyset_extra ( YY_EXTRA_TYPE user_defined );
926
927FILE *yyget_in ( void );
928
929void yyset_in ( FILE * _in_str );
930
931FILE *yyget_out ( void );
932
933void yyset_out ( FILE * _out_str );
934
935 int yyget_leng ( void );
936
937char *yyget_text ( void );
938
939int yyget_lineno ( void );
940
941void yyset_lineno ( int _line_number );
942
943/* Macros after this point can all be overridden by user definitions in
944 * section 1.
945 */
946
947#ifndef YY_SKIP_YYWRAP
948#ifdef __cplusplus
949extern "C" int yywrap ( void );
950#else
951extern int yywrap ( void );
952#endif
953#endif
954
955#ifndef YY_NO_UNPUT
956
957 static void yyunput ( int c, char *buf_ptr );
958
959#endif
960
961#ifndef yytext_ptr
962static void yy_flex_strncpy ( char *, const char *, int );
963#endif
964
965#ifdef YY_NEED_STRLEN
966static int yy_flex_strlen ( const char * );
967#endif
968
969#ifndef YY_NO_INPUT
970#ifdef __cplusplus
971static int yyinput ( void );
972#else
973static int input ( void );
974#endif
975
976#endif
977
978/* Amount of stuff to slurp up with each read. */
979#ifndef YY_READ_BUF_SIZE
980#ifdef __ia64__
981/* On IA-64, the buffer size is 16k, not 8k */
982#define YY_READ_BUF_SIZE 16384
983#else
984#define YY_READ_BUF_SIZE 8192
985#endif /* __ia64__ */
986#endif
987
988/* Copy whatever the last rule matched to the standard output. */
989#ifndef ECHO
990/* This used to be an fputs(), but since the string might contain NUL's,
991 * we now use fwrite().
992 */
993#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
994#endif
995
996/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
997 * is returned in "result".
998 */
999#ifndef YY_INPUT
1000#define YY_INPUT(buf,result,max_size) \
1001 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1002 { \
1003 int c = '*'; \
1004 int n; \
1005 for ( n = 0; n < max_size && \
1006 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1007 buf[n] = (char) c; \
1008 if ( c == '\n' ) \
1009 buf[n++] = (char) c; \
1010 if ( c == EOF && ferror( yyin ) ) \
1011 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1012 result = n; \
1013 } \
1014 else \
1015 { \
1016 errno=0; \
1017 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1018 { \
1019 if( errno != EINTR) \
1020 { \
1021 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1022 break; \
1023 } \
1024 errno=0; \
1025 clearerr(yyin); \
1026 } \
1027 }\
1028\
1029
1030#endif
1031
1032/* No semi-colon after return; correct usage is to write "yyterminate();" -
1033 * we don't want an extra ';' after the "return" because that will cause
1034 * some compilers to complain about unreachable statements.
1035 */
1036#ifndef yyterminate
1037#define yyterminate() return YY_NULL
1038#endif
1039
1040/* Number of entries by which start-condition stack grows. */
1041#ifndef YY_START_STACK_INCR
1042#define YY_START_STACK_INCR 25
1043#endif
1044
1045/* Report a fatal error. */
1046#ifndef YY_FATAL_ERROR
1047#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1048#endif
1049
1050/* end tables serialization structures and prototypes */
1051
1052/* Default declaration of generated scanner - a define so the user can
1053 * easily add parameters.
1054 */
1055#ifndef YY_DECL
1056#define YY_DECL_IS_OURS 1
1057
1058extern int yylex (void);
1059
1060#define YY_DECL int yylex (void)
1061#endif /* !YY_DECL */
1062
1063/* Code executed at the beginning of each rule, after yytext and yyleng
1064 * have been set up.
1065 */
1066#ifndef YY_USER_ACTION
1067#define YY_USER_ACTION
1068#endif
1069
1070/* Code executed at the end of each rule. */
1071#ifndef YY_BREAK
1072#define YY_BREAK /*LINTED*/break;
1073#endif
1074
1075#define YY_RULE_SETUP \
1076 if ( yyleng > 0 ) \
1077 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1078 (yytext[yyleng - 1] == '\n'); \
1079 YY_USER_ACTION
1080
1084{
1085 yy_state_type yy_current_state;
1086 char *yy_cp, *yy_bp;
1088
1089 if ( !(yy_init) )
1090 {
1091 (yy_init) = 1;
1092
1093#ifdef YY_USER_INIT
1094 YY_USER_INIT;
1095#endif
1096
1097 if ( ! (yy_start) )
1098 (yy_start) = 1; /* first start state */
1099
1100 if ( ! yyin )
1101 yyin = stdin;
1102
1103 if ( ! yyout )
1104 yyout = stdout;
1105
1106 if ( ! YY_CURRENT_BUFFER ) {
1110 }
1111
1113 }
1114
1115 {
1116#line 80 "../../cmd/tools/gmlscan.l"
1117
1118#line 1119 "gmlscan.c"
1119
1120 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1121 {
1122 yy_cp = (yy_c_buf_p);
1123
1124 /* Support of yytext. */
1125 *yy_cp = (yy_hold_char);
1126
1127 /* yy_bp points to the position in yy_ch_buf of the start of
1128 * the current run.
1129 */
1130 yy_bp = yy_cp;
1131
1132 yy_current_state = (yy_start);
1133 yy_current_state += YY_AT_BOL();
1134yy_match:
1135 do
1136 {
1137 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1138 if ( yy_accept[yy_current_state] )
1139 {
1140 (yy_last_accepting_state) = yy_current_state;
1142 }
1143 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1144 {
1145 yy_current_state = (int) yy_def[yy_current_state];
1146 if ( yy_current_state >= 143 )
1147 yy_c = yy_meta[yy_c];
1148 }
1149 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1150 ++yy_cp;
1151 }
1152 while ( yy_base[yy_current_state] != 301 );
1153
1154yy_find_action:
1155 yy_act = yy_accept[yy_current_state];
1156 if ( yy_act == 0 )
1157 { /* have to back up */
1159 yy_current_state = (yy_last_accepting_state);
1160 yy_act = yy_accept[yy_current_state];
1161 }
1162
1164
1165do_action: /* This label is used only to access EOF actions. */
1166
1167 switch ( yy_act )
1168 { /* beginning of action switch */
1169 case 0: /* must back up */
1170 /* undo the effects of YY_DO_BEFORE_ACTION */
1171 *yy_cp = (yy_hold_char);
1173 yy_current_state = (yy_last_accepting_state);
1174 goto yy_find_action;
1175
1176case 1:
1178#line 81 "../../cmd/tools/gmlscan.l"
1179return(EOF);
1180 YY_BREAK
1181case 2:
1182/* rule 2 can match eol */
1184#line 82 "../../cmd/tools/gmlscan.l"
1185line_num++;
1186 YY_BREAK
1187case 3:
1189#line 83 "../../cmd/tools/gmlscan.l"
1190/* ignore # line */
1191 YY_BREAK
1192case 4:
1194#line 84 "../../cmd/tools/gmlscan.l"
1195/* ignore whitespace */
1196 YY_BREAK
1197case 5:
1199#line 86 "../../cmd/tools/gmlscan.l"
1200return (GRAPH);
1201 YY_BREAK
1202case 6:
1204#line 87 "../../cmd/tools/gmlscan.l"
1205return (NODE);
1206 YY_BREAK
1207case 7:
1209#line 88 "../../cmd/tools/gmlscan.l"
1210return (EDGE);
1211 YY_BREAK
1212case 8:
1214#line 89 "../../cmd/tools/gmlscan.l"
1215return (DIRECTED);
1216 YY_BREAK
1217case 9:
1219#line 90 "../../cmd/tools/gmlscan.l"
1220return (ID);
1221 YY_BREAK
1222case 10:
1224#line 91 "../../cmd/tools/gmlscan.l"
1225return (SOURCE);
1226 YY_BREAK
1227case 11:
1229#line 92 "../../cmd/tools/gmlscan.l"
1230return (TARGET);
1231 YY_BREAK
1232case 12:
1234#line 93 "../../cmd/tools/gmlscan.l"
1235return (XVAL);
1236 YY_BREAK
1237case 13:
1239#line 94 "../../cmd/tools/gmlscan.l"
1240return (YVAL);
1241 YY_BREAK
1242case 14:
1244#line 95 "../../cmd/tools/gmlscan.l"
1245return (WVAL);
1246 YY_BREAK
1247case 15:
1249#line 96 "../../cmd/tools/gmlscan.l"
1250return (HVAL);
1251 YY_BREAK
1252case 16:
1254#line 97 "../../cmd/tools/gmlscan.l"
1255return (LABEL);
1256 YY_BREAK
1257case 17:
1259#line 98 "../../cmd/tools/gmlscan.l"
1260return (GRAPHICS);;
1261 YY_BREAK
1262case 18:
1264#line 99 "../../cmd/tools/gmlscan.l"
1265return (LABELGRAPHICS);
1266 YY_BREAK
1267case 19:
1269#line 100 "../../cmd/tools/gmlscan.l"
1270return (TYPE);
1271 YY_BREAK
1272case 20:
1274#line 101 "../../cmd/tools/gmlscan.l"
1275return (FILL);
1276 YY_BREAK
1277case 21:
1279#line 102 "../../cmd/tools/gmlscan.l"
1280return (OUTLINE);
1281 YY_BREAK
1282case 22:
1284#line 103 "../../cmd/tools/gmlscan.l"
1285return (OUTLINESTYLE);
1286 YY_BREAK
1287case 23:
1289#line 104 "../../cmd/tools/gmlscan.l"
1290return (OUTLINEWIDTH);
1291 YY_BREAK
1292case 24:
1294#line 105 "../../cmd/tools/gmlscan.l"
1295return (WIDTH);
1296 YY_BREAK
1297case 25:
1299#line 106 "../../cmd/tools/gmlscan.l"
1300return (STYLE);
1301 YY_BREAK
1302case 26:
1304#line 107 "../../cmd/tools/gmlscan.l"
1305return (LINE);
1306 YY_BREAK
1307case 27:
1309#line 108 "../../cmd/tools/gmlscan.l"
1310return (POINT);
1311 YY_BREAK
1312case 28:
1314#line 109 "../../cmd/tools/gmlscan.l"
1315return (TEXT);
1316 YY_BREAK
1317case 29:
1319#line 110 "../../cmd/tools/gmlscan.l"
1320return (FONTSIZE);
1321 YY_BREAK
1322case 30:
1324#line 111 "../../cmd/tools/gmlscan.l"
1325return (FONTNAME);
1326 YY_BREAK
1327case 31:
1329#line 112 "../../cmd/tools/gmlscan.l"
1330return (COLOR);
1331 YY_BREAK
1332case 32:
1334#line 113 "../../cmd/tools/gmlscan.l"
1335{ gmllval.str = gv_strdup(yytext); return (INTEGER); }
1336 YY_BREAK
1337case 33:
1339#line 114 "../../cmd/tools/gmlscan.l"
1340{ gmllval.str = gv_strdup(yytext); return (REAL); }
1341 YY_BREAK
1342case 34:
1344#line 115 "../../cmd/tools/gmlscan.l"
1345{ gmllval.str = gv_strdup(yytext); return (NAME); }
1346 YY_BREAK
1347case 35:
1349#line 116 "../../cmd/tools/gmlscan.l"
1351 YY_BREAK
1352case 36:
1354#line 118 "../../cmd/tools/gmlscan.l"
1355BEGIN(INITIAL); endstr(); return (STRING);
1356 YY_BREAK
1357case 37:
1358/* rule 37 can match eol */
1360#line 119 "../../cmd/tools/gmlscan.l"
1361addstr(yytext);
1362 YY_BREAK
1363case 38:
1365#line 121 "../../cmd/tools/gmlscan.l"
1366return (yytext[0]);
1367 YY_BREAK
1368case 39:
1370#line 123 "../../cmd/tools/gmlscan.l"
1371ECHO;
1372 YY_BREAK
1373#line 1374 "gmlscan.c"
1374case YY_STATE_EOF(INITIAL):
1375case YY_STATE_EOF(qstring):
1376 yyterminate();
1377
1378 case YY_END_OF_BUFFER:
1379 {
1380 /* Amount of text matched not including the EOB char. */
1381 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1382
1383 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1384 *yy_cp = (yy_hold_char);
1386
1387 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1388 {
1389 /* We're scanning a new file or input source. It's
1390 * possible that this happened because the user
1391 * just pointed yyin at a new source and called
1392 * yylex(). If so, then we have to assure
1393 * consistency between YY_CURRENT_BUFFER and our
1394 * globals. Here is the right place to do so, because
1395 * this is the first action (other than possibly a
1396 * back-up) that will match for the new input source.
1397 */
1398 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1399 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1400 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1401 }
1402
1403 /* Note that here we test for yy_c_buf_p "<=" to the position
1404 * of the first EOB in the buffer, since yy_c_buf_p will
1405 * already have been incremented past the NUL character
1406 * (since all states make transitions on EOB to the
1407 * end-of-buffer state). Contrast this with the test
1408 * in input().
1409 */
1410 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1411 { /* This was really a NUL. */
1412 yy_state_type yy_next_state;
1413
1414 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1415
1416 yy_current_state = yy_get_previous_state( );
1417
1418 /* Okay, we're now positioned to make the NUL
1419 * transition. We couldn't have
1420 * yy_get_previous_state() go ahead and do it
1421 * for us because it doesn't know how to deal
1422 * with the possibility of jamming (and we don't
1423 * want to build jamming into it because then it
1424 * will run more slowly).
1425 */
1426
1427 yy_next_state = yy_try_NUL_trans( yy_current_state );
1428
1430
1431 if ( yy_next_state )
1432 {
1433 /* Consume the NUL. */
1434 yy_cp = ++(yy_c_buf_p);
1435 yy_current_state = yy_next_state;
1436 goto yy_match;
1437 }
1438
1439 else
1440 {
1441 yy_cp = (yy_c_buf_p);
1442 goto yy_find_action;
1443 }
1444 }
1445
1446 else switch ( yy_get_next_buffer( ) )
1447 {
1449 {
1451
1452 if ( yywrap( ) )
1453 {
1454 /* Note: because we've taken care in
1455 * yy_get_next_buffer() to have set up
1456 * yytext, we can now set up
1457 * yy_c_buf_p so that if some total
1458 * hoser (like flex itself) wants to
1459 * call the scanner after we return the
1460 * YY_NULL, it'll still work - another
1461 * YY_NULL will get returned.
1462 */
1464
1466 goto do_action;
1467 }
1468
1469 else
1470 {
1473 }
1474 break;
1475 }
1476
1478 (yy_c_buf_p) =
1479 (yytext_ptr) + yy_amount_of_matched_text;
1480
1481 yy_current_state = yy_get_previous_state( );
1482
1483 yy_cp = (yy_c_buf_p);
1485 goto yy_match;
1486
1487 case EOB_ACT_LAST_MATCH:
1488 (yy_c_buf_p) =
1489 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1490
1491 yy_current_state = yy_get_previous_state( );
1492
1493 yy_cp = (yy_c_buf_p);
1495 goto yy_find_action;
1496 }
1497 break;
1498 }
1499
1500 default:
1502 "fatal flex scanner internal error--no action found" );
1503 } /* end of action switch */
1504 } /* end of scanning one token */
1505 } /* end of user's declarations */
1506} /* end of yylex */
1507
1508/* yy_get_next_buffer - try to read in a new buffer
1509 *
1510 * Returns a code representing an action:
1511 * EOB_ACT_LAST_MATCH -
1512 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1513 * EOB_ACT_END_OF_FILE - end of file
1514 */
1515static int yy_get_next_buffer (void)
1516{
1517 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1518 char *source = (yytext_ptr);
1519 int number_to_move, i;
1520 int ret_val;
1521
1522 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1524 "fatal flex scanner internal error--end of buffer missed" );
1525
1526 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1527 { /* Don't try to fill the buffer, so this is an EOF. */
1528 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1529 {
1530 /* We matched a single character, the EOB, so
1531 * treat this as a final EOF.
1532 */
1533 return EOB_ACT_END_OF_FILE;
1534 }
1535
1536 else
1537 {
1538 /* We matched some text prior to the EOB, first
1539 * process it.
1540 */
1541 return EOB_ACT_LAST_MATCH;
1542 }
1543 }
1544
1545 /* Try to read more data. */
1546
1547 /* First move last chars to start of buffer. */
1548 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1549
1550 for ( i = 0; i < number_to_move; ++i )
1551 *(dest++) = *(source++);
1552
1553 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1554 /* don't do the read, it's not guaranteed to return an EOF,
1555 * just force an EOF
1556 */
1557 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1558
1559 else
1560 {
1561 int num_to_read =
1562 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1563
1564 while ( num_to_read <= 0 )
1565 { /* Not enough room in the buffer - grow it. */
1566
1567 /* just a shorter name for the current buffer */
1569
1570 int yy_c_buf_p_offset =
1571 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1572
1573 if ( b->yy_is_our_buffer )
1574 {
1575 int new_size = b->yy_buf_size * 2;
1576
1577 if ( new_size <= 0 )
1578 b->yy_buf_size += b->yy_buf_size / 8;
1579 else
1580 b->yy_buf_size *= 2;
1581
1582 b->yy_ch_buf = (char *)
1583 /* Include room in for 2 EOB chars. */
1584 yyrealloc( (void *) b->yy_ch_buf,
1585 (yy_size_t) (b->yy_buf_size + 2) );
1586 }
1587 else
1588 /* Can't grow it, we don't own it. */
1589 b->yy_ch_buf = NULL;
1590
1591 if ( ! b->yy_ch_buf )
1593 "fatal error - scanner input buffer overflow" );
1594
1595 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1596
1597 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1598 number_to_move - 1;
1599
1600 }
1601
1602 if ( num_to_read > YY_READ_BUF_SIZE )
1603 num_to_read = YY_READ_BUF_SIZE;
1604
1605 /* Read in more data. */
1606 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1607 (yy_n_chars), num_to_read );
1608
1609 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1610 }
1611
1612 if ( (yy_n_chars) == 0 )
1613 {
1614 if ( number_to_move == YY_MORE_ADJ )
1615 {
1616 ret_val = EOB_ACT_END_OF_FILE;
1617 yyrestart( yyin );
1618 }
1619
1620 else
1621 {
1622 ret_val = EOB_ACT_LAST_MATCH;
1623 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1625 }
1626 }
1627
1628 else
1629 ret_val = EOB_ACT_CONTINUE_SCAN;
1630
1631 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1632 /* Extend the array by 50%, plus the number we really need. */
1633 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1634 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1635 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1636 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1637 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1638 /* "- 2" to take care of EOB's */
1639 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1640 }
1641
1642 (yy_n_chars) += number_to_move;
1645
1646 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1647
1648 return ret_val;
1649}
1650
1651/* yy_get_previous_state - get the state just before the EOB char was reached */
1652
1654{
1655 yy_state_type yy_current_state;
1656 char *yy_cp;
1657
1658 yy_current_state = (yy_start);
1659 yy_current_state += YY_AT_BOL();
1660
1661 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1662 {
1663 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1664 if ( yy_accept[yy_current_state] )
1665 {
1666 (yy_last_accepting_state) = yy_current_state;
1668 }
1669 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1670 {
1671 yy_current_state = (int) yy_def[yy_current_state];
1672 if ( yy_current_state >= 143 )
1673 yy_c = yy_meta[yy_c];
1674 }
1675 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1676 }
1677
1678 return yy_current_state;
1679}
1680
1681/* yy_try_NUL_trans - try to make a transition on the NUL character
1682 *
1683 * synopsis
1684 * next_state = yy_try_NUL_trans( current_state );
1685 */
1686 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1687{
1688 int yy_is_jam;
1689 char *yy_cp = (yy_c_buf_p);
1690
1691 YY_CHAR yy_c = 1;
1692 if ( yy_accept[yy_current_state] )
1693 {
1694 (yy_last_accepting_state) = yy_current_state;
1696 }
1697 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1698 {
1699 yy_current_state = (int) yy_def[yy_current_state];
1700 if ( yy_current_state >= 143 )
1701 yy_c = yy_meta[yy_c];
1702 }
1703 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1704 yy_is_jam = (yy_current_state == 142);
1705
1706 return yy_is_jam ? 0 : yy_current_state;
1707}
1708
1709#ifndef YY_NO_UNPUT
1710
1711 static void yyunput (int c, char * yy_bp )
1712{
1713 char *yy_cp;
1714
1715 yy_cp = (yy_c_buf_p);
1716
1717 /* undo effects of setting up yytext */
1718 *yy_cp = (yy_hold_char);
1719
1720 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1721 { /* need to shift things up to make room */
1722 /* +2 for EOB chars. */
1723 int number_to_move = (yy_n_chars) + 2;
1724 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1725 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1726 char *source =
1727 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1728
1729 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1730 *--dest = *--source;
1731
1732 yy_cp += (int) (dest - source);
1733 yy_bp += (int) (dest - source);
1734 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1735 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1736
1737 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1738 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1739 }
1740
1741 *--yy_cp = (char) c;
1742
1743 (yytext_ptr) = yy_bp;
1744 (yy_hold_char) = *yy_cp;
1745 (yy_c_buf_p) = yy_cp;
1746}
1747
1748#endif
1749
1750#ifndef YY_NO_INPUT
1751#ifdef __cplusplus
1752 static int yyinput (void)
1753#else
1754 static int input (void)
1755#endif
1756
1757{
1758 int c;
1759
1760 *(yy_c_buf_p) = (yy_hold_char);
1761
1763 {
1764 /* yy_c_buf_p now points to the character we want to return.
1765 * If this occurs *before* the EOB characters, then it's a
1766 * valid NUL; if not, then we've hit the end of the buffer.
1767 */
1768 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1769 /* This was really a NUL. */
1770 *(yy_c_buf_p) = '\0';
1771
1772 else
1773 { /* need more input */
1774 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1775 ++(yy_c_buf_p);
1776
1777 switch ( yy_get_next_buffer( ) )
1778 {
1779 case EOB_ACT_LAST_MATCH:
1780 /* This happens because yy_g_n_b()
1781 * sees that we've accumulated a
1782 * token and flags that we need to
1783 * try matching the token before
1784 * proceeding. But for input(),
1785 * there's no matching to consider.
1786 * So convert the EOB_ACT_LAST_MATCH
1787 * to EOB_ACT_END_OF_FILE.
1788 */
1789
1790 /* Reset buffer status. */
1791 yyrestart( yyin );
1792
1793 /*FALLTHROUGH*/
1794
1796 {
1797 if ( yywrap( ) )
1798 return 0;
1799
1802#ifdef __cplusplus
1803 return yyinput();
1804#else
1805 return input();
1806#endif
1807 }
1808
1811 break;
1812 }
1813 }
1814 }
1815
1816 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1817 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1818 (yy_hold_char) = *++(yy_c_buf_p);
1819
1820 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1821
1822 return c;
1823}
1824#endif /* ifndef YY_NO_INPUT */
1825
1831 void yyrestart (FILE * input_file )
1832{
1833
1834 if ( ! YY_CURRENT_BUFFER ){
1838 }
1839
1840 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1842}
1843
1848 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1849{
1850
1851 /* TODO. We should be able to replace this entire function body
1852 * with
1853 * yypop_buffer_state();
1854 * yypush_buffer_state(new_buffer);
1855 */
1857 if ( YY_CURRENT_BUFFER == new_buffer )
1858 return;
1859
1860 if ( YY_CURRENT_BUFFER )
1861 {
1862 /* Flush out information for old buffer. */
1863 *(yy_c_buf_p) = (yy_hold_char);
1864 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1865 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1866 }
1867
1868 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1870
1871 /* We don't actually know whether we did this switch during
1872 * EOF (yywrap()) processing, but the only time this flag
1873 * is looked at is after yywrap() is called, so it's safe
1874 * to go ahead and always set it.
1875 */
1877}
1878
1879static void yy_load_buffer_state (void)
1880{
1881 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1883 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1884 (yy_hold_char) = *(yy_c_buf_p);
1885}
1886
1893 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1894{
1896
1897 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1898 if ( ! b )
1899 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1900
1901 b->yy_buf_size = size;
1902
1903 /* yy_ch_buf has to be 2 characters longer than the size given because
1904 * we need to put in 2 end-of-buffer characters.
1905 */
1906 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1907 if ( ! b->yy_ch_buf )
1908 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1909
1910 b->yy_is_our_buffer = 1;
1911
1912 yy_init_buffer( b, file );
1913
1914 return b;
1915}
1916
1922{
1923
1924 if ( ! b )
1925 return;
1926
1927 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1929
1930 if ( b->yy_is_our_buffer )
1931 yyfree( (void *) b->yy_ch_buf );
1932
1933 yyfree( (void *) b );
1934}
1935
1936/* Initializes or reinitializes a buffer.
1937 * This function is sometimes called more than once on the same buffer,
1938 * such as during a yyrestart() or at EOF.
1939 */
1940 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1941
1942{
1943 int oerrno = errno;
1944
1945 yy_flush_buffer( b );
1946
1947 b->yy_input_file = file;
1948 b->yy_fill_buffer = 1;
1949
1950 /* If b is the current buffer, then yy_init_buffer was _probably_
1951 * called from yyrestart() or through yy_get_next_buffer.
1952 * In that case, we don't want to reset the lineno or column.
1953 */
1954 if (b != YY_CURRENT_BUFFER){
1955 b->yy_bs_lineno = 1;
1956 b->yy_bs_column = 0;
1957 }
1958
1959 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1960
1961 errno = oerrno;
1962}
1963
1969{
1970 if ( ! b )
1971 return;
1972
1973 b->yy_n_chars = 0;
1974
1975 /* We always need two end-of-buffer characters. The first causes
1976 * a transition to the end-of-buffer state. The second causes
1977 * a jam in that state.
1978 */
1981
1982 b->yy_buf_pos = &b->yy_ch_buf[0];
1983
1984 b->yy_at_bol = 1;
1986
1987 if ( b == YY_CURRENT_BUFFER )
1989}
1990
1997void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1998{
1999 if (new_buffer == NULL)
2000 return;
2001
2003
2004 /* This block is copied from yy_switch_to_buffer. */
2005 if ( YY_CURRENT_BUFFER )
2006 {
2007 /* Flush out information for old buffer. */
2008 *(yy_c_buf_p) = (yy_hold_char);
2009 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2010 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2011 }
2012
2013 /* Only push if top exists. Otherwise, replace top. */
2016 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2017
2018 /* copied from yy_switch_to_buffer. */
2021}
2022
2027void yypop_buffer_state (void)
2028{
2029 if (!YY_CURRENT_BUFFER)
2030 return;
2031
2034 if ((yy_buffer_stack_top) > 0)
2036
2037 if (YY_CURRENT_BUFFER) {
2040 }
2041}
2042
2043/* Allocates the stack if it does not exist.
2044 * Guarantees space for at least one push.
2045 */
2046static void yyensure_buffer_stack (void)
2047{
2048 yy_size_t num_to_alloc;
2049
2050 if (!(yy_buffer_stack)) {
2051
2052 /* First allocation is just for 2 elements, since we don't know if this
2053 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2054 * immediate realloc on the next call.
2055 */
2056 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2058 (num_to_alloc * sizeof(struct yy_buffer_state*)
2059 );
2060 if ( ! (yy_buffer_stack) )
2061 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2062
2063 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2064
2065 (yy_buffer_stack_max) = num_to_alloc;
2066 (yy_buffer_stack_top) = 0;
2067 return;
2068 }
2069
2070 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2071
2072 /* Increase the buffer to prepare for a possible push. */
2073 yy_size_t grow_size = 8 /* arbitrary grow size */;
2074
2075 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2077 ((yy_buffer_stack),
2078 num_to_alloc * sizeof(struct yy_buffer_state*)
2079 );
2080 if ( ! (yy_buffer_stack) )
2081 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2082
2083 /* zero only the new slots.*/
2084 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2085 (yy_buffer_stack_max) = num_to_alloc;
2086 }
2087}
2088
2095YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2096{
2098
2099 if ( size < 2 ||
2100 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2101 base[size-1] != YY_END_OF_BUFFER_CHAR )
2102 /* They forgot to leave room for the EOB's. */
2103 return NULL;
2104
2105 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2106 if ( ! b )
2107 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2108
2109 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2110 b->yy_buf_pos = b->yy_ch_buf = base;
2111 b->yy_is_our_buffer = 0;
2112 b->yy_input_file = NULL;
2113 b->yy_n_chars = b->yy_buf_size;
2114 b->yy_is_interactive = 0;
2115 b->yy_at_bol = 1;
2116 b->yy_fill_buffer = 0;
2118
2120
2121 return b;
2122}
2123
2132YY_BUFFER_STATE yy_scan_string (const char * yystr )
2133{
2134
2135 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2136}
2137
2145YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2146{
2148 char *buf;
2149 yy_size_t n;
2150 int i;
2151
2152 /* Get memory for full buffer, including space for trailing EOB's. */
2153 n = (yy_size_t) (_yybytes_len + 2);
2154 buf = (char *) yyalloc( n );
2155 if ( ! buf )
2156 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2157
2158 for ( i = 0; i < _yybytes_len; ++i )
2159 buf[i] = yybytes[i];
2160
2161 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2162
2163 b = yy_scan_buffer( buf, n );
2164 if ( ! b )
2165 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2166
2167 /* It's okay to grow etc. this buffer, and we should throw it
2168 * away when we're done.
2169 */
2170 b->yy_is_our_buffer = 1;
2171
2172 return b;
2173}
2174
2175#ifndef YY_EXIT_FAILURE
2176#define YY_EXIT_FAILURE 2
2177#endif
2178
2179static void yynoreturn yy_fatal_error (const char* msg )
2180{
2181 fprintf( stderr, "%s\n", msg );
2182 exit( YY_EXIT_FAILURE );
2183}
2184
2185/* Redefine yyless() so it works in section 3 code. */
2186
2187#undef yyless
2188#define yyless(n) \
2189 do \
2190 { \
2191 /* Undo effects of setting up yytext. */ \
2192 int yyless_macro_arg = (n); \
2193 YY_LESS_LINENO(yyless_macro_arg);\
2194 yytext[yyleng] = (yy_hold_char); \
2195 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2196 (yy_hold_char) = *(yy_c_buf_p); \
2197 *(yy_c_buf_p) = '\0'; \
2198 yyleng = yyless_macro_arg; \
2199 } \
2200 while ( 0 )
2201
2202/* Accessor methods (get/set functions) to struct members. */
2203
2207int yyget_lineno (void)
2208{
2209
2210 return yylineno;
2211}
2212
2216FILE *yyget_in (void)
2217{
2218 return yyin;
2219}
2220
2224FILE *yyget_out (void)
2225{
2226 return yyout;
2227}
2228
2232int yyget_leng (void)
2233{
2234 return yyleng;
2235}
2236
2241char *yyget_text (void)
2242{
2243 return yytext;
2244}
2245
2250void yyset_lineno (int _line_number )
2251{
2252
2253 yylineno = _line_number;
2254}
2255
2262void yyset_in (FILE * _in_str )
2263{
2264 yyin = _in_str ;
2265}
2266
2267void yyset_out (FILE * _out_str )
2268{
2269 yyout = _out_str ;
2270}
2271
2272int yyget_debug (void)
2273{
2274 return yy_flex_debug;
2275}
2276
2277void yyset_debug (int _bdebug )
2278{
2279 yy_flex_debug = _bdebug ;
2280}
2281
2282static int yy_init_globals (void)
2283{
2284 /* Initialization is the same as for the non-reentrant scanner.
2285 * This function is called from yylex_destroy(), so don't allocate here.
2286 */
2287
2289 (yy_buffer_stack_top) = 0;
2290 (yy_buffer_stack_max) = 0;
2291 (yy_c_buf_p) = NULL;
2292 (yy_init) = 0;
2293 (yy_start) = 0;
2294
2295/* Defined in main.c */
2296#ifdef YY_STDINIT
2297 yyin = stdin;
2298 yyout = stdout;
2299#else
2300 yyin = NULL;
2301 yyout = NULL;
2302#endif
2303
2304 /* For future reference: Set errno on error, since we are called by
2305 * yylex_init()
2306 */
2307 return 0;
2308}
2309
2310/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2311int yylex_destroy (void)
2312{
2313
2314 /* Pop the buffer stack, destroying each element. */
2315 while(YY_CURRENT_BUFFER){
2319 }
2320
2321 /* Destroy the stack itself. */
2324
2325 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2326 * yylex() is called, initialization will occur. */
2327 yy_init_globals( );
2328
2329 return 0;
2330}
2331
2332/*
2333 * Internal utility routines.
2334 */
2335
2336#ifndef yytext_ptr
2337static void yy_flex_strncpy (char* s1, const char * s2, int n )
2338{
2339
2340 int i;
2341 for ( i = 0; i < n; ++i )
2342 s1[i] = s2[i];
2343}
2344#endif
2345
2346#ifdef YY_NEED_STRLEN
2347static int yy_flex_strlen (const char * s )
2348{
2349 int n;
2350 for ( n = 0; s[n]; ++n )
2351 ;
2352
2353 return n;
2354}
2355#endif
2356
2357void *yyalloc (yy_size_t size )
2358{
2359 return malloc(size);
2360}
2361
2362void *yyrealloc (void * ptr, yy_size_t size )
2363{
2364
2365 /* The cast to (char *) in the following accommodates both
2366 * implementations that use char* generic pointers, and those
2367 * that use void* generic pointers. It works with the latter
2368 * because both ANSI C and C++ allow castless assignment from
2369 * any pointer type to void*, and deal with argument conversions
2370 * as though doing an assignment.
2371 */
2372 return realloc(ptr, size);
2373}
2374
2375void yyfree (void * ptr )
2376{
2377 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2378}
2379
2380#define YYTABLES_NAME "yytables"
2381
2382#line 123 "../../cmd/tools/gmlscan.l"
2383
2384
2385void gmlerror(const char *str)
2386{
2387 if (errors)
2388 return;
2389 errors = 1;
2390 agwarningf(" %s in line %d near '%s'\n", str,line_num,yytext);
2391}
2392
2393int gmlerrors(void)
2394{
2395 return errors;
2396}
2397
2398void gmllexeof(void) { unput(GRAPH_EOF_TOKEN); }
2399
2400#ifndef YY_CALL_ONLY_ARG
2401# define YY_CALL_ONLY_ARG void
2402#endif
2403
2405{
2406 return 1;
2407}
2408
2409
Memory allocation wrappers that exit on failure.
static char * gv_strdup(const char *original)
Definition alloc.h:101
static void * gv_realloc(void *ptr, size_t old_size, size_t new_size)
Definition alloc.h:49
#define DIRECTED
Definition gc.c:48
static double len(glCompPoint p)
Definition glutils.c:150
GML-DOT converter
int gmlerrors(void)
Definition gmlscan.l:133
void gmlerror(const char *)
Definition gmlscan.l:125
void gmllexeof(void)
Definition gmlscan.l:138
#define LABEL
Definition gmlparse.c:396
#define OUTLINESTYLE
Definition gmlparse.c:402
#define WIDTH
Definition gmlparse.c:404
GMLSTYPE gmllval
#define GRAPHICS
Definition gmlparse.c:397
#define REAL
Definition gmlparse.c:413
#define POINT
Definition gmlparse.c:407
#define NAME
Definition gmlparse.c:416
#define COLOR
Definition gmlparse.c:411
#define TEXT
Definition gmlparse.c:408
#define TYPE
Definition gmlparse.c:399
#define FONTSIZE
Definition gmlparse.c:409
#define FILL
Definition gmlparse.c:400
#define ID
Definition gmlparse.c:415
#define OUTLINEWIDTH
Definition gmlparse.c:403
#define SOURCE
Definition gmlparse.c:390
void * malloc(YYSIZE_T)
#define NODE
Definition gmlparse.c:387
#define TARGET
Definition gmlparse.c:391
#define STRING
Definition gmlparse.c:414
#define WVAL
Definition gmlparse.c:394
#define EDGE
Definition gmlparse.c:388
#define STYLE
Definition gmlparse.c:405
#define INTEGER
Definition gmlparse.c:412
#define HVAL
Definition gmlparse.c:395
#define YVAL
Definition gmlparse.c:393
#define FONTNAME
Definition gmlparse.c:410
#define LABELGRAPHICS
Definition gmlparse.c:398
void free(void *)
#define XVAL
Definition gmlparse.c:392
#define LINE
Definition gmlparse.c:406
#define OUTLINE
Definition gmlparse.c:401
#define GRAPH
Definition gmlparse.c:386
#define yylex_destroy
Definition gmlscan.c:141
#define YY_NEW_FILE
Definition gmlscan.c:387
#define yyget_extra
Definition gmlscan.c:159
#define yyset_extra
Definition gmlscan.c:165
#define yyget_leng
Definition gmlscan.c:195
static char * Sbuf
Definition gmlscan.c:865
unsigned char flex_uint8_t
Definition gmlscan.c:313
#define yyset_lineno
Definition gmlscan.c:213
static char yy_hold_char
Definition gmlscan.c:528
#define yyleng
Definition gmlscan.c:23
static yy_state_type yy_last_accepting_state
Definition gmlscan.c:811
#define yyrestart
Definition gmlscan.c:27
#define yyset_debug
Definition gmlscan.c:153
static void yyunput(int c, char *buf_ptr)
static void yynoreturn yy_fatal_error(const char *msg)
#define YY_EXTRA_TYPE
Definition gmlscan.c:909
#define yyout
Definition gmlscan.c:26
static int yy_start
Definition gmlscan.c:535
short int flex_int16_t
Definition gmlscan.c:311
static YY_BUFFER_STATE * yy_buffer_stack
Definition gmlscan.c:511
#define qstring
Definition gmlscan.c:898
#define yytext
Definition gmlscan.c:28
unsigned int flex_uint32_t
Definition gmlscan.c:315
#define GRAPH_EOF_TOKEN
Definition gmlscan.c:843
static int yy_get_next_buffer(void)
#define yy_scan_bytes
Definition gmlscan.c:13
static void endstr(void)
Definition gmlscan.c:885
#define YY_BREAK
Definition gmlscan.c:1072
static int errors
Definition gmlscan.c:846
static void addstr(const char *src)
Definition gmlscan.c:872
static size_t yy_buffer_stack_max
Definition gmlscan.c:510
#define unput(c)
Definition gmlscan.c:441
#define yynoreturn
Definition gmlscan.c:362
#define yyget_text
Definition gmlscan.c:201
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
int yy_act
Definition gmlscan.c:1087
#define yypush_buffer_state
Definition gmlscan.c:18
struct yy_buffer_state * YY_BUFFER_STATE
Definition gmlscan.c:409
#define yyfree
Definition gmlscan.c:32
#define YY_BUFFER_NEW
Definition gmlscan.c:491
#define yylex
Definition gmlscan.c:24
#define YY_RESTORE_YY_MORE_OFFSET
Definition gmlscan.c:823
static int yy_did_buffer_switch_on_eof
Definition gmlscan.c:540
static const flex_int16_t yy_accept[143]
Definition gmlscan.c:623
static int yy_init_globals(void)
#define yyget_lineno
Definition gmlscan.c:207
static const YY_CHAR yy_meta[55]
Definition gmlscan.c:675
#define yylineno
Definition gmlscan.c:25
#define YY_BUFFER_NORMAL
Definition gmlscan.c:492
char * yy_cp
Definition gmlscan.c:1086
#define yy_scan_buffer
Definition gmlscan.c:11
#define YY_MORE_ADJ
Definition gmlscan.c:822
#define YY_RULE_SETUP
Definition gmlscan.c:1075
#define yy_scan_string
Definition gmlscan.c:12
#define YY_AT_BOL()
Definition gmlscan.c:582
#define yy_flex_debug
Definition gmlscan.c:21
static int line_num
Definition gmlscan.c:845
#define yytext_ptr
Definition gmlscan.c:598
signed char flex_int8_t
Definition gmlscan.c:310
#define EOB_ACT_END_OF_FILE
Definition gmlscan.c:422
#define yyalloc
Definition gmlscan.c:30
static const flex_int16_t yy_base[147]
Definition gmlscan.c:685
#define YY_CURRENT_BUFFER_LVALUE
Definition gmlscan.c:525
#define yyget_debug
Definition gmlscan.c:147
int flex_int32_t
Definition gmlscan.c:312
#define yyin
Definition gmlscan.c:22
#define YY_START
Definition gmlscan.c:382
#define yyensure_buffer_stack
Definition gmlscan.c:20
#define yy_switch_to_buffer
Definition gmlscan.c:17
int yy_state_type
Definition gmlscan.c:589
#define YY_CURRENT_BUFFER
Definition gmlscan.c:519
#define yy_init_buffer
Definition gmlscan.c:14
#define INITIAL
Definition gmlscan.c:897
#define yypop_buffer_state
Definition gmlscan.c:19
#define yyget_in
Definition gmlscan.c:171
char * yy_bp
Definition gmlscan.c:1086
static int yy_n_chars
Definition gmlscan.c:529
#define YY_READ_BUF_SIZE
Definition gmlscan.c:984
#define YY_INPUT(buf, result, max_size)
Definition gmlscan.c:859
#define ECHO
Definition gmlscan.c:993
static const flex_int16_t yy_chk[356]
Definition gmlscan.c:768
#define yy_flush_buffer
Definition gmlscan.c:15
#define yyrealloc
Definition gmlscan.c:31
#define YY_END_OF_BUFFER
Definition gmlscan.c:615
#define YY_STATE_EOF(state)
Definition gmlscan.c:385
#define BEGIN
Definition gmlscan.c:377
#define YY_END_OF_BUFFER_CHAR
Definition gmlscan.c:388
#define YY_FATAL_ERROR(msg)
Definition gmlscan.c:1047
#define yyget_out
Definition gmlscan.c:183
#define yyterminate()
Definition gmlscan.c:1037
unsigned short int flex_uint16_t
Definition gmlscan.c:314
#define yy_create_buffer
Definition gmlscan.c:9
flex_uint8_t YY_CHAR
Definition gmlscan.c:585
#define YY_DO_BEFORE_ACTION
Definition gmlscan.c:608
#define yy_delete_buffer
Definition gmlscan.c:10
#define EOB_ACT_LAST_MATCH
Definition gmlscan.c:423
size_t yy_size_t
Definition gmlscan.c:414
#define YY_CALL_ONLY_ARG
#define YY_BUFFER_EOF_PENDING
Definition gmlscan.c:503
void initgmlscan(FILE *ifile)
Definition gmlscan.c:849
static yy_state_type yy_get_previous_state(void)
static const YY_CHAR yy_ec[256]
Definition gmlscan.c:643
#define yyset_out
Definition gmlscan.c:189
static char * yy_c_buf_p
Definition gmlscan.c:533
#define EOB_ACT_CONTINUE_SCAN
Definition gmlscan.c:421
static const flex_int16_t yy_nxt[356]
Definition gmlscan.c:725
static size_t yy_buffer_stack_top
Definition gmlscan.c:509
#define YY_DECL
Definition gmlscan.c:1060
#define YY_BUF_SIZE
Definition gmlscan.c:399
static const flex_int16_t yy_def[147]
Definition gmlscan.c:705
#define YY_EXIT_FAILURE
static int yy_init
Definition gmlscan.c:534
static FILE * Ifile
Definition gmlscan.c:847
#define YY_SC_TO_UI(c)
Definition gmlscan.c:371
static void beginstr(void)
Definition gmlscan.c:867
#define yy_load_buffer_state
Definition gmlscan.c:16
#define yywrap
Definition gmlscan.c:29
static char * yy_last_accepting_cpos
Definition gmlscan.c:812
#define yyset_in
Definition gmlscan.c:177
node NULL
Definition grammar.y:149
void agwarningf(const char *fmt,...)
Definition agerror.c:173
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
#define isatty(x)
Definition scan.c:852
int flex_int32_t
Definition scan.c:312
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 gmlparse.c:426
Definition grammar.c:93