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"
88static const char Key[] =
"key";
144# define YY_CAST(Type, Val) static_cast<Type> (Val)
145# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
147# define YY_CAST(Type, Val) ((Type) (Val))
148# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
152# if defined __cplusplus
153# if 201103L <= __cplusplus
154# define YY_NULLPTR nullptr
159# define YY_NULLPTR ((void*)0)
238#ifndef __PTRDIFF_MAX__
240# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
251#ifdef __INT_LEAST8_MAX__
253#elif defined YY_STDINT_H
259#ifdef __INT_LEAST16_MAX__
261#elif defined YY_STDINT_H
273# undef UINT_LEAST8_MAX
274# undef UINT_LEAST16_MAX
275# define UINT_LEAST8_MAX 255
276# define UINT_LEAST16_MAX 65535
279#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
281#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
282 && UINT_LEAST8_MAX <= INT_MAX)
284#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
290#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
292#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
293 && UINT_LEAST16_MAX <= INT_MAX)
295#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
302# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
303# define YYPTRDIFF_T __PTRDIFF_TYPE__
304# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
305# elif defined PTRDIFF_MAX
309# define YYPTRDIFF_T ptrdiff_t
310# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
312# define YYPTRDIFF_T long
313# define YYPTRDIFF_MAXIMUM LONG_MAX
319# define YYSIZE_T __SIZE_TYPE__
321# define YYSIZE_T size_t
322# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
324# define YYSIZE_T size_t
326# define YYSIZE_T unsigned
330#define YYSIZE_MAXIMUM \
331 YY_CAST (YYPTRDIFF_T, \
332 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
333 ? YYPTRDIFF_MAXIMUM \
334 : YY_CAST (YYSIZE_T, -1)))
336#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
346# if defined YYENABLE_NLS && YYENABLE_NLS
349# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
353# define YY_(Msgid) Msgid
358#ifndef YY_ATTRIBUTE_PURE
359# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
360# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
362# define YY_ATTRIBUTE_PURE
366#ifndef YY_ATTRIBUTE_UNUSED
367# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
368# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
370# define YY_ATTRIBUTE_UNUSED
375#if ! defined lint || defined __GNUC__
376# define YY_USE(E) ((void) (E))
382#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
383# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
384# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
385 _Pragma ("GCC diagnostic push") \
386 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
388# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
389 _Pragma ("GCC diagnostic push") \
390 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
391 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
393# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
394 _Pragma ("GCC diagnostic pop")
396# define YY_INITIAL_VALUE(Value) Value
398#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
399# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
400# define YY_IGNORE_MAYBE_UNINITIALIZED_END
402#ifndef YY_INITIAL_VALUE
403# define YY_INITIAL_VALUE(Value)
406#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
407# define YY_IGNORE_USELESS_CAST_BEGIN \
408 _Pragma ("GCC diagnostic push") \
409 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
410# define YY_IGNORE_USELESS_CAST_END \
411 _Pragma ("GCC diagnostic pop")
413#ifndef YY_IGNORE_USELESS_CAST_BEGIN
414# define YY_IGNORE_USELESS_CAST_BEGIN
415# define YY_IGNORE_USELESS_CAST_END
419#define YY_ASSERT(E) ((void) (0 && (E)))
421#if !defined yyoverflow
425# ifdef YYSTACK_USE_ALLOCA
426# if YYSTACK_USE_ALLOCA
428# define YYSTACK_ALLOC __builtin_alloca
429# elif defined __BUILTIN_VA_ARG_INCR
432# define YYSTACK_ALLOC __alloca
433# elif defined _MSC_VER
435# define alloca _alloca
437# define YYSTACK_ALLOC alloca
438# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
442# define EXIT_SUCCESS 0
451# define YYSTACK_FREE(Ptr) do { ; } while (0)
452# ifndef YYSTACK_ALLOC_MAXIMUM
457# define YYSTACK_ALLOC_MAXIMUM 4032
460# define YYSTACK_ALLOC YYMALLOC
461# define YYSTACK_FREE YYFREE
462# ifndef YYSTACK_ALLOC_MAXIMUM
463# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
465# if (defined __cplusplus && ! defined EXIT_SUCCESS \
466 && ! ((defined YYMALLOC || defined malloc) \
467 && (defined YYFREE || defined free)))
470# define EXIT_SUCCESS 0
474# define YYMALLOC malloc
475# if ! defined malloc && ! defined EXIT_SUCCESS
481# if ! defined free && ! defined EXIT_SUCCESS
488#if (! defined yyoverflow \
489 && (! defined __cplusplus \
490 || (defined AAGSTYPE_IS_TRIVIAL && AAGSTYPE_IS_TRIVIAL)))
500# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
504# define YYSTACK_BYTES(N) \
505 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
506 + YYSTACK_GAP_MAXIMUM)
508# define YYCOPY_NEEDED 1
515# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
518 YYPTRDIFF_T yynewbytes; \
519 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
520 Stack = &yyptr->Stack_alloc; \
521 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
522 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
528#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
532# if defined __GNUC__ && 1 < __GNUC__
533# define YYCOPY(Dst, Src, Count) \
534 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
536# define YYCOPY(Dst, Src, Count) \
540 for (yyi = 0; yyi < (Count); yyi++) \
541 (Dst)[yyi] = (Src)[yyi]; \
568#define YYTRANSLATE(YYX) \
569 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
570 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
577 0, 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, 2, 2, 2, 2, 2, 2, 2,
581 2, 2, 2, 22, 17, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 18, 16,
583 2, 19, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 20, 2, 21, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 14, 2, 15, 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, 2, 2, 2, 2,
602 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
603 5, 6, 7, 8, 9, 10, 11, 12, 13
610 0, 142, 142, 143, 144, 147, 149, 152, 152, 154,
611 154, 156, 156, 158, 158, 160, 160, 162, 162, 164,
612 165, 168, 172, 172, 174, 174, 174, 175, 179, 179,
613 181, 182, 183, 186, 187, 190, 191, 192, 195, 196,
614 199, 199, 201, 203, 204, 206, 209, 212, 215, 215,
615 218, 219, 220, 223, 223, 223, 225, 226, 229, 230
620#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
629static const char *
const yytname[] =
631 "\"end of file\"",
"error",
"\"invalid token\"",
"T_graph",
"T_node",
632 "T_edge",
"T_digraph",
"T_subgraph",
"T_strict",
"T_edgeop",
"T_list",
633 "T_attr",
"T_atom",
"T_qatom",
"'{'",
"'}'",
"';'",
"','",
"':'",
"'='",
634 "'['",
"']'",
"'+'",
"$accept",
"graph",
"body",
"hdr",
"optgraphname",
635 "optstrict",
"graphtype",
"optstmtlist",
"stmtlist",
"optsemi",
"stmt",
636 "compound",
"simple",
"rcompound",
"$@1",
"$@2",
"nodelist",
"node",
637 "attrstmt",
"attrtype",
"optmacroname",
"optattr",
"attrlist",
638 "optattrdefs",
"attrdefs",
"attrassignment",
"graphattrdefs",
"subgraph",
639 "$@3",
"optsubghdr",
"optseparator",
"atom",
"qatom",
YY_NULLPTR
649#define YYPACT_NINF (-18)
651#define yypact_value_is_default(Yyn) \
652 ((Yyn) == YYPACT_NINF)
654#define YYTABLE_NINF (-53)
656#define yytable_value_is_error(Yyn) \
663 17, -18, -18, 19, 8, 3, -18, -2, -18, -18,
664 -18, 1, -18, -18, -18, 1, -18, -18, 9, -2,
665 -18, 18, 21, 23, -18, 18, 1, -18, -18, -18,
666 -18, 10, 13, -18, -18, -18, -18, -18, -18, -18,
667 -18, -18, 1, -18, -18, 22, 8, 1, 1, 25,
668 14, 24, -18, -18, 27, 24, 26, -18, -18, 29,
669 -18, -18, -18, -18, 1, 21, -5, -18, -18, -18,
670 -18, 16, 30, -18, -18, -18
678 0, 3, 9, 0, 0, 0, 1, 14, 2, 11,
679 12, 8, 35, 36, 37, 51, 56, 58, 0, 13,
680 16, 18, 27, 22, 28, 18, 39, 47, 34, 23,
681 48, 30, 57, 6, 7, 50, 5, 15, 17, 20,
682 24, 41, 0, 19, 41, 0, 0, 0, 0, 0,
683 52, 21, 40, 29, 30, 0, 33, 38, 49, 31,
684 46, 59, 25, 44, 0, 27, 0, 32, 26, 42,
685 43, 55, 0, 53, 54, 45
691 -18, -18, -4, -18, -18, -18, -18, -18, -18, 31,
692 32, -18, -7, -17, -18, -18, -18, 12, -18, -18,
693 -18, 6, 15, -18, -18, -14, -18, -18, -18, -18,
700 0, 3, 8, 4, 33, 5, 11, 18, 19, 39,
701 20, 21, 22, 41, 50, 65, 23, 24, 25, 26,
702 44, 51, 52, 66, 70, 27, 28, 29, 46, 30,
711 34, 12, 13, 14, 35, 15, 9, 16, 17, 10,
712 16, 17, -52, 16, 17, 45, 69, -4, 1, 6,
713 -10, 15, 7, -10, 36, 2, 16, 17, 47, 48,
714 40, 54, 73, 74, 38, 49, 59, 60, 61, 54,
715 42, 57, 58, 62, 63, 47, -40, 64, 68, 48,
716 55, 37, 71, 67, 53, 72, 43, 0, 0, 56
721 11, 3, 4, 5, 15, 7, 3, 12, 13, 6,
722 12, 13, 14, 12, 13, 26, 21, 0, 1, 0,
723 3, 7, 14, 6, 15, 8, 12, 13, 18, 19,
724 9, 42, 16, 17, 16, 22, 47, 48, 13, 50,
725 17, 19, 46, 50, 20, 18, 20, 18, 65, 19,
726 44, 19, 66, 64, 42, 66, 25, -1, -1, 44
733 0, 1, 8, 24, 26, 28, 0, 14, 25, 3,
734 6, 29, 3, 4, 5, 7, 12, 13, 30, 31,
735 33, 34, 35, 39, 40, 41, 42, 48, 49, 50,
736 52, 54, 55, 27, 54, 54, 15, 33, 16, 32,
737 9, 36, 17, 32, 43, 54, 51, 18, 19, 22,
738 37, 44, 45, 40, 54, 44, 45, 19, 25, 54,
739 54, 13, 35, 20, 18, 38, 46, 54, 36, 21,
740 47, 48, 54, 16, 17, 53
746 0, 23, 24, 24, 24, 25, 26, 27, 27, 28,
747 28, 29, 29, 30, 30, 31, 31, 32, 32, 33,
748 33, 34, 35, 35, 37, 38, 36, 36, 39, 39,
749 40, 40, 40, 41, 41, 42, 42, 42, 43, 43,
750 44, 44, 45, 46, 46, 47, 48, 49, 51, 50,
751 52, 52, 52, 53, 53, 53, 54, 54, 55, 55
757 0, 2, 2, 1, 0, 3, 3, 1, 0, 1,
758 0, 1, 1, 1, 0, 2, 1, 1, 0, 2,
759 2, 3, 1, 1, 0, 0, 5, 0, 1, 3,
760 1, 3, 5, 3, 1, 1, 1, 1, 2, 0,
761 1, 0, 4, 2, 0, 2, 3, 1, 0, 3,
762 2, 1, 0, 1, 1, 0, 1, 1, 1, 3
768#define yyerrok (yyerrstatus = 0)
769#define yyclearin (yychar = AAGEMPTY)
771#define YYACCEPT goto yyacceptlab
772#define YYABORT goto yyabortlab
773#define YYERROR goto yyerrorlab
774#define YYNOMEM goto yyexhaustedlab
777#define YYRECOVERING() (!!yyerrstatus)
779#define YYBACKUP(Token, Value) \
781 if (yychar == AAGEMPTY) \
785 YYPOPSTACK (yylen); \
791 yyerror (scanner, YY_("syntax error: cannot back up")); \
798#define YYERRCODE AAGUNDEF
806# define YYFPRINTF fprintf
809# define YYDPRINTF(Args) \
818# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
822 YYFPRINTF (stderr, "%s ", Title); \
823 yy_symbol_print (stderr, \
824 Kind, Value, scanner); \
825 YYFPRINTF (stderr, "\n"); \
835yy_symbol_value_print (FILE *yyo,
838 FILE *yyoutput = yyo;
854yy_symbol_print (FILE *yyo,
857 YYFPRINTF (yyo,
"%s %s (",
860 yy_symbol_value_print (yyo, yykind, yyvaluep,
scanner);
861 YYFPRINTF (yyo,
")");
872 YYFPRINTF (stderr,
"Stack now");
873 for (; yybottom <= yytop; yybottom++)
875 int yybot = *yybottom;
876 YYFPRINTF (stderr,
" %d", yybot);
878 YYFPRINTF (stderr,
"\n");
881# define YY_STACK_PRINT(Bottom, Top) \
884 yy_stack_print ((Bottom), (Top)); \
896 int yylno = yyrline[yyrule];
897 int yynrhs =
yyr2[yyrule];
899 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
902 for (yyi = 0; yyi < yynrhs; yyi++)
904 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
905 yy_symbol_print (stderr,
907 &yyvsp[(yyi + 1) - (yynrhs)],
scanner);
908 YYFPRINTF (stderr,
"\n");
912# define YY_REDUCE_PRINT(Rule) \
915 yy_reduce_print (yyssp, yyvsp, Rule, scanner); \
922# define YYDPRINTF(Args) ((void) 0)
923# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
924# define YY_STACK_PRINT(Bottom, Top)
925# define YY_REDUCE_PRINT(Rule)
931# define YYINITDEPTH 200
942# define YYMAXDEPTH 10000
1025#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1031 YYDPRINTF ((stderr,
"Starting parse\n"));
1051 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1058 if (yyss + yystacksize - 1 <= yyssp)
1059#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1066# if defined yyoverflow
1078 yyoverflow (
YY_(
"memory exhausted"),
1079 &yyss1, yysize *
YYSIZEOF (*yyssp),
1080 &yyvs1, yysize *
YYSIZEOF (*yyvsp),
1102# undef YYSTACK_RELOCATE
1108 yyssp = yyss + yysize - 1;
1109 yyvsp = yyvs + yysize - 1;
1112 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1113 YY_CAST (
long, yystacksize)));
1116 if (yyss + yystacksize - 1 <= yyssp)
1145 YYDPRINTF ((stderr,
"Reading a token\n"));
1153 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1227 yyval = yyvsp[1-yylen];
1234#line 142 "../../lib/cgraph/grammar.y"
1236#line 1237 "grammar.c"
1240#line 143 "../../lib/cgraph/grammar.y"
1242#line 1243 "grammar.c"
1246#line 149 "../../lib/cgraph/grammar.y"
1248#line 1249 "grammar.c"
1252#line 152 "../../lib/cgraph/grammar.y"
1253 {(yyval.str)=(yyvsp[0].
str);}
1254#line 1255 "grammar.c"
1258#line 152 "../../lib/cgraph/grammar.y"
1260#line 1261 "grammar.c"
1264#line 154 "../../lib/cgraph/grammar.y"
1266#line 1267 "grammar.c"
1270#line 154 "../../lib/cgraph/grammar.y"
1272#line 1273 "grammar.c"
1276#line 156 "../../lib/cgraph/grammar.y"
1278#line 1279 "grammar.c"
1282#line 156 "../../lib/cgraph/grammar.y"
1284#line 1285 "grammar.c"
1288#line 169 "../../lib/cgraph/grammar.y"
1290#line 1291 "grammar.c"
1294#line 174 "../../lib/cgraph/grammar.y"
1296#line 1297 "grammar.c"
1300#line 174 "../../lib/cgraph/grammar.y"
1302#line 1303 "grammar.c"
1306#line 174 "../../lib/cgraph/grammar.y"
1308#line 1309 "grammar.c"
1312#line 175 "../../lib/cgraph/grammar.y"
1314#line 1315 "grammar.c"
1318#line 181 "../../lib/cgraph/grammar.y"
1320#line 1321 "grammar.c"
1324#line 182 "../../lib/cgraph/grammar.y"
1326#line 1327 "grammar.c"
1330#line 183 "../../lib/cgraph/grammar.y"
1332#line 1333 "grammar.c"
1336#line 186 "../../lib/cgraph/grammar.y"
1338#line 1339 "grammar.c"
1342#line 187 "../../lib/cgraph/grammar.y"
1344#line 1345 "grammar.c"
1348#line 190 "../../lib/cgraph/grammar.y"
1350#line 1351 "grammar.c"
1354#line 191 "../../lib/cgraph/grammar.y"
1356#line 1357 "grammar.c"
1360#line 192 "../../lib/cgraph/grammar.y"
1362#line 1363 "grammar.c"
1366#line 195 "../../lib/cgraph/grammar.y"
1367 {(yyval.str) = (yyvsp[-1].
str);}
1368#line 1369 "grammar.c"
1372#line 196 "../../lib/cgraph/grammar.y"
1373 {(yyval.str) =
NULL; }
1374#line 1375 "grammar.c"
1378#line 209 "../../lib/cgraph/grammar.y"
1380#line 1381 "grammar.c"
1384#line 215 "../../lib/cgraph/grammar.y"
1386#line 1387 "grammar.c"
1390#line 215 "../../lib/cgraph/grammar.y"
1392#line 1393 "grammar.c"
1396#line 218 "../../lib/cgraph/grammar.y"
1397 {(yyval.str)=(yyvsp[0].
str);}
1398#line 1399 "grammar.c"
1402#line 219 "../../lib/cgraph/grammar.y"
1404#line 1405 "grammar.c"
1408#line 220 "../../lib/cgraph/grammar.y"
1410#line 1411 "grammar.c"
1414#line 225 "../../lib/cgraph/grammar.y"
1415 {(yyval.str) = (yyvsp[0].
str);}
1416#line 1417 "grammar.c"
1420#line 226 "../../lib/cgraph/grammar.y"
1421 {(yyval.str) = (yyvsp[0].
str);}
1422#line 1423 "grammar.c"
1426#line 229 "../../lib/cgraph/grammar.y"
1427 {(yyval.str) = (yyvsp[0].
str);}
1428#line 1429 "grammar.c"
1432#line 230 "../../lib/cgraph/grammar.y"
1434#line 1435 "grammar.c"
1438#line 1439 "grammar.c"
1465 const int yyi =
yypgoto[yylhs] + *yyssp;
1466 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
1488 if (yyerrstatus == 3)
1617 while (yyssp != yyss)
1631#line 232 "../../lib/cgraph/grammar.y"
1674 for (p = ilist; p; p = pn) {
1702 assert(value !=
NULL);
1713 assert(aptr->tag ==
T_atom);
1714 name = aptr->u.name;
1729 if (aptr->tag ==
T_attr) {
1734 agxset(obj, aptr->u.asym, aptr->str);
1740 assert(aptr->tag ==
T_atom);
1748 agwarningf(
"attribute macros not implemented");
1767 for (aptr =
S->attrlist.first; aptr; aptr = aptr->next)
1777 for (aptr =
S->attrlist.first; aptr; aptr = aptr->next) {
1779 if (aptr->tag ==
T_atom)
continue;
1780 if (!aptr->u.asym->fixed ||
S->g !=
G) {
1782 sym =
agattr_html(
S->g, kind, aptr->u.asym->name, aptr->str);
1784 sym =
agattr_text(
S->g, kind, aptr->u.asym->name, aptr->str);
1824 for (ptr =
S->nodelist.first; ptr; ptr = ptr->next)
1840 if (
S->nodelist.first) {
1842 S->nodelist.first =
S->nodelist.last =
NULL;
1844 else {
if (
S->subg) v =
cons_subg(
S->subg);
S->subg = 0;}
1852 item *aptr,*tptr,*p;
1876 for (tptr = p->u.list; tptr; tptr = tptr->next)
1895 size_t len = strlen(
s1) + strlen(s2) + 1;
1897 if (
len <= BUFSIZ) sym = buf;
1904 if (sym != buf)
free (sym);
1930 subg = hlist->u.subg;
1935 for (hptr = hlist->u.list; hptr; hptr = hptr->next)
1957 e =
agedge(ctx->
S->
g, t, h, key, 1);
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)
Arithmetic helper functions.
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?