52#define YYBISON_VERSION "3.8.2"
55#define YYSKELETON_NAME "yacc.c"
67#define YYSTYPE AAGSTYPE
69#define yyparse aagparse
71#define yyerror aagerror
72#define yydebug aagdebug
73#define yynerrs aagnerrs
76#line 61 "../../lib/cgraph/grammar.y"
87static const char Key[] =
"key";
143# define YY_CAST(Type, Val) static_cast<Type> (Val)
144# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
146# define YY_CAST(Type, Val) ((Type) (Val))
147# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
151# if defined __cplusplus
152# if 201103L <= __cplusplus
153# define YY_NULLPTR nullptr
158# define YY_NULLPTR ((void*)0)
237#ifndef __PTRDIFF_MAX__
239# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
250#ifdef __INT_LEAST8_MAX__
252#elif defined YY_STDINT_H
258#ifdef __INT_LEAST16_MAX__
260#elif defined YY_STDINT_H
272# undef UINT_LEAST8_MAX
273# undef UINT_LEAST16_MAX
274# define UINT_LEAST8_MAX 255
275# define UINT_LEAST16_MAX 65535
278#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
280#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
281 && UINT_LEAST8_MAX <= INT_MAX)
283#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
289#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
291#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
292 && UINT_LEAST16_MAX <= INT_MAX)
294#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
301# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
302# define YYPTRDIFF_T __PTRDIFF_TYPE__
303# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
304# elif defined PTRDIFF_MAX
308# define YYPTRDIFF_T ptrdiff_t
309# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
311# define YYPTRDIFF_T long
312# define YYPTRDIFF_MAXIMUM LONG_MAX
318# define YYSIZE_T __SIZE_TYPE__
320# define YYSIZE_T size_t
321# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
323# define YYSIZE_T size_t
325# define YYSIZE_T unsigned
329#define YYSIZE_MAXIMUM \
330 YY_CAST (YYPTRDIFF_T, \
331 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
332 ? YYPTRDIFF_MAXIMUM \
333 : YY_CAST (YYSIZE_T, -1)))
335#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
345# if defined YYENABLE_NLS && YYENABLE_NLS
348# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
352# define YY_(Msgid) Msgid
357#ifndef YY_ATTRIBUTE_PURE
358# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
359# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
361# define YY_ATTRIBUTE_PURE
365#ifndef YY_ATTRIBUTE_UNUSED
366# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
367# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
369# define YY_ATTRIBUTE_UNUSED
374#if ! defined lint || defined __GNUC__
375# define YY_USE(E) ((void) (E))
381#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
382# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
383# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
384 _Pragma ("GCC diagnostic push") \
385 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
387# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
388 _Pragma ("GCC diagnostic push") \
389 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
390 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
392# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
393 _Pragma ("GCC diagnostic pop")
395# define YY_INITIAL_VALUE(Value) Value
397#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
398# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
399# define YY_IGNORE_MAYBE_UNINITIALIZED_END
401#ifndef YY_INITIAL_VALUE
402# define YY_INITIAL_VALUE(Value)
405#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
406# define YY_IGNORE_USELESS_CAST_BEGIN \
407 _Pragma ("GCC diagnostic push") \
408 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
409# define YY_IGNORE_USELESS_CAST_END \
410 _Pragma ("GCC diagnostic pop")
412#ifndef YY_IGNORE_USELESS_CAST_BEGIN
413# define YY_IGNORE_USELESS_CAST_BEGIN
414# define YY_IGNORE_USELESS_CAST_END
418#define YY_ASSERT(E) ((void) (0 && (E)))
420#if !defined yyoverflow
424# ifdef YYSTACK_USE_ALLOCA
425# if YYSTACK_USE_ALLOCA
427# define YYSTACK_ALLOC __builtin_alloca
428# elif defined __BUILTIN_VA_ARG_INCR
431# define YYSTACK_ALLOC __alloca
432# elif defined _MSC_VER
434# define alloca _alloca
436# define YYSTACK_ALLOC alloca
437# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
441# define EXIT_SUCCESS 0
450# define YYSTACK_FREE(Ptr) do { ; } while (0)
451# ifndef YYSTACK_ALLOC_MAXIMUM
456# define YYSTACK_ALLOC_MAXIMUM 4032
459# define YYSTACK_ALLOC YYMALLOC
460# define YYSTACK_FREE YYFREE
461# ifndef YYSTACK_ALLOC_MAXIMUM
462# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
464# if (defined __cplusplus && ! defined EXIT_SUCCESS \
465 && ! ((defined YYMALLOC || defined malloc) \
466 && (defined YYFREE || defined free)))
469# define EXIT_SUCCESS 0
473# define YYMALLOC malloc
474# if ! defined malloc && ! defined EXIT_SUCCESS
480# if ! defined free && ! defined EXIT_SUCCESS
487#if (! defined yyoverflow \
488 && (! defined __cplusplus \
489 || (defined AAGSTYPE_IS_TRIVIAL && AAGSTYPE_IS_TRIVIAL)))
499# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
503# define YYSTACK_BYTES(N) \
504 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
505 + YYSTACK_GAP_MAXIMUM)
507# define YYCOPY_NEEDED 1
514# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
517 YYPTRDIFF_T yynewbytes; \
518 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
519 Stack = &yyptr->Stack_alloc; \
520 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
521 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
527#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
531# if defined __GNUC__ && 1 < __GNUC__
532# define YYCOPY(Dst, Src, Count) \
533 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
535# define YYCOPY(Dst, Src, Count) \
539 for (yyi = 0; yyi < (Count); yyi++) \
540 (Dst)[yyi] = (Src)[yyi]; \
567#define YYTRANSLATE(YYX) \
568 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
569 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
576 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580 2, 2, 2, 22, 17, 2, 2, 2, 2, 2,
581 2, 2, 2, 2, 2, 2, 2, 2, 18, 16,
582 2, 19, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 20, 2, 21, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 14, 2, 15, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
602 5, 6, 7, 8, 9, 10, 11, 12, 13
609 0, 141, 141, 142, 143, 146, 148, 151, 151, 153,
610 153, 155, 155, 157, 157, 159, 159, 161, 161, 163,
611 164, 167, 171, 171, 173, 173, 173, 174, 178, 178,
612 180, 181, 182, 185, 186, 189, 190, 191, 194, 195,
613 198, 198, 200, 202, 203, 205, 208, 211, 214, 214,
614 217, 218, 219, 222, 222, 222, 224, 225, 228, 229
619#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
628static const char *
const yytname[] =
630 "\"end of file\"",
"error",
"\"invalid token\"",
"T_graph",
"T_node",
631 "T_edge",
"T_digraph",
"T_subgraph",
"T_strict",
"T_edgeop",
"T_list",
632 "T_attr",
"T_atom",
"T_qatom",
"'{'",
"'}'",
"';'",
"','",
"':'",
"'='",
633 "'['",
"']'",
"'+'",
"$accept",
"graph",
"body",
"hdr",
"optgraphname",
634 "optstrict",
"graphtype",
"optstmtlist",
"stmtlist",
"optsemi",
"stmt",
635 "compound",
"simple",
"rcompound",
"$@1",
"$@2",
"nodelist",
"node",
636 "attrstmt",
"attrtype",
"optmacroname",
"optattr",
"attrlist",
637 "optattrdefs",
"attrdefs",
"attrassignment",
"graphattrdefs",
"subgraph",
638 "$@3",
"optsubghdr",
"optseparator",
"atom",
"qatom",
YY_NULLPTR
648#define YYPACT_NINF (-18)
650#define yypact_value_is_default(Yyn) \
651 ((Yyn) == YYPACT_NINF)
653#define YYTABLE_NINF (-53)
655#define yytable_value_is_error(Yyn) \
662 17, -18, -18, 19, 8, 3, -18, -2, -18, -18,
663 -18, 1, -18, -18, -18, 1, -18, -18, 9, -2,
664 -18, 18, 21, 23, -18, 18, 1, -18, -18, -18,
665 -18, 10, 13, -18, -18, -18, -18, -18, -18, -18,
666 -18, -18, 1, -18, -18, 22, 8, 1, 1, 25,
667 14, 24, -18, -18, 27, 24, 26, -18, -18, 29,
668 -18, -18, -18, -18, 1, 21, -5, -18, -18, -18,
669 -18, 16, 30, -18, -18, -18
677 0, 3, 9, 0, 0, 0, 1, 14, 2, 11,
678 12, 8, 35, 36, 37, 51, 56, 58, 0, 13,
679 16, 18, 27, 22, 28, 18, 39, 47, 34, 23,
680 48, 30, 57, 6, 7, 50, 5, 15, 17, 20,
681 24, 41, 0, 19, 41, 0, 0, 0, 0, 0,
682 52, 21, 40, 29, 30, 0, 33, 38, 49, 31,
683 46, 59, 25, 44, 0, 27, 0, 32, 26, 42,
684 43, 55, 0, 53, 54, 45
690 -18, -18, -4, -18, -18, -18, -18, -18, -18, 31,
691 32, -18, -7, -17, -18, -18, -18, 12, -18, -18,
692 -18, 6, 15, -18, -18, -14, -18, -18, -18, -18,
699 0, 3, 8, 4, 33, 5, 11, 18, 19, 39,
700 20, 21, 22, 41, 50, 65, 23, 24, 25, 26,
701 44, 51, 52, 66, 70, 27, 28, 29, 46, 30,
710 34, 12, 13, 14, 35, 15, 9, 16, 17, 10,
711 16, 17, -52, 16, 17, 45, 69, -4, 1, 6,
712 -10, 15, 7, -10, 36, 2, 16, 17, 47, 48,
713 40, 54, 73, 74, 38, 49, 59, 60, 61, 54,
714 42, 57, 58, 62, 63, 47, -40, 64, 68, 48,
715 55, 37, 71, 67, 53, 72, 43, 0, 0, 56
720 11, 3, 4, 5, 15, 7, 3, 12, 13, 6,
721 12, 13, 14, 12, 13, 26, 21, 0, 1, 0,
722 3, 7, 14, 6, 15, 8, 12, 13, 18, 19,
723 9, 42, 16, 17, 16, 22, 47, 48, 13, 50,
724 17, 19, 46, 50, 20, 18, 20, 18, 65, 19,
725 44, 19, 66, 64, 42, 66, 25, -1, -1, 44
732 0, 1, 8, 24, 26, 28, 0, 14, 25, 3,
733 6, 29, 3, 4, 5, 7, 12, 13, 30, 31,
734 33, 34, 35, 39, 40, 41, 42, 48, 49, 50,
735 52, 54, 55, 27, 54, 54, 15, 33, 16, 32,
736 9, 36, 17, 32, 43, 54, 51, 18, 19, 22,
737 37, 44, 45, 40, 54, 44, 45, 19, 25, 54,
738 54, 13, 35, 20, 18, 38, 46, 54, 36, 21,
739 47, 48, 54, 16, 17, 53
745 0, 23, 24, 24, 24, 25, 26, 27, 27, 28,
746 28, 29, 29, 30, 30, 31, 31, 32, 32, 33,
747 33, 34, 35, 35, 37, 38, 36, 36, 39, 39,
748 40, 40, 40, 41, 41, 42, 42, 42, 43, 43,
749 44, 44, 45, 46, 46, 47, 48, 49, 51, 50,
750 52, 52, 52, 53, 53, 53, 54, 54, 55, 55
756 0, 2, 2, 1, 0, 3, 3, 1, 0, 1,
757 0, 1, 1, 1, 0, 2, 1, 1, 0, 2,
758 2, 3, 1, 1, 0, 0, 5, 0, 1, 3,
759 1, 3, 5, 3, 1, 1, 1, 1, 2, 0,
760 1, 0, 4, 2, 0, 2, 3, 1, 0, 3,
761 2, 1, 0, 1, 1, 0, 1, 1, 1, 3
767#define yyerrok (yyerrstatus = 0)
768#define yyclearin (yychar = AAGEMPTY)
770#define YYACCEPT goto yyacceptlab
771#define YYABORT goto yyabortlab
772#define YYERROR goto yyerrorlab
773#define YYNOMEM goto yyexhaustedlab
776#define YYRECOVERING() (!!yyerrstatus)
778#define YYBACKUP(Token, Value) \
780 if (yychar == AAGEMPTY) \
784 YYPOPSTACK (yylen); \
790 yyerror (scanner, YY_("syntax error: cannot back up")); \
797#define YYERRCODE AAGUNDEF
805# define YYFPRINTF fprintf
808# define YYDPRINTF(Args) \
817# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
821 YYFPRINTF (stderr, "%s ", Title); \
822 yy_symbol_print (stderr, \
823 Kind, Value, scanner); \
824 YYFPRINTF (stderr, "\n"); \
834yy_symbol_value_print (FILE *yyo,
837 FILE *yyoutput = yyo;
853yy_symbol_print (FILE *yyo,
856 YYFPRINTF (yyo,
"%s %s (",
859 yy_symbol_value_print (yyo, yykind, yyvaluep,
scanner);
860 YYFPRINTF (yyo,
")");
871 YYFPRINTF (stderr,
"Stack now");
872 for (; yybottom <= yytop; yybottom++)
874 int yybot = *yybottom;
875 YYFPRINTF (stderr,
" %d", yybot);
877 YYFPRINTF (stderr,
"\n");
880# define YY_STACK_PRINT(Bottom, Top) \
883 yy_stack_print ((Bottom), (Top)); \
895 int yylno = yyrline[yyrule];
896 int yynrhs =
yyr2[yyrule];
898 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
901 for (yyi = 0; yyi < yynrhs; yyi++)
903 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
904 yy_symbol_print (stderr,
906 &yyvsp[(yyi + 1) - (yynrhs)],
scanner);
907 YYFPRINTF (stderr,
"\n");
911# define YY_REDUCE_PRINT(Rule) \
914 yy_reduce_print (yyssp, yyvsp, Rule, scanner); \
921# define YYDPRINTF(Args) ((void) 0)
922# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
923# define YY_STACK_PRINT(Bottom, Top)
924# define YY_REDUCE_PRINT(Rule)
930# define YYINITDEPTH 200
941# define YYMAXDEPTH 10000
1024#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1030 YYDPRINTF ((stderr,
"Starting parse\n"));
1050 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1057 if (yyss + yystacksize - 1 <= yyssp)
1058#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1065# if defined yyoverflow
1077 yyoverflow (
YY_(
"memory exhausted"),
1078 &yyss1, yysize *
YYSIZEOF (*yyssp),
1079 &yyvs1, yysize *
YYSIZEOF (*yyvsp),
1101# undef YYSTACK_RELOCATE
1107 yyssp = yyss + yysize - 1;
1108 yyvsp = yyvs + yysize - 1;
1111 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1112 YY_CAST (
long, yystacksize)));
1115 if (yyss + yystacksize - 1 <= yyssp)
1144 YYDPRINTF ((stderr,
"Reading a token\n"));
1152 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1226 yyval = yyvsp[1-yylen];
1233#line 141 "../../lib/cgraph/grammar.y"
1235#line 1236 "grammar.c"
1239#line 142 "../../lib/cgraph/grammar.y"
1241#line 1242 "grammar.c"
1245#line 148 "../../lib/cgraph/grammar.y"
1247#line 1248 "grammar.c"
1251#line 151 "../../lib/cgraph/grammar.y"
1252 {(yyval.str)=(yyvsp[0].
str);}
1253#line 1254 "grammar.c"
1257#line 151 "../../lib/cgraph/grammar.y"
1259#line 1260 "grammar.c"
1263#line 153 "../../lib/cgraph/grammar.y"
1265#line 1266 "grammar.c"
1269#line 153 "../../lib/cgraph/grammar.y"
1271#line 1272 "grammar.c"
1275#line 155 "../../lib/cgraph/grammar.y"
1277#line 1278 "grammar.c"
1281#line 155 "../../lib/cgraph/grammar.y"
1283#line 1284 "grammar.c"
1287#line 168 "../../lib/cgraph/grammar.y"
1289#line 1290 "grammar.c"
1293#line 173 "../../lib/cgraph/grammar.y"
1295#line 1296 "grammar.c"
1299#line 173 "../../lib/cgraph/grammar.y"
1301#line 1302 "grammar.c"
1305#line 173 "../../lib/cgraph/grammar.y"
1307#line 1308 "grammar.c"
1311#line 174 "../../lib/cgraph/grammar.y"
1313#line 1314 "grammar.c"
1317#line 180 "../../lib/cgraph/grammar.y"
1319#line 1320 "grammar.c"
1323#line 181 "../../lib/cgraph/grammar.y"
1325#line 1326 "grammar.c"
1329#line 182 "../../lib/cgraph/grammar.y"
1331#line 1332 "grammar.c"
1335#line 185 "../../lib/cgraph/grammar.y"
1337#line 1338 "grammar.c"
1341#line 186 "../../lib/cgraph/grammar.y"
1343#line 1344 "grammar.c"
1347#line 189 "../../lib/cgraph/grammar.y"
1349#line 1350 "grammar.c"
1353#line 190 "../../lib/cgraph/grammar.y"
1355#line 1356 "grammar.c"
1359#line 191 "../../lib/cgraph/grammar.y"
1361#line 1362 "grammar.c"
1365#line 194 "../../lib/cgraph/grammar.y"
1366 {(yyval.str) = (yyvsp[-1].
str);}
1367#line 1368 "grammar.c"
1371#line 195 "../../lib/cgraph/grammar.y"
1372 {(yyval.str) =
NULL; }
1373#line 1374 "grammar.c"
1377#line 208 "../../lib/cgraph/grammar.y"
1379#line 1380 "grammar.c"
1383#line 214 "../../lib/cgraph/grammar.y"
1385#line 1386 "grammar.c"
1389#line 214 "../../lib/cgraph/grammar.y"
1391#line 1392 "grammar.c"
1395#line 217 "../../lib/cgraph/grammar.y"
1396 {(yyval.str)=(yyvsp[0].
str);}
1397#line 1398 "grammar.c"
1401#line 218 "../../lib/cgraph/grammar.y"
1403#line 1404 "grammar.c"
1407#line 219 "../../lib/cgraph/grammar.y"
1409#line 1410 "grammar.c"
1413#line 224 "../../lib/cgraph/grammar.y"
1414 {(yyval.str) = (yyvsp[0].
str);}
1415#line 1416 "grammar.c"
1419#line 225 "../../lib/cgraph/grammar.y"
1420 {(yyval.str) = (yyvsp[0].
str);}
1421#line 1422 "grammar.c"
1425#line 228 "../../lib/cgraph/grammar.y"
1426 {(yyval.str) = (yyvsp[0].
str);}
1427#line 1428 "grammar.c"
1431#line 229 "../../lib/cgraph/grammar.y"
1433#line 1434 "grammar.c"
1437#line 1438 "grammar.c"
1464 const int yyi =
yypgoto[yylhs] + *yyssp;
1465 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
1487 if (yyerrstatus == 3)
1616 while (yyssp != yyss)
1630#line 231 "../../lib/cgraph/grammar.y"
1673 for (p = ilist; p; p = pn) {
1701 assert(value !=
NULL);
1712 assert(aptr->tag ==
T_atom);
1713 name = aptr->u.name;
1728 if (aptr->tag ==
T_attr) {
1733 agxset(obj, aptr->u.asym, aptr->str);
1739 assert(aptr->tag ==
T_atom);
1747 agwarningf(
"attribute macros not implemented");
1766 for (aptr =
S->attrlist.first; aptr; aptr = aptr->next)
1776 for (aptr =
S->attrlist.first; aptr; aptr = aptr->next) {
1778 if (aptr->tag ==
T_atom)
continue;
1779 if (!aptr->u.asym->fixed ||
S->g !=
G) {
1781 sym =
agattr_html(
S->g, kind, aptr->u.asym->name, aptr->str);
1783 sym =
agattr_text(
S->g, kind, aptr->u.asym->name, aptr->str);
1823 for (ptr =
S->nodelist.first; ptr; ptr = ptr->next)
1839 if (
S->nodelist.first) {
1841 S->nodelist.first =
S->nodelist.last =
NULL;
1843 else {
if (
S->subg) v =
cons_subg(
S->subg);
S->subg = 0;}
1851 item *aptr,*tptr,*p;
1875 for (tptr = p->u.list; tptr; tptr = tptr->next)
1894 size_t len = strlen(
s1) + strlen(s2) + 1;
1896 if (
len <= BUFSIZ) sym = buf;
1903 if (sym != buf)
free (sym);
1929 subg = hlist->u.subg;
1934 for (hptr = hlist->u.list; hptr; hptr = hptr->next)
1956 e =
agedge(ctx->
S->
g, t, h, key, 1);
1963 temp = tp; tp = hp; hp = temp;
1977 if (ctx->
G ==
NULL) {
1979 Agdesc_t req = {.
directed = directed, .strict = strict, .maingraph =
true};
2009 ctx->
S =
pop(ctx->
S);
2010 ctx->
S->
subg = subg;
2021 ctx->
S =
pop(ctx->
S);
2044 .InputFile = filename,
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
Memory allocation wrappers that exit on failure.
static void * gv_alloc(size_t size)
int aagparse(aagscan_t scanner)
int aaglex_destroy(aagscan_t)
void aagset_in(FILE *, aagscan_t)
void aglexeof(aagscan_t yyscanner)
int aaglex_init_extra(aagextra_t *user_defined, aagscan_t *scanner)
void aglexbad(aagscan_t yyscanner)
aagextra_t * aagget_extra(aagscan_t yyscanner)
static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
static const char *const yytname[]
static double len(glCompPoint p)
unsigned char yytype_uint8
static void attrstmt(aagscan_t scanner, int tkind, char *macroname)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, aagscan_t scanner)
static void opensubg(aagscan_t scanner, char *name)
static gstack_t * push(gstack_t *s, Agraph_t *subg)
static const yytype_int8 yytranslate[]
static void bindattrs(aagextra_t *ctx, int kind)
@ YYSYMBOL_attrassignment
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_int8 yydefact[]
static void applyattrs(aagextra_t *ctx, void *obj)
#define YY_IGNORE_USELESS_CAST_END
static void appendnode(aagscan_t scanner, char *name, char *port, char *sport)
static char * concatPort(Agraph_t *G, char *, char *)
static const yytype_int8 yycheck[]
static char * concat(aagscan_t scanner, char *, char *)
#define YY_REDUCE_PRINT(Rule)
#define YY_CAST(Type, Val)
static void deletelist(Agraph_t *G, list_t *list)
static void mkport(aagscan_t scanner, Agedge_t *e, char *name, char *val)
static const yytype_int8 yypact[]
static item * cons_attr(char *name, char *value)
static void newedge(aagscan_t scanner, Agnode_t *t, char *tport, Agnode_t *h, char *hport, char *key)
#define YY_ACCESSING_SYMBOL(State)
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
#define YY_INITIAL_VALUE(Value)
static void appendattr(aagscan_t scanner, char *name, char *value)
static void startgraph(aagscan_t scanner, char *name, bool directed, bool strict)
unsigned char yytype_uint8
#define YY_STACK_PRINT(Bottom, Top)
static void delete_items(Agraph_t *G, item *ilist)
#define YY_IGNORE_USELESS_CAST_BEGIN
static item * cons_subg(Agraph_t *subg)
static const yytype_int8 yyr2[]
static const yytype_int8 yytable[]
static item * cons_node(Agnode_t *n, char *port)
#define yytable_value_is_error(Yyn)
static void freestack(aagscan_t scanner)
static item * cons_list(item *list)
static const yytype_int8 yystos[]
static void closesubg(aagscan_t scanner)
#define YY_ATTRIBUTE_UNUSED
static const yytype_int8 yypgoto[]
static void endnode(aagscan_t scanner)
static const yytype_int8 yyr1[]
static item * newitem(int tag, void *p0, char *p1)
static void endedge(aagscan_t scanner)
static void listapp(list_t *list, item *v)
unsigned short yytype_uint16
static const yytype_int8 yydefgoto[]
static void edgerhs(aagscan_t scanner, Agnode_t *n, char *tport, item *hlist, char *key)
static void graph_error(aagscan_t scanner)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)
static void getedgeitems(aagscan_t scanner)
static void nomacros(void)
static void endgraph(aagscan_t scanner)
void aginternalmapclearlocalnames(Agraph_t *g)
Agsym_t * agattr_text(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up text attributes of a graph
int agxset(void *obj, Agsym_t *sym, const char *value)
int agxset_html(void *obj, Agsym_t *sym, const char *value)
Agsym_t * agattr_html(Agraph_t *g, int kind, char *name, const char *value)
agattr_text, but creates HTML-like values
Agedge_t * agedge(Agraph_t *g, Agnode_t *t, Agnode_t *h, char *name, int createflag)
void agwarningf(const char *fmt,...)
void agerrorf(const char *fmt,...)
int agclose(Agraph_t *g)
deletes a graph, freeing its associated storage
Agraph_t * agconcat(Agraph_t *g, const char *filename, void *chan, Agdisc_t *disc)
merges the file contents with a pre-existing graph
Agraph_t * agopen(char *name, Agdesc_t desc, Agdisc_t *disc)
creates a new graph with the given name and kind
Agraph_t * agread(void *fp, Agdisc_t *disc)
constructs a new graph
Agnode_t * agnode(Agraph_t *g, char *name, int createflag)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
Agnode_t * agsubnode(Agraph_t *g, Agnode_t *n, int createflag)
#define AGTYPE(obj)
returns AGRAPH, AGNODE, or AGEDGE depending on the type of the object
int aghtmlstr(const char *)
int agstrfree(Agraph_t *, const char *, bool is_html)
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
Agraph_t * agsubg(Agraph_t *g, char *name, int cflag)
textitem scanner parser str
NEATOPROCS_API void s1(graph_t *, node_t *)
static bool streq(const char *a, const char *b)
are a and b equal?